Skip to content

Commit 4260683

Browse files
committed
[RISCV] Add groupid/bitmask for RISC-V extension
Base on riscv-non-isa/riscv-c-api-doc#74. This patch defines the groupid/bitmask in RISCVFeatures.td and generates the corresponding table in RISCVTargetParserDef.inc. The groupid/bitmask of extensions provides an abstraction layer between the compiler and runtime functions.
1 parent 74b933c commit 4260683

File tree

5 files changed

+185
-44
lines changed

5 files changed

+185
-44
lines changed

llvm/include/llvm/TargetParser/RISCVTargetParser.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ class Triple;
2424

2525
namespace RISCV {
2626

27+
namespace RISCVExtensionBitmaskTable {
28+
struct RISCVExtensionBitmask {
29+
const char *Name;
30+
unsigned GroupID;
31+
unsigned BitPosition;
32+
};
33+
} // namespace RISCVExtensionBitmaskTable
34+
2735
// We use 64 bits as the known part in the scalable vector types.
2836
static constexpr unsigned RVVBitsPerBlock = 64;
2937

0 commit comments

Comments
 (0)