]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
h8300.c (compute_a_shift_length): Fix the insn length computation when xor.l is output.
authorKazu Hirata <kazu@cs.umass.edu>
Fri, 22 Nov 2002 14:16:12 +0000 (14:16 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Fri, 22 Nov 2002 14:16:12 +0000 (14:16 +0000)
* config/h8300/h8300.c (compute_a_shift_length): Fix the insn
length computation when xor.l is output.

From-SVN: r59376

gcc/ChangeLog
gcc/config/h8300/h8300.c

index c88988dbf213734c0711e0847e5a8f9eec99bbe4..e6b918fed55069c70b7c43d4b9a3b3ef75e1110b 100644 (file)
@@ -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
index 607259bc9d4136bf4aa411ec0e784e49cff32b6c..b4d40fde754406eddd86a1ca412e96174201b303 100644 (file)
@@ -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: