From 4545c7bfb9ebebbfc991e31a53ea28ad22c30163 Mon Sep 17 00:00:00 2001 From: amodra Date: Sat, 12 May 2001 09:52:37 +0000 Subject: [PATCH] Correct cvtps2dq, movdq2q, movq2dq, and movq problems. --- gas/testsuite/ChangeLog | 7 +++++++ gas/testsuite/gas/i386/sse2.d | 6 +++--- gas/testsuite/gas/i386/sse2.s | 6 +++--- gas/testsuite/gas/i386/ssemmx2.d | 2 +- include/opcode/ChangeLog | 6 ++++++ include/opcode/i386.h | 6 +++--- opcodes/ChangeLog | 5 +++++ opcodes/i386-dis.c | 6 +++--- 8 files changed, 31 insertions(+), 13 deletions(-) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index a353b5e427..c1d821ba74 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2001-05-12 Alan Modra + + * 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 * gas/cris/rd-dw2-10.d: Tweak for change in gas dwarf2 line number diff --git a/gas/testsuite/gas/i386/sse2.d b/gas/testsuite/gas/i386/sse2.d index 6a55b6f566..42a644fead 100644 --- a/gas/testsuite/gas/i386/sse2.d +++ b/gas/testsuite/gas/i386/sse2.d @@ -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 diff --git a/gas/testsuite/gas/i386/sse2.s b/gas/testsuite/gas/i386/sse2.s index c9971626bd..ba5ae8d7b4 100644 --- a/gas/testsuite/gas/i386/sse2.s +++ b/gas/testsuite/gas/i386/sse2.s @@ -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 diff --git a/gas/testsuite/gas/i386/ssemmx2.d b/gas/testsuite/gas/i386/ssemmx2.d index 39cc68c02c..e67787025a 100644 --- a/gas/testsuite/gas/i386/ssemmx2.d +++ b/gas/testsuite/gas/i386/ssemmx2.d @@ -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 diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog index 863713a64c..14b2193d04 100644 --- a/include/opcode/ChangeLog +++ b/include/opcode/ChangeLog @@ -1,3 +1,9 @@ +2001-05-12 Alan Modra + + * 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 * i386.h (i386_optab): Move InvMem to first operand of pmovmskb diff --git a/include/opcode/i386.h b/include/opcode/i386.h index 3609748568..38de44aca0 100644 --- a/include/opcode/i386.h +++ b/include/opcode/i386.h @@ -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 } }, diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index d39051533a..b4f61fc4ce 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2001-05-12 Alan Modra + + * i386-dis.c (prefix_user_table): Correct movq2dq, movdq2q, and + movq operands. + 2001-05-07 Frank Ch. Eigler * cgen-dis.in (default_print_insn): Tolerate min