This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: disassemble moxie addresses


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]