26 lines
461 B
C++
26 lines
461 B
C++
#include <pslang/jit/arch/macos_aarch64/resolver.hpp>
|
|
#include <pslang/jit/arch/macos_aarch64/instruction_builder.hpp>
|
|
|
|
namespace pslang::jit::macos_aarch64
|
|
{
|
|
|
|
namespace
|
|
{
|
|
|
|
struct resolver_impl
|
|
: resolver
|
|
{
|
|
void resolve(std::uint8_t * opcode, std::int32_t offset) override
|
|
{
|
|
instruction_builder::ldr_pc_inject(opcode, offset / 4);
|
|
}
|
|
};
|
|
|
|
}
|
|
|
|
std::unique_ptr<resolver> make_resolver()
|
|
{
|
|
return std::make_unique<resolver_impl>();
|
|
}
|
|
|
|
}
|