Commit 2ba0b613 authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

s390x: [liftoff] implement MoveStackValue

Change-Id: I372d3ef6806b001e45b5522e5a91f20393bf75bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2676627Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72546}
parent 57062d6c
......@@ -572,7 +572,42 @@ void LiftoffAssembler::LoadReturnStackSlot(LiftoffRegister dst, int offset,
void LiftoffAssembler::MoveStackValue(uint32_t dst_offset, uint32_t src_offset,
ValueType type) {
bailout(kUnsupportedArchitecture, "MoveStackValue");
DCHECK_NE(dst_offset, src_offset);
int length = 0;
switch (type.kind()) {
case ValueType::kI32:
case ValueType::kF32:
length = 4;
break;
case ValueType::kI64:
case ValueType::kOptRef:
case ValueType::kRef:
case ValueType::kRtt:
case ValueType::kF64:
length = 8;
break;
case ValueType::kS128:
length = 16;
break;
default:
UNREACHABLE();
}
if (is_int20(dst_offset)) {
lay(ip, liftoff::GetStackSlot(dst_offset));
} else {
mov(ip, Operand(-dst_offset));
lay(ip, MemOperand(fp, ip));
}
if (is_int20(src_offset)) {
lay(r1, liftoff::GetStackSlot(src_offset));
} else {
mov(r1, Operand(-src_offset));
lay(r1, MemOperand(fp, r1));
}
MoveChar(MemOperand(ip), MemOperand(r1), Operand(length));
}
void LiftoffAssembler::Move(Register dst, Register src, ValueType type) {
......
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