Changes between Version 17 and Version 18 of Commentary/Compiler/Backends/LLVM/DevelopmentNotes
- Timestamp:
- 07/18/10 09:18:54 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/Compiler/Backends/LLVM/DevelopmentNotes
v17 v18 19 19 20 20 E.g Asm generated by LLVM: 21 21 {{{ 22 22 _func: 23 23 subl $12, %esp … … 26 26 ... 27 27 addl $12, %esp 28 }}} 28 29 29 30 The mangler will change this to: 30 31 {{{ 31 32 _func: 32 33 subl $12, %esp … … 35 36 ... 36 37 addl $12, %esp 38 }}} 37 39 38 40 The better solution would be to change GHC to keep the stack at 16n - 4 alignment on function. This will require changing the RTS (StgCRun.hs) to set the stack properly before calling into Stg land and also fixing up the NCG to align code properly. There may also be a problem with the C backend as currently all function prolouge and epilouge code is stripped out, which means all the stack manipulation code generated by GCC is removed. This works fine now since the stack is already 16 byte aligned on entry, but if it is now 16n - 4 byte aligned then some stack manipulation will be required.
