diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2003-02-28 13:34:31 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2003-02-28 13:34:31 +0000 |
commit | 3c0423169e9667a77a8d0e69a6bc98875da5f4ba (patch) | |
tree | 3be1f9f794487ca4fdefd6d47eb2bf96a180ddfc /gcc | |
parent | 4480b3dcf640e952085da75f887d7392c5afc994 (diff) | |
download | gcc-3c0423169e9667a77a8d0e69a6bc98875da5f4ba.zip gcc-3c0423169e9667a77a8d0e69a6bc98875da5f4ba.tar.gz gcc-3c0423169e9667a77a8d0e69a6bc98875da5f4ba.tar.bz2 |
h8300.md (*tst_extzv_bitqi_1_n): Accept the test of bit 7.
* config/h8300/h8300.md (*tst_extzv_bitqi_1_n): Accept the
test of bit 7.
(*tst_extzv_memqi_1_n): Likewise.
(a peephole2): New.
From-SVN: r63558
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.md | 27 |
2 files changed, 30 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 24dbd2d..a4f86aa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-02-28 Kazu Hirata <kazu@cs.umass.edu> + + * config/h8300/h8300.md (*tst_extzv_bitqi_1_n): Accept the + test of bit 7. + (*tst_extzv_memqi_1_n): Likewise. + (a peephole2): New. + 2002-02-28 Richard Sandiford <rsandifo@redhat.com> * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Wrap in diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index beb4534..162b9a3 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -592,8 +592,7 @@ [(set (cc0) (zero_extract:SI (match_operand:QI 0 "bit_operand" "r,U") (const_int 1) (match_operand 1 "const_int_operand" "n,n")))] - "(TARGET_H8300H || TARGET_H8300S) - && INTVAL (operands[1]) != 7" + "(TARGET_H8300H || TARGET_H8300S)" "btst %Z1,%Y0" [(set_attr "length" "2,8") (set_attr "cc" "set_zn,set_zn")]) @@ -604,8 +603,7 @@ (match_operand 1 "const_int_operand" "n"))) (clobber (match_scratch:QI 2 "=&r"))] "(TARGET_H8300H || TARGET_H8300S) - && !EXTRA_CONSTRAINT (operands[0], 'U') - && INTVAL (operands[1]) != 7" + && !EXTRA_CONSTRAINT (operands[0], 'U')" "#" "&& reload_completed" [(set (match_dup 2) @@ -3514,6 +3512,27 @@ (pc)))] "") +(define_peephole2 + [(set (cc0) + (zero_extract:SI (match_operand:QI 0 "register_operand" "") + (const_int 1) + (const_int 7))) + (set (pc) + (if_then_else (match_operator 1 "eqne_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 2 "" "")) + (pc)))] + "(TARGET_H8300H || TARGET_H8300S)" + [(set (cc0) + (match_dup 0)) + (set (pc) + (if_then_else (match_op_dup 3 [(cc0) (const_int 0)]) + (label_ref (match_dup 2)) + (pc)))] + "operands[3] = ((GET_CODE (operands[1]) == EQ) + ? gen_rtx_GE (VOIDmode, cc0_rtx, const0_rtx) + : gen_rtx_LT (VOIDmode, cc0_rtx, const0_rtx));") + ;; (compare (reg:SI) (const_int)) takes 6 bytes, so we try to achieve ;; the equivalent with shorter sequences. Here is the summary. Cases ;; are grouped for each define_peephole2. |