| OLD | NEW |
| 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 #include "vm/instructions.h" | 10 #include "vm/instructions.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 } | 85 } |
| 86 | 86 |
| 87 | 87 |
| 88 // These register names are defined in a way to match the native disassembler | 88 // These register names are defined in a way to match the native disassembler |
| 89 // formatting, except for register aliases ctx (r9), pp (r10) and sp (r19). | 89 // formatting, except for register aliases ctx (r9), pp (r10) and sp (r19). |
| 90 // See for example the command "objdump -d <binary file>". | 90 // See for example the command "objdump -d <binary file>". |
| 91 static const char* reg_names[kNumberOfCpuRegisters] = { | 91 static const char* reg_names[kNumberOfCpuRegisters] = { |
| 92 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", | 92 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", |
| 93 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", | 93 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", |
| 94 "ip0", "ip1", "r18", "sp", "r20", "r21", "r22", "r23", | 94 "ip0", "ip1", "r18", "sp", "r20", "r21", "r22", "r23", |
| 95 "r24", "r25", "r26", "pp", "ctx", "fp", "lr", "r31", | 95 "r24", "r25", "thr", "pp", "ctx", "fp", "lr", "r31", |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 | 98 |
| 99 // Print the register name according to the active name converter. | 99 // Print the register name according to the active name converter. |
| 100 void ARM64Decoder::PrintRegister(int reg, R31Type r31t) { | 100 void ARM64Decoder::PrintRegister(int reg, R31Type r31t) { |
| 101 ASSERT(0 <= reg); | 101 ASSERT(0 <= reg); |
| 102 ASSERT(reg < kNumberOfCpuRegisters); | 102 ASSERT(reg < kNumberOfCpuRegisters); |
| 103 if (reg == 31) { | 103 if (reg == 31) { |
| 104 const char* rstr = (r31t == R31IsZR) ? "zr" : "csp"; | 104 const char* rstr = (r31t == R31IsZR) ? "zr" : "csp"; |
| 105 Print(rstr); | 105 Print(rstr); |
| (...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1506 *object = NULL; | 1506 *object = NULL; |
| 1507 } | 1507 } |
| 1508 } | 1508 } |
| 1509 } | 1509 } |
| 1510 | 1510 |
| 1511 #endif // !PRODUCT | 1511 #endif // !PRODUCT |
| 1512 | 1512 |
| 1513 } // namespace dart | 1513 } // namespace dart |
| 1514 | 1514 |
| 1515 #endif // defined TARGET_ARCH_ARM | 1515 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |