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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
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 3832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3843 return summary; | 3843 return summary; |
3844 } | 3844 } |
3845 | 3845 |
3846 | 3846 |
3847 void Float32x4ToFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3847 void Float32x4ToFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
3848 XmmRegister value = locs()->out().fpu_reg(); | 3848 XmmRegister value = locs()->out().fpu_reg(); |
3849 __ cvtps2pd(value, value); | 3849 __ cvtps2pd(value, value); |
3850 } | 3850 } |
3851 | 3851 |
3852 | 3852 |
| 3853 LocationSummary* Float64x2ZeroArgInstr::MakeLocationSummary(bool opt) const { |
| 3854 const intptr_t kNumInputs = 1; |
| 3855 const intptr_t kNumTemps = 0; |
| 3856 LocationSummary* summary = |
| 3857 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3858 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3859 if (representation() == kTagged) { |
| 3860 ASSERT(op_kind() == MethodRecognizer::kFloat64x2GetSignMask); |
| 3861 summary->set_out(Location::RequiresRegister()); |
| 3862 } else { |
| 3863 ASSERT(representation() == kUnboxedFloat64x2); |
| 3864 summary->set_out(Location::SameAsFirstInput()); |
| 3865 } |
| 3866 return summary; |
| 3867 } |
| 3868 |
| 3869 |
| 3870 void Float64x2ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3871 XmmRegister left = locs()->in(0).fpu_reg(); |
| 3872 |
| 3873 ASSERT((op_kind() == MethodRecognizer::kFloat64x2GetSignMask) || |
| 3874 (locs()->out().fpu_reg() == left)); |
| 3875 |
| 3876 switch (op_kind()) { |
| 3877 case MethodRecognizer::kFloat64x2Negate: |
| 3878 __ negatepd(left); |
| 3879 break; |
| 3880 case MethodRecognizer::kFloat64x2Abs: |
| 3881 __ abspd(left); |
| 3882 break; |
| 3883 case MethodRecognizer::kFloat64x2Sqrt: |
| 3884 __ sqrtpd(left); |
| 3885 break; |
| 3886 case MethodRecognizer::kFloat64x2GetSignMask: |
| 3887 __ movmskpd(locs()->out().reg(), left); |
| 3888 __ SmiTag(locs()->out().reg()); |
| 3889 break; |
| 3890 default: UNREACHABLE(); |
| 3891 } |
| 3892 } |
| 3893 |
| 3894 |
3853 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( | 3895 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( |
3854 bool opt) const { | 3896 bool opt) const { |
3855 const intptr_t kNumInputs = 4; | 3897 const intptr_t kNumInputs = 4; |
3856 const intptr_t kNumTemps = 1; | 3898 const intptr_t kNumTemps = 1; |
3857 LocationSummary* summary = | 3899 LocationSummary* summary = |
3858 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3900 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
3859 summary->set_in(0, Location::RequiresRegister()); | 3901 summary->set_in(0, Location::RequiresRegister()); |
3860 summary->set_in(1, Location::RequiresRegister()); | 3902 summary->set_in(1, Location::RequiresRegister()); |
3861 summary->set_in(2, Location::RequiresRegister()); | 3903 summary->set_in(2, Location::RequiresRegister()); |
3862 summary->set_in(3, Location::RequiresRegister()); | 3904 summary->set_in(3, Location::RequiresRegister()); |
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5238 PcDescriptors::kOther, | 5280 PcDescriptors::kOther, |
5239 locs()); | 5281 locs()); |
5240 __ Drop(ArgumentCount()); // Discard arguments. | 5282 __ Drop(ArgumentCount()); // Discard arguments. |
5241 } | 5283 } |
5242 | 5284 |
5243 } // namespace dart | 5285 } // namespace dart |
5244 | 5286 |
5245 #undef __ | 5287 #undef __ |
5246 | 5288 |
5247 #endif // defined TARGET_ARCH_X64 | 5289 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |