gcc/testsuite/ChangeLog:
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / cmpb-1.c
blob1f04a76e7e3190a3f37c7c3b0f9321476f55cf25
1 /* { dg-do run { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
3 /* { dg-require-effective-target lp64 } */
4 /* { dg-require-effective-target dfp_hw } */
5 /* { dg-options "-mcpu=power6" } */
7 void abort ();
9 unsigned long long int
10 do_compare (unsigned long long int a, unsigned long long int b)
12 return __builtin_cmpb (a, b);
15 void
16 expect (unsigned long long int pattern, unsigned long long int value)
18 if (pattern != value)
19 abort ();
22 int
23 main (int argc, char *argv[])
25 expect (0xff00000000000000LL,
26 do_compare (0x0123456789abcdefLL, 0x0100000000000000LL));
27 expect (0x00ffffffffffffff,
28 do_compare (0x0123456789abcdefLL, 0x0023456789abcdefLL));
29 expect (0x00000000000000ff,
30 do_compare (0x00000000000000efLL, 0x0123456789abcdefLL));