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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 while (cur != '\0' && (buffer_pos_ < (buffer_size_ - 1))) { | 89 while (cur != '\0' && (buffer_pos_ < (buffer_size_ - 1))) { |
90 buffer_[buffer_pos_++] = cur; | 90 buffer_[buffer_pos_++] = cur; |
91 cur = *str++; | 91 cur = *str++; |
92 } | 92 } |
93 buffer_[buffer_pos_] = '\0'; | 93 buffer_[buffer_pos_] = '\0'; |
94 } | 94 } |
95 | 95 |
96 | 96 |
97 // These condition names are defined in a way to match the native disassembler | 97 // These condition names are defined in a way to match the native disassembler |
98 // formatting. See for example the command "objdump -d <binary file>". | 98 // formatting. See for example the command "objdump -d <binary file>". |
99 static const char* cond_names[kMaxCondition] = { | 99 static const char* cond_names[kNumberOfConditions] = { |
100 "eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc", | 100 "eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc", |
101 "hi", "ls", "ge", "lt", "gt", "le", "", "invalid", | 101 "hi", "ls", "ge", "lt", "gt", "le", "", "invalid", |
102 }; | 102 }; |
103 | 103 |
104 | 104 |
105 // Print the condition guarding the instruction. | 105 // Print the condition guarding the instruction. |
106 void ARMDecoder::PrintCondition(Instr* instr) { | 106 void ARMDecoder::PrintCondition(Instr* instr) { |
107 Print(cond_names[instr->ConditionField()]); | 107 Print(cond_names[instr->ConditionField()]); |
108 } | 108 } |
109 | 109 |
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 *object = NULL; | 1536 *object = NULL; |
1537 } | 1537 } |
1538 } | 1538 } |
1539 } | 1539 } |
1540 | 1540 |
1541 #endif // !PRODUCT | 1541 #endif // !PRODUCT |
1542 | 1542 |
1543 } // namespace dart | 1543 } // namespace dart |
1544 | 1544 |
1545 #endif // defined TARGET_ARCH_ARM | 1545 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |