Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: runtime/vm/intermediate_language_arm.cc

Issue 475563002: Inline Int32x4 constructor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 4521 matching lines...) Expand 10 before | Expand all | Expand 10 after
4532 __ b(&g1, GT); 4532 __ b(&g1, GT);
4533 __ vmovd(left1, right1); 4533 __ vmovd(left1, right1);
4534 __ Bind(&g1); 4534 __ Bind(&g1);
4535 break; 4535 break;
4536 } 4536 }
4537 default: UNREACHABLE(); 4537 default: UNREACHABLE();
4538 } 4538 }
4539 } 4539 }
4540 4540
4541 4541
4542 LocationSummary* Int32x4ConstructorInstr::MakeLocationSummary(
4543 Isolate* isolate, bool opt) const {
4544 const intptr_t kNumInputs = 4;
4545 const intptr_t kNumTemps = 0;
4546 LocationSummary* summary = new(isolate) LocationSummary(
4547 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
4548 summary->set_in(0, Location::RequiresRegister());
4549 summary->set_in(1, Location::RequiresRegister());
4550 summary->set_in(2, Location::RequiresRegister());
4551 summary->set_in(3, Location::RequiresRegister());
4552 // Low (< 7) Q register needed for the vmovsr instruction.
4553 summary->set_out(0, Location::FpuRegisterLocation(Q6));
4554 return summary;
4555 }
4556
4557
4558 void Int32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4559 const Register v0 = locs()->in(0).reg();
4560 const Register v1 = locs()->in(1).reg();
4561 const Register v2 = locs()->in(2).reg();
4562 const Register v3 = locs()->in(3).reg();
4563 const QRegister result = locs()->out(0).fpu_reg();
4564 const DRegister dresult0 = EvenDRegisterOf(result);
4565 const DRegister dresult1 = OddDRegisterOf(result);
4566 const SRegister sresult0 = EvenSRegisterOf(dresult0);
4567 const SRegister sresult1 = OddSRegisterOf(dresult0);
4568 const SRegister sresult2 = EvenSRegisterOf(dresult1);
4569 const SRegister sresult3 = OddSRegisterOf(dresult1);
4570 __ veorq(result, result, result);
4571 __ vmovsr(sresult0, v0);
4572 __ vmovsr(sresult1, v1);
4573 __ vmovsr(sresult2, v2);
4574 __ vmovsr(sresult3, v3);
4575 }
4576
4577
4542 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( 4578 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary(
4543 Isolate* isolate, bool opt) const { 4579 Isolate* isolate, bool opt) const {
4544 const intptr_t kNumInputs = 4; 4580 const intptr_t kNumInputs = 4;
4545 const intptr_t kNumTemps = 1; 4581 const intptr_t kNumTemps = 1;
4546 LocationSummary* summary = new(isolate) LocationSummary( 4582 LocationSummary* summary = new(isolate) LocationSummary(
4547 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); 4583 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
4548 summary->set_in(0, Location::RequiresRegister()); 4584 summary->set_in(0, Location::RequiresRegister());
4549 summary->set_in(1, Location::RequiresRegister()); 4585 summary->set_in(1, Location::RequiresRegister());
4550 summary->set_in(2, Location::RequiresRegister()); 4586 summary->set_in(2, Location::RequiresRegister());
4551 summary->set_in(3, Location::RequiresRegister()); 4587 summary->set_in(3, Location::RequiresRegister());
(...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after
6674 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 6710 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
6675 #if defined(DEBUG) 6711 #if defined(DEBUG)
6676 __ LoadImmediate(R4, kInvalidObjectPointer); 6712 __ LoadImmediate(R4, kInvalidObjectPointer);
6677 __ LoadImmediate(R5, kInvalidObjectPointer); 6713 __ LoadImmediate(R5, kInvalidObjectPointer);
6678 #endif 6714 #endif
6679 } 6715 }
6680 6716
6681 } // namespace dart 6717 } // namespace dart
6682 6718
6683 #endif // defined TARGET_ARCH_ARM 6719 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698