target/s390x: use program_interrupt() in per_check_exception()
Clean it up by reusing program_interrupt(). Add a concern regarding ilen. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170913132417.24384-11-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
This commit is contained in:
parent
525f4b65c7
commit
e0b1a8a14e
|
@ -447,14 +447,17 @@ void HELPER(chsc)(CPUS390XState *env, uint64_t inst)
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
void HELPER(per_check_exception)(CPUS390XState *env)
|
void HELPER(per_check_exception)(CPUS390XState *env)
|
||||||
{
|
{
|
||||||
CPUState *cs = CPU(s390_env_get_cpu(env));
|
uint32_t ilen;
|
||||||
|
|
||||||
if (env->per_perc_atmid) {
|
if (env->per_perc_atmid) {
|
||||||
env->int_pgm_code = PGM_PER;
|
/*
|
||||||
env->int_pgm_ilen = get_ilen(cpu_ldub_code(env, env->per_address));
|
* FIXME: ILEN_AUTO is most probably the right thing to use. ilen
|
||||||
|
* always has to match the instruction referenced in the PSW. E.g.
|
||||||
cs->exception_index = EXCP_PGM;
|
* if a PER interrupt is triggered via EXECUTE, we have to use ilen
|
||||||
cpu_loop_exit(cs);
|
* of EXECUTE, while per_address contains the target of EXECUTE.
|
||||||
|
*/
|
||||||
|
ilen = get_ilen(cpu_ldub_code(env, env->per_address));
|
||||||
|
program_interrupt(env, PGM_PER, ilen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue