From: user5857@newsgrouper.org.invalid   
      
   John Levine posted:   
      
   > According to Chris M. Thomasson :   
   > >On 12/11/2025 5:41 PM, John Levine wrote:   
   > >> According to Thomas Koenig :   
   > >>> MitchAlsup schrieb:   
   > >>>   
   > >>>> Heck, there are assemblers that rearrange code like this too much--   
   > >>>> until they can be taught not to.   
   > >>>   
   > >>> Any example? This would definitely go against what I would consider   
   > >>> to be reasonable for an assembler. gdb certainly does not do so.   
   > >>   
   > >> On machines with delayed branches I've seen assemblers that move   
   > >> instructions into the delay slot. Can't think of any others off hand.   
   > >   
   > >That would suck! Back when I used to code in SPARC assembly language, I   
   > >had full control over my delay slots. Actually, IIRC, putting a MEMBAR   
   > >instruction in a delay slot is VERY bad.   
   >   
   > I think they were smart enough only to move instructions that wouldn't cause   
   > problems.   
      
   Many early RISC assemblers were in charge of moving instructions around   
   subject to not altering register dependencies and not altering control   
   flow dependencies. This allowed those assemblers to move code across   
   memory instructions, across long latency calculation instructions,   
   branch instructions, including delay slots; and redefine what "program   
   order" now is. A bad side effect of exposing the pipeline to SW.   
      
   We mostly have gotten away from this due to "smart" instruction queueing.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|