From 096f9dbd713ae093c9fcad65587693a272ffcca3 Mon Sep 17 00:00:00 2001 From: Paul Koning Date: Wed, 15 May 2019 20:14:33 -0400 Subject: [PATCH] PDP11: Fix PSW handling for breakpoints and other aborts Fixes #701. The issue is more general than just breakpoints, it potentially affects any exception dealt with by the ABORT macro. --- PDP11/pdp11_cpu.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/PDP11/pdp11_cpu.c b/PDP11/pdp11_cpu.c index c8ac0b38..293995fb 100644 --- a/PDP11/pdp11_cpu.c +++ b/PDP11/pdp11_cpu.c @@ -932,12 +932,11 @@ while (reason == 0) { reg_mods = 0; inst_pc = PC; - /* Save PSW also because condition codes need to be preserved. - We just save the whole PSW because that is sufficient (that - representation is up to date at this point). If restoring is - needed, both the PSW and the components that need to be restored - are handled explicitly. */ - inst_psw = PSW; + /* Save PSW also because condition codes need to be preserved. We + just save the whole PSW because that is sufficient. If + restoring is needed, both the PSW and the components that need + to be restored are handled explicitly. */ + inst_psw = get_PSW (); saved_sim_interval = sim_interval; if (BPT_SUMM_PC) { /* possible breakpoint */ t_addr pa = relocR (PC | isenable); /* relocate PC */