Commit 1f33a962 authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

PPC/S390 [liftoff]: check input type of i32_cond_jumpi

emitted comparison differs depending on the input type (signed
or unsigned).

This patch is needed to fix test failures after this CL:
https://crrev.com/c/3172765.

Change-Id: If709920d609c94dd3fa5abf14e509978bd7b40ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3178970Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#77018}
parent 4bbfc4b7
......@@ -1332,8 +1332,13 @@ void LiftoffAssembler::emit_cond_jump(LiftoffCondition liftoff_cond,
void LiftoffAssembler::emit_i32_cond_jumpi(LiftoffCondition liftoff_cond,
Label* label, Register lhs,
int32_t imm) {
bool use_signed = liftoff::UseSignedOp(liftoff_cond);
Condition cond = liftoff::ToCondition(liftoff_cond);
CmpS32(lhs, Operand(imm), r0);
if (use_signed) {
CmpS32(lhs, Operand(imm), r0);
} else {
CmpU32(lhs, Operand(imm), r0);
}
b(cond, label);
}
......
......@@ -2057,8 +2057,13 @@ void LiftoffAssembler::emit_cond_jump(LiftoffCondition liftoff_cond,
void LiftoffAssembler::emit_i32_cond_jumpi(LiftoffCondition liftoff_cond,
Label* label, Register lhs,
int32_t imm) {
bool use_signed = liftoff::UseSignedOp(liftoff_cond);
Condition cond = liftoff::ToCondition(liftoff_cond);
CmpS32(lhs, Operand(imm));
if (use_signed) {
CmpS32(lhs, Operand(imm));
} else {
CmpU32(lhs, Operand(imm));
}
b(cond, label);
}
......
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