From: newsham@lava.net (Tim Newsham)
Subject: [Unix-jun72] status on disassembler
Date: Tue, 20 May 2008 09:49:09 -1000 (HST) [thread overview]
Message-ID: <Pine.BSI.4.64.0805200944091.16752@malasada.lava.net> (raw)
In-Reply-To: <20080520051628.379B75A525@remarque.org>
> My first approach to "temporary labels" (1f/1b, see Knuth) failed badly;
> if anyone has insights on how such things should be disassembled,
> please tell me; I'm still mentally going through various possible
> algorithms.
This is a standard register allocation problem (ie. assigning registers to
variables when compiling a program). You need to figure out over which
ranges of the program the labels are "live". Then you need to figure out
which ones are live at the same time and build a graph of which labels
cannot share the same label. Then you go through and start assigning
labels in a way that fits this constraint.
http://en.wikipedia.org/wiki/Register_allocation
http://en.wikipedia.org/wiki/Graph_coloring
Should be covered in compilers text books.
> Doug
Tim Newsham
http://www.thenewsh.com/~newsham/
next prev parent reply other threads:[~2008-05-20 19:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-18 14:56 [Unix-jun72] Kernel built under V1 James A. Markevitch
2008-05-18 18:04 ` Tim Newsham
2008-05-20 5:16 ` [Unix-jun72] status on disassembler Doug Merritt
2008-05-20 7:39 ` Warren Toomey
2008-05-20 19:49 ` Tim Newsham [this message]
2008-05-21 7:44 ` Doug Merritt
2008-05-21 9:49 ` Brad Parker
2008-05-21 13:40 ` Brad Parker
2008-05-21 14:05 ` Brad Parker
2008-05-21 21:34 ` Tim Newsham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.BSI.4.64.0805200944091.16752@malasada.lava.net \
--to=newsham@lava.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).