[PATCH] D94403: [RISCV] Implement new architecture extension macros

Kito Cheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 17 19:50:14 PST 2021


kito-cheng added a comment.

That's my fault, I didn't specify the behavior of sub-extension clearly on the spec, but I think it would be great if we also define sub-extension marcos, since it would be easier to check when some core only implement sub-extension, and the code can just check the sub-extensio rather than check both.



================
Comment at: clang/lib/Basic/Targets/RISCV.cpp:148
+  if (HasB) {
+    Builder.defineMacro("__riscv_b", "92000");
     Builder.defineMacro("__riscv_bitmanip");
----------------
Could you add all subset included in `B`, like zba, zbb, zbc, zbp...


================
Comment at: clang/lib/Basic/Targets/RISCV.cpp:153
+  if (HasV) {
+    Builder.defineMacro("__riscv_v", "9000");
     Builder.defineMacro("__riscv_vector");
----------------
Could you add all subset included in `V`, `Zvamo` and `Zvlsseg`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94403/new/

https://reviews.llvm.org/D94403



More information about the cfe-commits mailing list