Sujet : Re: Avoid treating the stack as an array [Re: "Back & Forth" is back!]
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.lang.forthDate : 16. Sep 2024, 20:55:29
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2024Sep16.215529@mips.complang.tuwien.ac.at>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : xrn 10.11
Paul Rubin <
no.email@nospam.invalid> writes:
mhx@iae.nl (mhx) writes:
This appears not to be a good idea. The root cause is piling up too
many items on the F-stack (exceeding the hardware FPU stack limits).
>
I wonder if any Forth compilers use SSE instead of the x86 FPU stack.
Gforth 0.7.9_20240821
[...]
see f+
Code f+
55AF6580BDC1: add rbx,$08
55AF6580BDC5: mov rax,r12
55AF6580BDC8: lea r12,$08[r12]
55AF6580BDCD: addsd xmm15,$08[rax]
55AF6580BDD3: mov rax,[rbx]
55AF6580BDD6: jmp eax
VFX Forth 64 5.11 RC2 [build 0112] 2021-05-02 for Linux x64
[...]
see f+
F+
( 004C4100 F2450F584500 ) ADDSD XMM8, [R13]
( 004C4106 4983C508 ) ADD R13, # 08
( 004C410A C3 ) RET/NEXT
( 11 bytes, 3 instructions )
But:
VFX Forth 64 5.43 [build 0199] 2023-11-09 for Linux x64
[...]
see f+
F+
( 00505620 DEC1 ) FADDP ST(1), ST
( 00505622 C3 ) RET/NEXT
( 3 bytes, 2 instructions )
The customers of VFX preferred the 80-bit floats.
- anton
-- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.htmlcomp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: https://forth-standard.org/ EuroForth 2024: https://euro.theforth.net