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]

Re: [patch] fix reload errors in fisttp float128 conversions



The use of this macro (and SCALAR_MODE_FLOAT_P) to limit operands to X87 modes through i386.md (and i386.c) is wrong. We should define new macro (say, X87_FLOAT_MODE_P, just to be consistent with SSE_FLOAT_MODE_P) and explicitly check all X87 supported modes in it.


At this moment, I suggest to review all FLOAT_MODE_P and SCALAR_FLOAT_MODE_P uses in i386.md directory. It looks to me, that all uses have to be changed to this new X87_FLOAT_MODE_P macro, as I don't remeber x86 targets having HW DFP insns ;).

OK, I did this in i386.md. I was going to do it in i386.c, but was a little more involved than I had time for at the moment to verify each use. More to the point a few places may actually use FLOAT_MODE_P or SCALAR_FLOAT_MODE_P correctly. The uses in the md file I did verify and believe to be correct.


Tested on i386 and x86_64-darwin. OK for mainline? 4.2?

-eric

2007-04-09 Eric Christopher <echristo@gmail.com>

	* config/i386/i386.h (X87_FLOAT_MODE_P): New.
	* config/i386/i386.md: Use. Replace uses of
	FLOAT_MODE_P.
	* config/i386/i386.c (output_fix_trunc): Assert that
	we don't have TFmode operand[1].


Attachment: i386.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]