longlong.h and cpu type vectoring...
davem at davemloft.net
Sat Mar 30 22:56:51 CET 2013
Through a twisty passage I came across this issue which we'll
need to address in some way in the near future.
I noticed that the longlong.h included in gmp lacks a lot of
sparc optimizations, and in particular umul_ppmm doesn't use
mulx/umulxhi when it could.
But this got me thinking of a much larger issue. When we have
cpu function vectors or ifunc relocations, we really have to
be careful how we enable such instructions in a header file
Currently the HAVE_* macros get defined based upon the target
configured, and this ends up enabling different optimizations in
But these end up being used in generic pieces of code, basically
anything that uses the longlong.h interfaces will be susceptible
to this issue.
Anyways, just thought I'd bring this to everyone's attention.
More information about the gmp-devel