Correct cvtps2dq, movdq2q, movq2dq, and movq problems.
authorAlan Modra <amodra@gmail.com>
Sat, 12 May 2001 09:52:40 +0000 (09:52 +0000)
committerAlan Modra <amodra@gmail.com>
Sat, 12 May 2001 09:52:40 +0000 (09:52 +0000)
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/sse2.d
gas/testsuite/gas/i386/sse2.s
gas/testsuite/gas/i386/ssemmx2.d
include/opcode/ChangeLog
include/opcode/i386.h
opcodes/ChangeLog
opcodes/i386-dis.c

index a353b5e..c1d821b 100644 (file)
@@ -1,3 +1,10 @@
+2001-05-12  Alan Modra  <amodra@one.net.au>
+
+       * gas/i386/sse2.s: Correct cvtps2dq, movdq2q, and movq2dq
+       * gas/i386/sse2.d: Likewise.  Fix pmuludq too.
+
+       * gas/i386/ssemmx2.d: Correct movq.
+
 2001-05-10  Hans-Peter Nilsson  <hp@axis.com>
 
        * gas/cris/rd-dw2-10.d: Tweak for change in gas dwarf2 line number
index 6a55b6f..42a644f 100644 (file)
@@ -143,9 +143,9 @@ Disassembly of section .text:
  245:  66 0f 6f c8[    ]+movdqa %xmm0,%xmm1
  249:  f3 0f 6f c8[    ]+movdqu %xmm0,%xmm1
  24d:  f3 0f 6f c8[    ]+movdqu %xmm0,%xmm1
- 251:  f2 0f d6 c8[    ]+movdq2q %mm1,%mm0
- 255:  f3 0f d6 c8 66[         ]+movq2dq %mm0,%xmm0
- 25a:  0f f4 c8[       ]+pmuludq %mm0,%mm1
+ 251:  f2 0f d6 c8[    ]+movdq2q %xmm0,%mm1
+ 255:  f3 0f d6 c8[    ]+movq2dq %mm0,%xmm1
+ 25a:  66 0f f4 c8[    ]+pmuludq %xmm0,%xmm1
  25d:  66 0f f4 c8[    ]+pmuludq %xmm0,%xmm1
  261:  66 0f 70 c8 01[         ]+pshufd \$0x1,%xmm0,%xmm1
  266:  f3 0f 70 c8 01[         ]+pshufhw \$0x1,%xmm0,%xmm1
index c997162..ba5ae8d 100644 (file)
@@ -125,7 +125,7 @@ foo:
        cvtdq2ps        %xmm0, %xmm1
        cvtpd2ps        %xmm0, %xmm1
        cvtps2pd        %xmm0, %xmm1
-       cvtps2dq        %xmm0, %mm1
+       cvtps2dq        %xmm0, %xmm1
        cvtsd2ss        %xmm0, %xmm1
        cvtss2sd        %xmm0, %xmm1
        cvttpd2dq       %xmm0, %xmm1
@@ -135,8 +135,8 @@ foo:
        movdqa          %xmm0, %xmm1
        movdqu          %xmm0, %xmm1
        movdqu          %xmm0, %xmm1
-       movdq2q         %mm0, %xmm1
-       movq2dq         %xmm0, %mm1
+       movdq2q         %xmm0, %mm1
+       movq2dq         %mm0, %xmm1
        pmuludq         %xmm0, %xmm1
        pmuludq         %xmm0, %xmm1
        pshufd          $1, %xmm0, %xmm1
index 39cc68c..e677870 100644 (file)
@@ -47,7 +47,7 @@ Disassembly of section .text:
 [      ]+ca:   66 0f 6a 90 90 90 90 90         punpckhdq 0x90909090\(%eax\),%xmm2
 [      ]+d2:   66 0f 6b 90 90 90 90 90         packssdw 0x90909090\(%eax\),%xmm2
 [      ]+da:   66 0f 6e 90 90 90 90 90         movd[   ]+0x90909090\(%eax\),%xmm2
-[      ]+e2:   f3 0f 7e 90 90 90 90 90         movq[   ]+%xmm2,0x90909090\(%eax\)
+[      ]+e2:   f3 0f 7e 90 90 90 90 90         movq[   ]+0x90909090\(%eax\),%xmm2
 [      ]+ea:   66 0f 71 d0 90[         ]+psrlw[        ]+\$0x90,%xmm0
 [      ]+ef:   66 0f 72 d0 90[         ]+psrld[        ]+\$0x90,%xmm0
 [      ]+f4:   66 0f 73 d0 90[         ]+psrlq[        ]+\$0x90,%xmm0
