This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix x86 Intel mode disassembler for punpcklxxx


The SSE version of punpcklxxx takes a 128bit memory source operand
instead of 64bit memory. I am checking in this patch to fix it.

H.J.
----
gas/testsuite/

2007-07-16  H.J. Lu  <hongjiu.lu@intel.com>

	* gas/i386/simd.s: Add tests for punpcklbw, punpckldq,
	punpcklwd and punpcklqdq.
	* gas/i386/x86-64-simd.s: Likewise.

	* gas/i386/simd-intel.d: Updated.
	* gas/i386/simd.d: Likewise.
	* gas/i386/x86-64-simd-intel.d: Likewise.
	* gas/i386/x86-64-simd.d: Likewise.

opcodes/

2007-07-16  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-dis.c (EMq): Removed.
	(EMx): New.
	(prefix_user_table): Replace EMq with EMx.

--- binutils/gas/testsuite/gas/i386/simd-intel.d.qword	2007-06-23 07:55:18.000000000 -0700
+++ binutils/gas/testsuite/gas/i386/simd-intel.d	2007-07-16 12:08:24.000000000 -0700
@@ -33,5 +33,9 @@ Disassembly of section .text:
 [ 	]*[a-f0-9]+:	0f 60 0d 78 56 34 12 	punpcklbw mm1,DWORD PTR ds:0x12345678
 [ 	]*[a-f0-9]+:	0f 62 0d 78 56 34 12 	punpckldq mm1,DWORD PTR ds:0x12345678
 [ 	]*[a-f0-9]+:	0f 61 0d 78 56 34 12 	punpcklwd mm1,DWORD PTR ds:0x12345678
+[ 	]*[a-f0-9]+:	66 0f 60 0d 78 56 34 12 	punpcklbw xmm1,XMMWORD PTR ds:0x12345678
+[ 	]*[a-f0-9]+:	66 0f 62 0d 78 56 34 12 	punpckldq xmm1,XMMWORD PTR ds:0x12345678
+[ 	]*[a-f0-9]+:	66 0f 61 0d 78 56 34 12 	punpcklwd xmm1,XMMWORD PTR ds:0x12345678
+[ 	]*[a-f0-9]+:	66 0f 6c 0d 78 56 34 12 	punpcklqdq xmm1,XMMWORD PTR ds:0x12345678
 [ 	]*[a-f0-9]+:	66 0f 2e 0d 78 56 34 12 	ucomisd xmm1,QWORD PTR ds:0x12345678
 [ 	]*[a-f0-9]+:	0f 2e 0d 78 56 34 12 	ucomiss xmm1,DWORD PTR ds:0x12345678
--- binutils/gas/testsuite/gas/i386/simd.d.qword	2007-06-23 07:55:18.000000000 -0700
+++ binutils/gas/testsuite/gas/i386/simd.d	2007-07-16 12:08:12.000000000 -0700
@@ -32,5 +32,9 @@ Disassembly of section .text:
 [ 	]*[a-f0-9]+:	0f 60 0d 78 56 34 12 	punpcklbw 0x12345678,%mm1
 [ 	]*[a-f0-9]+:	0f 62 0d 78 56 34 12 	punpckldq 0x12345678,%mm1
 [ 	]*[a-f0-9]+:	0f 61 0d 78 56 34 12 	punpcklwd 0x12345678,%mm1
+[ 	]*[a-f0-9]+:	66 0f 60 0d 78 56 34 12 	punpcklbw 0x12345678,%xmm1
+[ 	]*[a-f0-9]+:	66 0f 62 0d 78 56 34 12 	punpckldq 0x12345678,%xmm1
+[ 	]*[a-f0-9]+:	66 0f 61 0d 78 56 34 12 	punpcklwd 0x12345678,%xmm1
+[ 	]*[a-f0-9]+:	66 0f 6c 0d 78 56 34 12 	punpcklqdq 0x12345678,%xmm1
 [ 	]*[a-f0-9]+:	66 0f 2e 0d 78 56 34 12 	ucomisd 0x12345678,%xmm1
 [ 	]*[a-f0-9]+:	0f 2e 0d 78 56 34 12 	ucomiss 0x12345678,%xmm1
