[Cfp-interest 2072] ARM64 FP exceptions
Fred J. Tydeman
tydeman at tybor.com
Wed Jul 21 06:53:28 PDT 2021
The following is from comp.arch newsgroup
> The lack of floating-point exceptions in actual implementations of ARM64
> is one of my biggest worries about its increasing popularity.
Oh, interesting. It seems that Microsoft has recognized this. Quoting
their Windows ARM64 ABI conventions [1]:
"For processor variants that do have hardware floating-point exceptions,
the Windows kernel silently catches the exceptions and implicitly
disables them in the FPCR register. This trap ensures normalized
behavior across processor variants. Otherwise, code developed on a
platform without exception support may find itself taking unexpected
exceptions when running on a platform with support."
...which of course is the natural solution. In our software we do the
same thing (even disabling subnormals) in order to normalize on the
least common denominator, so to say (as soon as one target platform
lacks a feature, it needs to be disabled on _all_ platforms).
/Marcus
[1]
https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-160#floating-point-exceptions
---
Fred J. Tydeman Tydeman Consulting
tydeman at tybor.com Testing, numerics, programming
+1 (702) 608-6093 Vice-chair of PL22.11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.
More information about the Cfp-interest
mailing list