summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2019-12-01 18:26:10 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-12-01 18:27:42 +0100
commitfd616c866c22883362886a497311fa7582d3664d (patch)
tree7ebd75db5a5bc98aec3415fc259f6fda9e65807a
parent097f9cf735ffa1212b828682ad92f0f6c5f1c552 (diff)
i386: use 64bit precision by default
This is the System V ABI default. * i386/i386/fpu.c (fpinit): Use FPC_PC_64 instead of FPC_PC_53. (fp_state_alloc): Likewise.
-rw-r--r--i386/i386/fpu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/i386/i386/fpu.c b/i386/i386/fpu.c
index 6ee20150..0887a32c 100644
--- a/i386/i386/fpu.c
+++ b/i386/i386/fpu.c
@@ -492,7 +492,7 @@ ASSERT_IPL(SPL0);
* divide by zero
* overflow
*
- * Use 53-bit precision.
+ * Use 64-bit precision.
*/
static void fpinit(thread_t thread)
{
@@ -508,7 +508,7 @@ ASSERT_IPL(SPL0);
{
fnstcw(&control);
control &= ~(FPC_PC|FPC_RC); /* Clear precision & rounding control */
- control |= (FPC_PC_53 | /* Set precision */
+ control |= (FPC_PC_64 | /* Set precision */
FPC_RC_RN | /* round-to-nearest */
FPC_ZE | /* Suppress zero-divide */
FPC_OE | /* and overflow */
@@ -860,7 +860,7 @@ fp_state_alloc(void)
if (fp_kind == FP_387X) {
ifps->xfp_save_state.fp_control = (0x037f
& ~(FPC_IM|FPC_ZM|FPC_OM|FPC_PC))
- | (FPC_PC_53|FPC_IC_AFF);
+ | (FPC_PC_64|FPC_IC_AFF);
ifps->xfp_save_state.fp_status = 0;
ifps->xfp_save_state.fp_tag = 0xffff; /* all empty */
if (CPU_HAS_FEATURE(CPU_FEATURE_SSE))
@@ -868,7 +868,7 @@ fp_state_alloc(void)
} else {
ifps->fp_save_state.fp_control = (0x037f
& ~(FPC_IM|FPC_ZM|FPC_OM|FPC_PC))
- | (FPC_PC_53|FPC_IC_AFF);
+ | (FPC_PC_64|FPC_IC_AFF);
ifps->fp_save_state.fp_status = 0;
ifps->fp_save_state.fp_tag = 0xffff; /* all empty */
}