From: Alan Modra Date: Sun, 26 Mar 2017 21:49:48 +0000 (+1030) Subject: PR21303, objdump doesn't show e200z4 insns X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b7539374617a94c2d646f49e1bbfc954b11891d;p=binutils-gdb.git PR21303, objdump doesn't show e200z4 insns PR 21303 opcodes/ * ppc-dis.c (struct ppc_mopt): Comment. (ppc_opts ): 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. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index c29d03ac64b..1ec3708f614 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2017-03-27 Alan Modra + + PR 21303 + * testsuite/gas/ppc/pr21303.d, + * testsuite/gas/ppc/pr21303.s: New test + * testsuite/gas/ppc/ppc.exp: Run it. + 2017-03-27 Rinat Zelig * testsuite/gas/arc/nps400-12.s: New file. diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp index 86db4553df3..55367adc088 100644 --- a/gas/testsuite/gas/ppc/ppc.exp +++ b/gas/testsuite/gas/ppc/ppc.exp @@ -50,6 +50,7 @@ if { [istarget powerpc*-*-*] } then { run_dump_test "common" run_dump_test "476" run_dump_test "a2" + run_dump_test "pr21303" if { ![istarget powerpc*le-*-*] } then { run_dump_test "vle" run_dump_test "vle-reloc" diff --git a/gas/testsuite/gas/ppc/pr21303.d b/gas/testsuite/gas/ppc/pr21303.d new file mode 100644 index 00000000000..64761a4d5de --- /dev/null +++ b/gas/testsuite/gas/ppc/pr21303.d @@ -0,0 +1,12 @@ +#objdump: -d -Me200z4 +#as: -a32 -mbig -me200z4 + +.* + +Disassembly of section \.text: + +0+ <\.text>: + 0: 70 00 00 00 e_li r0,0 + 4: 7c 01 14 04 lbdcbx r0,r1,r2 + 8: 7c 01 14 44 lhdcbx r0,r1,r2 + c: 7c 01 14 84 lwdcbx r0,r1,r2 diff --git a/gas/testsuite/gas/ppc/pr21303.s b/gas/testsuite/gas/ppc/pr21303.s new file mode 100644 index 00000000000..890ba94b089 --- /dev/null +++ b/gas/testsuite/gas/ppc/pr21303.s @@ -0,0 +1,5 @@ + .text + e_li 0, 0 + lbdcbx 0, 1, 2 + lhdcbx 0, 1, 2 + lwdcbx 0, 1, 2 diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 70625985a46..b6a2a5a1f89 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2017-03-27 Alan Modra + + PR 21303 + * ppc-dis.c (struct ppc_mopt): Comment. + (ppc_opts ): Move PPC_OPCODE_VLE from .sticky to .cpu. + 2017-03-27 Rinat Zelig * arc-nps400-tbl.h: Add Ultra Ip and Miscellaneous instructions format. diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c index ca50689b019..f3db0620956 100644 --- a/opcodes/ppc-dis.c +++ b/opcodes/ppc-dis.c @@ -46,8 +46,19 @@ struct dis_private (((struct dis_private *) ((INFO)->private_data))->dialect) struct ppc_mopt { + /* Option string, without -m or -M prefix. */ const char *opt; + /* CPU option flags. */ ppc_cpu_t cpu; + /* Flags that should stay on, even when combined with another cpu + option. This should only be used for generic options like + "-many" or "-maltivec" where it is reasonable to add some + capability to another cpu selection. The added flags are sticky + so that, for example, "-many -me500" and "-me500 -many" result in + the same assembler or disassembler behaviour. Do not use + "sticky" for specific cpus, as this will prevent that cpu's flags + from overriding the defaults set in powerpc_init_dialect or a + prior -m option. */ ppc_cpu_t sticky; }; @@ -109,8 +120,8 @@ struct ppc_mopt ppc_opts[] = { { "e200z4", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE| PPC_OPCODE_SPE | PPC_OPCODE_ISEL | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI - | PPC_OPCODE_E500 | PPC_OPCODE_E200Z4), - PPC_OPCODE_VLE }, + | PPC_OPCODE_E500 | PPC_OPCODE_VLE | PPC_OPCODE_E200Z4), + 0 }, { "e300", PPC_OPCODE_PPC | PPC_OPCODE_E300, 0 }, { "e500", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_SPE