]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target-i386: fix compilation with --enable-debug-tcg
authorAurelien Jarno <aurelien@aurel32.net>
Fri, 13 Jan 2012 15:01:40 +0000 (16:01 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 13 Jan 2012 15:01:40 +0000 (16:01 +0100)
Commit 2355c16e74ffa4d14e7fc2b4a23b055565ac0221 introduced a new ldmxcsr
helper taking an i32 argument, but the helper is actually passed a long.
Fix that by truncating the long to i32.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-i386/translate.c

index b9839c5d961e10c2595758d5a2e9d486b047f866..860b4a325f4c15cc6e0bc063d8c4abacdcd19c46 100644 (file)
@@ -7544,7 +7544,8 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
             gen_lea_modrm(s, modrm, &reg_addr, &offset_addr);
             if (op == 2) {
                 gen_op_ld_T0_A0(OT_LONG + s->mem_index);
-                gen_helper_ldmxcsr(cpu_T[0]);
+                tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]);
+                gen_helper_ldmxcsr(cpu_tmp2_i32);
             } else {
                 tcg_gen_ld32u_tl(cpu_T[0], cpu_env, offsetof(CPUX86State, mxcsr));
                 gen_op_st_T0_A0(OT_LONG + s->mem_index);