index 863713a..14b2193 100644 (file)
@@ -1,3 +1,9 @@
+2001-05-12  Alan Modra  <amodra@one.net.au>
+
+       * i386.h (i386_optab): Second operand of cvtps2dq is an xmm reg,
+       not an mmx reg.  Swap xmm/mmx regs on both movdq2q and movq2dq,
+       and use InvMem as these insns must have register operands.
+
 2001-05-04  Alan Modra  <amodra@one.net.au>
 
        * i386.h (i386_optab): Move InvMem to first operand of pmovmskb
index 3609748..38de44a 100644 (file)
@@ -1254,7 +1254,7 @@ static const template i386_optab[] = {
 {"cvtpd2pi",  2, 0x660f2d,  X, CpuSSE2, FP|Modrm,      { RegXMM|LLongMem, RegMMX, 0 } },
 {"cvtpd2ps",  2, 0x660f5a,  X, CpuSSE2, FP|Modrm,      { RegXMM|LLongMem, RegXMM, 0 } },
 {"cvtps2pd",  2, 0x0f5a,    X, CpuSSE2, FP|Modrm,      { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtps2dq",  2, 0x660f5b,  X, CpuSSE2, FP|Modrm,      { RegXMM|LLongMem, RegMMX, 0 } },
+{"cvtps2dq",  2, 0x660f5b,  X, CpuSSE2, FP|Modrm,      { RegXMM|LLongMem, RegXMM, 0 } },
 {"cvtsd2si",  2, 0xf20f2d,  X, CpuSSE2, lq_Suf|IgnoreSize|Modrm,{ RegXMM|LLongMem, Reg32|Reg64, 0 } },
 {"cvtsd2ss",  2, 0xf20f5a,  X, CpuSSE2, FP|Modrm,      { RegXMM|LLongMem, RegXMM, 0 } },
 {"cvtss2sd",  2, 0xf30f5a,  X, CpuSSE2, FP|Modrm,      { RegXMM|LLongMem, RegXMM, 0 } },
@@ -1267,8 +1267,8 @@ static const template i386_optab[] = {
 {"movdqa",    2, 0x660f7f,  X, CpuSSE2, FP|Modrm,      { RegXMM, RegXMM|LLongMem, 0 } },
 {"movdqu",    2, 0xf30f6f,  X, CpuSSE2, FP|Modrm,      { RegXMM|LLongMem, RegXMM, 0 } },
 {"movdqu",    2, 0xf30f7f,  X, CpuSSE2, FP|Modrm,      { RegXMM, RegXMM|LLongMem, 0 } },
-{"movdq2q",    2, 0xf20fd6,  X, CpuSSE2, FP|Modrm,     { RegMMX|LLongMem, RegXMM, 0 } },
-{"movq2dq",   2, 0xf30fd6,  X, CpuSSE2, FP|Modrm,      { RegXMM|LLongMem, RegMMX, 0 } },
+{"movdq2q",    2, 0xf20fd6,  X, CpuSSE2, FP|Modrm,     { RegXMM|InvMem, RegMMX, 0 } },
+{"movq2dq",   2, 0xf30fd6,  X, CpuSSE2, FP|Modrm,      { RegMMX|InvMem, RegXMM, 0 } },
 {"pmuludq",   2, 0x0ff4,    X, CpuSSE2, FP|Modrm,      { RegMMX|LongMem, RegMMX, 0 } },
 {"pmuludq",   2, 0x660ff4,  X, CpuSSE2, FP|Modrm,      { RegXMM|LongMem, RegXMM, 0 } },
 {"pshufd",    3, 0x660f70,  X, CpuSSE2, FP|Modrm,      { Imm8, RegXMM|LLongMem, RegXMM } },
index d390515..b4f61fc 100644 (file)
@@ -1,3 +1,8 @@
+2001-05-12  Alan Modra  <amodra@one.net.au>
+
+       * i386-dis.c (prefix_user_table): Correct movq2dq, movdq2q, and
+       movq operands.
+
 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
 
        * cgen-dis.in (default_print_insn): Tolerate min<base instructions
index 005a12c..f1d9e14 100644 (file)
@@ -2716,9 +2716,9 @@ static const struct dis386 prefix_user_table[][4] = {
   /* PREGRP21 */
   {
     { "(bad)", EX, XM, XX },
-    { "movq2dq", EX, EM, XX },
+    { "movq2dq", XM, MS, XX },
     { "movq", EX, XM, XX },
-    { "movdq2q", EM, MX, XX },
+    { "movdq2q", MX, XS, XX },
   },
   /* PREGRP22 */
   {
@@ -2730,7 +2730,7 @@ static const struct dis386 prefix_user_table[][4] = {
   /* PREGRP23 */
   {
     { "movd", Ed, MX, XX },
-    { "movq", Ed, XM, XX },
+    { "movq", XM, EX, XX },
     { "movd", Ed, XM, XX },
     { "(bad)", Ed, XM, XX },
   },