1 extern int g;
2
fo0(int * p)3 void fo0(int *p) { asm volatile ("op %0" :: "p" (&g)); }
fo1(int * p)4 void fo1(int *p) { asm volatile ("op %0" :: "m" (g)); }
5
fo2(int * p)6 void fo2(int *p) { asm volatile ("op %0" :: "p" (p)); }
fo3(int * p)7 void fo3(int *p) { asm volatile ("op %0" :: "m" (*p)); }
8
9 /*
10 * check-name: eval-asm-memop
11 * check-command: test-linearize -Wno-decl $file
12 *
13 * check-output-start
14 fo0:
15 .L0:
16 <entry-point>
17 asm "op %0"
18 in: "p" (g)
19 ret
20
21
22 fo1:
23 .L2:
24 <entry-point>
25 asm "op %0"
26 in: "m" (g)
27 ret
28
29
30 fo2:
31 .L4:
32 <entry-point>
33 asm "op %0"
34 in: "p" (%arg1)
35 ret
36
37
38 fo3:
39 .L6:
40 <entry-point>
41 asm "op %0"
42 in: "m" (%arg1)
43 ret
44
45
46 * check-output-end
47 */
48