This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: m68k gas bug with bsr or bra and absolute address
- To: Andrew Pines <apines at cosmodog dot com>
- Subject: Re: m68k gas bug with bsr or bra and absolute address
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Tue, 16 Oct 2001 23:56:15 +0930
- Cc: bug-binutils at gnu dot org, binutils at sourceware dot cygnus dot com
- References: <3BC8C82F.C0211E89@cosmodog.com>
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);