Jump size optimization info...

"Orlando Llanes" <Orlando.Llanes@gmail.com>
8 Jan 2007 23:34:25 -0500

          From comp.compilers

Related articles
Jump size optimization info... Orlando.Llanes@gmail.com (Orlando Llanes) (2007-01-08)
Re: Jump size optimization info... kenrose@nc-sys.com (Ken Rose) (2007-01-11)
Re: Jump size optimization info... sdn@svpal.org (Steven Nichols) (2007-01-12)
Re: Jump size optimization info... sdn@svpal.org (Steven Nichols) (2007-01-12)
Re: Jump size optimization info... anton@mips.complang.tuwien.ac.at (2007-01-12)
Re: Jump size optimization info... gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-01-14)
Re: Jump size optimization info... 148f3wg02@sneakemail.com (Karsten Nyblad) (2007-01-28)
[2 later articles]
| List of all articles for this month |

From: "Orlando Llanes" <Orlando.Llanes@gmail.com>
Newsgroups: comp.compilers
Date: 8 Jan 2007 23:34:25 -0500
Organization: Compilers Central
Keywords: assembler, optimize
Posted-Date: 08 Jan 2007 23:34:25 EST

Hey all!
        I'm working on jump size optimization for my virtual machine, and
am racking my brains trying to look for an awesome post on the
subject. Then again, it could be an e-mail I lost from someone who
kindly responded. In any case, this algorithm may be posted
somewhere...


        To the best of my recollection, part of the post/message talked
about having an array of labels. Each label item had an array of
branch offsets. When a change was made to a label, the size difference
in the instruction was stored.


        I've come up with something similar, but am having the infamous
+1/-1 problem :P If anyone has any information on this, it would be
greatly appreciated.


See ya!
Orlando
[There was a paper by Tom Syymanski in the CACM in the 1970s that
explained how to calculate branch sizes. The general problem is
NP-complete, but as is usually the case with NP-complete problems,
there is simple algorithm that gets you very close to the optimal
result. -John]



Post a followup to this message

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