Commit 87aa5246 by John Wehle Committed by John Wehle

i386.md: Delete floating point compare...

	* i386.md: Delete floating point compare, add, subtract,
	multiply, and divide patterns which allowed integer
	operands.
	* i386.c (output_386_binary_op): Delete unused code.
	(output_float_compare): Likewise.

From-SVN: r26123
parent ea5c0a50
Fri Apr 2 14:12:06 EST 1999 John Wehle (john@feith.com)
* i386.md: Delete floating point compare, add, subtract,
multiply, and divide patterns which allowed integer
operands.
* i386.c (output_386_binary_op): Delete unused code.
(output_float_compare): Likewise.
Fri Apr 2 11:53:37 1999 John Wehle (john@feith.com) Fri Apr 2 11:53:37 1999 John Wehle (john@feith.com)
* i386.md (movsf+1, movdf+1, movxf+1): Update constraints * i386.md (movsf+1, movdf+1, movxf+1): Update constraints
......
...@@ -4187,35 +4187,19 @@ output_387_binary_op (insn, operands) ...@@ -4187,35 +4187,19 @@ output_387_binary_op (insn, operands)
switch (GET_CODE (operands[3])) switch (GET_CODE (operands[3]))
{ {
case PLUS: case PLUS:
if (GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT base_op = "fadd";
|| GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT)
base_op = "fiadd";
else
base_op = "fadd";
break; break;
case MINUS: case MINUS:
if (GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT base_op = "fsub";
|| GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT)
base_op = "fisub";
else
base_op = "fsub";
break; break;
case MULT: case MULT:
if (GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT base_op = "fmul";
|| GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT)
base_op = "fimul";
else
base_op = "fmul";
break; break;
case DIV: case DIV:
if (GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT base_op = "fdiv";
|| GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT)
base_op = "fidiv";
else
base_op = "fdiv";
break; break;
default: default:
...@@ -4238,17 +4222,8 @@ output_387_binary_op (insn, operands) ...@@ -4238,17 +4222,8 @@ output_387_binary_op (insn, operands)
if (GET_CODE (operands[2]) == MEM) if (GET_CODE (operands[2]) == MEM)
return strcat (buf, AS1 (%z2,%2)); return strcat (buf, AS1 (%z2,%2));
if (NON_STACK_REG_P (operands[1])) if (! STACK_REG_P (operands[1]) || ! STACK_REG_P (operands[2]))
{ abort ();
output_op_from_reg (operands[1], strcat (buf, AS1 (%z0,%1)));
return "";
}
else if (NON_STACK_REG_P (operands[2]))
{
output_op_from_reg (operands[2], strcat (buf, AS1 (%z0,%1)));
return "";
}
if (find_regno_note (insn, REG_DEAD, REGNO (operands[2]))) if (find_regno_note (insn, REG_DEAD, REGNO (operands[2])))
{ {
...@@ -4271,18 +4246,6 @@ output_387_binary_op (insn, operands) ...@@ -4271,18 +4246,6 @@ output_387_binary_op (insn, operands)
if (GET_CODE (operands[2]) == MEM) if (GET_CODE (operands[2]) == MEM)
return strcat (buf, AS1 (%z2,%2)); return strcat (buf, AS1 (%z2,%2));
if (NON_STACK_REG_P (operands[1]))
{
output_op_from_reg (operands[1], strcat (buf, AS1 (r%z0,%1)));
return "";
}
else if (NON_STACK_REG_P (operands[2]))
{
output_op_from_reg (operands[2], strcat (buf, AS1 (%z0,%1)));
return "";
}
if (! STACK_REG_P (operands[1]) || ! STACK_REG_P (operands[2])) if (! STACK_REG_P (operands[1]) || ! STACK_REG_P (operands[2]))
abort (); abort ();
...@@ -4442,24 +4405,19 @@ output_float_compare (insn, operands) ...@@ -4442,24 +4405,19 @@ output_float_compare (insn, operands)
{ {
static char buf[100]; static char buf[100];
/* Decide if this is the integer or float compare opcode, or the /* Decide if this is a float compare or an unordered float compare. */
unordered float compare. */
if (unordered_compare) if (unordered_compare)
strcpy (buf, (cc_status.flags & CC_FCOMI) ? "fucomi" : "fucom"); strcpy (buf, (cc_status.flags & CC_FCOMI) ? "fucomi" : "fucom");
else if (GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_FLOAT)
strcpy (buf, (cc_status.flags & CC_FCOMI) ? "fcomi" : "fcom");
else else
strcpy (buf, "ficom"); strcpy (buf, (cc_status.flags & CC_FCOMI) ? "fcomi" : "fcom");
/* Modify the opcode if the 387 stack is to be popped. */ /* Modify the opcode if the 387 stack is to be popped. */
if (stack_top_dies) if (stack_top_dies)
strcat (buf, "p"); strcat (buf, "p");
if (NON_STACK_REG_P (operands[1])) if (cc_status.flags & CC_FCOMI)
output_op_from_reg (operands[1], strcat (buf, AS1 (%z0,%1)));
else if (cc_status.flags & CC_FCOMI)
{ {
output_asm_insn (strcat (buf, AS2 (%z1,%y1,%0)), operands); output_asm_insn (strcat (buf, AS2 (%z1,%y1,%0)), operands);
return ""; return "";
......
...@@ -513,28 +513,6 @@ ...@@ -513,28 +513,6 @@
[(set (cc0) [(set (cc0)
(match_operator 2 "VOIDmode_compare_op" (match_operator 2 "VOIDmode_compare_op"
[(match_operand:XF 0 "register_operand" "f") [(match_operand:XF 0 "register_operand" "f")
(float:XF
(match_operand:SI 1 "nonimmediate_operand" "rm"))]))
(clobber (match_scratch:HI 3 "=a"))]
"TARGET_80387"
"* return output_float_compare (insn, operands);"
[(set_attr "type" "fcompare")])
(define_insn ""
[(set (cc0)
(match_operator 2 "VOIDmode_compare_op"
[(float:XF
(match_operand:SI 0 "nonimmediate_operand" "rm"))
(match_operand:XF 1 "register_operand" "f")]))
(clobber (match_scratch:HI 3 "=a"))]
"TARGET_80387"
"* return output_float_compare (insn, operands);"
[(set_attr "type" "fcompare")])
(define_insn ""
[(set (cc0)
(match_operator 2 "VOIDmode_compare_op"
[(match_operand:XF 0 "register_operand" "f")
(float_extend:XF (float_extend:XF
(match_operand:DF 1 "nonimmediate_operand" "fm"))])) (match_operand:DF 1 "nonimmediate_operand" "fm"))]))
(clobber (match_scratch:HI 3 "=a"))] (clobber (match_scratch:HI 3 "=a"))]
...@@ -599,28 +577,6 @@ ...@@ -599,28 +577,6 @@
[(set (cc0) [(set (cc0)
(match_operator 2 "VOIDmode_compare_op" (match_operator 2 "VOIDmode_compare_op"
[(match_operand:DF 0 "register_operand" "f") [(match_operand:DF 0 "register_operand" "f")
(float:DF
(match_operand:SI 1 "nonimmediate_operand" "rm"))]))
(clobber (match_scratch:HI 3 "=a"))]
"TARGET_80387"
"* return output_float_compare (insn, operands);"
[(set_attr "type" "fcompare")])
(define_insn ""
[(set (cc0)
(match_operator 2 "VOIDmode_compare_op"
[(float:DF
(match_operand:SI 0 "nonimmediate_operand" "rm"))
(match_operand:DF 1 "register_operand" "f")]))
(clobber (match_scratch:HI 3 "=a"))]
"TARGET_80387"
"* return output_float_compare (insn, operands);"
[(set_attr "type" "fcompare")])
(define_insn ""
[(set (cc0)
(match_operator 2 "VOIDmode_compare_op"
[(match_operand:DF 0 "register_operand" "f")
(float_extend:DF (float_extend:DF
(match_operand:SF 1 "nonimmediate_operand" "fm"))])) (match_operand:SF 1 "nonimmediate_operand" "fm"))]))
(clobber (match_scratch:HI 3 "=a"))] (clobber (match_scratch:HI 3 "=a"))]
...@@ -692,28 +648,6 @@ ...@@ -692,28 +648,6 @@
(define_insn "" (define_insn ""
[(set (cc0) [(set (cc0)
(match_operator 2 "VOIDmode_compare_op"
[(match_operand:SF 0 "register_operand" "f")
(float:SF
(match_operand:SI 1 "nonimmediate_operand" "rm"))]))
(clobber (match_scratch:HI 3 "=a"))]
"TARGET_80387"
"* return output_float_compare (insn, operands);"
[(set_attr "type" "fcompare")])
(define_insn ""
[(set (cc0)
(match_operator 2 "VOIDmode_compare_op"
[(float:SF
(match_operand:SI 0 "nonimmediate_operand" "rm"))
(match_operand:SF 1 "register_operand" "f")]))
(clobber (match_scratch:HI 3 "=a"))]
"TARGET_80387"
"* return output_float_compare (insn, operands);"
[(set_attr "type" "fcompare")])
(define_insn ""
[(set (cc0)
(compare:CCFPEQ (match_operand:SF 0 "register_operand" "f") (compare:CCFPEQ (match_operand:SF 0 "register_operand" "f")
(match_operand:SF 1 "register_operand" "f"))) (match_operand:SF 1 "register_operand" "f")))
(clobber (match_scratch:HI 2 "=a"))] (clobber (match_scratch:HI 2 "=a"))]
...@@ -6986,9 +6920,7 @@ byte_xor_operation: ...@@ -6986,9 +6920,7 @@ byte_xor_operation:
;; mulM3 and divM3. There are three patterns for each of DFmode and ;; mulM3 and divM3. There are three patterns for each of DFmode and
;; SFmode. The first is the normal insn, the second the same insn but ;; SFmode. The first is the normal insn, the second the same insn but
;; with one operand a conversion, and the third the same insn but with ;; with one operand a conversion, and the third the same insn but with
;; the other operand a conversion. The conversion may be SFmode or ;; the other operand a conversion.
;; SImode if the target mode DFmode, but only SImode if the target mode
;; is SFmode.
(define_insn "" (define_insn ""
[(set (match_operand:DF 0 "register_operand" "=f,f") [(set (match_operand:DF 0 "register_operand" "=f,f")
...@@ -7008,23 +6940,6 @@ byte_xor_operation: ...@@ -7008,23 +6940,6 @@ byte_xor_operation:
)]) )])
(define_insn "" (define_insn ""
[(set (match_operand:DF 0 "register_operand" "=f")
(match_operator:DF 3 "binary_387_op"
[(float:DF (match_operand:SI 1 "nonimmediate_operand" "rm"))
(match_operand:DF 2 "register_operand" "0")]))]
"TARGET_80387"
"* return output_387_binary_op (insn, operands);"
[(set (attr "type")
(cond [(match_operand:DF 3 "is_mul" "")
(const_string "fpmul")
(match_operand:DF 3 "is_div" "")
(const_string "fpdiv")
]
(const_string "fpop")
)
)])
(define_insn ""
[(set (match_operand:XF 0 "register_operand" "=f,f") [(set (match_operand:XF 0 "register_operand" "=f,f")
(match_operator:XF 3 "binary_387_op" (match_operator:XF 3 "binary_387_op"
[(match_operand:XF 1 "register_operand" "0,f") [(match_operand:XF 1 "register_operand" "0,f")
...@@ -7042,23 +6957,6 @@ byte_xor_operation: ...@@ -7042,23 +6957,6 @@ byte_xor_operation:
)]) )])
(define_insn "" (define_insn ""
[(set (match_operand:XF 0 "register_operand" "=f")
(match_operator:XF 3 "binary_387_op"
[(float:XF (match_operand:SI 1 "nonimmediate_operand" "rm"))
(match_operand:XF 2 "register_operand" "0")]))]
"TARGET_80387"
"* return output_387_binary_op (insn, operands);"
[(set (attr "type")
(cond [(match_operand:DF 3 "is_mul" "")
(const_string "fpmul")
(match_operand:DF 3 "is_div" "")
(const_string "fpdiv")
]
(const_string "fpop")
)
)])
(define_insn ""
[(set (match_operand:XF 0 "register_operand" "=f,f") [(set (match_operand:XF 0 "register_operand" "=f,f")
(match_operator:XF 3 "binary_387_op" (match_operator:XF 3 "binary_387_op"
[(float_extend:XF (match_operand:SF 1 "nonimmediate_operand" "fm,0")) [(float_extend:XF (match_operand:SF 1 "nonimmediate_operand" "fm,0"))
...@@ -7076,23 +6974,6 @@ byte_xor_operation: ...@@ -7076,23 +6974,6 @@ byte_xor_operation:
)]) )])
(define_insn "" (define_insn ""
[(set (match_operand:XF 0 "register_operand" "=f")
(match_operator:XF 3 "binary_387_op"
[(match_operand:XF 1 "register_operand" "0")
(float:XF (match_operand:SI 2 "nonimmediate_operand" "rm"))]))]
"TARGET_80387"
"* return output_387_binary_op (insn, operands);"
[(set (attr "type")
(cond [(match_operand:DF 3 "is_mul" "")
(const_string "fpmul")
(match_operand:DF 3 "is_div" "")
(const_string "fpdiv")
]
(const_string "fpop")
)
)])
(define_insn ""
[(set (match_operand:XF 0 "register_operand" "=f,f") [(set (match_operand:XF 0 "register_operand" "=f,f")
(match_operator:XF 3 "binary_387_op" (match_operator:XF 3 "binary_387_op"
[(match_operand:XF 1 "register_operand" "0,f") [(match_operand:XF 1 "register_operand" "0,f")
...@@ -7128,23 +7009,6 @@ byte_xor_operation: ...@@ -7128,23 +7009,6 @@ byte_xor_operation:
)]) )])
(define_insn "" (define_insn ""
[(set (match_operand:DF 0 "register_operand" "=f")
(match_operator:DF 3 "binary_387_op"
[(match_operand:DF 1 "register_operand" "0")
(float:DF (match_operand:SI 2 "nonimmediate_operand" "rm"))]))]
"TARGET_80387"
"* return output_387_binary_op (insn, operands);"
[(set (attr "type")
(cond [(match_operand:DF 3 "is_mul" "")
(const_string "fpmul")
(match_operand:DF 3 "is_div" "")
(const_string "fpdiv")
]
(const_string "fpop")
)
)])
(define_insn ""
[(set (match_operand:DF 0 "register_operand" "=f,f") [(set (match_operand:DF 0 "register_operand" "=f,f")
(match_operator:DF 3 "binary_387_op" (match_operator:DF 3 "binary_387_op"
[(match_operand:DF 1 "register_operand" "0,f") [(match_operand:DF 1 "register_operand" "0,f")
...@@ -7178,40 +7042,6 @@ byte_xor_operation: ...@@ -7178,40 +7042,6 @@ byte_xor_operation:
(const_string "fpop") (const_string "fpop")
) )
)]) )])
(define_insn ""
[(set (match_operand:SF 0 "register_operand" "=f")
(match_operator:SF 3 "binary_387_op"
[(float:SF (match_operand:SI 1 "nonimmediate_operand" "rm"))
(match_operand:SF 2 "register_operand" "0")]))]
"TARGET_80387"
"* return output_387_binary_op (insn, operands);"
[(set (attr "type")
(cond [(match_operand:DF 3 "is_mul" "")
(const_string "fpmul")
(match_operand:DF 3 "is_div" "")
(const_string "fpdiv")
]
(const_string "fpop")
)
)])
(define_insn ""
[(set (match_operand:SF 0 "register_operand" "=f")
(match_operator:SF 3 "binary_387_op"
[(match_operand:SF 1 "register_operand" "0")
(float:SF (match_operand:SI 2 "nonimmediate_operand" "rm"))]))]
"TARGET_80387"
"* return output_387_binary_op (insn, operands);"
[(set (attr "type")
(cond [(match_operand:DF 3 "is_mul" "")
(const_string "fpmul")
(match_operand:DF 3 "is_div" "")
(const_string "fpdiv")
]
(const_string "fpop")
)
)])
(define_expand "strlensi" (define_expand "strlensi"
[(parallel [(set (match_dup 4) [(parallel [(set (match_dup 4)
......
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