Path: blob/main/system/lib/compiler-rt/stack_ops.S
6162 views
.globl _emscripten_stack_restore1.globl _emscripten_stack_alloc2.globl emscripten_stack_get_current34#ifdef __wasm64__5#define PTR i646#define MASK 0xfffffffffffffff07#else8#define PTR i329#define MASK 0xfffffff010#endif1112.globaltype __stack_pointer, PTR1314_emscripten_stack_restore:15.functype _emscripten_stack_restore(PTR) -> ()16local.get 017global.set __stack_pointer18end_function1920_emscripten_stack_alloc:21.functype _emscripten_stack_alloc(PTR) -> (PTR)22.local PTR, PTR23global.get __stack_pointer24# Get arg 0 -> number of bytes to allocate25local.get 026# Stack grows down. Subtract arg0 from __stack_pointer27PTR.sub28# Align result by anding with ~1529PTR.const MASK30PTR.and31local.tee 132global.set __stack_pointer33local.get 134end_function3536emscripten_stack_get_current:37.functype emscripten_stack_get_current () -> (PTR)38global.get __stack_pointer39end_function404142