Assembler (#6)
Co-authored-by: Andre Wagner <WagnerAndre@JohnDeere.com> Reviewed-on: https://192.168.5.48/andre/tyche/pulls/6
This commit was merged in pull request #6.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define TYCHE_INSTRUCTION_HH
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
@@ -9,6 +10,8 @@
|
||||
|
||||
namespace tyche::vm {
|
||||
|
||||
constexpr uint8_t OPCODE_NEXT_SIZE = 0x20;
|
||||
|
||||
enum class Instruction : uint8_t {
|
||||
|
||||
// stack operations
|
||||
@@ -101,6 +104,8 @@ std::pair<std::string, size_t> debug_instruction(bc::Bytecode const& bt, uint32_
|
||||
enum class OperandType { NoOperand, Int8, Int16, Int32 };
|
||||
OperandType instruction_operand_type(Instruction instruction);
|
||||
|
||||
std::optional<Instruction> translate_instruction(std::string const& txt, std::optional<int> op);
|
||||
|
||||
}
|
||||
|
||||
#endif //TYCHE_INSTRUCTION_HH
|
||||
|
||||
Reference in New Issue
Block a user