| 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) && defined(FLETCH_TARGET_OS_MACOS) | 5 #if defined(DARTINO_TARGET_ARM) && defined(DARTINO_TARGET_OS_MACOS) |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 #include "src/vm/assembler.h" | 8 #include "src/vm/assembler.h" |
| 9 | 9 |
| 10 namespace fletch { | 10 namespace dartino { |
| 11 | 11 |
| 12 #if defined(FLETCH_TARGET_ANDROID) | 12 #if defined(DARTINO_TARGET_ANDROID) |
| 13 static const char* kPrefix = ""; | 13 static const char* kPrefix = ""; |
| 14 #else | 14 #else |
| 15 static const char* kPrefix = "_"; | 15 static const char* kPrefix = "_"; |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 void Assembler::Bind(const char* prefix, const char* name) { | 18 void Assembler::Bind(const char* prefix, const char* name) { |
| 19 putchar('\n'); | 19 putchar('\n'); |
| 20 printf("\t.code 32\n"); | 20 printf("\t.code 32\n"); |
| 21 printf("\t.global %s%s%s\n", kPrefix, prefix, name); | 21 printf("\t.global %s%s%s\n", kPrefix, prefix, name); |
| 22 printf("%s%s%s:\n", kPrefix, prefix, name); | 22 printf("%s%s%s:\n", kPrefix, prefix, name); |
| 23 } | 23 } |
| 24 | 24 |
| 25 void Assembler::DefineLong(const char* name) { | 25 void Assembler::DefineLong(const char* name) { |
| 26 printf("\t.long %s%s\n", kPrefix, name); | 26 printf("\t.long %s%s\n", kPrefix, name); |
| 27 } | 27 } |
| 28 | 28 |
| 29 const char* Assembler::LabelPrefix() { return kPrefix; } | 29 const char* Assembler::LabelPrefix() { return kPrefix; } |
| 30 | 30 |
| 31 } // namespace fletch | 31 } // namespace dartino |
| 32 | 32 |
| 33 #endif // defined(FLETCH_TARGET_ARM) && defined(FLETCH_TARGET_OS_MACOS) | 33 #endif // defined(DARTINO_TARGET_ARM) && defined(DARTINO_TARGET_OS_MACOS) |
| OLD | NEW |