mini-llvm 0.1.0
Loading...
Searching...
No Matches
RISCVOperation.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2
3#pragma once
4
5#include <cstdlib>
6
7namespace mini_llvm::mc {
8
10#define OPS
11#define X(mnemonic, name) RISCV_##name,
12#include "mini-llvm/targets/riscv/target.def"
13#undef X
14#undef OPS
15};
16
17inline constexpr const char *mnemonic(RISCVOperation op) {
18 switch (op) {
19#define OPS
20#define X(mnemonic, name) case RISCV_##name: return mnemonic;
21#include "mini-llvm/targets/riscv/target.def"
22#undef X
23#undef OPS
24 default:
25 abort();
26 }
27}
28
29} // namespace mini_llvm::mc
Definition Directive.h:8
RISCVOperation
Definition RISCVOperation.h:9
constexpr const char * mnemonic(RISCVOperation op)
Definition RISCVOperation.h:17