| 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 | 9 |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // Print the condition guarding the instruction. | 107 // Print the condition guarding the instruction. |
| 108 void ARMDecoder::PrintCondition(Instr* instr) { | 108 void ARMDecoder::PrintCondition(Instr* instr) { |
| 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_OS_MACOS) | 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", "r10", "r11", "ip", "sp", "lr", "pc", |
| 120 #else | 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", "r10", "fp", "ip", "sp", "lr", "pc", |
| 123 #else |
| 124 #error Unknown ABI |
| 123 #endif | 125 #endif |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 | 128 |
| 127 // Print the register name according to the active name converter. | 129 // Print the register name according to the active name converter. |
| 128 void ARMDecoder::PrintRegister(int reg) { | 130 void ARMDecoder::PrintRegister(int reg) { |
| 129 ASSERT(0 <= reg); | 131 ASSERT(0 <= reg); |
| 130 ASSERT(reg < kNumberOfCpuRegisters); | 132 ASSERT(reg < kNumberOfCpuRegisters); |
| 131 Print(reg_names[reg]); | 133 Print(reg_names[reg]); |
| 132 } | 134 } |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1540 if (out_instr_size) { | 1542 if (out_instr_size) { |
| 1541 *out_instr_size = Instr::kInstrSize; | 1543 *out_instr_size = Instr::kInstrSize; |
| 1542 } | 1544 } |
| 1543 } | 1545 } |
| 1544 | 1546 |
| 1545 #endif // !PRODUCT | 1547 #endif // !PRODUCT |
| 1546 | 1548 |
| 1547 } // namespace dart | 1549 } // namespace dart |
| 1548 | 1550 |
| 1549 #endif // defined TARGET_ARCH_ARM | 1551 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |