• Re: Flags (Re: arithmetic and endian history)

    From Tim Rentsch@tr.17687@z991.linuxsc.com to comp.arch on Tue Nov 24 21:24:39 2026
    From Newsgroup: comp.arch

    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:

    Tim Rentsch <tr.17687@z991.linuxsc.com> writes:

    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:

    Tim Rentsch <tr.17687@z991.linuxsc.com> writes:

    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:

    My guess is that they use these two bits
    because 1) when you don't know any better, minimizing the number of
    flag bits looks like a good idea, and 2) they did not know any
    better.

    Do you really mean to suggest that Gene Amdahl, Gerrit Blaauw and
    Fred Brooks didn't know what they were doing?

    As far as flags are concerned, yes. [...]

    Your hubris is stunning.

    I have the benefit of hindsight. You also have that, but you imply
    that the architects of the PDP-11, 6800, 6502, Z80 (the first
    Datapoint 2200 descendent that also had an overflow flag) and 8086
    (the first in that line from Intel with an overflow flag), 68000,
    etc. didn't know what they were doing when they selected NZCV instead
    of following the example of S/360.

    I implied no such thing. Those processors were designed under
    different circumstances and having very different constraints.
    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Wed Nov 25 10:46:15 2026
    From Newsgroup: comp.arch

    Tim Rentsch <tr.17687@z991.linuxsc.com> writes: >anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    I have the benefit of hindsight. You also have that, but you imply
    that the architects of the PDP-11, 6800, 6502, Z80 (the first
    Datapoint 2200 descendent that also had an overflow flag) and 8086
    (the first in that line from Intel with an overflow flag), 68000,
    etc. didn't know what they were doing when they selected NZCV instead
    of following the example of S/360.

    I implied no such thing. Those processors were designed under
    different circumstances and having very different constraints.

    And in what way would these circumstances and constraints influence
    the outcome?

    It seems to me that the circumstances and constraints were not that
    different. The S/360 designers had to design an instruction set that
    can be implemented with low hardware resources, just like the PDP-11
    designers and the microprocessor designers. And they used binary representation and two's-complement representation of signed numbers,
    like the others.

    If they had seen the examples of the architectures mentioned before
    designing the S/360, would they have designed the flag-handling of the
    S/360 as they did? I doubt it. There is a reason why so many
    architectures chose NZCV flags (if they chose flags at all). And even
    the few that don't use the NZCV flags do not handle flags in the S/360
    way, not even Power.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Wed Nov 25 18:54:52 2026
    From Newsgroup: comp.arch

    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    Tim Rentsch <tr.17687@z991.linuxsc.com> writes: >anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    I have the benefit of hindsight. You also have that, but you imply
    that the architects of the PDP-11, 6800, 6502, Z80 (the first
    Datapoint 2200 descendent that also had an overflow flag) and 8086
    (the first in that line from Intel with an overflow flag), 68000,
    etc. didn't know what they were doing when they selected NZCV instead
    of following the example of S/360.

    I implied no such thing. Those processors were designed under
    different circumstances and having very different constraints.

    And in what way would these circumstances and constraints influence
    the outcome?

    When one designs an ISA where the data-path is 8-wide, flags are
    an anathema--so flags (as we understand them) would not make the
    cut.

    But those ISAs were before that kind of constraint, so they get a
    pass.

    It seems to me that the circumstances and constraints were not that different. The S/360 designers had to design an instruction set that
    can be implemented with low hardware resources, just like the PDP-11 designers and the microprocessor designers. And they used binary representation and two's-complement representation of signed numbers,
    like the others.

    We are no longer in that world, an entire S/360/67 is no larger than
    a single I/O Pad (which can toggle at 16 GHz). Give them a pass, but
    realize we don't want to do those things again.

    If they had seen the examples of the architectures mentioned before
    designing the S/360, would they have designed the flag-handling of the
    S/360 as they did? I doubt it. There is a reason why so many
    architectures chose NZCV flags (if they chose flags at all). And even
    the few that don't use the NZCV flags do not handle flags in the S/360
    way, not even Power.

    Even COZAPS is an anathema at 8-wide, Athlon and Opteron used as
    much circuitry to track {C, O, ZAPS} independently than we used
    to track Src1 and Src2 through the GBOoO...

    - anton
    --- Synchronet 3.21e-Linux NewsLink 1.2