Index: i386.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
retrieving revision 1.445
diff -u -p -r1.445 i386.h
--- i386.h	6 Aug 2005 13:26:07 -0000	1.445
+++ i386.h	4 Oct 2005 07:57:38 -0000
@@ -173,7 +173,8 @@ extern int x86_prefetch_sse;
 /* For sane SSE instruction set generation we need fcomi instruction.  It is
    safe to enable all CMOVE instructions.  */
 #define TARGET_CMOVE ((x86_cmove & (1 << ix86_arch)) || TARGET_SSE)
-#define TARGET_FISTTP (x86_fisttp & (1 << ix86_arch))
+#define TARGET_FISTTP (((x86_fisttp & (1 << ix86_arch)) || TARGET_SSE3) \
+			&& TARGET_80387)
 #define TARGET_DEEP_BRANCH_PREDICTION (x86_deep_branch & TUNEMASK)
 #define TARGET_BRANCH_PREDICTION_HINTS (x86_branch_hints & TUNEMASK)
 #define TARGET_DOUBLE_WITH_ADD (x86_double_with_add & TUNEMASK)
Index: i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.657
diff -u -p -r1.657 i386.md
--- i386.md	29 Sep 2005 03:31:23 -0000	1.657
+++ i386.md	4 Oct 2005 07:57:40 -0000
@@ -4069,7 +4069,7 @@
   [(parallel [(set (match_operand:SI 0 "nonimmediate_operand" "")
 	           (fix:SI (match_operand:SSEMODEF 1 "register_operand" "")))
 	      (clobber (reg:CC FLAGS_REG))])]
-  "TARGET_80387 || (SSE_FLOAT_MODE_P (<MODE>mode))"
+  "TARGET_80387 || SSE_FLOAT_MODE_P (<MODE>mode)"
 {
   if (TARGET_FISTTP
       && !(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))
@@ -4162,7 +4162,7 @@
 (define_insn_and_split "fix_trunc<mode>_fisttp_i387_1"
   [(set (match_operand:X87MODEI 0 "nonimmediate_operand" "=m,?r")
 	(fix:X87MODEI (match_operand 1 "register_operand" "f,f")))]
-  "TARGET_80387 && TARGET_FISTTP
+  "TARGET_FISTTP
    && FLOAT_MODE_P (GET_MODE (operands[1]))
    && !((SSE_FLOAT_MODE_P (GET_MODE (operands[1]))
 	 && (TARGET_64BIT || <MODE>mode != DImode))
@@ -4190,7 +4190,7 @@
   [(set (match_operand:X87MODEI 0 "memory_operand" "=m")
 	(fix:X87MODEI (match_operand 1 "register_operand" "f")))
    (clobber (match_scratch:XF 2 "=&1f"))]
-  "TARGET_80387 && TARGET_FISTTP
+  "TARGET_FISTTP
    && FLOAT_MODE_P (GET_MODE (operands[1]))
    && !((SSE_FLOAT_MODE_P (GET_MODE (operands[1]))
 	 && (TARGET_64BIT || <MODE>mode != DImode))
@@ -4204,7 +4204,7 @@
 	(fix:X87MODEI (match_operand 1 "register_operand" "f,f")))
    (clobber (match_operand:X87MODEI 2 "memory_operand" "=m,m"))
    (clobber (match_scratch:XF 3 "=&1f,&1f"))]
-  "TARGET_80387 && TARGET_FISTTP
+  "TARGET_FISTTP
    && FLOAT_MODE_P (GET_MODE (operands[1]))
    && !((SSE_FLOAT_MODE_P (GET_MODE (operands[1]))
 	&& (TARGET_64BIT || <MODE>mode != DImode))
