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

Side by Side Diff: runtime/vm/assembler_arm64.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 | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/constants_arm.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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 void Assembler::Stop(const char* message) { 215 void Assembler::Stop(const char* message) {
216 if (FLAG_print_stop_message) { 216 if (FLAG_print_stop_message) {
217 UNIMPLEMENTED(); 217 UNIMPLEMENTED();
218 } 218 }
219 Label stop; 219 Label stop;
220 b(&stop); 220 b(&stop);
221 Emit(Utils::Low32Bits(reinterpret_cast<int64_t>(message))); 221 Emit(Utils::Low32Bits(reinterpret_cast<int64_t>(message)));
222 Emit(Utils::High32Bits(reinterpret_cast<int64_t>(message))); 222 Emit(Utils::High32Bits(reinterpret_cast<int64_t>(message)));
223 Bind(&stop); 223 Bind(&stop);
224 hlt(Instr::kStopMessageCode); 224 brk(Instr::kStopMessageCode);
225 } 225 }
226 226
227 227
228 static int CountLeadingZeros(uint64_t value, int width) { 228 static int CountLeadingZeros(uint64_t value, int width) {
229 ASSERT((width == 32) || (width == 64)); 229 ASSERT((width == 32) || (width == 64));
230 if (value == 0) { 230 if (value == 0) {
231 return width; 231 return width;
232 } 232 }
233 int count = 0; 233 int count = 0;
234 do { 234 do {
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 add(base, array, Operand(index, LSL, shift)); 1486 add(base, array, Operand(index, LSL, shift));
1487 } 1487 }
1488 const OperandSize size = Address::OperandSizeFor(cid); 1488 const OperandSize size = Address::OperandSizeFor(cid);
1489 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); 1489 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size));
1490 return Address(base, offset, Address::Offset, size); 1490 return Address(base, offset, Address::Offset, size);
1491 } 1491 }
1492 1492
1493 } // namespace dart 1493 } // namespace dart
1494 1494
1495 #endif // defined TARGET_ARCH_ARM64 1495 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/constants_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698