[PATCH] D44727: [RISCV] Extend getTargetDefines for RISCVTargetInfo
Alex Bradbury via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 4 07:58:51 PDT 2018
asb added a comment.
Thanks Eli for the info on hasFeature.
I think the only thing now missing is test coverage for the defines.
================
Comment at: lib/Basic/Targets/RISCV.cpp:53-73
+ if (HasM) {
+ Builder.defineMacro("__riscv_mul");
+ Builder.defineMacro("__riscv_div");
+ Builder.defineMacro("__riscv_muldiv");
+ }
+
+ if (HasC)
----------------
I'd re-order these so features are tested in the canonical RISC-V order: M, then A, then F, then D, then C.
Repository:
rC Clang
https://reviews.llvm.org/D44727
More information about the cfe-commits
mailing list