[MIPS][Deserialize] Fix deserialize off heap target.
Change-Id: I3be3dc8815015c0215d3e3d655394850d85db871 Reviewed-on: https://chromium-review.googlesource.com/c/1490812 Reviewed-by: Predrag Rudic <prudic@wavecomp.com> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Yu Yin <xwafish@gmail.com> Cr-Commit-Position: refs/heads/master@{#59997}
This commit is contained in:
parent
131f4a3015
commit
285dc86e93
@ -123,16 +123,8 @@ Address Assembler::target_address_from_return_address(Address pc) {
|
||||
|
||||
void Assembler::deserialization_set_special_target_at(
|
||||
Address instruction_payload, Code code, Address target) {
|
||||
if (IsMipsArchVariant(kMips32r6)) {
|
||||
// On R6 the address location is shifted by one instruction
|
||||
set_target_address_at(
|
||||
instruction_payload - (kInstructionsFor32BitConstant - 1) * kInstrSize,
|
||||
set_target_address_at(instruction_payload,
|
||||
!code.is_null() ? code->constant_pool() : kNullAddress, target);
|
||||
} else {
|
||||
set_target_address_at(
|
||||
instruction_payload - kInstructionsFor32BitConstant * kInstrSize,
|
||||
!code.is_null() ? code->constant_pool() : kNullAddress, target);
|
||||
}
|
||||
}
|
||||
|
||||
int Assembler::deserialization_special_target_size(
|
||||
|
@ -113,8 +113,7 @@ Address Assembler::target_address_from_return_address(Address pc) {
|
||||
|
||||
void Assembler::deserialization_set_special_target_at(
|
||||
Address instruction_payload, Code code, Address target) {
|
||||
set_target_address_at(
|
||||
instruction_payload - kInstructionsFor64BitConstant * kInstrSize,
|
||||
set_target_address_at(instruction_payload,
|
||||
!code.is_null() ? code->constant_pool() : kNullAddress, target);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user