Displaying 1 result from an estimated 1 matches for "new_sp".
Did you mean:
new_esp
2018 May 11
2
best way to represent function call with new stack in LLVM IR?
...it after returning.
What is the best way to represent such a function call in LLVM IR?
Here's a way that will work, but keep reading for why this is not ideal:
; example address of top of new stack to use - assume the caller has
; figured out how much to allocate and has this address ready
@new_sp = internal unnamed_addr global i64 3735928559, align 8
; Function Attrs: nobuiltin nounwind
define void @entry() #2 {
Entry:
%0 = call i64 asm "", "={sp}"()
%1 = load i64, i64* @new_sp, align 8
call void @cycleEntry(i64 %0, i64 %1)
ret void
}
; Function Attrs: nobuilti...