Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Side by Side Diff: src/arm/codegen-arm.cc

Issue 5437002: Add generated code to calculate Math.log and to search Transcendental cache f... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/codegen-arm.h ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 5732 matching lines...) Expand 10 before | Expand all | Expand 10 after
5743 TranscendentalCacheStub stub(TranscendentalCache::COS); 5743 TranscendentalCacheStub stub(TranscendentalCache::COS);
5744 frame_->SpillAllButCopyTOSToR0(); 5744 frame_->SpillAllButCopyTOSToR0();
5745 frame_->CallStub(&stub, 1); 5745 frame_->CallStub(&stub, 1);
5746 } else { 5746 } else {
5747 frame_->CallRuntime(Runtime::kMath_cos, 1); 5747 frame_->CallRuntime(Runtime::kMath_cos, 1);
5748 } 5748 }
5749 frame_->EmitPush(r0); 5749 frame_->EmitPush(r0);
5750 } 5750 }
5751 5751
5752 5752
5753 void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) {
5754 ASSERT_EQ(args->length(), 1);
5755 Load(args->at(0));
5756 if (CpuFeatures::IsSupported(VFP3)) {
5757 TranscendentalCacheStub stub(TranscendentalCache::LOG);
5758 frame_->SpillAllButCopyTOSToR0();
5759 frame_->CallStub(&stub, 1);
5760 } else {
5761 frame_->CallRuntime(Runtime::kMath_log, 1);
5762 }
5763 frame_->EmitPush(r0);
5764 }
5765
5766
5753 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) { 5767 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) {
5754 ASSERT(args->length() == 2); 5768 ASSERT(args->length() == 2);
5755 5769
5756 // Load the two objects into registers and perform the comparison. 5770 // Load the two objects into registers and perform the comparison.
5757 Load(args->at(0)); 5771 Load(args->at(0));
5758 Load(args->at(1)); 5772 Load(args->at(1));
5759 Register lhs = frame_->PopToRegister(); 5773 Register lhs = frame_->PopToRegister();
5760 Register rhs = frame_->PopToRegister(lhs); 5774 Register rhs = frame_->PopToRegister(lhs);
5761 __ cmp(lhs, rhs); 5775 __ cmp(lhs, rhs);
5762 cc_reg_ = eq; 5776 cc_reg_ = eq;
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
7430 BinaryOpIC::GetName(runtime_operands_type_)); 7444 BinaryOpIC::GetName(runtime_operands_type_));
7431 return name_; 7445 return name_;
7432 } 7446 }
7433 7447
7434 7448
7435 #undef __ 7449 #undef __
7436 7450
7437 } } // namespace v8::internal 7451 } } // namespace v8::internal
7438 7452
7439 #endif // V8_TARGET_ARCH_ARM 7453 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.h ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698