diff options
author | John van Groningen | 2014-04-01 09:20:02 +0000 |
---|---|---|
committer | John van Groningen | 2014-04-01 09:20:02 +0000 |
commit | 82f176a8006cab51d521ec27c0d6778ec31d15d5 (patch) | |
tree | 18a21c2347ee078c2f6a3cd7c0786fcc04a1cc4f /astartup.asm | |
parent | fix script for _startupTrace.o (diff) |
save registers r12-r15, don't save registers rcx and rdx in abc_main
Diffstat (limited to 'astartup.asm')
-rw-r--r-- | astartup.asm | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/astartup.asm b/astartup.asm index 4481e3d..f525ba7 100644 --- a/astartup.asm +++ b/astartup.asm @@ -603,11 +603,24 @@ _DATA ends abc_main: push rbx - push rcx - push rdx push rbp push rsi push rdi + ifndef LINUX + db 49h + push rsp + db 49h + push rbp + db 49h + push rsi + db 49h + push rdi + else + push r12 + push r13 + push r14 + push r15 + endif call init_clean test rax,rax @@ -638,11 +651,24 @@ exit: call exit_clean init_error: + ifndef LINUX + db 49h + pop rdi + db 49h + pop rsi + db 49h + pop rbp + db 49h + pop rsp + else + pop r15 + pop r14 + pop r13 + pop r12 + endif pop rdi pop rsi pop rbp - pop rdx - pop rcx pop rbx ifdef LINUX |