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