| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index e79caf1854b978711411a9fa434b6bff464c12ed..ec0a9ae99694720f719561c408357146ce2a48f5 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -3190,6 +3190,30 @@ void LCodeGen::DoPower(LPower* instr) {
|
| }
|
|
|
|
|
| +void LCodeGen::DoRandom(LRandom* instr) {
|
| + // Having marked this instruction as a call we can use any
|
| + // registers.
|
| + ASSERT(ToDoubleRegister(instr->result()).is(d7));
|
| + ASSERT(ToRegister(instr->InputAt(0)).is(r0));
|
| +
|
| + __ PrepareCallCFunction(1, scratch0());
|
| + __ ldr(r0, FieldMemOperand(r0, GlobalObject::kGlobalContextOffset));
|
| + __ 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(0, RelocInfo::NONE));
|
| + __ vmov(d8, r0, r1);
|
| + // Subtract and store the result in the heap number.
|
| + __ vsub(d7, d7, d8);
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoMathLog(LUnaryMathOperation* instr) {
|
| ASSERT(ToDoubleRegister(instr->result()).is(d2));
|
| TranscendentalCacheStub stub(TranscendentalCache::LOG,
|
|
|