libjit doesn't encode mov with imm64 offsets, fixing.
This commit is contained in:
parent
70a9a1053e
commit
9487fa027c
|
@ -1336,8 +1336,9 @@ jit_value_t LibjitEmitter::ReadMemory(
|
||||||
// We could store the memory base as a global value (or indirection off of
|
// We could store the memory base as a global value (or indirection off of
|
||||||
// state) if we wanted to avoid embedding runtime values into the code.
|
// state) if we wanted to avoid embedding runtime values into the code.
|
||||||
jit_value_t address = TouchMemoryAddress(cia, addr);
|
jit_value_t address = TouchMemoryAddress(cia, addr);
|
||||||
jit_nint membase = (jit_nint)xe_memory_addr(memory_, 0);
|
address = jit_insn_add(fn_, address, jit_value_create_nint_constant(fn_,
|
||||||
jit_value_t value = jit_insn_load_relative(fn_, address, membase, data_type);
|
jit_type_nuint, (jit_nuint)xe_memory_addr(memory_, 0)));
|
||||||
|
jit_value_t value = jit_insn_load_relative(fn_, address, 0, data_type);
|
||||||
if (acquire) {
|
if (acquire) {
|
||||||
// TODO(benvanik): acquire semantics.
|
// TODO(benvanik): acquire semantics.
|
||||||
// load_value->setAlignment(size);
|
// load_value->setAlignment(size);
|
||||||
|
@ -1403,6 +1404,7 @@ void LibjitEmitter::WriteMemory(
|
||||||
// We could store the memory base as a global value (or indirection off of
|
// We could store the memory base as a global value (or indirection off of
|
||||||
// state) if we wanted to avoid embedding runtime values into the code.
|
// state) if we wanted to avoid embedding runtime values into the code.
|
||||||
jit_value_t address = TouchMemoryAddress(cia, addr);
|
jit_value_t address = TouchMemoryAddress(cia, addr);
|
||||||
jit_nint membase = (jit_nint)xe_memory_addr(memory_, 0);
|
address = jit_insn_add(fn_, address, jit_value_create_nint_constant(fn_,
|
||||||
jit_insn_store_relative(fn_, address, membase, value);
|
jit_type_nuint, (jit_nuint)xe_memory_addr(memory_, 0)));
|
||||||
|
jit_insn_store_relative(fn_, address, 0, value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit a37e442c53f847d6c80b4007a3d626bc382038dd
|
Subproject commit f2628ca8f394d6aa905404b57e78db2cf531e5bc
|
Loading…
Reference in New Issue