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

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

Issue 193183003: Inline Float64x2 methods that take 1 argument (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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.h ('k') | runtime/vm/intermediate_language_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 (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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 4075 matching lines...) Expand 10 before | Expand all | Expand 10 after
4086 break; 4086 break;
4087 case MethodRecognizer::kFloat64x2Sqrt: 4087 case MethodRecognizer::kFloat64x2Sqrt:
4088 __ vsqrtd(dresult0, dvalue0); 4088 __ vsqrtd(dresult0, dvalue0);
4089 __ vsqrtd(dresult1, dvalue1); 4089 __ vsqrtd(dresult1, dvalue1);
4090 break; 4090 break;
4091 default: UNREACHABLE(); 4091 default: UNREACHABLE();
4092 } 4092 }
4093 } 4093 }
4094 4094
4095 4095
4096 LocationSummary* Float64x2OneArgInstr::MakeLocationSummary(bool opt) const {
4097 const intptr_t kNumInputs = 2;
4098 const intptr_t kNumTemps = 0;
4099 LocationSummary* summary =
4100 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
4101 summary->set_in(0, Location::RequiresFpuRegister());
4102 summary->set_in(1, Location::RequiresFpuRegister());
4103 summary->set_out(Location::SameAsFirstInput());
4104 return summary;
4105 }
4106
4107
4108 void Float64x2OneArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4109 QRegister left = locs()->in(0).fpu_reg();
4110 DRegister left0 = EvenDRegisterOf(left);
4111 DRegister left1 = OddDRegisterOf(left);
4112 QRegister right = locs()->in(1).fpu_reg();
4113 DRegister right0 = EvenDRegisterOf(right);
4114 DRegister right1 = OddDRegisterOf(right);
4115 QRegister out = locs()->out().fpu_reg();
4116 ASSERT(left == out);
4117
4118 switch (op_kind()) {
4119 case MethodRecognizer::kFloat64x2Scale:
4120 __ vmuld(left0, left0, right0);
4121 __ vmuld(left1, left1, right0);
4122 break;
4123 case MethodRecognizer::kFloat64x2WithX:
4124 __ vmovd(left0, right0);
4125 break;
4126 case MethodRecognizer::kFloat64x2WithY:
4127 __ vmovd(left1, right0);
4128 break;
4129 case MethodRecognizer::kFloat64x2Min: {
4130 // X lane.
4131 Label l0;
4132 __ vcmpd(left0, right0);
4133 __ vmstat();
4134 __ b(&l0, LT);
4135 __ vmovd(left0, right0);
4136 __ Bind(&l0);
4137 // Y lane.
4138 Label l1;
4139 __ vcmpd(left1, right1);
4140 __ vmstat();
4141 __ b(&l1, LT);
4142 __ vmovd(left1, right1);
4143 __ Bind(&l1);
4144 break;
4145 }
4146 case MethodRecognizer::kFloat64x2Max: {
4147 // X lane.
4148 Label g0;
4149 __ vcmpd(left0, right0);
4150 __ vmstat();
4151 __ b(&g0, GT);
4152 __ vmovd(left0, right0);
4153 __ Bind(&g0);
4154 // Y lane.
4155 Label g1;
4156 __ vcmpd(left1, right1);
4157 __ vmstat();
4158 __ b(&g1, GT);
4159 __ vmovd(left1, right1);
4160 __ Bind(&g1);
4161 break;
4162 }
4163 default: UNREACHABLE();
4164 }
4165 }
4166
4167
4096 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( 4168 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary(
4097 bool opt) const { 4169 bool opt) const {
4098 const intptr_t kNumInputs = 4; 4170 const intptr_t kNumInputs = 4;
4099 const intptr_t kNumTemps = 1; 4171 const intptr_t kNumTemps = 1;
4100 LocationSummary* summary = 4172 LocationSummary* summary =
4101 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 4173 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
4102 summary->set_in(0, Location::RequiresRegister()); 4174 summary->set_in(0, Location::RequiresRegister());
4103 summary->set_in(1, Location::RequiresRegister()); 4175 summary->set_in(1, Location::RequiresRegister());
4104 summary->set_in(2, Location::RequiresRegister()); 4176 summary->set_in(2, Location::RequiresRegister());
4105 summary->set_in(3, Location::RequiresRegister()); 4177 summary->set_in(3, Location::RequiresRegister());
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
5280 compiler->GenerateCall(token_pos(), 5352 compiler->GenerateCall(token_pos(),
5281 &label, 5353 &label,
5282 PcDescriptors::kOther, 5354 PcDescriptors::kOther,
5283 locs()); 5355 locs());
5284 __ Drop(ArgumentCount()); // Discard arguments. 5356 __ Drop(ArgumentCount()); // Discard arguments.
5285 } 5357 }
5286 5358
5287 } // namespace dart 5359 } // namespace dart
5288 5360
5289 #endif // defined TARGET_ARCH_ARM 5361 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698