delete emitter, create IR enum

This commit is contained in:
Simone Coco
2026-01-27 09:21:19 +01:00
parent c5733869e6
commit dac7c26f8e
3 changed files with 17 additions and 21 deletions

View File

@@ -1,7 +0,0 @@
#include <emitter.hpp>
namespace rc64 {
Emitter::Emitter() : Xbyak::CodeGenerator(kMaxCodeCacheSize, Xbyak::AutoGrow) {
}
}

View File

@@ -1,14 +0,0 @@
#pragma once
#include <xbyak/xbyak.h>
#include <util.hpp>
#include <type.hpp>
namespace rc64 {
struct Emitter : Xbyak::CodeGenerator {
Emitter();
static constexpr size_t kMaxTableSize = 1 << 12;
static constexpr size_t kMaxPagesPerTable = 1 << 20;
static constexpr size_t kMaxCodeCacheSize = kMaxTableSize * kMaxPagesPerTable;
};
}

17
src/frontend/ir.hpp Normal file
View File

@@ -0,0 +1,17 @@
#pragma once
enum InstructionType {
Add,
Subtract,
Multiply,
Divide,
Xor,
Not,
Or,
And,
Negate,
LeftShift,
RightShift,
CallFunction
};