Hooking up code emission.

This commit is contained in:
Ben Vanik
2014-01-02 20:41:13 -08:00
parent 7969349126
commit e14d3379cb
12 changed files with 280 additions and 17 deletions

View File

@@ -11,6 +11,7 @@
#include <alloy/backend/x64/tracing.h>
#include <alloy/backend/x64/x64_assembler.h>
#include <alloy/backend/x64/x64_code_cache.h>
#include <alloy/backend/x64/lowering/lowering_table.h>
#include <alloy/backend/x64/lowering/lowering_sequences.h>
@@ -22,7 +23,7 @@ using namespace alloy::runtime;
X64Backend::X64Backend(Runtime* runtime) :
lowering_table_(0),
code_cache_(0), lowering_table_(0),
Backend(runtime) {
}
@@ -30,6 +31,7 @@ X64Backend::~X64Backend() {
alloy::tracing::WriteEvent(EventType::Deinit({
}));
delete lowering_table_;
delete code_cache_;
}
int X64Backend::Initialize() {
@@ -38,6 +40,12 @@ int X64Backend::Initialize() {
return result;
}
code_cache_ = new X64CodeCache();
result = code_cache_->Initialize();
if (result) {
return result;
}
lowering_table_ = new LoweringTable(this);
RegisterSequences(lowering_table_);