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 #ifndef SRC_VM_ASSEMBLER_X86_H_ | 5 #ifndef SRC_VM_ASSEMBLER_X86_H_ |
6 #define SRC_VM_ASSEMBLER_X86_H_ | 6 #define SRC_VM_ASSEMBLER_X86_H_ |
7 | 7 |
8 #ifndef SRC_VM_ASSEMBLER_H_ | 8 #ifndef SRC_VM_ASSEMBLER_H_ |
9 #error Do not include assembler_x86.h directly; use assembler.h instead. | 9 #error Do not include assembler_x86.h directly; use assembler.h instead. |
10 #endif | 10 #endif |
11 | 11 |
12 #include "src/shared/assert.h" | 12 #include "src/shared/assert.h" |
13 #include "src/shared/utils.h" | 13 #include "src/shared/utils.h" |
14 | 14 |
15 namespace fletch { | 15 namespace dartino { |
16 | 16 |
17 extern const char* kLocalLabelPrefix; | 17 extern const char* kLocalLabelPrefix; |
18 | 18 |
19 enum Register { | 19 enum Register { |
20 EAX = 0, | 20 EAX = 0, |
21 ECX = 1, | 21 ECX = 1, |
22 EDX = 2, | 22 EDX = 2, |
23 EBX = 3, | 23 EBX = 3, |
24 ESP = 4, | 24 ESP = 4, |
25 EBP = 5, | 25 EBP = 5, |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 // wrapper too. | 317 // wrapper too. |
318 Register Wrap(Register reg) { return reg; } | 318 Register Wrap(Register reg) { return reg; } |
319 const Address* Wrap(const Address& address) { return &address; } | 319 const Address* Wrap(const Address& address) { return &address; } |
320 const Immediate* Wrap(const Immediate& immediate) { return &immediate; } | 320 const Immediate* Wrap(const Immediate& immediate) { return &immediate; } |
321 }; | 321 }; |
322 | 322 |
323 #undef INSTRUCTION_0 | 323 #undef INSTRUCTION_0 |
324 #undef INSTRUCTION_1 | 324 #undef INSTRUCTION_1 |
325 #undef INSTRUCTION_2 | 325 #undef INSTRUCTION_2 |
326 | 326 |
327 } // namespace fletch | 327 } // namespace dartino |
328 | 328 |
329 #endif // SRC_VM_ASSEMBLER_X86_H_ | 329 #endif // SRC_VM_ASSEMBLER_X86_H_ |
OLD | NEW |