Bug 21303 - [powerpc] objdump doesn't show e200z4 specific instructions
Summary: [powerpc] objdump doesn't show e200z4 specific instructions
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.28
: P2 normal
Target Milestone: 2.29
Assignee: Alan Modra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-24 12:43 UTC by Alexander Fedotov
Modified: 2017-03-28 23:58 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed: 2017-03-26 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Fedotov 2017-03-24 12:43:44 UTC
Hi

Assembling simple file with only following lines:
e_li   0, 0
lbdcbx 0, 1, 2
lhdcbx 0, 1, 2
lwdcbx 0, 1, 2
./powerpc-eabivle-as  -me200z4  e200z4.s -o e200z4.o
and disassembling it back gives me:
./powerpc-eabivle-objdump -dS -Me200z4 e200z4.o > e200z4.dis
00000000 <.text>:
   0:	70 00 00 00 	e_li    r0,0
   4:	7c 01 14 04 	.long 0x7c011404
   8:	7c 01 14 44 	.long 0x7c011444
   c:	7c 01 14 84 	.long 0x7c011484

But when I commented line with e_li insn and repeated assemble-disassemble I got correct result:
00000000 <.text>:
   0:	7c 01 14 04 	lbdcbx  r0,r1,r2
   4:	7c 01 14 44 	lhdcbx  r0,r1,r2
   8:	7c 01 14 84 	lwdcbx  r0,r1,r2


Any ideas ?
Comment 1 Alan Modra 2017-03-26 08:58:25 UTC
Easy.  It's the fact that the "e200z4" entry in ppc_opts[] has PPC_OPCODE_VLE in .sticky.  I'll apply a fix after some quick testing.
Comment 2 cvs-commit@gcc.gnu.org 2017-03-27 11:23:57 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9b7539374617a94c2d646f49e1bbfc954b11891d

commit 9b7539374617a94c2d646f49e1bbfc954b11891d
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Mar 27 08:19:48 2017 +1030

    PR21303, objdump doesn't show e200z4 insns
    
    	PR 21303
    opcodes/
    	* ppc-dis.c (struct ppc_mopt): Comment.
    	(ppc_opts <e200z4>): Move PPC_OPCODE_VLE from .sticky to .cpu.
    gas/
    	* testsuite/gas/ppc/pr21303.d,
    	* testsuite/gas/ppc/pr21303.s: New test
    	* testsuite/gas/ppc/ppc.exp: Run it.
Comment 3 cvs-commit@gcc.gnu.org 2017-03-27 21:52:14 UTC
The binutils-2_28-branch branch has been updated by Alan Modra <amodra@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=95afaad6b0419b5de31a7759c8c37485b7dd78ff

commit 95afaad6b0419b5de31a7759c8c37485b7dd78ff
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Mar 27 08:19:48 2017 +1030

    PR21303, objdump doesn't show e200z4 insns
    
    	PR 21303
    opcodes/
    	* ppc-dis.c (struct ppc_mopt): Comment.
    	(ppc_opts <e200z4>): Move PPC_OPCODE_VLE from .sticky to .cpu.
    gas/
    	* testsuite/gas/ppc/pr21303.d,
    	* testsuite/gas/ppc/pr21303.s: New test
    	* testsuite/gas/ppc/ppc.exp: Run it.
Comment 4 Alan Modra 2017-03-28 23:58:12 UTC
Fixed.