| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index 7dc341f2edfa43e4424ed429036dd852374c3c04..d6370fa70485d15555d7d2524bc969e4029f48fa 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -1733,7 +1733,7 @@ void LCodeGen::DoDateField(LDateField* instr) {
|
| ASSERT(!scratch.is(scratch0()));
|
| ASSERT(!scratch.is(object));
|
|
|
| - __ And(at, object, Operand(kSmiTagMask));
|
| + __ SmiTst(object, at);
|
| DeoptimizeIf(eq, instr->environment(), at, Operand(zero_reg));
|
| __ GetObjectType(object, scratch, scratch);
|
| DeoptimizeIf(ne, instr->environment(), scratch, Operand(JS_DATE_TYPE));
|
| @@ -2144,7 +2144,7 @@ void LCodeGen::DoBranch(LBranch* instr) {
|
| __ JumpIfSmi(reg, instr->TrueLabel(chunk_));
|
| } else if (expected.NeedsMap()) {
|
| // If we need a map later and have a Smi -> deopt.
|
| - __ And(at, reg, Operand(kSmiTagMask));
|
| + __ SmiTst(reg, at);
|
| DeoptimizeIf(eq, instr->environment(), at, Operand(zero_reg));
|
| }
|
|
|
| @@ -3237,7 +3237,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) {
|
| // Check for the hole value.
|
| if (instr->hydrogen()->RequiresHoleCheck()) {
|
| if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) {
|
| - __ And(scratch, result, Operand(kSmiTagMask));
|
| + __ SmiTst(result, scratch);
|
| DeoptimizeIf(ne, instr->environment(), scratch, Operand(zero_reg));
|
| } else {
|
| __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
|
| @@ -3386,7 +3386,7 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) {
|
| __ Branch(&global_object, eq, receiver, Operand(scratch));
|
|
|
| // Deoptimize if the receiver is not a JS object.
|
| - __ And(scratch, receiver, Operand(kSmiTagMask));
|
| + __ SmiTst(receiver, scratch);
|
| DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg));
|
|
|
| __ GetObjectType(receiver, scratch, scratch);
|
| @@ -4164,7 +4164,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
|
| if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
|
| Register value = ToRegister(instr->value());
|
| if (!instr->hydrogen()->value()->type().IsHeapObject()) {
|
| - __ And(scratch, value, Operand(kSmiTagMask));
|
| + __ SmiTst(value, scratch);
|
| DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg));
|
| }
|
| } else if (FLAG_track_double_fields && representation.IsDouble()) {
|
| @@ -5159,7 +5159,7 @@ void LCodeGen::DoDoubleToSmi(LDoubleToSmi* instr) {
|
|
|
| void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
|
| LOperand* input = instr->value();
|
| - __ And(at, ToRegister(input), Operand(kSmiTagMask));
|
| + __ SmiTst(ToRegister(input), at);
|
| DeoptimizeIf(ne, instr->environment(), at, Operand(zero_reg));
|
| }
|
|
|
| @@ -5167,7 +5167,7 @@ void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
|
| void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) {
|
| if (!instr->hydrogen()->value()->IsHeapObject()) {
|
| LOperand* input = instr->value();
|
| - __ And(at, ToRegister(input), Operand(kSmiTagMask));
|
| + __ SmiTst(ToRegister(input), at);
|
| DeoptimizeIf(eq, instr->environment(), at, Operand(zero_reg));
|
| }
|
| }
|
| @@ -5240,7 +5240,7 @@ void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) {
|
| instr->pointer_map(), 1, Safepoint::kNoLazyDeopt);
|
| __ StoreToSafepointRegisterSlot(v0, scratch0());
|
| }
|
| - __ And(at, scratch0(), Operand(kSmiTagMask));
|
| + __ SmiTst(scratch0(), at);
|
| DeoptimizeIf(eq, instr->environment(), at, Operand(zero_reg));
|
| }
|
|
|
|
|