Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / arm / iordi_notdi-1.c
blobd98f0e8251ac1bab495afd2a3519d087ed690d45
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fno-inline --save-temps" } */
4 extern void abort (void);
6 typedef long long s64int;
7 typedef int s32int;
8 typedef unsigned long long u64int;
9 typedef unsigned int u32int;
11 s64int
12 iordi_di_notdi (s64int a, s64int b)
14 return (a | ~b);
17 s64int
18 iordi_di_notzesidi (s64int a, u32int b)
20 return (a | ~(u64int) b);
23 s64int
24 iordi_notdi_zesidi (s64int a, u32int b)
26 return (~a | (u64int) b);
29 s64int
30 iordi_di_notsesidi (s64int a, s32int b)
32 return (a | ~(s64int) b);
35 int main ()
37 s64int a64 = 0xdeadbeef00000000ll;
38 s64int b64 = 0x000000004f4f0112ll;
39 s64int c64 = 0xdeadbeef000f0000ll;
41 u32int c32 = 0x01124f4f;
42 s32int d32 = 0xabbaface;
44 s64int z = iordi_di_notdi (a64, b64);
45 if (z != 0xffffffffb0b0feedll)
46 abort ();
48 z = iordi_di_notzesidi (a64, c32);
49 if (z != 0xfffffffffeedb0b0ll)
50 abort ();
52 z = iordi_notdi_zesidi (c64, c32);
53 if (z != 0x21524110fff2ffffll)
54 abort ();
56 z = iordi_di_notsesidi (a64, d32);
57 if (z != 0xdeadbeef54450531ll)
58 abort ();
60 return 0;
63 /* { dg-final { scan-assembler-times "orn\t" 6 { target arm_thumb2 } } } */