ec9fd188fcd791d035901097c1a0f5d701236996
[platform/upstream/nodejs.git] / deps / v8 / src / compiler / ia32 / instruction-codes-ia32.h
1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_COMPILER_IA32_INSTRUCTION_CODES_IA32_H_
6 #define V8_COMPILER_IA32_INSTRUCTION_CODES_IA32_H_
7
8 namespace v8 {
9 namespace internal {
10 namespace compiler {
11
12 // IA32-specific opcodes that specify which assembly sequence to emit.
13 // Most opcodes specify a single instruction.
14 #define TARGET_ARCH_OPCODE_LIST(V) \
15   V(IA32Add)                       \
16   V(IA32And)                       \
17   V(IA32Cmp)                       \
18   V(IA32Test)                      \
19   V(IA32Or)                        \
20   V(IA32Xor)                       \
21   V(IA32Sub)                       \
22   V(IA32Imul)                      \
23   V(IA32ImulHigh)                  \
24   V(IA32UmulHigh)                  \
25   V(IA32Idiv)                      \
26   V(IA32Udiv)                      \
27   V(IA32Not)                       \
28   V(IA32Neg)                       \
29   V(IA32Shl)                       \
30   V(IA32Shr)                       \
31   V(IA32Sar)                       \
32   V(IA32Ror)                       \
33   V(SSEFloat64Cmp)                 \
34   V(SSEFloat64Add)                 \
35   V(SSEFloat64Sub)                 \
36   V(SSEFloat64Mul)                 \
37   V(SSEFloat64Div)                 \
38   V(SSEFloat64Mod)                 \
39   V(SSEFloat64Sqrt)                \
40   V(SSEFloat64Floor)               \
41   V(SSEFloat64Ceil)                \
42   V(SSEFloat64RoundTruncate)       \
43   V(SSECvtss2sd)                   \
44   V(SSECvtsd2ss)                   \
45   V(SSEFloat64ToInt32)             \
46   V(SSEFloat64ToUint32)            \
47   V(SSEInt32ToFloat64)             \
48   V(SSEUint32ToFloat64)            \
49   V(AVXFloat64Add)                 \
50   V(AVXFloat64Sub)                 \
51   V(AVXFloat64Mul)                 \
52   V(AVXFloat64Div)                 \
53   V(IA32Movsxbl)                   \
54   V(IA32Movzxbl)                   \
55   V(IA32Movb)                      \
56   V(IA32Movsxwl)                   \
57   V(IA32Movzxwl)                   \
58   V(IA32Movw)                      \
59   V(IA32Movl)                      \
60   V(IA32Movss)                     \
61   V(IA32Movsd)                     \
62   V(IA32Lea)                       \
63   V(IA32Push)                      \
64   V(IA32StoreWriteBarrier)
65
66
67 // Addressing modes represent the "shape" of inputs to an instruction.
68 // Many instructions support multiple addressing modes. Addressing modes
69 // are encoded into the InstructionCode of the instruction and tell the
70 // code generator after register allocation which assembler method to call.
71 //
72 // We use the following local notation for addressing modes:
73 //
74 // M = memory operand
75 // R = base register
76 // N = index register * N for N in {1, 2, 4, 8}
77 // I = immediate displacement (int32_t)
78
79 #define TARGET_ADDRESSING_MODE_LIST(V) \
80   V(MR)   /* [%r1            ] */      \
81   V(MRI)  /* [%r1         + K] */      \
82   V(MR1)  /* [%r1 + %r2*1    ] */      \
83   V(MR2)  /* [%r1 + %r2*2    ] */      \
84   V(MR4)  /* [%r1 + %r2*4    ] */      \
85   V(MR8)  /* [%r1 + %r2*8    ] */      \
86   V(MR1I) /* [%r1 + %r2*1 + K] */      \
87   V(MR2I) /* [%r1 + %r2*2 + K] */      \
88   V(MR4I) /* [%r1 + %r2*3 + K] */      \
89   V(MR8I) /* [%r1 + %r2*4 + K] */      \
90   V(M1)   /* [      %r2*1    ] */      \
91   V(M2)   /* [      %r2*2    ] */      \
92   V(M4)   /* [      %r2*4    ] */      \
93   V(M8)   /* [      %r2*8    ] */      \
94   V(M1I)  /* [      %r2*1 + K] */      \
95   V(M2I)  /* [      %r2*2 + K] */      \
96   V(M4I)  /* [      %r2*4 + K] */      \
97   V(M8I)  /* [      %r2*8 + K] */      \
98   V(MI)   /* [              K] */
99
100 }  // namespace compiler
101 }  // namespace internal
102 }  // namespace v8
103
104 #endif  // V8_COMPILER_IA32_INSTRUCTION_CODES_IA32_H_