Simple register allocation for assembly

Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
7 Jan 2003 23:28:46 -0500

          From comp.compilers

Related articles
Simple register allocation for assembly falk.hueffner@student.uni-tuebingen.de (Falk Hueffner) (2003-01-07)
Re: Simple register allocation for assembly journeyman@compilerguru.com (2003-01-12)
Re: Simple register allocation for assembly christian.bau@cbau.freeserve.co.uk (Christian Bau) (2003-01-17)
Re: Simple register allocation for assembly robert.thorpe@antenova.com (Rob Thorpe) (2003-01-17)
Re: Simple register allocation for assembly tmk@netvision.net.il (2003-01-25)
Re: Simple register allocation for assembly housel@cox.net (2003-01-27)
| List of all articles for this month |

From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
Newsgroups: comp.compilers
Date: 7 Jan 2003 23:28:46 -0500
Organization: T-Online
Keywords: registers, question
Posted-Date: 07 Jan 2003 23:28:46 EST

Hi,


To keep assembler sources more readable and less error prone, I would
like to write a simple register allocator that replaces symbolic names
with registers, e. g.


addq foo, bar, baz


becomes


addq $0, $1, $2


There are only instructions with 0 to 3 inputs and 0 to 1 outputs,
conditional branches, and unconditional branches. No spilling is to be
done, if no register allocation can be done, the program should
abort. Also, I expect very small input sizes, so resource usage is not
very important. So at first glance this looks pretty easy, but I can't
really come up with a simple algoritm, any hints?


--
Falk


Post a followup to this message

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