From d2810ffd34a89b697f0ad4aeebf2d5f2c2abc79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 9 Mar 2014 18:58:57 +0100 Subject: target-alpha: Clean up ENV_GET_CPU() usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commits 2c17449b3022ca9623c4a7e2a504a4150ac4ad30, fdfba1a298ae26dd44bcfdb0429314139a0bc55a, ab1da85791340e504d10487e1add81b9988afa98 and f606604f1c10b60ef294f1b9b229426521a365e3 added usages of ENV_GET_CPU() macro in target-specific code. Use alpha_env_get_cpu() instead. Cc: Edgar E. Iglesias Cc: Peter Maydell Signed-off-by: Andreas Färber --- target-alpha/helper.c | 2 +- target-alpha/mem_helper.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/target-alpha/helper.c b/target-alpha/helper.c index 025fdaf4d1..98ddcdf4e3 100644 --- a/target-alpha/helper.c +++ b/target-alpha/helper.c @@ -213,7 +213,7 @@ static int get_physical_address(CPUAlphaState *env, target_ulong addr, int prot_need, int mmu_idx, target_ulong *pphys, int *pprot) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(alpha_env_get_cpu(env)); target_long saddr = addr; target_ulong phys = 0; target_ulong L1pte, L2pte, L3pte; diff --git a/target-alpha/mem_helper.c b/target-alpha/mem_helper.c index ea587043d4..e1aba64416 100644 --- a/target-alpha/mem_helper.c +++ b/target-alpha/mem_helper.c @@ -26,45 +26,45 @@ uint64_t helper_ldl_phys(CPUAlphaState *env, uint64_t p) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(alpha_env_get_cpu(env)); return (int32_t)ldl_phys(cs->as, p); } uint64_t helper_ldq_phys(CPUAlphaState *env, uint64_t p) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(alpha_env_get_cpu(env)); return ldq_phys(cs->as, p); } uint64_t helper_ldl_l_phys(CPUAlphaState *env, uint64_t p) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(alpha_env_get_cpu(env)); env->lock_addr = p; return env->lock_value = (int32_t)ldl_phys(cs->as, p); } uint64_t helper_ldq_l_phys(CPUAlphaState *env, uint64_t p) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(alpha_env_get_cpu(env)); env->lock_addr = p; return env->lock_value = ldq_phys(cs->as, p); } void helper_stl_phys(CPUAlphaState *env, uint64_t p, uint64_t v) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(alpha_env_get_cpu(env)); stl_phys(cs->as, p, v); } void helper_stq_phys(CPUAlphaState *env, uint64_t p, uint64_t v) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(alpha_env_get_cpu(env)); stq_phys(cs->as, p, v); } uint64_t helper_stl_c_phys(CPUAlphaState *env, uint64_t p, uint64_t v) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(alpha_env_get_cpu(env)); uint64_t ret = 0; if (p == env->lock_addr) { @@ -81,7 +81,7 @@ uint64_t helper_stl_c_phys(CPUAlphaState *env, uint64_t p, uint64_t v) uint64_t helper_stq_c_phys(CPUAlphaState *env, uint64_t p, uint64_t v) { - CPUState *cs = ENV_GET_CPU(env); + CPUState *cs = CPU(alpha_env_get_cpu(env)); uint64_t ret = 0; if (p == env->lock_addr) { -- cgit v1.2.3