| 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 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", | 86 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", |
| 87 "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", | 87 "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", |
| 88 "r24", "ip0", "ip1", "pp", "ctx", "fp", "lr", "r31", | 88 "r24", "ip0", "ip1", "pp", "ctx", "fp", "lr", "r31", |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 | 91 |
| 92 // Print the register name according to the active name converter. | 92 // Print the register name according to the active name converter. |
| 93 void ARM64Decoder::PrintRegister(int reg, R31Type r31t) { | 93 void ARM64Decoder::PrintRegister(int reg, R31Type r31t) { |
| 94 ASSERT(0 <= reg); | 94 ASSERT(0 <= reg); |
| 95 ASSERT(reg < kNumberOfCpuRegisters); | 95 ASSERT(reg < kNumberOfCpuRegisters); |
| 96 if ((reg == 31)) { | 96 if (reg == 31) { |
| 97 const char* rstr = (r31t == R31IsZR) ? "zr" : "sp"; | 97 const char* rstr = (r31t == R31IsZR) ? "zr" : "sp"; |
| 98 Print(rstr); | 98 Print(rstr); |
| 99 } else { | 99 } else { |
| 100 Print(reg_names[reg]); | 100 Print(reg_names[reg]); |
| 101 } | 101 } |
| 102 } | 102 } |
| 103 | 103 |
| 104 | 104 |
| 105 // These shift names are defined in a way to match the native disassembler | 105 // These shift names are defined in a way to match the native disassembler |
| 106 // formatting. See for example the command "objdump -d <binary file>". | 106 // formatting. See for example the command "objdump -d <binary file>". |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 human_buffer, | 604 human_buffer, |
| 605 sizeof(human_buffer), | 605 sizeof(human_buffer), |
| 606 pc); | 606 pc); |
| 607 pc += instruction_length; | 607 pc += instruction_length; |
| 608 } | 608 } |
| 609 } | 609 } |
| 610 | 610 |
| 611 } // namespace dart | 611 } // namespace dart |
| 612 | 612 |
| 613 #endif // defined TARGET_ARCH_ARM | 613 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |