| Index: src/arm/code-stubs-arm.cc
|
| diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
|
| index a6aff15cff0bef0026399606e854225be309110d..6c2516a8c211297f372f6e4612d1c1cb5d8ea246 100644
|
| --- a/src/arm/code-stubs-arm.cc
|
| +++ b/src/arm/code-stubs-arm.cc
|
| @@ -551,7 +551,7 @@ void ConvertToDoubleStub::Generate(MacroAssembler* masm) {
|
| STATIC_ASSERT(HeapNumber::kSignMask == 0x80000000u);
|
| __ and_(exponent, source_, Operand(HeapNumber::kSignMask), SetCC);
|
| // Subtract from 0 if source was negative.
|
| - __ rsb(source_, source_, Operand(0, RelocInfo::NONE), LeaveCC, ne);
|
| + __ rsb(source_, source_, Operand::Zero(), LeaveCC, ne);
|
|
|
| // We have -1, 0 or 1, which we treat specially. Register source_ contains
|
| // absolute value: it is either equal to 1 (special case of -1 and 1),
|
| @@ -564,7 +564,7 @@ void ConvertToDoubleStub::Generate(MacroAssembler* masm) {
|
| HeapNumber::kExponentBias << HeapNumber::kExponentShift;
|
| __ orr(exponent, exponent, Operand(exponent_word_for_1), LeaveCC, eq);
|
| // 1, 0 and -1 all have 0 for the second word.
|
| - __ mov(mantissa, Operand(0, RelocInfo::NONE));
|
| + __ mov(mantissa, Operand::Zero());
|
| __ Ret();
|
|
|
| __ bind(¬_special);
|
| @@ -1114,7 +1114,7 @@ void WriteInt32ToHeapNumberStub::Generate(MacroAssembler* masm) {
|
| // Set the sign bit in scratch_ if the value was negative.
|
| __ orr(scratch_, scratch_, Operand(HeapNumber::kSignMask), LeaveCC, cs);
|
| // Subtract from 0 if the value was negative.
|
| - __ rsb(the_int_, the_int_, Operand(0, RelocInfo::NONE), LeaveCC, cs);
|
| + __ rsb(the_int_, the_int_, Operand::Zero(), LeaveCC, cs);
|
| // We should be masking the implict first digit of the mantissa away here,
|
| // but it just ends up combining harmlessly with the last digit of the
|
| // exponent that happens to be 1. The sign bit is 0 so we shift 10 to get
|
| @@ -1137,7 +1137,7 @@ void WriteInt32ToHeapNumberStub::Generate(MacroAssembler* masm) {
|
| non_smi_exponent += 1 << HeapNumber::kExponentShift;
|
| __ mov(ip, Operand(HeapNumber::kSignMask | non_smi_exponent));
|
| __ str(ip, FieldMemOperand(the_heap_number_, HeapNumber::kExponentOffset));
|
| - __ mov(ip, Operand(0, RelocInfo::NONE));
|
| + __ mov(ip, Operand::Zero());
|
| __ str(ip, FieldMemOperand(the_heap_number_, HeapNumber::kMantissaOffset));
|
| __ Ret();
|
| }
|
| @@ -1360,7 +1360,7 @@ void EmitNanCheck(MacroAssembler* masm, Label* lhs_not_nan, Condition cond) {
|
| Operand(lhs_exponent, LSL, HeapNumber::kNonMantissaBitsInTopWord),
|
| SetCC);
|
| __ b(ne, &one_is_nan);
|
| - __ cmp(lhs_mantissa, Operand(0, RelocInfo::NONE));
|
| + __ cmp(lhs_mantissa, Operand::Zero());
|
| __ b(ne, &one_is_nan);
|
|
|
| __ bind(lhs_not_nan);
|
| @@ -1375,7 +1375,7 @@ void EmitNanCheck(MacroAssembler* masm, Label* lhs_not_nan, Condition cond) {
|
| Operand(rhs_exponent, LSL, HeapNumber::kNonMantissaBitsInTopWord),
|
| SetCC);
|
| __ b(ne, &one_is_nan);
|
| - __ cmp(rhs_mantissa, Operand(0, RelocInfo::NONE));
|
| + __ cmp(rhs_mantissa, Operand::Zero());
|
| __ b(eq, &neither_is_nan);
|
|
|
| __ bind(&one_is_nan);
|
| @@ -1881,7 +1881,7 @@ void ToBooleanStub::Generate(MacroAssembler* masm) {
|
| __ ldrb(ip, FieldMemOperand(map, Map::kBitFieldOffset));
|
| __ tst(ip, Operand(1 << Map::kIsUndetectable));
|
| // Undetectable -> false.
|
| - __ mov(tos_, Operand(0, RelocInfo::NONE), LeaveCC, ne);
|
| + __ mov(tos_, Operand::Zero(), LeaveCC, ne);
|
| __ Ret(ne);
|
| }
|
| }
|
| @@ -1914,14 +1914,14 @@ void ToBooleanStub::Generate(MacroAssembler* masm) {
|
| // "tos_" is a register, and contains a non zero value by default.
|
| // Hence we only need to overwrite "tos_" with zero to return false for
|
| // FP_ZERO or FP_NAN cases. Otherwise, by default it returns true.
|
| - __ mov(tos_, Operand(0, RelocInfo::NONE), LeaveCC, eq); // for FP_ZERO
|
| - __ mov(tos_, Operand(0, RelocInfo::NONE), LeaveCC, vs); // for FP_NAN
|
| + __ mov(tos_, Operand::Zero(), LeaveCC, eq); // for FP_ZERO
|
| + __ mov(tos_, Operand::Zero(), LeaveCC, vs); // for FP_NAN
|
| } else {
|
| Label done, not_nan, not_zero;
|
| __ ldr(temp, FieldMemOperand(tos_, HeapNumber::kExponentOffset));
|
| // -0 maps to false:
|
| __ bic(
|
| - temp, temp, Operand(HeapNumber::kSignMask, RelocInfo::NONE), SetCC);
|
| + temp, temp, Operand(HeapNumber::kSignMask), SetCC);
|
| __ b(ne, ¬_zero);
|
| // If exponent word is zero then the answer depends on the mantissa word.
|
| __ ldr(tos_, FieldMemOperand(tos_, HeapNumber::kMantissaOffset));
|
| @@ -1934,25 +1934,25 @@ void ToBooleanStub::Generate(MacroAssembler* masm) {
|
| __ mov(temp, Operand(temp, LSR, HeapNumber::kMantissaBitsInTopWord));
|
| unsigned int shifted_exponent_mask =
|
| HeapNumber::kExponentMask >> HeapNumber::kMantissaBitsInTopWord;
|
| - __ cmp(temp, Operand(shifted_exponent_mask, RelocInfo::NONE));
|
| + __ cmp(temp, Operand(shifted_exponent_mask));
|
| __ b(ne, ¬_nan); // If exponent is not 0x7ff then it can't be a NaN.
|
|
|
| // Reload exponent word.
|
| __ ldr(temp, FieldMemOperand(tos_, HeapNumber::kExponentOffset));
|
| - __ tst(temp, Operand(HeapNumber::kMantissaMask, RelocInfo::NONE));
|
| + __ tst(temp, Operand(HeapNumber::kMantissaMask));
|
| // If mantissa is not zero then we have a NaN, so return 0.
|
| - __ mov(tos_, Operand(0, RelocInfo::NONE), LeaveCC, ne);
|
| + __ mov(tos_, Operand::Zero(), LeaveCC, ne);
|
| __ b(ne, &done);
|
|
|
| // Load mantissa word.
|
| __ ldr(temp, FieldMemOperand(tos_, HeapNumber::kMantissaOffset));
|
| - __ cmp(temp, Operand(0, RelocInfo::NONE));
|
| + __ cmp(temp, Operand::Zero());
|
| // If mantissa is not zero then we have a NaN, so return 0.
|
| - __ mov(tos_, Operand(0, RelocInfo::NONE), LeaveCC, ne);
|
| + __ mov(tos_, Operand::Zero(), LeaveCC, ne);
|
| __ b(ne, &done);
|
|
|
| __ bind(¬_nan);
|
| - __ mov(tos_, Operand(1, RelocInfo::NONE));
|
| + __ mov(tos_, Operand(1));
|
| __ bind(&done);
|
| }
|
| __ Ret();
|
| @@ -1975,7 +1975,7 @@ void ToBooleanStub::CheckOddball(MacroAssembler* masm,
|
| // The value of a root is never NULL, so we can avoid loading a non-null
|
| // value into tos_ when we want to return 'true'.
|
| if (!result) {
|
| - __ mov(tos_, Operand(0, RelocInfo::NONE), LeaveCC, eq);
|
| + __ mov(tos_, Operand::Zero(), LeaveCC, eq);
|
| }
|
| __ Ret(eq);
|
| }
|
| @@ -2120,7 +2120,7 @@ void UnaryOpStub::GenerateSmiCodeSub(MacroAssembler* masm,
|
| __ b(eq, slow);
|
|
|
| // Return '0 - value'.
|
| - __ rsb(r0, r0, Operand(0, RelocInfo::NONE));
|
| + __ rsb(r0, r0, Operand::Zero());
|
| __ Ret();
|
| }
|
|
|
| @@ -2436,7 +2436,7 @@ void BinaryOpStub::GenerateSmiSmiOperation(MacroAssembler* masm) {
|
| __ cmp(ip, Operand(scratch2));
|
| __ b(ne, ¬_smi_result);
|
| // Go slow on zero result to handle -0.
|
| - __ cmp(scratch1, Operand(0));
|
| + __ cmp(scratch1, Operand::Zero());
|
| __ mov(right, Operand(scratch1), LeaveCC, ne);
|
| __ Ret(ne);
|
| // We need -0 if we were multiplying a negative number with 0 to get 0.
|
| @@ -3386,7 +3386,7 @@ void TranscendentalCacheStub::Generate(MacroAssembler* masm) {
|
| __ ldr(cache_entry, MemOperand(cache_entry, cache_array_index));
|
| // r0 points to the cache for the type type_.
|
| // If NULL, the cache hasn't been initialized yet, so go through runtime.
|
| - __ cmp(cache_entry, Operand(0, RelocInfo::NONE));
|
| + __ cmp(cache_entry, Operand::Zero());
|
| __ b(eq, &invalid_cache);
|
|
|
| #ifdef DEBUG
|
| @@ -3697,8 +3697,8 @@ void MathPowStub::Generate(MacroAssembler* masm) {
|
| __ vmov(double_result, 1.0, scratch2);
|
|
|
| // Get absolute value of exponent.
|
| - __ cmp(scratch, Operand(0));
|
| - __ mov(scratch2, Operand(0), LeaveCC, mi);
|
| + __ cmp(scratch, Operand::Zero());
|
| + __ mov(scratch2, Operand::Zero(), LeaveCC, mi);
|
| __ sub(scratch, scratch2, scratch, LeaveCC, mi);
|
|
|
| Label while_true;
|
| @@ -3708,7 +3708,7 @@ void MathPowStub::Generate(MacroAssembler* masm) {
|
| __ vmul(double_scratch, double_scratch, double_scratch, ne);
|
| __ b(ne, &while_true);
|
|
|
| - __ cmp(exponent, Operand(0));
|
| + __ cmp(exponent, Operand::Zero());
|
| __ b(ge, &done);
|
| __ vmov(double_scratch, 1.0, scratch);
|
| __ vdiv(double_result, double_scratch, double_result);
|
| @@ -3982,7 +3982,7 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
| Isolate* isolate = masm->isolate();
|
| ExternalReference external_caught(Isolate::kExternalCaughtExceptionAddress,
|
| isolate);
|
| - __ mov(r0, Operand(false, RelocInfo::NONE));
|
| + __ mov(r0, Operand(false));
|
| __ mov(r2, Operand(external_caught));
|
| __ str(r0, MemOperand(r2));
|
|
|
| @@ -4664,7 +4664,7 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
|
| // of the arguments object and the elements array in words.
|
| Label add_arguments_object;
|
| __ bind(&try_allocate);
|
| - __ cmp(r1, Operand(0, RelocInfo::NONE));
|
| + __ cmp(r1, Operand::Zero());
|
| __ b(eq, &add_arguments_object);
|
| __ mov(r1, Operand(r1, LSR, kSmiTagSize));
|
| __ add(r1, r1, Operand(FixedArray::kHeaderSize / kPointerSize));
|
| @@ -4697,7 +4697,7 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
|
|
|
| // If there are no actual arguments, we're done.
|
| Label done;
|
| - __ cmp(r1, Operand(0, RelocInfo::NONE));
|
| + __ cmp(r1, Operand::Zero());
|
| __ b(eq, &done);
|
|
|
| // Get the parameters pointer from the stack.
|
| @@ -4724,7 +4724,7 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) {
|
| // Post-increment r4 with kPointerSize on each iteration.
|
| __ str(r3, MemOperand(r4, kPointerSize, PostIndex));
|
| __ sub(r1, r1, Operand(1));
|
| - __ cmp(r1, Operand(0, RelocInfo::NONE));
|
| + __ cmp(r1, Operand::Zero());
|
| __ b(ne, &loop);
|
|
|
| // Return and remove the on-stack parameters.
|
| @@ -4776,7 +4776,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
| ExternalReference::address_of_regexp_stack_memory_size(isolate);
|
| __ mov(r0, Operand(address_of_regexp_stack_memory_size));
|
| __ ldr(r0, MemOperand(r0, 0));
|
| - __ cmp(r0, Operand(0));
|
| + __ cmp(r0, Operand::Zero());
|
| __ b(eq, &runtime);
|
|
|
| // Check that the first argument is a JSRegExp object.
|
| @@ -4858,7 +4858,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
| __ b(gt, &runtime);
|
|
|
| // Reset offset for possibly sliced string.
|
| - __ mov(r9, Operand(0));
|
| + __ mov(r9, Operand::Zero());
|
| // subject: Subject string
|
| // regexp_data: RegExp data (FixedArray)
|
| // Check the representation and encoding of the subject string.
|
| @@ -4979,7 +4979,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
|
|
| // Argument 6: Set the number of capture registers to zero to force global
|
| // regexps to behave as non-global. This does not affect non-global regexps.
|
| - __ mov(r0, Operand(0));
|
| + __ mov(r0, Operand::Zero());
|
| __ str(r0, MemOperand(sp, 2 * kPointerSize));
|
|
|
| // Argument 5 (sp[4]): static offsets vector buffer.
|
| @@ -5234,7 +5234,7 @@ void RegExpConstructResultStub::Generate(MacroAssembler* masm) {
|
| // r3: Start of elements in FixedArray.
|
| // r5: Number of elements to fill.
|
| Label loop;
|
| - __ cmp(r5, Operand(0));
|
| + __ cmp(r5, Operand::Zero());
|
| __ bind(&loop);
|
| __ b(le, &done); // Jump if r5 is negative or zero.
|
| __ sub(r5, r5, Operand(1), SetCC);
|
| @@ -5360,8 +5360,8 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| __ cmp(r3, Operand(JS_FUNCTION_PROXY_TYPE));
|
| __ b(ne, &non_function);
|
| __ push(r1); // put proxy as additional argument
|
| - __ mov(r0, Operand(argc_ + 1, RelocInfo::NONE));
|
| - __ mov(r2, Operand(0, RelocInfo::NONE));
|
| + __ mov(r0, Operand(argc_ + 1));
|
| + __ mov(r2, Operand::Zero());
|
| __ GetBuiltinEntry(r3, Builtins::CALL_FUNCTION_PROXY);
|
| __ SetCallKind(r5, CALL_AS_METHOD);
|
| {
|
| @@ -5375,7 +5375,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| __ bind(&non_function);
|
| __ str(r1, MemOperand(sp, argc_ * kPointerSize));
|
| __ mov(r0, Operand(argc_)); // Set up the number of arguments.
|
| - __ mov(r2, Operand(0, RelocInfo::NONE));
|
| + __ mov(r2, Operand::Zero());
|
| __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION);
|
| __ SetCallKind(r5, CALL_AS_METHOD);
|
| __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
|
| @@ -5418,7 +5418,7 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
|
| __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR);
|
| __ bind(&do_call);
|
| // Set expected number of arguments to zero (not changing r0).
|
| - __ mov(r2, Operand(0, RelocInfo::NONE));
|
| + __ mov(r2, Operand::Zero());
|
| __ SetCallKind(r5, CALL_AS_METHOD);
|
| __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
|
| RelocInfo::CODE_TARGET);
|
| @@ -5629,7 +5629,7 @@ void StringHelper::GenerateCopyCharacters(MacroAssembler* masm,
|
| if (!ascii) {
|
| __ add(count, count, Operand(count), SetCC);
|
| } else {
|
| - __ cmp(count, Operand(0, RelocInfo::NONE));
|
| + __ cmp(count, Operand::Zero());
|
| }
|
| __ b(eq, &done);
|
|
|
| @@ -5684,7 +5684,7 @@ void StringHelper::GenerateCopyCharactersLong(MacroAssembler* masm,
|
| if (!ascii) {
|
| __ add(count, count, Operand(count), SetCC);
|
| } else {
|
| - __ cmp(count, Operand(0, RelocInfo::NONE));
|
| + __ cmp(count, Operand::Zero());
|
| }
|
| __ b(eq, &done);
|
|
|
| @@ -6202,7 +6202,7 @@ void StringCompareStub::GenerateFlatAsciiStringEquals(MacroAssembler* masm,
|
| Label compare_chars;
|
| __ bind(&check_zero_length);
|
| STATIC_ASSERT(kSmiTag == 0);
|
| - __ cmp(length, Operand(0));
|
| + __ cmp(length, Operand::Zero());
|
| __ b(ne, &compare_chars);
|
| __ mov(r0, Operand(Smi::FromInt(EQUAL)));
|
| __ Ret();
|
| @@ -6235,7 +6235,7 @@ void StringCompareStub::GenerateCompareFlatAsciiStrings(MacroAssembler* masm,
|
| __ mov(scratch1, scratch2, LeaveCC, gt);
|
| Register min_length = scratch1;
|
| STATIC_ASSERT(kSmiTag == 0);
|
| - __ cmp(min_length, Operand(0));
|
| + __ cmp(min_length, Operand::Zero());
|
| __ b(eq, &compare_lengths);
|
|
|
| // Compare loop.
|
| @@ -7033,7 +7033,7 @@ void StringDictionaryLookupStub::GenerateNegativeLookup(MacroAssembler* masm,
|
| __ mov(r1, Operand(Handle<String>(name)));
|
| StringDictionaryLookupStub stub(NEGATIVE_LOOKUP);
|
| __ CallStub(&stub);
|
| - __ cmp(r0, Operand(0));
|
| + __ cmp(r0, Operand::Zero());
|
| __ ldm(ia_w, sp, spill_mask);
|
|
|
| __ b(eq, done);
|
| @@ -7109,7 +7109,7 @@ void StringDictionaryLookupStub::GeneratePositiveLookup(MacroAssembler* masm,
|
| }
|
| StringDictionaryLookupStub stub(POSITIVE_LOOKUP);
|
| __ CallStub(&stub);
|
| - __ cmp(r0, Operand(0));
|
| + __ cmp(r0, Operand::Zero());
|
| __ mov(scratch2, Operand(r2));
|
| __ ldm(ia_w, sp, spill_mask);
|
|
|
|
|