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

Side by Side Diff: runtime/vm/assembler_mips.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_mips.h ('k') | runtime/vm/assembler_x64.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) 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" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 and_(ro, TMP, ro); 449 and_(ro, TMP, ro);
450 } else { 450 } else {
451 subu(rd, rs, rt); 451 subu(rd, rs, rt);
452 xor_(ro, rd, rs); 452 xor_(ro, rd, rs);
453 xor_(TMP, rs, rt); 453 xor_(TMP, rs, rt);
454 and_(ro, TMP, ro); 454 and_(ro, TMP, ro);
455 } 455 }
456 } 456 }
457 457
458 458
459 void Assembler::Branch(const StubEntry& stub_entry) {
460 const ExternalLabel label(stub_entry.EntryPoint());
461 Branch(&label);
462 }
463
464
465 void Assembler::BranchPatchable(const StubEntry& stub_entry) {
466 const ExternalLabel label(stub_entry.EntryPoint());
467 BranchPatchable(&label);
468 }
469
470
471 void Assembler::BranchLink(const StubEntry& stub_entry) {
472 const ExternalLabel label(stub_entry.EntryPoint());
473 BranchLink(&label);
474 }
475
476
477 void Assembler::BranchLink(const StubEntry& stub_entry,
478 Patchability patchable) {
479 const ExternalLabel label(stub_entry.EntryPoint());
480 BranchLink(&label, patchable);
481 }
482
483
484 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
485 const ExternalLabel label(stub_entry.EntryPoint());
486 BranchLink(&label, kPatchable);
487 }
488
489
459 void Assembler::LoadObjectHelper(Register rd, 490 void Assembler::LoadObjectHelper(Register rd,
460 const Object& object, 491 const Object& object,
461 bool is_unique) { 492 bool is_unique) {
462 // Load common VM constants from the thread. This works also in places where 493 // Load common VM constants from the thread. This works also in places where
463 // no constant pool is set up (e.g. intrinsic code). 494 // no constant pool is set up (e.g. intrinsic code).
464 if (Thread::CanLoadFromThread(object)) { 495 if (Thread::CanLoadFromThread(object)) {
465 lw(rd, Address(THR, Thread::OffsetFromThread(object))); 496 lw(rd, Address(THR, Thread::OffsetFromThread(object)));
466 return; 497 return;
467 } 498 }
468 ASSERT(!in_delay_slot_); 499 ASSERT(!in_delay_slot_);
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 Label stop; 1305 Label stop;
1275 b(&stop); 1306 b(&stop);
1276 Emit(reinterpret_cast<int32_t>(message)); 1307 Emit(reinterpret_cast<int32_t>(message));
1277 Bind(&stop); 1308 Bind(&stop);
1278 break_(Instr::kStopMessageCode); 1309 break_(Instr::kStopMessageCode);
1279 } 1310 }
1280 1311
1281 } // namespace dart 1312 } // namespace dart
1282 1313
1283 #endif // defined TARGET_ARCH_MIPS 1314 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698