mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
target/riscv: Split the Hypervisor execute load helpers
Split the hypervisor execute load functions into two seperate functions. This avoids us having to pass the memop to the C helper functions. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 5b1550f0faa3c435cc77f3c1ae811dea98ab9e36.1604464950.git.alistair.francis@wdc.com
This commit is contained in:
parent
743077b35b
commit
7687537ab0
3 changed files with 16 additions and 41 deletions
|
@ -277,20 +277,16 @@ static bool trans_hlvx_hu(DisasContext *ctx, arg_hlvx_hu *a)
|
|||
#ifndef CONFIG_USER_ONLY
|
||||
TCGv t0 = tcg_temp_new();
|
||||
TCGv t1 = tcg_temp_new();
|
||||
TCGv mem_idx = tcg_temp_new();
|
||||
TCGv memop = tcg_temp_new();
|
||||
|
||||
check_access(ctx);
|
||||
|
||||
gen_get_gpr(t0, a->rs1);
|
||||
tcg_gen_movi_tl(mem_idx, ctx->mem_idx);
|
||||
tcg_gen_movi_tl(memop, MO_TEUW);
|
||||
|
||||
gen_helper_hyp_x_load(t1, cpu_env, t0, mem_idx, memop);
|
||||
gen_helper_hyp_hlvx_hu(t1, cpu_env, t0);
|
||||
gen_set_gpr(a->rd, t1);
|
||||
|
||||
tcg_temp_free(t0);
|
||||
tcg_temp_free(t1);
|
||||
tcg_temp_free(mem_idx);
|
||||
tcg_temp_free(memop);
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
|
@ -303,20 +299,16 @@ static bool trans_hlvx_wu(DisasContext *ctx, arg_hlvx_wu *a)
|
|||
#ifndef CONFIG_USER_ONLY
|
||||
TCGv t0 = tcg_temp_new();
|
||||
TCGv t1 = tcg_temp_new();
|
||||
TCGv mem_idx = tcg_temp_new();
|
||||
TCGv memop = tcg_temp_new();
|
||||
|
||||
check_access(ctx);
|
||||
|
||||
gen_get_gpr(t0, a->rs1);
|
||||
tcg_gen_movi_tl(mem_idx, ctx->mem_idx);
|
||||
tcg_gen_movi_tl(memop, MO_TEUL);
|
||||
|
||||
gen_helper_hyp_x_load(t1, cpu_env, t0, mem_idx, memop);
|
||||
gen_helper_hyp_hlvx_wu(t1, cpu_env, t0);
|
||||
gen_set_gpr(a->rd, t1);
|
||||
|
||||
tcg_temp_free(t0);
|
||||
tcg_temp_free(t1);
|
||||
tcg_temp_free(mem_idx);
|
||||
tcg_temp_free(memop);
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue