diff --git a/tests/regress/eflags_noset.c b/tests/regress/eflags_noset.c index 8cc15d6..187484b 100644 --- a/tests/regress/eflags_noset.c +++ b/tests/regress/eflags_noset.c @@ -25,9 +25,10 @@ typedef uint64_t puint; uint32_t realEflags() { puint val = 0; - puint i = 0xFFFFFEFF; //attempt to set ALL bits except trap flag. #if defined(__i386__) + puint i = 0xFFFFFEFF; //attempt to set ALL bits except trap flag. + __asm__("pushf\n\t" "push %0\n\t" "popf\n\t" @@ -38,6 +39,8 @@ uint32_t realEflags() : "r"(i) : "%0"); #elif defined(__x86_64__) + puint i = 0xFFFFFEFF; //attempt to set ALL bits except trap flag. + __asm__("pushfq\n\t" "pushq %0\n\t" "popfq\n\t" @@ -56,7 +59,7 @@ uint32_t realEflags() static void VM_exec() { - +#if defined(__i386__) || defined(__x86_64__) uc_engine *uc; uc_err err; unsigned int r_eax, eflags, r_esp, realflags = 0; @@ -115,6 +118,7 @@ static void VM_exec() realflags = realEflags(); assert(r_eax == realflags); +#endif } int main(int argc, char *argv[])