diff --git a/src/dynarmic/backend/arm64/emit_arm64.cpp b/src/dynarmic/backend/arm64/emit_arm64.cpp index 6988a23e..991be283 100644 --- a/src/dynarmic/backend/arm64/emit_arm64.cpp +++ b/src/dynarmic/backend/arm64/emit_arm64.cpp @@ -26,7 +26,7 @@ EmittedBlockInfo EmitArm64(oaknut::CodeGenerator& code, IR::Block block) { code.STR(W0, X1, offsetof(A32JitState, regs) + 1 * sizeof(u32)); code.STR(W0, X1, offsetof(A32JitState, regs) + 15 * sizeof(u32)); - ebi.relocations[code.ptr() - ebi.entry_point] = LinkTarget::ReturnFromRunCode; + ebi.relocations.emplace_back(Relocation{code.ptr() - ebi.entry_point, LinkTarget::ReturnFromRunCode}); code.NOP(); ebi.size = code.ptr() - ebi.entry_point; diff --git a/src/dynarmic/backend/arm64/emit_arm64.h b/src/dynarmic/backend/arm64/emit_arm64.h index 73f212ea..12516418 100644 --- a/src/dynarmic/backend/arm64/emit_arm64.h +++ b/src/dynarmic/backend/arm64/emit_arm64.h @@ -6,9 +6,9 @@ #pragma once #include +#include #include -#include namespace oaknut { struct PointerCodeGeneratorPolicy; @@ -29,10 +29,15 @@ enum class LinkTarget { ReturnFromRunCode, }; +struct Relocation { + std::ptrdiff_t code_offset; + LinkTarget target; +}; + struct EmittedBlockInfo { CodePtr entry_point; size_t size; - tsl::robin_map relocations; + std::vector relocations; }; EmittedBlockInfo EmitArm64(oaknut::CodeGenerator& code, IR::Block block);