Skip to content

Commit

Permalink
[RISCV] Add groupid/bitmask for RISC-V extension
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
BeMg committed Jun 5, 2024
1 parent 79b1137 commit 0d4af6e
Show file tree
Hide file tree
Showing 4 changed files with 184 additions and 0 deletions.
8 changes: 8 additions & 0 deletions llvm/include/llvm/TargetParser/RISCVTargetParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ class Triple;

namespace RISCV {

namespace RISCVExtensionBitmaskTable {
struct RISCVExtensionBitmask {
const char *Name;
unsigned GroupID;
unsigned long long Bitmask;
};
} // namespace RISCVExtensionBitmaskTable

// We use 64 bits as the known part in the scalable vector types.
static constexpr unsigned RVVBitsPerBlock = 64;

Expand Down
Loading

0 comments on commit 0d4af6e

Please sign in to comment.