Index: src/mips/assembler-mips.cc |
diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc |
index 1962e9aa31a755d72e275fcbdada018ea880f2cb..42d93e1817b21944e7f699af459c0a1daba6d00c 100644 |
--- a/src/mips/assembler-mips.cc |
+++ b/src/mips/assembler-mips.cc |
@@ -1336,17 +1336,23 @@ void Assembler::bne(Register rs, Register rt, int16_t offset) { |
void Assembler::bovc(Register rs, Register rt, int16_t offset) { |
DCHECK(IsMipsArchVariant(kMips32r6)); |
- DCHECK(!(rs.is(zero_reg))); |
- DCHECK(rs.code() >= rt.code()); |
- GenInstrImmediate(ADDI, rs, rt, offset, CompactBranchType::COMPACT_BRANCH); |
+ DCHECK(!rs.is(zero_reg)); |
+ if (rs.code() >= rt.code()) { |
+ GenInstrImmediate(ADDI, rs, rt, offset, CompactBranchType::COMPACT_BRANCH); |
+ } else { |
+ GenInstrImmediate(ADDI, rt, rs, offset, CompactBranchType::COMPACT_BRANCH); |
+ } |
} |
void Assembler::bnvc(Register rs, Register rt, int16_t offset) { |
DCHECK(IsMipsArchVariant(kMips32r6)); |
- DCHECK(!(rs.is(zero_reg))); |
- DCHECK(rs.code() >= rt.code()); |
- GenInstrImmediate(DADDI, rs, rt, offset, CompactBranchType::COMPACT_BRANCH); |
+ DCHECK(!rs.is(zero_reg)); |
+ if (rs.code() >= rt.code()) { |
+ GenInstrImmediate(DADDI, rs, rt, offset, CompactBranchType::COMPACT_BRANCH); |
+ } else { |
+ GenInstrImmediate(DADDI, rt, rs, offset, CompactBranchType::COMPACT_BRANCH); |
+ } |
} |