diff options
author | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2013-11-15 14:46:38 +0100 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2014-02-11 22:56:54 +1000 |
commit | fdfba1a298ae26dd44bcfdb0429314139a0bc55a (patch) | |
tree | a1d53f014db493c4c699e27022da8077854df374 /target-alpha | |
parent | 33bde2e13f36b9331e35b6e531bc06e8567b4f64 (diff) |
exec: Make ldl_*_phys input an AddressSpace
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'target-alpha')
-rw-r--r-- | target-alpha/helper.h | 2 | ||||
-rw-r--r-- | target-alpha/mem_helper.c | 11 | ||||
-rw-r--r-- | target-alpha/translate.c | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/target-alpha/helper.h b/target-alpha/helper.h index 5a0e78cefb..39777026de 100644 --- a/target-alpha/helper.h +++ b/target-alpha/helper.h @@ -101,7 +101,7 @@ DEF_HELPER_FLAGS_2(ieee_input_cmp, TCG_CALL_NO_WG, void, env, i64) DEF_HELPER_2(hw_ret, void, env, i64) DEF_HELPER_3(call_pal, void, env, i64, i64) -DEF_HELPER_1(ldl_phys, i64, i64) +DEF_HELPER_2(ldl_phys, i64, env, i64) DEF_HELPER_1(ldq_phys, i64, i64) DEF_HELPER_2(ldl_l_phys, i64, env, i64) DEF_HELPER_2(ldq_l_phys, i64, env, i64) diff --git a/target-alpha/mem_helper.c b/target-alpha/mem_helper.c index 7160a1cd4f..61e81644a2 100644 --- a/target-alpha/mem_helper.c +++ b/target-alpha/mem_helper.c @@ -24,9 +24,10 @@ /* Softmmu support */ #ifndef CONFIG_USER_ONLY -uint64_t helper_ldl_phys(uint64_t p) +uint64_t helper_ldl_phys(CPUAlphaState *env, uint64_t p) { - return (int32_t)ldl_phys(p); + CPUState *cs = ENV_GET_CPU(env); + return (int32_t)ldl_phys(cs->as, p); } uint64_t helper_ldq_phys(uint64_t p) @@ -36,8 +37,9 @@ uint64_t helper_ldq_phys(uint64_t p) uint64_t helper_ldl_l_phys(CPUAlphaState *env, uint64_t p) { + CPUState *cs = ENV_GET_CPU(env); env->lock_addr = p; - return env->lock_value = (int32_t)ldl_phys(p); + return env->lock_value = (int32_t)ldl_phys(cs->as, p); } uint64_t helper_ldq_l_phys(CPUAlphaState *env, uint64_t p) @@ -58,10 +60,11 @@ void helper_stq_phys(uint64_t p, uint64_t v) uint64_t helper_stl_c_phys(CPUAlphaState *env, uint64_t p, uint64_t v) { + CPUState *cs = ENV_GET_CPU(env); uint64_t ret = 0; if (p == env->lock_addr) { - int32_t old = ldl_phys(p); + int32_t old = ldl_phys(cs->as, p); if (old == (int32_t)env->lock_value) { stl_phys(p, v); ret = 1; diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 1155e86e29..802c49a5d7 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -2912,7 +2912,7 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn) switch ((insn >> 12) & 0xF) { case 0x0: /* Longword physical access (hw_ldl/p) */ - gen_helper_ldl_phys(cpu_ir[ra], addr); + gen_helper_ldl_phys(cpu_ir[ra], cpu_env, addr); break; case 0x1: /* Quadword physical access (hw_ldq/p) */ |