By: David Hess (davidwhess.delete@this.gmail.com), February 26, 2013 11:01 pm
Room: Moderated Discussions
Linus Torvalds (torvalds.delete@this.linux-foundation.org) on February 25, 2013 6:22 pm wrote:
> Yes, emulating x86 flags is bothersome, but that's just because the exact locations and other silly
> details. Auxiliary carry, parity etc are historical artifacts. Same goes for "inc/dec do not touch
> carry" (which is, I think, due to trying to preserve carry around loop iterations for multiprecision
> arithmetic) and the rather specific semantics for carry and shifts (which do make sense from an original
> iterative bit-at-a-time implementation standpoint but not from a barrel shifter one).
The 8080 does the same thing with increment and decrement not affecting carry so that multiprecision addition, subtraction, shift, and rotate can be done with a loop.
I still regularly use auxiliary carry and parity if available. The only reason I no longer use them with x86 is that x86 no longer exists in the embedded space I work in.
> Yes, emulating x86 flags is bothersome, but that's just because the exact locations and other silly
> details. Auxiliary carry, parity etc are historical artifacts. Same goes for "inc/dec do not touch
> carry" (which is, I think, due to trying to preserve carry around loop iterations for multiprecision
> arithmetic) and the rather specific semantics for carry and shifts (which do make sense from an original
> iterative bit-at-a-time implementation standpoint but not from a barrel shifter one).
The 8080 does the same thing with increment and decrement not affecting carry so that multiprecision addition, subtraction, shift, and rotate can be done with a loop.
I still regularly use auxiliary carry and parity if available. The only reason I no longer use them with x86 is that x86 no longer exists in the embedded space I work in.