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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
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 3968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3979 return summary; | 3979 return summary; |
3980 } | 3980 } |
3981 | 3981 |
3982 | 3982 |
3983 void Float32x4ToFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3983 void Float32x4ToFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
3984 XmmRegister value = locs()->out().fpu_reg(); | 3984 XmmRegister value = locs()->out().fpu_reg(); |
3985 __ cvtps2pd(value, value); | 3985 __ cvtps2pd(value, value); |
3986 } | 3986 } |
3987 | 3987 |
3988 | 3988 |
| 3989 LocationSummary* Float64x2ZeroArgInstr::MakeLocationSummary(bool opt) const { |
| 3990 const intptr_t kNumInputs = 1; |
| 3991 const intptr_t kNumTemps = 0; |
| 3992 LocationSummary* summary = |
| 3993 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 3994 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3995 if (representation() == kTagged) { |
| 3996 ASSERT(op_kind() == MethodRecognizer::kFloat64x2GetSignMask); |
| 3997 summary->set_out(Location::RequiresRegister()); |
| 3998 } else { |
| 3999 ASSERT(representation() == kUnboxedFloat64x2); |
| 4000 summary->set_out(Location::SameAsFirstInput()); |
| 4001 } |
| 4002 return summary; |
| 4003 } |
| 4004 |
| 4005 |
| 4006 void Float64x2ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4007 XmmRegister left = locs()->in(0).fpu_reg(); |
| 4008 |
| 4009 ASSERT((op_kind() == MethodRecognizer::kFloat64x2GetSignMask) || |
| 4010 (locs()->out().fpu_reg() == left)); |
| 4011 |
| 4012 switch (op_kind()) { |
| 4013 case MethodRecognizer::kFloat64x2Negate: |
| 4014 __ negatepd(left); |
| 4015 break; |
| 4016 case MethodRecognizer::kFloat64x2Abs: |
| 4017 __ abspd(left); |
| 4018 break; |
| 4019 case MethodRecognizer::kFloat64x2Sqrt: |
| 4020 __ sqrtpd(left); |
| 4021 break; |
| 4022 case MethodRecognizer::kFloat64x2GetSignMask: |
| 4023 __ movmskpd(locs()->out().reg(), left); |
| 4024 __ SmiTag(locs()->out().reg()); |
| 4025 break; |
| 4026 default: UNREACHABLE(); |
| 4027 } |
| 4028 } |
| 4029 |
| 4030 |
3989 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( | 4031 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( |
3990 bool opt) const { | 4032 bool opt) const { |
3991 const intptr_t kNumInputs = 4; | 4033 const intptr_t kNumInputs = 4; |
3992 const intptr_t kNumTemps = 0; | 4034 const intptr_t kNumTemps = 0; |
3993 LocationSummary* summary = | 4035 LocationSummary* summary = |
3994 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4036 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
3995 summary->set_in(0, Location::RequiresRegister()); | 4037 summary->set_in(0, Location::RequiresRegister()); |
3996 summary->set_in(1, Location::RequiresRegister()); | 4038 summary->set_in(1, Location::RequiresRegister()); |
3997 summary->set_in(2, Location::RequiresRegister()); | 4039 summary->set_in(2, Location::RequiresRegister()); |
3998 summary->set_in(3, Location::RequiresRegister()); | 4040 summary->set_in(3, Location::RequiresRegister()); |
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5638 PcDescriptors::kOther, | 5680 PcDescriptors::kOther, |
5639 locs()); | 5681 locs()); |
5640 __ Drop(ArgumentCount()); // Discard arguments. | 5682 __ Drop(ArgumentCount()); // Discard arguments. |
5641 } | 5683 } |
5642 | 5684 |
5643 } // namespace dart | 5685 } // namespace dart |
5644 | 5686 |
5645 #undef __ | 5687 #undef __ |
5646 | 5688 |
5647 #endif // defined TARGET_ARCH_IA32 | 5689 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |