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

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

Issue 11191029: Use VLDR instead of VMOVs from GPR when a 64-bit double can't be encoded as a VMOV immediate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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
Index: src/arm/macro-assembler-arm.cc
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
index 4409e2643afa32b79a7c0d309f3a4d22f1a7d4a1..ab9788c3a1d8b09599d2e4db251e342d176cb1e1 100644
--- a/src/arm/macro-assembler-arm.cc
+++ b/src/arm/macro-assembler-arm.cc
@@ -290,7 +290,7 @@ void MacroAssembler::And(Register dst, Register src1, const Operand& src2,
if (!src2.is_reg() &&
!src2.must_use_constant_pool(this) &&
src2.immediate() == 0) {
- mov(dst, Operand(0, RelocInfo::NONE), LeaveCC, cond);
+ mov(dst, Operand::Zero(), LeaveCC, cond);
} else if (!src2.is_single_instruction(this) &&
!src2.must_use_constant_pool(this) &&
@@ -398,7 +398,7 @@ void MacroAssembler::Usat(Register dst, int satpos, const Operand& src,
}
tst(dst, Operand(~satval));
b(eq, &done);
- mov(dst, Operand(0, RelocInfo::NONE), 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 {
@@ -841,7 +841,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()));
@@ -925,7 +925,7 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles,
}
// Clear top frame.
- mov(r3, Operand(0, RelocInfo::NONE));
+ mov(r3, Operand::Zero());
mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
str(r3, MemOperand(ip));
@@ -1195,7 +1195,7 @@ void MacroAssembler::IsObjectJSStringType(Register object,
#ifdef ENABLE_DEBUGGER_SUPPORT
void MacroAssembler::DebugBreak() {
- mov(r0, Operand(0, RelocInfo::NONE));
+ mov(r0, Operand::Zero());
mov(r1, Operand(ExternalReference(Runtime::kDebugBreak, isolate())));
CEntryStub ces(1);
ASSERT(AllowThisStubCall(&ces));
@@ -1226,7 +1226,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::NONE)); // 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());
@@ -1350,7 +1350,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::NONE));
+ cmp(scratch, Operand::Zero());
Check(ne, "we should not have an empty lexical context");
#endif
@@ -1976,7 +1976,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.
@@ -2209,7 +2209,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);
@@ -2388,7 +2388,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::NONE));
+ 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
@@ -2442,7 +2442,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::NONE), LeaveCC, ne);
+ rsb(dest, dest, Operand::Zero(), LeaveCC, ne);
bind(&done);
}
}
@@ -2523,7 +2523,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).
@@ -2535,7 +2535,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);
@@ -2563,7 +2563,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);
@@ -2573,10 +2573,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);
}
@@ -3212,7 +3212,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));
@@ -3247,7 +3247,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));
@@ -3285,7 +3285,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::NONE));
+ mov(zeros, Operand::Zero());
// Top 16.
tst(scratch, Operand(0xffff0000));
add(zeros, zeros, Operand(16), LeaveCC, eq);
@@ -3713,7 +3713,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.

Powered by Google App Engine
This is Rietveld 408576698