From fd616c866c22883362886a497311fa7582d3664d Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 1 Dec 2019 18:26:10 +0100 Subject: 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. --- i386/i386/fpu.c | 8 ++++---- 1 file 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 */ } -- cgit v1.2.3