aboutsummaryrefslogtreecommitdiff
path: root/target-microblaze
diff options
context:
space:
mode:
authorPeter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>2012-06-05 12:31:04 +1000
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2012-06-07 10:12:00 +0200
commit083dbf489d1b0592e910ecfb90b3858c23e49ab7 (patch)
treeae07f596da360a00eaccb38ec9f0b7f72d01f533 /target-microblaze
parent349417004a0f7cf5518a998dca755cd06f6c212b (diff)
downloadqemu-083dbf489d1b0592e910ecfb90b3858c23e49ab7.zip
qemu-083dbf489d1b0592e910ecfb90b3858c23e49ab7.tar.gz
qemu-083dbf489d1b0592e910ecfb90b3858c23e49ab7.tar.bz2
target-microblaze: fix swx build breakage
The lazy initialisation of r_check was throwing an error on --enable-debug. Removed the lazy initialisation of r_check and swx_addr. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'target-microblaze')
-rw-r--r--target-microblaze/translate.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
index 02b2dc6..c0a6bfd 100644
--- a/target-microblaze/translate.c
+++ b/target-microblaze/translate.c
@@ -1105,7 +1105,7 @@ static void gen_store(DisasContext *dc, TCGv addr, TCGv val,
static void dec_store(DisasContext *dc)
{
- TCGv t, *addr, swx_addr, r_check = 0;
+ TCGv t, *addr, swx_addr, r_check;
int swx_skip = 0;
unsigned int size, rev = 0, ex = 0;
@@ -1129,9 +1129,9 @@ 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 */
- r_check = tcg_temp_new();
- swx_addr = tcg_temp_local_new();
/* Force addr into the swx_addr. */
tcg_gen_mov_tl(swx_addr, *addr);
@@ -1221,11 +1221,12 @@ static void dec_store(DisasContext *dc)
gen_helper_memalign(*addr, tcg_const_tl(dc->rd),
tcg_const_tl(1), tcg_const_tl(size - 1));
}
+
if (ex) {
gen_set_label(swx_skip);
- tcg_temp_free(r_check);
- tcg_temp_free(swx_addr);
}
+ tcg_temp_free(r_check);
+ tcg_temp_free(swx_addr);
if (addr == &t)
tcg_temp_free(t);