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_IA32) && defined(FLETCH_TARGET_OS_LINUX) | 5 #if defined(DARTINO_TARGET_IA32) && defined(DARTINO_TARGET_OS_LINUX) |
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 const char* kLocalLabelPrefix = ".L"; | 12 const char* kLocalLabelPrefix = ".L"; |
13 | 13 |
14 void Assembler::call(const char* name) { printf("\tcall %s\n", name); } | 14 void Assembler::call(const char* name) { printf("\tcall %s\n", name); } |
15 | 15 |
16 void Assembler::j(Condition condition, const char* name) { | 16 void Assembler::j(Condition condition, const char* name) { |
17 const char* mnemonic = ConditionMnemonic(condition); | 17 const char* mnemonic = ConditionMnemonic(condition); |
18 printf("\tj%s %s\n", mnemonic, name); | 18 printf("\tj%s %s\n", mnemonic, name); |
19 } | 19 } |
20 | 20 |
(...skipping 11 matching lines...) Expand all Loading... |
32 void Assembler::DefineLong(const char* name) { printf("\t.long %s\n", name); } | 32 void Assembler::DefineLong(const char* name) { printf("\t.long %s\n", name); } |
33 | 33 |
34 void Assembler::LoadNative(Register destination, Register index) { | 34 void Assembler::LoadNative(Register destination, Register index) { |
35 Print("movl kNativeTable(,%rl,4), %rl", index, destination); | 35 Print("movl kNativeTable(,%rl,4), %rl", index, destination); |
36 } | 36 } |
37 | 37 |
38 void Assembler::LoadLabel(Register reg, const char* name) { | 38 void Assembler::LoadLabel(Register reg, const char* name) { |
39 Print("leal %s, %rl", name, reg); | 39 Print("leal %s, %rl", name, reg); |
40 } | 40 } |
41 | 41 |
42 } // namespace fletch | 42 } // namespace dartino |
43 | 43 |
44 #endif // defined(FLETCH_TARGET_IA32) && defined(FLETCH_TARGET_OS_LINUX) | 44 #endif // defined(DARTINO_TARGET_IA32) && defined(DARTINO_TARGET_OS_LINUX) |
OLD | NEW |