From: user5857@newsgrouper.org.invalid   
      
   Stephen Fuld posted:   
      
   > On 11/4/2025 11:15 AM, MitchAlsup wrote:   
   > >   
   > > anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:   
   > >   
   > >> Thomas Koenig writes:   
   > >>> Should be possible. A question is if you want to have a special   
   > >>> register for that (like POWER's link register),   
   > >>   
   > >> There is this idea of splitting an (indirect) branch into a   
   > >> prepare-to-branch instruction and a take-branch instruction. The   
   > >   
   > > I first heard about this 1982 from Burton Smith.   
   > >   
   > >> prepare-to-branch instruction announces the branch target to the CPU,   
   > >> and Power's mtlr and mtctr are examples of that (somewhat muddled by   
   > >> the fact that the ctr register can also be used for counted loops as   
   > >> well as for indirect branches), and IA-64's branch-target registers   
   > >> and the instructions that move there are another example. AFAIK SPARC   
   > >> acquired something in this direction (touted as good for accelerating   
   > >> Java) in the early 2000s. The take-branch instruction on Power is   
   > >> blr/bctr.   
   > >>   
   > >> I used to think that this kind of splitting is a good idea, and it is   
   > >> certainly better than a branch-delay slot or a branch with a fixed   
   > >> number of delay slots.   
   > >   
   > > PL/1 allows for Label variables so one can build their own   
   > > switches (and state machines with variable paths). I used   
   > > these in a checkers playing program 1974.   
   >   
   > Wasn't this PL/1 feature "inherited" from the, now rightly deprecated,   
   > Alter/Goto in COBOL and Assigned GOTO in Fortran?   
      
   Probably.   
      
   I find it somewhat amusing that modern languages moved away from   
   label variables and into method calls -- which if you look at it   
   from 5,000 feet/metres -- is just a more expensive "label".   
      
   I also find it amusing that the backbone of modern software is   
   a static version of label variables -- we call them switch state-   
   ments.   
      
   But you can be sure COBOL got them from assembly language programmers.   
      
   >   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|