5.1.2 assembler error on Solaris 10 with CC='cc -xtarget=opteron -xarch=amd64'
Daniel Richard G.
skunk at iSKUNK.ORG
Wed Oct 9 07:50:17 CEST 2013
On Wed, 2013 Oct 9 6:49+0200, Niels Möller wrote:
> > Would it be helpful to look at assembly code produced by the
> > compiler, to see if there is any obvious difference with GMP's code?
> Maybe. To me, it sounds like this version of Suns tools are beggy. If
> you find a *simple* workaround, we could add it to gmp.
I generated the assembly code, and noticed a few things:
* None of the generated assembly uses "bt" or any variant thereof.
* "shr" is not used, but "shrl" and "shrq" occur frequently.
* "dec" is not used; "decl" is.
* "mov" is not used, but I see all of these:
It seems like fbe is only accepting more specific forms of various
Alternately, is there a way to have GMP assemble these source files
using $(AS), without going through the C frontend?
> Also, have you tried following Torbjörns suggestion to drop all extra
> flags, and just try configuring gmp with
> ./configure ABI=64
> ? ABI is gmp's way to select the right instruction set and abi on
> systems with several possible ones.
That results in a build triplet of coreisbr-pc-solaris2.10 (I wanted
plain x86_64, for better portability), and the configure script
errors out with
checking size of unsigned... 4
checking size of unsigned long... 4
checking size of mp_limb_t... 4
configure: error: Oops, mp_limb_t is 32 bits, but the assembler code
in this configuration expects 64 bits.
likely due to the ineffectual -m64. (The configure script really should
check for defined(_LP64) or sizeof(void*)==8 when testing that option;
the absence of an error is not enough.)
Daniel Richard G. || skunk at iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.
More information about the gmp-bugs