aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorCui, Lili <lili.cui@intel.com>2023-12-28 01:06:41 +0000
committerCui, Lili <lili.cui@intel.com>2023-12-28 11:45:14 +0000
commitac32c879b26af580e29ecaa152e3d9d999f34caa (patch)
tree274bbb688eb74fc7a6ef96aed0a8df435dfa17db /gas/testsuite
parent08a98d4c1331cc726c8c76c14d9db34d6f0aadd6 (diff)
downloadgdb-ac32c879b26af580e29ecaa152e3d9d999f34caa.zip
gdb-ac32c879b26af580e29ecaa152e3d9d999f34caa.tar.gz
gdb-ac32c879b26af580e29ecaa152e3d9d999f34caa.tar.bz2
Support APX pushp/popp
gas/ChangeLog: * config/tc-i386.c (process_operands): Handle "PUSHP/POPP requires rex2.w == 1." * testsuite/gas/i386/x86-64.exp: Add new test for PUSHP/POPP. * testsuite/gas/i386/x86-64-apx-pushp-popp-intel.d: New test. * testsuite/gas/i386/x86-64-apx-pushp-popp-inval.l: Ditto. * testsuite/gas/i386/x86-64-apx-pushp-popp-inval.s: Ditto. * testsuite/gas/i386/x86-64-apx-pushp-popp.d: Ditto. * testsuite/gas/i386/x86-64-apx-pushp-popp.s: Ditto. opcodes/ChangeLog: * i386-dis.c (putop): print pushp and popp. * i386-opc.tbl: Added new insns. * i386-init.h : Regenerated. * i386-mnem.h : Regenerated. * i386-tbl.h: Regenerated.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-pushp-popp-intel.d14
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-pushp-popp-inval.l5
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-pushp-popp-inval.s7
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-pushp-popp.d14
-rw-r--r--gas/testsuite/gas/i386/x86-64-apx-pushp-popp.s8
-rw-r--r--gas/testsuite/gas/i386/x86-64.exp3
6 files changed, 51 insertions, 0 deletions
diff --git a/gas/testsuite/gas/i386/x86-64-apx-pushp-popp-intel.d b/gas/testsuite/gas/i386/x86-64-apx-pushp-popp-intel.d
new file mode 100644
index 0000000..44e3e96
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-apx-pushp-popp-intel.d
@@ -0,0 +1,14 @@
+#as:
+#objdump: -dw -Mintel
+#name: x86_64 APX_F pushp popp insns (Intel disassembly)
+#source: x86-64-apx-pushp-popp.s
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+ <_start>:
+\s*[a-f0-9]+:\s*d5 08 50[ ]+pushp rax
+\s*[a-f0-9]+:\s*d5 19 57[ ]+pushp r31
+\s*[a-f0-9]+:\s*d5 08 58[ ]+popp rax
+\s*[a-f0-9]+:\s*d5 19 5f[ ]+popp r31
diff --git a/gas/testsuite/gas/i386/x86-64-apx-pushp-popp-inval.l b/gas/testsuite/gas/i386/x86-64-apx-pushp-popp-inval.l
new file mode 100644
index 0000000..c4d774b
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-apx-pushp-popp-inval.l
@@ -0,0 +1,5 @@
+.* Assembler messages:
+.*:4: Error: operand size mismatch for `pushp'
+.*:5: Error: operand size mismatch for `popp'
+.*:6: Error: operand size mismatch for `pushp'
+.*:7: Error: operand size mismatch for `popp'
diff --git a/gas/testsuite/gas/i386/x86-64-apx-pushp-popp-inval.s b/gas/testsuite/gas/i386/x86-64-apx-pushp-popp-inval.s
new file mode 100644
index 0000000..28ed5d8
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-apx-pushp-popp-inval.s
@@ -0,0 +1,7 @@
+# Check bytecode of APX_F pushp popp instructions with illegal instructions.
+
+ .text
+ pushp %eax
+ popp %eax
+ pushp (%rax)
+ popp (%rax)
diff --git a/gas/testsuite/gas/i386/x86-64-apx-pushp-popp.d b/gas/testsuite/gas/i386/x86-64-apx-pushp-popp.d
new file mode 100644
index 0000000..b20e5ba
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-apx-pushp-popp.d
@@ -0,0 +1,14 @@
+#as:
+#objdump: -dw
+#name: x86_64 APX_F pushp popp insns
+#source: x86-64-apx-pushp-popp.s
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+ <_start>:
+\s*[a-f0-9]+:\s*d5 08 50[ ]+pushp %rax
+\s*[a-f0-9]+:\s*d5 19 57[ ]+pushp %r31
+\s*[a-f0-9]+:\s*d5 08 58[ ]+popp %rax
+\s*[a-f0-9]+:\s*d5 19 5f[ ]+popp %r31
diff --git a/gas/testsuite/gas/i386/x86-64-apx-pushp-popp.s b/gas/testsuite/gas/i386/x86-64-apx-pushp-popp.s
new file mode 100644
index 0000000..0ea66d0
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-apx-pushp-popp.s
@@ -0,0 +1,8 @@
+# Check 64bit APX_F pushp popp instructions
+
+ .text
+ _start:
+ pushp %rax
+ pushp %r31
+ popp %rax
+ popp %r31
diff --git a/gas/testsuite/gas/i386/x86-64.exp b/gas/testsuite/gas/i386/x86-64.exp
index 0e7b5d0..1b13c52 100644
--- a/gas/testsuite/gas/i386/x86-64.exp
+++ b/gas/testsuite/gas/i386/x86-64.exp
@@ -348,6 +348,9 @@ run_dump_test "x86-64-avx512dq-rcigrne"
run_dump_test "x86-64-apx-push2pop2"
run_dump_test "x86-64-apx-push2pop2-intel"
run_list_test "x86-64-apx-push2pop2-inval"
+run_dump_test "x86-64-apx-pushp-popp"
+run_dump_test "x86-64-apx-pushp-popp-intel"
+run_list_test "x86-64-apx-pushp-popp-inval"
run_dump_test "x86-64-avx512dq-rcigru-intel"
run_dump_test "x86-64-avx512dq-rcigru"
run_dump_test "x86-64-avx512dq-rcigrz-intel"