8086 register allocation

"Alexei A. Frounze" <alexfrunews@gmail.com>
Sun, 9 May 2021 14:28:39 -0700 (PDT)

          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: "Alexei A. Frounze" <alexfrunews@gmail.com>
Newsgroups: comp.compilers
Date: Sun, 9 May 2021 14:28:39 -0700 (PDT)
Organization: Compilers Central
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="18654"; mail-complaints-to="abuse@iecc.com"
Keywords: code, architecture
Posted-Date: 09 May 2021 20:04:16 EDT

For the fun of it I've implemented a greedy bottom-up local register
allocator for the intel 8086 CPU, which is known for its non-uniform
use of registers in ALU instructions and memory operands

The motivation for it is that I haven't seen any such register
allocator in e.g. the "Dragon" book and may other texts on compilers
I've read or skimmed. And even today I can't quite come up with a
proper web search request that would return info on such allocators.
I've found one paper that very briefly talks about an allocator like
this for the IBM 370. This gives a sense that this stuff is very
yesterday in terms of both CPU architectures and modern compiler
algorithms since many seem to delegate this particular aspect of
register allocation to graph (pre)coloring and modern CPUs are more
uniform in terms of register use (or there are simply more registers
to use).

Are there any other texts that introduce and explain such register
allocators? Compiler Construction by William M. Waite and Gerhard Goos
(section 10.2.2 "Targeting") is a bit too short on the matter. But
people somehow have done things like this in the past.

[I don't recall anything in a textbook about it. x86 register
allocators were pretty ad-hoc due to all of the special cases
where an operand had to be in a specific register. -John]

Post a followup to this message

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