h8300-protos.h: Add a prototype for gtle_operator.
* config/h8300/h8300-protos.h: Add a prototype for gtle_operator. * config/h8300/h8300.c (gtle_operator): New. * config/h8300/h8300.h (PREDICATE_CODES): Add an entry for gtle_operator. * config/h8300/h8300.md (a peephole2): Generalize to accept GT and LE. From-SVN: r65192
This commit is contained in:
parent
378683cf62
commit
9a2dd2dd02
@ -1,3 +1,13 @@
|
||||
2003-04-02 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* config/h8300/h8300-protos.h: Add a prototype for
|
||||
gtle_operator.
|
||||
* config/h8300/h8300.c (gtle_operator): New.
|
||||
* config/h8300/h8300.h (PREDICATE_CODES): Add an entry for
|
||||
gtle_operator.
|
||||
* config/h8300/h8300.md (a peephole2): Generalize to accept GT
|
||||
and LE.
|
||||
|
||||
2003-04-02 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* libgcc-std.ver (_Unwind_GetCFA): New.
|
||||
|
@ -68,6 +68,7 @@ extern int incdec_operand PARAMS ((rtx, enum machine_mode));
|
||||
extern int bit_operator PARAMS ((rtx, enum machine_mode));
|
||||
extern int nshift_operator PARAMS ((rtx, enum machine_mode));
|
||||
extern int eqne_operator PARAMS ((rtx, enum machine_mode));
|
||||
extern int gtle_operator PARAMS ((rtx, enum machine_mode));
|
||||
extern int gtuleu_operator PARAMS ((rtx, enum machine_mode));
|
||||
extern int iorxor_operator PARAMS ((rtx, enum machine_mode));
|
||||
|
||||
|
@ -1912,6 +1912,18 @@ eqne_operator (x, mode)
|
||||
return (code == EQ || code == NE);
|
||||
}
|
||||
|
||||
/* Return nonzero if X is GT, LE, GTU, or LEU. */
|
||||
|
||||
int
|
||||
gtle_operator (x, mode)
|
||||
rtx x;
|
||||
enum machine_mode mode ATTRIBUTE_UNUSED;
|
||||
{
|
||||
enum rtx_code code = GET_CODE (x);
|
||||
|
||||
return (code == GT || code == LE || code == GTU || code == LEU);
|
||||
}
|
||||
|
||||
/* Return nonzero if X is either GTU or LEU. */
|
||||
|
||||
int
|
||||
|
@ -1292,6 +1292,7 @@ struct cum_arg
|
||||
{"bit_operator", {XOR, AND, IOR}}, \
|
||||
{"nshift_operator", {ASHIFTRT, LSHIFTRT, ASHIFT}}, \
|
||||
{"eqne_operator", {EQ, NE}}, \
|
||||
{"gtle_operator", {GT, LE, GTU, LEU}}, \
|
||||
{"gtuleu_operator", {GTU, LEU}}, \
|
||||
{"iorxor_operator", {IOR, XOR}},
|
||||
|
||||
|
@ -4324,7 +4324,7 @@
|
||||
(compare (match_operand:SI 0 "register_operand" "")
|
||||
(match_operand:SI 1 "const_int_operand" "")))
|
||||
(set (pc)
|
||||
(if_then_else (match_operator 2 "gtuleu_operator"
|
||||
(if_then_else (match_operator 2 "gtle_operator"
|
||||
[(cc0) (const_int 0)])
|
||||
(label_ref (match_operand 3 "" ""))
|
||||
(pc)))]
|
||||
@ -4346,9 +4346,18 @@
|
||||
(if_then_else (match_dup 4)
|
||||
(label_ref (match_dup 3))
|
||||
(pc)))]
|
||||
"operands[4] = ((GET_CODE (operands[2]) == GTU) ?
|
||||
gen_rtx_NE (VOIDmode, cc0_rtx, const0_rtx) :
|
||||
gen_rtx_EQ (VOIDmode, cc0_rtx, const0_rtx));
|
||||
"switch (GET_CODE (operands[2]))
|
||||
{
|
||||
case GTU:
|
||||
operands[4] = gen_rtx_NE (VOIDmode, cc0_rtx, const0_rtx);
|
||||
break;
|
||||
case LEU:
|
||||
operands[4] = gen_rtx_EQ (VOIDmode, cc0_rtx, const0_rtx);
|
||||
break;
|
||||
default:
|
||||
operands[4] = operands[2];
|
||||
break;
|
||||
}
|
||||
operands[5] = GEN_INT (~INTVAL (operands[1]));")
|
||||
|
||||
;; Transform A <= 65535 to (A & 0xffff0000) == 0.
|
||||
|
Loading…
Reference in New Issue
Block a user