OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 #if defined(FLETCH_TARGET_ARM) | 5 #if defined(DARTINO_TARGET_ARM) |
6 | 6 |
7 #include "src/vm/assembler.h" // NOLINT we don't include assembler_arm.h. | 7 #include "src/vm/assembler.h" // NOLINT we don't include assembler_arm.h. |
8 | 8 |
9 #include <stdio.h> | 9 #include <stdio.h> |
10 #include <stdarg.h> | 10 #include <stdarg.h> |
11 | 11 |
12 namespace fletch { | 12 namespace dartino { |
13 | 13 |
14 int Label::position_counter_ = 0; | 14 int Label::position_counter_ = 0; |
15 | 15 |
16 static const char* ConditionToString(Condition cond) { | 16 static const char* ConditionToString(Condition cond) { |
17 static const char* kConditionNames[] = {"eq", "ne", "cs", "cc", "mi", | 17 static const char* kConditionNames[] = {"eq", "ne", "cs", "cc", "mi", |
18 "pl", "vs", "vc", "hi", "ls", | 18 "pl", "vs", "vc", "hi", "ls", |
19 "ge", "lt", "gt", "le", ""}; | 19 "ge", "lt", "gt", "le", ""}; |
20 return kConditionNames[cond]; | 20 return kConditionNames[cond]; |
21 } | 21 } |
22 | 22 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 break; | 137 break; |
138 } | 138 } |
139 | 139 |
140 case 's': { | 140 case 's': { |
141 const char* label = va_arg(arguments, const char*); | 141 const char* label = va_arg(arguments, const char*); |
142 printf("%s%s", LabelPrefix(), label); | 142 printf("%s%s", LabelPrefix(), label); |
143 break; | 143 break; |
144 } | 144 } |
145 | 145 |
146 case 'W': { | 146 case 'W': { |
147 #ifdef FLETCH_THUMB_ONLY | 147 #ifdef DARTINO_THUMB_ONLY |
148 UNREACHABLE(); | 148 UNREACHABLE(); |
149 #else | 149 #else |
150 WriteBack write_back = static_cast<WriteBack>(va_arg(arguments, int)); | 150 WriteBack write_back = static_cast<WriteBack>(va_arg(arguments, int)); |
151 if (write_back == WRITE_BACK) { | 151 if (write_back == WRITE_BACK) { |
152 putchar('!'); | 152 putchar('!'); |
153 } | 153 } |
154 #endif | 154 #endif |
155 break; | 155 break; |
156 } | 156 } |
157 | 157 |
(...skipping 25 matching lines...) Expand all Loading... |
183 static const char* ShiftTypeToString(ShiftType type) { | 183 static const char* ShiftTypeToString(ShiftType type) { |
184 static const char* kShiftNames[] = {"lsl", "asr"}; | 184 static const char* kShiftNames[] = {"lsl", "asr"}; |
185 return kShiftNames[type]; | 185 return kShiftNames[type]; |
186 } | 186 } |
187 | 187 |
188 void Assembler::PrintOperand(const Operand* operand) { | 188 void Assembler::PrintOperand(const Operand* operand) { |
189 printf("%s, %s #%d", ToString(operand->reg()), | 189 printf("%s, %s #%d", ToString(operand->reg()), |
190 ShiftTypeToString(operand->shift_type()), operand->shift_amount()); | 190 ShiftTypeToString(operand->shift_type()), operand->shift_amount()); |
191 } | 191 } |
192 | 192 |
193 } // namespace fletch | 193 } // namespace dartino |
194 | 194 |
195 #endif // defined(FLETCH_TARGET_ARM) | 195 #endif // defined(DARTINO_TARGET_ARM) |
OLD | NEW |