aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/bpf/neg-1.c
blob: 7acc0cab553d649e8e722c03b0c92159c3f5979e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Check negr and negr32 instructions.  */

/* { dg-do compile } */
/* { dg-options "-malu32 -masm=normal" } */

long foo (long a, long b, int x, int y)
{
  a = -b;
  x = -y;
  return a + x;
}

/* { dg-final { scan-assembler "neg\t%r.\n" } } */
/* { dg-final { scan-assembler "neg32\t%r.\n" } } */