The full testcase:
#include <stdio.h> extern void *x; int main() { int a; asm volatile ("x: fldz\n\ push %%edx\n\ fnstenv -0xc(%%esp)\n\ pop %%edx\n" : "=d" (a) : : "memory"); printf ("%x %x\n", a, &x); return 0; }
$ gcc -m32 test.c -o test $ ./test 80483ae 80483ae $ ./qemu/i386-linux-user/qemu-i386 ./test 0 80483ae
Cleaned up .byte row.
The full testcase:
#include <stdio.h>
extern void *x;
int main() {
int a;
asm volatile ("x: fldz\n\
push %%edx\n\
fnstenv -0xc(%%esp)\n\
pop %%edx\n" : "=d" (a) : : "memory");
printf ("%x %x\n", a, &x);
return 0;
}
$ gcc -m32 test.c -o test i386-linux- user/qemu- i386 ./test
$ ./test
80483ae 80483ae
$ ./qemu/
0 80483ae
Cleaned up .byte row.