regress: eflags_noset.c should only asm x86 code on x86 platform. fix #764

This commit is contained in:
Nguyen Anh Quynh 2017-02-25 01:14:47 +08:00
parent f4325f8c4e
commit b12ce92468

View file

@ -34,17 +34,20 @@ uint32_t realEflags()
"pushf\n\t"
"pop %0\n\t"
"popf"
#else
: "=r"(val)
: "r"(i)
: "%0");
#elif defined(__x86_64__)
__asm__("pushfq\n\t"
"pushq %0\n\t"
"popfq\n\t"
"pushfq\n\t"
"popq %0\n\t"
"popfq"
#endif
: "=r"(val)
: "r"(i)
: "%0");
#endif
printf("Real system eflags: 0x%08"PRIX3264"\n", val);