diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-07-27 16:56:31 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-09-07 12:38:00 +1000 |
commit | af6d376ea18db87287a9e0de08fe23c68f2464a6 (patch) | |
tree | dc74b6e06fb556b679943232d31f3a65cb5a001a /target-ppc/mem_helper.c | |
parent | e41029b378b4a65a0b89b5a8dc087aca6b5d012d (diff) |
ppc: Don't update NIP in lmw/stmw/icbi
Instead, pass GETPC() result to the corresponding helpers.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target-ppc/mem_helper.c')
-rw-r--r-- | target-ppc/mem_helper.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/target-ppc/mem_helper.c b/target-ppc/mem_helper.c index de96c91e40..e20a53eb50 100644 --- a/target-ppc/mem_helper.c +++ b/target-ppc/mem_helper.c @@ -57,9 +57,9 @@ void helper_lmw(CPUPPCState *env, target_ulong addr, uint32_t reg) { for (; reg < 32; reg++) { if (needs_byteswap(env)) { - env->gpr[reg] = bswap32(cpu_ldl_data(env, addr)); + env->gpr[reg] = bswap32(cpu_ldl_data_ra(env, addr, GETPC())); } else { - env->gpr[reg] = cpu_ldl_data(env, addr); + env->gpr[reg] = cpu_ldl_data_ra(env, addr, GETPC()); } addr = addr_add(env, addr, 4); } @@ -69,9 +69,10 @@ void helper_stmw(CPUPPCState *env, target_ulong addr, uint32_t reg) { for (; reg < 32; reg++) { if (needs_byteswap(env)) { - cpu_stl_data(env, addr, bswap32((uint32_t)env->gpr[reg])); + cpu_stl_data_ra(env, addr, bswap32((uint32_t)env->gpr[reg]), + GETPC()); } else { - cpu_stl_data(env, addr, (uint32_t)env->gpr[reg]); + cpu_stl_data_ra(env, addr, (uint32_t)env->gpr[reg], GETPC()); } addr = addr_add(env, addr, 4); } @@ -178,7 +179,7 @@ void helper_icbi(CPUPPCState *env, target_ulong addr) * (not a fetch) by the MMU. To be sure it will be so, * do the load "by hand". */ - cpu_ldl_data(env, addr); + cpu_ldl_data_ra(env, addr, GETPC()); } /* XXX: to be tested */ |