aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'libgcc/config/sparc')
-rw-r--r--libgcc/config/sparc/sol2-unwind.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/libgcc/config/sparc/sol2-unwind.h b/libgcc/config/sparc/sol2-unwind.h
index 584a9b0..4a8c42f5 100644
--- a/libgcc/config/sparc/sol2-unwind.h
+++ b/libgcc/config/sparc/sol2-unwind.h
@@ -403,7 +403,12 @@ MD_FALLBACK_FRAME_STATE_FOR (struct _Unwind_Context *context,
fs->retaddr_column = 0;
fs->regs.reg[0].how = REG_SAVED_OFFSET;
fs->regs.reg[0].loc.offset = (long)shifted_ra_location - new_cfa;
- fs->signal_frame = 1;
+
+ /* SIGFPE for IEEE-754 exceptions is delivered after the faulting insn
+ rather than before it, so don't set fs->signal_frame in that case.
+ We test whether the cexc field of the FSR is zero. */
+ if ((mctx->fpregs.fpu_fsr & 0x1f) == 0)
+ fs->signal_frame = 1;
return _URC_NO_REASON;
}