Commit 0b455d08 authored by Junliang Yan's avatar Junliang Yan Committed by V8 LUCI CQ

s390x: fix JumpIfTagged on ptr-compr

JumpIfTagged access the stack for 4 byte compressed ptrs
so we need to add stack bias for that for big endian

Change-Id: Ifefa56018cf4ddccb337704775b38937e47ac3ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3893419Reviewed-by: 's avatarMilad Farazmand <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/main@{#83198}
parent 27351120
......@@ -287,11 +287,20 @@ void BaselineAssembler::JumpIfSmi(Condition cc, Register lhs, Register rhs,
JumpIfHelper(masm_, cc, lhs, rhs, target);
}
constexpr static int stack_bias = 4;
void BaselineAssembler::JumpIfTagged(Condition cc, Register value,
MemOperand operand, Label* target,
Label::Distance) {
ASM_CODE_COMMENT(masm_);
__ LoadTaggedPointerField(ip, operand, r0);
DCHECK(operand.rb() == fp || operand.rx() == fp);
if (COMPRESS_POINTERS_BOOL) {
MemOperand addr =
MemOperand(operand.rx(), operand.rb(), operand.offset() + stack_bias);
__ LoadTaggedPointerField(ip, addr, r0);
} else {
__ LoadTaggedPointerField(ip, operand, r0);
}
JumpIfHelper<COMPRESS_POINTERS_BOOL ? 32 : 64>(masm_, cc, value, ip, target);
}
......@@ -299,7 +308,14 @@ void BaselineAssembler::JumpIfTagged(Condition cc, MemOperand operand,
Register value, Label* target,
Label::Distance) {
ASM_CODE_COMMENT(masm_);
__ LoadTaggedPointerField(ip, operand, r0);
DCHECK(operand.rb() == fp || operand.rx() == fp);
if (COMPRESS_POINTERS_BOOL) {
MemOperand addr =
MemOperand(operand.rx(), operand.rb(), operand.offset() + stack_bias);
__ LoadTaggedPointerField(ip, addr, r0);
} else {
__ LoadTaggedPointerField(ip, operand, r0);
}
JumpIfHelper<COMPRESS_POINTERS_BOOL ? 32 : 64>(masm_, cc, ip, value, target);
}
void BaselineAssembler::JumpIfByte(Condition cc, Register value, int32_t byte,
......
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