summaryrefslogtreecommitdiffstats
path: root/sparc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sparc.c')
-rw-r--r--sparc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sparc.c b/sparc.c
index 8b49831..db40e8d 100644
--- a/sparc.c
+++ b/sparc.c
@@ -2258,6 +2258,11 @@ flush_windows (struct pstate *sregs)
int win;
int ws;
+ /* Skip if window potentially not valid */
+
+ if ((!(sregs->psr & PSR_ET)) || ((sregs->psr & PSR_PIL) == 0x0f00))
+ return;
+
/* Keep current window handy */
cwp = sregs->psr & PSR_CWP;