2 /* { dg-options "-O2" } */
9 unsigned long long addr
;
13 unsigned int __attribute__((__noinline__
))
14 level(const struct emac
*obj
)
19 void __attribute__((__noinline__
))
20 info(struct emac
*dev
, unsigned long long addr
)
22 asm("" : : : "memory");
25 unsigned long long __attribute__((__noinline__
))
26 get_value(const struct mop
*mop
)
28 return 0x1234567890abcdefull
;
31 int __attribute__((__noinline__
))
32 emac_operation(struct emac
*obj
, struct mop
*mop
)
34 unsigned long long addr
= mop
->addr
;
35 int index
= addr
>> 2;
36 unsigned int value
, old_value
;
47 value
= get_value(mop
);
48 old_value
= obj
->reg
[index
];
54 obj
->reg
[0] = old_value
;
58 obj
->reg
[index
] = value
;
67 struct emac e
= { { 0 } };
68 struct mop mop
= { 32, 4 };
70 e
.reg
[8] = 0xdeadbeef;
71 emac_operation(&e
, &mop
);
73 if (e
.reg
[8] != 0x90abcdef)