On Thu, Oct 15, 2015 at 11:39 AM, Paul Gilmartin < [email protected]> wrote:
> > I suspect FORTRAN's 3-way IF was a reflection of a hardware instruction > of the IBM 70* series (as was SIGNF()). John Gilmore has lamented the > lack of 3-way IF in more recent languages, requiring the programmer > either to use a temp variable or to repeat a complicated expression > in two successive IFs. I believe that's what optimizing compilers > are for. > > -- gil > I had some "weird" assembler code which "optimized" something like that long ago. I did a complicated series of test and ended with a CC for ==0 or <0 or >0. I then used the IPM instruction to save the CC in a general register. Later, I did an SPM in a number of places afterwards to restore the CC before doing a branch. -- Schrodinger's backup: The condition of any backup is unknown until a restore is attempted. Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be. He's about as useful as a wax frying pan. 10 to the 12th power microphones = 1 Megaphone Maranatha! <>< John McKown
