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

Side by Side Diff: src/x64/full-codegen-x64.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/x64/disasm-x64.cc ('k') | no next file » | 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 2605 matching lines...) Expand 10 before | Expand all | Expand 10 after
2616 void FullCodeGenerator::EmitMathCos(ZoneList<Expression*>* args) { 2616 void FullCodeGenerator::EmitMathCos(ZoneList<Expression*>* args) {
2617 // Load the argument on the stack and call the stub. 2617 // Load the argument on the stack and call the stub.
2618 TranscendentalCacheStub stub(TranscendentalCache::COS); 2618 TranscendentalCacheStub stub(TranscendentalCache::COS);
2619 ASSERT(args->length() == 1); 2619 ASSERT(args->length() == 1);
2620 VisitForStackValue(args->at(0)); 2620 VisitForStackValue(args->at(0));
2621 __ CallStub(&stub); 2621 __ CallStub(&stub);
2622 context()->Plug(rax); 2622 context()->Plug(rax);
2623 } 2623 }
2624 2624
2625 2625
2626 void FullCodeGenerator::EmitMathLog(ZoneList<Expression*>* args) {
2627 // Load the argument on the stack and call the stub.
2628 TranscendentalCacheStub stub(TranscendentalCache::LOG);
2629 ASSERT(args->length() == 1);
2630 VisitForStackValue(args->at(0));
2631 __ CallStub(&stub);
2632 context()->Plug(rax);
2633 }
2634
2635
2626 void FullCodeGenerator::EmitMathSqrt(ZoneList<Expression*>* args) { 2636 void FullCodeGenerator::EmitMathSqrt(ZoneList<Expression*>* args) {
2627 // Load the argument on the stack and call the runtime function. 2637 // Load the argument on the stack and call the runtime function.
2628 ASSERT(args->length() == 1); 2638 ASSERT(args->length() == 1);
2629 VisitForStackValue(args->at(0)); 2639 VisitForStackValue(args->at(0));
2630 __ CallRuntime(Runtime::kMath_sqrt, 1); 2640 __ CallRuntime(Runtime::kMath_sqrt, 1);
2631 context()->Plug(rax); 2641 context()->Plug(rax);
2632 } 2642 }
2633 2643
2634 2644
2635 void FullCodeGenerator::EmitCallFunction(ZoneList<Expression*>* args) { 2645 void FullCodeGenerator::EmitCallFunction(ZoneList<Expression*>* args) {
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
3469 __ ret(0); 3479 __ ret(0);
3470 } 3480 }
3471 3481
3472 3482
3473 #undef __ 3483 #undef __
3474 3484
3475 3485
3476 } } // namespace v8::internal 3486 } } // namespace v8::internal
3477 3487
3478 #endif // V8_TARGET_ARCH_X64 3488 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/disasm-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698