Commit d1e42c5c1e312320460509c5ab1e94fb17cb7515

Authored by bellard
1 parent 4bb3973f

x86_64 mmx/sse fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1969 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 11 additions and 1 deletions
target-i386/translate.c
@@ -2905,6 +2905,7 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) @@ -2905,6 +2905,7 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r)
2905 break; 2905 break;
2906 case 0xc4: /* pinsrw */ 2906 case 0xc4: /* pinsrw */
2907 case 0x1c4: 2907 case 0x1c4:
  2908 + s->rip_offset = 1;
2908 gen_ldst_modrm(s, modrm, OT_WORD, OR_TMP0, 0); 2909 gen_ldst_modrm(s, modrm, OT_WORD, OR_TMP0, 0);
2909 val = ldub_code(s->pc++); 2910 val = ldub_code(s->pc++);
2910 if (b1) { 2911 if (b1) {
@@ -2975,7 +2976,8 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) @@ -2975,7 +2976,8 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r)
2975 } 2976 }
2976 } else { 2977 } else {
2977 /* generic MMX or SSE operation */ 2978 /* generic MMX or SSE operation */
2978 - if (b == 0xf7) { 2979 + switch(b) {
  2980 + case 0xf7:
2979 /* maskmov : we must prepare A0 */ 2981 /* maskmov : we must prepare A0 */
2980 if (mod != 3) 2982 if (mod != 3)
2981 goto illegal_op; 2983 goto illegal_op;
@@ -2990,6 +2992,14 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r) @@ -2990,6 +2992,14 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r)
2990 gen_op_andl_A0_ffff(); 2992 gen_op_andl_A0_ffff();
2991 } 2993 }
2992 gen_add_A0_ds_seg(s); 2994 gen_add_A0_ds_seg(s);
  2995 + break;
  2996 + case 0x70: /* pshufx insn */
  2997 + case 0xc6: /* pshufx insn */
  2998 + case 0xc2: /* compare insns */
  2999 + s->rip_offset = 1;
  3000 + break;
  3001 + default:
  3002 + break;
2993 } 3003 }
2994 if (is_xmm) { 3004 if (is_xmm) {
2995 op1_offset = offsetof(CPUX86State,xmm_regs[reg]); 3005 op1_offset = offsetof(CPUX86State,xmm_regs[reg]);