Commit 06f7ed70 authored by Junliang Yan's avatar Junliang Yan Committed by V8 LUCI CQ

ppc: [liftoff] Fix AndU64 issue with signed value

Change-Id: Id8ac0df2ac107c1bfc68b852f47e5928b0fe098e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3076062Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76131}
parent d36199d2
......@@ -2383,8 +2383,9 @@ void TurboAssembler::CheckPageFlag(
Register scratch, // scratch may be same register as object
int mask, Condition cc, Label* condition_met) {
DCHECK(cc == ne || cc == eq);
DCHECK(scratch != r0);
ClearRightImm(scratch, object, Operand(kPageSizeBits));
LoadU64(scratch, MemOperand(scratch, BasicMemoryChunk::kFlagsOffset));
LoadU64(scratch, MemOperand(scratch, BasicMemoryChunk::kFlagsOffset), r0);
mov(r0, Operand(mask));
and_(r0, scratch, r0, SetRC);
......@@ -2752,7 +2753,7 @@ void TurboAssembler::MulS32(Register dst, Register src, Register value, OEBit s,
void TurboAssembler::AndU64(Register dst, Register src, const Operand& value,
Register scratch, RCBit r) {
if (is_int16(value.immediate()) && r == SetRC) {
if (is_uint16(value.immediate()) && r == SetRC) {
andi(dst, src, value);
} else {
mov(scratch, value);
......
......@@ -228,7 +228,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
Label write_barrier;
Label exit;
CheckPageFlag(dst_addr, r0, MemoryChunk::kPointersFromHereAreInterestingMask,
CheckPageFlag(dst_addr, ip, MemoryChunk::kPointersFromHereAreInterestingMask,
ne, &write_barrier);
b(&exit);
bind(&write_barrier);
......@@ -236,7 +236,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
if (COMPRESS_POINTERS_BOOL) {
DecompressTaggedPointer(src.gp(), src.gp());
}
CheckPageFlag(src.gp(), r0, MemoryChunk::kPointersToHereAreInterestingMask,
CheckPageFlag(src.gp(), ip, MemoryChunk::kPointersToHereAreInterestingMask,
eq, &exit);
mov(ip, Operand(offset_imm));
add(ip, ip, dst_addr);
......
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