Commit 1deaa899 by Jan Hubicka Committed by Jan Hubicka

i386.md (add?f3, [...]): Enable for TARGET_SSE(2) too.


	* i386.md (add?f3, sub?f3, mul?f3, dif?f3): Enable for TARGET_SSE(2)
	too.
	(fop_sf_comm, fop_df_comm, fop_sf_1, fop_df_1): Support SSE.
	(fop_sf_comm_sse, fop_df_comm_sse): New patterns.
	(fop_sf_1_sse, fop_df_1_sse): New patterns
	(fop_*): Disable float_extend and float patterns for SSE compilation.
	* i386.c (output_387_binary_op): Support SSE.

From-SVN: r39635
parent 42a0aa6f
Tue Feb 13 14:53:16 CET 2001 Jan Hubicka <jh@suse.cz>
* i386.md (add?f3, sub?f3, mul?f3, dif?f3): Enable for TARGET_SSE(2)
too.
(fop_sf_comm, fop_df_comm, fop_sf_1, fop_df_1): Support SSE.
(fop_sf_comm_sse, fop_df_comm_sse): New patterns.
(fop_sf_1_sse, fop_df_1_sse): New patterns
(fop_*): Disable float_extend and float patterns for SSE compilation.
* i386.c (output_387_binary_op): Support SSE.
Tue Feb 13 14:16:34 CET 2001 Jan Hubicka <jh@suse.cz> Tue Feb 13 14:16:34 CET 2001 Jan Hubicka <jh@suse.cz>
* i386.md (dummy_extendsfdf2): Support SSE2 * i386.md (dummy_extendsfdf2): Support SSE2
......
...@@ -3762,6 +3762,8 @@ output_387_binary_op (insn, operands) ...@@ -3762,6 +3762,8 @@ output_387_binary_op (insn, operands)
{ {
static char buf[30]; static char buf[30];
const char *p; const char *p;
const char *ssep;
int is_sse = SSE_REG_P (operands[0]) | SSE_REG_P (operands[1]) | SSE_REG_P (operands[2]);
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
/* Even if we do not want to check the inputs, this documents input /* Even if we do not want to check the inputs, this documents input
...@@ -3775,7 +3777,7 @@ output_387_binary_op (insn, operands) ...@@ -3775,7 +3777,7 @@ output_387_binary_op (insn, operands)
&& (STACK_REG_P (operands[1]) || GET_CODE (operands[1]) == MEM))) && (STACK_REG_P (operands[1]) || GET_CODE (operands[1]) == MEM)))
&& (STACK_TOP_P (operands[1]) || STACK_TOP_P (operands[2]))) && (STACK_TOP_P (operands[1]) || STACK_TOP_P (operands[2])))
; /* ok */ ; /* ok */
else else if (!is_sse)
abort (); abort ();
#endif #endif
...@@ -3787,6 +3789,7 @@ output_387_binary_op (insn, operands) ...@@ -3787,6 +3789,7 @@ output_387_binary_op (insn, operands)
p = "fiadd"; p = "fiadd";
else else
p = "fadd"; p = "fadd";
ssep = "add";
break; break;
case MINUS: case MINUS:
...@@ -3795,6 +3798,7 @@ output_387_binary_op (insn, operands) ...@@ -3795,6 +3798,7 @@ output_387_binary_op (insn, operands)
p = "fisub"; p = "fisub";
else else
p = "fsub"; p = "fsub";
ssep = "sub";
break; break;
case MULT: case MULT:
...@@ -3803,6 +3807,7 @@ output_387_binary_op (insn, operands) ...@@ -3803,6 +3807,7 @@ output_387_binary_op (insn, operands)
p = "fimul"; p = "fimul";
else else
p = "fmul"; p = "fmul";
ssep = "mul";
break; break;
case DIV: case DIV:
...@@ -3811,12 +3816,22 @@ output_387_binary_op (insn, operands) ...@@ -3811,12 +3816,22 @@ output_387_binary_op (insn, operands)
p = "fidiv"; p = "fidiv";
else else
p = "fdiv"; p = "fdiv";
ssep = "div";
break; break;
default: default:
abort (); abort ();
} }
if (is_sse)
{
strcpy (buf, ssep);
if (GET_MODE (operands[0]) == SFmode)
strcat (buf, "ss\t{%2, %0|%0, %2}");
else
strcat (buf, "sd\t{%2, %0|%0, %2}");
return buf;
}
strcpy (buf, p); strcpy (buf, p);
switch (GET_CODE (operands[3])) switch (GET_CODE (operands[3]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment