metal-cos/sys/arm64/switch.S

20 lines
318 B
ArmAsm

/*
* Trap Handlers
*/
#include <machine/asm.h>
.text
# switch(uint64_t *oldsp, uint64_t newsp)
# %rdi: oldsp
# %rsi: newsp
FUNC_BEGIN(switchstack)
# Save callee saved registers of old thread
# Switch stack from old to new thread
# Restore callee saved registers of new thread
FUNC_END(switchstack)