1 # extern int __stack_pointer;
2 .globaltype __stack_pointer, i32
4 # NOTE: Implement this in raw assembly to avoid stack pointer
5 # operations in C-prologue and epilogue.
7 # void *rb_wasm_get_stack_pointer(void);
8 .section .text.rb_wasm_get_stack_pointer,"",@
9 .globl rb_wasm_get_stack_pointer
10 .type rb_wasm_get_stack_pointer,@function
11 rb_wasm_get_stack_pointer:
12 .functype rb_wasm_get_stack_pointer () -> (i32)
13 global.get __stack_pointer
16 # void rb_wasm_set_stack_pointer(void *sp);
17 .section .text.rb_wasm_set_stack_pointer,"",@
18 .globl rb_wasm_set_stack_pointer
19 .type rb_wasm_set_stack_pointer,@function
20 rb_wasm_set_stack_pointer:
21 .functype rb_wasm_set_stack_pointer (i32) -> ()
23 global.set __stack_pointer