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

Side by Side Diff: src/arm/full-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.cc ('k') | src/ia32/assembler-ia32.h » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after
2610 2610
2611 void FullCodeGenerator::EmitMathSqrt(ZoneList<Expression*>* args) { 2611 void FullCodeGenerator::EmitMathSqrt(ZoneList<Expression*>* args) {
2612 // Load the argument on the stack and call the runtime function. 2612 // Load the argument on the stack and call the runtime function.
2613 ASSERT(args->length() == 1); 2613 ASSERT(args->length() == 1);
2614 VisitForStackValue(args->at(0)); 2614 VisitForStackValue(args->at(0));
2615 __ CallRuntime(Runtime::kMath_sqrt, 1); 2615 __ CallRuntime(Runtime::kMath_sqrt, 1);
2616 context()->Plug(r0); 2616 context()->Plug(r0);
2617 } 2617 }
2618 2618
2619 2619
2620 void FullCodeGenerator::EmitMathLog(ZoneList<Expression*>* args) {
2621 // Load the argument on the stack and call the runtime function.
2622 ASSERT(args->length() == 1);
2623 VisitForStackValue(args->at(0));
2624 __ CallRuntime(Runtime::kMath_log, 1);
2625 context()->Plug(r0);
2626 }
2627
2628
2620 void FullCodeGenerator::EmitCallFunction(ZoneList<Expression*>* args) { 2629 void FullCodeGenerator::EmitCallFunction(ZoneList<Expression*>* args) {
2621 ASSERT(args->length() >= 2); 2630 ASSERT(args->length() >= 2);
2622 2631
2623 int arg_count = args->length() - 2; // For receiver and function. 2632 int arg_count = args->length() - 2; // For receiver and function.
2624 VisitForStackValue(args->at(0)); // Receiver. 2633 VisitForStackValue(args->at(0)); // Receiver.
2625 for (int i = 0; i < arg_count; i++) { 2634 for (int i = 0; i < arg_count; i++) {
2626 VisitForStackValue(args->at(i + 1)); 2635 VisitForStackValue(args->at(i + 1));
2627 } 2636 }
2628 VisitForAccumulatorValue(args->at(arg_count + 1)); // Function. 2637 VisitForAccumulatorValue(args->at(arg_count + 1)); // Function.
2629 2638
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
3438 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3447 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3439 __ add(pc, r1, Operand(masm_->CodeObject())); 3448 __ add(pc, r1, Operand(masm_->CodeObject()));
3440 } 3449 }
3441 3450
3442 3451
3443 #undef __ 3452 #undef __
3444 3453
3445 } } // namespace v8::internal 3454 } } // namespace v8::internal
3446 3455
3447 #endif // V8_TARGET_ARCH_ARM 3456 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698