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

Side by Side Diff: runtime/vm/intermediate_language_mips.cc

Issue 22266005: Inline fsin/fcos. Huge speedup on Box2D. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 3056 matching lines...) Expand 10 before | Expand all | Expand 10 after
3067 UNIMPLEMENTED(); 3067 UNIMPLEMENTED();
3068 return NULL; 3068 return NULL;
3069 } 3069 }
3070 3070
3071 3071
3072 void BinaryUint32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3072 void BinaryUint32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3073 UNIMPLEMENTED(); 3073 UNIMPLEMENTED();
3074 } 3074 }
3075 3075
3076 3076
3077 LocationSummary* MathSqrtInstr::MakeLocationSummary() const { 3077 LocationSummary* MathUnaryInstr::MakeLocationSummary() const {
3078 const intptr_t kNumInputs = 1; 3078 const intptr_t kNumInputs = 1;
3079 const intptr_t kNumTemps = 0; 3079 const intptr_t kNumTemps = 0;
3080 LocationSummary* summary = 3080 LocationSummary* summary =
3081 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 3081 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3082 summary->set_in(0, Location::RequiresFpuRegister()); 3082 summary->set_in(0, Location::RequiresFpuRegister());
3083 summary->set_out(Location::RequiresFpuRegister()); 3083 summary->set_out(Location::RequiresFpuRegister());
3084 return summary; 3084 return summary;
3085 } 3085 }
3086 3086
3087 3087
3088 void MathSqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3088 void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3089 __ sqrtd(locs()->out().fpu_reg(), locs()->in(0).fpu_reg()); 3089 if (kind() == MethodRecognizer::kMathSqrt) {
3090 __ sqrtd(locs()->out().fpu_reg(), locs()->in(0).fpu_reg());
3091 } else {
3092 UNIMPLEMENTED();
3093 }
3090 } 3094 }
3091 3095
3092 3096
3093 LocationSummary* MathMinMaxInstr::MakeLocationSummary() const { 3097 LocationSummary* MathMinMaxInstr::MakeLocationSummary() const {
3094 if (result_cid() == kDoubleCid) { 3098 if (result_cid() == kDoubleCid) {
3095 const intptr_t kNumInputs = 2; 3099 const intptr_t kNumInputs = 2;
3096 const intptr_t kNumTemps = 1; 3100 const intptr_t kNumTemps = 1;
3097 LocationSummary* summary = 3101 LocationSummary* summary =
3098 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 3102 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
3099 summary->set_in(0, Location::RequiresFpuRegister()); 3103 summary->set_in(0, Location::RequiresFpuRegister());
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
3868 compiler->GenerateCall(token_pos(), 3872 compiler->GenerateCall(token_pos(),
3869 &label, 3873 &label,
3870 PcDescriptors::kOther, 3874 PcDescriptors::kOther,
3871 locs()); 3875 locs());
3872 __ Drop(2); // Discard type arguments and receiver. 3876 __ Drop(2); // Discard type arguments and receiver.
3873 } 3877 }
3874 3878
3875 } // namespace dart 3879 } // namespace dart
3876 3880
3877 #endif // defined TARGET_ARCH_MIPS 3881 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698