aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-10-13 16:10:15 +1030
committerAlan Modra <amodra@gmail.com>2022-10-14 22:07:18 +1030
commit5abb5d3f67d6469cbb21978df09187f1ae93f5ea (patch)
tree51c95396255e9c45b881db9eec885112fd1058fd /gas
parent61a457e5da46bad626bc3b6985a58fb5ae41842d (diff)
downloadgdb-5abb5d3f67d6469cbb21978df09187f1ae93f5ea.zip
gdb-5abb5d3f67d6469cbb21978df09187f1ae93f5ea.tar.gz
gdb-5abb5d3f67d6469cbb21978df09187f1ae93f5ea.tar.bz2
PowerPC SPE disassembly and tests
Where sub and subf forms of an instruction exist we generally disassemble to the extended insn sub form rather than the underlying machine subf instruction. Do so for SPE evsubw and evsubiw too. spe_ambiguous.d always was a bit too optimistic. There is no sensible way to disassemble identical bytes back to different and original source. Instead change the test to check -Mraw results. gas/ * testsuite/gas/ppc/ppc.exp: Run spe_ambiguous test. * testsuite/gas/ppc/spe.d: Expect evsubw and evsubiw rather than evsubfw and evsubifw. * testsuite/gas/ppc/spe_ambiguous.s: Test evnor form equivalent to evnot. * testsuite/gas/ppc/spe_ambiguous.d: Test Mraw. opcodes/ * ppc-opc.c (powerpc_opcodes): Move evsubw before evsubfw and evsubiw before evsubifw and mark EXT.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/ppc/ppc.exp3
-rw-r--r--gas/testsuite/gas/ppc/spe.d8
-rw-r--r--gas/testsuite/gas/ppc/spe_ambiguous.d12
-rw-r--r--gas/testsuite/gas/ppc/spe_ambiguous.s2
4 files changed, 11 insertions, 14 deletions
diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp
index 9a18ce2..1bfd375 100644
--- a/gas/testsuite/gas/ppc/ppc.exp
+++ b/gas/testsuite/gas/ppc/ppc.exp
@@ -94,10 +94,7 @@ run_dump_test "efs2"
run_dump_test "spe2"
run_dump_test "spe2-checks"
run_dump_test "spe"
-
-setup_xfail "*-*-*"
run_dump_test "spe_ambiguous"
-
run_dump_test "altivec"
run_dump_test "altivec2"
run_dump_test "altivec3"
diff --git a/gas/testsuite/gas/ppc/spe.d b/gas/testsuite/gas/ppc/spe.d
index 958bdf1..7429879 100644
--- a/gas/testsuite/gas/ppc/spe.d
+++ b/gas/testsuite/gas/ppc/spe.d
@@ -10,10 +10,10 @@ Disassembly of section .text:
00000000 <.text>:
.*: 10 01 12 00 evaddw r0,r1,r2
.*: 10 1f 12 02 evaddiw r0,r2,31
-.*: 10 01 12 04 evsubfw r0,r1,r2
-.*: 10 01 12 04 evsubfw r0,r1,r2
-.*: 10 1f 12 06 evsubifw r0,31,r2
-.*: 10 1f 12 06 evsubifw r0,31,r2
+.*: 10 01 12 04 evsubw r0,r2,r1
+.*: 10 01 12 04 evsubw r0,r2,r1
+.*: 10 1f 12 06 evsubiw r0,r2,31
+.*: 10 1f 12 06 evsubiw r0,r2,31
.*: 10 01 02 08 evabs r0,r1
.*: 10 01 02 09 evneg r0,r1
.*: 10 01 02 0a evextsb r0,r1
diff --git a/gas/testsuite/gas/ppc/spe_ambiguous.d b/gas/testsuite/gas/ppc/spe_ambiguous.d
index 2e0b1d3..3cbbb1a 100644
--- a/gas/testsuite/gas/ppc/spe_ambiguous.d
+++ b/gas/testsuite/gas/ppc/spe_ambiguous.d
@@ -1,6 +1,6 @@
#as: -a32 -mbig -mvle
-#objdump: -d -Mspe
-#name: Validate SPE instructions
+#objdump: -d -Mspe -Mraw
+#name: Validate SPE raw instructions
.*: +file format elf.*-powerpc.*
@@ -8,8 +8,8 @@ Disassembly of section .text:
00000000 <.text>:
0: 10 01 12 04 evsubfw r0,r1,r2
- 4: 10 01 12 04 evsubw r0,r2,r1
+ 4: 10 01 12 04 evsubfw r0,r1,r2
8: 10 1f 12 06 evsubifw r0,31,r2
- c: 10 1f 12 06 evsubiw r0,r2,31
- 10: 10 01 12 18 evnor r0,r1,r2
- 14: 10 01 0a 18 evnot r0,r1
+ c: 10 1f 12 06 evsubifw r0,31,r2
+ 10: 10 01 0a 18 evnor r0,r1,r1
+ 14: 10 01 0a 18 evnor r0,r1,r1
diff --git a/gas/testsuite/gas/ppc/spe_ambiguous.s b/gas/testsuite/gas/ppc/spe_ambiguous.s
index b60e02b..97de2eb 100644
--- a/gas/testsuite/gas/ppc/spe_ambiguous.s
+++ b/gas/testsuite/gas/ppc/spe_ambiguous.s
@@ -17,5 +17,5 @@
evsubw rS, rB, rA
evsubifw rS, UIMM, rB
evsubiw rS, rB, UIMM
- evnor rS, rA, rB
+ evnor rS, rA, rA
evnot rS, rA