LIEF: Library to Instrument Executable Formats Version 2.0.0
Loading...
Searching...
No Matches
riscv/operands/Register.hpp
Go to the documentation of this file.
1/* Copyright 2022 - 2026 R. Thomas
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef LIEF_ASM_RISCV_OPERAND_REG_H
16#define LIEF_ASM_RISCV_OPERAND_REG_H
17
20
21
23
37class LIEF_API Register : public Operand {
38 public:
39 using Operand::Operand;
40
41 struct reg_t {
43 enum class TYPE {
44 NONE = 0,
49 };
50
51 union {
54 };
56 };
57
59 reg_t value() const;
60
61 static bool classof(const Operand* op);
62 ~Register() override = default;
63};
64}
65
66
67#endif
This class represents a register operand.
Definition riscv/operands/Register.hpp:37
reg_t value() const
The effective register as either: a REG or a SYSREG.
static bool classof(const Operand *op)
Namespace that wraps the different RISC-V operands.
Definition riscv/operands/Immediate.hpp:21
REG
Definition riscv/registers.hpp:25
@ NoRegister
Definition riscv/registers.hpp:26
SYSREG
Definition riscv/registers.hpp:602
Definition riscv/operands/Register.hpp:41
TYPE
Enum type used to discriminate the anonymous union.
Definition riscv/operands/Register.hpp:43
@ NONE
Definition riscv/operands/Register.hpp:44
REG reg
Definition riscv/operands/Register.hpp:52
SYSREG sysreg
Definition riscv/operands/Register.hpp:53
TYPE type
Definition riscv/operands/Register.hpp:55
#define LIEF_API
Definition visibility.h:45