| 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/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 4558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4569 const intptr_t kNumInputs = 1; | 4569 const intptr_t kNumInputs = 1; |
| 4570 const intptr_t kNumTemps = 0; | 4570 const intptr_t kNumTemps = 0; |
| 4571 LocationSummary* summary = new(isolate) LocationSummary( | 4571 LocationSummary* summary = new(isolate) LocationSummary( |
| 4572 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4572 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 4573 | 4573 |
| 4574 if (representation() == kTagged) { | 4574 if (representation() == kTagged) { |
| 4575 ASSERT(op_kind() == MethodRecognizer::kFloat64x2GetSignMask); | 4575 ASSERT(op_kind() == MethodRecognizer::kFloat64x2GetSignMask); |
| 4576 // Grabbing the S components means we need a low (< 7) Q. | 4576 // Grabbing the S components means we need a low (< 7) Q. |
| 4577 summary->set_in(0, Location::FpuRegisterLocation(Q6)); | 4577 summary->set_in(0, Location::FpuRegisterLocation(Q6)); |
| 4578 summary->set_out(0, Location::RequiresRegister()); | 4578 summary->set_out(0, Location::RequiresRegister()); |
| 4579 summary->AddTemp(Location::RequiresRegister()); | |
| 4580 } else { | 4579 } else { |
| 4581 summary->set_in(0, Location::RequiresFpuRegister()); | 4580 summary->set_in(0, Location::RequiresFpuRegister()); |
| 4582 summary->set_out(0, Location::RequiresFpuRegister()); | 4581 summary->set_out(0, Location::RequiresFpuRegister()); |
| 4583 } | 4582 } |
| 4584 return summary; | 4583 return summary; |
| 4585 } | 4584 } |
| 4586 | 4585 |
| 4587 | 4586 |
| 4588 void Float64x2ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4587 void Float64x2ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4589 const QRegister q = locs()->in(0).fpu_reg(); | 4588 const QRegister q = locs()->in(0).fpu_reg(); |
| 4590 | 4589 |
| 4591 if ((op_kind() == MethodRecognizer::kFloat64x2GetSignMask)) { | 4590 if ((op_kind() == MethodRecognizer::kFloat64x2GetSignMask)) { |
| 4592 const DRegister dvalue0 = EvenDRegisterOf(q); | 4591 const DRegister dvalue0 = EvenDRegisterOf(q); |
| 4593 const DRegister dvalue1 = OddDRegisterOf(q); | 4592 const DRegister dvalue1 = OddDRegisterOf(q); |
| 4594 | 4593 |
| 4595 const Register out = locs()->out(0).reg(); | 4594 const Register out = locs()->out(0).reg(); |
| 4596 const Register temp = locs()->temp(0).reg(); | |
| 4597 | 4595 |
| 4598 // Upper 32-bits of X lane. | 4596 // Upper 32-bits of X lane. |
| 4599 __ vmovrs(out, OddSRegisterOf(dvalue0)); | 4597 __ vmovrs(out, OddSRegisterOf(dvalue0)); |
| 4600 __ Lsr(out, out, 31); | 4598 __ Lsr(out, out, 31); |
| 4601 // Upper 32-bits of Y lane. | 4599 // Upper 32-bits of Y lane. |
| 4602 __ vmovrs(temp, OddSRegisterOf(dvalue1)); | 4600 __ vmovrs(TMP, OddSRegisterOf(dvalue1)); |
| 4603 __ Lsr(temp, temp, 31); | 4601 __ Lsr(TMP, TMP, 31); |
| 4604 __ orr(out, out, ShifterOperand(temp, LSL, 1)); | 4602 __ orr(out, out, ShifterOperand(TMP, LSL, 1)); |
| 4605 // Tag. | 4603 // Tag. |
| 4606 __ SmiTag(out); | 4604 __ SmiTag(out); |
| 4607 return; | 4605 return; |
| 4608 } | 4606 } |
| 4609 ASSERT(representation() == kUnboxedFloat64x2); | 4607 ASSERT(representation() == kUnboxedFloat64x2); |
| 4610 const QRegister r = locs()->out(0).fpu_reg(); | 4608 const QRegister r = locs()->out(0).fpu_reg(); |
| 4611 | 4609 |
| 4612 const DRegister dvalue0 = EvenDRegisterOf(q); | 4610 const DRegister dvalue0 = EvenDRegisterOf(q); |
| 4613 const DRegister dvalue1 = OddDRegisterOf(q); | 4611 const DRegister dvalue1 = OddDRegisterOf(q); |
| 4614 const DRegister dresult0 = EvenDRegisterOf(r); | 4612 const DRegister dresult0 = EvenDRegisterOf(r); |
| (...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6407 compiler->GenerateCall(token_pos(), | 6405 compiler->GenerateCall(token_pos(), |
| 6408 &label, | 6406 &label, |
| 6409 PcDescriptors::kOther, | 6407 PcDescriptors::kOther, |
| 6410 locs()); | 6408 locs()); |
| 6411 __ Drop(ArgumentCount()); // Discard arguments. | 6409 __ Drop(ArgumentCount()); // Discard arguments. |
| 6412 } | 6410 } |
| 6413 | 6411 |
| 6414 } // namespace dart | 6412 } // namespace dart |
| 6415 | 6413 |
| 6416 #endif // defined TARGET_ARCH_ARM | 6414 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |