illegal instruction error with "get_d"
leif
not.really at online.de
Thu Apr 3 02:09:25 UTC 2014
On 03.04.2014 02:17, Torbjorn Granlund wrote:
> leif <not.really at online.de> writes:
>
> On 03.04.2014 00:31, Torbjorn Granlund wrote:
> > edA-qa mort-ora-y <eda-qa at disemia.com> writes:
> >
> > Is there anything I can do now to bypass/workaround the issue?
> >
> > The problem code is generated by gcc, directed by command line options
> > passed by GMP.
> >
> > The problem switch is almost surely -march=bdver1 which presumably is
> > part of CFLAGS (and CXXFLAGS if you did --enable-cxx). Check the used
> > values, around 50 lines down in the output of configure, then restart
> > configure passing CFLAGS="...", using the flags minus -march=bdver1.
>
> ... or using the flags with '-march=bdver1' substituted by
> -march=bdver1 -mno-avx'.
>
> Thanks, I wasn't aware of that GCC option.
>
> I suppose we just need to make sure -mno-avx is available for every gcc
> version where -march=bdver1 exist.
I'm pretty sure the option is older than the Bulldozer (presumably
introduced with, or short after, Sandy Bridge / AVX support, GCC version
4.4; bdver1 is supported since 4.6), and it is definitely available even
if the assembler GCC was built with doesn't support AVX instructions
(like e.g. Apple's assemblers from XCode for a while).
People also might have recent GCCs with outdated binutils, so testing
whether [compiling with] '-march=foo -mno-bar' works in case
'-march=foo' alone doesn't (when config.guess or the specified target
suggests it should) could make sense, at least for Intel/AMD x86_64
targets. Whether the CPU (or VM) actually supports the instruction set
extensions in question (used in GMP's assembly files or emitted by the
compiler) is another story, and testing that of course only makes sense
for native builds.
In any case, adding some note on "native" builds inside a VM to the
documentation should be easiest. (Haven't searched the docs; there
might already be one.)
-leif
--
() The ASCII Ribbon Campaign
/\ Help Cure HTML E-Mail
More information about the gmp-bugs
mailing list