37 lines
838 B
C++
37 lines
838 B
C++
#include <pslang/jit/jit.hpp>
|
|
#include <pslang/jit/arch/aarch64/compiler.hpp>
|
|
|
|
#include <stdexcept>
|
|
|
|
namespace pslang::jit
|
|
{
|
|
|
|
void compile(program_context & context, ast::statement_list_ptr const & statements)
|
|
{
|
|
switch (context.abi)
|
|
{
|
|
case abi::itanium:
|
|
throw std::runtime_error("Itanium ABI JIT not implemented");
|
|
case abi::msvc:
|
|
throw std::runtime_error("MSVC ABI JIT not implemented");
|
|
case abi::armv8:
|
|
aarch64::compile(context, statements);
|
|
break;
|
|
}
|
|
}
|
|
|
|
void compile(program_context & pcontext, ir::module_context const & mcontext)
|
|
{
|
|
switch (pcontext.abi)
|
|
{
|
|
case abi::itanium:
|
|
throw std::runtime_error("Itanium ABI JIT not implemented");
|
|
case abi::msvc:
|
|
throw std::runtime_error("MSVC ABI JIT not implemented");
|
|
case abi::armv8:
|
|
aarch64::compile(pcontext, mcontext);
|
|
break;
|
|
}
|
|
}
|
|
|
|
}
|