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,210 of 131,241   
   Anton Ertl to EricP   
   Re: branch splitting   
   08 Nov 25 18:25:18   
   
   From: anton@mips.complang.tuwien.ac.at   
      
   EricP  writes:   
   >What architecture cannot do an indirect branch, which I assume   
   >means a branch/jump to a variable location in a register?   
      
   Or, in case of the 6502, in memory.   
      
   I don't know of any architecture (except maybe some one-instruction   
   proof-of-concepts) that does not have indirect branches in one form or   
   another, but I am not that familiar with architectures from the 1950s   
   or some of the extremely deprived embedded-control processors.   
      
   Maybe the thing about self-modifying code was thrown in to taint the   
   assigned goto through guilt-by-association.   
      
   >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.   
      
   In most cases that is possible (even if the return address is stored   
   in a register and not on the stack), but the return addresses might   
   live on a separate stack (IIRC the Intel 8008 or the 8080 has such a   
   stack), and the call might be the only thing that pushes on that   
   stack.  But yes, in most cases, it's a good argument that even very   
   deprived processors usually have some form of indirect branching.   
      
   - anton   
   --   
   'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'   
     Mitch Alsup,    
      
   --- 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