This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Patch: disassemble moxie addresses
- From: Anthony Green <green at moxielogic dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 10 Jun 2009 02:09:27 -0400
- Subject: Re: Patch: disassemble moxie addresses
- References: <1244293342.29640.24.camel@localhost.localdomain>
On Sat, 2009-06-06 at 09:02 -0400, Anthony Green wrote:
> The moxie disassembler currently doesn't print memory addresses any
> different from random immediate data. For instance, today we see code
> like...
>
> 1158: 03 00 00 00 jsra 0x1358
> 115c: 13 58
>
> ..which is annoying since we have to find 1358 to know that we're
> calling free().
>
> This patch changes the disassembler to make use of
> info->print_address_func. Now we get disassemblies like this:
>
> 1158: 03 00 00 00 jsra 1358 <free>
> 115c: 13 58
>
> In order to do this I had to recode a number of opcodes from MOXIE_F1_4
> to the new MOXIE_F1_M tag, which means "form 1 instruction with a 4-byte
> memory address".
>
> I'm checking this change in.
>
> Thanks,
>
> AG
>
Here's the corresponding gas patch that I've just committed.
2009-06-10 Anthony Green <green@moxielogic.com>
* config/tc-moxie.c (md_assemble): Handle MOXIE_F1_M encoded
opcodes.
Index: gas/config/tc-moxie.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-moxie.c,v
retrieving revision 1.1
diff -u -r1.1 tc-moxie.c
--- gas/config/tc-moxie.c 16 Apr 2009 15:39:44 -0000 1.1
+++ gas/config/tc-moxie.c 10 Jun 2009 06:06:56 -0000
@@ -259,6 +259,7 @@
BFD_RELOC_32);
}
break;
+ case MOXIE_F1_M:
case MOXIE_F1_4:
iword = opcode->opcode << 8;
while (ISSPACE (*op_end))