Debian Codegraph @

gcc/testsuite/gcc.target/i386/apx-ndd-shld-shrd.c

raw
1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2 -Wno-shift-count-overflow -m64 -mapxf" } */
3 /* { dg-final { scan-assembler-times {(?n)shld[ql]?[\t ]*\$2} 4 } } */
4 /* { dg-final { scan-assembler-times {(?n)shrd[ql]?[\t ]*\$2} 4 } } */
5
6 typedef unsigned long u64;
7 typedef unsigned int u32;
8
9 long a;
10 int c;
11 const char n = 2;
12
13 long test64r (long e) { long t = ((u64)a >> n) | (e << (64 - n)); return t;}
14 long test64l (u64 e) { long t = (a << n) | (e >> (64 - n)); return t;}
15 int test32r (int f) { int t = ((u32)c >> n) | (f << (32 - n)); return t; }
16 int test32l (u32 f) { int t = (c << n) | (f >> (32 - n)); return t; }
17
18 u64 ua;
19 u32 uc;
20
21 u64 testu64l (u64 ue) { u64 ut = (ua << n) | (ue >> (64 - n)); return ut; }
22 u64 testu64r (u64 ue) { u64 ut = (ua >> n) | (ue << (64 - n)); return ut; }
23 u32 testu32l (u32 uf) { u32 ut = (uc << n) | (uf >> (32 - n)); return ut; }
24 u32 testu32r (u32 uf) { u32 ut = (uc >> n) | (uf << (32 - n)); return ut; }