[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
m68k gas bug with bsr or bra and absolute address
From: |
Andrew Pines |
Subject: |
m68k gas bug with bsr or bra and absolute address |
Date: |
Sat, 13 Oct 2001 18:03:11 -0500 |
as for m68k version 2.11.2 seems to have a bug relating to the bsr/bra
instructions with an absolute address. It replaces them with jsr and
jmp, respectively, but it appears to do it incorrectly. In
binutils-2.11.2/gas/config/tc-m68k.c, lines 2568-2578:
/* This could either be a symbol, or an absolute
address. If it's an absolute address, turn it into
an absolute jump right here and keep it out of the
relaxer. */
if (adds (&opP->disp) == 0)
{
if (the_ins.opcode[0] == 0x6000) /* jbra */
the_ins.opcode[0] = 0x4EF1;
else if (the_ins.opcode[0] == 0x6100) /* jbsr */
the_ins.opcode[0] = 0x4EB1;
else /* jCC */
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.
-Andrew
--
Andrew Pines
address@hidden
http://www.cosmodog.com
- m68k gas bug with bsr or bra and absolute address,
Andrew Pines <=