[RS6000] Tests that use int128_t and -m32
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / cmpb-2.c
blob113ab6a5f998b997f5fc569e41cff9276e840200
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-require-effective-target lp64 } */
3 /* { dg-require-effective-target powerpc_popcntb_ok } */
4 /* { dg-options "-mdejagnu-cpu=power5" } */
6 void abort ();
8 unsigned long long int
9 do_compare (unsigned long long int a, unsigned long long int b)
11 return __builtin_cmpb (a, b); /* { dg-warning "implicit declaration of function '__builtin_cmpb'" } */
14 void
15 expect (unsigned long long int pattern, unsigned long long int value)
17 if (pattern != value)
18 abort ();
21 int
22 main (int argc, char *argv[])
24 expect (0xff00000000000000LL,
25 do_compare (0x0123456789abcdefLL, 0x0100000000000000LL));
26 expect (0x00ffffffffffffff,
27 do_compare (0x0123456789abcdefLL, 0x0023456789abcdefLL));
28 expect (0x00000000000000ff,
29 do_compare (0x00000000000000efLL, 0x0123456789abcdefLL));