Chromium Code Reviews

Side by Side Diff: src/assembler_constants_ia32.h

Issue 476323004: Start adding an integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: make fixups part of address Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « src/assembler.cpp ('k') | src/assembler_ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4 //
5 // Modified by the Subzero authors.
6 //
7 //===- subzero/src/assembler_constants_ia32.h - x86-32 consts ---*- C++ -*-===//
8 //
9 // The Subzero Code Generator
10 //
11 // This file is distributed under the University of Illinois Open Source
12 // License. See LICENSE.TXT for details.
13 //
14 //===----------------------------------------------------------------------===//
15 //
16 // This file contains constants related to the assembler encoding
17 // of x86-32 operands.
18 //
19 //===----------------------------------------------------------------------===//
20
21 #ifndef SUBZERO_SRC_ASSEMBLER_CONSTANTS_IA32_H_
22 #define SUBZERO_SRC_ASSEMBLER_CONSTANTS_IA32_H_
23
24 namespace Ice {
25 namespace x86 {
26
27 // Unify w/ Ice...
28 enum Register {
29 kFirstFreeCpuRegister = 0,
30 EAX = 0,
31 ECX = 1,
32 EDX = 2,
33 EBX = 3,
34 ESP = 4,
35 EBP = 5,
36 ESI = 6,
37 EDI = 7,
38 kLastFreeCpuRegister = 7,
39 kNoRegister = -1 // Signals an illegal register.
40 };
41
42 // Unify w/ Ice...
43 enum ByteRegister {
44 AL = 0,
45 CL = 1,
46 DL = 2,
47 BL = 3,
48 AH = 4,
49 CH = 5,
50 DH = 6,
51 BH = 7,
52 kNoByteRegister = -1 // Signals an illegal register.
53 };
54
55 // Unify w/ Ice...
56 enum XmmRegister {
57 XMM0 = 0,
58 XMM1 = 1,
59 XMM2 = 2,
60 XMM3 = 3,
61 XMM4 = 4,
62 XMM5 = 5,
63 XMM6 = 6,
64 XMM7 = 7,
65 kNoXmmRegister = -1 // Signals an illegal register.
66 };
67
68 // Unify w/ Ice...
69 enum ScaleFactor { TIMES_1 = 0, TIMES_2 = 1, TIMES_4 = 2, TIMES_8 = 3 };
70
71 // Unify w/ Ice...
72 enum Condition {
73 DID_OVERFLOW = 0,
74 NO_OVERFLOW = 1,
75 BELOW = 2,
76 ABOVE_EQUAL = 3,
77 EQUAL = 4,
78 NOT_EQUAL = 5,
79 BELOW_EQUAL = 6,
80 ABOVE = 7,
81 SIGN = 8,
82 NOT_SIGN = 9,
83 PARITY_EVEN = 10,
84 PARITY_ODD = 11,
85 LESS = 12,
86 GREATER_EQUAL = 13,
87 LESS_EQUAL = 14,
88 GREATER = 15,
89
90 ZERO = EQUAL,
91 NOT_ZERO = NOT_EQUAL,
92 NEGATIVE = SIGN,
93 POSITIVE = NOT_SIGN,
94 CARRY = BELOW,
95 NOT_CARRY = ABOVE_EQUAL
96 };
97
98 // The largest multibyte nop we will emit. This could go up to 15 if it
99 // becomes important to us.
100 const int MAX_NOP_SIZE = 8;
101
102 } // end of namespace x86
103 } // end of namespace Ice
104
105 #endif // SUBZERO_SRC_ASSEMBLER_CONSTANTS_IA32_H_
OLDNEW
« no previous file with comments | « src/assembler.cpp ('k') | src/assembler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine