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]

Re: m68k gas bug with bsr or bra and absolute address


On Sat, Oct 13, 2001 at 06:03:11PM -0500, Andrew Pines wrote:
> 
> In both cases the replacement opcode appears to have the wrong mode
> set.  They should both be 111, but are both actually 110.  The proper
> values would be 0x4ef9 and 0x4eb9, respectively.

Thanks.  I'm applying the following to fix this.

gas/ChangeLog
	* config/tc-m68k.c (m68k_ip): Correct absolute jmp opcodes.

-- 
Alan Modra

Index: gas/config/tc-m68k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68k.c,v
retrieving revision 1.31
diff -u -p -r1.31 tc-m68k.c
--- tc-m68k.c	2001/09/19 05:33:25	1.31
+++ tc-m68k.c	2001/10/16 14:23:30
@@ -2573,14 +2573,14 @@ m68k_ip (instring)
 	      if (adds (&opP->disp) == 0)
 		{
 		  if (the_ins.opcode[0] == 0x6000)	/* jbra */
-		    the_ins.opcode[0] = 0x4EF1;
+		    the_ins.opcode[0] = 0x4EF9;
 		  else if (the_ins.opcode[0] == 0x6100)	/* jbsr */
-		    the_ins.opcode[0] = 0x4EB1;
+		    the_ins.opcode[0] = 0x4EB9;
 		  else					/* jCC */
 		    {
 		      the_ins.opcode[0] ^= 0x0100;
 		      the_ins.opcode[0] |= 0x0006;
-		      addword (0x4EF1);
+		      addword (0x4EF9);
 		    }
 		  add_fix ('l', &opP->disp, 0, 0);
 		  addword (0);


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