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 4512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4523 __ b(&g1, GT); | 4523 __ b(&g1, GT); |
4524 __ vmovd(left1, right1); | 4524 __ vmovd(left1, right1); |
4525 __ Bind(&g1); | 4525 __ Bind(&g1); |
4526 break; | 4526 break; |
4527 } | 4527 } |
4528 default: UNREACHABLE(); | 4528 default: UNREACHABLE(); |
4529 } | 4529 } |
4530 } | 4530 } |
4531 | 4531 |
4532 | 4532 |
| 4533 LocationSummary* Int32x4ConstructorInstr::MakeLocationSummary( |
| 4534 Isolate* isolate, bool opt) const { |
| 4535 const intptr_t kNumInputs = 4; |
| 4536 const intptr_t kNumTemps = 0; |
| 4537 LocationSummary* summary = new(isolate) LocationSummary( |
| 4538 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 4539 summary->set_in(0, Location::RequiresRegister()); |
| 4540 summary->set_in(1, Location::RequiresRegister()); |
| 4541 summary->set_in(2, Location::RequiresRegister()); |
| 4542 summary->set_in(3, Location::RequiresRegister()); |
| 4543 // Low (< 7) Q register needed for the vmovsr instruction. |
| 4544 summary->set_out(0, Location::FpuRegisterLocation(Q6)); |
| 4545 return summary; |
| 4546 } |
| 4547 |
| 4548 |
| 4549 void Int32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4550 const Register v0 = locs()->in(0).reg(); |
| 4551 const Register v1 = locs()->in(1).reg(); |
| 4552 const Register v2 = locs()->in(2).reg(); |
| 4553 const Register v3 = locs()->in(3).reg(); |
| 4554 const QRegister result = locs()->out(0).fpu_reg(); |
| 4555 const DRegister dresult0 = EvenDRegisterOf(result); |
| 4556 const DRegister dresult1 = OddDRegisterOf(result); |
| 4557 const SRegister sresult0 = EvenSRegisterOf(dresult0); |
| 4558 const SRegister sresult1 = OddSRegisterOf(dresult0); |
| 4559 const SRegister sresult2 = EvenSRegisterOf(dresult1); |
| 4560 const SRegister sresult3 = OddSRegisterOf(dresult1); |
| 4561 __ veorq(result, result, result); |
| 4562 __ vmovsr(sresult0, v0); |
| 4563 __ vmovsr(sresult1, v1); |
| 4564 __ vmovsr(sresult2, v2); |
| 4565 __ vmovsr(sresult3, v3); |
| 4566 } |
| 4567 |
| 4568 |
4533 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( | 4569 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( |
4534 Isolate* isolate, bool opt) const { | 4570 Isolate* isolate, bool opt) const { |
4535 const intptr_t kNumInputs = 4; | 4571 const intptr_t kNumInputs = 4; |
4536 const intptr_t kNumTemps = 1; | 4572 const intptr_t kNumTemps = 1; |
4537 LocationSummary* summary = new(isolate) LocationSummary( | 4573 LocationSummary* summary = new(isolate) LocationSummary( |
4538 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4574 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
4539 summary->set_in(0, Location::RequiresRegister()); | 4575 summary->set_in(0, Location::RequiresRegister()); |
4540 summary->set_in(1, Location::RequiresRegister()); | 4576 summary->set_in(1, Location::RequiresRegister()); |
4541 summary->set_in(2, Location::RequiresRegister()); | 4577 summary->set_in(2, Location::RequiresRegister()); |
4542 summary->set_in(3, Location::RequiresRegister()); | 4578 summary->set_in(3, Location::RequiresRegister()); |
(...skipping 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6663 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 6699 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
6664 #if defined(DEBUG) | 6700 #if defined(DEBUG) |
6665 __ LoadImmediate(R4, kInvalidObjectPointer); | 6701 __ LoadImmediate(R4, kInvalidObjectPointer); |
6666 __ LoadImmediate(R5, kInvalidObjectPointer); | 6702 __ LoadImmediate(R5, kInvalidObjectPointer); |
6667 #endif | 6703 #endif |
6668 } | 6704 } |
6669 | 6705 |
6670 } // namespace dart | 6706 } // namespace dart |
6671 | 6707 |
6672 #endif // defined TARGET_ARCH_ARM | 6708 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |