| 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 "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 3324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3335 QRegister value = locs()->in(0).fpu_reg(); | 3335 QRegister value = locs()->in(0).fpu_reg(); |
| 3336 QRegister result = locs()->out().fpu_reg(); | 3336 QRegister result = locs()->out().fpu_reg(); |
| 3337 | 3337 |
| 3338 if (value != result) { | 3338 if (value != result) { |
| 3339 __ vmovq(result, value); | 3339 __ vmovq(result, value); |
| 3340 } | 3340 } |
| 3341 } | 3341 } |
| 3342 | 3342 |
| 3343 | 3343 |
| 3344 LocationSummary* Float32x4TwoArgShuffleInstr::MakeLocationSummary() const { | 3344 LocationSummary* Float32x4TwoArgShuffleInstr::MakeLocationSummary() const { |
| 3345 UNIMPLEMENTED(); | 3345 const intptr_t kNumInputs = 2; |
| 3346 return NULL; | 3346 const intptr_t kNumTemps = 0; |
| 3347 LocationSummary* summary = |
| 3348 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3349 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3350 summary->set_in(1, Location::RequiresFpuRegister()); |
| 3351 summary->set_out(Location::SameAsFirstInput()); |
| 3352 return summary; |
| 3347 } | 3353 } |
| 3348 | 3354 |
| 3349 | 3355 |
| 3350 void Float32x4TwoArgShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3356 void Float32x4TwoArgShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3351 UNIMPLEMENTED(); | 3357 QRegister left = locs()->in(0).fpu_reg(); |
| 3358 QRegister right = locs()->in(1).fpu_reg(); |
| 3359 QRegister result = locs()->out().fpu_reg(); |
| 3360 |
| 3361 ASSERT(result == left); |
| 3362 |
| 3363 DRegister dleft0 = EvenDRegisterOf(left); |
| 3364 DRegister dleft1 = OddDRegisterOf(left); |
| 3365 DRegister dright0 = EvenDRegisterOf(right); |
| 3366 DRegister dright1 = OddDRegisterOf(right); |
| 3367 |
| 3368 switch (op_kind()) { |
| 3369 case MethodRecognizer::kFloat32x4WithZWInXY: |
| 3370 __ vmovd(dleft0, dright1); |
| 3371 break; |
| 3372 case MethodRecognizer::kFloat32x4InterleaveXY: |
| 3373 __ vmovq(QTMP, right); |
| 3374 __ vzipqw(left, QTMP); |
| 3375 break; |
| 3376 case MethodRecognizer::kFloat32x4InterleaveZW: |
| 3377 __ vmovq(QTMP, right); |
| 3378 __ vzipqw(left, QTMP); |
| 3379 __ vmovq(left, QTMP); |
| 3380 break; |
| 3381 case MethodRecognizer::kFloat32x4InterleaveXYPairs: |
| 3382 __ vmovd(dleft1, dright0); |
| 3383 break; |
| 3384 case MethodRecognizer::kFloat32x4InterleaveZWPairs: |
| 3385 __ vmovq(QTMP, right); |
| 3386 __ vmovd(EvenDRegisterOf(QTMP), dleft1); |
| 3387 __ vmovq(result, QTMP); |
| 3388 break; |
| 3389 default: UNREACHABLE(); |
| 3390 } |
| 3352 } | 3391 } |
| 3353 | 3392 |
| 3354 | 3393 |
| 3355 LocationSummary* Uint32x4BoolConstructorInstr::MakeLocationSummary() const { | 3394 LocationSummary* Uint32x4BoolConstructorInstr::MakeLocationSummary() const { |
| 3356 const intptr_t kNumInputs = 4; | 3395 const intptr_t kNumInputs = 4; |
| 3357 const intptr_t kNumTemps = 1; | 3396 const intptr_t kNumTemps = 1; |
| 3358 LocationSummary* summary = | 3397 LocationSummary* summary = |
| 3359 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3398 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3360 summary->set_in(0, Location::RequiresRegister()); | 3399 summary->set_in(0, Location::RequiresRegister()); |
| 3361 summary->set_in(1, Location::RequiresRegister()); | 3400 summary->set_in(1, Location::RequiresRegister()); |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4378 compiler->GenerateCall(token_pos(), | 4417 compiler->GenerateCall(token_pos(), |
| 4379 &label, | 4418 &label, |
| 4380 PcDescriptors::kOther, | 4419 PcDescriptors::kOther, |
| 4381 locs()); | 4420 locs()); |
| 4382 __ Drop(2); // Discard type arguments and receiver. | 4421 __ Drop(2); // Discard type arguments and receiver. |
| 4383 } | 4422 } |
| 4384 | 4423 |
| 4385 } // namespace dart | 4424 } // namespace dart |
| 4386 | 4425 |
| 4387 #endif // defined TARGET_ARCH_ARM | 4426 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |