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

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 8896021: MIPS: Port Math.pow inlining to ARM. (Closed)
Patch Set: Created 9 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
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2940 matching lines...) Expand 10 before | Expand all | Expand 10 after
2951 context()->Plug(v0); 2951 context()->Plug(v0);
2952 } 2952 }
2953 2953
2954 2954
2955 void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { 2955 void FullCodeGenerator::EmitMathPow(CallRuntime* expr) {
2956 // Load the arguments on the stack and call the runtime function. 2956 // Load the arguments on the stack and call the runtime function.
2957 ZoneList<Expression*>* args = expr->arguments(); 2957 ZoneList<Expression*>* args = expr->arguments();
2958 ASSERT(args->length() == 2); 2958 ASSERT(args->length() == 2);
2959 VisitForStackValue(args->at(0)); 2959 VisitForStackValue(args->at(0));
2960 VisitForStackValue(args->at(1)); 2960 VisitForStackValue(args->at(1));
2961 MathPowStub stub(MathPowStub::ON_STACK); 2961 if (CpuFeatures::IsSupported(FPU)) {
2962 __ CallStub(&stub); 2962 MathPowStub stub(MathPowStub::ON_STACK);
2963 __ CallStub(&stub);
2964 } else {
2965 __ CallRuntime(Runtime::kMath_pow, 2);
2966 }
2963 context()->Plug(v0); 2967 context()->Plug(v0);
2964 } 2968 }
2965 2969
2966 2970
2967 void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { 2971 void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) {
2968 ZoneList<Expression*>* args = expr->arguments(); 2972 ZoneList<Expression*>* args = expr->arguments();
2969 ASSERT(args->length() == 2); 2973 ASSERT(args->length() == 2);
2970 2974
2971 VisitForStackValue(args->at(0)); // Load the object. 2975 VisitForStackValue(args->at(0)); // Load the object.
2972 VisitForAccumulatorValue(args->at(1)); // Load the value. 2976 VisitForAccumulatorValue(args->at(1)); // Load the value.
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
4422 *context_length = 0; 4426 *context_length = 0;
4423 return previous_; 4427 return previous_;
4424 } 4428 }
4425 4429
4426 4430
4427 #undef __ 4431 #undef __
4428 4432
4429 } } // namespace v8::internal 4433 } } // namespace v8::internal
4430 4434
4431 #endif // V8_TARGET_ARCH_MIPS 4435 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698