Re: 8086 register allocation

Hans-Peter Diettrich <DrDiettrich1@netscape.net>
Tue, 11 May 2021 09:35:17 +0200

          From comp.compilers

Related articles
8086 register allocation alexfrunews@gmail.com (Alexei A. Frounze) (2021-05-09)
Re: 8086 register allocation pronesto@gmail.com (Fernando) (2021-05-10)
Re: 8086 register allocation gah4@u.washington.edu (gah4) (2021-05-10)
Re: 8086 register allocation DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2021-05-11)
Re: 8086 register allocation gah4@u.washington.edu (gah4) (2021-05-10)
Re: 8086 register allocation tkoenig@netcologne.de (Thomas Koenig) (2021-05-11)
Re: 8086 register allocation DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2021-05-11)
| List of all articles for this month |

From: Hans-Peter Diettrich <DrDiettrich1@netscape.net>
Newsgroups: comp.compilers
Date: Tue, 11 May 2021 09:35:17 +0200
Organization: Compilers Central
References: 21-05-005 21-05-007 21-05-008
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="8380"; mail-complaints-to="abuse@iecc.com"
Keywords: code, history
Posted-Date: 12 May 2021 23:56:46 EDT
In-Reply-To: 21-05-008
Content-Language: de-DE

On 5/11/21 3:35 AM, Hans-Peter Diettrich wrote:


> A stack machine is convenient for calculations. Before the stack
> overflows the compiler can save intermediate results, as with any other
> architecture of limited register count.
>
> DoDi
> [Normal stack machines have the top few entries in registers and do the
> spilling to memory in hardware.  The x87 stack has 8 registers, which is
> a lot for a stack machine, but the spilling was broken.   You can address
> into the stack but you can't really use it as a register machine. -John]


FORTH coders know how inconvenient for humans is accessing "local
variables" in such a stack. But a compiler can track the content of the
stack.


I had some problems in understanding "spilling". After re-reading the
80287 instruction set I found that only ST(0) is usable for memory
load/store operations, making it hard to code load/store the other end
of the register stack. Thanks, John, for the kick... ;-)


DoDi


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.