| 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 3012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3023 __ vmovs(sresult1, svalues[(mask_ >> 2) & 0x3]); | 3023 __ vmovs(sresult1, svalues[(mask_ >> 2) & 0x3]); |
| 3024 __ vmovs(sresult2, svalues[(mask_ >> 4) & 0x3]); | 3024 __ vmovs(sresult2, svalues[(mask_ >> 4) & 0x3]); |
| 3025 __ vmovs(sresult3, svalues[(mask_ >> 6) & 0x3]); | 3025 __ vmovs(sresult3, svalues[(mask_ >> 6) & 0x3]); |
| 3026 } | 3026 } |
| 3027 break; | 3027 break; |
| 3028 default: UNREACHABLE(); | 3028 default: UNREACHABLE(); |
| 3029 } | 3029 } |
| 3030 } | 3030 } |
| 3031 | 3031 |
| 3032 | 3032 |
| 3033 LocationSummary* Float32x4GetSignMaskInstr::MakeLocationSummary() const { |
| 3034 const intptr_t kNumInputs = 1; |
| 3035 const intptr_t kNumTemps = 1; |
| 3036 LocationSummary* summary = |
| 3037 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3038 summary->set_in(0, Location::FpuRegisterLocation(Q5)); |
| 3039 summary->set_temp(0, Location::RequiresRegister()); |
| 3040 summary->set_out(Location::RequiresRegister()); |
| 3041 return summary; |
| 3042 } |
| 3043 |
| 3044 |
| 3045 void Float32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3046 QRegister value = locs()->in(0).fpu_reg(); |
| 3047 DRegister dvalue0 = EvenDRegisterOf(value); |
| 3048 DRegister dvalue1 = OddDRegisterOf(value); |
| 3049 |
| 3050 Register out = locs()->out().reg(); |
| 3051 Register temp = locs()->temp(0).reg(); |
| 3052 |
| 3053 // X lane. |
| 3054 __ vmovrs(out, EvenSRegisterOf(dvalue0)); |
| 3055 __ Lsr(out, out, 31); |
| 3056 // Y lane. |
| 3057 __ vmovrs(temp, OddSRegisterOf(dvalue0)); |
| 3058 __ Lsr(temp, temp, 31); |
| 3059 __ orr(out, out, ShifterOperand(temp, LSL, 1)); |
| 3060 // Z lane. |
| 3061 __ vmovrs(temp, EvenSRegisterOf(dvalue1)); |
| 3062 __ Lsr(temp, temp, 31); |
| 3063 __ orr(out, out, ShifterOperand(temp, LSL, 2)); |
| 3064 // W lane. |
| 3065 __ vmovrs(temp, OddSRegisterOf(dvalue1)); |
| 3066 __ Lsr(temp, temp, 31); |
| 3067 __ orr(out, out, ShifterOperand(temp, LSL, 3)); |
| 3068 // Tag. |
| 3069 __ SmiTag(out); |
| 3070 } |
| 3071 |
| 3072 |
| 3033 LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary() const { | 3073 LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary() const { |
| 3034 const intptr_t kNumInputs = 4; | 3074 const intptr_t kNumInputs = 4; |
| 3035 const intptr_t kNumTemps = 0; | 3075 const intptr_t kNumTemps = 0; |
| 3036 LocationSummary* summary = | 3076 LocationSummary* summary = |
| 3037 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3077 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3038 summary->set_in(0, Location::RequiresFpuRegister()); | 3078 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3039 summary->set_in(1, Location::RequiresFpuRegister()); | 3079 summary->set_in(1, Location::RequiresFpuRegister()); |
| 3040 summary->set_in(2, Location::RequiresFpuRegister()); | 3080 summary->set_in(2, Location::RequiresFpuRegister()); |
| 3041 summary->set_in(3, Location::RequiresFpuRegister()); | 3081 summary->set_in(3, Location::RequiresFpuRegister()); |
| 3042 // Low (< 7) Q registers are needed for the vcvtsd instruction. | 3082 // Low (< 7) Q registers are needed for the vcvtsd instruction. |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3490 break; | 3530 break; |
| 3491 default: UNREACHABLE(); | 3531 default: UNREACHABLE(); |
| 3492 } | 3532 } |
| 3493 | 3533 |
| 3494 __ tst(result, ShifterOperand(result)); | 3534 __ tst(result, ShifterOperand(result)); |
| 3495 __ LoadObject(result, Bool::True(), NE); | 3535 __ LoadObject(result, Bool::True(), NE); |
| 3496 __ LoadObject(result, Bool::False(), EQ); | 3536 __ LoadObject(result, Bool::False(), EQ); |
| 3497 } | 3537 } |
| 3498 | 3538 |
| 3499 | 3539 |
| 3540 LocationSummary* Uint32x4GetSignMaskInstr::MakeLocationSummary() const { |
| 3541 const intptr_t kNumInputs = 1; |
| 3542 const intptr_t kNumTemps = 1; |
| 3543 LocationSummary* summary = |
| 3544 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3545 summary->set_in(0, Location::FpuRegisterLocation(Q5)); |
| 3546 summary->set_temp(0, Location::RequiresRegister()); |
| 3547 summary->set_out(Location::RequiresRegister()); |
| 3548 return summary; |
| 3549 } |
| 3550 |
| 3551 |
| 3552 void Uint32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3553 QRegister value = locs()->in(0).fpu_reg(); |
| 3554 DRegister dvalue0 = EvenDRegisterOf(value); |
| 3555 DRegister dvalue1 = OddDRegisterOf(value); |
| 3556 |
| 3557 Register out = locs()->out().reg(); |
| 3558 Register temp = locs()->temp(0).reg(); |
| 3559 |
| 3560 // X lane. |
| 3561 __ vmovrs(out, EvenSRegisterOf(dvalue0)); |
| 3562 __ Lsr(out, out, 31); |
| 3563 // Y lane. |
| 3564 __ vmovrs(temp, OddSRegisterOf(dvalue0)); |
| 3565 __ Lsr(temp, temp, 31); |
| 3566 __ orr(out, out, ShifterOperand(temp, LSL, 1)); |
| 3567 // Z lane. |
| 3568 __ vmovrs(temp, EvenSRegisterOf(dvalue1)); |
| 3569 __ Lsr(temp, temp, 31); |
| 3570 __ orr(out, out, ShifterOperand(temp, LSL, 2)); |
| 3571 // W lane. |
| 3572 __ vmovrs(temp, OddSRegisterOf(dvalue1)); |
| 3573 __ Lsr(temp, temp, 31); |
| 3574 __ orr(out, out, ShifterOperand(temp, LSL, 3)); |
| 3575 // Tag. |
| 3576 __ SmiTag(out); |
| 3577 } |
| 3578 |
| 3579 |
| 3500 LocationSummary* Uint32x4SelectInstr::MakeLocationSummary() const { | 3580 LocationSummary* Uint32x4SelectInstr::MakeLocationSummary() const { |
| 3501 const intptr_t kNumInputs = 3; | 3581 const intptr_t kNumInputs = 3; |
| 3502 const intptr_t kNumTemps = 1; | 3582 const intptr_t kNumTemps = 1; |
| 3503 LocationSummary* summary = | 3583 LocationSummary* summary = |
| 3504 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3584 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3505 summary->set_in(0, Location::RequiresFpuRegister()); | 3585 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3506 summary->set_in(1, Location::RequiresFpuRegister()); | 3586 summary->set_in(1, Location::RequiresFpuRegister()); |
| 3507 summary->set_in(2, Location::RequiresFpuRegister()); | 3587 summary->set_in(2, Location::RequiresFpuRegister()); |
| 3508 summary->set_temp(0, Location::RequiresFpuRegister()); | 3588 summary->set_temp(0, Location::RequiresFpuRegister()); |
| 3509 summary->set_out(Location::RequiresFpuRegister()); | 3589 summary->set_out(Location::RequiresFpuRegister()); |
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4452 compiler->GenerateCall(token_pos(), | 4532 compiler->GenerateCall(token_pos(), |
| 4453 &label, | 4533 &label, |
| 4454 PcDescriptors::kOther, | 4534 PcDescriptors::kOther, |
| 4455 locs()); | 4535 locs()); |
| 4456 __ Drop(2); // Discard type arguments and receiver. | 4536 __ Drop(2); // Discard type arguments and receiver. |
| 4457 } | 4537 } |
| 4458 | 4538 |
| 4459 } // namespace dart | 4539 } // namespace dart |
| 4460 | 4540 |
| 4461 #endif // defined TARGET_ARCH_ARM | 4541 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |