OLD | NEW |
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/disassembler.h" | 5 #include "vm/disassembler.h" |
6 | 6 |
7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
8 #if defined(TARGET_ARCH_ARM) | 8 #if defined(TARGET_ARCH_ARM) |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 Print(cond_names[instr->ConditionField()]); | 109 Print(cond_names[instr->ConditionField()]); |
110 } | 110 } |
111 | 111 |
112 | 112 |
113 // These register names are defined in a way to match the native disassembler | 113 // These register names are defined in a way to match the native disassembler |
114 // formatting, except for register alias pp (r5). | 114 // formatting, except for register alias pp (r5). |
115 // See for example the command "objdump -d <binary file>". | 115 // See for example the command "objdump -d <binary file>". |
116 static const char* reg_names[kNumberOfCpuRegisters] = { | 116 static const char* reg_names[kNumberOfCpuRegisters] = { |
117 #if defined(TARGET_ABI_IOS) | 117 #if defined(TARGET_ABI_IOS) |
118 "r0", "r1", "r2", "r3", "r4", "pp", "r6", "fp", | 118 "r0", "r1", "r2", "r3", "r4", "pp", "r6", "fp", |
119 "r8", "r9", "r10", "r11", "ip", "sp", "lr", "pc", | 119 "r8", "r9", "thr", "r11", "ip", "sp", "lr", "pc", |
120 #elif defined(TARGET_ABI_EABI) | 120 #elif defined(TARGET_ABI_EABI) |
121 "r0", "r1", "r2", "r3", "r4", "pp", "r6", "r7", | 121 "r0", "r1", "r2", "r3", "r4", "pp", "r6", "r7", |
122 "r8", "r9", "r10", "fp", "ip", "sp", "lr", "pc", | 122 "r8", "r9", "thr", "fp", "ip", "sp", "lr", "pc", |
123 #else | 123 #else |
124 #error Unknown ABI | 124 #error Unknown ABI |
125 #endif | 125 #endif |
126 }; | 126 }; |
127 | 127 |
128 | 128 |
129 // Print the register name according to the active name converter. | 129 // Print the register name according to the active name converter. |
130 void ARMDecoder::PrintRegister(int reg) { | 130 void ARMDecoder::PrintRegister(int reg) { |
131 ASSERT(0 <= reg); | 131 ASSERT(0 <= reg); |
132 ASSERT(reg < kNumberOfCpuRegisters); | 132 ASSERT(reg < kNumberOfCpuRegisters); |
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1551 *object = NULL; | 1551 *object = NULL; |
1552 } | 1552 } |
1553 } | 1553 } |
1554 } | 1554 } |
1555 | 1555 |
1556 #endif // !PRODUCT | 1556 #endif // !PRODUCT |
1557 | 1557 |
1558 } // namespace dart | 1558 } // namespace dart |
1559 | 1559 |
1560 #endif // defined TARGET_ARCH_ARM | 1560 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |