Commit 20189856 authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

s390x: [liftoff] fix endianness issue on MoveStackValue

Change-Id: I7dfe3005554286f2f6a83acc4019c3cf06f7f65c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2774058Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73545}
parent 7e6fe4ea
......@@ -593,6 +593,12 @@ void LiftoffAssembler::LoadReturnStackSlot(LiftoffRegister dst, int offset,
}
}
#ifdef V8_TARGET_BIG_ENDIAN
constexpr int stack_bias = -4;
#else
constexpr int stack_bias = 0;
#endif
void LiftoffAssembler::MoveStackValue(uint32_t dst_offset, uint32_t src_offset,
ValueKind kind) {
DCHECK_NE(dst_offset, src_offset);
......@@ -616,6 +622,9 @@ void LiftoffAssembler::MoveStackValue(uint32_t dst_offset, uint32_t src_offset,
UNREACHABLE();
}
dst_offset += (length == 4 ? stack_bias : 0);
src_offset += (length == 4 ? stack_bias : 0);
if (is_int20(dst_offset)) {
lay(ip, liftoff::GetStackSlot(dst_offset));
} else {
......@@ -650,12 +659,6 @@ void LiftoffAssembler::Move(DoubleRegister dst, DoubleRegister src,
}
}
#ifdef V8_TARGET_BIG_ENDIAN
constexpr int stack_bias = -4;
#else
constexpr int stack_bias = 0;
#endif
void LiftoffAssembler::Spill(int offset, LiftoffRegister reg, ValueKind kind) {
DCHECK_LT(0, offset);
RecordUsedSpillOffset(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