Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(843)

Unified Diff: src/mips64/macro-assembler-mips64.cc

Issue 1324553004: MIPS: minor cleanup in macro-assembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/macro-assembler-mips64.cc
diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc
index 602cb54f3c787ece26faeb32ab16c3398154234b..0568cd6bea8b5c82b8a5ec724118b7c9c3b4c8ee 100644
--- a/src/mips64/macro-assembler-mips64.cc
+++ b/src/mips64/macro-assembler-mips64.cc
@@ -1439,9 +1439,8 @@ void MacroAssembler::FlushICache(Register address, unsigned instructions) {
MultiPush(saved_regs);
AllowExternalCallThatCantCauseGC scope(this);
- // Save to a0 in case address == a4.
Move(a0, address);
- PrepareCallCFunction(2, a4);
+ PrepareCallCFunction(2, t8);
li(a1, instructions * kInstrSize);
CallCFunction(ExternalReference::flush_icache_function(isolate()), 2);
@@ -5348,13 +5347,10 @@ void MacroAssembler::AssertSmi(Register object) {
void MacroAssembler::AssertString(Register object) {
if (emit_debug_code()) {
STATIC_ASSERT(kSmiTag == 0);
- SmiTst(object, a4);
- Check(ne, kOperandIsASmiAndNotAString, a4, Operand(zero_reg));
- push(object);
- ld(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));
}
}
@@ -5362,13 +5358,10 @@ void MacroAssembler::AssertString(Register object) {
void MacroAssembler::AssertName(Register object) {
if (emit_debug_code()) {
STATIC_ASSERT(kSmiTag == 0);
- SmiTst(object, a4);
- Check(ne, kOperandIsASmiAndNotAName, a4, Operand(zero_reg));
- push(object);
- ld(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));
}
}
@@ -5376,10 +5369,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));
}
}
@@ -5391,11 +5384,9 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
AssertNotSmi(object);
LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
Branch(&done_checking, eq, object, Operand(scratch));
- push(object);
- ld(object, FieldMemOperand(object, HeapObject::kMapOffset));
+ ld(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);
}
}
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698