Commit 480c1cdb394fc9c0726b09891c573ee1a92765a3
1 parent
80e7d521
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
Showing
1 changed file
with
8 additions
and
8 deletions
target-i386/translate.c
... | ... | @@ -2946,16 +2946,16 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) |
2946 | 2946 | break; |
2947 | 2947 | case 0x2d6: /* movq2dq */ |
2948 | 2948 | gen_op_enter_mmx(); |
2949 | - rm = (modrm & 7) | REX_B(s); | |
2950 | - gen_op_movq(offsetof(CPUX86State,xmm_regs[rm].XMM_Q(0)), | |
2951 | - offsetof(CPUX86State,fpregs[reg & 7].mmx)); | |
2952 | - gen_op_movq_env_0(offsetof(CPUX86State,xmm_regs[rm].XMM_Q(1))); | |
2949 | + rm = (modrm & 7); | |
2950 | + gen_op_movq(offsetof(CPUX86State,xmm_regs[reg].XMM_Q(0)), | |
2951 | + offsetof(CPUX86State,fpregs[rm].mmx)); | |
2952 | + gen_op_movq_env_0(offsetof(CPUX86State,xmm_regs[reg].XMM_Q(1))); | |
2953 | 2953 | break; |
2954 | 2954 | case 0x3d6: /* movdq2q */ |
2955 | 2955 | gen_op_enter_mmx(); |
2956 | - rm = (modrm & 7); | |
2957 | - gen_op_movq(offsetof(CPUX86State,fpregs[rm].mmx), | |
2958 | - offsetof(CPUX86State,xmm_regs[reg].XMM_Q(0))); | |
2956 | + rm = (modrm & 7) | REX_B(s); | |
2957 | + gen_op_movq(offsetof(CPUX86State,fpregs[reg & 7].mmx), | |
2958 | + offsetof(CPUX86State,xmm_regs[rm].XMM_Q(0))); | |
2959 | 2959 | break; |
2960 | 2960 | case 0xd7: /* pmovmskb */ |
2961 | 2961 | case 0x1d7: |
... | ... | @@ -3006,7 +3006,7 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) |
3006 | 3006 | if (mod != 3) { |
3007 | 3007 | gen_lea_modrm(s, modrm, ®_addr, &offset_addr); |
3008 | 3008 | op2_offset = offsetof(CPUX86State,xmm_t0); |
3009 | - if (b1 >= 2 && ((b >= 0x50 && b <= 0x5f) || | |
3009 | + if (b1 >= 2 && ((b >= 0x50 && b <= 0x5f && b != 0x5b) || | |
3010 | 3010 | b == 0xc2)) { |
3011 | 3011 | /* specific case for SSE single instructions */ |
3012 | 3012 | if (b1 == 2) { | ... | ... |