Commit 80a75329 authored by Zhao Jiazhong's avatar Zhao Jiazhong Committed by Commit Bot

[mips][wasm] Use int type for small offsets

Port ba564604
https://chromium-review.googlesource.com/c/v8/v8/+/2489691

Change-Id: I2397db612dc99904ef1ef3876b973b74850c9c38
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2496600
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70773}
parent 21758b91
......@@ -360,16 +360,16 @@ void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
}
}
void LiftoffAssembler::LoadFromInstance(Register dst, uint32_t offset,
void LiftoffAssembler::LoadFromInstance(Register dst, int32_t offset,
int size) {
DCHECK_LE(offset, kMaxInt);
DCHECK_LE(0, offset);
lw(dst, liftoff::GetInstanceOperand());
DCHECK_EQ(4, size);
lw(dst, MemOperand(dst, offset));
}
void LiftoffAssembler::LoadTaggedPointerFromInstance(Register dst,
uint32_t offset) {
int32_t offset) {
LoadFromInstance(dst, offset, kTaggedSize);
}
......
......@@ -340,9 +340,9 @@ void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
}
}
void LiftoffAssembler::LoadFromInstance(Register dst, uint32_t offset,
void LiftoffAssembler::LoadFromInstance(Register dst, int32_t offset,
int size) {
DCHECK_LE(offset, kMaxInt);
DCHECK_LE(0, offset);
Ld(dst, liftoff::GetInstanceOperand());
DCHECK(size == 4 || size == 8);
if (size == 4) {
......@@ -353,7 +353,7 @@ void LiftoffAssembler::LoadFromInstance(Register dst, uint32_t offset,
}
void LiftoffAssembler::LoadTaggedPointerFromInstance(Register dst,
uint32_t offset) {
int32_t offset) {
LoadFromInstance(dst, offset, kTaggedSize);
}
......
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