exmhcg - the EXecutable Melter, Heater, Cooker and Gluer

A program for reading and modifying executable programs for Intel x86 processors. The idea is to analyse the code, apply changes to it and create a new program that do the same thing as the original one, except for being a little bit faster.

Presently: reading works, analysing works for really small and simple programs (about 10 assembler instructions), no tuning is done at all (except for some very simple inlining) and writing will in almost all cases create a new executable that should not be run, as it will almost certainly crash immediately or destroy data!

So the goal is to be able to optimise (or optimize) a programs for 386, 486, Pentium class, AMD and VIA processors. This (i.e. actually doing it) is far into the future.

You can however look at the report below, and then appendix F (pages 44-45) for a small program that had a small function successfully inlined.

The source (released under the GPL):
exmhcg-0.0.1.tar.bz2 (319 kB)

Depending on your system, preferably GNU/Linux, you might be able to do:

tar -jxvf exmhcg-0.0.1.tar.bz2
(or bunzip2 exmhcg-0.0.1.tar.bz2 and 
    tar -xvf exmhcg-0.0.1.tar)
cd exmhcg-0.0.1
cd exmhcg
cd ../asm-test

But there is no guarantee. (make is likely to fail, needing g++-3.0. It is possible that you already have it, named g++. Then edit the Makefiles (in the directories exmhcg and createhtml).) It should also compile on a Cygwin installation, and *BSD might also work. And the source did compile with MS Visual C++ some months ago. It may need some fixing to do that again...

The report (.ps) (final version, 1277 kB)
Same, but compressed (.ps.bz2) (283 kB)
Same, but (.pdf) (713 kB)

A suggestion (.ps) (.pdf)for a Master's Thesis work. (In swedish only, 29 kB)

See http://sources.redhat.com/bzip2/ for information about bzip2 compression, in the unlikely event that your computer is missing the bunzip2 program :-)

E-Mail: Håkan T. J. (f96hajo@chalmers.se)

Back to Håkans page