qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [4724] Fix data type mixup, spotted by malc.


From: Thiemo Seufer
Subject: [Qemu-devel] [4724] Fix data type mixup, spotted by malc.
Date: Tue, 10 Jun 2008 01:18:34 +0000

Revision: 4724
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4724
Author:   ths
Date:     2008-06-10 01:18:32 +0000 (Tue, 10 Jun 2008)

Log Message:
-----------
Fix data type mixup, spotted by malc.

Modified Paths:
--------------
    trunk/target-mips/translate.c

Modified: trunk/target-mips/translate.c
===================================================================
--- trunk/target-mips/translate.c       2008-06-10 00:11:48 UTC (rev 4723)
+++ trunk/target-mips/translate.c       2008-06-10 01:18:32 UTC (rev 4724)
@@ -2595,11 +2595,8 @@
 
 static inline void gen_mfc0_load64 (TCGv t, target_ulong off)
 {
-    TCGv r_tmp = tcg_temp_new(TCG_TYPE_I64);
-
-    tcg_gen_ld_i64(r_tmp, cpu_env, off);
-    tcg_gen_trunc_i64_tl(t, r_tmp);
-    tcg_temp_free(r_tmp);
+    tcg_gen_ld_tl(t, cpu_env, off);
+    tcg_gen_ext32s_tl(t, t);
 }
 
 static inline void gen_mtc0_store32 (TCGv t, target_ulong off)
@@ -2613,11 +2610,8 @@
 
 static inline void gen_mtc0_store64 (TCGv t, target_ulong off)
 {
-    TCGv r_tmp = tcg_temp_new(TCG_TYPE_I64);
-
-    tcg_gen_ext_tl_i64(r_tmp, t);
-    tcg_gen_st_i64(r_tmp, cpu_env, off);
-    tcg_temp_free(r_tmp);
+    tcg_gen_ext32s_tl(t, t);
+    tcg_gen_st_tl(t, cpu_env, off);
 }
 
 static void gen_mfc0 (CPUState *env, DisasContext *ctx, int reg, int sel)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]