Commit a5f902af authored by Zhao Jiazhong's avatar Zhao Jiazhong Committed by Commit Bot

[mips][liftoff][mv] Remove multi-value overhead

Port 2332ebd8
https://crrev.com/c/2264099

Original Commit Message:

  - Add a separate function to load return slots, instead of encoding this
  in the offset,
  - Add fast path for single return.

Change-Id: I065c35b95dbc6546387ea54d298bb5765bc342cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2269456Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#68569}
parent cf71540c
......@@ -46,9 +46,7 @@ constexpr int32_t kHighWordOffset = 4;
// fp-4 holds the stack marker, fp-8 is the instance parameter.
constexpr int kInstanceOffset = 8;
inline MemOperand GetStackSlot(int offset) {
return MemOperand(offset > 0 ? fp : sp, -offset);
}
inline MemOperand GetStackSlot(int offset) { return MemOperand(fp, -offset); }
inline MemOperand GetHalfStackSlot(int offset, RegPairHalf half) {
int32_t half_offset =
......@@ -600,6 +598,11 @@ void LiftoffAssembler::StoreCallerFrameSlot(LiftoffRegister src,
liftoff::Store(this, fp, offset, src, type);
}
void LiftoffAssembler::LoadReturnStackSlot(LiftoffRegister dst, int offset,
ValueType type) {
liftoff::Load(this, dst, sp, offset, type);
}
void LiftoffAssembler::MoveStackValue(uint32_t dst_offset, uint32_t src_offset,
ValueType type) {
DCHECK_NE(dst_offset, src_offset);
......
......@@ -42,9 +42,7 @@ namespace liftoff {
// fp-8 holds the stack marker, fp-16 is the instance parameter.
constexpr int kInstanceOffset = 16;
inline MemOperand GetStackSlot(int offset) {
return MemOperand(offset > 0 ? fp : sp, -offset);
}
inline MemOperand GetStackSlot(int offset) { return MemOperand(fp, -offset); }
inline MemOperand GetInstanceOperand() { return GetStackSlot(kInstanceOffset); }
......@@ -529,6 +527,11 @@ void LiftoffAssembler::StoreCallerFrameSlot(LiftoffRegister src,
liftoff::Store(this, fp, offset, src, type);
}
void LiftoffAssembler::LoadReturnStackSlot(LiftoffRegister dst, int offset,
ValueType type) {
liftoff::Load(this, dst, MemOperand(sp, offset), type);
}
void LiftoffAssembler::MoveStackValue(uint32_t dst_offset, uint32_t src_offset,
ValueType type) {
DCHECK_NE(dst_offset, src_offset);
......
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