This is the mail archive of the binutils@sources.redhat.com 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]

Re: paddq and psubq??? Where are they?


On Thu, 22 Mar 2001, Jan Hubicka wrote:

> > When adding this, I noticed that gas accepts "psrldq" instead of the intel
> > mnemonic "psrlq", and a few other similar cases.  Any particular reason
> > for this, Jan?  I propose changing gas to use "psrlq" etc.
> No, it was most probably my overlook for that.

When I looked a little closer, it turned out that the "psrldq" and others
I thought were wrong, were in fact OK.  A few little bugs did turn up
though...

include/opcode/ChangeLog
	* i386.h (i386_optab): Correct entry for "movntdq".  Add "punpcklqdq".
	Add InvMem to first operand of "maskmovdqu".

opcodes/ChangeLog
	* i386-dis.c (PREGRP25): Define.
	(dis386_twobyte_att): Use here in place of "movntq" entry.
	(dis386_twobyte_intel): Likewise.
	(prefix_user_table): Add PREGRP25 entry for "movntq" and "movntdq".
	(PREGRP26): Define.
	(dis386_twobyte_att): Use here.
	(dis386_twobyte_intel): Likewise.
	(prefix_user_table): Add PREGRP26 entry for "punpcklqdq".
	(prefix_user_table <maskmovdqu>): XM operand, not MX.
	(prefix_user_table): Cosmetic changes to "bad" entries.

gas/testsuite/ChangeLog
	* gas/i386/ssemmx2.s: Change movntq to movntdq.
	* gas/i386/ssemmx2.d: Matching change.

Alan Modra
-- 
Linuxcare

