mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
exec: Make stl_*_phys input an AddressSpace
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
This commit is contained in:
parent
f606604f1c
commit
ab1da85791
25 changed files with 133 additions and 115 deletions
|
@ -105,7 +105,7 @@ DEF_HELPER_2(ldl_phys, i64, env, i64)
|
|||
DEF_HELPER_2(ldq_phys, i64, env, i64)
|
||||
DEF_HELPER_2(ldl_l_phys, i64, env, i64)
|
||||
DEF_HELPER_2(ldq_l_phys, i64, env, i64)
|
||||
DEF_HELPER_2(stl_phys, void, i64, i64)
|
||||
DEF_HELPER_3(stl_phys, void, env, i64, i64)
|
||||
DEF_HELPER_3(stq_phys, void, env, i64, i64)
|
||||
DEF_HELPER_3(stl_c_phys, i64, env, i64, i64)
|
||||
DEF_HELPER_3(stq_c_phys, i64, env, i64, i64)
|
||||
|
|
|
@ -50,9 +50,10 @@ uint64_t helper_ldq_l_phys(CPUAlphaState *env, uint64_t p)
|
|||
return env->lock_value = ldq_phys(cs->as, p);
|
||||
}
|
||||
|
||||
void helper_stl_phys(uint64_t p, uint64_t v)
|
||||
void helper_stl_phys(CPUAlphaState *env, uint64_t p, uint64_t v)
|
||||
{
|
||||
stl_phys(p, v);
|
||||
CPUState *cs = ENV_GET_CPU(env);
|
||||
stl_phys(cs->as, p, v);
|
||||
}
|
||||
|
||||
void helper_stq_phys(CPUAlphaState *env, uint64_t p, uint64_t v)
|
||||
|
@ -69,7 +70,7 @@ uint64_t helper_stl_c_phys(CPUAlphaState *env, uint64_t p, uint64_t v)
|
|||
if (p == env->lock_addr) {
|
||||
int32_t old = ldl_phys(cs->as, p);
|
||||
if (old == (int32_t)env->lock_value) {
|
||||
stl_phys(p, v);
|
||||
stl_phys(cs->as, p, v);
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3225,7 +3225,7 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)
|
|||
switch ((insn >> 12) & 0xF) {
|
||||
case 0x0:
|
||||
/* Longword physical access */
|
||||
gen_helper_stl_phys(addr, val);
|
||||
gen_helper_stl_phys(cpu_env, addr, val);
|
||||
break;
|
||||
case 0x1:
|
||||
/* Quadword physical access */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue