search for: get_stack_pointer_addr

Displaying 1 result from an estimated 1 matches for "get_stack_pointer_addr".

Did you mean: set_stack_pointer_addr
2014 Mar 28
9
[LLVMdev] Named Register Implementation
Folks, So, I think we kind of agree that some named registers could be implemented, and that it should be an intrinsic that passes the name of the register down. This C code: register unsigned long current_stack_pointer asm("sp"); unsigned long get_stack_pointer_addr() { return current_stack_pointer; } void set_stack_pointer_addr(unsigned long addr) { current_stack_pointer = addr; } Would become something like: define i32 @get_stack_pointer_addr() nounwind { entry: %0 = call i32 @llvm.read_register("sp") ret i32 %0 } define void @set_stack_...