This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: e500 port: the port itself


On Fri, 18 Oct 2013, Adhemerval Zanella wrote:

> Hi Joseph, thanks for the patch. As you suggested, I'll focus the review
> in the non-e500 specific parts. Aside to the Copysights nits, the patch
> looks ok. Any reason in particular to the missing copysignl PLT?

The copysignl PLT for soft-float results from use of __builtin_copysignl 
in libgcc's complex multiplication / division, which then get linked into 
glibc (copysignl uses directly in glibc's source code of course use the 
hidden_* tricks to avoid going through PLT entries, but that doesn't help 
for calls from libgcc, or calls generated by GCC to libgcc functions that 
glibc also exports).  For e500v2, GCC has abstf2/negtf2 patterns, which 
suffice to get __builtin_copysignl expanded inline and so the PLT entry 
isn't needed.

The ideal state would be appropriate GCC insn patterns to expand copysignl 
inline for soft-float / e500v1, so that the PLT entry never appeared.  
(In glibc, copysignl is in libc as well as libm, meaning the use of it in 
libgcc doesn't generally cause problems.  But people using other C 
libraries with GCC have run into the issue of libgcc using copysignl, 
which they don't have in their libc, several times.)

> > diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fclrexcpt.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fclrexcpt.c
> > new file mode 100644
> > index 0000000..92a7dd1
> > --- /dev/null
> > +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fclrexcpt.c
> > @@ -0,0 +1,53 @@
> > +/* Clear given exceptions in current floating-point environment.  e500 version.
> > +   Copyright (C) 2004-2013 Free Software Foundation, Inc.
> 
> Shouldn't be just 2013? This is also applies for other Copyright dates 
> for new files.

These files are based on Aldy's old spe add-on for glibc 2.3, which was 
released in 2004.  Copyright dates reflect files being based on other 
files or having been previously released.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]