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

ppc: cleanup cmplw/cmplwi as CmpU32

Change-Id: I2a131a783b99a0bfd6550d0032a594f2eb402421
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3009227Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75617}
parent aca0c208
......@@ -2655,7 +2655,7 @@ void TurboAssembler::CmpS32(Register src1, Register src2, CRegister cr) {
cmpw(src1, src2, cr);
}
void MacroAssembler::Cmplwi(Register src1, const Operand& src2,
void TurboAssembler::CmpU32(Register src1, const Operand& src2,
Register scratch, CRegister cr) {
intptr_t value = src2.immediate();
if (is_uint16(value)) {
......@@ -2666,6 +2666,10 @@ void MacroAssembler::Cmplwi(Register src1, const Operand& src2,
}
}
void TurboAssembler::CmpU32(Register src1, Register src2, CRegister cr) {
cmplw(src1, src2, cr);
}
void MacroAssembler::And(Register ra, Register rs, const Operand& rb,
RCBit rc) {
if (rb.is_reg()) {
......
......@@ -161,6 +161,9 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void CmpS32(Register src1, const Operand& src2, Register scratch,
CRegister cr = cr7);
void CmpS32(Register src1, Register src2, CRegister cr = cr7);
void CmpU32(Register src1, const Operand& src2, Register scratch,
CRegister cr = cr7);
void CmpU32(Register src1, Register src2, CRegister cr = cr7);
void CompareTagged(Register src1, Register src2, CRegister cr = cr7) {
if (COMPRESS_POINTERS_BOOL) {
CmpS32(src1, src2, cr);
......@@ -823,8 +826,6 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// load a literal double value <value> to FPR <result>
void Cmplwi(Register src1, const Operand& src2, Register scratch,
CRegister cr = cr7);
void And(Register ra, Register rs, const Operand& rb, RCBit rc = LeaveRC);
void Or(Register ra, Register rs, const Operand& rb, RCBit rc = LeaveRC);
void Xor(Register ra, Register rs, const Operand& rb, RCBit rc = LeaveRC);
......
......@@ -1013,7 +1013,7 @@ void LiftoffAssembler::emit_cond_jump(LiftoffCondition liftoff_cond,
if (use_signed) {
CmpS32(lhs, rhs);
} else {
cmplw(lhs, rhs);
CmpU32(lhs, rhs);
}
break;
case kRef:
......@@ -1065,7 +1065,7 @@ void LiftoffAssembler::emit_i32_set_cond(LiftoffCondition liftoff_cond,
if (use_signed) {
CmpS32(lhs, rhs);
} else {
cmplw(lhs, rhs);
CmpU32(lhs, rhs);
}
Label done;
mov(dst, Operand(1));
......
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