From 47fdb56d300abea7c6caa6f8daa5f1a164c4103f Mon Sep 17 00:00:00 2001 From: Diederik Huys Date: Wed, 27 Mar 2013 23:04:38 +0100 Subject: [PATCH] Solved register save/restore bug --- lin64.asm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lin64.asm b/lin64.asm index a59ce4d..cba02db 100644 --- a/lin64.asm +++ b/lin64.asm @@ -29,6 +29,12 @@ GLOBAL ExSetMult ALIGN 32 ExSetMult: + push rbp + push rbx + push r12 + push r13 + push r14 + push r15 push rdx mov r14,[rsi+8*0] ; preload b.n[0]. This will be the case until ; b.n[0] is no longer needed, then we reassign @@ -286,6 +292,13 @@ common_exit_norm: mov [rbx+0*8],rax ; -> this.n[0] add r8,r11 mov [rbx+1*8],r8 ; -> this.n[1] + + pop r15 + pop r14 + pop r13 + pop r12 + pop rbx + pop rbp ret @@ -305,6 +318,12 @@ common_exit_norm: GLOBAL ExSetSquare ALIGN 32 ExSetSquare: + push rbp + push rbx + push r12 + push r13 + push r14 + push r15 push rsi mov rbp,0FFFFFFFFFFFFFh