public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: m68k gas bug with bsr or bra and absolute address
       [not found] <3BC8C82F.C0211E89@cosmodog.com>
@ 2001-10-16  7:26 ` Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2001-10-16  7:26 UTC (permalink / raw)
  To: Andrew Pines; +Cc: bug-binutils, binutils

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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-16  7:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3BC8C82F.C0211E89@cosmodog.com>
2001-10-16  7:26 ` m68k gas bug with bsr or bra and absolute address Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).