fix for movq2dq, movdq2q and cvttps2dq (thanx to Julian Seward and malc)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2005 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2006-06-24 14:03:10 +00:00
parent 80e7d52103
commit 480c1cdb39
1 changed files with 8 additions and 8 deletions

View File

@ -2946,16 +2946,16 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r)
break; break;
case 0x2d6: /* movq2dq */ case 0x2d6: /* movq2dq */
gen_op_enter_mmx(); gen_op_enter_mmx();
rm = (modrm & 7) | REX_B(s); rm = (modrm & 7);
gen_op_movq(offsetof(CPUX86State,xmm_regs[rm].XMM_Q(0)), gen_op_movq(offsetof(CPUX86State,xmm_regs[reg].XMM_Q(0)),
offsetof(CPUX86State,fpregs[reg & 7].mmx)); offsetof(CPUX86State,fpregs[rm].mmx));
gen_op_movq_env_0(offsetof(CPUX86State,xmm_regs[rm].XMM_Q(1))); gen_op_movq_env_0(offsetof(CPUX86State,xmm_regs[reg].XMM_Q(1)));
break; break;
case 0x3d6: /* movdq2q */ case 0x3d6: /* movdq2q */
gen_op_enter_mmx(); gen_op_enter_mmx();
rm = (modrm & 7); rm = (modrm & 7) | REX_B(s);
gen_op_movq(offsetof(CPUX86State,fpregs[rm].mmx), gen_op_movq(offsetof(CPUX86State,fpregs[reg & 7].mmx),
offsetof(CPUX86State,xmm_regs[reg].XMM_Q(0))); offsetof(CPUX86State,xmm_regs[rm].XMM_Q(0)));
break; break;
case 0xd7: /* pmovmskb */ case 0xd7: /* pmovmskb */
case 0x1d7: case 0x1d7:
@ -3006,7 +3006,7 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r)
if (mod != 3) { if (mod != 3) {
gen_lea_modrm(s, modrm, &reg_addr, &offset_addr); gen_lea_modrm(s, modrm, &reg_addr, &offset_addr);
op2_offset = offsetof(CPUX86State,xmm_t0); op2_offset = offsetof(CPUX86State,xmm_t0);
if (b1 >= 2 && ((b >= 0x50 && b <= 0x5f) || if (b1 >= 2 && ((b >= 0x50 && b <= 0x5f && b != 0x5b) ||
b == 0xc2)) { b == 0xc2)) {
/* specific case for SSE single instructions */ /* specific case for SSE single instructions */
if (b1 == 2) { if (b1 == 2) {