Re: [PATCH] Improve and consolidate sparc PIC assembler.

2013-04-15 Thread Torbjorn Granlund
Where to go from here? If we want to clean up some old SPARC code, then we have learnt that we to test the result on several key platforms. We also don't want to create slower code, unless the old code is clearly broken (in more than a hypothetical way). For the 64bit case, it is safe to assume

Re: [PATCH] Improve and consolidate sparc PIC assembler.

2013-04-15 Thread David Miller
From: Torbjorn Granlund t...@gmplib.org Date: Mon, 15 Apr 2013 17:13:34 +0200 Where to go from here? Please run make -k in that tarball I posted for you last night, it's very important. None of what's happening makes any sense, and we can't make wise decisions about how to proceed until we

Re: [PATCH] Improve and consolidate sparc PIC assembler.

2013-04-15 Thread David Miller
From: ni...@lysator.liu.se (Niels Möller) Date: Mon, 15 Apr 2013 18:57:53 +0200 Torbjorn Granlund t...@gmplib.org writes: We may well put data in the text segment rather than rodata to allow for plainer code. At least in theory, there should be little difference. PC-relative offsets

Re: [PATCH] Fix 64-bit T3 invert_limb.asm on PIC again.

2013-04-15 Thread Torbjorn Granlund
David Miller da...@davemloft.net writes: I use rd %pc here, since moving forward that's what we're going to use. I checked in something similar, and also updated the other sparc64 files to use rd %pc. I tried to look into doing something like: L(pc):rd %pc, %g2

Re: [PATCH] Improve and consolidate sparc PIC assembler.

2013-04-15 Thread Torbjorn Granlund
swift gmake -k gcc -m64 -fPIC -c -o test1_shared.o test1.S /usr/ccs/bin/as: /var/tmp//ccqorjdc.s: , approx line 18: internal error: pic_relocs(): hh reltype? gmake: *** [test1_shared.o] Error 1 gcc -m64 -c -o test1_static.o test1.S gcc -m64 -fPIC -c -o test2_shared.o test2.S /usr/ccs/bin/as:

Re: [PATCH] Improve and consolidate sparc PIC assembler.

2013-04-15 Thread Torbjorn Granlund
David Miller da...@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

Re: [PATCH] Fix 64-bit T3 invert_limb.asm on PIC again.

2013-04-15 Thread Torbjorn Granlund
Torbjorn Granlund t...@gmplib.org writes: Else, I cannot understand how this could have worked! Arrg, I didn't actually make a T3 simulated build. -- Torbjörn ___ gmp-devel mailing list gmp-devel@gmplib.org

Re: [PATCH] Fix 64-bit T3 invert_limb.asm on PIC again.

2013-04-15 Thread Torbjorn Granlund
David Miller da...@davemloft.net writes: Some of this stuff doesn't work, for example, from invert_limb.asm: + rd %pc, %g3 + sethi %hi(_GLOBAL_OFFSET_TABLE_+4), %g4 + add %g4, %lo(_GLOBAL_OFFSET_TABLE_+8), %g4 + add %g3, %g4, %g4 sethi

Re: [PATCH] Fix 64-bit T3 invert_limb.asm on PIC again.

2013-04-15 Thread David Miller
From: Torbjorn Granlund t...@gmplib.org Date: Mon, 15 Apr 2013 22:34:24 +0200 David Miller da...@davemloft.net writes: Some of this stuff doesn't work, for example, from invert_limb.asm: + rd %pc, %g3 + sethi %hi(_GLOBAL_OFFSET_TABLE_+4), %g4 + add

Re: [PATCH] Fix 64-bit T3 invert_limb.asm on PIC again.

2013-04-15 Thread David Miller
From: ni...@lysator.liu.se (Niels Möller) Date: Mon, 15 Apr 2013 22:28:54 +0200 David Miller da...@davemloft.net writes: Accomodating a negative offset means using sethi+xor with the %hix22() and %lox10() relocs, which gets us potentially right back into the area where we could hit Solaris

[PATCH] Fix sparc64 hardcoded .rodata et al.

2013-04-15 Thread David Miller
Let's take care of this while it's still fresh in our minds. 2013-04-15 David S. Miller da...@davemloft.net * mpn/sparc64/gcd_1.asm: Use RODATA, TYPE, and SIZE. diff -r 5ea92466ab67 mpn/sparc64/gcd_1.asm --- a/mpn/sparc64/gcd_1.asm Mon Apr 15 23:00:14 2013 +0200 +++