Index: i386.md =================================================================== --- i386.md (revision 123537) +++ i386.md (working copy) @@ -4439,6 +4439,7 @@ (fix:X87MODEI (match_operand 1 "register_operand" "f,f")))] "TARGET_FISTTP && FLOAT_MODE_P (GET_MODE (operands[1])) + && GET_MODE (operands[1]) != TFmode && !((SSE_FLOAT_MODE_P (GET_MODE (operands[1])) && (TARGET_64BIT || mode != DImode)) && TARGET_SSE_MATH) @@ -4467,6 +4468,7 @@ (clobber (match_scratch:XF 2 "=&1f"))] "TARGET_FISTTP && FLOAT_MODE_P (GET_MODE (operands[1])) + && GET_MODE (operands[1]) != TFmode && !((SSE_FLOAT_MODE_P (GET_MODE (operands[1])) && (TARGET_64BIT || mode != DImode)) && TARGET_SSE_MATH)" @@ -4481,6 +4483,7 @@ (clobber (match_scratch:XF 3 "=&1f,&1f"))] "TARGET_FISTTP && FLOAT_MODE_P (GET_MODE (operands[1])) + && GET_MODE (operands[1]) != TFmode && !((SSE_FLOAT_MODE_P (GET_MODE (operands[1])) && (TARGET_64BIT || mode != DImode)) && TARGET_SSE_MATH)" @@ -4520,6 +4523,7 @@ (clobber (reg:CC FLAGS_REG))] "TARGET_80387 && !TARGET_FISTTP && FLOAT_MODE_P (GET_MODE (operands[1])) + && GET_MODE (operands[1]) != TFmode && !(SSE_FLOAT_MODE_P (GET_MODE (operands[1])) && (TARGET_64BIT || mode != DImode)) && !(reload_completed || reload_in_progress)" @@ -4555,6 +4559,7 @@ (clobber (match_scratch:XF 4 "=&1f"))] "TARGET_80387 && !TARGET_FISTTP && FLOAT_MODE_P (GET_MODE (operands[1])) + && GET_MODE (operands[1]) != TFmode && !(TARGET_64BIT && SSE_FLOAT_MODE_P (GET_MODE (operands[1])))" "* return output_fix_trunc (insn, operands, 0);" [(set_attr "type" "fistp") @@ -4570,6 +4575,7 @@ (clobber (match_scratch:XF 5 "=&1f,&1f"))] "TARGET_80387 && !TARGET_FISTTP && FLOAT_MODE_P (GET_MODE (operands[1])) + && GET_MODE (operands[1]) != TFmode && !(TARGET_64BIT && SSE_FLOAT_MODE_P (GET_MODE (operands[1])))" "#" [(set_attr "type" "fistp") @@ -4612,6 +4618,7 @@ (use (match_operand:HI 3 "memory_operand" "m"))] "TARGET_80387 && !TARGET_FISTTP && FLOAT_MODE_P (GET_MODE (operands[1])) + && GET_MODE (operands[1]) != TFmode && !SSE_FLOAT_MODE_P (GET_MODE (operands[1]))" "* return output_fix_trunc (insn, operands, 0);" [(set_attr "type" "fistp") @@ -4626,6 +4633,7 @@ (clobber (match_operand:X87MODEI12 4 "memory_operand" "=m,m"))] "TARGET_80387 && !TARGET_FISTTP && FLOAT_MODE_P (GET_MODE (operands[1])) + && GET_MODE (operands[1]) != TFmode && !SSE_FLOAT_MODE_P (GET_MODE (operands[1]))" "#" [(set_attr "type" "fistp") Index: i386.c =================================================================== --- i386.c (revision 123537) +++ i386.c (working copy) @@ -9243,6 +9243,8 @@ output_fix_trunc (rtx insn, rtx *operand int dimode_p = GET_MODE (operands[0]) == DImode; int round_mode = get_attr_i387_cw (insn); + gcc_assert (GET_MODE (operands[1]) != TFmode); + /* Jump through a hoop or two for DImode, since the hardware has no non-popping instruction. We used to do this a different way, but that was somewhat fragile and broke with post-reload splitters. */