mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-16 16:11:42 -04:00
Cleanup assembly
This commit is contained in:
parent
559ca93e8d
commit
cff10164f3
@ -27,3 +27,30 @@
|
||||
mov gs, eax
|
||||
.endm
|
||||
|
||||
.macro save_context
|
||||
push r12
|
||||
push r11
|
||||
push r10
|
||||
push r9
|
||||
push r8
|
||||
push rdi
|
||||
push rsi
|
||||
push rdx
|
||||
push rcx
|
||||
push rbx
|
||||
push rax
|
||||
.endm
|
||||
|
||||
.macro restore_context
|
||||
pop rax
|
||||
pop rbx
|
||||
pop rcx
|
||||
pop rdx
|
||||
pop rsi
|
||||
pop rdi
|
||||
pop r8
|
||||
pop r9
|
||||
pop r10
|
||||
pop r11
|
||||
pop r12
|
||||
.endm
|
||||
|
@ -39,17 +39,7 @@ create_irq 15
|
||||
// Common handler
|
||||
|
||||
irq_common_handler:
|
||||
push r12
|
||||
push r11
|
||||
push r10
|
||||
push r9
|
||||
push r8
|
||||
push rdi
|
||||
push rsi
|
||||
push rdx
|
||||
push rcx
|
||||
push rbx
|
||||
push rax
|
||||
save_context
|
||||
|
||||
restore_kernel_segments
|
||||
|
||||
@ -57,17 +47,7 @@ irq_common_handler:
|
||||
|
||||
restore_user_segments
|
||||
|
||||
pop rax
|
||||
pop rbx
|
||||
pop rcx
|
||||
pop rdx
|
||||
pop rsi
|
||||
pop rdi
|
||||
pop r8
|
||||
pop r9
|
||||
pop r10
|
||||
pop r11
|
||||
pop r12
|
||||
restore_context
|
||||
|
||||
//Was pushed by the base handler code
|
||||
add rsp, 8
|
||||
|
@ -33,17 +33,7 @@ create_syscall 8
|
||||
create_syscall 9
|
||||
|
||||
syscall_common_handler:
|
||||
push r12
|
||||
push r11
|
||||
push r10
|
||||
push r9
|
||||
push r8
|
||||
push rdi
|
||||
push rsi
|
||||
push rdx
|
||||
push rcx
|
||||
push rbx
|
||||
push rax
|
||||
save_context
|
||||
|
||||
restore_kernel_segments
|
||||
|
||||
@ -51,17 +41,7 @@ syscall_common_handler:
|
||||
|
||||
restore_user_segments
|
||||
|
||||
pop rax
|
||||
pop rbx
|
||||
pop rcx
|
||||
pop rdx
|
||||
pop rsi
|
||||
pop rdi
|
||||
pop r8
|
||||
pop r9
|
||||
pop r10
|
||||
pop r11
|
||||
pop r12
|
||||
restore_context
|
||||
|
||||
//Was pushed by the base handler code
|
||||
add rsp, 8
|
||||
|
Loading…
x
Reference in New Issue
Block a user