diff options
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 |