summaryrefslogtreecommitdiff
path: root/gcc/config/sh/sh.md
diff options
context:
space:
mode:
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-25 13:44:00 +0000
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-25 13:44:00 +0000
commitbc1c54209ff80e00c5c5870eba988d3a32d3bbee (patch)
treee7d1092da69cec2fe7ccfc962bbdc1439a0678b8 /gcc/config/sh/sh.md
parent5897d9f3235c5b0a284d4b1d708e35323ddc29d1 (diff)
downloadgcc-bc1c54209ff80e00c5c5870eba988d3a32d3bbee.tar.gz
* config/sh/constraints.md (Pso, Psz): New constraints.
* config/sh/sh.c (print_operand): Add %V and %W operand codes. * config/sh/sh.md (*andsi3_bclr, *iorsi3_bset): New insns. * gcc.target/sh/sh2a-bclr.c: New test. * gcc.target/sh/sh2a-bset.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133518 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sh/sh.md')
-rw-r--r--gcc/config/sh/sh.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 61e902563ef..f62b3b9594a 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -3170,6 +3170,14 @@ label:
andi %1, %2, %0"
[(set_attr "type" "arith_media")])
+(define_insn "*andsi3_bclr"
+ [(set (match_operand:SI 0 "arith_reg_dest" "=r")
+ (and:SI (match_operand:SI 1 "arith_reg_operand" "%0")
+ (match_operand:SI 2 "const_int_operand" "Psz")))]
+ "TARGET_SH2A && satisfies_constraint_Psz (operands[2])"
+ "bclr\\t%W2,%0"
+ [(set_attr "type" "arith")])
+
;; If the constant is 255, then emit an extu.b instruction instead of an
;; and, since that will give better code.
@@ -3252,6 +3260,14 @@ label:
ori %1, %2, %0"
[(set_attr "type" "arith_media")])
+(define_insn "*iorsi3_bset"
+ [(set (match_operand:SI 0 "arith_reg_dest" "=r")
+ (ior:SI (match_operand:SI 1 "arith_reg_operand" "%0")
+ (match_operand:SI 2 "const_int_operand" "Pso")))]
+ "TARGET_SH2A && satisfies_constraint_Pso (operands[2])"
+ "bset\\t%V2,%0"
+ [(set_attr "type" "arith")])
+
(define_insn "iordi3"
[(set (match_operand:DI 0 "arith_reg_dest" "=r,r")
(ior:DI (match_operand:DI 1 "arith_reg_operand" "%r,r")