summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
df5a67b)
It wasn't correct to use `g' here. Clang legitimately used sp-relative
memory locations, which broke really badly because the stack pointer
moves during the code sequence. Force the operands into registers to
avoid this problem.
{
unsigned ff;
__asm__ ("pushf; pushl %1; popf; pushf; popl %0; popf"
{
unsigned ff;
__asm__ ("pushf; pushl %1; popf; pushf; popl %0; popf"
- : "=g" (ff)
- : "g" (f));
+ : "=r" (ff)
+ : "r" (f));
{
unsigned long ff;
__asm__ ("pushf; pushq %1; popf; pushf; popq %0; popf"
{
unsigned long ff;
__asm__ ("pushf; pushq %1; popf; pushf; popq %0; popf"
- : "=g" (ff)
- : "g" (f));
+ : "=r" (ff)
+ : "r" (f));