This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH]: Fix 68HC1x assembler


Hi!

The following patch fixes two bugs in the 68hc1x gas.  I've made a mistake
in the call to frag_var causing the relaxing part being split in some rare
cases.  The second bug was a miss acceptation of some 68hc12 operands.

The patch also updates gas/NEWS to mention the new port.

Can you integrate this patch?

Thanks,
	Stephane

ChangeLog for gas/ChangeLog

2000-08-07  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.
diff -Nrup --exclude-from=cvs-exclude.lst /src/gnu/cygnus/binutils/gas/NEWS binutils/gas/NEWS
--- /src/gnu/cygnus/binutils/gas/NEWS	Sun Jun 25 11:20:21 2000
+++ binutils/gas/NEWS	Mon Jul 24 11:18:43 2000
@@ -2,6 +2,8 @@
 
 Changes in 2.11:
 
+Support for Motorola 68HC11 and 68HC12.
+
 Support for Texas Instruments TMS320C54x (tic54x).
 
 Support for IA-64.
diff -Nrup --exclude-from=cvs-exclude.lst /src/gnu/cygnus/binutils/gas/config/tc-m68hc11.c binutils/gas/config/tc-m68hc11.c
--- /src/gnu/cygnus/binutils/gas/config/tc-m68hc11.c	Sat Jul 22 10:45:36 2000
+++ binutils/gas/config/tc-m68hc11.c	Sun Jul 23 13:40:05 2000
@@ -1018,6 +1018,7 @@ get_operand (oper, which, opmode)
 		}
 	      p++;
 	    }
+          
 	  input_line_pointer = p;
 
 	  oper->reg2 = reg;
@@ -1495,7 +1496,7 @@ build_jump_insn (opcode, operands, nb_op
 	  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);
 	}
@@ -2051,6 +2052,11 @@ find (opc, operands, nb_operands)
 		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_IDX
+		  && operands[i].reg2 != REG_NONE)
 		{
 		  continue;
 		}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]