.section .text .global fake_syscall_entry .global fake_syscall_return .extern fake_syscall_handler fake_syscall_entry: hlt; fake_syscall_return: cli fake_syscall_swap: mov %cs, %rax pushq %rax pushq %rdx mov %ds, %rax pushq %rax sub $16, %rsp sgdt (%rsp) mov %rsp, (%rsi) mov %rdi, %rsp lgdt (%rsp) add $16, %rsp movw (%rsp), %ds movw (%rsp), %es movw (%rsp), %fs movw (%rsp), %gs movw (%rsp), %ss add $8, %rsp lretq