aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-05-28 07:55:21 +0000
committerNick Clifton <nickc@redhat.com>2004-05-28 07:55:21 +0000
commit580b9172d22e2bb4fb7900000bc9897e04b295e0 (patch)
tree411fb804b5cd618d41d682c4160a9c8f402d86f6 /gas/config
parent164e712d71c3e73cf048b45615b8f3f2f1fc4b84 (diff)
downloadgdb-580b9172d22e2bb4fb7900000bc9897e04b295e0.zip
gdb-580b9172d22e2bb4fb7900000bc9897e04b295e0.tar.gz
gdb-580b9172d22e2bb4fb7900000bc9897e04b295e0.tar.bz2
Convert mode 5 addressing with zero offset into mode 2 addressing to save a
word.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-m68k.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index 2a5b479..69be532 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -2261,6 +2261,19 @@ m68k_ip (instring)
nextword = get_num (&opP->disp, 90);
+ /* Convert mode 5 addressing with a zero offset into
+ mode 2 addressing to reduce the instruction size by a
+ word. */
+ if (! isvar (&opP->disp)
+ && (nextword == 0)
+ && (opP->disp.size == SIZE_UNSPEC)
+ && (opP->reg >= ADDR0)
+ && (opP->reg <= ADDR7))
+ {
+ tmpreg = 0x10 + opP->reg - ADDR; /* 2.areg */
+ break;
+ }
+
if (opP->reg == PC
&& ! isvar (&opP->disp)
&& m68k_abspcadd)