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

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

Issue 311903004: Fixes to run "Hello, world!" on arm64 hardware. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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/cpuinfo_linux.cc ('k') | runtime/vm/intermediate_language_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) 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/disassembler.h" 5 #include "vm/disassembler.h"
6 6
7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
8 #if defined(TARGET_ARCH_ARM64) 8 #if defined(TARGET_ARCH_ARM64)
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 buffer_[buffer_pos_] = '\0'; 80 buffer_[buffer_pos_] = '\0';
81 } 81 }
82 82
83 83
84 // These register names are defined in a way to match the native disassembler 84 // These register names are defined in a way to match the native disassembler
85 // formatting, except for register aliases ctx (r9) and pp (r10). 85 // formatting, except for register aliases ctx (r9) and pp (r10).
86 // See for example the command "objdump -d <binary file>". 86 // See for example the command "objdump -d <binary file>".
87 static const char* reg_names[kNumberOfCpuRegisters] = { 87 static const char* reg_names[kNumberOfCpuRegisters] = {
88 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", 88 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
89 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", 89 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
90 "ip0", "ip1", "r18", "r19", "r20", "r21", "r22", "r23", 90 "ip0", "ip1", "sp", "r19", "r20", "r21", "r22", "r23",
91 "r24", "r25", "r26", "pp", "ctx", "fp", "lr", "r31", 91 "r24", "r25", "r26", "pp", "ctx", "fp", "lr", "r31",
92 }; 92 };
93 93
94 94
95 // Print the register name according to the active name converter. 95 // Print the register name according to the active name converter.
96 void ARM64Decoder::PrintRegister(int reg, R31Type r31t) { 96 void ARM64Decoder::PrintRegister(int reg, R31Type r31t) {
97 ASSERT(0 <= reg); 97 ASSERT(0 <= reg);
98 ASSERT(reg < kNumberOfCpuRegisters); 98 ASSERT(reg < kNumberOfCpuRegisters);
99 if (reg == 31) { 99 if (reg == 31) {
100 const char* rstr = (r31t == R31IsZR) ? "zr" : "sp"; 100 const char* rstr = (r31t == R31IsZR) ? "zr" : "csp";
101 Print(rstr); 101 Print(rstr);
102 } else { 102 } else {
103 Print(reg_names[reg]); 103 Print(reg_names[reg]);
104 } 104 }
105 } 105 }
106 106
107 107
108 void ARM64Decoder::PrintVRegister(int reg) { 108 void ARM64Decoder::PrintVRegister(int reg) {
109 ASSERT(0 <= reg); 109 ASSERT(0 <= reg);
110 ASSERT(reg < kNumberOfVRegisters); 110 ASSERT(reg < kNumberOfVRegisters);
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 human_buffer, 1386 human_buffer,
1387 sizeof(human_buffer), 1387 sizeof(human_buffer),
1388 pc); 1388 pc);
1389 pc += instruction_length; 1389 pc += instruction_length;
1390 } 1390 }
1391 } 1391 }
1392 1392
1393 } // namespace dart 1393 } // namespace dart
1394 1394
1395 #endif // defined TARGET_ARCH_ARM 1395 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/cpuinfo_linux.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698