mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
Clean up process loader
- cpu_state was being passed 'by value' to modify outer stack frame - don't pass loader args as rax, rbx, etc - pass in ABI order
This commit is contained in:
@@ -4,18 +4,15 @@ extern load_process
|
||||
|
||||
global ramdisk_process_loader
|
||||
ramdisk_process_loader:
|
||||
|
||||
; create_process already pushed a cpu_state onto the stack for us, this
|
||||
; acts both as the cpu_state parameter to load_process, and the saved
|
||||
; state for the following iretq
|
||||
;
|
||||
; Additional parameters:
|
||||
; rax - the address of the program image
|
||||
; rbx - the size of the program image
|
||||
; rcx - the address of this process' process structure
|
||||
mov rdi, rax
|
||||
mov rsi, rbx
|
||||
mov rdx, rcx
|
||||
; rdi - the address of the program image
|
||||
; rsi - the size of the program image
|
||||
; rdx - the address of this process' process structure
|
||||
; rcx - the stack pointer, which points at the cpu_state
|
||||
call load_process
|
||||
|
||||
swapgs
|
||||
|
||||
Reference in New Issue
Block a user