home bbs files messages ]

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

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

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

   Message 117,843 of 117,927   
   Paul Rubin to peter   
   Re: EuroForth 2025 preliminary proceedin   
   19 Jan 26 15:22:07   
   
   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)   

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


(c) 1994,  bbs@darkrealms.ca