diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2002-11-22 14:16:12 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2002-11-22 14:16:12 +0000 |
commit | 41c3eb5d451b5c045decbfa24426c595b7dbd0f4 (patch) | |
tree | 04c12012b7d819b86dcd83d3db373908795fcad5 | |
parent | c6d58c66821b943935eabb4f9d848a2cdd36abd0 (diff) | |
download | gcc-41c3eb5d451b5c045decbfa24426c595b7dbd0f4.zip gcc-41c3eb5d451b5c045decbfa24426c595b7dbd0f4.tar.gz gcc-41c3eb5d451b5c045decbfa24426c595b7dbd0f4.tar.bz2 |
h8300.c (compute_a_shift_length): Fix the insn length computation when xor.l is output.
* config/h8300/h8300.c (compute_a_shift_length): Fix the insn
length computation when xor.l is output.
From-SVN: r59376
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c88988d..e6b918f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-11-22 Kazu Hirata <kazu@cs.umass.edu> + + * config/h8300/h8300.c (compute_a_shift_length): Fix the insn + length computation when xor.l is output. + 2002-11-21 Jim Wilson <wilson@redhat.com> * config/rs6000/rs6000.c (function_arg): Set inner mode of SPE diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 607259b..b4d40fd 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -3096,6 +3096,14 @@ compute_a_shift_length (insn, operands) { case SHIFT_SPECIAL: wlength += h8300_asm_insn_count (info.special); + + /* Every assembly instruction used in SHIFT_SPECIAL case + takes 2 bytes except xor.l, which takes 4 bytes, so if we + see xor.l, we just pretend that xor.l counts as two insns + so that the insn length will be computed correctly. */ + if (strstr (info.special, "xor.l") != NULL) + wlength++; + /* Fall through. */ case SHIFT_INLINE: |