[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/10] microblaze: Turn res_addr into a tcg global
From: |
edgar . iglesias |
Subject: |
[Qemu-devel] [PATCH 07/10] microblaze: Turn res_addr into a tcg global |
Date: |
Thu, 24 Oct 2013 23:08:54 +0200 |
From: "Edgar E. Iglesias" <address@hidden>
Signed-off-by: Edgar E. Iglesias <address@hidden>
---
target-microblaze/translate.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
index 021a504..57627fc 100644
--- a/target-microblaze/translate.c
+++ b/target-microblaze/translate.c
@@ -49,6 +49,7 @@ static TCGv env_imm;
static TCGv env_btaken;
static TCGv env_btarget;
static TCGv env_iflags;
+static TCGv env_res_addr;
#include "exec/gen-icount.h"
@@ -877,7 +878,7 @@ static inline void gen_load(DisasContext *dc, TCGv dst,
TCGv addr,
cpu_abort(dc->env, "Incorrect load size %d\n", size);
if (exclusive) {
- tcg_gen_st_tl(addr, cpu_env, offsetof(CPUMBState, res_addr));
+ tcg_gen_mov_tl(env_res_addr, addr);
}
}
@@ -1101,7 +1102,7 @@ static void gen_store(DisasContext *dc, TCGv addr, TCGv
val,
static void dec_store(DisasContext *dc)
{
- TCGv t, *addr, swx_addr, r_check;
+ TCGv t, *addr, swx_addr;
int swx_skip = 0;
unsigned int size, rev = 0, ex = 0;
@@ -1125,7 +1126,6 @@ static void dec_store(DisasContext *dc)
sync_jmpstate(dc);
addr = compute_ldst_addr(dc, &t);
- r_check = tcg_temp_new();
swx_addr = tcg_temp_local_new();
if (ex) { /* swx */
@@ -1135,10 +1135,9 @@ static void dec_store(DisasContext *dc)
/* swx does not throw unaligned access errors, so force alignment */
tcg_gen_andi_tl(swx_addr, swx_addr, ~3);
- tcg_gen_ld_tl(r_check, cpu_env, offsetof(CPUMBState, res_addr));
write_carryi(dc, 1);
swx_skip = gen_new_label();
- tcg_gen_brcond_tl(TCG_COND_NE, r_check, swx_addr, swx_skip);
+ tcg_gen_brcond_tl(TCG_COND_NE, env_res_addr, swx_addr, swx_skip);
write_carryi(dc, 0);
}
@@ -1221,7 +1220,6 @@ static void dec_store(DisasContext *dc)
if (ex) {
gen_set_label(swx_skip);
}
- tcg_temp_free(r_check);
tcg_temp_free(swx_addr);
if (addr == &t)
@@ -2008,6 +2006,9 @@ void mb_tcg_init(void)
env_btaken = tcg_global_mem_new(TCG_AREG0,
offsetof(CPUMBState, btaken),
"btaken");
+ env_res_addr = tcg_global_mem_new(TCG_AREG0,
+ offsetof(CPUMBState, res_addr),
+ "res_addr");
for (i = 0; i < ARRAY_SIZE(cpu_R); i++) {
cpu_R[i] = tcg_global_mem_new(TCG_AREG0,
offsetof(CPUMBState, regs[i]),
--
1.7.10.4
- [Qemu-devel] [PATCH 00/10] MicroBlaze queue, edgar . iglesias, 2013/10/24
- [Qemu-devel] [PATCH 01/10] microblaze: Clarify expected input of write_carry, edgar . iglesias, 2013/10/24
- [Qemu-devel] [PATCH 02/10] microblaze: Make write_carryi input a boolean, edgar . iglesias, 2013/10/24
- [Qemu-devel] [PATCH 03/10] microblaze: Simplify andn by using tcg_gen_andc, edgar . iglesias, 2013/10/24
- [Qemu-devel] [PATCH 04/10] microblaze: Improve srl, edgar . iglesias, 2013/10/24
- [Qemu-devel] [PATCH 05/10] microblaze: Improve src, edgar . iglesias, 2013/10/24
- [Qemu-devel] [PATCH 06/10] microblaze: Move the saving of the reservation addr into gen_load, edgar . iglesias, 2013/10/24
- [Qemu-devel] [PATCH 07/10] microblaze: Turn res_addr into a tcg global,
edgar . iglesias <=
- [Qemu-devel] [PATCH 08/10] microblaze: At swx, check that the reserved word is unmodified, edgar . iglesias, 2013/10/24
- [Qemu-devel] [PATCH 09/10] hw/microblaze: Indentation cleanups, edgar . iglesias, 2013/10/24
- [Qemu-devel] [PATCH 10/10] hw/microblaze: Add support for loading initrd images, edgar . iglesias, 2013/10/24