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: ppc32: math failures - logb_downward (1) gives wrong result


On 06/21/2012 06:09 PM, Joseph S. Myers wrote:
> On Thu, 21 Jun 2012, Andreas Jaeger wrote:
>
>> Build current trunk (as of yesterday) on s390 with gcc 4.7, I see a couple of
>> failures in the math testsuite:
> ppc32 or s390?  For ppc32 it's a known GCC bug (though there may not be an 
> entry in GCC Bugzilla for it): the code sequence generated for converting 
> integers to floating-point, on older processors, wrongly converts 0 to -0 
> in round-downwards mode (if -frounding-math, a more complicated sequence 
> should be used instead that temporarily sets round-to-nearest mode).
>
This issue is due on POWER4 PPC32 machines GCC does not generate the 'fcfid' instruction
for integer to FP conversion. This was fixed on revision 186392 in the FSF branch:

[gcc]
2012-04-12  Michael Meissner  <meissner@linux.vnet.ibm.com <mailto:meissner%40linux.vnet.ibm.com>>

	Backport from mainline
	2012-04-12  Michael Meissner  <meissner@linux.vnet.ibm.com <mailto:meissner%40linux.vnet.ibm.com>>

	PR target/52775
	* config/rs6000/rs6000.h (TARGET_FCFID): Add TARGET_PPC_GPOPT to
	the list of options to enable the FCFID instruction.
	(TARGET_EXTRA_BUILTINS): Adjust comment.

[gcc/testsuite]
012-04-12  Michael Meissner  <meissner@linux.vnet.ibm.com <mailto:meissner%40linux.vnet.ibm.com>>

	Backport from mainline
	2012-04-12  Michael Meissner  <meissner@linux.vnet.ibm.com <mailto:meissner%40linux.vnet.ibm.com>>

	PR target/52775
	* gcc.target/powerpc/pr52775.c: New file.


-- 
Adhemerval Zanella Netto
  Software Engineer
  Linux Technology Center Brazil
  Toolchain / GLIBC on Power Architecture
  azanella@linux.vnet.ibm.com / azanella@br.ibm.com
  +55 61 8642-9890


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