aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorDwarakanath Rajagopal <dwarak.rajagopal@amd.com>2009-07-06 19:34:30 +0000
committerDwarakanath Rajagopal <dwarak.rajagopal@amd.com>2009-07-06 19:34:30 +0000
commit922d8de8c1bd5cbaa9eadd77437daea021864c1d (patch)
treeb7a96b97cc222aac58038127de9f2451dab44e42 /gas/testsuite
parentd80a43f9615fd7a29c00083e214d2b5053db0500 (diff)
downloadgdb-922d8de8c1bd5cbaa9eadd77437daea021864c1d.zip
gdb-922d8de8c1bd5cbaa9eadd77437daea021864c1d.tar.gz
gdb-922d8de8c1bd5cbaa9eadd77437daea021864c1d.tar.bz2
<gas changes>
2009-07-06 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com> * config/tc-i386.c (cpu_arch): Add .fma4 and CPU_FMA4_FLAGS. (build_modrm_byte): Add support to handle FMA4 instructions. (md_show_usage): Add fma4. <gas/testsuite changes> 2009-07-06 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com> * gas/i386/i386.exp: Add FMA4 tests. * gas/i386/x86-64-fma4.d: Ditto. * gas/i386/fma4.d: Ditto. * gas/i386/x86-64-fma4.s: Ditto. * gas/i386/fma4.s: Ditto. <opcodes changes> 2009-07-06 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com> * i386-opc.h (CpuFMA4): Add CpuFMA4. (i386_cpu_flags): New. * i386-gen.c: Add CPU_FMA4_FLAGS. * i386-opc.tbl: Add FMA4 instructions. * i386-tbl.h: Regenerate. * i386-init.h: Regenerate. * i386-dis.c (OP_VEX_FMA): New. Handle FMA4. (OP_XMM_VexW): Ditto. (OP_EX_VexW): Ditto. (VEXI4_Fixup): Ditto. (VexI4, VexFMA, Vex128FMA, EXVexW, EXdVexW, XMVexW): New Macros. (PREFIX_VEX_3A5C, PREFIX_VEX_3A5D, PREFIX_VEX_3A5E): New. (PREFIX_VEX_3A5F, PREFIX_VEX_3A60): New. (PREFIX_VEX_3A68, PREFIX_VEX_3A69, PREFIX_VEX_3A6A): New. (PREFIX_VEX_3A6B, PREFIX_VEX_3A6C, PREFIX_VEX_3A6D): New. (PREFIX_VEX_3A6E, PREFIX_VEX_3A6F, PREFIX_VEX_3A7A): New. (PREFIX_VEX_3A7B, PREFIX_VEX_3A7C, PREFIX_VEX_3A7D): New. (PREFIX_VEX_3A7E, PREFIX_VEX_3A7F): New. (VEX_LEN_3A6A_P_2,VEX_LEN_3A6B_P_2, VEX_LEN_3A6E_P_2): New. (VEX_LEN_3A6F_P_2,VEX_LEN_3A7A_P_2, VEX_LEN_3A7B_P_2): New. (VEX_LEN_3A7E_P_2,VEX_LEN_3A7F_P_2): New. (get_vex_imm8): New. handle FMA4. (OP_EX_VexReg): Ditto.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/i386/fma4.d92
-rw-r--r--gas/testsuite/gas/i386/fma4.s91
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/x86-64-fma4.d66
-rw-r--r--gas/testsuite/gas/i386/x86-64-fma4.s64
6 files changed, 323 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index ccb7ecf..854cae0 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2009-07-06 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
+
+ * gas/i386/i386.exp: Add FMA4 tests.
+ * gas/i386/x86-64-fma4.d: Ditto.
+ * gas/i386/fma4.d: Ditto.
+ * gas/i386/x86-64-fma4.s: Ditto.
+ * gas/i386/fma4.s: Ditto.
+
2009-07-01 Nick Clifton <nickc@redhat.com>
PR 10168
diff --git a/gas/testsuite/gas/i386/fma4.d b/gas/testsuite/gas/i386/fma4.d
new file mode 100644
index 0000000..58b72f4
--- /dev/null
+++ b/gas/testsuite/gas/i386/fma4.d
@@ -0,0 +1,92 @@
+#objdump: -dw
+#name: i386 FMA4
+
+.*: file format .*
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+: c4 e3 cd 69 fc 20 vfmaddpd %ymm4,%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 69 39 20 vfmaddpd \(%ecx\),%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 68 fc 20 vfmaddps %ymm4,%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 68 39 20 vfmaddps \(%ecx\),%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 5d fc 20 vfmaddsubpd %ymm4,%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 5d 39 20 vfmaddsubpd \(%ecx\),%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 5c fc 20 vfmaddsubps %ymm4,%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 5c 39 20 vfmaddsubps \(%ecx\),%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 5f fc 20 vfmsubaddpd %ymm4,%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 5f 39 20 vfmsubaddpd \(%ecx\),%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 5e fc 20 vfmsubaddps %ymm4,%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 5e 39 20 vfmsubaddps \(%ecx\),%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 6d fc 20 vfmsubpd %ymm4,%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 6d 39 20 vfmsubpd \(%ecx\),%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 6c fc 20 vfmsubps %ymm4,%ymm6,%ymm2,%ym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6,%xmm2,%xmm7
+[ ]*[a-f0-9]+: c4 e3 c9 7a 39 20 vfnmaddss \(%ecx\),%xmm6,%xmm2,%xmm7
+[ ]*[a-f0-9]+: c4 e3 59 7a 39 20 vfnmaddss %xmm4,\(%ecx\),%xmm2,%xmm7
+[ ]*[a-f0-9]+: c4 e3 c9 7e fc 20 vfnmsubss %xmm4,%xmm6,%xmm2,%xmm7
+[ ]*[a-f0-9]+: c4 e3 c9 7e 39 20 vfnmsubss \(%ecx\),%xmm6,%xmm2,%xmm7
+[ ]*[a-f0-9]+: c4 e3 59 7e 39 20 vfnmsubss %xmm4,\(%ecx\),%xmm2,%xmm7
diff --git a/gas/testsuite/gas/i386/fma4.s b/gas/testsuite/gas/i386/fma4.s
new file mode 100644
index 0000000..c1ec47f
--- /dev/null
+++ b/gas/testsuite/gas/i386/fma4.s
@@ -0,0 +1,91 @@
+# Check FMA4 instructions
+
+ .allow_index_reg
+ .text
+_start:
+
+ vfmaddpd %ymm4,%ymm6,%ymm2,%ymm7
+ vfmaddpd (%ecx),%ymm6,%ymm2,%ymm7
+ vfmaddps %ymm4,%ymm6,%ymm2,%ymm7
+ vfmaddps (%ecx),%ymm6,%ymm2,%ymm7
+ vfmaddsubpd %ymm4,%ymm6,%ymm2,%ymm7
+ vfmaddsubpd (%ecx),%ymm6,%ymm2,%ymm7
+ vfmaddsubps %ymm4,%ymm6,%ymm2,%ymm7
+ vfmaddsubps (%ecx),%ymm6,%ymm2,%ymm7
+ vfmsubaddpd %ymm4,%ymm6,%ymm2,%ymm7
+ vfmsubaddpd (%ecx),%ymm6,%ymm2,%ymm7
+ vfmsubaddps %ymm4,%ymm6,%ymm2,%ymm7
+ vfmsubaddps (%ecx),%ymm6,%ymm2,%ymm7
+ vfmsubpd %ymm4,%ymm6,%ymm2,%ymm7
+ vfmsubpd (%ecx),%ymm6,%ymm2,%ymm7
+ vfmsubps %ymm4,%ymm6,%ymm2,%ymm7
+ vfmsubps (%ecx),%ymm6,%ymm2,%ymm7
+ vfmaddpd %xmm4,%xmm6,%xmm2,%xmm7
+ vfmaddpd (%ecx),%xmm6,%xmm2,%xmm7
+ vfmaddpd %xmm4,(%ecx),%xmm2,%xmm7
+ vfmaddps %xmm4,%xmm6,%xmm2,%xmm7
+ vfmaddps (%ecx),%xmm6,%xmm2,%xmm7
+ vfmaddps %xmm4,(%ecx),%xmm2,%xmm7
+ vfmaddsubpd %xmm4,%xmm6,%xmm2,%xmm7
+ vfmaddsubpd (%ecx),%xmm6,%xmm2,%xmm7
+ vfmaddsubpd %xmm4,(%ecx),%xmm2,%xmm7
+ vfmaddsubps %xmm4,%xmm6,%xmm2,%xmm7
+ vfmaddsubps (%ecx),%xmm6,%xmm2,%xmm7
+ vfmaddsubps %xmm4,(%ecx),%xmm2,%xmm7
+ vfmsubaddpd %xmm4,%xmm6,%xmm2,%xmm7
+ vfmsubaddpd (%ecx),%xmm6,%xmm2,%xmm7
+ vfmsubaddpd %xmm4,(%ecx),%xmm2,%xmm7
+ vfmsubaddps %xmm4,%xmm6,%xmm2,%xmm7
+ vfmsubaddps (%ecx),%xmm6,%xmm2,%xmm7
+ vfmsubaddps %xmm4,(%ecx),%xmm2,%xmm7
+ vfmsubpd %xmm4,%xmm6,%xmm2,%xmm7
+ vfmsubpd (%ecx),%xmm6,%xmm2,%xmm7
+ vfmsubpd %xmm4,(%ecx),%xmm2,%xmm7
+ vfmsubps %xmm4,%xmm6,%xmm2,%xmm7
+ vfmsubps (%ecx),%xmm6,%xmm2,%xmm7
+ vfmsubps %xmm4,(%ecx),%xmm2,%xmm7
+ vfmaddsd %xmm4,%xmm6,%xmm2,%xmm7
+ vfmaddsd (%ecx),%xmm6,%xmm2,%xmm7
+ vfmaddsd %xmm4,(%ecx),%xmm2,%xmm7
+ vfmsubsd %xmm4,%xmm6,%xmm2,%xmm7
+ vfmsubsd (%ecx),%xmm6,%xmm2,%xmm7
+ vfmsubsd %xmm4,(%ecx),%xmm2,%xmm7
+ vfmaddss %xmm4,%xmm6,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mm4,(%ecx),%xmm2,%xmm7
+ vfnmaddss %xmm4,%xmm6,%xmm2,%xmm7
+ vfnmaddss (%ecx),%xmm6,%xmm2,%xmm7
+ vfnmaddss %xmm4,(%ecx),%xmm2,%xmm7
+ vfnmsubss %xmm4,%xmm6,%xmm2,%xmm7
+ vfnmsubss (%ecx),%xmm6,%xmm2,%xmm7
+ vfnmsubss %xmm4,(%ecx),%xmm2,%xmm7
+
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index b140754..68211de 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -148,6 +148,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "sse2avx-opts-intel"
run_dump_test "fma"
run_dump_test "fma-intel"
+ run_dump_test "fma4"
# These tests require support for 8 and 16 bit relocs,
# so we only run them for ELF and COFF targets.
@@ -307,6 +308,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "x86-64-avx-swap-intel"
run_dump_test "x86-64-fma"
run_dump_test "x86-64-fma-intel"
+ run_dump_test "x86-64-fma4"
if { ![istarget "*-*-aix*"]
&& ![istarget "*-*-beos*"]
diff --git a/gas/testsuite/gas/i386/x86-64-fma4.d b/gas/testsuite/gas/i386/x86-64-fma4.d
new file mode 100644
index 0000000..b0ac81f
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-fma4.d
@@ -0,0 +1,66 @@
+#objdump: -dw
+#name: x86-64 FMA4
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+: c4 e3 cd 69 fc 20 vfmaddpd %ymm4,%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 69 39 20 vfmaddpd \(%rcx\),%ymm6,%ymm2,%ymm7
+[ ]*[a-f0-9]+: c4 e3 cd 68 fc 20 vfma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 39 20 vfnmsubsd \(%rcx\),%xmm6,%xmm2,%xmm7
+[ ]*[a-f0-9]+: c4 e3 59 7f 39 20 vfnmsubsd %xmm4,\(%rcx\),%xmm2,%xmm7
+[ ]*[a-f0-9]+: c4 e3 c9 7a fc 20 vfnmaddss %xmm4,%xmm6,%xmm2,%xmm7
+[ ]*[a-f0-9]+: c4 e3 c9 7a 39 20 vfnmaddss \(%rcx\),%xmm6,%xmm2,%xmm7
+[ ]*[a-f0-9]+: c4 e3 59 7a 39 20 vfnmaddss %xmm4,\(%rcx\),%xmm2,%xmm7
+[ ]*[a-f0-9]+: c4 e3 c9 7e fc 20 vfnmsubss %xmm4,%xmm6,%xmm2,%xmm7
+[ ]*[a-f0-9]+: c4 e3 c9 7e 39 20 vfnmsubss \(%rcx\),%xmm6,%xmm2,%xmm7
+
diff --git a/gas/testsuite/gas/i386/x86-64-fma4.s b/gas/testsuite/gas/i386/x86-64-fma4.s
new file mode 100644
index 0000000..b316f69
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-fma4.s
@@ -0,0 +1,64 @@
+# Check 64bit FMA4 instructions
+
+ .allow_index_reg
+ .text
+_start:
+
+ vfmaddpd %ymm4,%ymm6,%ymm2,%ymm7
+ vfmaddpd (%rcx),%ymm6,%ymm2,%ymm7
+ vfmaddps %ymm4,%ymm6,%ymm2,%ymm7
+ vfmaddps (%rcx),%ymm6,%ymm2,%ymm7
+ vfmaddsubpd %ymm4,%ymm6,%ymm2,%ymm7
+ vfmaddsubpd (%rcx),%ymm6,%ymm2,%ymm7
+ vfmaddsubps %ymm4,%ymm6,%ymm2,%ymm7
+ vfmaddsubps (%rcx),%ymm6,%ymm2,%ymm7
+ vfmaddpd %xmm4,%xmm6,%xmm2,%xmm7
+ vfmaddpd (%rcx),%xmm6,%xmm2,%xmm7
+ vfmaddpd %xmm4,(%rcx),%xmm2,%xmm7
+ vfmaddps %xmm4,%xmm6,%xmm2,%xmm7
+ vfmaddps (%rcx),%xmm6,%xmm2,%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