Debian Codegraph @

gcc/testsuite/gcc.target/pru/asm-op-modifier.c

raw
1 /* Test ASM operand modifiers. */
2
3 /* { dg-do compile } */
4 /* { dg-options "-O1" } */
5
6 struct S {
7 char b;
8 int a;
9 short c;
10 };
11
12 void
13 test_const_int (void)
14 {
15 /* { dg-final { scan-assembler "# printing 7 and -5" } } */
16 asm volatile ("# printing %c0 and %n1"
17 : :
18 "i" (sizeof(struct S)),
19 "i" (__builtin_offsetof (struct S, c)));
20 }
21
22 extern int g;
23
24 void
25 test_sym (void)
26 {
27 /* { dg-final { scan-assembler "# outputting g and test_sym" } } */
28 asm volatile ("# outputting %c0 and %c1"
29 : :
30 "i" (&g),
31 "i" (&test_sym));
32 }