From 8d2f850a5ab7579a852f23b28273940a47dfd7ff Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Thu, 30 Nov 2017 17:27:29 +0100 Subject: s390x/tcg: introduce and use s390_program_interrupt() Allows to easily convert more callers of program_interrupt() and to easily introduce new exceptions without forgetting about the cpu state reset. Use s390_program_interrupt() in places where we already had the same pattern. We will later get rid of program_interrupt(). RA != 0 checks are already done behind the scenes. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand Message-Id: <20171130162744.25442-2-david@redhat.com> Signed-off-by: Cornelia Huck --- target/s390x/excp_helper.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'target/s390x/excp_helper.c') diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c index e04b670663..d831537544 100644 --- a/target/s390x/excp_helper.c +++ b/target/s390x/excp_helper.c @@ -554,10 +554,7 @@ void s390x_cpu_do_unaligned_access(CPUState *cs, vaddr addr, S390CPU *cpu = S390_CPU(cs); CPUS390XState *env = &cpu->env; - if (retaddr) { - cpu_restore_state(cs, retaddr); - } - program_interrupt(env, PGM_SPECIFICATION, ILEN_AUTO); + s390_program_interrupt(env, PGM_SPECIFICATION, ILEN_AUTO, retaddr); } #endif /* CONFIG_USER_ONLY */ -- cgit v1.2.3