v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
instruction-codes-ia32.h
Go to the documentation of this file.
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_BACKEND_IA32_INSTRUCTION_CODES_IA32_H_
6
#define V8_COMPILER_BACKEND_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
15
#define TARGET_ARCH_OPCODE_LIST(V) \
16
V(IA32Add) \
17
V(IA32And) \
18
V(IA32Cmp) \
19
V(IA32Cmp16) \
20
V(IA32Cmp8) \
21
V(IA32Test) \
22
V(IA32Test16) \
23
V(IA32Test8) \
24
V(IA32Or) \
25
V(IA32Xor) \
26
V(IA32Sub) \
27
V(IA32Imul) \
28
V(IA32ImulHigh) \
29
V(IA32UmulHigh) \
30
V(IA32Idiv) \
31
V(IA32Udiv) \
32
V(IA32Not) \
33
V(IA32Neg) \
34
V(IA32Shl) \
35
V(IA32Shr) \
36
V(IA32Sar) \
37
V(IA32AddPair) \
38
V(IA32SubPair) \
39
V(IA32MulPair) \
40
V(IA32ShlPair) \
41
V(IA32ShrPair) \
42
V(IA32SarPair) \
43
V(IA32Rol) \
44
V(IA32Ror) \
45
V(IA32Lzcnt) \
46
V(IA32Tzcnt) \
47
V(IA32Popcnt) \
48
V(IA32Bswap) \
49
V(IA32MFence) \
50
V(IA32LFence) \
51
V(IA32Float32Cmp) \
52
V(IA32Float32Sqrt) \
53
V(IA32Float32Round) \
54
V(IA32Float64Cmp) \
55
V(IA32Float64Mod) \
56
V(IA32Float32Max) \
57
V(IA32Float64Max) \
58
V(IA32Float32Min) \
59
V(IA32Float64Min) \
60
V(IA32Float64Sqrt) \
61
V(IA32Float64Round) \
62
V(IA32Float32ToFloat64) \
63
V(IA32Float64ToFloat32) \
64
V(IA32Float32ToInt32) \
65
V(IA32Float32ToUint32) \
66
V(IA32Float64ToInt32) \
67
V(IA32Float64ToUint32) \
68
V(SSEInt32ToFloat32) \
69
V(IA32Uint32ToFloat32) \
70
V(SSEInt32ToFloat64) \
71
V(IA32Uint32ToFloat64) \
72
V(IA32Float64ExtractLowWord32) \
73
V(IA32Float64ExtractHighWord32) \
74
V(IA32Float64InsertLowWord32) \
75
V(IA32Float64InsertHighWord32) \
76
V(IA32Float64FromWord32Pair) \
77
V(IA32Float64LoadLowWord32) \
78
V(IA32Float64SilenceNaN) \
79
V(Float32Add) \
80
V(Float32Sub) \
81
V(Float64Add) \
82
V(Float64Sub) \
83
V(Float32Mul) \
84
V(Float32Div) \
85
V(Float64Mul) \
86
V(Float64Div) \
87
V(Float64Abs) \
88
V(Float64Neg) \
89
V(Float32Abs) \
90
V(Float32Neg) \
91
V(IA32Movsxbl) \
92
V(IA32Movzxbl) \
93
V(IA32Movb) \
94
V(IA32Movsxwl) \
95
V(IA32Movzxwl) \
96
V(IA32Movw) \
97
V(IA32Movl) \
98
V(IA32Movss) \
99
V(IA32Movsd) \
100
V(IA32Movdqu) \
101
V(IA32Movlps) \
102
V(IA32Movhps) \
103
V(IA32BitcastFI) \
104
V(IA32BitcastIF) \
105
V(IA32Blendvpd) \
106
V(IA32Blendvps) \
107
V(IA32Lea) \
108
V(IA32Pblendvb) \
109
V(IA32Push) \
110
V(IA32Poke) \
111
V(IA32Peek) \
112
V(IA32Cvttps2dq) \
113
V(IA32Cvttpd2dq) \
114
V(IA32I32x4TruncF32x4U) \
115
V(IA32I32x4TruncF64x2UZero) \
116
V(IA32F64x2Splat) \
117
V(IA32F64x2ExtractLane) \
118
V(IA32F64x2ReplaceLane) \
119
V(IA32F64x2Sqrt) \
120
V(IA32F64x2Add) \
121
V(IA32F64x2Sub) \
122
V(IA32F64x2Mul) \
123
V(IA32F64x2Div) \
124
V(IA32F64x2Min) \
125
V(IA32F64x2Max) \
126
V(IA32F64x2Eq) \
127
V(IA32F64x2Ne) \
128
V(IA32F64x2Lt) \
129
V(IA32F64x2Le) \
130
V(IA32F64x2Qfma) \
131
V(IA32F64x2Qfms) \
132
V(IA32Minpd) \
133
V(IA32Maxpd) \
134
V(IA32F64x2Round) \
135
V(IA32F64x2ConvertLowI32x4S) \
136
V(IA32F64x2ConvertLowI32x4U) \
137
V(IA32F64x2PromoteLowF32x4) \
138
V(IA32I64x2SplatI32Pair) \
139
V(IA32I64x2ReplaceLaneI32Pair) \
140
V(IA32I64x2Abs) \
141
V(IA32I64x2Neg) \
142
V(IA32I64x2Shl) \
143
V(IA32I64x2ShrS) \
144
V(IA32I64x2Add) \
145
V(IA32I64x2Sub) \
146
V(IA32I64x2Mul) \
147
V(IA32I64x2ShrU) \
148
V(IA32I64x2BitMask) \
149
V(IA32I64x2Eq) \
150
V(IA32I64x2Ne) \
151
V(IA32I64x2GtS) \
152
V(IA32I64x2GeS) \
153
V(IA32I64x2ExtMulLowI32x4S) \
154
V(IA32I64x2ExtMulHighI32x4S) \
155
V(IA32I64x2ExtMulLowI32x4U) \
156
V(IA32I64x2ExtMulHighI32x4U) \
157
V(IA32I64x2SConvertI32x4Low) \
158
V(IA32I64x2SConvertI32x4High) \
159
V(IA32I64x2UConvertI32x4Low) \
160
V(IA32I64x2UConvertI32x4High) \
161
V(IA32F32x4Splat) \
162
V(IA32F32x4ExtractLane) \
163
V(IA32Insertps) \
164
V(IA32F32x4SConvertI32x4) \
165
V(IA32F32x4UConvertI32x4) \
166
V(IA32F32x4Sqrt) \
167
V(IA32F32x4Add) \
168
V(IA32F32x4Sub) \
169
V(IA32F32x4Mul) \
170
V(IA32F32x4Div) \
171
V(IA32F32x4Min) \
172
V(IA32F32x4Max) \
173
V(IA32F32x4Eq) \
174
V(IA32F32x4Ne) \
175
V(IA32F32x4Lt) \
176
V(IA32F32x4Le) \
177
V(IA32F32x4Qfma) \
178
V(IA32F32x4Qfms) \
179
V(IA32Minps) \
180
V(IA32Maxps) \
181
V(IA32F32x4Round) \
182
V(IA32F32x4DemoteF64x2Zero) \
183
V(IA32I32x4Splat) \
184
V(IA32I32x4ExtractLane) \
185
V(IA32I32x4SConvertF32x4) \
186
V(IA32I32x4SConvertI16x8Low) \
187
V(IA32I32x4SConvertI16x8High) \
188
V(IA32I32x4Neg) \
189
V(IA32I32x4Shl) \
190
V(IA32I32x4ShrS) \
191
V(IA32I32x4Add) \
192
V(IA32I32x4Sub) \
193
V(IA32I32x4Mul) \
194
V(IA32I32x4MinS) \
195
V(IA32I32x4MaxS) \
196
V(IA32I32x4Eq) \
197
V(IA32I32x4Ne) \
198
V(IA32I32x4GtS) \
199
V(IA32I32x4GeS) \
200
V(SSEI32x4UConvertF32x4) \
201
V(AVXI32x4UConvertF32x4) \
202
V(IA32I32x4UConvertI16x8Low) \
203
V(IA32I32x4UConvertI16x8High) \
204
V(IA32I32x4ShrU) \
205
V(IA32I32x4MinU) \
206
V(IA32I32x4MaxU) \
207
V(SSEI32x4GtU) \
208
V(AVXI32x4GtU) \
209
V(SSEI32x4GeU) \
210
V(AVXI32x4GeU) \
211
V(IA32I32x4Abs) \
212
V(IA32I32x4BitMask) \
213
V(IA32I32x4DotI16x8S) \
214
V(IA32I32x4DotI8x16I7x16AddS) \
215
V(IA32I32x4ExtMulLowI16x8S) \
216
V(IA32I32x4ExtMulHighI16x8S) \
217
V(IA32I32x4ExtMulLowI16x8U) \
218
V(IA32I32x4ExtMulHighI16x8U) \
219
V(IA32I32x4ExtAddPairwiseI16x8S) \
220
V(IA32I32x4ExtAddPairwiseI16x8U) \
221
V(IA32I32x4TruncSatF64x2SZero) \
222
V(IA32I32x4TruncSatF64x2UZero) \
223
V(IA32I16x8Splat) \
224
V(IA32I16x8ExtractLaneS) \
225
V(IA32I16x8SConvertI8x16Low) \
226
V(IA32I16x8SConvertI8x16High) \
227
V(IA32I16x8Neg) \
228
V(IA32I16x8Shl) \
229
V(IA32I16x8ShrS) \
230
V(IA32I16x8SConvertI32x4) \
231
V(IA32I16x8Add) \
232
V(IA32I16x8AddSatS) \
233
V(IA32I16x8Sub) \
234
V(IA32I16x8SubSatS) \
235
V(IA32I16x8Mul) \
236
V(IA32I16x8MinS) \
237
V(IA32I16x8MaxS) \
238
V(IA32I16x8Eq) \
239
V(SSEI16x8Ne) \
240
V(AVXI16x8Ne) \
241
V(IA32I16x8GtS) \
242
V(SSEI16x8GeS) \
243
V(AVXI16x8GeS) \
244
V(IA32I16x8UConvertI8x16Low) \
245
V(IA32I16x8UConvertI8x16High) \
246
V(IA32I16x8ShrU) \
247
V(IA32I16x8UConvertI32x4) \
248
V(IA32I16x8AddSatU) \
249
V(IA32I16x8SubSatU) \
250
V(IA32I16x8MinU) \
251
V(IA32I16x8MaxU) \
252
V(SSEI16x8GtU) \
253
V(AVXI16x8GtU) \
254
V(SSEI16x8GeU) \
255
V(AVXI16x8GeU) \
256
V(IA32I16x8RoundingAverageU) \
257
V(IA32I16x8Abs) \
258
V(IA32I16x8BitMask) \
259
V(IA32I16x8ExtMulLowI8x16S) \
260
V(IA32I16x8ExtMulHighI8x16S) \
261
V(IA32I16x8ExtMulLowI8x16U) \
262
V(IA32I16x8ExtMulHighI8x16U) \
263
V(IA32I16x8ExtAddPairwiseI8x16S) \
264
V(IA32I16x8ExtAddPairwiseI8x16U) \
265
V(IA32I16x8Q15MulRSatS) \
266
V(IA32I16x8RelaxedQ15MulRS) \
267
V(IA32I8x16Splat) \
268
V(IA32I8x16ExtractLaneS) \
269
V(IA32Pinsrb) \
270
V(IA32Pinsrw) \
271
V(IA32Pinsrd) \
272
V(IA32Pextrb) \
273
V(IA32Pextrw) \
274
V(IA32S128Store32Lane) \
275
V(IA32I8x16SConvertI16x8) \
276
V(IA32I8x16Neg) \
277
V(IA32I8x16Shl) \
278
V(IA32I8x16ShrS) \
279
V(IA32I8x16Add) \
280
V(IA32I8x16AddSatS) \
281
V(IA32I8x16Sub) \
282
V(IA32I8x16SubSatS) \
283
V(IA32I8x16MinS) \
284
V(IA32I8x16MaxS) \
285
V(IA32I8x16Eq) \
286
V(SSEI8x16Ne) \
287
V(AVXI8x16Ne) \
288
V(IA32I8x16GtS) \
289
V(SSEI8x16GeS) \
290
V(AVXI8x16GeS) \
291
V(IA32I8x16UConvertI16x8) \
292
V(IA32I8x16AddSatU) \
293
V(IA32I8x16SubSatU) \
294
V(IA32I8x16ShrU) \
295
V(IA32I8x16MinU) \
296
V(IA32I8x16MaxU) \
297
V(SSEI8x16GtU) \
298
V(AVXI8x16GtU) \
299
V(SSEI8x16GeU) \
300
V(AVXI8x16GeU) \
301
V(IA32I8x16RoundingAverageU) \
302
V(IA32I8x16Abs) \
303
V(IA32I8x16BitMask) \
304
V(IA32I8x16Popcnt) \
305
V(IA32S128Const) \
306
V(IA32S128Zero) \
307
V(IA32S128AllOnes) \
308
V(IA32S128Not) \
309
V(IA32S128And) \
310
V(IA32S128Or) \
311
V(IA32S128Xor) \
312
V(IA32S128Select) \
313
V(IA32S128AndNot) \
314
V(IA32I8x16Swizzle) \
315
V(IA32I8x16Shuffle) \
316
V(IA32S128Load8Splat) \
317
V(IA32S128Load16Splat) \
318
V(IA32S128Load32Splat) \
319
V(IA32S128Load64Splat) \
320
V(IA32S128Load8x8S) \
321
V(IA32S128Load8x8U) \
322
V(IA32S128Load16x4S) \
323
V(IA32S128Load16x4U) \
324
V(IA32S128Load32x2S) \
325
V(IA32S128Load32x2U) \
326
V(IA32S32x4Rotate) \
327
V(IA32S32x4Swizzle) \
328
V(IA32S32x4Shuffle) \
329
V(IA32S16x8Blend) \
330
V(IA32S16x8HalfShuffle1) \
331
V(IA32S16x8HalfShuffle2) \
332
V(IA32S8x16Alignr) \
333
V(IA32S16x8Dup) \
334
V(IA32S8x16Dup) \
335
V(SSES16x8UnzipHigh) \
336
V(AVXS16x8UnzipHigh) \
337
V(SSES16x8UnzipLow) \
338
V(AVXS16x8UnzipLow) \
339
V(SSES8x16UnzipHigh) \
340
V(AVXS8x16UnzipHigh) \
341
V(SSES8x16UnzipLow) \
342
V(AVXS8x16UnzipLow) \
343
V(IA32S64x2UnpackHigh) \
344
V(IA32S32x4UnpackHigh) \
345
V(IA32S16x8UnpackHigh) \
346
V(IA32S8x16UnpackHigh) \
347
V(IA32S64x2UnpackLow) \
348
V(IA32S32x4UnpackLow) \
349
V(IA32S16x8UnpackLow) \
350
V(IA32S8x16UnpackLow) \
351
V(SSES8x16TransposeLow) \
352
V(AVXS8x16TransposeLow) \
353
V(SSES8x16TransposeHigh) \
354
V(AVXS8x16TransposeHigh) \
355
V(SSES8x8Reverse) \
356
V(AVXS8x8Reverse) \
357
V(SSES8x4Reverse) \
358
V(AVXS8x4Reverse) \
359
V(SSES8x2Reverse) \
360
V(AVXS8x2Reverse) \
361
V(IA32S128AnyTrue) \
362
V(IA32I64x2AllTrue) \
363
V(IA32I32x4AllTrue) \
364
V(IA32I16x8AllTrue) \
365
V(IA32I8x16AllTrue) \
366
V(IA32I16x8DotI8x16I7x16S) \
367
V(IA32Word32AtomicPairLoad) \
368
V(IA32Word32ReleasePairStore) \
369
V(IA32Word32SeqCstPairStore) \
370
V(IA32Word32AtomicPairAdd) \
371
V(IA32Word32AtomicPairSub) \
372
V(IA32Word32AtomicPairAnd) \
373
V(IA32Word32AtomicPairOr) \
374
V(IA32Word32AtomicPairXor) \
375
V(IA32Word32AtomicPairExchange) \
376
V(IA32Word32AtomicPairCompareExchange)
377
378
// Addressing modes represent the "shape" of inputs to an instruction.
379
// Many instructions support multiple addressing modes. Addressing modes
380
// are encoded into the InstructionCode of the instruction and tell the
381
// code generator after register allocation which assembler method to call.
382
//
383
// We use the following local notation for addressing modes:
384
//
385
// M = memory operand
386
// R = base register
387
// N = index register * N for N in {1, 2, 4, 8}
388
// I = immediate displacement (int32_t)
389
390
#define TARGET_ADDRESSING_MODE_LIST(V) \
391
V(MR)
/* [%r1 ] */
\
392
V(MRI)
/* [%r1 + K] */
\
393
V(MR1)
/* [%r1 + %r2*1 ] */
\
394
V(MR2)
/* [%r1 + %r2*2 ] */
\
395
V(MR4)
/* [%r1 + %r2*4 ] */
\
396
V(MR8)
/* [%r1 + %r2*8 ] */
\
397
V(MR1I)
/* [%r1 + %r2*1 + K] */
\
398
V(MR2I)
/* [%r1 + %r2*2 + K] */
\
399
V(MR4I)
/* [%r1 + %r2*4 + K] */
\
400
V(MR8I)
/* [%r1 + %r2*8 + K] */
\
401
V(M1)
/* [ %r2*1 ] */
\
402
V(M2)
/* [ %r2*2 ] */
\
403
V(M4)
/* [ %r2*4 ] */
\
404
V(M8)
/* [ %r2*8 ] */
\
405
V(M1I)
/* [ %r2*1 + K] */
\
406
V(M2I)
/* [ %r2*2 + K] */
\
407
V(M4I)
/* [ %r2*4 + K] */
\
408
V(M8I)
/* [ %r2*8 + K] */
\
409
V(MI)
/* [ K] */
\
410
V(Root)
/* [%root + K] */
411
412
}
// namespace compiler
413
}
// namespace internal
414
}
// namespace v8
415
416
#endif
// V8_COMPILER_BACKEND_IA32_INSTRUCTION_CODES_IA32_H_
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
src
compiler
backend
ia32
instruction-codes-ia32.h
Generated on Sun Apr 6 2025 21:08:51 for v8 by
1.12.0