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 4008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4019 DRegister dr0 = EvenDRegisterOf(r); | 4019 DRegister dr0 = EvenDRegisterOf(r); |
4020 DRegister dr1 = OddDRegisterOf(r); | 4020 DRegister dr1 = OddDRegisterOf(r); |
4021 | 4021 |
4022 // Set X. | 4022 // Set X. |
4023 __ vcvtds(dr0, EvenSRegisterOf(dq0)); | 4023 __ vcvtds(dr0, EvenSRegisterOf(dq0)); |
4024 // Set Y. | 4024 // Set Y. |
4025 __ vcvtds(dr1, OddSRegisterOf(dq0)); | 4025 __ vcvtds(dr1, OddSRegisterOf(dq0)); |
4026 } | 4026 } |
4027 | 4027 |
4028 | 4028 |
4029 LocationSummary* Float64x2ZeroArgInstr::MakeLocationSummary(bool opt) const { | |
4030 const intptr_t kNumInputs = 1; | |
4031 const intptr_t kNumTemps = 0; | |
4032 LocationSummary* summary = | |
4033 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | |
4034 summary->set_in(0, Location::RequiresFpuRegister()); | |
zra
2014/03/10 20:43:38
Location::RequiresFpuRegister(Q6) if op_kind() ==
Cutch
2014/03/10 20:52:47
Done.
| |
4035 if (representation() == kTagged) { | |
4036 ASSERT(op_kind() == MethodRecognizer::kFloat64x2GetSignMask); | |
4037 summary->set_out(Location::RequiresRegister()); | |
4038 summary->AddTemp(Location::RequiresRegister()); | |
4039 } else { | |
4040 summary->set_out(Location::RequiresFpuRegister()); | |
4041 } | |
4042 return summary; | |
4043 } | |
4044 | |
4045 | |
4046 void Float64x2ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | |
4047 QRegister q = locs()->in(0).fpu_reg(); | |
4048 | |
4049 if ((op_kind() == MethodRecognizer::kFloat64x2GetSignMask)) { | |
4050 DRegister dvalue0 = EvenDRegisterOf(q); | |
4051 DRegister dvalue1 = OddDRegisterOf(q); | |
4052 | |
4053 Register out = locs()->out().reg(); | |
4054 Register temp = locs()->temp(0).reg(); | |
4055 | |
4056 // Upper 32-bits of X lane. | |
4057 __ vmovrs(out, OddSRegisterOf(dvalue0)); | |
zra
2014/03/10 20:43:38
Grabbing the S components means we need a low-numb
Cutch
2014/03/10 20:52:47
Done.
| |
4058 __ Lsr(out, out, 31); | |
4059 // Upper 32-bits of Y lane. | |
4060 __ vmovrs(temp, OddSRegisterOf(dvalue1)); | |
4061 __ Lsr(temp, temp, 31); | |
4062 __ orr(out, out, ShifterOperand(temp, LSL, 1)); | |
4063 // Tag. | |
4064 __ SmiTag(out); | |
4065 return; | |
4066 } | |
4067 ASSERT(representation() == kUnboxedFloat64x2); | |
4068 QRegister r = locs()->out().fpu_reg(); | |
4069 | |
4070 DRegister dvalue0 = EvenDRegisterOf(q); | |
4071 DRegister dvalue1 = OddDRegisterOf(q); | |
4072 DRegister dresult0 = EvenDRegisterOf(r); | |
4073 DRegister dresult1 = OddDRegisterOf(r); | |
4074 | |
4075 switch (op_kind()) { | |
4076 case MethodRecognizer::kFloat64x2Negate: | |
4077 __ vnegd(dresult0, dvalue0); | |
4078 __ vnegd(dresult1, dvalue1); | |
4079 break; | |
4080 case MethodRecognizer::kFloat64x2Abs: | |
4081 __ vabsd(dresult0, dvalue0); | |
4082 __ vabsd(dresult1, dvalue1); | |
4083 break; | |
4084 case MethodRecognizer::kFloat64x2Sqrt: | |
4085 __ vsqrtd(dresult0, dvalue0); | |
4086 __ vsqrtd(dresult1, dvalue1); | |
4087 break; | |
4088 default: UNREACHABLE(); | |
4089 } | |
4090 } | |
4091 | |
4092 | |
4029 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( | 4093 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( |
4030 bool opt) const { | 4094 bool opt) const { |
4031 const intptr_t kNumInputs = 4; | 4095 const intptr_t kNumInputs = 4; |
4032 const intptr_t kNumTemps = 1; | 4096 const intptr_t kNumTemps = 1; |
4033 LocationSummary* summary = | 4097 LocationSummary* summary = |
4034 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4098 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
4035 summary->set_in(0, Location::RequiresRegister()); | 4099 summary->set_in(0, Location::RequiresRegister()); |
4036 summary->set_in(1, Location::RequiresRegister()); | 4100 summary->set_in(1, Location::RequiresRegister()); |
4037 summary->set_in(2, Location::RequiresRegister()); | 4101 summary->set_in(2, Location::RequiresRegister()); |
4038 summary->set_in(3, Location::RequiresRegister()); | 4102 summary->set_in(3, Location::RequiresRegister()); |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5213 compiler->GenerateCall(token_pos(), | 5277 compiler->GenerateCall(token_pos(), |
5214 &label, | 5278 &label, |
5215 PcDescriptors::kOther, | 5279 PcDescriptors::kOther, |
5216 locs()); | 5280 locs()); |
5217 __ Drop(ArgumentCount()); // Discard arguments. | 5281 __ Drop(ArgumentCount()); // Discard arguments. |
5218 } | 5282 } |
5219 | 5283 |
5220 } // namespace dart | 5284 } // namespace dart |
5221 | 5285 |
5222 #endif // defined TARGET_ARCH_ARM | 5286 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |