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
This commit is contained in:
parent
ea5c0a506f
commit
87aa52463b
|
@ -1,3 +1,11 @@
|
|||
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)
|
||||
|
||||
* i386.md (movsf+1, movdf+1, movxf+1): Update constraints
|
||||
|
|
|
@ -4187,35 +4187,19 @@ output_387_binary_op (insn, operands)
|
|||
switch (GET_CODE (operands[3]))
|
||||
{
|
||||
case PLUS:
|
||||
if (GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT
|
||||
|| GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT)
|
||||
base_op = "fiadd";
|
||||
else
|
||||
base_op = "fadd";
|
||||
base_op = "fadd";
|
||||
break;
|
||||
|
||||
case MINUS:
|
||||
if (GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT
|
||||
|| GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT)
|
||||
base_op = "fisub";
|
||||
else
|
||||
base_op = "fsub";
|
||||
base_op = "fsub";
|
||||
break;
|
||||
|
||||
case MULT:
|
||||
if (GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT
|
||||
|| GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT)
|
||||
base_op = "fimul";
|
||||
else
|
||||
base_op = "fmul";
|
||||
base_op = "fmul";
|
||||
break;
|
||||
|
||||
case DIV:
|
||||
if (GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT
|
||||
|| GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT)
|
||||
base_op = "fidiv";
|
||||
else
|
||||
base_op = "fdiv";
|
||||
base_op = "fdiv";
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -4238,17 +4222,8 @@ output_387_binary_op (insn, operands)
|
|||
if (GET_CODE (operands[2]) == MEM)
|
||||
return strcat (buf, AS1 (%z2,%2));
|
||||
|
||||
if (NON_STACK_REG_P (operands[1]))
|
||||
{
|
||||
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 (! STACK_REG_P (operands[1]) || ! STACK_REG_P (operands[2]))
|
||||
abort ();
|
||||
|
||||
if (find_regno_note (insn, REG_DEAD, REGNO (operands[2])))
|
||||
{
|
||||
|
@ -4271,18 +4246,6 @@ output_387_binary_op (insn, operands)
|
|||
if (GET_CODE (operands[2]) == MEM)
|
||||
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]))
|
||||
abort ();
|
||||
|
||||
|
@ -4442,24 +4405,19 @@ output_float_compare (insn, operands)
|
|||
{
|
||||
static char buf[100];
|
||||
|
||||
/* Decide if this is the integer or float compare opcode, or the
|
||||
unordered float compare. */
|
||||
/* Decide if this is a float compare or an unordered float compare. */
|
||||
|
||||
if (unordered_compare)
|
||||
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
|
||||
strcpy (buf, "ficom");
|
||||
strcpy (buf, (cc_status.flags & CC_FCOMI) ? "fcomi" : "fcom");
|
||||
|
||||
/* Modify the opcode if the 387 stack is to be popped. */
|
||||
|
||||
if (stack_top_dies)
|
||||
strcat (buf, "p");
|
||||
|
||||
if (NON_STACK_REG_P (operands[1]))
|
||||
output_op_from_reg (operands[1], strcat (buf, AS1 (%z0,%1)));
|
||||
else if (cc_status.flags & CC_FCOMI)
|
||||
if (cc_status.flags & CC_FCOMI)
|
||||
{
|
||||
output_asm_insn (strcat (buf, AS2 (%z1,%y1,%0)), operands);
|
||||
return "";
|
||||
|
|
|
@ -509,28 +509,6 @@
|
|||
"* 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: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"
|
||||
|
@ -595,28 +573,6 @@
|
|||
"* 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: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"
|
||||
|
@ -690,28 +646,6 @@
|
|||
"* return output_float_compare (insn, operands);"
|
||||
[(set_attr "type" "fcompare")])
|
||||
|
||||
(define_insn ""
|
||||
[(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")
|
||||
|
@ -6986,9 +6920,7 @@ byte_xor_operation:
|
|||
;; 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
|
||||
;; with one operand a conversion, and the third the same insn but with
|
||||
;; the other operand a conversion. The conversion may be SFmode or
|
||||
;; SImode if the target mode DFmode, but only SImode if the target mode
|
||||
;; is SFmode.
|
||||
;; the other operand a conversion.
|
||||
|
||||
(define_insn ""
|
||||
[(set (match_operand:DF 0 "register_operand" "=f,f")
|
||||
|
@ -7007,23 +6939,6 @@ byte_xor_operation:
|
|||
)
|
||||
)])
|
||||
|
||||
(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")
|
||||
(match_operator:XF 3 "binary_387_op"
|
||||
|
@ -7041,23 +6956,6 @@ byte_xor_operation:
|
|||
)
|
||||
)])
|
||||
|
||||
(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")
|
||||
(match_operator:XF 3 "binary_387_op"
|
||||
|
@ -7075,23 +6973,6 @@ byte_xor_operation:
|
|||
)
|
||||
)])
|
||||
|
||||
(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")
|
||||
(match_operator:XF 3 "binary_387_op"
|
||||
|
@ -7127,23 +7008,6 @@ byte_xor_operation:
|
|||
)
|
||||
)])
|
||||
|
||||
(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")
|
||||
(match_operator:DF 3 "binary_387_op"
|
||||
|
@ -7178,40 +7042,6 @@ byte_xor_operation:
|
|||
(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"
|
||||
[(parallel [(set (match_dup 4)
|
||||
|
|
Loading…
Reference in New Issue