[PATCH] Improve and consolidate sparc PIC assembler.

David Miller davem at davemloft.net
Mon Apr 15 19:26:04 CEST 2013


BTW, you traded one failure for another, now PIC is broke
for ultrasparct3 builds, because now in invert_limb.asm we're
back to:

diff -r bd92f35223f8 mpn/sparc64/ultrasparct3/invert_limb.asm
--- a/mpn/sparc64/ultrasparct3/invert_limb.asm  Sun Apr 14 23:24:54 2013 +0200
+++ b/mpn/sparc64/ultrasparct3/invert_limb.asm  Mon Apr 15 10:24:55 2013 -0700
@@ -31,13 +31,11 @@
 ASM_START()
        REGISTER(%g2,#scratch)
        REGISTER(%g3,#scratch)
-       LEA_THUNK(g3)
-       TEXT
 PROLOGUE(mpn_invert_limb)
        srlx    d, 55, %g1
        add     %g1, %g1, %g1
-       LEA_LEAF(approx_tab,g2,g3)
-       sub     %g2, 512, %g2
+       sethi   %hi(approx_tab-512), %g2
+       or      %g2, %lo(approx_tab-512), %g2
        lduh    [%g2+%g1], %g3
        srlx    d, 24, %g4
        add     %g4, 1, %g4

which will only work on 64-bit static builds.


More information about the gmp-devel mailing list