Commit 8e7d2844 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[wasm][liftoff] Delete unused parameter in StoreTaggedPointer

The {offset_reg} parameter was introduced so that the signature of
StoreTaggedPointer is the same as for Store, and also to prepare for
potential later uses. However, handling the parameter would introduce
additional complexity, and chances are low that it will ever be used.
That's why this CL just removes it.

R=thibaudm@chromium.org

Bug: v8:7581
Change-Id: Ib419a72e1d9f36b8d9a3dbbce538ce57bb37d476
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2412182Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69958}
parent d558494c
...@@ -660,7 +660,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr, ...@@ -660,7 +660,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr,
} }
void LiftoffAssembler::StoreTaggedPointer(Register dst_addr, void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
Register offset_reg,
int32_t offset_imm, int32_t offset_imm,
LiftoffRegister src, LiftoffRegister src,
LiftoffRegList pinned) { LiftoffRegList pinned) {
......
...@@ -339,7 +339,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr, ...@@ -339,7 +339,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr,
} }
void LiftoffAssembler::StoreTaggedPointer(Register dst_addr, void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
Register offset_reg,
int32_t offset_imm, int32_t offset_imm,
LiftoffRegister src, LiftoffRegister src,
LiftoffRegList pinned) { LiftoffRegList pinned) {
......
...@@ -293,7 +293,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr, ...@@ -293,7 +293,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr,
} }
void LiftoffAssembler::StoreTaggedPointer(Register dst_addr, void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
Register offset_reg,
int32_t offset_imm, int32_t offset_imm,
LiftoffRegister src, LiftoffRegister src,
LiftoffRegList pinned) { LiftoffRegList pinned) {
...@@ -301,9 +300,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr, ...@@ -301,9 +300,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
DCHECK_LE(offset_imm, std::numeric_limits<int32_t>::max()); DCHECK_LE(offset_imm, std::numeric_limits<int32_t>::max());
STATIC_ASSERT(kTaggedSize == kInt32Size); STATIC_ASSERT(kTaggedSize == kInt32Size);
Register scratch = pinned.set(GetUnusedRegister(kGpReg, pinned)).gp(); Register scratch = pinned.set(GetUnusedRegister(kGpReg, pinned)).gp();
Operand dst_op = offset_reg == no_reg Operand dst_op = Operand(dst_addr, offset_imm);
? Operand(dst_addr, offset_imm)
: Operand(dst_addr, offset_reg, times_1, offset_imm);
mov(dst_op, src.gp()); mov(dst_op, src.gp());
Label write_barrier; Label write_barrier;
......
...@@ -485,9 +485,8 @@ class LiftoffAssembler : public TurboAssembler { ...@@ -485,9 +485,8 @@ class LiftoffAssembler : public TurboAssembler {
inline void LoadTaggedPointer(Register dst, Register src_addr, inline void LoadTaggedPointer(Register dst, Register src_addr,
Register offset_reg, int32_t offset_imm, Register offset_reg, int32_t offset_imm,
LiftoffRegList pinned); LiftoffRegList pinned);
inline void StoreTaggedPointer(Register dst_addr, Register offset_reg, inline void StoreTaggedPointer(Register dst_addr, int32_t offset_imm,
int32_t offset_imm, LiftoffRegister src, LiftoffRegister src, LiftoffRegList pinned);
LiftoffRegList pinned);
inline void Load(LiftoffRegister dst, Register src_addr, Register offset_reg, inline void Load(LiftoffRegister dst, Register src_addr, Register offset_reg,
uint32_t offset_imm, LoadType type, LiftoffRegList pinned, uint32_t offset_imm, LoadType type, LiftoffRegList pinned,
uint32_t* protected_load_pc = nullptr, uint32_t* protected_load_pc = nullptr,
......
...@@ -1871,7 +1871,7 @@ class LiftoffCompiler { ...@@ -1871,7 +1871,7 @@ class LiftoffCompiler {
pinned.set(__ GetUnusedRegister(kGpReg, pinned)).gp(); pinned.set(__ GetUnusedRegister(kGpReg, pinned)).gp();
LOAD_TAGGED_PTR_INSTANCE_FIELD(globals_buffer, TaggedGlobalsBuffer); LOAD_TAGGED_PTR_INSTANCE_FIELD(globals_buffer, TaggedGlobalsBuffer);
LiftoffRegister value = pinned.set(__ PopToRegister(pinned)); LiftoffRegister value = pinned.set(__ PopToRegister(pinned));
__ StoreTaggedPointer(globals_buffer, no_reg, __ StoreTaggedPointer(globals_buffer,
wasm::ObjectAccess::ElementOffsetInTaggedFixedArray( wasm::ObjectAccess::ElementOffsetInTaggedFixedArray(
imm.global->offset), imm.global->offset),
value, pinned); value, pinned);
......
...@@ -392,7 +392,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr, ...@@ -392,7 +392,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr,
} }
void LiftoffAssembler::StoreTaggedPointer(Register dst_addr, void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
Register offset_reg,
int32_t offset_imm, int32_t offset_imm,
LiftoffRegister src, LiftoffRegister src,
LiftoffRegList pinned) { LiftoffRegList pinned) {
......
...@@ -359,7 +359,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr, ...@@ -359,7 +359,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr,
} }
void LiftoffAssembler::StoreTaggedPointer(Register dst_addr, void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
Register offset_reg,
int32_t offset_imm, int32_t offset_imm,
LiftoffRegister src, LiftoffRegister src,
LiftoffRegList pinned) { LiftoffRegList pinned) {
......
...@@ -114,7 +114,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr, ...@@ -114,7 +114,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr,
} }
void LiftoffAssembler::StoreTaggedPointer(Register dst_addr, void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
Register offset_reg,
int32_t offset_imm, int32_t offset_imm,
LiftoffRegister src, LiftoffRegister src,
LiftoffRegList pinned) { LiftoffRegList pinned) {
......
...@@ -113,7 +113,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr, ...@@ -113,7 +113,6 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr,
} }
void LiftoffAssembler::StoreTaggedPointer(Register dst_addr, void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
Register offset_reg,
int32_t offset_imm, int32_t offset_imm,
LiftoffRegister src, LiftoffRegister src,
LiftoffRegList pinned) { LiftoffRegList pinned) {
......
...@@ -277,16 +277,12 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr, ...@@ -277,16 +277,12 @@ void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr,
} }
void LiftoffAssembler::StoreTaggedPointer(Register dst_addr, void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
Register offset_reg,
int32_t offset_imm, int32_t offset_imm,
LiftoffRegister src, LiftoffRegister src,
LiftoffRegList pinned) { LiftoffRegList pinned) {
DCHECK_GE(offset_imm, 0); DCHECK_GE(offset_imm, 0);
if (emit_debug_code() && offset_reg != no_reg) {
AssertZeroExtended(offset_reg);
}
Register scratch = pinned.set(GetUnusedRegister(kGpReg, pinned)).gp(); Register scratch = pinned.set(GetUnusedRegister(kGpReg, pinned)).gp();
Operand dst_op = liftoff::GetMemOp(this, dst_addr, offset_reg, Operand dst_op = liftoff::GetMemOp(this, dst_addr, no_reg,
static_cast<uint32_t>(offset_imm)); static_cast<uint32_t>(offset_imm));
StoreTaggedField(dst_op, src.gp()); StoreTaggedField(dst_op, src.gp());
......
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