Compilation 2016
Instruction Selection for LLVM--
Aslan Askarov aslan@cs.au.dk
Instruction Selection for LLVM-- Aslan Askarov aslan@cs.au.dk The - - PowerPoint PPT Presentation
Compilation 2016 Instruction Selection for LLVM-- Aslan Askarov aslan@cs.au.dk The x86 assembly language Assembler produces object file that contains segments (address ranges with a purpose) Segments containing runnable
Aslan Askarov aslan@cs.au.dk
segments (address ranges with a purpose)
.size .func .type .endfunc
x86 64 assembly programs
402129/mpx-linux64-abi.pdf
Note argument calling convention we don’t use these registers
0x1018
0x1200
… 0x10B0 0x10A8 0x10A0 0x1080 0x1010
stack grows from high memory addresses to low addresses
… current frame %rsp
saved %rbp value ret addr
0x1200 %rbp previous frame 0x1088
%local1 %local2 %localN
0x1030
alloca
0x1018 result of alloca
saved args
…
Q: why do we need to save args?
allocated slots
x86 instructions
intermediate results when translating operands
within the bounds of what x86.sml offers you (there is plenty of space)