diff options
Diffstat (limited to 'src/opcode.hpp')
| -rw-r--r-- | src/opcode.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/opcode.hpp b/src/opcode.hpp new file mode 100644 index 0000000..32254f3 --- /dev/null +++ b/src/opcode.hpp @@ -0,0 +1,33 @@ +#ifndef SRC_OPCODES_HPP_ +#define SRC_OPCODES_HPP_ + +#include <cstdint> + +namespace opcode { +constexpr uint32_t LOAD = 0b0000011; +constexpr uint32_t LOAD_FP = 0b0000111; +constexpr uint32_t MISC_MEM = 0b0001111; +constexpr uint32_t OP_IMM = 0b0010011; +constexpr uint32_t AUIPC = 0b0010111; +constexpr uint32_t OP_IMM_32 = 0b0011011; +constexpr uint32_t STORE = 0b0100011; +constexpr uint32_t STORE_FP = 0b0100111; +constexpr uint32_t AMO = 0b0101111; +constexpr uint32_t OP = 0b0110011; +constexpr uint32_t OP_32 = 0b0111011; +constexpr uint32_t LUI = 0b0110111; +constexpr uint32_t MADD = 0b1000011; +constexpr uint32_t MSUB = 0b1000111; +constexpr uint32_t NMSUB = 0b1001011; +constexpr uint32_t NMADD = 0b1001111; +constexpr uint32_t OP_FP = 0b1010011; +constexpr uint32_t OP_IMM_64 = 0b1011011; +constexpr uint32_t BRANCH = 0b1100011; +constexpr uint32_t JALR = 0b1100111; +constexpr uint32_t JAL = 0b1101111; +constexpr uint32_t SYSTEM = 0b1110011; +constexpr uint32_t OP_64 = 0b1111011; +} // namespace opcode + +#endif // SRC_OPCODES_HPP_ + |
