From: no.email@nospam.invalid   
      
   peter writes:   
   > for the tail call version it was changed to   
   >   
   > RELOAD() opcode func=(opcode)tbl[*ip++]; __attribute__((musttail))   
   > return func(ip, tbl, TOP, FTOP, sp, rp, fp, lp)   
      
      
   You could possibly use "inline RELOAD() { .... ;}" instead of the macro.   
      
   > and for the tailcall version   
   > mov rax, qword ptr [r13 + 8*rax]   
   > rex64 jmp rax   
      
   I wonder why the tailcall version didn't combine the mov with the jmp   
   like the other version did.   
      
   > It also turns out that the musttail attribute is not necessary   
   > It will generate a tailcall aanyway. The difference is that with   
   > musttail it will report an error if it cannot do the tailcall.   
      
   Yes, TCO has been present since the beginning but it's been   
   opportunistic rather than something you can rely on.   
      
   > Unfortunately GCC does not recognize preserve_none and uses the stack   
   > for some parameters   
      
   Oh that's interesting. I half remember there being some other feature   
   for that, but who knows. Does -fwhole-program help?   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|