aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/mem_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/s390x/mem_helper.c')
-rw-r--r--target/s390x/mem_helper.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index 4a0161602f..29d9eaa5b7 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -1617,7 +1617,6 @@ uint32_t HELPER(csst_parallel)(CPUS390XState *env, uint32_t r3, uint64_t a1,
void HELPER(lctlg)(CPUS390XState *env, uint32_t r1, uint64_t a2, uint32_t r3)
{
uintptr_t ra = GETPC();
- S390CPU *cpu = s390_env_get_cpu(env);
bool PERchanged = false;
uint64_t src = a2;
uint32_t i;
@@ -1642,16 +1641,15 @@ void HELPER(lctlg)(CPUS390XState *env, uint32_t r1, uint64_t a2, uint32_t r3)
}
if (PERchanged && env->psw.mask & PSW_MASK_PER) {
- s390_cpu_recompute_watchpoints(CPU(cpu));
+ s390_cpu_recompute_watchpoints(env_cpu(env));
}
- tlb_flush(CPU(cpu));
+ tlb_flush(env_cpu(env));
}
void HELPER(lctl)(CPUS390XState *env, uint32_t r1, uint64_t a2, uint32_t r3)
{
uintptr_t ra = GETPC();
- S390CPU *cpu = s390_env_get_cpu(env);
bool PERchanged = false;
uint64_t src = a2;
uint32_t i;
@@ -1675,10 +1673,10 @@ void HELPER(lctl)(CPUS390XState *env, uint32_t r1, uint64_t a2, uint32_t r3)
}
if (PERchanged && env->psw.mask & PSW_MASK_PER) {
- s390_cpu_recompute_watchpoints(CPU(cpu));
+ s390_cpu_recompute_watchpoints(env_cpu(env));
}
- tlb_flush(CPU(cpu));
+ tlb_flush(env_cpu(env));
}
void HELPER(stctg)(CPUS390XState *env, uint32_t r1, uint64_t a2, uint32_t r3)
@@ -1737,8 +1735,8 @@ uint32_t HELPER(testblock)(CPUS390XState *env, uint64_t real_addr)
uint32_t HELPER(tprot)(CPUS390XState *env, uint64_t a1, uint64_t a2)
{
- S390CPU *cpu = s390_env_get_cpu(env);
- CPUState *cs = CPU(cpu);
+ S390CPU *cpu = env_archcpu(env);
+ CPUState *cs = env_cpu(env);
/*
* TODO: we currently don't handle all access protection types
@@ -1906,7 +1904,7 @@ uint32_t HELPER(mvcp)(CPUS390XState *env, uint64_t l, uint64_t a1, uint64_t a2)
void HELPER(idte)(CPUS390XState *env, uint64_t r1, uint64_t r2, uint32_t m4)
{
- CPUState *cs = CPU(s390_env_get_cpu(env));
+ CPUState *cs = env_cpu(env);
const uintptr_t ra = GETPC();
uint64_t table, entry, raddr;
uint16_t entries, i, index = 0;
@@ -1958,7 +1956,7 @@ void HELPER(idte)(CPUS390XState *env, uint64_t r1, uint64_t r2, uint32_t m4)
void HELPER(ipte)(CPUS390XState *env, uint64_t pto, uint64_t vaddr,
uint32_t m4)
{
- CPUState *cs = CPU(s390_env_get_cpu(env));
+ CPUState *cs = env_cpu(env);
const uintptr_t ra = GETPC();
uint64_t page = vaddr & TARGET_PAGE_MASK;
uint64_t pte_addr, pte;
@@ -1998,17 +1996,13 @@ void HELPER(ipte)(CPUS390XState *env, uint64_t pto, uint64_t vaddr,
/* flush local tlb */
void HELPER(ptlb)(CPUS390XState *env)
{
- S390CPU *cpu = s390_env_get_cpu(env);
-
- tlb_flush(CPU(cpu));
+ tlb_flush(env_cpu(env));
}
/* flush global tlb */
void HELPER(purge)(CPUS390XState *env)
{
- S390CPU *cpu = s390_env_get_cpu(env);
-
- tlb_flush_all_cpus_synced(CPU(cpu));
+ tlb_flush_all_cpus_synced(env_cpu(env));
}
/* load using real address */
@@ -2052,7 +2046,7 @@ void HELPER(sturg)(CPUS390XState *env, uint64_t addr, uint64_t v1)
/* load real address */
uint64_t HELPER(lra)(CPUS390XState *env, uint64_t addr)
{
- CPUState *cs = CPU(s390_env_get_cpu(env));
+ CPUState *cs = env_cpu(env);
uint32_t cc = 0;
uint64_t asc = env->psw.mask & PSW_MASK_ASC;
uint64_t ret;