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

Unified Diff: src/arm/code-stubs-arm.cc

Issue 7708004: Fix ARM build for gcc-4.6 Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 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 | « no previous file | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index 82fa8ceaf318a043620d0c67255c4dc344ba97fe..c36e4f6c701d1f6950f31a7b9361719f7a1633ea 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -549,7 +549,7 @@ void FloatingPointHelper::ConvertIntToDouble(MacroAssembler* masm,
// | s | exp | mantissa |
// Check for zero.
- __ cmp(int_scratch, Operand(0));
+ __ cmp(int_scratch, Operand(Smi::FromInt(0)));
__ mov(dst2, int_scratch);
__ mov(dst1, int_scratch);
__ b(eq, &done);
@@ -557,13 +557,13 @@ void FloatingPointHelper::ConvertIntToDouble(MacroAssembler* masm,
// Preload the sign of the value.
__ and_(dst2, int_scratch, Operand(HeapNumber::kSignMask), SetCC);
// Get the absolute value of the object (as an unsigned integer).
- __ rsb(int_scratch, int_scratch, Operand(0), SetCC, mi);
+ __ rsb(int_scratch, int_scratch, Operand(Smi::FromInt(0)), SetCC, mi);
// Get mantisssa[51:20].
// Get the position of the first set bit.
__ CountLeadingZeros(dst1, int_scratch, scratch2);
- __ rsb(dst1, dst1, Operand(31));
+ __ rsb(dst1, dst1, Operand(Smi::FromInt(31)));
Erik Corry 2011/08/23 08:54:07 This is wrong. Smi tagging the int will double it
// Set the exponent.
__ add(scratch2, dst1, Operand(HeapNumber::kExponentBias));
@@ -571,7 +571,7 @@ void FloatingPointHelper::ConvertIntToDouble(MacroAssembler* masm,
HeapNumber::kExponentShift, HeapNumber::kExponentBits);
// Clear the first non null bit.
- __ mov(scratch2, Operand(1));
+ __ mov(scratch2, Operand(Smi::FromInt(1)));
__ bic(int_scratch, int_scratch, Operand(scratch2, LSL, dst1));
__ cmp(dst1, Operand(HeapNumber::kMantissaBitsInTopWord));
@@ -589,7 +589,7 @@ void FloatingPointHelper::ConvertIntToDouble(MacroAssembler* masm,
__ mov(scratch2, Operand(int_scratch, LSL, scratch2));
__ orr(dst2, dst2, scratch2);
// Set dst1 to 0.
- __ mov(dst1, Operand(0));
+ __ mov(dst1, Operand(Smi::FromInt(0)));
}
__ bind(&done);
}
@@ -657,7 +657,7 @@ void FloatingPointHelper::LoadNumberAsInt32Double(MacroAssembler* masm,
// Check for 0 and -0.
__ bic(scratch1, dst1, Operand(HeapNumber::kSignMask));
__ orr(scratch1, scratch1, Operand(dst2));
- __ cmp(scratch1, Operand(0));
+ __ cmp(scratch1, Operand(Smi::FromInt(0)));
__ b(eq, &done);
// Check that the value can be exactly represented by a 32-bit integer.
@@ -730,7 +730,7 @@ void FloatingPointHelper::LoadNumberAsInt32(MacroAssembler* masm,
// Check for 0 and -0.
__ bic(dst, scratch1, Operand(HeapNumber::kSignMask));
__ orr(dst, scratch2, Operand(dst));
- __ cmp(dst, Operand(0));
+ __ cmp(dst, Operand(Smi::FromInt(0)));
__ b(eq, &done);
DoubleIs32BitInteger(masm, scratch1, scratch2, dst, scratch3, not_int32);
@@ -747,7 +747,7 @@ void FloatingPointHelper::LoadNumberAsInt32(MacroAssembler* masm,
// Set the sign.
__ ldr(scratch1, FieldMemOperand(object, HeapNumber::kExponentOffset));
__ tst(scratch1, Operand(HeapNumber::kSignMask));
- __ rsb(dst, dst, Operand(0), LeaveCC, mi);
+ __ rsb(dst, dst, Operand(Smi::FromInt(0)), LeaveCC, mi);
}
__ bind(&done);
@@ -783,7 +783,7 @@ void FloatingPointHelper::DoubleIs32BitInteger(MacroAssembler* masm,
// number cannot be represented as an int32.
Register tmp = dst;
__ sub(tmp, scratch, Operand(src1, LSR, 31));
- __ cmp(tmp, Operand(30));
+ __ cmp(tmp, Operand(Smi::FromInt(30)));
__ b(gt, not_int32);
// - Bits [21:0] in the mantissa are not null.
__ tst(src2, Operand(0x3fffff));
@@ -2424,7 +2424,6 @@ void BinaryOpStub::GenerateSmiCode(
Register left = r1;
Register right = r0;
Register scratch1 = r7;
- Register scratch2 = r9;
// Perform combined smi check on both operands.
__ orr(scratch1, left, Operand(right));
@@ -2618,7 +2617,7 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
__ b(mi, &return_heap_number);
// Check for minus zero. Return heap number for minus zero.
Label not_zero;
- __ cmp(scratch1, Operand(0));
+ __ cmp(scratch1, Operand(Smi::FromInt(0)));
__ b(ne, &not_zero);
__ vmov(scratch2, d5.high());
__ tst(scratch2, Operand(HeapNumber::kSignMask));
@@ -3110,7 +3109,6 @@ void TranscendentalCacheStub::Generate(MacroAssembler* masm) {
Label no_update;
Label skip_cache;
- const Register heap_number_map = r5;
// Call C function to calculate the result and update the cache.
// Register r0 holds precalculated cache entry address; preserve
@@ -3581,7 +3579,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
ExternalReference js_entry_sp(Isolate::k_js_entry_sp_address, isolate);
__ mov(r5, Operand(ExternalReference(js_entry_sp)));
__ ldr(r6, MemOperand(r5));
- __ cmp(r6, Operand(0));
+ __ cmp(r6, Operand(Smi::FromInt(0)));
__ b(ne, &non_outermost_js);
__ str(fp, MemOperand(r5));
__ mov(ip, Operand(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME)));
@@ -3656,7 +3654,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
__ pop(r5);
__ cmp(r5, Operand(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME)));
__ b(ne, &non_outermost_js_2);
- __ mov(r6, Operand(0));
+ __ mov(r6, Operand(Smi::FromInt(0)));
__ mov(r5, Operand(ExternalReference(js_entry_sp)));
__ str(r6, MemOperand(r5));
__ bind(&non_outermost_js_2);
@@ -3857,7 +3855,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
__ Push(r0, r1);
__ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION);
__ LeaveInternalFrame();
- __ cmp(r0, Operand(0));
+ __ cmp(r0, Operand(Smi::FromInt(0)));
__ LoadRoot(r0, Heap::kTrueValueRootIndex, eq);
__ LoadRoot(r0, Heap::kFalseValueRootIndex, ne);
__ Ret(HasArgsInRegisters() ? 0 : 2);
@@ -3991,7 +3989,7 @@ void ArgumentsAccessStub::GenerateNewNonStrictFast(MacroAssembler* masm) {
FixedArray::kHeaderSize + 2 * kPointerSize;
// If there are no mapped parameters, we do not need the parameter_map.
__ cmp(r1, Operand(Smi::FromInt(0)));
- __ mov(r9, Operand(0), LeaveCC, eq);
+ __ mov(r9, Operand(Smi::FromInt(0)), LeaveCC, eq);
__ mov(r9, Operand(r1, LSL, 1), LeaveCC, ne);
__ add(r9, r9, Operand(kParameterMapHeaderSize), LeaveCC, ne);
@@ -4015,7 +4013,7 @@ void ArgumentsAccessStub::GenerateNewNonStrictFast(MacroAssembler* masm) {
__ ldr(r4, MemOperand(r8, Context::SlotOffset(Context::GLOBAL_INDEX)));
__ ldr(r4, FieldMemOperand(r4, GlobalObject::kGlobalContextOffset));
- __ cmp(r1, Operand(0));
+ __ cmp(r1, Operand(Smi::FromInt(0)));
__ ldr(r4, MemOperand(r4, kNormalOffset), eq);
__ ldr(r4, MemOperand(r4, kAliasedOffset), ne);
@@ -5697,7 +5695,7 @@ void StringCompareStub::GenerateAsciiCharsCompareLoop(
Operand(SeqAsciiString::kHeaderSize - kHeapObjectTag));
__ add(left, left, Operand(scratch1));
__ add(right, right, Operand(scratch1));
- __ rsb(length, length, Operand(0));
+ __ rsb(length, length, Operand(Smi::FromInt(0)));
Register index = length; // index = -length;
// Compare loop.
@@ -5707,7 +5705,7 @@ void StringCompareStub::GenerateAsciiCharsCompareLoop(
__ ldrb(scratch2, MemOperand(right, index));
__ cmp(scratch1, scratch2);
__ b(ne, chars_not_equal);
- __ add(index, index, Operand(1), SetCC);
+ __ add(index, index, Operand(Smi::FromInt(1)), SetCC);
__ b(ne, &loop);
}
@@ -6555,16 +6553,16 @@ void StringDictionaryLookupStub::Generate(MacroAssembler* masm) {
// treated as a lookup success. For positive lookup probing failure
// should be treated as lookup failure.
if (mode_ == POSITIVE_LOOKUP) {
- __ mov(result, Operand(0));
+ __ mov(result, Operand(Smi::FromInt(0)));
__ Ret();
}
__ bind(&in_dictionary);
- __ mov(result, Operand(1));
+ __ mov(result, Operand(Smi::FromInt(1)));
__ Ret();
__ bind(&not_in_dictionary);
- __ mov(result, Operand(0));
+ __ mov(result, Operand(Smi::FromInt(0)));
__ Ret();
}
« no previous file with comments | « no previous file | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698