aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorPeter Bergner <bergner@linux.ibm.com>2022-11-08 17:41:52 -0600
committerPeter Bergner <bergner@linux.ibm.com>2022-12-07 11:47:16 -0600
commit51b52f4aded095af5722ecc5c0c5f4fde1bcf7aa (patch)
treefa1ec7e3ed0505185e8aeba6cc78248dc01b91af /gas
parenta60038c648d15fcb4bb91772433ea5e668cdf87d (diff)
downloadfsf-binutils-gdb-51b52f4aded095af5722ecc5c0c5f4fde1bcf7aa.zip
fsf-binutils-gdb-51b52f4aded095af5722ecc5c0c5f4fde1bcf7aa.tar.gz
fsf-binutils-gdb-51b52f4aded095af5722ecc5c0c5f4fde1bcf7aa.tar.bz2
PowerPC: Add support for RFC02655 - Saturating Subtract Instruction
opcodes/ * ppc-opc.c (XOL): New define. (XOL_MASK): Likewise. (powerpc_opcodes): Add subfus, subfus., subwus, subwus., subdus, subdus. gas/ * testsuite/gas/ppc/rfc02655.s: New test. * testsuite/gas/ppc/rfc02655.d: Likewise * testsuite/gas/ppc/future-raw.s: Likewise. * testsuite/gas/ppc/future-raw.d: Likewise. * testsuite/gas/ppc/ppc.exp: Run them.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/ppc/future-raw.d15
-rw-r--r--gas/testsuite/gas/ppc/future-raw.s6
-rw-r--r--gas/testsuite/gas/ppc/ppc.exp2
-rw-r--r--gas/testsuite/gas/ppc/rfc02655.d19
-rw-r--r--gas/testsuite/gas/ppc/rfc02655.s10
5 files changed, 52 insertions, 0 deletions
diff --git a/gas/testsuite/gas/ppc/future-raw.d b/gas/testsuite/gas/ppc/future-raw.d
new file mode 100644
index 0000000..c6e71a6
--- /dev/null
+++ b/gas/testsuite/gas/ppc/future-raw.d
@@ -0,0 +1,15 @@
+#as: -mfuture
+#objdump: -dr -Mfuture -Mraw
+#name: Future tests - raw disassembly
+
+.*
+
+
+Disassembly of section \.text:
+
+0+0 <_start>:
+.*: (90 58 4c 7d|7d 4c 58 90) subfus r10,0,r12,r11
+.*: (91 58 4c 7d|7d 4c 58 91) subfus\. r10,0,r12,r11
+.*: (90 ac 96 7e|7e 96 ac 90) subfus r20,1,r22,r21
+.*: (91 ac 96 7e|7e 96 ac 91) subfus\. r20,1,r22,r21
+#pass
diff --git a/gas/testsuite/gas/ppc/future-raw.s b/gas/testsuite/gas/ppc/future-raw.s
new file mode 100644
index 0000000..578b0ce
--- /dev/null
+++ b/gas/testsuite/gas/ppc/future-raw.s
@@ -0,0 +1,6 @@
+ .text
+_start:
+ subwus 10,11,12
+ subwus. 10,11,12
+ subdus 20,21,22
+ subdus. 20,21,22
diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp
index 3c593ec..af890de 100644
--- a/gas/testsuite/gas/ppc/ppc.exp
+++ b/gas/testsuite/gas/ppc/ppc.exp
@@ -146,8 +146,10 @@ run_dump_test "scalarquad"
run_dump_test "rop"
run_dump_test "rop-checks"
run_dump_test "rfc02653"
+run_dump_test "rfc02655"
run_dump_test "rfc02656"
run_dump_test "rfc02658"
+run_dump_test "future-raw"
run_dump_test "dcbt"
run_dump_test "pr27676"
diff --git a/gas/testsuite/gas/ppc/rfc02655.d b/gas/testsuite/gas/ppc/rfc02655.d
new file mode 100644
index 0000000..3a1d008
--- /dev/null
+++ b/gas/testsuite/gas/ppc/rfc02655.d
@@ -0,0 +1,19 @@
+#as: -mfuture
+#objdump: -dr -Mfuture
+#name: RFC02655 tests
+
+.*
+
+
+Disassembly of section \.text:
+
+0+0 <_start>:
+.*: (90 58 4c 7d|7d 4c 58 90) subwus r10,r11,r12
+.*: (90 58 4c 7d|7d 4c 58 90) subwus r10,r11,r12
+.*: (91 58 4c 7d|7d 4c 58 91) subwus\. r10,r11,r12
+.*: (91 58 4c 7d|7d 4c 58 91) subwus\. r10,r11,r12
+.*: (90 ac 96 7e|7e 96 ac 90) subdus r20,r21,r22
+.*: (90 ac 96 7e|7e 96 ac 90) subdus r20,r21,r22
+.*: (91 ac 96 7e|7e 96 ac 91) subdus\. r20,r21,r22
+.*: (91 ac 96 7e|7e 96 ac 91) subdus\. r20,r21,r22
+#pass
diff --git a/gas/testsuite/gas/ppc/rfc02655.s b/gas/testsuite/gas/ppc/rfc02655.s
new file mode 100644
index 0000000..b80c34e
--- /dev/null
+++ b/gas/testsuite/gas/ppc/rfc02655.s
@@ -0,0 +1,10 @@
+ .text
+_start:
+ subfus 10,0,12,11
+ subwus 10,11,12
+ subfus. 10,0,12,11
+ subwus. 10,11,12
+ subfus 20,1,22,21
+ subdus 20,21,22
+ subfus. 20,1,22,21
+ subdus. 20,21,22