diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2014-07-27 16:44:25 +0200 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2014-07-27 16:44:25 +0200 |
commit | 7eeec18f30a1d99fc79ddfbd288ada7ae65d863c (patch) | |
tree | a085d71254fc2cb7486546ddd52d6e12db088d0c /mpn/x86 | |
parent | de5056f90ea675a3ec6b0a790121c47002723ad5 (diff) | |
download | gmp-7eeec18f30a1d99fc79ddfbd288ada7ae65d863c.tar.gz |
Use LEAL.
Diffstat (limited to 'mpn/x86')
-rw-r--r-- | mpn/x86/k7/gcd_1.asm | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/mpn/x86/k7/gcd_1.asm b/mpn/x86/k7/gcd_1.asm index b893517bc..dd90e87fa 100644 --- a/mpn/x86/k7/gcd_1.asm +++ b/mpn/x86/k7/gcd_1.asm @@ -3,7 +3,8 @@ dnl x86 mpn_gcd_1 optimised for AMD K7. dnl Contributed to the GNU project by by Kevin Ryde. Rehacked by Torbjorn dnl Granlund. -dnl Copyright 2000-2002, 2005, 2009, 2011, 2012 Free Software Foundation, Inc. +dnl Copyright 2000-2002, 2005, 2009, 2011, 2012, 2014 Free Software +dnl Foundation, Inc. dnl This file is part of the GNU MP Library. dnl @@ -53,6 +54,8 @@ C Numbers measured with: speed -CD -s16-32 -t16 mpn_gcd_1 C TODO C * Tune overhead, this takes 2-3 cycles more than old code when v0 is tiny. C * Stream things better through registers, avoiding some copying. +C * For ELF, avoid putting GOT base in both ebx and esi. Needs special +C LEA/LEAL or else discrete code here. C ctz_table[n] is the number of trailing zeros on n, or MAXSHIFT if n==0. @@ -124,9 +127,9 @@ C Both U and V are single limbs, reduce with bmod if u0 >> v0. jmp L(reduced) L(reduce_nby1): -ifdef(`PIC_WITH_EBX',` +ifdef(`PIC_WITH_EBX',`dnl push %ebx - call L(movl_eip_to_ebx) + call L(movl_eip_ebx) add $_GLOBAL_OFFSET_TABLE_, %ebx ') push v0 C param 3 @@ -141,13 +144,13 @@ L(bmod): L(called): add $12, %esp C deallocate params -ifdef(`PIC_WITH_EBX',` +ifdef(`PIC_WITH_EBX',`dnl pop %ebx ') L(reduced): pop %edx - LEA( ctz_table, %esi) + LEAL( ctz_table, %esi) test %eax, %eax mov %eax, %ecx jnz L(mid) @@ -178,8 +181,8 @@ L(shift_alot): mov %eax, %ecx jmp L(mid) -ifdef(`PIC_WITH_EBX',` -L(movl_eip_to_ebx): +ifdef(`PIC_WITH_EBX',`dnl +L(movl_eip_ebx): mov (%esp), %ebx ret ') |