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] S/390: Disassembler - pick instruction with most specific mask


On Fri, 24 Sep 2010 16:52:17 +0200
"Andreas Krebbel" <krebbel@linux.vnet.ibm.com> wrote:

> Hi,
> 
> currently the disassembler for S/390 always choses the most recent
> version of an instruction.  That way when a later machine adds an
> instruction with a new operand while using the same opcode objdump
> would show that new instruction even for old code.  Instead it should
> chose the instruction with the most specific mask for an opcode.
> 
> Implemented with the attached patch. 
> 
> No testsuite regressions.
> 
> Ok to apply? Would be cool if that patch could make it into 2.21.

Fine with me. In particular I like how the "bcr 0,%rx" instructions
now come out as "nopr %rx" in the disassembly:

> Index: src/gas/testsuite/gas/s390/esa-reloc.d
> ===================================================================
> --- src.orig/gas/testsuite/gas/s390/esa-reloc.d
> +++ src/gas/testsuite/gas/s390/esa-reloc.d
> @@ -48,4 +48,4 @@ Disassembly of section .text:
>  [ 	]*50: R_390_PLT16DBL	foo\+0x2
>    52:	00 00 00 00 [ 	]*.long	0x00000000
>  [ 	]*52: R_390_PLT32	foo\+0x4
> -  56:	07 07 [ 	]*bcr	0,%r7
> +  56:	07 07 [ 	]*nopr	%r7

That makes it more readable.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


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