Commit 4403daca authored by ulan@chromium.org's avatar ulan@chromium.org

ARM: generate integer zero in a uniform manner.

ARM generated integer zero as either Operand(0, RelocInfo::NONE32), or
Operand(0), or Operand::Zero(). My change makes it use only
Operand::Zero().

This has no functional impact, it's pure cleanup.

R= ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11745030
Patch from JF Bastien <jfb@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b73db972
......@@ -140,7 +140,7 @@ static void AllocateEmptyJSArray(MacroAssembler* masm,
__ LoadRoot(scratch1, Heap::kEmptyFixedArrayRootIndex);
__ str(scratch1, FieldMemOperand(result, JSArray::kPropertiesOffset));
// Field JSArray::kElementsOffset is initialized later.
__ mov(scratch3, Operand(0, RelocInfo::NONE32));
__ mov(scratch3, Operand::Zero());
__ str(scratch3, FieldMemOperand(result, JSArray::kLengthOffset));
if (initial_capacity == 0) {
......@@ -319,7 +319,7 @@ static void ArrayNativeCode(MacroAssembler* masm,
has_non_smi_element, finish, cant_transition_map, not_double;
// Check for array construction with zero arguments or one.
__ cmp(r0, Operand(0, RelocInfo::NONE32));
__ cmp(r0, Operand::Zero());
__ b(ne, &argc_one_or_more);
// Handle construction of an empty array.
......@@ -347,7 +347,7 @@ static void ArrayNativeCode(MacroAssembler* masm,
__ tst(r2, r2);
__ b(ne, &not_empty_array);
__ Drop(1); // Adjust stack.
__ mov(r0, Operand(0)); // Treat this as a call with argc of zero.
__ mov(r0, Operand::Zero()); // Treat this as a call with argc of zero.
__ b(&empty_array);
__ bind(&not_empty_array);
......@@ -590,7 +590,7 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) {
// Load the first arguments in r0 and get rid of the rest.
Label no_arguments;
__ cmp(r0, Operand(0, RelocInfo::NONE32));
__ cmp(r0, Operand::Zero());
__ b(eq, &no_arguments);
// First args = sp[(argc - 1) * 4].
__ sub(r0, r0, Operand(1));
......@@ -634,7 +634,7 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) {
__ cmp(r4, Operand(JSValue::kSize >> kPointerSizeLog2));
__ Assert(eq, "Unexpected string wrapper instance size");
__ ldrb(r4, FieldMemOperand(map, Map::kUnusedPropertyFieldsOffset));
__ cmp(r4, Operand(0, RelocInfo::NONE32));
__ cmp(r4, Operand::Zero());
__ Assert(eq, "Unexpected unused properties of string wrapper");
}
__ str(map, FieldMemOperand(r0, HeapObject::kMapOffset));
......@@ -1097,7 +1097,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
// r5-r7, cp may be clobbered
// Clear the context before we push it when entering the internal frame.
__ mov(cp, Operand(0, RelocInfo::NONE32));
__ mov(cp, Operand::Zero());
// Enter an internal frame.
{
......@@ -1375,7 +1375,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
// 1. Make sure we have at least one argument.
// r0: actual number of arguments
{ Label done;
__ cmp(r0, Operand(0));
__ cmp(r0, Operand::Zero());
__ b(ne, &done);
__ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
__ push(r2);
......@@ -1396,7 +1396,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
// r0: actual number of arguments
// r1: function
Label shift_arguments;
__ mov(r4, Operand(0, RelocInfo::NONE32)); // indicate regular JS_FUNCTION
__ mov(r4, Operand::Zero()); // indicate regular JS_FUNCTION
{ Label convert_to_object, use_global_receiver, patch_receiver;
// Change context eagerly in case we need the global receiver.
__ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
......@@ -1451,7 +1451,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
// Restore the function to r1, and the flag to r4.
__ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2));
__ mov(r4, Operand(0, RelocInfo::NONE32));
__ mov(r4, Operand::Zero());
__ jmp(&patch_receiver);
// Use the global receiver object from the called function as the
......@@ -1521,7 +1521,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
__ tst(r4, r4);
__ b(eq, &function);
// Expected number of arguments is 0 for CALL_NON_FUNCTION.
__ mov(r2, Operand(0, RelocInfo::NONE32));
__ mov(r2, Operand::Zero());
__ SetCallKind(r5, CALL_AS_METHOD);
__ cmp(r4, Operand(1));
__ b(ne, &non_proxy);
......@@ -1599,7 +1599,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
// Push current limit and index.
__ bind(&okay);
__ push(r0); // limit
__ mov(r1, Operand(0, RelocInfo::NONE32)); // initial index
__ mov(r1, Operand::Zero()); // initial index
__ push(r1);
// Get the receiver.
......@@ -1711,7 +1711,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
__ bind(&call_proxy);
__ push(r1); // add function proxy as last argument
__ add(r0, r0, Operand(1));
__ mov(r2, Operand(0, RelocInfo::NONE32));
__ mov(r2, Operand::Zero());
__ SetCallKind(r5, CALL_AS_METHOD);
__ GetBuiltinEntry(r3, Builtins::CALL_FUNCTION_PROXY);
__ Call(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
......
This diff is collapsed.
......@@ -161,7 +161,7 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
#ifdef DEBUG
__ RecordComment("// Calling from debug break to runtime - come in - over");
#endif
__ mov(r0, Operand(0, RelocInfo::NONE32)); // no arguments
__ mov(r0, Operand::Zero()); // no arguments
__ mov(r1, Operand(ExternalReference::debug_break(masm->isolate())));
CEntryStub ceb(1);
......
......@@ -1009,7 +1009,7 @@ void Deoptimizer::EntryGenerator::Generate() {
// address for lazy deoptimization) and compute the fp-to-sp delta in
// register r4.
if (type() == EAGER) {
__ mov(r3, Operand(0));
__ mov(r3, Operand::Zero());
// Correct one word for bailout id.
__ add(r4, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize)));
} else if (type() == OSR) {
......@@ -1124,7 +1124,7 @@ void Deoptimizer::EntryGenerator::Generate() {
__ ldr(r7, MemOperand(r6, FrameDescription::frame_content_offset()));
__ push(r7);
__ bind(&inner_loop_header);
__ cmp(r3, Operand(0));
__ cmp(r3, Operand::Zero());
__ b(ne, &inner_push_loop); // test for gt?
__ add(r0, r0, Operand(kPointerSize));
__ bind(&outer_loop_header);
......
......@@ -149,7 +149,7 @@ void FullCodeGenerator::Generate() {
// function calls.
if (!info->is_classic_mode() || info->is_native()) {
Label ok;
__ cmp(r5, Operand(0));
__ cmp(r5, Operand::Zero());
__ b(eq, &ok);
int receiver_offset = info->scope()->num_parameters() * kPointerSize;
__ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
......@@ -1039,7 +1039,7 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
CallIC(ic, RelocInfo::CODE_TARGET, clause->CompareId());
patch_site.EmitPatchInfo();
__ cmp(r0, Operand(0));
__ cmp(r0, Operand::Zero());
__ b(ne, &next_test);
__ Drop(1); // Switch value is no longer needed.
__ b(clause->body_target());
......@@ -1991,7 +1991,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ mov(ip, Operand(scratch1, ASR, 31));
__ cmp(ip, Operand(scratch2));
__ b(ne, &stub_call);
__ cmp(scratch1, Operand(0));
__ cmp(scratch1, Operand::Zero());
__ mov(right, Operand(scratch1), LeaveCC, ne);
__ b(ne, &done);
__ add(scratch2, right, Operand(left), SetCC);
......@@ -2687,7 +2687,7 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
// Skip loop if no descriptors are valid.
__ NumberOfOwnDescriptors(r3, r1);
__ cmp(r3, Operand(0));
__ cmp(r3, Operand::Zero());
__ b(eq, &done);
__ LoadInstanceDescriptors(r1, r4);
......@@ -3018,7 +3018,7 @@ void FullCodeGenerator::EmitRandomHeapNumber(CallRuntime* expr) {
// Move 0x41300000xxxxxxxx (x = random bits) to VFP.
__ vmov(d7, r0, r1);
// Move 0x4130000000000000 to VFP.
__ mov(r0, Operand(0, RelocInfo::NONE32));
__ mov(r0, Operand::Zero());
__ vmov(d8, r0, r1);
// Subtract and store the result in the heap number.
__ vsub(d7, d7, d8);
......@@ -3634,7 +3634,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
// Check that all array elements are sequential ASCII strings, and
// accumulate the sum of their lengths, as a smi-encoded value.
__ mov(string_length, Operand(0));
__ mov(string_length, Operand::Zero());
__ add(element,
elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
__ add(elements_end, element, Operand(array_length, LSL, kPointerSizeLog2));
......@@ -3647,7 +3647,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
// element: Current array element.
// elements_end: Array end.
if (generate_debug_code_) {
__ cmp(array_length, Operand(0));
__ cmp(array_length, Operand::Zero());
__ Assert(gt, "No empty arrays here in EmitFastAsciiArrayJoin");
}
__ bind(&loop);
......@@ -3690,7 +3690,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
__ smull(scratch2, ip, array_length, scratch1);
// Check for smi overflow. No overflow if higher 33 bits of 64-bit result are
// zero.
__ cmp(ip, Operand(0));
__ cmp(ip, Operand::Zero());
__ b(ne, &bailout);
__ tst(scratch2, Operand(0x80000000));
__ b(ne, &bailout);
......@@ -4357,7 +4357,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
CallIC(ic, RelocInfo::CODE_TARGET, expr->CompareOperationFeedbackId());
patch_site.EmitPatchInfo();
PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
__ cmp(r0, Operand(0));
__ cmp(r0, Operand::Zero());
Split(cond, if_true, if_false, fall_through);
}
}
......
This diff is collapsed.
......@@ -304,7 +304,7 @@ void MacroAssembler::And(Register dst, Register src1, const Operand& src2,
if (!src2.is_reg() &&
!src2.must_output_reloc_info(this) &&
src2.immediate() == 0) {
mov(dst, Operand(0, RelocInfo::NONE32), LeaveCC, cond);
mov(dst, Operand::Zero(), LeaveCC, cond);
} else if (!src2.is_single_instruction(this) &&
!src2.must_output_reloc_info(this) &&
CpuFeatures::IsSupported(ARMv7) &&
......@@ -410,7 +410,7 @@ void MacroAssembler::Usat(Register dst, int satpos, const Operand& src,
}
tst(dst, Operand(~satval));
b(eq, &done);
mov(dst, Operand(0, RelocInfo::NONE32), LeaveCC, mi); // 0 if negative.
mov(dst, Operand::Zero(), LeaveCC, mi); // 0 if negative.
mov(dst, Operand(satval), LeaveCC, pl); // satval if positive.
bind(&done);
} else {
......@@ -864,7 +864,7 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space) {
// Reserve room for saved entry sp and code object.
sub(sp, sp, Operand(2 * kPointerSize));
if (emit_debug_code()) {
mov(ip, Operand(0));
mov(ip, Operand::Zero());
str(ip, MemOperand(fp, ExitFrameConstants::kSPOffset));
}
mov(ip, Operand(CodeObject()));
......@@ -948,7 +948,7 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles,
}
// Clear top frame.
mov(r3, Operand(0, RelocInfo::NONE32));
mov(r3, Operand::Zero());
mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
str(r3, MemOperand(ip));
......@@ -1218,7 +1218,7 @@ void MacroAssembler::IsObjectJSStringType(Register object,
#ifdef ENABLE_DEBUGGER_SUPPORT
void MacroAssembler::DebugBreak() {
mov(r0, Operand(0, RelocInfo::NONE32));
mov(r0, Operand::Zero());
mov(r1, Operand(ExternalReference(Runtime::kDebugBreak, isolate())));
CEntryStub ces(1);
ASSERT(AllowThisStubCall(&ces));
......@@ -1249,7 +1249,7 @@ void MacroAssembler::PushTryHandler(StackHandler::Kind kind,
// Push the frame pointer, context, state, and code object.
if (kind == StackHandler::JS_ENTRY) {
mov(r7, Operand(Smi::FromInt(0))); // Indicates no context.
mov(ip, Operand(0, RelocInfo::NONE32)); // NULL frame pointer.
mov(ip, Operand::Zero()); // NULL frame pointer.
stm(db_w, sp, r5.bit() | r6.bit() | r7.bit() | ip.bit());
} else {
stm(db_w, sp, r5.bit() | r6.bit() | cp.bit() | fp.bit());
......@@ -1373,7 +1373,7 @@ void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
ldr(scratch, MemOperand(fp, StandardFrameConstants::kContextOffset));
// In debug mode, make sure the lexical context is set.
#ifdef DEBUG
cmp(scratch, Operand(0, RelocInfo::NONE32));
cmp(scratch, Operand::Zero());
Check(ne, "we should not have an empty lexical context");
#endif
......@@ -2025,7 +2025,7 @@ void MacroAssembler::StoreNumberToDoubleElements(Register value_reg,
// it's an Infinity, and the non-NaN code path applies.
b(gt, &is_nan);
ldr(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset));
cmp(mantissa_reg, Operand(0));
cmp(mantissa_reg, Operand::Zero());
b(eq, &have_double_value);
bind(&is_nan);
// Load canonical NaN for storing into the double array.
......@@ -2277,7 +2277,7 @@ void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function,
// If result is non-zero, dereference to get the result value
// otherwise set it to undefined.
cmp(r0, Operand(0));
cmp(r0, Operand::Zero());
LoadRoot(r0, Heap::kUndefinedValueRootIndex, eq);
ldr(r0, MemOperand(r0), ne);
......@@ -2456,7 +2456,7 @@ void MacroAssembler::ConvertToInt32(Register source,
HeapNumber::kExponentBits);
// Load dest with zero. We use this either for the final shift or
// for the answer.
mov(dest, Operand(0, RelocInfo::NONE32));
mov(dest, Operand::Zero());
// Check whether the exponent matches a 32 bit signed int that is not a Smi.
// A non-Smi integer is 1.xxx * 2^30 so the exponent is 30 (biased). This is
// the exponent that we are fastest at and also the highest exponent we can
......@@ -2510,7 +2510,7 @@ void MacroAssembler::ConvertToInt32(Register source,
// Move down according to the exponent.
mov(dest, Operand(scratch, LSR, dest));
// Fix sign if sign bit was set.
rsb(dest, dest, Operand(0, RelocInfo::NONE32), LeaveCC, ne);
rsb(dest, dest, Operand::Zero(), LeaveCC, ne);
bind(&done);
}
}
......@@ -2601,7 +2601,7 @@ void MacroAssembler::EmitOutOfInt32RangeTruncate(Register result,
// Check for Infinity and NaNs, which should return 0.
cmp(result, Operand(HeapNumber::kExponentMask));
mov(result, Operand(0), LeaveCC, eq);
mov(result, Operand::Zero(), LeaveCC, eq);
b(eq, &done);
// Express exponent as delta to (number of mantissa bits + 31).
......@@ -2613,7 +2613,7 @@ void MacroAssembler::EmitOutOfInt32RangeTruncate(Register result,
// If the delta is strictly positive, all bits would be shifted away,
// which means that we can return 0.
b(le, &normal_exponent);
mov(result, Operand(0));
mov(result, Operand::Zero());
b(&done);
bind(&normal_exponent);
......@@ -2641,7 +2641,7 @@ void MacroAssembler::EmitOutOfInt32RangeTruncate(Register result,
b(&pos_shift, ge);
// Negate scratch.
rsb(scratch, scratch, Operand(0));
rsb(scratch, scratch, Operand::Zero());
mov(input_low, Operand(input_low, LSL, scratch));
b(&shift_done);
......@@ -2651,10 +2651,10 @@ void MacroAssembler::EmitOutOfInt32RangeTruncate(Register result,
bind(&shift_done);
orr(input_high, input_high, Operand(input_low));
// Restore sign if necessary.
cmp(sign, Operand(0));
cmp(sign, Operand::Zero());
result = sign;
sign = no_reg;
rsb(result, input_high, Operand(0), LeaveCC, ne);
rsb(result, input_high, Operand::Zero(), LeaveCC, ne);
mov(result, input_high, LeaveCC, eq);
bind(&done);
}
......@@ -3295,7 +3295,7 @@ void MacroAssembler::CopyBytes(Register src,
// Align src before copying in word size chunks.
bind(&align_loop);
cmp(length, Operand(0));
cmp(length, Operand::Zero());
b(eq, &done);
bind(&align_loop_1);
tst(src, Operand(kPointerSize - 1));
......@@ -3330,7 +3330,7 @@ void MacroAssembler::CopyBytes(Register src,
// Copy the last bytes if any left.
bind(&byte_loop);
cmp(length, Operand(0));
cmp(length, Operand::Zero());
b(eq, &done);
bind(&byte_loop_1);
ldrb(scratch, MemOperand(src, 1, PostIndex));
......@@ -3368,7 +3368,7 @@ void MacroAssembler::CountLeadingZeros(Register zeros, // Answer.
// Order of the next two lines is important: zeros register
// can be the same as source register.
Move(scratch, source);
mov(zeros, Operand(0, RelocInfo::NONE32));
mov(zeros, Operand::Zero());
// Top 16.
tst(scratch, Operand(0xffff0000));
add(zeros, zeros, Operand(16), LeaveCC, eq);
......@@ -3800,7 +3800,7 @@ void MacroAssembler::ClampDoubleToUint8(Register result_reg,
b(gt, &above_zero);
// Double value is less than zero, NaN or Inf, return 0.
mov(result_reg, Operand(0));
mov(result_reg, Operand::Zero());
b(al, &done);
// Double value is >= 255, return 255.
......
......@@ -204,7 +204,7 @@ void RegExpMacroAssemblerARM::CheckAtStart(Label* on_at_start) {
Label not_at_start;
// Did we start the match at the start of the string at all?
__ ldr(r0, MemOperand(frame_pointer(), kStartIndex));
__ cmp(r0, Operand(0, RelocInfo::NONE32));
__ cmp(r0, Operand::Zero());
BranchOrBacktrack(ne, &not_at_start);
// If we did, are we still at the start of the input?
......@@ -219,7 +219,7 @@ void RegExpMacroAssemblerARM::CheckAtStart(Label* on_at_start) {
void RegExpMacroAssemblerARM::CheckNotAtStart(Label* on_not_at_start) {
// Did we start the match at the start of the string at all?
__ ldr(r0, MemOperand(frame_pointer(), kStartIndex));
__ cmp(r0, Operand(0, RelocInfo::NONE32));
__ cmp(r0, Operand::Zero());
BranchOrBacktrack(ne, on_not_at_start);
// If we did, are we still at the start of the input?
__ ldr(r1, MemOperand(frame_pointer(), kInputStart));
......@@ -385,7 +385,7 @@ void RegExpMacroAssemblerARM::CheckNotBackReferenceIgnoreCase(
}
// Check if function returned non-zero for success or zero for failure.
__ cmp(r0, Operand(0, RelocInfo::NONE32));
__ cmp(r0, Operand::Zero());
BranchOrBacktrack(eq, on_no_match);
// On success, increment position by length of capture.
__ add(current_input_offset(), current_input_offset(), Operand(r4));
......@@ -517,7 +517,7 @@ void RegExpMacroAssemblerARM::CheckBitInTable(
Operand(ByteArray::kHeaderSize - kHeapObjectTag));
}
__ ldrb(r0, MemOperand(r0, r1));
__ cmp(r0, Operand(0));
__ cmp(r0, Operand::Zero());
BranchOrBacktrack(ne, on_bit_set);
}
......@@ -613,7 +613,7 @@ bool RegExpMacroAssemblerARM::CheckSpecialCharacterClass(uc16 type,
ExternalReference map = ExternalReference::re_word_character_map();
__ mov(r0, Operand(map));
__ ldrb(r0, MemOperand(r0, current_character()));
__ cmp(r0, Operand(0));
__ cmp(r0, Operand::Zero());
BranchOrBacktrack(eq, on_no_match);
return true;
}
......@@ -627,7 +627,7 @@ bool RegExpMacroAssemblerARM::CheckSpecialCharacterClass(uc16 type,
ExternalReference map = ExternalReference::re_word_character_map();
__ mov(r0, Operand(map));
__ ldrb(r0, MemOperand(r0, current_character()));
__ cmp(r0, Operand(0));
__ cmp(r0, Operand::Zero());
BranchOrBacktrack(ne, on_no_match);
if (mode_ != ASCII) {
__ bind(&done);
......@@ -675,7 +675,7 @@ Handle<HeapObject> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
// Set frame pointer in space for it if this is not a direct call
// from generated code.
__ add(frame_pointer(), sp, Operand(4 * kPointerSize));
__ mov(r0, Operand(0, RelocInfo::NONE32));
__ mov(r0, Operand::Zero());
__ push(r0); // Make room for success counter and initialize it to 0.
__ push(r0); // Make room for "position - 1" constant (value is irrelevant).
// Check if we have space on the stack for registers.
......@@ -700,7 +700,7 @@ Handle<HeapObject> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
__ bind(&stack_limit_hit);
CallCheckStackGuardState(r0);
__ cmp(r0, Operand(0, RelocInfo::NONE32));
__ cmp(r0, Operand::Zero());
// If returned value is non-zero, we exit with the returned value as result.
__ b(ne, &return_r0);
......@@ -728,7 +728,7 @@ Handle<HeapObject> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
Label load_char_start_regexp, start_regexp;
// Load newline if index is at start, previous character otherwise.
__ cmp(r1, Operand(0, RelocInfo::NONE32));
__ cmp(r1, Operand::Zero());
__ b(ne, &load_char_start_regexp);
__ mov(current_character(), Operand('\n'), LeaveCC, eq);
__ jmp(&start_regexp);
......@@ -834,7 +834,7 @@ Handle<HeapObject> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
// Not a zero-length match, restart.
__ b(ne, &load_char_start_regexp);
// Offset from the end is zero if we already reached the end.
__ cmp(current_input_offset(), Operand(0));
__ cmp(current_input_offset(), Operand::Zero());
__ b(eq, &exit_label_);
// Advance current position after a zero-length match.
__ add(current_input_offset(),
......@@ -873,7 +873,7 @@ Handle<HeapObject> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
SafeCallTarget(&check_preempt_label_);
CallCheckStackGuardState(r0);
__ cmp(r0, Operand(0, RelocInfo::NONE32));
__ cmp(r0, Operand::Zero());
// If returning non-zero, we should end execution with the given
// result as return value.
__ b(ne, &return_r0);
......@@ -900,7 +900,7 @@ Handle<HeapObject> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
__ CallCFunction(grow_stack, num_arguments);
// If return NULL, we have failed to grow the stack, and
// must exit with a stack-overflow exception.
__ cmp(r0, Operand(0, RelocInfo::NONE32));
__ cmp(r0, Operand::Zero());
__ b(eq, &exit_with_exception);
// Otherwise use return value as new stack pointer.
__ mov(backtrack_stackpointer(), r0);
......
......@@ -735,7 +735,7 @@ static void GenerateFastApiDirectCall(MacroAssembler* masm,
__ mov(ip, Operand(argc));
__ str(ip, MemOperand(r0, 2 * kPointerSize));
// v8::Arguments::is_construct_call = 0
__ mov(ip, Operand(0));
__ mov(ip, Operand::Zero());
__ str(ip, MemOperand(r0, 3 * kPointerSize));
const int kStackUnwindSpace = argc + kFastApiCallArguments + 1;
......@@ -1008,7 +1008,7 @@ static void StoreIntAsFloat(MacroAssembler* masm,
__ and_(fval, ival, Operand(kBinary32SignMask), SetCC);
// Negate value if it is negative.
__ rsb(ival, ival, Operand(0, RelocInfo::NONE32), LeaveCC, ne);
__ rsb(ival, ival, Operand::Zero(), LeaveCC, ne);
// We have -1, 0 or 1, which we treat specially. Register ival contains
// absolute value: it is either equal to 1 (special case of -1 and 1),
......@@ -2241,7 +2241,7 @@ Handle<Code> CallStubCompiler::CompileMathFloorCall(
__ mov(r0, Operand(r0, LSL, kSmiTagSize));
// Check for -0.
__ cmp(r0, Operand(0, RelocInfo::NONE32));
__ cmp(r0, Operand::Zero());
__ b(&restore_fpscr_and_return, ne);
// r5 already holds the HeapNumber exponent.
__ tst(r5, Operand(HeapNumber::kSignMask));
......@@ -3944,18 +3944,18 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray(
// and infinities. All these should be converted to 0.
__ mov(r7, Operand(HeapNumber::kExponentMask));
__ and_(r9, r5, Operand(r7), SetCC);
__ mov(r5, Operand(0, RelocInfo::NONE32), LeaveCC, eq);
__ mov(r5, Operand::Zero(), LeaveCC, eq);
__ b(eq, &done);
__ teq(r9, Operand(r7));
__ mov(r5, Operand(0, RelocInfo::NONE32), LeaveCC, eq);
__ mov(r5, Operand::Zero(), LeaveCC, eq);
__ b(eq, &done);
// Unbias exponent.
__ mov(r9, Operand(r9, LSR, HeapNumber::kExponentShift));
__ sub(r9, r9, Operand(HeapNumber::kExponentBias), SetCC);
// If exponent is negative then result is 0.
__ mov(r5, Operand(0, RelocInfo::NONE32), LeaveCC, mi);
__ mov(r5, Operand::Zero(), LeaveCC, mi);
__ b(mi, &done);
// If exponent is too big then result is minimal value.
......@@ -3971,14 +3971,14 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray(
__ mov(r5, Operand(r5, LSR, r9), LeaveCC, pl);
__ b(pl, &sign);
__ rsb(r9, r9, Operand(0, RelocInfo::NONE32));
__ rsb(r9, r9, Operand::Zero());
__ mov(r5, Operand(r5, LSL, r9));
__ rsb(r9, r9, Operand(meaningfull_bits));
__ orr(r5, r5, Operand(r6, LSR, r9));
__ bind(&sign);
__ teq(r7, Operand(0, RelocInfo::NONE32));
__ rsb(r5, r5, Operand(0, RelocInfo::NONE32), LeaveCC, ne);
__ teq(r7, Operand::Zero());
__ rsb(r5, r5, Operand::Zero(), LeaveCC, ne);
__ bind(&done);
switch (elements_kind) {
......
......@@ -89,7 +89,7 @@ TEST(1) {
Label L, C;
__ mov(r1, Operand(r0));
__ mov(r0, Operand(0, RelocInfo::NONE32));
__ mov(r0, Operand::Zero());
__ b(&C);
__ bind(&L);
......@@ -97,7 +97,7 @@ TEST(1) {
__ sub(r1, r1, Operand(1));
__ bind(&C);
__ teq(r1, Operand(0, RelocInfo::NONE32));
__ teq(r1, Operand::Zero());
__ b(ne, &L);
__ mov(pc, Operand(lr));
......@@ -134,7 +134,7 @@ TEST(2) {
__ sub(r1, r1, Operand(1));
__ bind(&C);
__ teq(r1, Operand(0, RelocInfo::NONE32));
__ teq(r1, Operand::Zero());
__ b(ne, &L);
__ mov(pc, Operand(lr));
......@@ -979,13 +979,13 @@ TEST(11) {
// Test corner cases.
__ mov(r1, Operand(0xffffffff));
__ mov(r2, Operand(0));
__ mov(r2, Operand::Zero());
__ mov(r3, Operand(r1, ASR, 1), SetCC); // Set the carry.
__ adc(r3, r1, Operand(r2));
__ str(r3, MemOperand(r0, OFFSET_OF(I, c)));
__ mov(r1, Operand(0xffffffff));
__ mov(r2, Operand(0));
__ mov(r2, Operand::Zero());
__ mov(r3, Operand(r2, ASR, 1), SetCC); // Unset the carry.
__ adc(r3, r1, Operand(r2));
__ str(r3, MemOperand(r0, OFFSET_OF(I, d)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment