This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[PATCH, i386]: Fix PR target/39228, 387 optimised __builtin_isinf() gives incorrect result


Hello!

Attached patch fixes PR target/39228 by forcing operands[1] through
volatile memory. This will strip excess precision from input operand.

Patch was bootstrapped on i686-pc-linux-gnu. Patch also includes
generic testcase that will check for possible problems with isinf()
functions.

2009-02-18  Uros Bizjak  <ubizjak@gmail.com>

	PR target/39228
	* config/i386/i386.md (isinfxf2): Split from isinf<mode>2.
	(isinf<mode>2): Use MODEF mode iterator.  Force operand[1]
	through volatile memory to remove excess precision.

testsuite/ChangeLog:

2009-02-18  Uros Bizjak  <ubizjak@gmail.com>

	PR target/39228
	* gcc.c-torture/execute/pr39228.c: New test.

I will wait for possible comments for a day or two before comitting
this patch to 4.4 mainline and 4.3 branch.

Uros.

Attachment: p.diff.txt
Description: Text document


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