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 5638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5649 Load(args->at(n_args + 1)); // function | 5649 Load(args->at(n_args + 1)); // function |
5650 frame_->CallJSFunction(n_args); | 5650 frame_->CallJSFunction(n_args); |
5651 frame_->EmitPush(r0); | 5651 frame_->EmitPush(r0); |
5652 } | 5652 } |
5653 | 5653 |
5654 | 5654 |
5655 void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) { | 5655 void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) { |
5656 ASSERT_EQ(args->length(), 1); | 5656 ASSERT_EQ(args->length(), 1); |
5657 Load(args->at(0)); | 5657 Load(args->at(0)); |
5658 if (CpuFeatures::IsSupported(VFP3)) { | 5658 if (CpuFeatures::IsSupported(VFP3)) { |
5659 TranscendentalCacheStub stub(TranscendentalCache::SIN); | 5659 TranscendentalCacheStub stub(TranscendentalCache::SIN, |
| 5660 TranscendentalCacheStub::TAGGED); |
5660 frame_->SpillAllButCopyTOSToR0(); | 5661 frame_->SpillAllButCopyTOSToR0(); |
5661 frame_->CallStub(&stub, 1); | 5662 frame_->CallStub(&stub, 1); |
5662 } else { | 5663 } else { |
5663 frame_->CallRuntime(Runtime::kMath_sin, 1); | 5664 frame_->CallRuntime(Runtime::kMath_sin, 1); |
5664 } | 5665 } |
5665 frame_->EmitPush(r0); | 5666 frame_->EmitPush(r0); |
5666 } | 5667 } |
5667 | 5668 |
5668 | 5669 |
5669 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { | 5670 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { |
5670 ASSERT_EQ(args->length(), 1); | 5671 ASSERT_EQ(args->length(), 1); |
5671 Load(args->at(0)); | 5672 Load(args->at(0)); |
5672 if (CpuFeatures::IsSupported(VFP3)) { | 5673 if (CpuFeatures::IsSupported(VFP3)) { |
5673 TranscendentalCacheStub stub(TranscendentalCache::COS); | 5674 TranscendentalCacheStub stub(TranscendentalCache::COS, |
| 5675 TranscendentalCacheStub::TAGGED); |
5674 frame_->SpillAllButCopyTOSToR0(); | 5676 frame_->SpillAllButCopyTOSToR0(); |
5675 frame_->CallStub(&stub, 1); | 5677 frame_->CallStub(&stub, 1); |
5676 } else { | 5678 } else { |
5677 frame_->CallRuntime(Runtime::kMath_cos, 1); | 5679 frame_->CallRuntime(Runtime::kMath_cos, 1); |
5678 } | 5680 } |
5679 frame_->EmitPush(r0); | 5681 frame_->EmitPush(r0); |
5680 } | 5682 } |
5681 | 5683 |
5682 | 5684 |
5683 void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) { | 5685 void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) { |
5684 ASSERT_EQ(args->length(), 1); | 5686 ASSERT_EQ(args->length(), 1); |
5685 Load(args->at(0)); | 5687 Load(args->at(0)); |
5686 if (CpuFeatures::IsSupported(VFP3)) { | 5688 if (CpuFeatures::IsSupported(VFP3)) { |
5687 TranscendentalCacheStub stub(TranscendentalCache::LOG); | 5689 TranscendentalCacheStub stub(TranscendentalCache::LOG, |
| 5690 TranscendentalCacheStub::TAGGED); |
5688 frame_->SpillAllButCopyTOSToR0(); | 5691 frame_->SpillAllButCopyTOSToR0(); |
5689 frame_->CallStub(&stub, 1); | 5692 frame_->CallStub(&stub, 1); |
5690 } else { | 5693 } else { |
5691 frame_->CallRuntime(Runtime::kMath_log, 1); | 5694 frame_->CallRuntime(Runtime::kMath_log, 1); |
5692 } | 5695 } |
5693 frame_->EmitPush(r0); | 5696 frame_->EmitPush(r0); |
5694 } | 5697 } |
5695 | 5698 |
5696 | 5699 |
5697 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) { | 5700 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) { |
(...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7375 BinaryOpIC::GetName(runtime_operands_type_)); | 7378 BinaryOpIC::GetName(runtime_operands_type_)); |
7376 return name_; | 7379 return name_; |
7377 } | 7380 } |
7378 | 7381 |
7379 | 7382 |
7380 #undef __ | 7383 #undef __ |
7381 | 7384 |
7382 } } // namespace v8::internal | 7385 } } // namespace v8::internal |
7383 | 7386 |
7384 #endif // V8_TARGET_ARCH_ARM | 7387 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |