Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 8b6c4a44970ce54e7228deeb405d94bcc1c4ebe1..190af3b8768e87831e0e7fbf12c96e3d860b382f 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -4452,17 +4452,17 @@ void MacroAssembler::AdduAndCheckForOverflow(Register dst, Register left, |
} else { |
if (dst.is(left)) { |
mov(scratch, left); // Preserve left. |
- addiu(dst, left, right.immediate()); // Left is overwritten. |
+ Addu(dst, left, right.immediate()); // Left is overwritten. |
xor_(scratch, dst, scratch); // Original left. |
// Load right since xori takes uint16 as immediate. |
- addiu(t9, zero_reg, right.immediate()); |
+ Addu(t9, zero_reg, right); |
xor_(overflow_dst, dst, t9); |
and_(overflow_dst, overflow_dst, scratch); |
} else { |
addiu(dst, left, right.immediate()); |
xor_(overflow_dst, dst, left); |
// Load right since xori takes uint16 as immediate. |
- addiu(t9, zero_reg, right.immediate()); |
+ Addu(t9, zero_reg, right); |
xor_(scratch, dst, t9); |
and_(overflow_dst, scratch, overflow_dst); |
} |
@@ -4520,17 +4520,17 @@ void MacroAssembler::SubuAndCheckForOverflow(Register dst, Register left, |
} else { |
if (dst.is(left)) { |
mov(scratch, left); // Preserve left. |
- addiu(dst, left, -(right.immediate())); // Left is overwritten. |
+ Subu(dst, left, right); // Left is overwritten. |
xor_(overflow_dst, dst, scratch); // scratch is original left. |
// Load right since xori takes uint16 as immediate. |
- addiu(t9, zero_reg, right.immediate()); |
+ Addu(t9, zero_reg, right); |
xor_(scratch, scratch, t9); // scratch is original left. |
and_(overflow_dst, scratch, overflow_dst); |
} else { |
- addiu(dst, left, -(right.immediate())); |
+ Subu(dst, left, right); |
xor_(overflow_dst, dst, left); |
// Load right since xori takes uint16 as immediate. |
- addiu(t9, zero_reg, right.immediate()); |
+ Addu(t9, zero_reg, right); |
xor_(scratch, left, t9); |
and_(overflow_dst, scratch, overflow_dst); |
} |