On 2024-02-22 15:08, Thomas Kurz via fpc-pascal wrote:
If you're using Win64, then the answer is simple: x86_64-win64 unlike any other x86 target does not support Extended, so neither the compiler nor the
code in runtime will ever calculate anything with that precision.

That's another thing I've never understood. How can it depend on the
OS? It's the CPU which does math, and I don't understand what the OS
has to do with that? If amd64 architecture didn't support the
extended-type at all, I'd say "ok". But it's supported on Linux but
not on Windows? Huh?

The reason is that the operating system is among others responsible for controlling the multitasking. That includes saving the context of the originally active task and restoring the context of the new task to the original state before it was interrupted. If Win64 doesn't guarantee restoring FPU registers specific to the extended type, using this type would get you into troubles despite its support in the FPU.

Tomas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to