aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/h8300
diff options
context:
space:
mode:
authorKaushik Phatak <kaushik.phatak@kpitcummins.com>2010-04-16 18:19:50 +0000
committerJeff Law <law@gcc.gnu.org>2010-04-16 12:19:50 -0600
commit8cb81753ef6a152040f98464643f9fa5f5eff924 (patch)
tree64287aeb3ee87e9f756e73a1d60b1a5c9c310930 /gcc/config/h8300
parent4a81b412140496842501099dd5e7a00a95474a04 (diff)
downloadgcc-8cb81753ef6a152040f98464643f9fa5f5eff924.zip
gcc-8cb81753ef6a152040f98464643f9fa5f5eff924.tar.gz
gcc-8cb81753ef6a152040f98464643f9fa5f5eff924.tar.bz2
h8300.md (movqi_h8sx, [...]): Emit instructions in #xx:3 and #xx:4 mode.
* config/h8300/h8300.md (movqi_h8sx, movhi_h8sx, movsi_h8sx, cmphi_h8300hs_znvc, cmpsi, addhi3_h8sx) : Emit instructions in #xx:3 and #xx:4 mode. From-SVN: r158439
Diffstat (limited to 'gcc/config/h8300')
-rw-r--r--gcc/config/h8300/h8300.md44
1 files changed, 36 insertions, 8 deletions
diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md
index c35f2bb..289c339 100644
--- a/gcc/config/h8300/h8300.md
+++ b/gcc/config/h8300/h8300.md
@@ -222,7 +222,7 @@
(match_operand:QI 1 "general_operand_src" "P4>X,rQi"))]
"TARGET_H8300SX"
"@
- mov.b %X1,%X0
+ mov.b %X1:4,%X0
mov.b %X1,%X0"
[(set_attr "length_table" "mov_imm4,movb")
(set_attr "cc" "set_znv")])
@@ -300,8 +300,8 @@
"TARGET_H8300SX"
"@
sub.w %T0,%T0
- mov.w %T1,%T0
- mov.w %T1,%T0
+ mov.w %T1:3,%T0
+ mov.w %T1:4,%T0
mov.w %T1,%T0
mov.w %T1,%T0"
[(set_attr "length_table" "*,*,mov_imm4,short_immediate,movw")
@@ -511,7 +511,7 @@
"TARGET_H8300SX"
"@
sub.l %S0,%S0
- mov.l %S1,%S0
+ mov.l %S1:3,%S0
mov.l %S1,%S0
mov.l %S1,%S0
clrmac
@@ -1143,7 +1143,21 @@
(compare (match_operand:HI 0 "h8300_dst_operand" "rU,rQ")
(match_operand:HI 1 "h8300_src_operand" "P3>X,rQi")))]
"TARGET_H8300H || TARGET_H8300S"
- "cmp.w %T1,%T0"
+ "*
+{
+ switch (which_alternative)
+ {
+ case 0:
+ if (!TARGET_H8300SX)
+ return \"cmp.w %T1,%T0\";
+ else
+ return \"cmp.w %T1:3,%T0\";
+ case 1:
+ return \"cmp.w %T1,%T0\";
+ default:
+ gcc_unreachable ();
+ }
+}"
[(set_attr "length_table" "short_immediate,addw")
(set_attr "cc" "compare,compare")])
@@ -1152,7 +1166,21 @@
(compare (match_operand:SI 0 "h8300_dst_operand" "r,rQ")
(match_operand:SI 1 "h8300_src_operand" "P3>X,rQi")))]
"TARGET_H8300H || TARGET_H8300S"
- "cmp.l %S1,%S0"
+ "*
+{
+ switch (which_alternative)
+ {
+ case 0:
+ if (!TARGET_H8300SX)
+ return \"cmp.l %S1,%S0\";
+ else
+ return \"cmp.l %S1:3,%S0\";
+ case 1:
+ return \"cmp.l %S1,%S0\";
+ default:
+ gcc_unreachable ();
+ }
+}"
[(set_attr "length" "2,*")
(set_attr "length_table" "*,addl")
(set_attr "cc" "compare,compare")])
@@ -1259,8 +1287,8 @@
(match_operand:HI 2 "h8300_src_operand" "P3>X,P3<X,J,rQi")))]
"TARGET_H8300SX && h8300_operands_match_p (operands)"
"@
- add.w %T2,%T0
- sub.w %G2,%T0
+ add.w %T2:3,%T0
+ sub.w %G2:3,%T0
add.b %t2,%t0
add.w %T2,%T0"
[(set_attr "length_table" "short_immediate,short_immediate,*,addw")