[RS6000] dg-do !compile and scan-assembler
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / cmpb-3.c
blobde111a80144f5eccf1932a789367d1b419fa0e16
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-require-effective-target ilp32 } */
3 /* { dg-require-effective-target powerpc_popcntb_ok } */
4 /* { dg-options "-mdejagnu-cpu=power6" } */
6 void abort ();
8 long long int
9 do_compare (long long int a, long long int b)
11 return __builtin_cmpb (a, b); /* { dg-error "'__builtin_cmpb' is not supported in this compiler configuration" } */
14 void expect (long long int pattern, long long int value)
16 if (pattern != value)
17 abort ();
20 int
21 main (int argc, char *argv[])
23 expect (0xff00000000000000LL,
24 do_compare (0x0123456789abcdefLL, 0x0100000000000000LL));
25 expect (0x00ffffffffffffff,
26 do_compare (0x0123456789abcdefLL, 0x0023456789abcdefLL));
27 expect (0x00000000000000ff,
28 do_compare (0x00000000000000efLL, 0x0123456789abcdefLL));