[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
- [Qemu-devel] [PATCH v2 0/9] target-sh4: optimizations and cleanups, Aurelien Jarno, 2013/12/22
- [Qemu-devel] [PATCH v2 6/9] target-sh4: split out Q and M from of SR and optimize div1, Aurelien Jarno, 2013/12/22
- [Qemu-devel] [PATCH v2 3/9] target-sh4: optimize addc using add2, Aurelien Jarno, 2013/12/22
- [Qemu-devel] [PATCH v2 2/9] target-sh4: Split out T from SR, Aurelien Jarno, 2013/12/22
- [Qemu-devel] [PATCH v2 5/9] target-sh4: optimize negc using add2 and sub2, Aurelien Jarno, 2013/12/22
- [Qemu-devel] [PATCH v2 9/9] target-sh4: simplify tas instruction,
Aurelien Jarno <=
- [Qemu-devel] [PATCH v2 8/9] target-sh4: remove dead code, Aurelien Jarno, 2013/12/22
- [Qemu-devel] [PATCH v2 4/9] target-sh4: optimize subc using sub2, Aurelien Jarno, 2013/12/22
- [Qemu-devel] [PATCH v2 7/9] target-sh4: factorize fmov implementation, Aurelien Jarno, 2013/12/22
- [Qemu-devel] [PATCH v2 1/9] target-sh4: use bit number for SR constants, Aurelien Jarno, 2013/12/22