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

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

Issue 2273943002: VM: More refactoring of recognized methods inlining. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 3 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
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 4447 matching lines...) Expand 10 before | Expand all | Expand 10 after
4458 case Token::kBIT_XOR: __ veor(result, left, right); break; 4458 case Token::kBIT_XOR: __ veor(result, left, right); break;
4459 case Token::kADD: __ vaddw(result, left, right); break; 4459 case Token::kADD: __ vaddw(result, left, right); break;
4460 case Token::kSUB: __ vsubw(result, left, right); break; 4460 case Token::kSUB: __ vsubw(result, left, right); break;
4461 default: UNREACHABLE(); 4461 default: UNREACHABLE();
4462 } 4462 }
4463 } 4463 }
4464 4464
4465 4465
4466 LocationSummary* MathUnaryInstr::MakeLocationSummary(Zone* zone, 4466 LocationSummary* MathUnaryInstr::MakeLocationSummary(Zone* zone,
4467 bool opt) const { 4467 bool opt) const {
4468 if ((kind() == MathUnaryInstr::kSin) || (kind() == MathUnaryInstr::kCos)) {
4469 const intptr_t kNumInputs = 1;
4470 const intptr_t kNumTemps = 0;
4471 LocationSummary* summary = new(zone) LocationSummary(
4472 zone, kNumInputs, kNumTemps, LocationSummary::kCall);
4473 summary->set_in(0, Location::FpuRegisterLocation(V0));
4474 summary->set_out(0, Location::FpuRegisterLocation(V0));
4475 return summary;
4476 }
4477 ASSERT((kind() == MathUnaryInstr::kSqrt) || 4468 ASSERT((kind() == MathUnaryInstr::kSqrt) ||
4478 (kind() == MathUnaryInstr::kDoubleSquare)); 4469 (kind() == MathUnaryInstr::kDoubleSquare));
4479 const intptr_t kNumInputs = 1; 4470 const intptr_t kNumInputs = 1;
4480 const intptr_t kNumTemps = 0; 4471 const intptr_t kNumTemps = 0;
4481 LocationSummary* summary = new(zone) LocationSummary( 4472 LocationSummary* summary = new(zone) LocationSummary(
4482 zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); 4473 zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
4483 summary->set_in(0, Location::RequiresFpuRegister()); 4474 summary->set_in(0, Location::RequiresFpuRegister());
4484 summary->set_out(0, Location::RequiresFpuRegister()); 4475 summary->set_out(0, Location::RequiresFpuRegister());
4485 return summary; 4476 return summary;
4486 } 4477 }
4487 4478
4488 4479
4489 void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4480 void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4490 if (kind() == MathUnaryInstr::kSqrt) { 4481 if (kind() == MathUnaryInstr::kSqrt) {
4491 const VRegister val = locs()->in(0).fpu_reg(); 4482 const VRegister val = locs()->in(0).fpu_reg();
4492 const VRegister result = locs()->out(0).fpu_reg(); 4483 const VRegister result = locs()->out(0).fpu_reg();
4493 __ fsqrtd(result, val); 4484 __ fsqrtd(result, val);
4494 } else if (kind() == MathUnaryInstr::kDoubleSquare) { 4485 } else if (kind() == MathUnaryInstr::kDoubleSquare) {
4495 const VRegister val = locs()->in(0).fpu_reg(); 4486 const VRegister val = locs()->in(0).fpu_reg();
4496 const VRegister result = locs()->out(0).fpu_reg(); 4487 const VRegister result = locs()->out(0).fpu_reg();
4497 __ fmuld(result, val, val); 4488 __ fmuld(result, val, val);
4498 } else { 4489 } else {
4499 ASSERT((kind() == MathUnaryInstr::kSin) || 4490 UNREACHABLE();
4500 (kind() == MathUnaryInstr::kCos));
4501 __ CallRuntime(TargetFunction(), InputCount());
4502 } 4491 }
4503 } 4492 }
4504 4493
4505 4494
4506 LocationSummary* CaseInsensitiveCompareUC16Instr::MakeLocationSummary( 4495 LocationSummary* CaseInsensitiveCompareUC16Instr::MakeLocationSummary(
4507 Zone* zone, bool opt) const { 4496 Zone* zone, bool opt) const {
4508 const intptr_t kNumTemps = 0; 4497 const intptr_t kNumTemps = 0;
4509 LocationSummary* summary = new(zone) LocationSummary( 4498 LocationSummary* summary = new(zone) LocationSummary(
4510 zone, InputCount(), kNumTemps, LocationSummary::kCall); 4499 zone, InputCount(), kNumTemps, LocationSummary::kCall);
4511 summary->set_in(0, Location::RegisterLocation(R0)); 4500 summary->set_in(0, Location::RegisterLocation(R0));
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
5784 1, 5773 1,
5785 locs()); 5774 locs());
5786 __ Drop(1); 5775 __ Drop(1);
5787 __ Pop(result); 5776 __ Pop(result);
5788 } 5777 }
5789 5778
5790 5779
5791 } // namespace dart 5780 } // namespace dart
5792 5781
5793 #endif // defined TARGET_ARCH_ARM64 5782 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698