Commit 1111bd1c authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

s390x: [liftoff] implement LoadReturnStackSlot

Change-Id: Ifa2b160e42bad2b3ae93a3c310d5fa158ffbd286
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2672705Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72511}
parent 1de07aef
......@@ -534,7 +534,40 @@ void LiftoffAssembler::StoreCallerFrameSlot(LiftoffRegister src,
void LiftoffAssembler::LoadReturnStackSlot(LiftoffRegister dst, int offset,
ValueType type) {
bailout(kUnsupportedArchitecture, "LoadReturnStackSlot");
switch (type.kind()) {
case ValueType::kI32: {
#if defined(V8_TARGET_BIG_ENDIAN)
LoadS32(dst.gp(), MemOperand(sp, offset + 4));
break;
#else
LoadS32(dst.gp(), MemOperand(sp, offset));
break;
#endif
}
case ValueType::kRef:
case ValueType::kRtt:
case ValueType::kOptRef:
case ValueType::kI64: {
LoadU64(dst.gp(), MemOperand(sp, offset));
break;
}
case ValueType::kF32: {
LoadF32(dst.fp(), MemOperand(sp, offset));
break;
}
case ValueType::kF64: {
LoadF64(dst.fp(), MemOperand(sp, offset));
break;
}
case ValueType::kS128: {
UseScratchRegisterScope temps(this);
Register scratch = temps.Acquire();
LoadV128(dst.fp(), MemOperand(sp, offset), scratch);
break;
}
default:
UNREACHABLE();
}
}
void LiftoffAssembler::MoveStackValue(uint32_t dst_offset, uint32_t 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