[PATCH] D12633: Implement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] targets

Alexandros Lamprineas via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 9 07:35:13 PDT 2015


labrinea added inline comments.

================
Comment at: lib/Basic/Targets.cpp:4785
@@ +4784,3 @@
+    if (Opts.C99 && !Opts.Freestanding) {
+      Builder.defineMacro("__ARM_FP_FENV_ROUNDING", "1");
+      Builder.defineMacro("__STDC_IEC_559__", "1");
----------------
rengolin wrote:
> I'm not convinced by the runtime rounding being depending on C99, or why it's not possible in freestanding environments.
I copied the same logic from AArch64.

================
Comment at: lib/Basic/Targets.cpp:4786
@@ +4785,3 @@
+      Builder.defineMacro("__ARM_FP_FENV_ROUNDING", "1");
+      Builder.defineMacro("__STDC_IEC_559__", "1");
+    }
----------------
Shall we define this unconditionally?

================
Comment at: lib/Basic/Targets.cpp:4790
@@ -4779,1 +4789,3 @@
+    if (!Opts.C11)
+      Builder.defineMacro("__SUPPORT_SNAN__", "1");
   }
----------------
rengolin wrote:
> Er, well, the ACLE doc says it wasn't adopted in C11, but that doesn't mean that it was present in all others, just that there is a proposal for C11 which wasn't accepted.
> 
> I think this macro needs some other mechanism to be set, and unless Clang/LLVM supports signaling NANs unconditionally, we shouldn't add it.
Maybe we could skip this macro in this patch? @richard.barton.arm

================
Comment at: lib/Basic/Targets.cpp:5270
@@ +5269,3 @@
+    if (Opts.C99 && !Opts.Freestanding) {
+      Builder.defineMacro("__ARM_FP_FENV_ROUNDING", "1");
+      Builder.defineMacro("__STDC_IEC_559__", "1");
----------------
rengolin wrote:
> same comments as above.
This was present already.


http://reviews.llvm.org/D12633





More information about the cfe-commits mailing list