2 extern void abort (void);
3 extern void exit (int);
5 volatile unsigned long long x
[2];
9 volatile char *addr
= (volatile char *) &x
[0];
13 __builtin_write64 (addr
, 0x1122334455667788ULL
);
14 __builtin_write32 (addr
+ 8, 0x12345678);
15 __builtin_write16 (addr
+ 12, 0xaabb);
16 __builtin_write8 (addr
+ 14, 0xcc);
18 if (x
[0] != 0x1122334455667788ULL
19 || x
[1] != 0x12345678aabbccffULL
20 || __builtin_read8 (addr
) != 0x11
21 || __builtin_read16 (addr
+ 2) != 0x3344
22 || __builtin_read32 (addr
+ 4) != 0x55667788
23 || __builtin_read64 (addr
+ 8) != 0x12345678aabbccffULL
)
26 __builtin_write64 (addr
, 0);
27 __builtin_write32 (addr
+ 8, 0);
28 __builtin_write16 (addr
+ 12, 0);
29 __builtin_write8 (addr
+ 14, 0);
30 if (x
[0] != 0 || x
[1] != 0xff)