Clang only defines VFP_FP when the FPU is enabled. However, gcc
defines it unconditionally.
This patch aligns Clang with gcc.
Differential D100372
[Clang][ARM] Define __VFP_FP__ macro unconditionally vhscampos on Apr 13 2021, 2:06 AM. Authored by
Details Clang only defines VFP_FP when the FPU is enabled. However, gcc This patch aligns Clang with gcc.
Diff Detail
Event TimelineComment Actions I think this is the right thing to do. GCC changed to unconditionally set the macro with https://gcc.gnu.org/legacy-ml/gcc-patches/2016-10/msg01025.html my understanding is that the macro means that floating point representation uses the VFP format and not the FPA format (predecessor to VFP, not supported by clang, found in very old systems), it does not mean that there is a VFP unit present. see https://wiki.debian.org/ArmEabiPort for the mutually exclusive __MAVERICK__ whcih refers to https://wiki.debian.org/ArmEabiMaverickCrunch the processor that had the FPA FPU. I've set LGTM, and added a few more non-Arm people involved in the area for visibility, will be good to give them a chance to comment before committing.
Comment Actions Thanks Peter. Since one week has passed, I plan to commit these changes by the end of the day if nothing surfaces. Comment Actions It's a weird flag, for sure, but if that's the semantics of it, than this change LGTM. Thanks! |
Worth a comment like "VFP_FP means that the floating point format is VFP, not that a hardware FPU is present. The VFP format is the only one supported by clang."