1 /* Origin: PR target/11693 from Andreas Schwab <schwab@suse.de> */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -frename-registers" } */
5 static inline unsigned long long
9 __asm__
__volatile__ ("" : "=r" (x
) :: "memory");
14 bar (unsigned long long x
, unsigned long long y
)
16 __asm__
__volatile__ ("" :: "r"(x
), "r"(y
) : "memory");
20 baz (unsigned long long x
, unsigned long long y
, unsigned long long z
,
21 unsigned long long p
, unsigned long long q
)
23 __asm__
__volatile__ ("" :: "r" (q
<< 2) : "memory");
24 __asm__
__volatile__ ("" :: "r" (z
) : "memory");
26 __asm__
__volatile__ ("" :: "r" (y
), "r" (p
) : "memory");
28 __asm__
__volatile__ ("" :: "r" (y
), "r" (p
) : "memory");
31 static inline unsigned long long
32 ffz (unsigned long long x
)
35 __asm__ ("" : "=r" (r
) : "r" (x
& (~x
- 1)));
39 void die (const char *, ...) __attribute__ ((noreturn
));
44 unsigned long long a
, c
;
47 bar (0xc000000000000000LL
, 0x660);
48 bar (0xa00000000000c000LL
, 0x539);
49 baz (2, 1, 0xa000000000008000LL
,
50 ({ unsigned long long b
;
51 b
= ({ unsigned long long d
; __asm__ ("" : "=r" (d
) : "r" (x
)); d
; })
56 c
= ffz (0x1fffffffffffffffLL
);