I was just trying to remember it. The answer was written on a scrap of paper by
my Director of Studies, during a supervision near the end of last term, and I
_really_ ought to be able to remember it :)
It's something like subtracting 0x01010101 from the dword and oring with
0x80808080 to detect the carry, but that's not quite it. Perhaps you do
something like
((a - 0x01010101) xor a) & 0x808080
but I thought it was simpler than that.
---- ---- ----
David Woodhouse, Robinson College, CB3 9AN, England. (+44) 0976 658355
Dave@imladris.demon.co.uk http://www.imladris.demon.co.uk
finger pgp@dwmw2.robinson.cam.ac.uk for PGP key.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu