mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-01 12:46:01 +00:00
Support RIP relative memory operands in patched instructions.
This commit is contained in:
parent
088130863b
commit
615f4e770f
|
@ -44,6 +44,10 @@ static Xbyak::Address ZydisToXbyakMemoryOperand(const ZydisDecodedOperand& opera
|
|||
ASSERT_MSG(operand.type == ZYDIS_OPERAND_TYPE_MEMORY, "Expected memory operand, got type: {}",
|
||||
static_cast<u32>(operand.type));
|
||||
|
||||
if (operand.mem.base == ZYDIS_REGISTER_RIP) {
|
||||
return ptr[rip + operand.mem.disp.value];
|
||||
}
|
||||
|
||||
Xbyak::RegExp expression{};
|
||||
if (operand.mem.base != ZYDIS_REGISTER_NONE) {
|
||||
expression = expression + ZydisToXbyakRegister(operand.mem.base);
|
||||
|
|
Loading…
Reference in a new issue