Skip to content

FPU exception mask: generlised system unit interface

Jonas Maebe requested to merge fpu-cw-issue-38230 into main

The default implementation of SysResetFPU now sets the FPU control word that was last set from any thread (Delphi and FPC i386/x86-64-compatible). No longer call SysInitFPU when starting a new thread, only SysResetFPU. Combined, this means that new FPC-started threads will always start out with that control word on all architectures.

Added generic fpc_cpuinit implementation that is used unless FPC_SYSTEM_HAS_FPC_CPUINIT has been defined.

Ensure that the softfloat exception mask is initially set to the same value as the hardware fpu exception mask on architectures that use both.

SafeLoadLibrary now saves/restores the FPU control word on all platforms.

Removed outdated fpc_mtfsb0_corrected define check in powerpc64.inc

Resolves #38230 (closed)

Merge request reports