--- binutils/gas/testsuite/gas/i386/simd.s.qword	2007-06-23 07:55:18.000000000 -0700
+++ binutils/gas/testsuite/gas/i386/simd.s	2007-07-16 12:07:40.000000000 -0700
@@ -25,5 +25,9 @@ _start:
 	punpcklbw 0x12345678,%mm1
 	punpckldq 0x12345678,%mm1
 	punpcklwd 0x12345678,%mm1
+	punpcklbw 0x12345678,%xmm1
+	punpckldq 0x12345678,%xmm1
+	punpcklwd 0x12345678,%xmm1
+	punpcklqdq 0x12345678,%xmm1
 	ucomisd 0x12345678,%xmm1
 	ucomiss 0x12345678,%xmm1
--- binutils/gas/testsuite/gas/i386/x86-64-simd-intel.d.qword	2007-06-23 07:55:18.000000000 -0700
+++ binutils/gas/testsuite/gas/i386/x86-64-simd-intel.d	2007-07-16 12:08:46.000000000 -0700
@@ -33,5 +33,9 @@ Disassembly of section .text:
 [ 	]*[a-f0-9]+:	0f 60 0d 78 56 34 12 	punpcklbw mm1,DWORD PTR \[rip\+0x12345678\][ 	]*(#.*)?
 [ 	]*[a-f0-9]+:	0f 62 0d 78 56 34 12 	punpckldq mm1,DWORD PTR \[rip\+0x12345678\][ 	]*(#.*)?
 [ 	]*[a-f0-9]+:	0f 61 0d 78 56 34 12 	punpcklwd mm1,DWORD PTR \[rip\+0x12345678\][ 	]*(#.*)?
+[ 	]*[a-f0-9]+:	66 0f 60 0d 78 56 34 12 	punpcklbw xmm1,XMMWORD PTR \[rip\+0x12345678\][ 	]*(#.*)?
+[ 	]*[a-f0-9]+:	66 0f 62 0d 78 56 34 12 	punpckldq xmm1,XMMWORD PTR \[rip\+0x12345678\][ 	]*(#.*)?
+[ 	]*[a-f0-9]+:	66 0f 61 0d 78 56 34 12 	punpcklwd xmm1,XMMWORD PTR \[rip\+0x12345678\][ 	]*(#.*)?
+[ 	]*[a-f0-9]+:	66 0f 6c 0d 78 56 34 12 	punpcklqdq xmm1,XMMWORD PTR \[rip\+0x12345678\][ 	]*(#.*)?
 [ 	]*[a-f0-9]+:	66 0f 2e 0d 78 56 34 12 	ucomisd xmm1,QWORD PTR \[rip\+0x12345678\][ 	]*(#.*)?
 [ 	]*[a-f0-9]+:	0f 2e 0d 78 56 34 12 	ucomiss xmm1,DWORD PTR \[rip\+0x12345678\][ 	]*(#.*)?
--- binutils/gas/testsuite/gas/i386/x86-64-simd.d.qword	2007-06-23 07:55:18.000000000 -0700
+++ binutils/gas/testsuite/gas/i386/x86-64-simd.d	2007-07-16 12:08:35.000000000 -0700
@@ -32,5 +32,9 @@ Disassembly of section .text:
 [ 	]*[a-f0-9]+:	0f 60 0d 78 56 34 12 	punpcklbw 0x12345678\(%rip\),%mm1[ 	]*(#.*)?
 [ 	]*[a-f0-9]+:	0f 62 0d 78 56 34 12 	punpckldq 0x12345678\(%rip\),%mm1[ 	]*(#.*)?
 [ 	]*[a-f0-9]+:	0f 61 0d 78 56 34 12 	punpcklwd 0x12345678\(%rip\),%mm1[ 	]*(#.*)?
+[ 	]*[a-f0-9]+:	66 0f 60 0d 78 56 34 12 	punpcklbw 0x12345678\(%rip\),%xmm1[ 	]*(#.*)?
+[ 	]*[a-f0-9]+:	66 0f 62 0d 78 56 34 12 	punpckldq 0x12345678\(%rip\),%xmm1[ 	]*(#.*)?
+[ 	]*[a-f0-9]+:	66 0f 61 0d 78 56 34 12 	punpcklwd 0x12345678\(%rip\),%xmm1[ 	]*(#.*)?
+[ 	]*[a-f0-9]+:	66 0f 6c 0d 78 56 34 12 	punpcklqdq 0x12345678\(%rip\),%xmm1[ 	]*(#.*)?
 [ 	]*[a-f0-9]+:	66 0f 2e 0d 78 56 34 12 	ucomisd 0x12345678\(%rip\),%xmm1[ 	]*(#.*)?
 [ 	]*[a-f0-9]+:	0f 2e 0d 78 56 34 12 	ucomiss 0x12345678\(%rip\),%xmm1[ 	]*(#.*)?
--- binutils/gas/testsuite/gas/i386/x86-64-simd.s.qword	2007-06-23 07:55:18.000000000 -0700
+++ binutils/gas/testsuite/gas/i386/x86-64-simd.s	2007-07-16 12:07:45.000000000 -0700
@@ -25,5 +25,9 @@ _start:
 	punpcklbw 0x12345678(%rip),%mm1
 	punpckldq 0x12345678(%rip),%mm1
 	punpcklwd 0x12345678(%rip),%mm1
+	punpcklbw 0x12345678(%rip),%xmm1
+	punpckldq 0x12345678(%rip),%xmm1
+	punpcklwd 0x12345678(%rip),%xmm1
+	punpcklqdq 0x12345678(%rip),%xmm1
 	ucomisd 0x12345678(%rip),%xmm1
 	ucomiss 0x12345678(%rip),%xmm1
--- binutils/opcodes/i386-dis.c.qword	2007-07-16 12:01:02.000000000 -0700
+++ binutils/opcodes/i386-dis.c	2007-07-16 12:01:18.000000000 -0700
@@ -309,7 +309,7 @@ fetch_data (struct disassemble_info *inf
 #define XM { OP_XMM, 0 }
 #define EM { OP_EM, v_mode }
 #define EMd { OP_EM, d_mode }
-#define EMq { OP_EM, q_mode }
+#define EMx { OP_EM, x_mode }
 #define EXd { OP_EX, d_mode }
 #define EXq { OP_EX, q_mode }
 #define EXx { OP_EX, x_mode }
@@ -2568,7 +2568,7 @@ static const struct dis386 prefix_user_t
   {
     { "punpcklbw",{ MX, EMd } },
     { "(bad)",	{ XX } },
-    { "punpcklbw",{ MX, EMq } },
+    { "punpcklbw",{ MX, EMx } },
     { "(bad)",	{ XX } },
   },
 
@@ -2576,7 +2576,7 @@ static const struct dis386 prefix_user_t
   {
     { "punpcklwd",{ MX, EMd } },
     { "(bad)",	{ XX } },
-    { "punpcklwd",{ MX, EMq } },
+    { "punpcklwd",{ MX, EMx } },
     { "(bad)",	{ XX } },
   },
 
@@ -2584,7 +2584,7 @@ static const struct dis386 prefix_user_t
   {
     { "punpckldq",{ MX, EMd } },
     { "(bad)",	{ XX } },
-    { "punpckldq",{ MX, EMq } },
+    { "punpckldq",{ MX, EMx } },
     { "(bad)",	{ XX } },
   },
 };


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]