Changes between Version 17 and Version 18 of Commentary/Compiler/Backends/LLVM/DevelopmentNotes


Ignore:
Timestamp:
Jul 18, 2010 4:18:54 PM (4 years ago)
Author:
dterei
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/Backends/LLVM/DevelopmentNotes

    v17 v18  
    1919 
    2020E.g Asm generated by LLVM:  
    21  
     21{{{ 
    2222_func: 
    2323    subl $12, %esp 
     
    2626    ... 
    2727    addl $12, %esp 
     28}}} 
    2829 
    2930The mangler will change this to: 
    30  
     31{{{ 
    3132_func: 
    3233    subl $12, %esp 
     
    3536    ... 
    3637    addl $12, %esp 
     38}}} 
    3739 
    3840The 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.