[PATCH] D12244: Implement ACLE 2.0 macros of chapters 6.4 and 6.5 for [ARM] and [Aarch64] targets
Renato Golin via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 3 05:48:38 PDT 2015
rengolin added inline comments.
================
Comment at: lib/Basic/Targets.cpp:4790
@@ +4789,3 @@
+ Builder.defineMacro("__ARM_FEATURE_SAT", "1");
+ Builder.defineMacro("__ARM_FEATURE_QBIT", "1");
+ }
----------------
labrinea wrote:
> rengolin wrote:
> > Isn't there a combination where you'll emit this macro twice?
> This could be addressed as:
>
> ```
> bool hasDSP = false;
> if (is5EOrAbove && is32Bit && (CPUProfile != "M" || CPUAttr == "7EM")) {
> Builder.defineMacro("__ARM_FEATURE_DSP", "1");
> hasDSP = true;
> }
>
> bool hasSAT = false;
> if ((ArchVersion == 6 && CPUProfile != "M") || ArchVersion > 6 ) {
> Builder.defineMacro("__ARM_FEATURE_SAT", "1");
> hasSAT = true;
> }
>
> if (hasDSP || hasSAT)
> Builder.defineMacro("__ARM_FEATURE_QBIT", "1");
> ```
Yup, that looks good.
http://reviews.llvm.org/D12244
More information about the cfe-commits
mailing list