Index: src/mips/full-codegen-mips.cc |
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc |
index 38334d50dd0dacde193f20cba99e80cb6da45cde..caa7352eae8bb60b771e6c475ecb2727d568f8b7 100644 |
--- a/src/mips/full-codegen-mips.cc |
+++ b/src/mips/full-codegen-mips.cc |
@@ -3762,9 +3762,9 @@ void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { |
} |
-void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { |
+void FullCodeGenerator::EmitMathSin(CallRuntime* expr) { |
// Load the argument on the stack and call the stub. |
- TranscendentalCacheStub stub(TranscendentalCache::LOG, |
+ TranscendentalCacheStub stub(TranscendentalCache::SIN, |
TranscendentalCacheStub::TAGGED); |
ZoneList<Expression*>* args = expr->arguments(); |
ASSERT(args->length() == 1); |
@@ -3775,22 +3775,51 @@ void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { |
} |
-void FullCodeGenerator::EmitMathSqrt(CallRuntime* expr) { |
- // Load the argument on the stack and call the runtime function. |
+void FullCodeGenerator::EmitMathCos(CallRuntime* expr) { |
+ // Load the argument on the stack and call the stub. |
+ TranscendentalCacheStub stub(TranscendentalCache::COS, |
+ TranscendentalCacheStub::TAGGED); |
ZoneList<Expression*>* args = expr->arguments(); |
ASSERT(args->length() == 1); |
VisitForStackValue(args->at(0)); |
- __ CallRuntime(Runtime::kMath_sqrt, 1); |
+ __ mov(a0, result_register()); // Stub requires parameter in a0 and on tos. |
+ __ CallStub(&stub); |
context()->Plug(v0); |
} |
-void FullCodeGenerator::EmitMathFloor(CallRuntime* expr) { |
+void FullCodeGenerator::EmitMathTan(CallRuntime* expr) { |
+ // Load the argument on the stack and call the stub. |
+ TranscendentalCacheStub stub(TranscendentalCache::TAN, |
+ TranscendentalCacheStub::TAGGED); |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ ASSERT(args->length() == 1); |
+ VisitForStackValue(args->at(0)); |
+ __ mov(a0, result_register()); // Stub requires parameter in a0 and on tos. |
+ __ CallStub(&stub); |
+ context()->Plug(v0); |
+} |
+ |
+ |
+void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { |
+ // Load the argument on the stack and call the stub. |
+ TranscendentalCacheStub stub(TranscendentalCache::LOG, |
+ TranscendentalCacheStub::TAGGED); |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ ASSERT(args->length() == 1); |
+ VisitForStackValue(args->at(0)); |
+ __ mov(a0, result_register()); // Stub requires parameter in a0 and on tos. |
+ __ CallStub(&stub); |
+ context()->Plug(v0); |
+} |
+ |
+ |
+void FullCodeGenerator::EmitMathSqrt(CallRuntime* expr) { |
// Load the argument on the stack and call the runtime function. |
ZoneList<Expression*>* args = expr->arguments(); |
ASSERT(args->length() == 1); |
VisitForStackValue(args->at(0)); |
- __ CallRuntime(Runtime::kMath_floor, 1); |
+ __ CallRuntime(Runtime::kMath_sqrt, 1); |
context()->Plug(v0); |
} |