Changes between Version 1 and Version 2 of Commentary/EvilMangler
- Timestamp:
- 10/04/06 13:28:43 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/EvilMangler
v1 v2 1 1 2 2 3 = The Evil Mangler = 3 = HC files and the Evil Mangler = 4 5 6 GHC uses {{{gcc}}} as a code generator, in a very stylised way: 7 * Generate {{{Foo.hc}}} 8 * Compile it with {{{gcc}}}, using {{{register}}} declarations to nail a bunch of things into registers (e.g. the allocation pointer) 9 * Post-process the generated assembler code with the Evil Mangler 4 10 5 11 The Evil Mangler (EM) is a Perl script invoked by GHC after the C compiler (gcc) has translated the GHC-produced C code into assembly. Consequently, it is only of interest if {{{-fvia-C}}} is in effect (either explicitly or implicitly). 12 13 == What the Evil Mangler does == 6 14 7 15 The EM reads the assembly produced by gcc and re-arranges code blocks as well as nukes instructions that it considers non-essential. It derives it evilness from its utterly ad hoc, machine, compiler, and whatnot dependent design and implementation. More precisely, the EM performs the following tasks:
