diff options
author | David S. Miller <devnull@localhost> | 2013-04-14 23:24:54 +0200 |
---|---|---|
committer | David S. Miller <devnull@localhost> | 2013-04-14 23:24:54 +0200 |
commit | 1972df02f01a01b2310031dd51a763a7bf3686c8 (patch) | |
tree | f86334a5a72093bec5a8711f68225282e877450b /mpn/sparc64 | |
parent | 24a890550249fe0eb08cdaef7a0f932f980e68cb (diff) | |
download | gmp-1972df02f01a01b2310031dd51a763a7bf3686c8.tar.gz |
Revert some of the LEA and INT32 changes.
Diffstat (limited to 'mpn/sparc64')
-rw-r--r-- | mpn/sparc64/gcd_1.asm | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/mpn/sparc64/gcd_1.asm b/mpn/sparc64/gcd_1.asm index 93ea32ba7..1f70c7fc5 100644 --- a/mpn/sparc64/gcd_1.asm +++ b/mpn/sparc64/gcd_1.asm @@ -58,8 +58,6 @@ define(`v0', `%i2') ASM_START() REGISTER(%g2,#scratch) REGISTER(%g3,#scratch) - LEA_THUNK(l7) - TEXT PROLOGUE(mpn_gcd_1) save %sp, -192, %sp ldx [up+0], %g1 C U low limb @@ -95,7 +93,22 @@ L(bmod): mov 0, %o3 L(noreduce): - LEA(ctz_table,i5,l7) + +ifdef(`PIC',` + sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7 + call L(LGETPC0) + add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7 + sethi %hi(ctz_table), %g1 + or %g1, %lo(ctz_table), %g1 + ldx [%l7+%g1], %i5 +',` + sethi %hh(ctz_table), %l7 + or %l7, %hm(ctz_table), %l7 + sllx %l7, 32, %l7 + sethi %lm(ctz_table), %g1 + add %l7, %g1, %l7 + or %l7, %lo(ctz_table), %i5 +') cmp %o0, 0 bnz %xcc, L(mid) @@ -122,4 +135,10 @@ L(mid): ldub [%i5+%g3], %g5 C L(shift_alot): b L(mid) and %o0, MASK, %g3 C + +ifdef(`PIC',` +L(LGETPC0): + retl + add %o7, %l7, %l7 +') EPILOGUE() |