Deutsch   English   Français   Italiano  
<2025Mar27.084835@mips.complang.tuwien.ac.at>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Locals revisited
Date: Thu, 27 Mar 2025 07:48:35 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 28
Message-ID: <2025Mar27.084835@mips.complang.tuwien.ac.at>
References: <nnd$6218682b$184a5797@0b341edb9d03c6de> <87semzmwok.fsf@nightsong.com>
Injection-Date: Thu, 27 Mar 2025 08:58:36 +0100 (CET)
Injection-Info: dont-email.me; posting-host="6dc27607a058792cf53eb3d9de2b338d";
	logging-data="3954065"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/CjMnVtj9JP0xWAtVMq7ZH"
Cancel-Lock: sha1:DdV27QAAOg+Lc8LMd20vvDosog0=
X-newsreader: xrn 10.11
Bytes: 2059

Paul Rubin <no.email@nospam.invalid> writes:
>albert@spenarnc.xs4all.nl writes:
>> (I get 30 registers in RISCV that can serve as a stack pointer.)

All 31 can serve as a stack pointer, but not all at the same time.
You want at least two registers for temporary values, for implementing
a word such as "+".  And you typically want to keep the top-of-stack
of many stacks in a register, too.  Or several stack items.

>In some models of the RISCV, only 14, I think.

There is the E subspecification of the RISC-V specification with 16
registers.  I don't know if anybody has implemented this.

>And in almost all
>models, 8 of them are more efficient to address than the rest, because
>of the compressed instruction format.

More efficient in code size.  In instruction execution, typically the
same speed.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: https://forth-standard.org/
EuroForth 2023 proceedings: http://www.euroforth.org/ef23/papers/
EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/