[PATCH] Improve and consolidate sparc PIC assembler.

Torbjorn Granlund tg at gmplib.org
Mon Apr 15 22:30:23 CEST 2013


David Miller <davem at davemloft.net> writes:

  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.
  
I know.  It was easier to go back to the previous state for all assembly
files first.

The code is now correct in the repo, I think.  I might have introduced
other bugs, but I ran what I hope was adequate tests on both a Solaris
and a GNU/Linux system.

I might have reverted some TYPE statements.  These should be put back.

-- 
Torbjörn


More information about the gmp-devel mailing list