Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 755143dcf8d376ef860f6519e672587ccd518499..ac1104187fa48ee7858fb1a6ba2976632d27738e 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -3027,37 +3027,26 @@ void FullCodeGenerator::EmitRandomHeapNumber(CallRuntime* expr) { |
// Convert 32 random bits in r0 to 0.(32 random bits) in a double |
// by computing: |
// ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)). |
- if (CpuFeatures::IsSupported(VFP2)) { |
- __ PrepareCallCFunction(1, r0); |
- __ ldr(r0, |
- ContextOperand(context_register(), Context::GLOBAL_OBJECT_INDEX)); |
- __ ldr(r0, FieldMemOperand(r0, GlobalObject::kNativeContextOffset)); |
- __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1); |
- |
- CpuFeatureScope scope(masm(), VFP2); |
- // 0x41300000 is the top half of 1.0 x 2^20 as a double. |
- // Create this constant using mov/orr to avoid PC relative load. |
- __ mov(r1, Operand(0x41000000)); |
- __ orr(r1, r1, Operand(0x300000)); |
- // Move 0x41300000xxxxxxxx (x = random bits) to VFP. |
- __ vmov(d7, r0, r1); |
- // Move 0x4130000000000000 to VFP. |
- __ mov(r0, Operand::Zero()); |
- __ vmov(d8, r0, r1); |
- // Subtract and store the result in the heap number. |
- __ vsub(d7, d7, d8); |
- __ sub(r0, r4, Operand(kHeapObjectTag)); |
- __ vstr(d7, r0, HeapNumber::kValueOffset); |
- __ mov(r0, r4); |
- } else { |
- __ PrepareCallCFunction(2, r0); |
- __ ldr(r1, |
- ContextOperand(context_register(), Context::GLOBAL_OBJECT_INDEX)); |
- __ mov(r0, Operand(r4)); |
- __ ldr(r1, FieldMemOperand(r1, GlobalObject::kNativeContextOffset)); |
- __ CallCFunction( |
- ExternalReference::fill_heap_number_with_random_function(isolate()), 2); |
- } |
+ __ PrepareCallCFunction(1, r0); |
+ __ ldr(r0, |
+ ContextOperand(context_register(), Context::GLOBAL_OBJECT_INDEX)); |
+ __ ldr(r0, FieldMemOperand(r0, GlobalObject::kNativeContextOffset)); |
+ __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 1); |
+ |
+ // 0x41300000 is the top half of 1.0 x 2^20 as a double. |
+ // Create this constant using mov/orr to avoid PC relative load. |
+ __ mov(r1, Operand(0x41000000)); |
+ __ orr(r1, r1, Operand(0x300000)); |
+ // Move 0x41300000xxxxxxxx (x = random bits) to VFP. |
+ __ vmov(d7, r0, r1); |
+ // Move 0x4130000000000000 to VFP. |
+ __ mov(r0, Operand::Zero()); |
+ __ vmov(d8, r0, r1); |
+ // Subtract and store the result in the heap number. |
+ __ vsub(d7, d7, d8); |
+ __ sub(r0, r4, Operand(kHeapObjectTag)); |
+ __ vstr(d7, r0, HeapNumber::kValueOffset); |
+ __ mov(r0, r4); |
context()->Plug(r0); |
} |
@@ -3194,12 +3183,8 @@ void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { |
ASSERT(args->length() == 2); |
VisitForStackValue(args->at(0)); |
VisitForStackValue(args->at(1)); |
- if (CpuFeatures::IsSupported(VFP2)) { |
- MathPowStub stub(MathPowStub::ON_STACK); |
- __ CallStub(&stub); |
- } else { |
- __ CallRuntime(Runtime::kMath_pow, 2); |
- } |
+ MathPowStub stub(MathPowStub::ON_STACK); |
+ __ CallStub(&stub); |
context()->Plug(r0); |
} |