diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2012-04-04 14:18:57 +0200 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2012-04-04 14:18:57 +0200 |
commit | 56920c85c34addffdac3238f3f38622e0fb50b2d (patch) | |
tree | 74f45bf6e8f86c088de02e614f7be94e01b55f6c /mpn/x86_64/core2 | |
parent | 18de6c3537dd98202c580ed1aa08711ba53b9cb7 (diff) | |
download | gmp-56920c85c34addffdac3238f3f38622e0fb50b2d.tar.gz |
Make room for DOS64 regparm shadow area.
Diffstat (limited to 'mpn/x86_64/core2')
-rw-r--r-- | mpn/x86_64/core2/gcd_1.asm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mpn/x86_64/core2/gcd_1.asm b/mpn/x86_64/core2/gcd_1.asm index 05534976d..d3f39a0b6 100644 --- a/mpn/x86_64/core2/gcd_1.asm +++ b/mpn/x86_64/core2/gcd_1.asm @@ -53,6 +53,9 @@ define(`v0', `%rdx') ABI_SUPPORT(DOS64) ABI_SUPPORT(STD64) +IFDOS(`define(`STACK_ALLOC', 40)') +IFSTD(`define(`STACK_ALLOC', 8)') + C Undo some configure cleverness. C The problem is that C only defines the '1c' variant, and that configure C therefore considers modexact_1c to be the base function. It then adds a @@ -76,7 +79,7 @@ PROLOGUE(mpn_gcd_1) push %rax C preserve common twos over call push v0 C preserve v0 argument over call - sub $8, %rsp C maintain ABI required rsp alignment + sub $STACK_ALLOC, %rsp C maintain ABI required rsp alignment cmp $1, n jnz L(reduce_nby1) @@ -104,7 +107,7 @@ IFDOS(` mov %rdi, %rcx ') CALL( mpn_modexact_1_odd) L(reduced): - add $8, %rsp + add $STACK_ALLOC, %rsp pop %rdx bsf %rax, %rcx |