OLD | NEW |
---|---|
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 Loading... | |
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 __ vcmpd(left0, right0); | |
4131 __ vmstat(); | |
4132 __ vmovd(left0, right0, GT); | |
zra
2014/03/10 22:14:08
I double checked the performance guide, and it loo
Cutch
2014/03/10 22:26:45
Done.
| |
4133 __ vcmpd(left1, right1); | |
4134 __ vmstat(); | |
4135 __ vmovd(left1, right1, GT); | |
4136 break; | |
4137 case MethodRecognizer::kFloat64x2Max: | |
4138 __ vcmpd(left0, right0); | |
4139 __ vmstat(); | |
4140 __ vmovd(left0, right0, LT); | |
zra
2014/03/10 22:14:08
Same here.
Cutch
2014/03/10 22:26:45
Done.
| |
4141 __ vcmpd(left1, right1); | |
4142 __ vmstat(); | |
4143 __ vmovd(left1, right1, LT); | |
4144 break; | |
4145 default: UNREACHABLE(); | |
4146 } | |
4147 } | |
4148 | |
4149 | |
4096 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( | 4150 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( |
4097 bool opt) const { | 4151 bool opt) const { |
4098 const intptr_t kNumInputs = 4; | 4152 const intptr_t kNumInputs = 4; |
4099 const intptr_t kNumTemps = 1; | 4153 const intptr_t kNumTemps = 1; |
4100 LocationSummary* summary = | 4154 LocationSummary* summary = |
4101 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4155 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
4102 summary->set_in(0, Location::RequiresRegister()); | 4156 summary->set_in(0, Location::RequiresRegister()); |
4103 summary->set_in(1, Location::RequiresRegister()); | 4157 summary->set_in(1, Location::RequiresRegister()); |
4104 summary->set_in(2, Location::RequiresRegister()); | 4158 summary->set_in(2, Location::RequiresRegister()); |
4105 summary->set_in(3, Location::RequiresRegister()); | 4159 summary->set_in(3, Location::RequiresRegister()); |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5280 compiler->GenerateCall(token_pos(), | 5334 compiler->GenerateCall(token_pos(), |
5281 &label, | 5335 &label, |
5282 PcDescriptors::kOther, | 5336 PcDescriptors::kOther, |
5283 locs()); | 5337 locs()); |
5284 __ Drop(ArgumentCount()); // Discard arguments. | 5338 __ Drop(ArgumentCount()); // Discard arguments. |
5285 } | 5339 } |
5286 | 5340 |
5287 } // namespace dart | 5341 } // namespace dart |
5288 | 5342 |
5289 #endif // defined TARGET_ARCH_ARM | 5343 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |