This revision was automatically updated to reflect the committed changes.
Closed by commit rC329278: [PATCH] [RISCV] Extend getTargetDefines for
RISCVTargetInfo (authored by shiva, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D44727?vs=140959&id=141140#toc
Repository:
rC
asb accepted this revision.
asb added a comment.
This revision is now accepted and ready to land.
Thanks, this looks good to me.
Comment at: lib/Basic/Targets/RISCV.cpp:62-70
+ if (HasD)
+Builder.defineMacro("__riscv_flen", "64");
+ else if (HasF)
+Builder.defineMacro
kito-cheng updated this revision to Diff 140959.
kito-cheng added a comment.
Changes:
- Reorder marco define into canonical order which specified in ISA manual.
- Add missing test for marco.
Repository:
rC Clang
https://reviews.llvm.org/D44727
Files:
lib/Basic/Targets/RISCV.cpp
lib/Basi
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");
+
kito-cheng updated this revision to Diff 140913.
kito-cheng added a comment.
Changes:
- Add testcase for TargetFeature: riscv, riscv32 and riscv64
Repository:
rC Clang
https://reviews.llvm.org/D44727
Files:
lib/Basic/Targets/RISCV.cpp
lib/Basic/Targets/RISCV.h
test/Modules/Inputs/modu
kito-cheng added a comment.
Hi Eli:
Thanks your advise, I've checked those marco are match with GCC :)
Repository:
rC Clang
https://reviews.llvm.org/D44727
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mai
efriedma added a comment.
Do the macros you're defining here match gcc?
Comment at: lib/Basic/Targets/RISCV.cpp:68
+
+bool RISCVTargetInfo::hasFeature(StringRef Feature) const {
+ return llvm::StringSwitch(Feature)
asb wrote:
> It seems a number of other targe
kito-cheng updated this revision to Diff 140046.
kito-cheng retitled this revision from "[RISCV] Implement getTargetDefines,
handleTargetFeatures and hasFeature for RISCVTargetInfo" to "[RISCV] Extend
getTargetDefines for RISCVTargetInfo".
kito-cheng edited the summary of this revision.
kito-chen