This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Move sysdeps/x86_64/Implies to sysdeps/x86_64/64
On Thu, 22 Mar 2012, Richard Henderson wrote:
> On 03/22/12 15:07, H.J. Lu wrote:
> > There is no sysdeps/x86_64/x32/Implies. I'd like search order
> >
> > x86_64/x32
> > x86_64
> > x86_64/fpu
> > wordsize-32
>
> Incidentally, why do you want wordsize-32 at all?
>
> x32 has 64-bit registers, which (in gcc parlance at least) implies a
> 64-bit *word* size, and the desirability of all the optimizations that
> come with the ability to docomputation on that scale.
wordsize-32 / wordsize-64 mean different things in different places.
Sometimes they may refer to what's optimal, but sometimes they may refer
to the size of "long", or to its equivalence to "long long", or
(sysdeps/unix/sysv/linux/wordsize-64) to the equivalence of "struct stat"
and "struct stat64".
My glibc todo list has notes to look at this for MIPS n64 and n32 (which
are quite similar to the two x86_64 ABIs). MIPS n64 has an unfortunate
(historical?) ABI meaning it can't use sysdeps/unix/sysv/linux/wordsize-64
(struct stat and struct stat64 aren't the same layout), which causes
various complications and local versions of functions to be needed. For
MIPS n32, much like x32, it's good to use 64-bit versions for
optimization. I have a note that it should be possible to use all of
sysdeps/ieee754/dbl-64/wordsize-64 on n64 - but all *except for
lround/llround* on n32. (lround being an alias for llround won't work for
n32; 32-bit values always need to be sign-extended in 64-bit registers on
MIPS and if they aren't you get undefined behavior, whereas lround's
overflow cases must return an unspecified value of type long that behaves
as a value of type long in the caller; the results of 32-bit instructions
on non-sign-extended values are not specified in the MIPS architecture.)
--
Joseph S. Myers
joseph@codesourcery.com