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

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

Issue 652041: IA32: Native access to TranscendentalCache for sin/cos. (Closed)
Patch Set: Updated to head. Removed dead code. Ignore first patch. Created 10 years, 10 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
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 3610 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 ASSERT_EQ(args->length(), 1); 3621 ASSERT_EQ(args->length(), 1);
3622 3622
3623 // Load the argument on the stack and jump to the runtime. 3623 // Load the argument on the stack and jump to the runtime.
3624 Load(args->at(0)); 3624 Load(args->at(0));
3625 3625
3626 frame_->CallRuntime(Runtime::kNumberToString, 1); 3626 frame_->CallRuntime(Runtime::kNumberToString, 1);
3627 frame_->EmitPush(r0); 3627 frame_->EmitPush(r0);
3628 } 3628 }
3629 3629
3630 3630
3631 void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) {
3632 ASSERT_EQ(args->length(), 1);
3633 // Load the argument on the stack and jump to the runtime.
3634 Load(args->at(0));
3635 frame_->CallRuntime(Runtime::kMath_sin, 1);
3636 frame_->EmitPush(r0);
3637 }
3638
3639
3640 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) {
3641 ASSERT_EQ(args->length(), 1);
3642 // Load the argument on the stack and jump to the runtime.
3643 Load(args->at(0));
3644 frame_->CallRuntime(Runtime::kMath_cos, 1);
3645 frame_->EmitPush(r0);
3646 }
3647
3648
3631 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) { 3649 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) {
3632 VirtualFrame::SpilledScope spilled_scope; 3650 VirtualFrame::SpilledScope spilled_scope;
3633 ASSERT(args->length() == 2); 3651 ASSERT(args->length() == 2);
3634 3652
3635 // Load the two objects into registers and perform the comparison. 3653 // Load the two objects into registers and perform the comparison.
3636 LoadAndSpill(args->at(0)); 3654 LoadAndSpill(args->at(0));
3637 LoadAndSpill(args->at(1)); 3655 LoadAndSpill(args->at(1));
3638 frame_->EmitPop(r0); 3656 frame_->EmitPop(r0);
3639 frame_->EmitPop(r1); 3657 frame_->EmitPop(r1);
3640 __ cmp(r0, Operand(r1)); 3658 __ cmp(r0, Operand(r1));
(...skipping 3998 matching lines...) Expand 10 before | Expand all | Expand 10 after
7639 7657
7640 // Just jump to runtime to add the two strings. 7658 // Just jump to runtime to add the two strings.
7641 __ bind(&string_add_runtime); 7659 __ bind(&string_add_runtime);
7642 __ TailCallRuntime(ExternalReference(Runtime::kStringAdd), 2, 1); 7660 __ TailCallRuntime(ExternalReference(Runtime::kStringAdd), 2, 1);
7643 } 7661 }
7644 7662
7645 7663
7646 #undef __ 7664 #undef __
7647 7665
7648 } } // namespace v8::internal 7666 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.h ('k') | src/assembler.h » ('j') | src/ia32/codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698