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

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

Issue 1097413004: Use a breakpoint instruction for a stop message on arm instead of (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | runtime/vm/assembler_arm64.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) 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_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 QRegister qd, QRegister qn, QRegister qm) { 1463 QRegister qd, QRegister qn, QRegister qm) {
1464 EmitSIMDqqq(B24 | B9 | B8, sz, qd, qn, qm); 1464 EmitSIMDqqq(B24 | B9 | B8, sz, qd, qn, qm);
1465 } 1465 }
1466 1466
1467 1467
1468 void Assembler::vcgtqs(QRegister qd, QRegister qn, QRegister qm) { 1468 void Assembler::vcgtqs(QRegister qd, QRegister qn, QRegister qm) {
1469 EmitSIMDqqq(B24 | B21 | B11 | B10 | B9, kSWord, qd, qn, qm); 1469 EmitSIMDqqq(B24 | B21 | B11 | B10 | B9, kSWord, qd, qn, qm);
1470 } 1470 }
1471 1471
1472 1472
1473 void Assembler::svc(uint32_t imm24, Condition cond) { 1473 void Assembler::svc(uint32_t imm24, Condition cond) {
zra 2015/04/22 19:39:25 If this should only be used if we are using the si
regis 2015/04/22 20:28:35 Good idea. I actually removed the assembler method
1474 ASSERT(cond != kNoCondition); 1474 ASSERT(cond != kNoCondition);
1475 ASSERT(imm24 < (1 << 24)); 1475 ASSERT(imm24 < (1 << 24));
1476 int32_t encoding = (cond << kConditionShift) | B27 | B26 | B25 | B24 | imm24; 1476 int32_t encoding = (cond << kConditionShift) | B27 | B26 | B25 | B24 | imm24;
1477 Emit(encoding); 1477 Emit(encoding);
1478 } 1478 }
1479 1479
1480 1480
1481 void Assembler::bkpt(uint16_t imm16) { 1481 void Assembler::bkpt(uint16_t imm16) {
1482 // bkpt requires that the cond field is AL. 1482 // bkpt requires that the cond field is AL.
1483 int32_t encoding = (AL << kConditionShift) | B24 | B21 | 1483 int32_t encoding = (AL << kConditionShift) | B24 | B21 |
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after
3477 BranchLink(&stub_code->PrintStopMessageLabel()); // Passing message in R0. 3477 BranchLink(&stub_code->PrintStopMessageLabel()); // Passing message in R0.
3478 PopList((1 << R0) | (1 << IP) | (1 << LR)); // Restore R0, IP, LR. 3478 PopList((1 << R0) | (1 << IP) | (1 << LR)); // Restore R0, IP, LR.
3479 } 3479 }
3480 // Emit the message address before the svc instruction, so that we can 3480 // Emit the message address before the svc instruction, so that we can
3481 // 'unstop' and continue execution in the simulator or jump to the next 3481 // 'unstop' and continue execution in the simulator or jump to the next
3482 // instruction in gdb. 3482 // instruction in gdb.
3483 Label stop; 3483 Label stop;
3484 b(&stop); 3484 b(&stop);
3485 Emit(reinterpret_cast<int32_t>(message)); 3485 Emit(reinterpret_cast<int32_t>(message));
3486 Bind(&stop); 3486 Bind(&stop);
3487 svc(kStopMessageSvcCode); 3487 bkpt(Instr::kStopMessageCode);
3488 } 3488 }
3489 3489
3490 3490
3491 Address Assembler::ElementAddressForIntIndex(bool is_load, 3491 Address Assembler::ElementAddressForIntIndex(bool is_load,
3492 bool is_external, 3492 bool is_external,
3493 intptr_t cid, 3493 intptr_t cid,
3494 intptr_t index_scale, 3494 intptr_t index_scale,
3495 Register array, 3495 Register array,
3496 intptr_t index, 3496 intptr_t index,
3497 Register temp) { 3497 Register temp) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
3576 3576
3577 3577
3578 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3578 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3579 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3579 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3580 return fpu_reg_names[reg]; 3580 return fpu_reg_names[reg];
3581 } 3581 }
3582 3582
3583 } // namespace dart 3583 } // namespace dart
3584 3584
3585 #endif // defined TARGET_ARCH_ARM 3585 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698