aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@hxi.com>2002-02-09 21:49:23 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2002-02-09 21:49:23 +0000
commit6dfa4005a20fa09d0934dcb807ef2e24792468d2 (patch)
treeb7065979d79fe72e7026a1f3762cdcf6e2bb1fad
parent3611ccb484812b9fbe009d5127b055b10f139caf (diff)
downloadgcc-6dfa4005a20fa09d0934dcb807ef2e24792468d2.zip
gcc-6dfa4005a20fa09d0934dcb807ef2e24792468d2.tar.gz
gcc-6dfa4005a20fa09d0934dcb807ef2e24792468d2.tar.bz2
h8300.c (output_logical_op): Use sub.w to clear a half of an SImode register on H8/300.
* config/h8300/h8300.c (output_logical_op): Use sub.w to clear a half of an SImode register on H8/300. From-SVN: r49648
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/h8300/h8300.c10
2 files changed, 9 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index eddba93..2a6fbe9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-09 Kazu Hirata <kazu@hxi.com>
+
+ * config/h8300/h8300.c (output_logical_op): Use sub.w to clear
+ a half of an SImode register on H8/300.
+
Sat Feb 9 18:28:02 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.md (movdi_2): Add missing '!'.
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index f861290..517176d 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -1567,9 +1567,8 @@ output_logical_op (mode, code, operands)
1) the special insn (in case of AND or XOR),
2) the word-wise insn, and
3) The byte-wise insn. */
- if ((TARGET_H8300H || TARGET_H8300S)
- && ((det & 0x0000ffff) == 0x0000ffff)
- && code != IOR)
+ if ((det & 0x0000ffff) == 0x0000ffff
+ && (TARGET_H8300 ? (code == AND) : (code != IOR)))
output_asm_insn ((code == AND)
? "sub.w\t%f0,%f0" : "not.w\t%f0",
operands);
@@ -1594,9 +1593,8 @@ output_logical_op (mode, code, operands)
}
}
- if ((TARGET_H8300H || TARGET_H8300S)
- && ((det & 0xffff0000) == 0xffff0000)
- && code != IOR)
+ if ((det & 0xffff0000) == 0xffff0000
+ && (TARGET_H8300 ? (code == AND) : (code != IOR)))
output_asm_insn ((code == AND)
? "sub.w\t%e0,%e0" : "not.w\t%e0",
operands);