3; The size of a interrupt frame in bytes
4%define INTERRUPT_FRAME_SIZE 176
6; Will construct the registers section of a interrupt frame
7%macro INTERRUPT_FRAME_REGS_PUSH 0
25; Will pop the registers section of a interrupt frame
26%macro INTERRUPT_FRAME_REGS_POP 0
44%macro INTERRUPT_FRAME_POP_AND_JUMP 0
45 INTERRUPT_FRAME_REGS_POP
51; Constructs a interrupt frame from current cpu state
52%macro INTERRUPT_FRAME_CONSTRUCT 0
53 xor rax, rax ; Set to zero to prevent weirdness with the ss and cs registers.
54 mov r8, [rsp] ; Get the
return address.
55 ; Store the
stack pointer from before
this function was called
59 ; Construct interrupt frame
68 ; Ignore vector and error code.
72 INTERRUPT_FRAME_REGS_PUSH