Skip to content

Commit

Permalink
asm: add save/restore regs macros for protected mode
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
  • Loading branch information
wipawel committed Oct 28, 2020
1 parent 3eb030e commit f379bfa
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions include/arch/x86/asm-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,26 @@
rep outsb
.endm

.macro SAVE_REGS_32
push %eax
push %ebx
push %ecx
push %edx
push %esi
push %edi
push %ebp
.endm

.macro RESTORE_REGS_32
pop %ebp
pop %edi
pop %esi
pop %edx
pop %ecx
pop %ebx
pop %eax
.endm

.macro SAVE_REGS
push %_ASM_AX
push %_ASM_BX
Expand Down

0 comments on commit f379bfa

Please sign in to comment.