aboutsummaryrefslogtreecommitdiff
path: root/src/core/int.S
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-05-02 19:10:15 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-05-02 19:10:15 +0200
commit64a17f3e0683a0a492a3fed9c4c17a4335d1f421 (patch)
tree934d37ab18557e4d32222c9e4f65ef265ef0927e /src/core/int.S
parent5c3e2d90b3efb6daecd5655c49d3c61b1f75fecc (diff)
Simplify ds segment register management
Diffstat (limited to 'src/core/int.S')
-rw-r--r--src/core/int.S5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/int.S b/src/core/int.S
index 2897698..c8612dc 100644
--- a/src/core/int.S
+++ b/src/core/int.S
@@ -26,6 +26,9 @@
push %rbp
push %rsi
push %rdi
+ mov %ds, %rax
+ push %rax
+ mov 56(%rsp), %rax # Restore %rax
push %rax
mov $0x10, %ax
mov %ax, %ds
@@ -33,6 +36,8 @@
.endm
.macro RESTORE_REGS
+ pop %rax
+ mov %rax,%ds
pop %rdi
pop %rsi
pop %rbp