mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-08 10:09:43 +00:00
target-sparc: implement UA2005 rdhpstate and wrhpstate instructions
Backports commit f7f17ef75c9c90db63c44d11dc16fc085ca2c474 from qemu
This commit is contained in:
parent
0a124b2199
commit
2f2bde32bf
|
@ -3670,7 +3670,8 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins
|
|||
rs1 = GET_FIELD(insn, 13, 17);
|
||||
switch (rs1) {
|
||||
case 0: // hpstate
|
||||
// gen_op_rdhpstate();
|
||||
tcg_gen_ld_i64(tcg_ctx, cpu_dst, tcg_ctx->cpu_env,
|
||||
offsetof(CPUSPARCState, hpstate));
|
||||
break;
|
||||
case 1: // htstate
|
||||
// gen_op_rdhtstate();
|
||||
|
@ -4794,7 +4795,9 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins
|
|||
tcg_gen_xor_tl(tcg_ctx, cpu_tmp0, cpu_src1, cpu_src2);
|
||||
switch (rd) {
|
||||
case 0: // hpstate
|
||||
// XXX gen_op_wrhpstate();
|
||||
tcg_gen_st_i64(tcg_ctx, cpu_tmp0, tcg_ctx->cpu_env,
|
||||
offsetof(CPUSPARCState,
|
||||
hpstate));
|
||||
save_state(dc);
|
||||
gen_op_next_insn(dc);
|
||||
tcg_gen_exit_tb(tcg_ctx, 0);
|
||||
|
|
Loading…
Reference in a new issue