Commit 4a03a235 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

MIPS[64]: Prefer handle.address() over handle.location() in some places.

Port https://chromium-review.googlesource.com/563658.

R=mvstanton@chromium.org

Bug: v8:6048
Change-Id: Ic3e23d82a039a1bec7b328e79fefb0ea18a3b3f7
Reviewed-on: https://chromium-review.googlesource.com/566837Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46562}
parent 94d1509e
...@@ -227,9 +227,8 @@ void RelocInfo::unchecked_update_wasm_size(Isolate* isolate, uint32_t size, ...@@ -227,9 +227,8 @@ void RelocInfo::unchecked_update_wasm_size(Isolate* isolate, uint32_t size,
// See assembler-mips-inl.h for inlined constructors. // See assembler-mips-inl.h for inlined constructors.
Operand::Operand(Handle<HeapObject> handle) { Operand::Operand(Handle<HeapObject> handle) {
AllowHandleDereference using_location;
rm_ = no_reg; rm_ = no_reg;
value_.immediate = reinterpret_cast<intptr_t>(handle.location()); value_.immediate = reinterpret_cast<intptr_t>(handle.address());
rmode_ = RelocInfo::EMBEDDED_OBJECT; rmode_ = RelocInfo::EMBEDDED_OBJECT;
} }
......
...@@ -3636,8 +3636,7 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode, ...@@ -3636,8 +3636,7 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode,
Condition cond, Register rs, const Operand& rt, Condition cond, Register rs, const Operand& rt,
BranchDelaySlot bd) { BranchDelaySlot bd) {
DCHECK(RelocInfo::IsCodeTarget(rmode)); DCHECK(RelocInfo::IsCodeTarget(rmode));
AllowDeferredHandleDereference embedding_raw_address; Jump(reinterpret_cast<intptr_t>(code.address()), rmode, cond, rs, rt, bd);
Jump(reinterpret_cast<intptr_t>(code.location()), rmode, cond, rs, rt, bd);
} }
int TurboAssembler::CallSize(Register target, int16_t offset, Condition cond, int TurboAssembler::CallSize(Register target, int16_t offset, Condition cond,
...@@ -3781,8 +3780,7 @@ int TurboAssembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode, ...@@ -3781,8 +3780,7 @@ int TurboAssembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode,
Condition cond, Register rs, const Operand& rt, Condition cond, Register rs, const Operand& rt,
BranchDelaySlot bd) { BranchDelaySlot bd) {
AllowDeferredHandleDereference using_raw_address; AllowDeferredHandleDereference using_raw_address;
return CallSize(reinterpret_cast<Address>(code.location()), return CallSize(code.address(), rmode, cond, rs, rt, bd);
rmode, cond, rs, rt, bd);
} }
void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode, void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
...@@ -3793,7 +3791,7 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode, ...@@ -3793,7 +3791,7 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
bind(&start); bind(&start);
DCHECK(RelocInfo::IsCodeTarget(rmode)); DCHECK(RelocInfo::IsCodeTarget(rmode));
AllowDeferredHandleDereference embedding_raw_address; AllowDeferredHandleDereference embedding_raw_address;
Call(reinterpret_cast<Address>(code.location()), rmode, cond, rs, rt, bd); Call(code.address(), rmode, cond, rs, rt, bd);
DCHECK_EQ(CallSize(code, rmode, cond, rs, rt, bd), DCHECK_EQ(CallSize(code, rmode, cond, rs, rt, bd),
SizeOfCodeGeneratedSince(&start)); SizeOfCodeGeneratedSince(&start));
} }
......
...@@ -207,9 +207,8 @@ void RelocInfo::unchecked_update_wasm_size(Isolate* isolate, uint32_t size, ...@@ -207,9 +207,8 @@ void RelocInfo::unchecked_update_wasm_size(Isolate* isolate, uint32_t size,
// See assembler-mips-inl.h for inlined constructors. // See assembler-mips-inl.h for inlined constructors.
Operand::Operand(Handle<HeapObject> handle) { Operand::Operand(Handle<HeapObject> handle) {
AllowHandleDereference using_location;
rm_ = no_reg; rm_ = no_reg;
value_.immediate = reinterpret_cast<intptr_t>(handle.location()); value_.immediate = reinterpret_cast<intptr_t>(handle.address());
rmode_ = RelocInfo::EMBEDDED_OBJECT; rmode_ = RelocInfo::EMBEDDED_OBJECT;
} }
......
...@@ -3978,8 +3978,7 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode, ...@@ -3978,8 +3978,7 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode,
Condition cond, Register rs, const Operand& rt, Condition cond, Register rs, const Operand& rt,
BranchDelaySlot bd) { BranchDelaySlot bd) {
DCHECK(RelocInfo::IsCodeTarget(rmode)); DCHECK(RelocInfo::IsCodeTarget(rmode));
AllowDeferredHandleDereference embedding_raw_address; Jump(reinterpret_cast<intptr_t>(code.address()), rmode, cond, rs, rt, bd);
Jump(reinterpret_cast<intptr_t>(code.location()), rmode, cond, rs, rt, bd);
} }
int TurboAssembler::CallSize(Register target, Condition cond, Register rs, int TurboAssembler::CallSize(Register target, Condition cond, Register rs,
...@@ -4056,9 +4055,7 @@ void TurboAssembler::Call(Address target, RelocInfo::Mode rmode, Condition cond, ...@@ -4056,9 +4055,7 @@ void TurboAssembler::Call(Address target, RelocInfo::Mode rmode, Condition cond,
int TurboAssembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode, int TurboAssembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode,
Condition cond, Register rs, const Operand& rt, Condition cond, Register rs, const Operand& rt,
BranchDelaySlot bd) { BranchDelaySlot bd) {
AllowDeferredHandleDereference using_raw_address; return CallSize(code.address(), rmode, cond, rs, rt, bd);
return CallSize(reinterpret_cast<Address>(code.location()),
rmode, cond, rs, rt, bd);
} }
void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode, void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
...@@ -4068,8 +4065,7 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode, ...@@ -4068,8 +4065,7 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
Label start; Label start;
bind(&start); bind(&start);
DCHECK(RelocInfo::IsCodeTarget(rmode)); DCHECK(RelocInfo::IsCodeTarget(rmode));
AllowDeferredHandleDereference embedding_raw_address; Call(code.address(), rmode, cond, rs, rt, bd);
Call(reinterpret_cast<Address>(code.location()), rmode, cond, rs, rt, bd);
DCHECK_EQ(CallSize(code, rmode, cond, rs, rt, bd), DCHECK_EQ(CallSize(code, rmode, cond, rs, rt, bd),
SizeOfCodeGeneratedSince(&start)); SizeOfCodeGeneratedSince(&start));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment