aboutsummaryrefslogtreecommitdiff
path: root/target/hppa/helper.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-03-13 09:33:41 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-03-13 09:33:41 +0000
commit9298a4e8a648d88300883681317ed733a6ad39d0 (patch)
treede834871aa1bf4474ef5f4e49a43a157f9c6b20d /target/hppa/helper.c
parent3f3bbfc7cef4490c5ed5550766a81e7d18f08db1 (diff)
parent32dc75698c848d11a087c77570ac0cd954e0bb20 (diff)
Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20190312' into staging
Misc fixes affecting HP-UX 10.20. # gpg: Signature made Tue 12 Mar 2019 16:16:32 GMT # gpg: using RSA key 64DF38E8AF7E215F # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth/tags/pull-hppa-20190312: target/hppa: exit TB if either Data or Instruction TLB changes target/hppa: add TLB protection id check target/hppa: allow multiple itlbp without itlba target/hppa: fix b,gate instruction target/hppa: ignore DIAG opcode target/hppa: remove PSW I/R/Q bit check target/hppa: add TLB trace events target/hppa: report ITLB_EXCP_MISS for ITLB misses target/hppa: fix TLB handling for page 0 target/hppa: fix overwriting source reg in addb target/hppa: Check for page crossings in use_goto_tb Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/hppa/helper.c')
-rw-r--r--target/hppa/helper.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/hppa/helper.c b/target/hppa/helper.c
index 6539061e52..ac750b62ef 100644
--- a/target/hppa/helper.c
+++ b/target/hppa/helper.c
@@ -21,6 +21,7 @@
#include "cpu.h"
#include "fpu/softfloat.h"
+#include "exec/exec-all.h"
#include "exec/helper-proto.h"
target_ureg cpu_hppa_get_psw(CPUHPPAState *env)
@@ -49,6 +50,7 @@ target_ureg cpu_hppa_get_psw(CPUHPPAState *env)
void cpu_hppa_put_psw(CPUHPPAState *env, target_ureg psw)
{
+ target_ureg old_psw = env->psw;
target_ureg cb = 0;
env->psw = psw & ~(PSW_N | PSW_V | PSW_CB);
@@ -64,6 +66,14 @@ void cpu_hppa_put_psw(CPUHPPAState *env, target_ureg psw)
cb |= ((psw >> 9) & 1) << 8;
cb |= ((psw >> 8) & 1) << 4;
env->psw_cb = cb;
+
+ /* If PSW_P changes, it affects how we translate addresses. */
+ if ((psw ^ old_psw) & PSW_P) {
+#ifndef CONFIG_USER_ONLY
+ CPUState *src = CPU(hppa_env_get_cpu(env));
+ tlb_flush_by_mmuidx(src, 0xf);
+#endif
+ }
}
void hppa_cpu_dump_state(CPUState *cs, FILE *f,