Make sure the 2 bytes of the jump address are in the same frag.
authorNick Clifton <nickc@redhat.com>
Tue, 8 Aug 2000 21:40:33 +0000 (21:40 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 8 Aug 2000 21:40:33 +0000 (21:40 +0000)
Accept 68hc12 register indirect modes.

Mention 68HC11 & 68HC12 support in NEWS.

gas/ChangeLog
gas/NEWS
gas/config/tc-m68hc11.c

index 12051edfc04306f38c3f7a8afc646849eb917c11..63909233bfa5bfc452b44b945ee5f22d2b483c79 100644 (file)
@@ -1,3 +1,11 @@
+2000-08-08  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
+
+       * config/tc-m68hc11.c (build_jump_insn): Make sure the
+       2 bytes of the jump address are in the same frag.
+       (find): Accept 68hc12 register indirect modes.
+
+       * NEWS: Mention 68HC11 & 68HC12 support.
+       
 2000-08-07  Richard Henderson  <rth@cygnus.com>
 
        * config/tc-ia64.c (unwind): Add prologue_mask member.
index 61889be1196caa153eb084c06ba71baba0205d6c..baa179c3eced651523b366b72f8b0bab5f49696a 100644 (file)
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -2,6 +2,8 @@
 
 Changes in 2.11:
 
+Support for Motorola 68HC11 and 68HC12.
+
 Support for Texas Instruments TMS320C54x (tic54x).
 
 Support for IA-64.
index 0504b39d2d71f6fbe96d692982e55ea30bc34f2b..94b193ffe7d080615cd8417689adec32779d5a54 100644 (file)
@@ -1495,7 +1495,7 @@ build_jump_insn (opcode, operands, nb_operands, jmp_mode)
          opcode = m68hc11_new_insn (2);
          number_to_chars_bigendian (opcode, code, 1);
          number_to_chars_bigendian (opcode + 1, 0, 1);
-         frag_var (rs_machine_dependent, 1, 1,
+         frag_var (rs_machine_dependent, 2, 1,
                    ENCODE_RELAX (STATE_PC_RELATIVE, STATE_UNDF),
                    operands[0].exp.X_add_symbol, (offsetT) n, opcode);
        }
@@ -2046,20 +2046,28 @@ find (opc, operands, nb_operands)
            }
          if (mode & M6812_OP_REG)
            {
-             if (i == 0 && format & M6812_OP_REG
-                 && operands[i].reg2 == REG_NONE)
+             if (i == 0
+                 && (format & M6812_OP_REG)
+                 && (operands[i].reg2 == REG_NONE))
                continue;
-             if (i == 0 && format & M6812_OP_REG
-                 && format & M6812_OP_REG_2 && operands[i].reg2 != REG_NONE)
-               {
-                 continue;
-               }
-             if (i == 0 && format & M6812_OP_D_IDX)
+             if (i == 0
+                 && (format & M6812_OP_REG)
+                 && (format & M6812_OP_REG_2)
+                 && (operands[i].reg2 != REG_NONE))
                continue;
-             if (i == 0 && (format & M6812_OP_IDX)
+             if (i == 0
+                 && (format & M6812_OP_IDX)
+                 && (operands[i].reg2 != REG_NONE))
+               continue;
+             if (i == 0
+                 && (format & M6812_OP_D_IDX))
+               continue;
+             if (i == 0
+                 && (format & M6812_OP_IDX)
                  && (format & (M6812_OP_IND16_P2 | M6812_OP_IDX_P2)))
                continue;
-             if (i == 1 && format & M6812_OP_IDX_P2)
+             if (i == 1
+                 && (format & M6812_OP_IDX_P2))
                continue;
              break;
            }