aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/interrupt.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/s390x/interrupt.c')
-rw-r--r--target/s390x/interrupt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/target/s390x/interrupt.c b/target/s390x/interrupt.c
index a841f7187d..30a9fb8852 100644
--- a/target/s390x/interrupt.c
+++ b/target/s390x/interrupt.c
@@ -28,7 +28,10 @@ void trigger_pgm_exception(CPUS390XState *env, uint32_t code, uint32_t ilen)
cs->exception_index = EXCP_PGM;
env->int_pgm_code = code;
- env->int_pgm_ilen = ilen;
+ /* If ILEN_UNWIND, int_pgm_ilen already has the correct value. */
+ if (ilen != ILEN_UNWIND) {
+ env->int_pgm_ilen = ilen;
+ }
}
void s390_program_interrupt(CPUS390XState *env, uint32_t code, int ilen,