home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.arch      Apparently more than just beeps & boops      131,241 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 130,205 of 131,241   
   EricP to Anton Ertl   
   Re: branch splitting   
   08 Nov 25 10:31:54   
   
   From: ThatWouldBeTelling@thevillage.com   
      
   Anton Ertl wrote:   
   > Stephen Fuld  writes:   
   >> No, and I defer to you, or others here, on how these features are   
   >> implemented, specifically whether code modification is required.  I was   
   >> referring to features such as assigned goto in Fortran, and Alter goto   
   >> in Cobol.   
   >   
   > On modern architectures higher-order functions are implemented with   
   > indirect branches or indirect calls (depending on whether it's a   
   > tail-call or not); likewise for method dispatch.   
   >   
   > I do not know how Lisp, FORTRAN, Algol 60 and other early languages   
   > with higher-order functions were implemented on architectures that do   
   > not have indirect branches; but if the assigned goto was implemented   
   > with self-modifying code, the call to a function in a variable was   
   > probably implemented like that, too.   
      
   What architecture cannot do an indirect branch, which I assume   
   means a branch/jump to a variable location in a register?   
   And how would the operating system on such a machine get programs running?   
      
   Even if an ISA did not have a JMP reg instruction one can create it   
   using CALL to copy the IP to the stack where you modify it and   
   RET to pop the new IP value.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca