Debian Codegraph @

gcc/testsuite/gcc.target/i386/apx-inline-gpr-norex2.c

raw
1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-options "-O2 -mapxf -m64" } */
3
4 typedef unsigned int u32;
5 typedef unsigned long long u64;
6
7 void constraint_test ()
8 {
9 register u64 *r16 __asm__("%r16");
10 register u64 r17 __asm__("%r17");
11 u64 *addr = r16;
12
13 __asm__ __volatile__ ("test_mapping_g_m %0, %%rax" : : "g" (r16) : "rax");
14 __asm__ __volatile__ ("test_mapping_g_r %0, %%rax" : : "g" (r17) : "rax");
15 __asm__ __volatile__ ("test_mapping_m %0, %%rax" : : "m" (addr) : "rax");
16 __asm__ __volatile__ ("test_mapping_r %0, %%rax" : : "r" (r17) : "rax");
17 __asm__ __volatile__ ("test_mapping_rm %0, %%rax" : "=r,m" (r16) : : "rax");
18 }
19
20 /* { dg-final { scan-assembler-not "test_mapping_g_m %r16, %rax" } } */
21 /* { dg-final { scan-assembler-not "test_mapping_g_r %r17, %rax" } } */
22 /* { dg-final { scan-assembler-not "test_mapping_m %r16, %rax" } } */
23 /* { dg-final { scan-assembler-not "test_mapping_r %r17, %rax" } } */
24 /* { dg-final { scan-assembler-not "test_mapping_rm %r16, %rax" } } */
25