diff options
author | Artyom Tarasenko <atar4qemu@gmail.com> | 2016-06-08 14:14:36 +0200 |
---|---|---|
committer | Artyom Tarasenko <atar4qemu@gmail.com> | 2017-01-18 22:03:44 +0100 |
commit | f7f17ef75c9c90db63c44d11dc16fc085ca2c474 (patch) | |
tree | 893e05e185f38a95843a19cfc67db5195f0078ea | |
parent | cbc3a6a4cc675516328a2b0d3602355d68b6302d (diff) |
target-sparc: implement UA2005 rdhpstate and wrhpstate instructions
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
-rw-r--r-- | target/sparc/translate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/target/sparc/translate.c b/target/sparc/translate.c index a40c974ccd..399a8ac8dd 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -3468,7 +3468,8 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) rs1 = GET_FIELD(insn, 13, 17); switch (rs1) { case 0: // hpstate - // gen_op_rdhpstate(); + tcg_gen_ld_i64(cpu_dst, cpu_env, + offsetof(CPUSPARCState, hpstate)); break; case 1: // htstate // gen_op_rdhtstate(); @@ -4592,7 +4593,9 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) tcg_gen_xor_tl(cpu_tmp0, cpu_src1, cpu_src2); switch (rd) { case 0: // hpstate - // XXX gen_op_wrhpstate(); + tcg_gen_st_i64(cpu_tmp0, cpu_env, + offsetof(CPUSPARCState, + hpstate)); save_state(dc); gen_op_next_insn(); tcg_gen_exit_tb(0); |