Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
14e1079
fix(relinker): reject input executables that are not x86-64
aayushmishraaa Oct 11, 2026
79e452a
perf(relinker): walk fallthrough instructions without queueing
excited-raccoon Oct 11, 2026
1a4bdb7
fix(relinker): resolve debug PRX dependencies by module identity
aryan0078 Oct 11, 2026
301cb1d
fix(relinker): share module suffixes between identity and import matc…
aryan0078 Oct 11, 2026
c1dd887
fix(relinker): decode 3DNow! instructions with their ModRM and opcode…
claude Oct 11, 2026
9240559
fix(relinker): filter non-reference RIP-relative FF operations
hawwwwwk Oct 11, 2026
9b89aaf
fix(relinker): report the ModRM of 3DNow! instructions in decoded ins…
claude Oct 11, 2026
9896bbb
fix(relinker): resolve .suprx guest module aliases
hawwwwwk Oct 11, 2026
ec10166
fix(relinker): ignore no-op relocations in guest modules
jweidenh Oct 11, 2026
7520f89
fix(relinker): resolve EIP-relative imports in strict filter
hawwwwwk Oct 11, 2026
1ce8205
fix(relinker): reject empty positional paths
ArchitDewan Oct 12, 2026
d9ef3c0
fix(relinker): accept RELATIVE relocations against a zero-value secti…
saxopa Oct 12, 2026
4253231
feat(relinker): split unaligned 256-bit stores for Rosetta
fable-void Oct 11, 2026
4ed5eb2
fix(relinker): move a short guest TLS access's follower branch into i…
poonasor Oct 11, 2026
ffc2278
fix(relinker): rebase each origin in guest runpath lists
ArjenS-LA Oct 12, 2026
9e4807a
fix(relinker): accept trailing separators on the Windows origin path
ArjenS-LA Oct 12, 2026
6ca17ad
fix(relinker): preserve inputs when writing Windows diagnostics
ArjenS-LA Oct 12, 2026
a8dc377
fix(relinker): write registries after the executable
SandstromPL Oct 12, 2026
1195d5f
fix(relinker): resolve relocations against null symbol entries to 0
orishamir Oct 12, 2026
8e600de
fix(relinker): treat jump table targets as branch targets when moving…
fable-void Oct 12, 2026
8af94f9
perf(relinker): index guest exports for dependency resolution
Dripl1x Oct 12, 2026
14d6cb9
fix(relinker): recognize SDK memory syscall trap patterns
SibteProf Oct 12, 2026
e390acb
fix(relinker): keep weak undefined imports weak
Oct 12, 2026
7f6f5c9
test(relinker): register weak_imports next to elf_header
Oct 12, 2026
21e6241
fix(relinker): load a PT_SCE_RELRO segment that no PT_LOAD covers
saxopa Oct 12, 2026
2b81aba
fix(relinker): validate the ELF object version and header size
superhe11 Oct 11, 2026
789b715
fix(relinker): adapt fallthrough walk to the bitmap visited set
RINNECODER Oct 13, 2026
9de9aa7
Link wide-store codegen sources into rosetta_cpuid_tests
RINNECODER Oct 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 61 additions & 1 deletion core/relinker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ add_executable(relinker
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/ClzeroLowering.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/ReciprocalOperands.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/ReciprocalLowering.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/WideStoreOperands.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/WideStoreLowering.cpp
${CMAKE_CURRENT_SOURCE_DIR}/relinker/src/parsing/ElfReader.cpp
${CMAKE_CURRENT_SOURCE_DIR}/relinker/src/analysis/SyscallScanner.cpp
${CMAKE_CURRENT_SOURCE_DIR}/relinker/src/analysis/CallSiteResolver.cpp
Expand Down Expand Up @@ -141,6 +143,8 @@ if(WIN32)
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/ClzeroLowering.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/ReciprocalOperands.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/ReciprocalLowering.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/WideStoreOperands.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/WideStoreLowering.cpp
)
target_include_directories(amd64_only_windows_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/elfpatcher/include ${CMAKE_CURRENT_SOURCE_DIR}/domain/include ${CMAKE_CURRENT_SOURCE_DIR}/io/include ${CMAKE_CURRENT_SOURCE_DIR}/codegen/include ${CMAKE_CURRENT_SOURCE_DIR}/../libs/prx/libc/src/specifics/windows)
if(BUILD_TESTING)
Expand Down Expand Up @@ -177,6 +181,19 @@ if(BUILD_TESTING)
add_test(NAME call_site_index COMMAND call_site_index_tests)
set_tests_properties(call_site_index PROPERTIES TIMEOUT 20)

