OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 5641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5652 Load(args->at(n_args + 1)); // function | 5652 Load(args->at(n_args + 1)); // function |
5653 frame_->CallJSFunction(n_args); | 5653 frame_->CallJSFunction(n_args); |
5654 frame_->EmitPush(r0); | 5654 frame_->EmitPush(r0); |
5655 } | 5655 } |
5656 | 5656 |
5657 | 5657 |
5658 void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) { | 5658 void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) { |
5659 ASSERT_EQ(args->length(), 1); | 5659 ASSERT_EQ(args->length(), 1); |
5660 Load(args->at(0)); | 5660 Load(args->at(0)); |
5661 if (CpuFeatures::IsSupported(VFP3)) { | 5661 if (CpuFeatures::IsSupported(VFP3)) { |
5662 TranscendentalCacheStub stub(TranscendentalCache::SIN); | 5662 TranscendentalCacheStub stub(TranscendentalCache::SIN, |
| 5663 TranscendentalCacheStub::TAGGED); |
5663 frame_->SpillAllButCopyTOSToR0(); | 5664 frame_->SpillAllButCopyTOSToR0(); |
5664 frame_->CallStub(&stub, 1); | 5665 frame_->CallStub(&stub, 1); |
5665 } else { | 5666 } else { |
5666 frame_->CallRuntime(Runtime::kMath_sin, 1); | 5667 frame_->CallRuntime(Runtime::kMath_sin, 1); |
5667 } | 5668 } |
5668 frame_->EmitPush(r0); | 5669 frame_->EmitPush(r0); |
5669 } | 5670 } |
5670 | 5671 |
5671 | 5672 |
5672 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { | 5673 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { |
5673 ASSERT_EQ(args->length(), 1); | 5674 ASSERT_EQ(args->length(), 1); |
5674 Load(args->at(0)); | 5675 Load(args->at(0)); |
5675 if (CpuFeatures::IsSupported(VFP3)) { | 5676 if (CpuFeatures::IsSupported(VFP3)) { |
5676 TranscendentalCacheStub stub(TranscendentalCache::COS); | 5677 TranscendentalCacheStub stub(TranscendentalCache::COS, |
| 5678 TranscendentalCacheStub::TAGGED); |
5677 frame_->SpillAllButCopyTOSToR0(); | 5679 frame_->SpillAllButCopyTOSToR0(); |
5678 frame_->CallStub(&stub, 1); | 5680 frame_->CallStub(&stub, 1); |
5679 } else { | 5681 } else { |
5680 frame_->CallRuntime(Runtime::kMath_cos, 1); | 5682 frame_->CallRuntime(Runtime::kMath_cos, 1); |
5681 } | 5683 } |
5682 frame_->EmitPush(r0); | 5684 frame_->EmitPush(r0); |
5683 } | 5685 } |
5684 | 5686 |
5685 | 5687 |
5686 void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) { | 5688 void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) { |
5687 ASSERT_EQ(args->length(), 1); | 5689 ASSERT_EQ(args->length(), 1); |
5688 Load(args->at(0)); | 5690 Load(args->at(0)); |
5689 if (CpuFeatures::IsSupported(VFP3)) { | 5691 if (CpuFeatures::IsSupported(VFP3)) { |
5690 TranscendentalCacheStub stub(TranscendentalCache::LOG); | 5692 TranscendentalCacheStub stub(TranscendentalCache::LOG, |
| 5693 TranscendentalCacheStub::TAGGED); |
5691 frame_->SpillAllButCopyTOSToR0(); | 5694 frame_->SpillAllButCopyTOSToR0(); |
5692 frame_->CallStub(&stub, 1); | 5695 frame_->CallStub(&stub, 1); |
5693 } else { | 5696 } else { |
5694 frame_->CallRuntime(Runtime::kMath_log, 1); | 5697 frame_->CallRuntime(Runtime::kMath_log, 1); |
5695 } | 5698 } |
5696 frame_->EmitPush(r0); | 5699 frame_->EmitPush(r0); |
5697 } | 5700 } |
5698 | 5701 |
5699 | 5702 |
5700 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) { | 5703 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) { |
(...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7394 BinaryOpIC::GetName(runtime_operands_type_)); | 7397 BinaryOpIC::GetName(runtime_operands_type_)); |
7395 return name_; | 7398 return name_; |
7396 } | 7399 } |
7397 | 7400 |
7398 | 7401 |
7399 #undef __ | 7402 #undef __ |
7400 | 7403 |
7401 } } // namespace v8::internal | 7404 } } // namespace v8::internal |
7402 | 7405 |
7403 #endif // V8_TARGET_ARCH_ARM | 7406 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |