Commit 28e1071183b2bfd27628b7dc1600cf9a3556a6ce

Authored by bellard
1 parent d643ccca

fix cvtsq2s[sd] (Juergen Lock)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4856 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 6 additions and 2 deletions
target-i386/translate.c
... ... @@ -3340,8 +3340,12 @@ static void gen_sse(DisasContext *s, int b, target_ulong pc_start, int rex_r)
3340 3340 op1_offset = offsetof(CPUX86State,xmm_regs[reg]);
3341 3341 tcg_gen_addi_ptr(cpu_ptr0, cpu_env, op1_offset);
3342 3342 sse_op2 = sse_op_table3[(s->dflag == 2) * 2 + ((b >> 8) - 2)];
3343   - tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]);
3344   - tcg_gen_helper_0_2(sse_op2, cpu_ptr0, cpu_tmp2_i32);
  3343 + if (ot == OT_LONG) {
  3344 + tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]);
  3345 + tcg_gen_helper_0_2(sse_op2, cpu_ptr0, cpu_tmp2_i32);
  3346 + } else {
  3347 + tcg_gen_helper_0_2(sse_op2, cpu_ptr0, cpu_T[0]);
  3348 + }
3345 3349 break;
3346 3350 case 0x02c: /* cvttps2pi */
3347 3351 case 0x12c: /* cvttpd2pi */
... ...