public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix for PR 14423 - Assembler doesn't recognize fma instructions in bdver2 core
@ 2012-08-06 10:47 Ekanathan, Saravanan
  2012-08-06 17:07 ` H.J. Lu
  0 siblings, 1 reply; 12+ messages in thread
From: Ekanathan, Saravanan @ 2012-08-06 10:47 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

Hi All,
  PFA, the patch that fixes the bug 14423 - Assembler doesn't recognize fma instructions in bdver2 core.
I have also added a test suite in Assembler, to do core (bdver2) specific validation for fma.
Is it ok for the trunk?
Regards,
Saravanan

[-- Attachment #2: bdver2_fma.patch --]
[-- Type: application/octet-stream, Size: 3513 bytes --]

? gas/testsuite/gas/i386/bdver2.d
? gas/testsuite/gas/i386/bdver2.s
Index: gas/testsuite/ChangeLog
===================================================================
RCS file: /cvs/src/src/gas/testsuite/ChangeLog,v
retrieving revision 1.2067
diff -u -r1.2067 ChangeLog
--- gas/testsuite/ChangeLog	3 Aug 2012 21:45:15 -0000	1.2067
+++ gas/testsuite/ChangeLog	6 Aug 2012 10:02:33 -0000
@@ -1,3 +1,9 @@
+2012-08-06  Saravanan Ekanathan <saravanan.ekanathan@amd.com>
+
+        Test for PR gas/14423 - To test fma3 support for bdver2 core
+        * gas/i386/bdver2.d
+        * gas/i386/bdver2.s
+
 2012-08-03  Roland McGrath  <mcgrathr@google.com>
 
 	* gas/i386/x86-64-stack.s (try): Also try just rex.W (0x48) prefix.
Index: gas/testsuite/gas/i386/i386.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/i386/i386.exp,v
retrieving revision 1.170
diff -u -r1.170 i386.exp
--- gas/testsuite/gas/i386/i386.exp	16 Jul 2012 12:58:28 -0000	1.170
+++ gas/testsuite/gas/i386/i386.exp	6 Aug 2012 10:02:33 -0000
@@ -184,6 +184,7 @@
     run_dump_test "bmi2"
     run_dump_test "bmi2-intel"
     run_dump_test "fma"
+    run_dump_test "bdver2"
     run_dump_test "fma-intel"
     run_dump_test "fma-scalar"
     run_dump_test "fma-scalar-intel"
Index: opcodes/ChangeLog
===================================================================
RCS file: /cvs/src/src/opcodes/ChangeLog,v
retrieving revision 1.1838
diff -u -r1.1838 ChangeLog
--- opcodes/ChangeLog	2 Aug 2012 08:13:47 -0000	1.1838
+++ opcodes/ChangeLog	6 Aug 2012 10:02:40 -0000
@@ -1,3 +1,9 @@
+2012-08-06  Saravanan Ekanathan <saravanan.ekanathan@amd.com>
+
+	PR gas/14423
+	* i386-gen.c  : Added fma3 support for bdver2 core
+	* i386-init.h : Generated file
+
 2012-08-02  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
 
 	* configure.in: Formatting.
Index: opcodes/i386-gen.c
===================================================================
RCS file: /cvs/src/src/opcodes/i386-gen.c,v
retrieving revision 1.84
diff -u -r1.84 i386-gen.c
--- opcodes/i386-gen.c	16 Jul 2012 12:58:29 -0000	1.84
+++ opcodes/i386-gen.c	6 Aug 2012 10:02:42 -0000
@@ -91,7 +91,7 @@
   { "CPU_BDVER1_FLAGS",
     "Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuSYSCALL|CpuRdtscp|Cpu387|Cpu687|CpuFISTTP|CpuNop|CpuMMX|CpuSSE|CpuSSE2|CpuSSE3|CpuSSE4a|CpuABM|CpuLM|CpuFMA4|CpuXOP|CpuLWP" },
   { "CPU_BDVER2_FLAGS",
-    "Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuSYSCALL|CpuRdtscp|Cpu387|Cpu687|CpuFISTTP|CpuNop|CpuMMX|CpuSSE|CpuSSE2|CpuSSE3|CpuSSE4a|CpuABM|CpuLM|CpuFMA4|CpuXOP|CpuLWP|CpuBMI|CpuTBM|CpuF16C" },
+    "Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuSYSCALL|CpuRdtscp|Cpu387|Cpu687|CpuFISTTP|CpuNop|CpuMMX|CpuSSE|CpuSSE2|CpuSSE3|CpuSSE4a|CpuABM|CpuLM|CpuFMA|CpuFMA4|CpuXOP|CpuLWP|CpuBMI|CpuTBM|CpuF16C" },
   { "CPU_8087_FLAGS",
     "Cpu8087" },
   { "CPU_287_FLAGS",
Index: opcodes/i386-init.h
===================================================================
RCS file: /cvs/src/src/opcodes/i386-init.h,v
retrieving revision 1.46
diff -u -r1.46 i386-init.h
--- opcodes/i386-init.h	16 Jul 2012 12:58:29 -0000	1.46
+++ opcodes/i386-init.h	6 Aug 2012 10:02:43 -0000
@@ -165,7 +165,7 @@
 
 #define CPU_BDVER2_FLAGS \
   { { 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1,  \
-      0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,  \
+      0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,  \
       1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,  \
       0, 0 } }
 

[-- Attachment #3: testsuite.patch --]
[-- Type: application/octet-stream, Size: 1272 bytes --]

Common subdirectories: /local/home/sekanath/binutils_test/src/gas/testsuite/gas/i386/CVS and /local/home/sekanath/binutils/src/gas/testsuite/gas/i386/CVS
diff -N /local/home/sekanath/binutils_test/src/gas/testsuite/gas/i386/bdver2.d /local/home/sekanath/binutils/src/gas/testsuite/gas/i386/bdver2.d
0a1,13
> #objdump: -dw
> #name: bdver2 FMA3 support
> #as: -march=bdver2
> 
> .*: +file format .*
> 
> 
> Disassembly of section .text:
> 
> 0+ <_start>:
> [ 	]*[a-f0-9]+:	c4 e2 c9 98 d4       	vfmadd132pd %xmm4,%xmm6,%xmm2
> [ 	]*[a-f0-9]+:	c4 e2 c9 98 39       	vfmadd132pd \(%ecx\),%xmm6,%xmm7
> #pass
diff -N /local/home/sekanath/binutils_test/src/gas/testsuite/gas/i386/bdver2.s /local/home/sekanath/binutils/src/gas/testsuite/gas/i386/bdver2.s
0a1,9
> # Check FMA instructions
> 
> 	.allow_index_reg
> 	.text
> _start:
> 
> # Tests for op xmm/mem128, xmm, xmm
> 	vfmadd132pd %xmm4,%xmm6,%xmm2
> 	vfmadd132pd (%ecx),%xmm6,%xmm7
diff -N /local/home/sekanath/binutils_test/src/gas/testsuite/gas/i386/i386.exp /local/home/sekanath/binutils/src/gas/testsuite/gas/i386/i386.exp
186a187
>     run_dump_test "bdver2"
Common subdirectories: /local/home/sekanath/binutils_test/src/gas/testsuite/gas/i386/ilp32 and /local/home/sekanath/binutils/src/gas/testsuite/gas/i386/ilp32

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-08-10 21:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-06 10:47 [PATCH] Fix for PR 14423 - Assembler doesn't recognize fma instructions in bdver2 core Ekanathan, Saravanan
2012-08-06 17:07 ` H.J. Lu
2012-08-07  7:09   ` Ekanathan, Saravanan
2012-08-07 15:48     ` H.J. Lu
2012-08-09 10:11       ` Ekanathan, Saravanan
2012-08-09 13:28         ` H.J. Lu
2012-08-10  6:48           ` Ekanathan, Saravanan
2012-08-10 16:45             ` H.J. Lu
2012-08-10 20:27               ` Ekanathan, Saravanan
2012-08-10 20:56                 ` H.J. Lu
2012-08-10 21:20                   ` Ekanathan, Saravanan
2012-08-10 21:42                     ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).