From: Jeremy Fitzhardinge <jeremy@go...> - 2002-12-11 02:42:32
Parity is only computed over the least significant 8 bits!
I'd always thought the parity flag was a useless hold-over from the 8080
that was completely obsolete.
Then I found a use for it.
Then I find they've crippled it so that it isn't actually useful at all.
I'm not happy about Intel at the moment.
So, the only way of recovering the neat hack is some sequence like:
movl EFLAGS(%ebp), %reg
shrl $7, %reg
testl $0x11, %reg
which is workable, but a lot less appealing.
Also goes to show how robust programs are when you completely f*ck up a
whole conditional test.
Get latest updates about Open Source Projects, Conferences and News.