#include "regs.S" .global hal_switchproc hal_switchproc: testq %rsi, %rsi je 1f movq %rsi, %cr3 1: mov %rdi, %rsp _pop_regs add $0x10, %rsp iretq