aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/translate.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2015-09-03 08:42:23 -0700
committerRichard Henderson <rth@twiddle.net>2016-07-12 11:02:29 -0700
commit3f4288ebf6fca7b266fa42a74d9d99b961ba6844 (patch)
tree22152583ef77a48ff8a97d6227aa6e44c786b6d9 /target-sparc/translate.c
parentf0913be04be13cfb4f9341ae79e035fc8479fd28 (diff)
target-sparc: Use QT0 to return results from ldda
Also implement a few more twinx asis. Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-sparc/translate.c')
-rw-r--r--target-sparc/translate.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index 55364ad715..885fa5897a 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -2307,12 +2307,18 @@ static void gen_ldda_asi(DisasContext *dc, TCGv hi, TCGv addr,
default:
{
TCGv_i32 r_asi = tcg_const_i32(da.asi);
- TCGv_i32 r_rd = tcg_const_i32(rd);
+ TCGv_i64 tmp;
save_state(dc);
- gen_helper_ldda_asi(cpu_env, addr, r_asi, r_rd);
- tcg_temp_free_i32(r_rd);
+ gen_helper_ldda_asi(cpu_env, addr, r_asi);
tcg_temp_free_i32(r_asi);
+
+ tmp = gen_dest_gpr(dc, rd);
+ tcg_gen_ld_i64(tmp, cpu_env, offsetof(CPUSPARCState, qt0.high));
+ gen_store_gpr(dc, rd, tmp);
+ tmp = gen_dest_gpr(dc, rd + 1);
+ tcg_gen_ld_i64(tmp, cpu_env, offsetof(CPUSPARCState, qt0.low));
+ gen_store_gpr(dc, rd + 1, tmp);
}
break;
}