diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-12-11 12:36:13 -0800 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2019-12-18 12:57:29 +0100 |
commit | ebed683c4e2678947df06cb33d3d860840426c65 (patch) | |
tree | f5bdc67fc30e3e51f6e4ab11a1a91c51e4795309 /target/s390x/misc_helper.c | |
parent | aceeaa69d28e6f08a24395d0aa6915b687d0a681 (diff) |
target/s390x: Split out helper_per_store_real
Split the PER handling for store-to-real-address into its
own helper function, conditionally called when PER is
enabled, just as we do for per_branch and per_ifetch.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20191211203614.15611-2-richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/misc_helper.c')
-rw-r--r-- | target/s390x/misc_helper.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c index bfb457fb63..58dbc023eb 100644 --- a/target/s390x/misc_helper.c +++ b/target/s390x/misc_helper.c @@ -620,6 +620,16 @@ void HELPER(per_ifetch)(CPUS390XState *env, uint64_t addr) } } } + +void HELPER(per_store_real)(CPUS390XState *env) +{ + if ((env->cregs[9] & PER_CR9_EVENT_STORE) && + (env->cregs[9] & PER_CR9_EVENT_STORE_REAL)) { + /* PSW is saved just before calling the helper. */ + env->per_address = env->psw.addr; + env->per_perc_atmid = PER_CODE_EVENT_STORE_REAL | get_per_atmid(env); + } +} #endif static uint8_t stfl_bytes[2048]; |