diff options
author | Andy Lutomirski <luto@amacapital.net> | 2014-07-29 20:56:30 -0700 |
---|---|---|
committer | Andy Lutomirski <luto@amacapital.net> | 2014-07-29 20:56:30 -0700 |
commit | 077a1617302a21a4b77c818962a4c49ff208466c (patch) | |
tree | ecbc5fe81a3aa598372e47b5a35c231f3d39392d | |
parent | d1c4e4fcfbac0469db5b36815536cde70806e570 (diff) | |
download | misc-tests-077a1617302a21a4b77c818962a4c49ff208466c.tar.gz |
user_visible_state: Improve arithmetic flags output
-rw-r--r-- | user_visible_state.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/user_visible_state.c b/user_visible_state.c index f171ab5..6111af1 100644 --- a/user_visible_state.c +++ b/user_visible_state.c @@ -76,9 +76,12 @@ static void show_flags(void) { unsigned long flags; asm ("sub $128, %%sp\n\t" + "xor %%ax,%%ax\n\t" /* Make arithmetic flags be deterministic */ "pushf\n\t" "pop %0\n\t" - "add $128, %%sp" : "=r" (flags)); + "add $128, %%sp" : "=r" (flags) : + : "flags", + "eax"); printf("FLAGS: 0x%016lX\n", flags); } |