add_test_executable(sdk_mman_syscall_tests
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/SdkMmanSyscallTests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/relinker/src/analysis/SyscallScanner.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/InstructionScanner.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/X64InstructionDecoder.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/DecodedInstruction.cpp)
target_include_directories(sdk_mman_syscall_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/domain/include
${CMAKE_CURRENT_SOURCE_DIR}/relinker/include
${CMAKE_CURRENT_SOURCE_DIR}/codegen/include)
add_test(NAME sdk_mman_syscall COMMAND sdk_mman_syscall_tests)
set_tests_properties(sdk_mman_syscall PROPERTIES TIMEOUT 20)

add_test_executable(autorun_exit_tests
${CMAKE_CURRENT_SOURCE_DIR}/cli/tests/AutorunExitTests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/cli/src/Autorun.cpp
Expand Down Expand Up @@ -297,6 +314,8 @@ if(BUILD_TESTING)
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/ClzeroLowering.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/ReciprocalOperands.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/ReciprocalLowering.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/WideStoreOperands.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/WideStoreLowering.cpp
${CMAKE_CURRENT_SOURCE_DIR}/elfpatcher/src/linux/LinuxElfPatcher.cpp
${CMAKE_CURRENT_SOURCE_DIR}/elfpatcher/src/general/SegmentFilter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/elfpatcher/src/general/EntryStubBuilder.cpp
Expand All @@ -312,6 +331,18 @@ if(BUILD_TESTING)
${CMAKE_CURRENT_SOURCE_DIR}/io/include
)
add_test(NAME amd64_only_converter COMMAND amd64_only_converter_tests)
add_test_executable(call_site_resolver_tests
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/CallSiteResolverTests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/relinker/src/analysis/CallSiteResolver.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/InstructionScanner.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/X64InstructionDecoder.cpp
)
target_include_directories(call_site_resolver_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/domain/include
${CMAKE_CURRENT_SOURCE_DIR}/relinker/include
${CMAKE_CURRENT_SOURCE_DIR}/codegen/include
)
add_test(NAME call_site_resolver COMMAND call_site_resolver_tests)
add_test_executable(decoder_length_tests
${CMAKE_CURRENT_SOURCE_DIR}/codegen/tests/DecoderLengthTests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/X64InstructionDecoder.cpp
Expand All @@ -334,11 +365,14 @@ if(BUILD_TESTING)
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_rela_size.py $<TARGET_FILE:relinker>)
add_test(NAME none_relocations COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_none_relocations.py $<TARGET_FILE:relinker>)
add_test(NAME guest_none_relocations COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_guest_none_relocations.py $<TARGET_FILE:relinker>)
set_tests_properties(guest_none_relocations PROPERTIES TIMEOUT 20)
add_test(NAME optional_plt COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_optional_plt.py $<TARGET_FILE:relinker>)
add_test(NAME empty_tls COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_empty_tls.py $<TARGET_FILE:relinker>)
set(tlsCoverageGroups metadata padding register_loads displacement_bounds alu_execution register_address_loads rejected)
set(tlsCoverageGroups metadata padding register_loads displacement_bounds alu_execution register_address_loads moved_branch rejected)
foreach(register IN ITEMS 0 1 2 3 5 6 7 8 9 10 11 12 13 14 15)
list(APPEND tlsCoverageGroups displacement_r${register})
endforeach()
Expand Down Expand Up @@ -374,6 +408,9 @@ if(BUILD_TESTING)
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_windows_gui.py $<TARGET_FILE:relinker>)
add_test(NAME windows_working_directory COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_windows_working_directory.py $<TARGET_FILE:relinker>)
add_test(NAME windows_runpath COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_windows_runpath.py $<TARGET_FILE:relinker>)
set_tests_properties(windows_runpath PROPERTIES TIMEOUT 30)
add_test(NAME windows_address_space COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_windows_address_space.py $<TARGET_FILE:relinker>)
add_test(NAME windows_tls_thread_pointer COMMAND ${Python3_EXECUTABLE}
Expand Down Expand Up @@ -419,24 +456,33 @@ if(BUILD_TESTING)
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_guest_absolute_symbols.py $<TARGET_FILE:relinker>)
add_test(NAME guest_module_identity COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_guest_module_identity.py $<TARGET_FILE:relinker>)
add_test(NAME guest_export_lookup COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_guest_export_lookup.py $<TARGET_FILE:relinker>)
set_tests_properties(guest_export_lookup PROPERTIES TIMEOUT 30)
add_test(NAME guest_needed_nested_modules COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_guest_needed_nested_modules.py $<TARGET_FILE:relinker>)
add_test(NAME windows_import_modules COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_windows_import_modules.py $<TARGET_FILE:relinker>)
add_test(NAME elf_header COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_elf_header.py $<TARGET_FILE:relinker>)
add_test(NAME weak_imports COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_weak_imports.py $<TARGET_FILE:relinker>)
add_test(NAME input_magic COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_input_magic.py $<TARGET_FILE:relinker>)
add_test(NAME input_preservation COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_input_preservation.py $<TARGET_FILE:relinker>)
add_test(NAME input_file COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_input_file.py $<TARGET_FILE:relinker>)
add_test(NAME null_symbol_relocations COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_null_symbol_relocations.py $<TARGET_FILE:relinker>)
add_test(NAME input_nonascii COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_input_nonascii.py $<TARGET_FILE:relinker>)
add_test(NAME string_table_bounds COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_string_table_bounds.py $<TARGET_FILE:relinker>)
add_test(NAME sce_code_extent COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_sce_code_extent.py $<TARGET_FILE:relinker>)
add_test(NAME sce_relro COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_sce_relro.py $<TARGET_FILE:relinker>)
add_test(NAME call_registry COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/test_call_registry.py $<TARGET_FILE:relinker>)
add_test(NAME jmprel_table_bounds COMMAND ${Python3_EXECUTABLE}
Expand Down Expand Up @@ -499,6 +545,20 @@ if(BUILD_TESTING)
)
add_test(NAME entry_stub COMMAND entry_stub_tests)

