Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index c5e927176089f6bf8a59e8cfec238b963169f391..6d4c7199df4d5498cca624e01e52576a4bf67c9a 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -766,7 +766,8 @@ void LCodeGen::DoCallStub(LCallStub* instr) { |
} |
case CodeStub::TranscendentalCache: { |
__ ldr(r0, MemOperand(sp, 0)); |
- TranscendentalCacheStub stub(instr->transcendental_type()); |
+ TranscendentalCacheStub stub(instr->transcendental_type(), |
+ TranscendentalCacheStub::TAGGED); |
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
break; |
} |
@@ -2700,6 +2701,30 @@ void LCodeGen::DoPower(LPower* instr) { |
} |
+void LCodeGen::DoMathLog(LUnaryMathOperation* instr) { |
+ ASSERT(ToDoubleRegister(instr->result()).is(d2)); |
+ TranscendentalCacheStub stub(TranscendentalCache::LOG, |
+ TranscendentalCacheStub::UNTAGGED); |
+ CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
+} |
+ |
+ |
+void LCodeGen::DoMathCos(LUnaryMathOperation* instr) { |
+ ASSERT(ToDoubleRegister(instr->result()).is(d2)); |
+ TranscendentalCacheStub stub(TranscendentalCache::COS, |
+ TranscendentalCacheStub::UNTAGGED); |
+ CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
+} |
+ |
+ |
+void LCodeGen::DoMathSin(LUnaryMathOperation* instr) { |
+ ASSERT(ToDoubleRegister(instr->result()).is(d2)); |
+ TranscendentalCacheStub stub(TranscendentalCache::SIN, |
+ TranscendentalCacheStub::UNTAGGED); |
+ CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
+} |
+ |
+ |
void LCodeGen::DoUnaryMathOperation(LUnaryMathOperation* instr) { |
switch (instr->op()) { |
case kMathAbs: |
@@ -2714,6 +2739,15 @@ void LCodeGen::DoUnaryMathOperation(LUnaryMathOperation* instr) { |
case kMathSqrt: |
DoMathSqrt(instr); |
break; |
+ case kMathCos: |
+ DoMathCos(instr); |
+ break; |
+ case kMathSin: |
+ DoMathSin(instr); |
+ break; |
+ case kMathLog: |
+ DoMathLog(instr); |
+ break; |
default: |
Abort("Unimplemented type of LUnaryMathOperation."); |
UNREACHABLE(); |