More X64 backend skeleton work.
This commit is contained in:
@@ -58,6 +58,7 @@ Runtime::~Runtime() {
|
||||
|
||||
// TODO(benvanik): based on compiler support
|
||||
#include <alloy/backend/ivm/ivm_backend.h>
|
||||
#include <alloy/backend/x64/x64_backend.h>
|
||||
|
||||
int Runtime::Initialize(Frontend* frontend, Backend* backend) {
|
||||
// Must be initialized by subclass before calling into this.
|
||||
@@ -76,21 +77,31 @@ int Runtime::Initialize(Frontend* frontend, Backend* backend) {
|
||||
}
|
||||
|
||||
if (!backend) {
|
||||
#if defined(ALLOY_HAS_X64_BACKEND) && ALLOY_HAS_X64_BACKEND
|
||||
if (FLAGS_runtime_backend == "x64") {
|
||||
backend = new alloy::backend::x64::X64Backend(
|
||||
this);
|
||||
}
|
||||
#endif // ALLOY_HAS_X64_BACKEND
|
||||
#if defined(ALLOY_HAS_IVM_BACKEND) && ALLOY_HAS_IVM_BACKEND
|
||||
if (FLAGS_runtime_backend == "ivm") {
|
||||
backend = new alloy::backend::ivm::IVMBackend(
|
||||
this);
|
||||
}
|
||||
#endif
|
||||
// x64/etc
|
||||
#endif // ALLOY_HAS_IVM_BACKEND
|
||||
if (FLAGS_runtime_backend == "any") {
|
||||
// x64/etc
|
||||
#if defined(ALLOY_HAS_X64_BACKEND) && ALLOY_HAS_X64_BACKEND
|
||||
/*if (!backend) {
|
||||
backend = new alloy::backend::x64::X64Backend(
|
||||
this);
|
||||
}*/
|
||||
#endif // ALLOY_HAS_X64_BACKEND
|
||||
#if defined(ALLOY_HAS_IVM_BACKEND) && ALLOY_HAS_IVM_BACKEND
|
||||
if (!backend) {
|
||||
backend = new alloy::backend::ivm::IVMBackend(
|
||||
this);
|
||||
}
|
||||
#endif
|
||||
#endif // ALLOY_HAS_IVM_BACKEND
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user