add_test_executable(control_flow_graph_tests
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/ControlFlowGraphTests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/relinker/src/analysis/UnusedNidFilter/ControlFlowGraph.cpp
${CMAKE_CURRENT_SOURCE_DIR}/relinker/src/analysis/UnusedNidFilter/StrictReachability.cpp
${CMAKE_CURRENT_SOURCE_DIR}/codegen/src/x86/X64InstructionDecoder.cpp
)
target_include_directories(control_flow_graph_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/domain/include
${CMAKE_CURRENT_SOURCE_DIR}/codegen/include
${CMAKE_CURRENT_SOURCE_DIR}/relinker/include
)
add_test(NAME control_flow_graph COMMAND control_flow_graph_tests)
set_tests_properties(control_flow_graph PROPERTIES TIMEOUT 20)

add_test_executable(strict_nid_filter_tests
${CMAKE_CURRENT_SOURCE_DIR}/relinker/tests/StrictNidFilterTests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/relinker/src/analysis/UnusedNidFilter/StrictNidFilter.cpp
Expand Down
2 changes: 2 additions & 0 deletions core/relinker/cli/src/CliArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ Args ParseArgs(int argc, char* argv[]) {
args.windowsGui = true;
} else if (arg.rfind("--", 0) == 0 || arg == "unused-filter") {
throw std::runtime_error("unknown option: " + arg);
} else if (arg.empty()) {
throw std::runtime_error("input and output paths must be nonempty");
} else if (args.inputPath.empty()) {
args.inputPath = arg;
} else if (args.outputPath.empty()) {
Expand Down
8 changes: 8 additions & 0 deletions core/relinker/cli/tests/CliArgsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@ void unknownOption() {
expectThrows({"--", "input.elf", "output.elf"}, "unknown option: --");
}

void emptyPositionals() {
for (const auto& arguments : std::vector<std::vector<std::string>>{
{"", "input.elf", "output.elf"}, {"input.elf", "", "output.elf"},
{"", "output.elf"}, {"input.elf", ""}})
expectThrows(arguments, "input and output paths must be nonempty");
}

void tooManyPositionals() {
expectThrows({"input.elf", "output.elf", "extra.elf"}, "unexpected argument: extra.elf");
}
Expand Down Expand Up @@ -211,6 +218,7 @@ int main() {
unusedFilterRejectsDuplicates();
unusedFilterBareWordIsUnknown();
unknownOption();
emptyPositionals();
tooManyPositionals();
windowsDiagnosticsRequiresWindows();
windowsGuiRequiresWindows();
Expand Down
1 change: 1 addition & 0 deletions core/relinker/codegen/include/codegen/CodegenTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ struct DecodedInstructionInfo {
std::uint8_t RexPrefix;
ControlFlowKind FlowKind;
bool HasRipRelativeDisp;
bool AddressSize32;
std::size_t RipRelativeDispOffset;
bool HasModRm;
std::uint8_t ModRmByte;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class IAmd64OnlyConverter {

[[nodiscard]] virtual ConvertResult Convert(
std::vector<std::uint8_t> fileBytes,
const std::vector<Domain::ProgramHeader>& codeSegments
const std::vector<Domain::ProgramHeader>& segments
) const = 0;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ inline constexpr Entry kRdseed = {"RDSEED", nullptr, 0};
inline constexpr Entry kRdpid = {"RDPID", nullptr, 0};
inline constexpr Entry kClwb = {"CLWB", nullptr, 0};
inline constexpr Entry kCpuid = {"CPUID", nullptr, 0};
inline constexpr Entry kWideStore = {"256-bit store", nullptr, 0};
inline constexpr Entry kExtrq = {"EXTRQ", nullptr, 0};
inline constexpr Entry kInsertq = {"INSERTQ", nullptr, 0};
inline constexpr Entry kExtrqRegisterForm = {"EXTRQ register form", nullptr, 0};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ struct Amd64OnlyMatch {
std::size_t ReturnBranchOffset;
bool Optional = false;
std::vector<StubRelocation> Relocations = {};
bool RelocatableWindow = false;
};

struct Amd64OnlySubstitutionReport {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define CODEGEN_X86_IAMD64ONLYINSTRUCTIONMATCHER_HPP

#include <codegen/x86/Amd64OnlySubstitutionTypes.hpp>
#include <codegen/x86/StubBodyBuilder.hpp>
#include <cstdint>
#include <memory>
#include <optional>
Expand All @@ -23,6 +24,11 @@ class IAmd64OnlyInstructionMatcher {
std::span<const std::span<const std::uint8_t>> instructions,
std::span<const std::uint8_t> trailing
) const = 0;

virtual void EmitOutOfLine(
StubBodyBuilder& body,
std::span<const std::uint8_t> instruction
) const = 0;
};

std::unique_ptr<IAmd64OnlyInstructionMatcher> MakeAmd64OnlyInstructionMatcher(Amd64OnlyTarget target = Amd64OnlyTarget::Intel);
Expand Down
10 changes: 9 additions & 1 deletion core/relinker/codegen/include/codegen/x86/StubBodyBuilder.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef CODEGEN_X86_STUBBODYBUILDER_HPP
#define CODEGEN_X86_STUBBODYBUILDER_HPP

#include <codegen/CodegenTypes.hpp>
#include <codegen/x86/Amd64OnlySubstitutionTypes.hpp>
#include <domain/Types.hpp>
#include <array>
Expand Down Expand Up @@ -53,6 +54,10 @@ class StubBodyBuilder {
void Restore(std::uint8_t reg);
void Raw(std::span<const std::uint8_t> bytes);
void Move(std::span<const std::uint8_t> instruction, std::optional<std::size_t> ripDisplacementOffset);
void RipRelative(std::span<const std::uint8_t> instruction, std::size_t displacementOffset, std::int64_t target);
void MoveControlFlow(std::span<const std::uint8_t> instruction, const DecodedInstructionInfo& info);
void JumpTo(std::int64_t siteTarget);
void Seek(std::int64_t siteOffset);
void Advance(std::size_t length);
[[nodiscard]] LoweredBody Finish();

Expand All @@ -63,12 +68,15 @@ class StubBodyBuilder {
std::size_t ConstantIndex;
};

void _rel32(std::initializer_list<std::uint8_t> opcode, std::int64_t siteTarget);
void _pushReturnAddress(std::int64_t siteTarget);

std::vector<std::uint8_t> _bytes;
std::vector<Fixup> _fixups;
std::vector<StubConstant> _constants;
std::vector<StubRelocation> _relocations;
std::size_t _stackDepth = 0;
std::size_t _siteOffset = 0;
std::int64_t _siteOffset = 0;
};

}
Expand Down
16 changes: 16 additions & 0 deletions core/relinker/codegen/include/codegen/x86/WideStoreLowering.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#ifndef CODEGEN_X86_WIDESTORELOWERING_HPP
#define CODEGEN_X86_WIDESTORELOWERING_HPP

#include <codegen/x86/StubBodyBuilder.hpp>
#include <codegen/x86/WideStoreOperands.hpp>

namespace Codegen {

class WideStoreLowering {
public:
void EmitOutOfLine(StubBodyBuilder& body, const WideStoreOperands& operands) const;
};

}

#endif
26 changes: 26 additions & 0 deletions core/relinker/codegen/include/codegen/x86/WideStoreOperands.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef CODEGEN_X86_WIDESTOREOPERANDS_HPP
#define CODEGEN_X86_WIDESTOREOPERANDS_HPP

#include <cstddef>
#include <cstdint>
#include <optional>
#include <vector>

namespace Codegen {

struct WideStoreHalf {
std::vector<std::uint8_t> Bytes;
std::optional<std::size_t> RipDisplacementOffset;
std::int64_t RipTarget = 0;
};

struct WideStoreOperands {
WideStoreHalf Low;
WideStoreHalf High;
};

[[nodiscard]] std::optional<WideStoreOperands> DecodeVexWideStore(const std::uint8_t* data, std::size_t length);

}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ inline constexpr std::uint8_t TwoByteGrp6 = 0x00;
inline constexpr std::uint8_t TwoByteLar = 0x02;
inline constexpr std::uint8_t TwoByteLsl = 0x03;
inline constexpr std::uint8_t TwoBytePrefetchw = 0x0D;
inline constexpr std::uint8_t TwoByte3DNow = 0x0F;
inline constexpr std::uint8_t TwoByteMovCrDrMin = 0x20;
inline constexpr std::uint8_t TwoByteMovCrDrMax = 0x23;
inline constexpr std::uint8_t TwoBytePopcnt = 0xB8;
Expand Down
Loading
Loading