|
contur2
|
ISA (Instruction Set Architecture) constants and helpers. More...
#include <cstdint>#include <string_view>#include "contur/arch/instruction.h"#include "contur/arch/interrupt.h"
Go to the source code of this file.
Namespaces | |
| namespace | contur |
Functions | |
| constexpr std::string_view | contur::instructionName (Instruction instr) noexcept |
| Returns the human-readable mnemonic for an instruction. | |
| constexpr std::string_view | contur::interruptName (Interrupt intr) noexcept |
| Returns the human-readable name for an interrupt code. | |
| constexpr bool | contur::isArithmetic (Instruction instr) noexcept |
| Returns true if the instruction is an arithmetic operation (Add, Sub, Mul, Div). | |
| constexpr bool | contur::isLogic (Instruction instr) noexcept |
| Returns true if the instruction is a logic/bitwise operation (And, Or, Xor, Shift). | |
| constexpr bool | contur::isJump (Instruction instr) noexcept |
| Returns true if the instruction is a conditional or unconditional jump. | |
| constexpr bool | contur::isStackOp (Instruction instr) noexcept |
| Returns true if the instruction affects the stack (Push, Pop, Call, Return). | |
| constexpr bool | contur::isMemoryOp (Instruction instr) noexcept |
| Returns true if the instruction involves memory access (ReadMemory, WriteMemory). | |
| constexpr bool | contur::isHalt (Instruction instr) noexcept |
| Returns true if the instruction terminates execution flow (Halt, Interrupt with Exit). | |
Variables | |
| constexpr std::uint8_t | contur::INSTRUCTION_COUNT = 25 |
| Total number of defined instructions. | |
ISA (Instruction Set Architecture) constants and helpers.
Provides constexpr utility functions for instruction decoding, name lookup, and classification. All functions are header-only and suitable for compile-time evaluation.
Definition in file isa.h.