| 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* Simd32x4GetSignMaskInstr::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 Simd32x4GetSignMaskInstr::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 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4452 compiler->GenerateCall(token_pos(), | 4492 compiler->GenerateCall(token_pos(), |
| 4453 &label, | 4493 &label, |
| 4454 PcDescriptors::kOther, | 4494 PcDescriptors::kOther, |
| 4455 locs()); | 4495 locs()); |
| 4456 __ Drop(2); // Discard type arguments and receiver. | 4496 __ Drop(2); // Discard type arguments and receiver. |
| 4457 } | 4497 } |
| 4458 | 4498 |
| 4459 } // namespace dart | 4499 } // namespace dart |
| 4460 | 4500 |
| 4461 #endif // defined TARGET_ARCH_ARM | 4501 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |