From e2cdeac4230d4dcc71c5846f5022df4c815045ac Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Mon, 6 Feb 2017 02:13:05 +0000 Subject: [PATCH] fixed: in x86_64 asm code (for Win64) there were in some places the esp register used, there should be rsp used instead (reported by Villi on the tttmath forum) git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@1042 e52654a7-88a9-db11-a3e9-0013d4bc506e --- ttmath/ttmathuint_x86_64_msvc.asm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ttmath/ttmathuint_x86_64_msvc.asm b/ttmath/ttmathuint_x86_64_msvc.asm index b7c85c2..40353a5 100644 --- a/ttmath/ttmathuint_x86_64_msvc.asm +++ b/ttmath/ttmathuint_x86_64_msvc.asm @@ -1,11 +1,11 @@ ; ; This file is a part of TTMath Bignum Library ; and is distributed under the (new) BSD licence. -; Author: Christian Kaiser +; Author: Christian Kaiser , Tomasz Sowa ; ; -; Copyright (c) 2009, Christian Kaiser +; Copyright (c) 2009-2017, Christian Kaiser, Tomasz Sowa ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without @@ -151,12 +151,12 @@ ttmath_addindexed2_x64 PROC ; rdx = b (value size) ; r8 = nPos ; r9 = nValue1 - ; [esp+0x28] = nValue2 + ; [rsp+0x28] = nValue2 xor rax, rax ; return value mov r11, rcx ; table sub rdx, r8 ; rdx = remaining count of uints - mov r10, [esp+028h] ; r10 = nValue2 + mov r10, [rsp+028h] ; r10 = nValue2 add qword ptr [r11 + r8 * 8], r9 lea r8, [r8+1] @@ -194,9 +194,9 @@ ttmath_addvector_x64 PROC ; rdx = ss2 ; r8 = ss1_size ; r9 = ss2_size - ; [esp+0x28] = result + ; [rsp+0x28] = result - mov r10, [esp+028h] + mov r10, [rsp+028h] sub r8, r9 xor r11, r11 ; r11=0, cf=0 @@ -316,9 +316,9 @@ ttmath_subvector_x64 PROC ; rdx = ss2 ; r8 = ss1_size ; r9 = ss2_size - ; [esp+0x28] = result + ; [rsp+0x28] = result - mov r10, [esp+028h] + mov r10, [rsp+028h] sub r8, r9 xor r11, r11 ; r11=0, cf=0