By: Michael S (already5chosen.delete@this.yahoo.com), February 26, 2013 4:05 am
Room: Moderated Discussions
none (none.delete@this.none.com) on February 26, 2013 1:31 am wrote:
> 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).
>
> Fun historical fact: inc and dec didn't set the carry flag on
> 8080. This tells a lot about how far compatibility goes :-)
How about 8008?
Wikipedia tells me that 8008 was intended, among other things, for Seiko calculator.
If it is true, then maximization of performance of multi-precision arithmetic in very tight code space was, probably, of high priority for 8008 ISA designers.
However, there could be simpler reasons. IIRC, in 8008 INC and DEC were the only arithmetic instructions that operated on all 8 registers, so they were inherently different from other ALU instructions. May be, not even implemented by the same adder?
> 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).
>
> Fun historical fact: inc and dec didn't set the carry flag on
> 8080. This tells a lot about how far compatibility goes :-)
How about 8008?
Wikipedia tells me that 8008 was intended, among other things, for Seiko calculator.
If it is true, then maximization of performance of multi-precision arithmetic in very tight code space was, probably, of high priority for 8008 ISA designers.
However, there could be simpler reasons. IIRC, in 8008 INC and DEC were the only arithmetic instructions that operated on all 8 registers, so they were inherently different from other ALU instructions. May be, not even implemented by the same adder?