Index: include/opcode/i386.h
===================================================================
RCS file: /cvs/src/src/include/opcode/i386.h,v
retrieving revision 1.30
diff -u -p -r1.30 i386.h
--- i386.h	2001/03/22 02:27:53	1.30
+++ i386.h	2001/03/24 06:15:20
@@ -1140,7 +1140,7 @@ static const template i386_optab[] = {
 {"movmskps",  2, 0x0f50,    X, CpuSSE, FP|Modrm,	{ RegXMM|InvMem, Reg32, 0 } },
 {"movntps",   2, 0x0f2b,    X, CpuSSE, FP|Modrm, 	{ RegXMM, LLongMem, 0 } },
 {"movntq",    2, 0x0fe7,    X, CpuSSE, FP|Modrm, 	{ RegMMX, LLongMem, 0 } },
-{"movntq",    2, 0x660fe7,  X, CpuSSE2,FP|Modrm, 	{ RegXMM, LLongMem, 0 } },
+{"movntdq",   2, 0x660fe7,  X, CpuSSE2,FP|Modrm, 	{ RegXMM, LLongMem, 0 } },
 {"movss",     2, 0xf30f10,  X, CpuSSE, FP|Modrm,	{ RegXMM|WordMem, RegXMM, 0 } },
 {"movss",     2, 0xf30f11,  X, CpuSSE, FP|Modrm,	{ RegXMM, RegXMM|WordMem, 0 } },
 {"movups",    2, 0x0f10,    X, CpuSSE, FP|Modrm,	{ RegXMM|LLongMem, RegXMM, 0 } },
@@ -1262,7 +1262,7 @@ static const template i386_optab[] = {
 {"cvttsd2si", 2, 0xf20f2c,  X, CpuSSE2, lq_Suf|IgnoreSize|Modrm,{ RegXMM|WordMem, Reg32|Reg64, 0 } },
 {"cvttpd2dq", 2, 0x660fe6,  X, CpuSSE2, FP|Modrm,	{ RegXMM|LLongMem, RegXMM, 0 } },
 {"cvttps2dq", 2, 0xf30f5b,  X, CpuSSE2, FP|Modrm,	{ RegXMM|LLongMem, RegXMM, 0 } },
-{"maskmovdqu",2, 0x660ff7,  X, CpuSSE2, FP|Modrm,	{ RegXMM, RegXMM, 0 } },
+{"maskmovdqu",2, 0x660ff7,  X, CpuSSE2, FP|Modrm,	{ RegXMM|InvMem, RegXMM, 0 } },
 {"movdqa",    2, 0x660f6f,  X, CpuSSE2, FP|Modrm,	{ RegXMM|LLongMem, RegXMM, 0 } },
 {"movdqa",    2, 0x660f7f,  X, CpuSSE2, FP|Modrm,	{ RegXMM, RegXMM|LLongMem, 0 } },
 {"movdqu",    2, 0xf30f6f,  X, CpuSSE2, FP|Modrm,	{ RegXMM|LLongMem, RegXMM, 0 } },
@@ -1277,6 +1277,7 @@ static const template i386_optab[] = {
 {"pslldq",    2, 0x660f73,  7, CpuSSE2, FP|Modrm,	{ Imm8, RegXMM, 0 } },
 {"psrldq",    2, 0x660f73,  3, CpuSSE2, FP|Modrm,	{ Imm8, RegXMM, 0 } },
 {"punpckhqdq",2, 0x660f6d,  X, CpuSSE2, FP|Modrm,	{ RegXMM|LLongMem, RegXMM, 0 } },
+{"punpcklqdq",2, 0x660f6c,  X, CpuSSE2, FP|Modrm,	{ RegXMM|LLongMem, RegXMM, 0 } },
 
 /* AMD 3DNow! instructions.  */
 
Index: opcodes/i386-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/i386-dis.c,v
retrieving revision 1.17
diff -u -p -r1.17 i386-dis.c
--- i386-dis.c	2001/03/22 02:27:54	1.17
+++ i386-dis.c	2001/03/24 06:15:29
@@ -409,6 +409,8 @@ static void BadOp PARAMS ((void));
 #define PREGRP22 NULL, NULL, 22, NULL, USE_PREFIX_USER_TABLE, NULL, 0
 #define PREGRP23 NULL, NULL, 23, NULL, USE_PREFIX_USER_TABLE, NULL, 0
 #define PREGRP24 NULL, NULL, 24, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP25 NULL, NULL, 25, NULL, USE_PREFIX_USER_TABLE, NULL, 0
+#define PREGRP26 NULL, NULL, 26, NULL, USE_PREFIX_USER_TABLE, NULL, 0
 
 #define FLOATCODE 50
 #define FLOAT NULL, NULL, FLOATCODE, NULL, 0, NULL, 0
@@ -1737,7 +1739,7 @@ static const struct dis386 dis386_twobyt
   { "punpckhwd", MX, EM, XX },
   { "punpckhdq", MX, EM, XX },
   { "packssdw", MX, EM, XX },
-  { "(bad)", XX, XX, XX },
+  { PREGRP26 },
   { PREGRP24 },
   { "movd", MX, Ed, XX },
   { PREGRP19 },
@@ -1875,7 +1877,7 @@ static const struct dis386 dis386_twobyt
   { "pmulhuw", MX, EM, XX },
   { "pmulhw", MX, EM, XX },
   { PREGRP15 },
-  { "movntq", Ev, MX, XX },
+  { PREGRP25 },
   /* e8 */
   { "psubsb", MX, EM, XX },
   { "psubsw", MX, EM, XX },
@@ -2029,7 +2031,7 @@ static const struct dis386 dis386_twobyt
   { "punpckhwd", MX, EM, XX },
   { "punpckhdq", MX, EM, XX },
   { "packssdw", MX, EM, XX },
-  { "(bad)", XX, XX, XX },
+  { PREGRP26 },
   { PREGRP24 },
   { "movd", MX, Ed, XX },
   { PREGRP19 },
@@ -2167,7 +2169,7 @@ static const struct dis386 dis386_twobyt
   { "pmulhuw", MX, EM, XX },
   { "pmulhw", MX, EM, XX },
   { PREGRP15 },
-  { "movntq", Ev, MX, XX },
+  { PREGRP25 },
   /* e8 */
   { "psubsb", MX, EM, XX },
   { "psubsw", MX, EM, XX },
@@ -2693,7 +2695,7 @@ static const struct dis386 prefix_user_t
   {
     { "maskmovq", MX, EM, XX },
     { "(bad)", XM, EX, XX },
-    { "maskmovdqu", MX, EX, XX },
+    { "maskmovdqu", XM, EX, XX },
     { "(bad)", XM, EX, XX },
   },
   /* PREGRP19 */
@@ -2729,14 +2731,28 @@ static const struct dis386 prefix_user_t
     { "movd", Ed, MX, XX },
     { "movq", Ed, XM, XX },
     { "movd", Ed, XM, XX },
-    { "(bad)", EX, XM, XX },
+    { "(bad)", Ed, XM, XX },
   },
   /* PREGRP24 */
   {
-    { "(bad)", EX, XM, XX },
-    { "(bad)", EX, XM, XX },
+    { "(bad)", MX, EX, XX },
+    { "(bad)", XM, EX, XX },
     { "punpckhqdq", XM, EX, XX },
-    { "(bad)", EX, XM, XX },
+    { "(bad)", XM, EX, XX },
+  },
+  /* PREGRP25 */
+  {
+  { "movntq", Ev, MX, XX },
+  { "(bad)", Ev, XM, XX },
+  { "movntdq", Ev, XM, XX },
+  { "(bad)", Ev, XM, XX },
+  },
+  /* PREGRP26 */
+  {
+    { "(bad)", MX, EX, XX },
+    { "(bad)", XM, EX, XX },
+    { "punpcklqdq", XM, EX, XX },
+    { "(bad)", XM, EX, XX },
   },
 };
 
Index: gas/testsuite/ChangeLog
===================================================================
RCS file: /cvs/src/src/gas/testsuite/ChangeLog,v
retrieving revision 1.142
diff -u -p -r1.142 ChangeLog
--- ChangeLog	2001/03/23 05:58:38	1.142
+++ ChangeLog	2001/03/24 06:15:39
@@ -1,3 +1,8 @@
+2001-03-24  Alan Modra  <alan@linuxcare.com.au>
+
+	* gas/i386/ssemmx2.s: Fix movntdq insn.
+	* gas/i386/ssemmx2.d: Matching change.
+
 2001-03-23  Hans-Peter Nilsson  <hp@axis.com>
 
 	* gas/cris/pic-err-1.s, gas/cris/rd-pic-1.s, gas/cris/rd-pic-1.d:
Index: gas/testsuite/gas/i386/ssemmx2.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/i386/ssemmx2.d,v
retrieving revision 1.2
diff -u -p -r1.2 ssemmx2.d
--- ssemmx2.d	2001/01/12 03:34:49	1.2
+++ ssemmx2.d	2001/03/24 06:15:42
@@ -33,7 +33,7 @@ Disassembly of section .text:
 [ 	]+65:	f3 0f 70 75 00 04[ 	]+pshufhw \$0x4,0x0\(%ebp\),%xmm6
 [ 	]+6b:	f2 0f 70 da 01[ 	]+pshuflw \$0x1,%xmm2,%xmm3
 [ 	]+70:	f2 0f 70 75 00 04[ 	]+pshuflw \$0x4,0x0\(%ebp\),%xmm6
-[ 	]+76:	66 0f e7 10[ 	]+movntq %xmm2,\(%eax\)
+[ 	]+76:	66 0f e7 10[ 	]+movntdq %xmm2,\(%eax\)
 [ 	]+7a:	66 0f 60 90 90 90 90 90 	punpcklbw 0x90909090\(%eax\),%xmm2
 [ 	]+82:	66 0f 61 90 90 90 90 90 	punpcklwd 0x90909090\(%eax\),%xmm2
 [ 	]+8a:	66 0f 62 90 90 90 90 90 	punpckldq 0x90909090\(%eax\),%xmm2
Index: gas/testsuite/gas/i386/ssemmx2.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/i386/ssemmx2.s,v
retrieving revision 1.2
diff -u -p -r1.2 ssemmx2.s
--- ssemmx2.s	2001/01/12 03:34:49	1.2
+++ ssemmx2.s	2001/03/24 06:15:42
@@ -26,7 +26,7 @@ foo:
 	pshufhw		$0x4,0x0(%ebp),%xmm6
 	pshuflw		$0x1,%xmm2,%xmm3
 	pshuflw		$0x4,0x0(%ebp),%xmm6
-	movntq		%xmm2,(%eax)
+	movntdq		%xmm2,(%eax)
 	punpcklbw	0x90909090(%eax),%xmm2
 	punpcklwd	0x90909090(%eax),%xmm2
 	punpckldq	0x90909090(%eax),%xmm2


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