Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #134524

Re: EuroForth 2025 preliminary proceedings

From peter <peter.noreply@tin.it>
Newsgroups comp.lang.forth
Subject Re: EuroForth 2025 preliminary proceedings
Date 2026-01-20 10:44 +0100
Organization A noiseless patient Spider
Message-ID <20260120104440.00000ab0@tin.it> (permalink)
References (1 earlier) <2026Jan15.130413@mips.complang.tuwien.ac.at> <nnd$3a148ef5$137ee4b5@b1e8191b89e23503> <87wm1gpvdr.fsf@nightsong.com> <20260119232635.00007bcd@tin.it> <87o6mpp4rk.fsf@nightsong.com>

Show all headers | View raw


On Mon, 19 Jan 2026 15:22:07 -0800
Paul Rubin <no.email@nospam.invalid> wrote:

> peter <peter.noreply@tin.it> 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.

No that did not work. I also do not want the compiler to mess with this.
The pre-processor expansion does exactly what I want.
Musttail requires the parameters to exactly match on the incoming and 
outgoing calls. Like if it is a recursive call.


> 
> > 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.

I do also wonder about that! From my previous testing it will not make a 
difference speed-wise.

> 
> > 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

It looks like it recognizes it but choose to ignore it.
That is what the warning messages say.


> Oh that's interesting.  I half remember there being some other feature
> for that, but who knows.  Does -fwhole-program help?

I will for sure continue to use the computed goto also in the future.
The complete VM8 function containing 157 opcodes is about 1200 
lines of code. 255 are for the function-array. that leaves 945 lines
for 157 opcode, about 6 lines per opcode!

BR
Peter

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

EuroForth 2025 preliminary proceedings dxf <dxforth@gmail.com> - 2026-01-15 17:41 +1100
  Re: EuroForth 2025 preliminary proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-01-15 12:04 +0000
    Re: EuroForth 2025 preliminary proceedings Hans Bezemer <the.beez.speaks@gmail.com> - 2026-01-16 15:25 +0100
      Re: EuroForth 2025 preliminary proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-01-16 17:38 +0000
        Re: EuroForth 2025 preliminary proceedings Hans Bezemer <the.beez.speaks@gmail.com> - 2026-01-22 16:51 +0100
          C compiler optimization and Forth engines (was: EuroForth 2025 ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-01-24 11:28 +0000
            Re: C compiler optimization and Forth engines (was: EuroForth 2025 ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-01-24 16:47 +0000
              Re: C compiler optimization and Forth engines (was: EuroForth 2025 ...) peter <peter.noreply@tin.it> - 2026-01-25 23:31 +0100
                Re: C compiler optimization and Forth engines (was: EuroForth 2025 ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-01-26 19:24 +0000
                Re: C compiler optimization and Forth engines (was: EuroForth 2025 ...) peter <peter.noreply@tin.it> - 2026-01-27 15:44 +0100
                Re: C compiler optimization and Forth engines (was: EuroForth 2025 ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-01-29 18:27 +0000
                Re: C compiler optimization and Forth engines (was: EuroForth 2025 ...) albert@spenarnc.xs4all.nl - 2026-01-30 13:20 +0100
                Re: C compiler optimization and Forth engines (was: EuroForth 2025 ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-01-30 18:00 +0000
      Re: EuroForth 2025 preliminary proceedings Paul Rubin <no.email@nospam.invalid> - 2026-01-16 23:10 -0800
        Re: EuroForth 2025 preliminary proceedings Hans Bezemer <the.beez.speaks@gmail.com> - 2026-01-17 16:58 +0100
          Re: EuroForth 2025 preliminary proceedings Paul Rubin <no.email@nospam.invalid> - 2026-01-17 20:21 -0800
            Re: EuroForth 2025 preliminary proceedings Hans Bezemer <the.beez.speaks@gmail.com> - 2026-01-18 15:26 +0100
          Re: EuroForth 2025 preliminary proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-01-18 22:17 +0000
        Re: EuroForth 2025 preliminary proceedings albert@spenarnc.xs4all.nl - 2026-01-18 16:34 +0100
          Re: EuroForth 2025 preliminary proceedings Paul Rubin <no.email@nospam.invalid> - 2026-01-20 00:35 -0800
            Re: EuroForth 2025 preliminary proceedings albert@spenarnc.xs4all.nl - 2026-01-20 12:12 +0100
            Coroutines in Forth Gerry Jackson <do-not-use@swldwa.uk> - 2026-04-02 20:59 +0100
              Re: Coroutines in Forth Paul Rubin <no.email@nospam.invalid> - 2026-04-04 18:02 -0700
                Re: Coroutines in Forth Paul Rubin <no.email@nospam.invalid> - 2026-04-04 21:21 -0700
        Re: EuroForth 2025 preliminary proceedings peter <peter.noreply@tin.it> - 2026-01-19 23:26 +0100
          Re: EuroForth 2025 preliminary proceedings Paul Rubin <no.email@nospam.invalid> - 2026-01-19 15:22 -0800
            Re: EuroForth 2025 preliminary proceedings peter <peter.noreply@tin.it> - 2026-01-20 10:44 +0100
            Re: EuroForth 2025 preliminary proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-01-20 22:36 +0000
          Re: EuroForth 2025 preliminary proceedings Paul Rubin <no.email@nospam.invalid> - 2026-01-20 00:33 -0800
          Re: EuroForth 2025 preliminary proceedings anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-01-20 22:17 +0000

csiph-web