Skip to content

Commit 79eaad5

Browse files
BeMgyuxuanchen1997
authored andcommitted
[RISCV] Add groupid/bitmask for RISC-V extension (#94440)
Summary: 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. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251500
1 parent 487d448 commit 79eaad5

File tree

5 files changed

+180
-44
lines changed

5 files changed

+180
-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)