From 82f176a8006cab51d521ec27c0d6778ec31d15d5 Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Tue, 1 Apr 2014 09:20:02 +0000 Subject: save registers r12-r15, don't save registers rcx and rdx in abc_main --- astartup.asm | 34 ++++++++++++++++++++++++++++++---- 1 file 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 -- cgit v1.2.3