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

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

Issue 125122: Two small fixes for the Math.sin and Math.cos optimizations. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 months 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 | « no previous file | src/ia32/codegen-ia32.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 3398 matching lines...) Expand 10 before | Expand all | Expand 10 after
3409 VirtualFrame::SpilledScope spilled_scope; 3409 VirtualFrame::SpilledScope spilled_scope;
3410 ASSERT(args->length() == 0); 3410 ASSERT(args->length() == 0);
3411 __ Call(ExternalReference::random_positive_smi_function().address(), 3411 __ Call(ExternalReference::random_positive_smi_function().address(),
3412 RelocInfo::RUNTIME_ENTRY); 3412 RelocInfo::RUNTIME_ENTRY);
3413 frame_->EmitPush(r0); 3413 frame_->EmitPush(r0);
3414 } 3414 }
3415 3415
3416 3416
3417 void CodeGenerator::GenerateFastMathOp(MathOp op, ZoneList<Expression*>* args) { 3417 void CodeGenerator::GenerateFastMathOp(MathOp op, ZoneList<Expression*>* args) {
3418 VirtualFrame::SpilledScope spilled_scope; 3418 VirtualFrame::SpilledScope spilled_scope;
3419 Load(args->at(0)); 3419 LoadAndSpill(args->at(0));
3420 switch (op) { 3420 switch (op) {
3421 case SIN: 3421 case SIN:
3422 __ CallRuntime(Runtime::kMath_sin, 1); 3422 __ CallRuntime(Runtime::kMath_sin, 1);
3423 break; 3423 break;
3424 case COS: 3424 case COS:
3425 __ CallRuntime(Runtime::kMath_cos, 1); 3425 __ CallRuntime(Runtime::kMath_cos, 1);
3426 break; 3426 break;
3427 } 3427 }
3428 frame_->EmitPush(r0); 3428 frame_->EmitPush(r0);
3429 } 3429 }
(...skipping 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after
5677 __ mov(r2, Operand(0)); 5677 __ mov(r2, Operand(0));
5678 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); 5678 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION);
5679 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)), 5679 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)),
5680 RelocInfo::CODE_TARGET); 5680 RelocInfo::CODE_TARGET);
5681 } 5681 }
5682 5682
5683 5683
5684 #undef __ 5684 #undef __
5685 5685
5686 } } // namespace v8::internal 5686 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698