Revision 4a536270
b/target-microblaze/translate.c | ||
---|---|---|
49 | 49 |
static TCGv env_btaken; |
50 | 50 |
static TCGv env_btarget; |
51 | 51 |
static TCGv env_iflags; |
52 |
static TCGv env_res_addr; |
|
52 | 53 |
|
53 | 54 |
#include "exec/gen-icount.h" |
54 | 55 |
|
... | ... | |
877 | 878 |
cpu_abort(dc->env, "Incorrect load size %d\n", size); |
878 | 879 |
|
879 | 880 |
if (exclusive) { |
880 |
tcg_gen_st_tl(addr, cpu_env, offsetof(CPUMBState, res_addr));
|
|
881 |
tcg_gen_mov_tl(env_res_addr, addr);
|
|
881 | 882 |
} |
882 | 883 |
} |
883 | 884 |
|
... | ... | |
1101 | 1102 |
|
1102 | 1103 |
static void dec_store(DisasContext *dc) |
1103 | 1104 |
{ |
1104 |
TCGv t, *addr, swx_addr, r_check;
|
|
1105 |
TCGv t, *addr, swx_addr; |
|
1105 | 1106 |
int swx_skip = 0; |
1106 | 1107 |
unsigned int size, rev = 0, ex = 0; |
1107 | 1108 |
|
... | ... | |
1125 | 1126 |
sync_jmpstate(dc); |
1126 | 1127 |
addr = compute_ldst_addr(dc, &t); |
1127 | 1128 |
|
1128 |
r_check = tcg_temp_new(); |
|
1129 | 1129 |
swx_addr = tcg_temp_local_new(); |
1130 | 1130 |
if (ex) { /* swx */ |
1131 | 1131 |
|
... | ... | |
1135 | 1135 |
/* swx does not throw unaligned access errors, so force alignment */ |
1136 | 1136 |
tcg_gen_andi_tl(swx_addr, swx_addr, ~3); |
1137 | 1137 |
|
1138 |
tcg_gen_ld_tl(r_check, cpu_env, offsetof(CPUMBState, res_addr)); |
|
1139 | 1138 |
write_carryi(dc, 1); |
1140 | 1139 |
swx_skip = gen_new_label(); |
1141 |
tcg_gen_brcond_tl(TCG_COND_NE, r_check, swx_addr, swx_skip);
|
|
1140 |
tcg_gen_brcond_tl(TCG_COND_NE, env_res_addr, swx_addr, swx_skip);
|
|
1142 | 1141 |
write_carryi(dc, 0); |
1143 | 1142 |
} |
1144 | 1143 |
|
... | ... | |
1221 | 1220 |
if (ex) { |
1222 | 1221 |
gen_set_label(swx_skip); |
1223 | 1222 |
} |
1224 |
tcg_temp_free(r_check); |
|
1225 | 1223 |
tcg_temp_free(swx_addr); |
1226 | 1224 |
|
1227 | 1225 |
if (addr == &t) |
... | ... | |
2008 | 2006 |
env_btaken = tcg_global_mem_new(TCG_AREG0, |
2009 | 2007 |
offsetof(CPUMBState, btaken), |
2010 | 2008 |
"btaken"); |
2009 |
env_res_addr = tcg_global_mem_new(TCG_AREG0, |
|
2010 |
offsetof(CPUMBState, res_addr), |
|
2011 |
"res_addr"); |
|
2011 | 2012 |
for (i = 0; i < ARRAY_SIZE(cpu_R); i++) { |
2012 | 2013 |
cpu_R[i] = tcg_global_mem_new(TCG_AREG0, |
2013 | 2014 |
offsetof(CPUMBState, regs[i]), |
Also available in: Unified diff