diff options
author | Alan Modra <amodra@gmail.com> | 2022-10-14 12:28:33 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-10-16 13:54:50 +1030 |
commit | 45685a2fd86073e76a772c5b677f14f8465a5040 (patch) | |
tree | f7ddbaca363370fcdec5448d01896bcc744958e4 /gas/testsuite | |
parent | 206e9791cb09459bf92603428370c16bfde282ac (diff) | |
download | gdb-45685a2fd86073e76a772c5b677f14f8465a5040.zip gdb-45685a2fd86073e76a772c5b677f14f8465a5040.tar.gz gdb-45685a2fd86073e76a772c5b677f14f8465a5040.tar.bz2 |
PowerPC se_rfmci and VLE, SPE2 and LSP insns with -many
I noticed recently that se_rfmci, a VLE mode instruction, was being
accepted by non-VLE cpus, and also that se_rfmci by itself in a
section did not cause SHF_PPC_VLE to be set. ie. both testcases added
by this patch fail without the changes to tc-ppc.c here.
Also, VLE, SPE2 and LSP insns were not accepted by the assembler with
-many nor were SPE2 and LSP being disassembled with -Many.
gas/
* config/tc-ppc.c (ppc_setup_opcodes): Wrap long lines. Add
vle_opcodes when PPC_OPCODE_VLE or PPC_OPCODE_ANY. Simplify
disassembler index segment checks. Add LSP and SPE2 opcodes
when PPC_OPCODE_ANY too.
(md_assemble): Correct logic adding PPC_APUINFO_VLE and
SHF_PPC_VLE.
* testsuite/gas/ppc/se_rfmci.s
* testsuite/gas/ppc/se_rfmci.d,
* testsuite/gas/ppc/se_rfmci_bad.d: New tests.
* testsuite/gas/ppc/ppc.exp: Run them.
opcodes/
* ppc-dis.c (print_insn_powerpc): Disassemble SPE2 and LSP insn
when -Many.
* ppc-opc.c (vle_opcodes <se_rfmci>): Comment.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/ppc/ppc.exp | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/se_rfmci.d | 9 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/se_rfmci.s | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/se_rfmci_bad.d | 3 |
4 files changed, 15 insertions, 0 deletions
diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp index 1bfd375..ae8a7b6 100644 --- a/gas/testsuite/gas/ppc/ppc.exp +++ b/gas/testsuite/gas/ppc/ppc.exp @@ -87,6 +87,8 @@ run_dump_test "vle-simple-4" run_dump_test "vle-simple-5" run_dump_test "vle-simple-6" run_dump_test "vle-mult-ld-st-insns" +run_dump_test "se_rfmci" +run_dump_test "se_rfmci_bad" run_dump_test "lsp" run_dump_test "lsp-checks" run_dump_test "efs" diff --git a/gas/testsuite/gas/ppc/se_rfmci.d b/gas/testsuite/gas/ppc/se_rfmci.d new file mode 100644 index 0000000..f43afe3 --- /dev/null +++ b/gas/testsuite/gas/ppc/se_rfmci.d @@ -0,0 +1,9 @@ +#as: -a32 -mbig -mvle +#objdump: -d -Mvle + +.*: +file format elf.*-powerpc.* + +Disassembly of section \.text: + +0+00 <.*>: + 0: 00 0b se_rfmci diff --git a/gas/testsuite/gas/ppc/se_rfmci.s b/gas/testsuite/gas/ppc/se_rfmci.s new file mode 100644 index 0000000..fd8a479 --- /dev/null +++ b/gas/testsuite/gas/ppc/se_rfmci.s @@ -0,0 +1 @@ + se_rfmci diff --git a/gas/testsuite/gas/ppc/se_rfmci_bad.d b/gas/testsuite/gas/ppc/se_rfmci_bad.d new file mode 100644 index 0000000..134f2d8 --- /dev/null +++ b/gas/testsuite/gas/ppc/se_rfmci_bad.d @@ -0,0 +1,3 @@ +#source: se_rfmci.s +#as: -a32 -mbig -me500mc +#error: .*unrecognized opcode.* |