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

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

Issue 1270803003: VM: More abstract interface for generating stub calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/assembler_ia32.h » ('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" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 577
578 void Assembler::LoadDImmediate(VRegister vd, double immd) { 578 void Assembler::LoadDImmediate(VRegister vd, double immd) {
579 if (!fmovdi(vd, immd)) { 579 if (!fmovdi(vd, immd)) {
580 int64_t imm = bit_cast<int64_t, double>(immd); 580 int64_t imm = bit_cast<int64_t, double>(immd);
581 LoadImmediate(TMP, imm); 581 LoadImmediate(TMP, imm);
582 fmovdr(vd, TMP); 582 fmovdr(vd, TMP);
583 } 583 }
584 } 584 }
585 585
586 586
587 void Assembler::Branch(const StubEntry& stub_entry) {
588 const ExternalLabel label(stub_entry.EntryPoint());
589 Branch(&label);
590 }
591
592
593 void Assembler::BranchPatchable(const StubEntry& stub_entry) {
594 const ExternalLabel label(stub_entry.EntryPoint());
595 BranchPatchable(&label);
596 }
597
598
599 void Assembler::BranchLink(const StubEntry& stub_entry) {
600 const ExternalLabel label(stub_entry.EntryPoint());
601 BranchLink(&label);
602 }
603
604
605 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
606 const ExternalLabel label(stub_entry.EntryPoint());
607 BranchLinkPatchable(&label);
608 }
609
610
587 void Assembler::AddImmediate(Register dest, Register rn, int64_t imm) { 611 void Assembler::AddImmediate(Register dest, Register rn, int64_t imm) {
588 Operand op; 612 Operand op;
589 if (imm == 0) { 613 if (imm == 0) {
590 if (dest != rn) { 614 if (dest != rn) {
591 mov(dest, rn); 615 mov(dest, rn);
592 } 616 }
593 return; 617 return;
594 } 618 }
595 if (Operand::CanHold(imm, kXRegSizeInBits, &op) == Operand::Immediate) { 619 if (Operand::CanHold(imm, kXRegSizeInBits, &op) == Operand::Immediate) {
596 add(dest, rn, op); 620 add(dest, rn, op);
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 add(base, array, Operand(index, LSL, shift)); 1467 add(base, array, Operand(index, LSL, shift));
1444 } 1468 }
1445 const OperandSize size = Address::OperandSizeFor(cid); 1469 const OperandSize size = Address::OperandSizeFor(cid);
1446 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); 1470 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size));
1447 return Address(base, offset, Address::Offset, size); 1471 return Address(base, offset, Address::Offset, size);
1448 } 1472 }
1449 1473
1450 } // namespace dart 1474 } // namespace dart
1451 1475
1452 #endif // defined TARGET_ARCH_ARM64 1476 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/assembler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698