diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2015-06-13 00:45:57 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2015-06-17 12:40:52 +0200 |
commit | 2c2275eb41c612df4bd115cf71d6e651d105f69c (patch) | |
tree | 2058f1860964c2c3f941f0e638d329ccec0ad0f8 /target-s390x/misc_helper.c | |
parent | 777c98c32ce577a9671b9267ff6e2802f69ebafd (diff) |
target-s390x: PER successful-branching event support
For the PER successful-branching event support, we can't rely on any
QEMU infrastucture. We therefore call an helper in all places where
a branch can be taken. We have to pay attention to the branch to next
case, as it's still a taken branch.
We don't need to care about the cases using goto_tb, as we have disabled
them in the previous patch.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-s390x/misc_helper.c')
-rw-r--r-- | target-s390x/misc_helper.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target-s390x/misc_helper.c b/target-s390x/misc_helper.c index e636464363..bc28f9d13d 100644 --- a/target-s390x/misc_helper.c +++ b/target-s390x/misc_helper.c @@ -608,4 +608,15 @@ void HELPER(per_check_exception)(CPUS390XState *env) cpu_loop_exit(cs); } } + +void HELPER(per_branch)(CPUS390XState *env, uint64_t from, uint64_t to) +{ + if ((env->cregs[9] & PER_CR9_EVENT_BRANCH)) { + if (!(env->cregs[9] & PER_CR9_CONTROL_BRANCH_ADDRESS) + || get_per_in_range(env, to)) { + env->per_address = from; + env->per_perc_atmid = PER_CODE_EVENT_BRANCH | get_per_atmid(env); + } + } +} #endif |