Don't clear the exception flags after we finish emulating a

floating-point instruction in the kernel.  The flags are
supposed to be cumulative.

Thanks to marcel for helping me test this.
This commit is contained in:
David Schultz 2004-05-06 09:35:57 +00:00
parent f71ae83f34
commit 88ddd9e832
2 changed files with 3 additions and 1 deletions

View File

@ -296,7 +296,7 @@ static int fp_emulate(union alpha_instruction ins, struct thread *td)
td->td_pcb->pcb_fp_control = control;
/* Regenerate the control register */
fpcr = fpregs->fpr_cr & FPCR_DYN_MASK;
fpcr = fpregs->fpr_cr & (FPCR_DYN_MASK | FPCR_STATUS_MASK);
fpcr |= ((control & IEEE_STATUS_MASK)
<< IEEE_STATUS_TO_FPCR_SHIFT);
if (!(control & IEEE_TRAP_ENABLE_INV))

View File

@ -56,6 +56,8 @@
#define FPCR_INED (1LL << 62) /* Inexact Disable */
#define FPCR_SUM (1LL << 63) /* Summary Bit */
#define FPCR_MASK (~0LL << 49)
#define FPCR_STATUS_MASK (FPCR_INV | FPCR_DZE | FPCR_OVF | \
FPCR_UNF | FPCR_INE | FPCR_IOV)
/*
* Exception summary bits.