This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix -msse crash
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com
- Date: Tue, 5 Nov 2002 13:55:18 +0100
- Subject: Fix -msse crash
Hi,
in float_truncate we paper around reload and crash when generating float
truncate from x87->SSE instruction, as this one should split into x87 store
followed by SSE load but is first recognized as SSE conversion.
I've commited the attached patch as obvious to BIB branch.
Mon Nov 4 21:38:37 PST 2002 Jan Hubicka <jh@suse.cz>
* i386.md (float_truncate SSE splitter): Ensure that operand is not
stack register.
(float SSE splitters): Reorder conditional.
*** i386.md.old Mon Nov 4 21:11:27 2002
--- i386.md Mon Nov 4 21:24:47 2002
***************
*** 3980,3987 ****
(float_truncate:SF
(match_operand:DF 1 "nonimmediate_operand" "")))
(clobber (match_operand 2 "" ""))]
! "TARGET_80387 && reload_completed
! && SSE_REG_P (operands[0])"
[(const_int 0)]
{
rtx src, dest;
--- 3980,3988 ----
(float_truncate:SF
(match_operand:DF 1 "nonimmediate_operand" "")))
(clobber (match_operand 2 "" ""))]
! "TARGET_80387 && reload_completed && TARGET_SSE_PARTIAL_REGS
! && SSE_REG_P (operands[0])
! && !STACK_REG_P (operands[1])"
[(const_int 0)]
{
rtx src, dest;
***************
*** 4730,4737 ****
(define_split
[(set (match_operand:SF 0 "register_operand" "")
(float:SF (match_operand:SI 1 "nonimmediate_operand" "")))]
! "TARGET_80387 && reload_completed
! && SSE_REG_P (operands[0]) && TARGET_SSE_PARTIAL_REGS"
[(const_int 0)]
{
rtx dest;
--- 4731,4738 ----
(define_split
[(set (match_operand:SF 0 "register_operand" "")
(float:SF (match_operand:SI 1 "nonimmediate_operand" "")))]
! "TARGET_80387 && reload_completed && TARGET_SSE_PARTIAL_REGS
! && SSE_REG_P (operands[0])"
[(const_int 0)]
{
rtx dest;
***************
*** 4784,4791 ****
(define_split
[(set (match_operand:SF 0 "register_operand" "")
(float:SF (match_operand:DI 1 "nonimmediate_operand" "")))]
! "TARGET_80387 && reload_completed
! && SSE_REG_P (operands[0]) && TARGET_SSE_PARTIAL_REGS"
[(const_int 0)]
{
rtx dest;
--- 4785,4792 ----
(define_split
[(set (match_operand:SF 0 "register_operand" "")
(float:SF (match_operand:DI 1 "nonimmediate_operand" "")))]
! "TARGET_80387 && reload_completed && TARGET_SSE_PARTIAL_REGS
! && SSE_REG_P (operands[0])"
[(const_int 0)]
{
rtx dest;