aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/i386/x86-64-pseudos-apx.d158
-rw-r--r--gas/testsuite/gas/i386/x86-64-pseudos-apx.s45
-rw-r--r--gas/testsuite/gas/i386/x86-64.exp1
3 files changed, 204 insertions, 0 deletions
diff --git a/gas/testsuite/gas/i386/x86-64-pseudos-apx.d b/gas/testsuite/gas/i386/x86-64-pseudos-apx.d
new file mode 100644
index 0000000..c3b2eca
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-pseudos-apx.d
@@ -0,0 +1,158 @@
+#as:
+#objdump: -dw -Msuffix
+#name: APX x86-64 pseudo prefixes
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+:[ ]*d5 11 89 cf[ ]+movl %ecx,%r31d
+[ ]*[a-f0-9]+:[ ]*d5 44 8b f9[ ]+movl.s %ecx,%r31d
+[ ]*[a-f0-9]+:[ ]*d5 11 89 cf[ ]+movl %ecx,%r31d
+[ ]*[a-f0-9]+:[ ]*67 d5 44 8b 39[ ]+movl \(%ecx\),%r31d
+[ ]*[a-f0-9]+:[ ]*67 d5 44 89 39[ ]+movl %r31d,\(%ecx\)
+[ ]*[a-f0-9]+:[ ]*d5 11 11 cf[ ]+adcl %ecx,%r31d
+[ ]*[a-f0-9]+:[ ]*d5 44 13 f9[ ]+adcl.s %ecx,%r31d
+[ ]*[a-f0-9]+:[ ]*d5 11 11 cf[ ]+adcl %ecx,%r31d
+[ ]*[a-f0-9]+:[ ]*67 d5 44 13 39[ ]+adcl \(%ecx\),%r31d
+[ ]*[a-f0-9]+:[ ]*67 d5 44 11 39[ ]+adcl %r31d,\(%ecx\)
+[ ]*[a-f0-9]+:[ ]*d5 11 01 cf[ ]+addl %ecx,%r31d
+[ ]*[a-f0-9]+:[ ]*d5 44 03 f9[ ]+addl.s %ecx,%r31d
+[ ]*[a-f0-9]+:[ ]*d5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7c 08 33 39[ ]+xorl \(%ecx\),%r31d
+[ ]*[a-f0-9]+:[ ]*67 62 64 7c 08 31 39[ ]+xorl %r31d,\(%ecx\)
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 11 cf[ ]+adcl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 64 7c 18 13 f9[ ]+adcl.s %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 11 cf[ ]+adcl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 11 38[ ]+adcq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 13 38[ ]+adcq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 11 38[ ]+adcq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 13 38[ ]+adcq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 01 cf[ ]+addl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 64 7c 18 03 f9[ ]+addl.s %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 01 cf[ ]+addl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 01 38[ ]+addq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 03 38[ ]+addq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 01 38[ ]+addq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 03 38[ ]+addq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 21 cf[ ]+andl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 64 7c 18 23 f9[ ]+andl.s %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 21 cf[ ]+andl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 21 38[ ]+andq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 23 38[ ]+andq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 21 38[ ]+andq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 23 38[ ]+andq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 09 cf[ ]+orl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 64 7c 18 0b f9[ ]+orl.s %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 09 cf[ ]+orl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 09 38[ ]+orq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 0b 38[ ]+orq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 09 38[ ]+orq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 0b 38[ ]+orq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 19 cf[ ]+sbbl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 64 7c 18 1b f9[ ]+sbbl.s %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 19 cf[ ]+sbbl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 19 38[ ]+sbbq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 1b 38[ ]+sbbq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 19 38[ ]+sbbq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 1b 38[ ]+sbbq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 29 cf[ ]+subl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 64 7c 18 2b f9[ ]+subl.s %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 29 cf[ ]+subl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 29 38[ ]+subq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 2b 38[ ]+subq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 29 38[ ]+subq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 2b 38[ ]+subq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 31 cf[ ]+xorl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 64 7c 18 33 f9[ ]+xorl.s %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 dc 7c 18 31 cf[ ]+xorl %ecx,%r31d,%eax
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 31 38[ ]+xorq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 33 38[ ]+xorq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 31 38[ ]+xorq %r31,\(%r8\),%r16
+[ ]*[a-f0-9]+:[ ]*62 44 fc 10 33 38[ ]+xorq \(%r8\),%r31,%r16
+[ ]*[a-f0-9]+:[ ]*62 f4 7c 08 42 c2[ ]+cfcmovbl %edx,%eax
+[ ]*[a-f0-9]+:[ ]*62 f4 7c 08 42 c2[ ]+cfcmovbl %edx,%eax
+[ ]*[a-f0-9]+:[ ]*62 f4 7c 0c 42 d0[ ]+cfcmovbl.s %edx,%eax
+[ ]*[a-f0-9]+:[ ]*67 62 f4 7c 08 42 02[ ]+cfcmovbl \(%edx\),%eax
+[ ]*[a-f0-9]+:[ ]*67 62 f4 7c 0c 42 02[ ]+cfcmovbl %eax,\(%edx\)
+
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-pseudos-apx.s b/gas/testsuite/gas/i386/x86-64-pseudos-apx.s
new file mode 100644
index 0000000..a78bb1d
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-pseudos-apx.s
@@ -0,0 +1,45 @@
+# Check 64bit APX instructions with pseudo prefixes for encoding
+
+.text
+_start:
+ #APX REX2
+ .irp m, mov, adc, add, and, cmp, or, sbb, sub, test, xor, xchg
+ \m %ecx, %r31d
+ {load} \m %ecx, %r31d
+ {store} \m %ecx, %r31d
+ {load} \m (%ecx), %r31d
+ {store} \m %r31d, (%ecx)
+ .endr
+
+ movaps (%r31),%xmm2
+ {load} movaps (%r31),%xmm2
+ {store} movaps %xmm2, (%r31)
+
+ #APX EVEX promoted from legacy
+ .irp m, adc, add, and, or, sbb, sub, xor
+ {evex} \m %ecx, %r31d
+ {evex} {load} \m %ecx, %r31d
+ {evex} {store} \m %ecx, %r31d
+ {evex} {load} \m (%ecx), %r31d
+ {evex} {store} \m %r31d, (%ecx)
+ .endr
+
+ #APX NDD
+ .irp m, adc, add, and, or, sbb, sub, xor
+ \m %ecx, %r31d, %eax
+ {load} \m %ecx, %r31d, %eax
+ {store} \m %ecx, %r31d, %eax
+ {load} \m %r31,(%r8),%r16
+ {load} \m (%r8),%r31,%r16
+ {store} \m %r31,(%r8),%r16
+ {store} \m (%r8),%r31,%r16
+ .endr
+
+ #APX News.
+ .irp m, cfcmovb
+ \m %edx, %eax
+ {load} \m %edx, %eax
+ {store} \m %edx, %eax
+ {load} \m (%edx), %eax
+ {store} \m %eax, (%edx)
+ .endr
diff --git a/gas/testsuite/gas/i386/x86-64.exp b/gas/testsuite/gas/i386/x86-64.exp
index bd1aa54..7562291 100644
--- a/gas/testsuite/gas/i386/x86-64.exp
+++ b/gas/testsuite/gas/i386/x86-64.exp
@@ -559,6 +559,7 @@ run_dump_test "x86-64-cet-intel"
run_list_test "x86-64-cet-ibt-inval"
run_list_test "x86-64-cet-shstk-inval"
run_dump_test "x86-64-pseudos"
+run_dump_test "x86-64-pseudos-apx"
run_list_test "x86-64-pseudos-bad"
run_list_test "x86-64-inval-pseudo" "-al"
run_dump_test "x86-64-notrack"