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,180 of 131,241   
   MitchAlsup to All   
   Re: branch splitting   
   06 Nov 25 22:53:09   
   
   From: user5857@newsgrouper.org.invalid   
      
   EricP  posted:   
      
   > Anton Ertl wrote:   
   > > EricP  writes:   
   > >> Where this might be a problem is if the label variable was a   
   > >> global symbol and the target labels were in other name spaces.   
   > >> At that point it could treat it like a pointer to a function and   
   > >> have to spill all live register variables to memory.   
   > >   
   > > Does the assigned goto support that?  What about regular goto and   
   > > computed goto?   
   > >   
   > > - anton   
   >   
   > I didn't mean to imply that it did.   
   > As far as I remember, Fortran 77 does not allow it.   
   > I never used later Fortrans.   
   >   
   > I hadn't given the dynamic branch topic any thought until you raised it   
   > and this was just me working through the things a compiler might have   
   > to deal with.   
   >   
   > I have written jump dispatch table code myself where the destinations   
   > came from symbols external to the routine, but I had to switch to   
   > inline assembler for this as MS C does not support goto variables,   
      
   Oh sure it does--it is called Return-Oriented-Programming.   
   You take the return address off the stack and insert your   
   go-to label on the stack and then just return.   
      
   Or you could do some "foul play" on a jumpbuf and longjump.   
      
   {{Be careful not to shoot yourself in the foot.}}   
      
   > and it was up to me to make sure the registers were all handled correctly.   
   >   
   >   
   >   
      
   --- 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