qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v2 9/9] target-sh4: simplify tas instruction


From: Aurelien Jarno
Subject: [Qemu-devel] [PATCH v2 9/9] target-sh4: simplify tas instruction
Date: Sun, 22 Dec 2013 12:50:39 +0100

Now that setcondi is used instead of branches, temp_local are not needed
anymore.

Signed-off-by: Aurelien Jarno <address@hidden>
---
 target-sh4/translate.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/target-sh4/translate.c b/target-sh4/translate.c
index 9a878d0..e73932c 100644
--- a/target-sh4/translate.c
+++ b/target-sh4/translate.c
@@ -1673,16 +1673,12 @@ static void _decode_opc(DisasContext * ctx)
        return;
     case 0x401b:               /* tas.b @Rn */
        {
-           TCGv addr, val;
-           addr = tcg_temp_local_new();
-           tcg_gen_mov_i32(addr, REG(B11_8));
-           val = tcg_temp_local_new();
-            tcg_gen_qemu_ld_i32(val, addr, ctx->memidx, MO_UB);
+           TCGv val = tcg_temp_new();
+            tcg_gen_qemu_ld_i32(val, REG(B11_8), ctx->memidx, MO_UB);
             tcg_gen_setcondi_i32(TCG_COND_EQ, cpu_sr_t, val, 0);
            tcg_gen_ori_i32(val, val, 0x80);
-            tcg_gen_qemu_st_i32(val, addr, ctx->memidx, MO_UB);
+            tcg_gen_qemu_st_i32(val, REG(B11_8), ctx->memidx, MO_UB);
            tcg_temp_free(val);
-           tcg_temp_free(addr);
        }
        return;
     case 0xf00d: /* fsts FPUL,FRn - FPSCR: Nothing */
-- 
1.7.10.4




reply via email to

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