Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Subnormal number
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== ARM === {{Unreferenced section|date=March 2023}} AArch32 NEON (SIMD) FPU always uses a flush-to-zero mode{{cn|date=October 2024}}, which is the same as {{code|FTZ + DAZ}}. For the scalar FPU and in the AArch64 SIMD, the flush-to-zero behavior is optional and controlled by the {{code|FZ}} bit of the control register – FPSCR in Arm32 and FPCR in AArch64.<ref>{{cite web |url=https://developer.arm.com/documentation/ddi0595/2021-06/AArch64-Registers/FPCR--Floating-point-Control-Register?lang=en#fieldset_0-24_24 |title=Aarch64 Registers |publisher=Arm}}</ref> One way to do this can be: <syntaxhighlight lang="c"> #if defined(__arm64__) || defined(__aarch64__) uint64_t fpcr; asm( "mrs %0, fpcr" : "=r"( fpcr )); //Load the FPCR register asm( "msr fpcr, %0" :: "r"( fpcr | (1 << 24) )); //Set the 24th bit (FTZ) to 1 #endif </syntaxhighlight> Some ARM processors have hardware handling of subnormals.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)