From b12ce92468309d5eaf645406db8ea2f2d33733d1 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sat, 25 Feb 2017 01:14:47 +0800 Subject: [PATCH] regress: eflags_noset.c should only asm x86 code on x86 platform. fix #764 --- tests/regress/eflags_noset.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/regress/eflags_noset.c b/tests/regress/eflags_noset.c index 80afb495..8cc15d6b 100644 --- a/tests/regress/eflags_noset.c +++ b/tests/regress/eflags_noset.c @@ -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);