Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 9dc042bf41d10ab44f6b22f7dc40ee41c94b6468..1e175f46495a5c0cb2d7a4a87115549d69089399 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -1225,9 +1225,8 @@ void MacroAssembler::FlushICache(Register address, unsigned instructions) { |
MultiPush(saved_regs); |
AllowExternalCallThatCantCauseGC scope(this); |
- // Save to a0 in case address == t0. |
Move(a0, address); |
- PrepareCallCFunction(2, t0); |
+ PrepareCallCFunction(2, t8); |
li(a1, instructions * kInstrSize); |
CallCFunction(ExternalReference::flush_icache_function(isolate()), 2); |
@@ -5150,13 +5149,10 @@ void MacroAssembler::AssertSmi(Register object) { |
void MacroAssembler::AssertString(Register object) { |
if (emit_debug_code()) { |
STATIC_ASSERT(kSmiTag == 0); |
- SmiTst(object, t0); |
- Check(ne, kOperandIsASmiAndNotAString, t0, Operand(zero_reg)); |
- push(object); |
- lw(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
- lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset)); |
- Check(lo, kOperandIsNotAString, object, Operand(FIRST_NONSTRING_TYPE)); |
- pop(object); |
+ SmiTst(object, t8); |
+ Check(ne, kOperandIsASmiAndNotAString, t8, Operand(zero_reg)); |
+ GetObjectType(object, t8, t8); |
+ Check(lo, kOperandIsNotAString, t8, Operand(FIRST_NONSTRING_TYPE)); |
} |
} |
@@ -5164,13 +5160,10 @@ void MacroAssembler::AssertString(Register object) { |
void MacroAssembler::AssertName(Register object) { |
if (emit_debug_code()) { |
STATIC_ASSERT(kSmiTag == 0); |
- SmiTst(object, t0); |
- Check(ne, kOperandIsASmiAndNotAName, t0, Operand(zero_reg)); |
- push(object); |
- lw(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
- lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset)); |
- Check(le, kOperandIsNotAName, object, Operand(LAST_NAME_TYPE)); |
- pop(object); |
+ SmiTst(object, t8); |
+ Check(ne, kOperandIsASmiAndNotAName, t8, Operand(zero_reg)); |
+ GetObjectType(object, t8, t8); |
+ Check(le, kOperandIsNotAName, t8, Operand(LAST_NAME_TYPE)); |
} |
} |
@@ -5178,10 +5171,10 @@ void MacroAssembler::AssertName(Register object) { |
void MacroAssembler::AssertFunction(Register object) { |
if (emit_debug_code()) { |
STATIC_ASSERT(kSmiTag == 0); |
- SmiTst(object, t0); |
- Check(ne, kOperandIsASmiAndNotAFunction, t0, Operand(zero_reg)); |
- GetObjectType(object, t0, t0); |
- Check(eq, kOperandIsNotAFunction, t0, Operand(JS_FUNCTION_TYPE)); |
+ SmiTst(object, t8); |
+ Check(ne, kOperandIsASmiAndNotAFunction, t8, Operand(zero_reg)); |
+ GetObjectType(object, t8, t8); |
+ Check(eq, kOperandIsNotAFunction, t8, Operand(JS_FUNCTION_TYPE)); |
} |
} |
@@ -5193,11 +5186,9 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
AssertNotSmi(object); |
LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
Branch(&done_checking, eq, object, Operand(scratch)); |
- push(object); |
- lw(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
+ lw(t8, FieldMemOperand(object, HeapObject::kMapOffset)); |
LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
- Assert(eq, kExpectedUndefinedOrCell, object, Operand(scratch)); |
- pop(object); |
+ Assert(eq, kExpectedUndefinedOrCell, t8, Operand(scratch)); |
bind(&done_checking); |
} |
} |