MimIR
0.6-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
Loading...
Searching...
No Matches
autogen.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
mim/axm.h
>
4
#include <
mim/plugin.h
>
5
6
/// @namespace mim::plug::x86 @ref x86
7
namespace
mim
{
8
namespace
plug::x86
{
9
10
static
constexpr
plugin_t
Plugin_Id
= 0x67ef000000000000;
11
12
/// @name `x86.Addr`
13
///@{
14
enum class
Addr
:
flags_t
{
15
};
16
17
///@}
18
19
/// @name `x86.Base`
20
///@{
21
enum class
Base
:
flags_t
{
22
};
23
24
///@}
25
26
/// @name `x86.Index`
27
///@{
28
enum class
Index
:
flags_t
{
29
};
30
31
///@}
32
33
/// @name `x86.addr`
34
///@{
35
enum class
addr
:
flags_t
{
36
};
37
38
const
Def
*
normalize_addr
(
const
Def
*,
const
Def
*,
const
Def
*);
39
///@}
40
41
/// @name `x86.index`
42
///@{
43
enum class
index
:
flags_t
{
44
};
45
46
///@}
47
48
/// @name `x86.scale_1`
49
///@{
50
enum class
scale_1
:
flags_t
{
51
};
52
53
///@}
54
55
/// @name `x86.scale_2`
56
///@{
57
enum class
scale_2
:
flags_t
{
58
};
59
60
///@}
61
62
/// @name `x86.scale_4`
63
///@{
64
enum class
scale_4
:
flags_t
{
65
};
66
67
///@}
68
69
/// @name `x86.scale_8`
70
///@{
71
enum class
scale_8
:
flags_t
{
72
};
73
74
///@}
75
76
/// @name `x86.is_gpr`
77
///@{
78
enum class
is_gpr
:
flags_t
{
79
};
80
81
///@}
82
83
/// @name `x86.gpr`
84
///@{
85
enum class
gpr
:
flags_t
{
86
};
87
88
///@}
89
90
/// @name `x86.gpr16`
91
///@{
92
enum class
gpr16
:
flags_t
{
93
};
94
95
///@}
96
97
/// @name `x86.logic`
98
///@{
99
enum class
logic
:
flags_t
{
100
};
101
102
///@}
103
104
/// @name `x86.rm`
105
///@{
106
enum class
rm
:
flags_t
{
107
};
108
109
///@}
110
111
/// @name `x86.rm1`
112
///@{
113
enum class
rm1
:
flags_t
{
114
};
115
116
///@}
117
118
/// @name `x86.mr`
119
///@{
120
enum class
mr
:
flags_t
{
121
};
122
123
///@}
124
125
/// @name `x86.reg`
126
///@{
127
enum class
reg
:
flags_t
{
128
rax
= 0x67ef000000001000,
129
rcx
= 0x67ef000000001001,
130
rdx
= 0x67ef000000001002,
131
rbx
= 0x67ef000000001003,
132
rsp
= 0x67ef000000001004,
133
rbp
= 0x67ef000000001005,
134
rsi
= 0x67ef000000001006,
135
rdi
= 0x67ef000000001007,
136
r8
= 0x67ef000000001008,
137
r9
= 0x67ef000000001009,
138
r10
= 0x67ef00000000100a,
139
r11
= 0x67ef00000000100b,
140
r12
= 0x67ef00000000100c,
141
r13
= 0x67ef00000000100d,
142
r14
= 0x67ef00000000100e,
143
r15
= 0x67ef00000000100f,
144
};
145
146
///@}
147
148
/// @name `x86.xmm`
149
///@{
150
enum class
xmm
:
flags_t
{
151
xmm0
= 0x67ef000000001100,
152
xmm1
= 0x67ef000000001101,
153
xmm2
= 0x67ef000000001102,
154
xmm3
= 0x67ef000000001103,
155
xmm4
= 0x67ef000000001104,
156
xmm5
= 0x67ef000000001105,
157
xmm6
= 0x67ef000000001106,
158
xmm7
= 0x67ef000000001107,
159
xmm8
= 0x67ef000000001108,
160
xmm9
= 0x67ef000000001109,
161
xmm10
= 0x67ef00000000110a,
162
xmm11
= 0x67ef00000000110b,
163
xmm12
= 0x67ef00000000110c,
164
xmm13
= 0x67ef00000000110d,
165
xmm14
= 0x67ef00000000110e,
166
xmm15
= 0x67ef00000000110f,
167
};
168
169
///@}
170
171
/// @name `x86.lea`
172
///@{
173
enum class
lea
:
flags_t
{
174
};
175
176
const
Def
*
normalize_lea
(
const
Def
*,
const
Def
*,
const
Def
*);
177
///@}
178
179
/// @name `x86.mov`
180
///@{
181
enum class
mov
:
flags_t
{
182
};
183
184
///@}
185
186
/// @name `x86.load`
187
///@{
188
enum class
load
:
flags_t
{
189
};
190
191
///@}
192
193
/// @name `x86.store`
194
///@{
195
enum class
store
:
flags_t
{
196
};
197
198
///@}
199
200
/// @name `x86.add`
201
///@{
202
enum class
add
:
flags_t
{
203
};
204
205
///@}
206
207
/// @name `x86.sub`
208
///@{
209
enum class
sub
:
flags_t
{
210
};
211
212
///@}
213
214
/// @name `x86.and`
215
///@{
216
enum class
and_
:
flags_t
{
217
};
218
219
///@}
220
221
/// @name `x86.or`
222
///@{
223
enum class
or_
:
flags_t
{
224
};
225
226
///@}
227
228
/// @name `x86.xor`
229
///@{
230
enum class
xor_
:
flags_t
{
231
};
232
233
///@}
234
235
/// @name `x86.imul`
236
///@{
237
enum class
imul
:
flags_t
{
238
};
239
240
///@}
241
242
/// @name `x86.add3`
243
///@{
244
enum class
add3
:
flags_t
{
245
};
246
247
///@}
248
249
/// @name `x86.rsub`
250
///@{
251
enum class
rsub
:
flags_t
{
252
};
253
254
///@}
255
256
/// @name `x86.imul3`
257
///@{
258
enum class
imul3
:
flags_t
{
259
};
260
261
///@}
262
263
/// @name `x86.div`
264
///@{
265
enum class
div
:
flags_t
{
266
};
267
268
///@}
269
270
/// @name `x86.idiv`
271
///@{
272
enum class
idiv
:
flags_t
{
273
};
274
275
///@}
276
277
/// @name `x86.shl`
278
///@{
279
enum class
shl
:
flags_t
{
280
};
281
282
///@}
283
284
/// @name `x86.shr`
285
///@{
286
enum class
shr
:
flags_t
{
287
};
288
289
///@}
290
291
/// @name `x86.sar`
292
///@{
293
enum class
sar
:
flags_t
{
294
};
295
296
///@}
297
298
/// @name `x86.movzx`
299
///@{
300
enum class
movzx
:
flags_t
{
301
};
302
303
const
Def
*
normalize_movzx
(
const
Def
*,
const
Def
*,
const
Def
*);
304
///@}
305
306
/// @name `x86.movsx`
307
///@{
308
enum class
movsx
:
flags_t
{
309
};
310
311
const
Def
*
normalize_movsx
(
const
Def
*,
const
Def
*,
const
Def
*);
312
///@}
313
314
/// @name `x86.trunc`
315
///@{
316
enum class
trunc
:
flags_t
{
317
};
318
319
const
Def
*
normalize_trunc
(
const
Def
*,
const
Def
*,
const
Def
*);
320
///@}
321
322
/// @name `x86.zero`
323
///@{
324
enum class
zero
:
flags_t
{
325
};
326
327
///@}
328
329
/// @name `x86.cmp`
330
///@{
331
enum class
cmp
:
flags_t
{
332
};
333
334
///@}
335
336
/// @name `x86.test`
337
///@{
338
enum class
test
:
flags_t
{
339
};
340
341
///@}
342
343
/// @name `x86.cc`
344
///@{
345
enum class
cc
:
flags_t
{
346
o = 0x67ef000000002a00,
347
no
= 0x67ef000000002a01,
348
b
= 0x67ef000000002a02,
349
ae
= 0x67ef000000002a03,
350
e = 0x67ef000000002a04,
351
ne = 0x67ef000000002a05,
352
be
= 0x67ef000000002a06,
353
a = 0x67ef000000002a07,
354
s = 0x67ef000000002a08,
355
ns
= 0x67ef000000002a09,
356
p
= 0x67ef000000002a0a,
357
np
= 0x67ef000000002a0b,
358
l = 0x67ef000000002a0c,
359
ge = 0x67ef000000002a0d,
360
le = 0x67ef000000002a0e,
361
g = 0x67ef000000002a0f,
362
};
363
364
///@}
365
366
/// @name `x86.cmovcc`
367
///@{
368
enum class
cmovcc
:
flags_t
{
369
o = 0x67ef000000002b00,
370
no
= 0x67ef000000002b01,
371
b
= 0x67ef000000002b02,
372
ae
= 0x67ef000000002b03,
373
e = 0x67ef000000002b04,
374
ne = 0x67ef000000002b05,
375
be
= 0x67ef000000002b06,
376
a = 0x67ef000000002b07,
377
s = 0x67ef000000002b08,
378
ns
= 0x67ef000000002b09,
379
p
= 0x67ef000000002b0a,
380
np
= 0x67ef000000002b0b,
381
l = 0x67ef000000002b0c,
382
ge = 0x67ef000000002b0d,
383
le = 0x67ef000000002b0e,
384
g = 0x67ef000000002b0f,
385
};
386
387
template
<cmovcc>
388
const
Def
*
normalize_cmovcc
(
const
Def
*,
const
Def
*,
const
Def
*);
389
390
///@}
391
392
/// @name `x86.fmov`
393
///@{
394
enum class
fmov
:
flags_t
{
395
};
396
397
///@}
398
399
/// @name `x86.fload`
400
///@{
401
enum class
fload
:
flags_t
{
402
};
403
404
///@}
405
406
/// @name `x86.fstore`
407
///@{
408
enum class
fstore
:
flags_t
{
409
};
410
411
///@}
412
413
/// @name `x86.fadd`
414
///@{
415
enum class
fadd
:
flags_t
{
416
};
417
418
///@}
419
420
/// @name `x86.fsub`
421
///@{
422
enum class
fsub
:
flags_t
{
423
};
424
425
///@}
426
427
/// @name `x86.fmul`
428
///@{
429
enum class
fmul
:
flags_t
{
430
};
431
432
///@}
433
434
/// @name `x86.fdiv`
435
///@{
436
enum class
fdiv
:
flags_t
{
437
};
438
439
///@}
440
441
/// @name `x86.fsqrt`
442
///@{
443
enum class
fsqrt
:
flags_t
{
444
};
445
446
///@}
447
448
/// @name `x86.fabs`
449
///@{
450
enum class
fabs
:
flags_t
{
451
};
452
453
///@}
454
455
/// @name `x86.fcmp`
456
///@{
457
enum class
fcmp
:
flags_t
{
458
f = 0x67ef000000003500,
459
e = 0x67ef000000003501,
460
l = 0x67ef000000003502,
461
le = 0x67ef000000003503,
462
g = 0x67ef000000003504,
463
ge = 0x67ef000000003505,
464
ne = 0x67ef000000003506,
465
o = 0x67ef000000003507,
466
u = 0x67ef000000003508,
467
ue = 0x67ef000000003509,
468
ul = 0x67ef00000000350a,
469
ule = 0x67ef00000000350b,
470
ug = 0x67ef00000000350c,
471
uge = 0x67ef00000000350d,
472
une = 0x67ef00000000350e,
473
t = 0x67ef00000000350f,
474
};
475
476
///@}
477
478
/// @name `x86.fsel`
479
///@{
480
enum class
fsel
:
flags_t
{
481
};
482
483
///@}
484
485
/// @name `x86.i2f`
486
///@{
487
enum class
i2f
:
flags_t
{
488
};
489
490
///@}
491
492
/// @name `x86.u2f`
493
///@{
494
enum class
u2f
:
flags_t
{
495
};
496
497
///@}
498
499
/// @name `x86.f2i`
500
///@{
501
enum class
f2i
:
flags_t
{
502
};
503
504
///@}
505
506
/// @name `x86.f2u`
507
///@{
508
enum class
f2u
:
flags_t
{
509
};
510
511
///@}
512
513
/// @name `x86.f2f`
514
///@{
515
enum class
f2f
:
flags_t
{
516
};
517
518
///@}
519
520
/// @name `x86.isel`
521
///@{
522
enum class
isel
:
flags_t
{
523
};
524
525
///@}
526
527
/// @name `x86.emit`
528
///@{
529
enum class
emit
:
flags_t
{
530
};
531
532
///@}
533
534
void
register_normalizers
(
Normalizers
& normalizers);
535
536
#define MIM_x86_NORMALIZER_IMPL \
537
void register_normalizers(Normalizers& normalizers) {\
538
normalizers[flags_t(Annex::Base<addr>)] = &normalize_addr; \
539
normalizers[flags_t(Annex::Base<lea>)] = &normalize_lea; \
540
normalizers[flags_t(Annex::Base<movzx>)] = &normalize_movzx; \
541
normalizers[flags_t(Annex::Base<movsx>)] = &normalize_movsx; \
542
normalizers[flags_t(Annex::Base<trunc>)] = &normalize_trunc; \
543
normalizers[flags_t(cmovcc::o)] = &normalize_cmovcc<cmovcc::o>; \
544
normalizers[flags_t(cmovcc::no)] = &normalize_cmovcc<cmovcc::no>; \
545
normalizers[flags_t(cmovcc::b)] = &normalize_cmovcc<cmovcc::b>; \
546
normalizers[flags_t(cmovcc::ae)] = &normalize_cmovcc<cmovcc::ae>; \
547
normalizers[flags_t(cmovcc::e)] = &normalize_cmovcc<cmovcc::e>; \
548
normalizers[flags_t(cmovcc::ne)] = &normalize_cmovcc<cmovcc::ne>; \
549
normalizers[flags_t(cmovcc::be)] = &normalize_cmovcc<cmovcc::be>; \
550
normalizers[flags_t(cmovcc::a)] = &normalize_cmovcc<cmovcc::a>; \
551
normalizers[flags_t(cmovcc::s)] = &normalize_cmovcc<cmovcc::s>; \
552
normalizers[flags_t(cmovcc::ns)] = &normalize_cmovcc<cmovcc::ns>; \
553
normalizers[flags_t(cmovcc::p)] = &normalize_cmovcc<cmovcc::p>; \
554
normalizers[flags_t(cmovcc::np)] = &normalize_cmovcc<cmovcc::np>; \
555
normalizers[flags_t(cmovcc::l)] = &normalize_cmovcc<cmovcc::l>; \
556
normalizers[flags_t(cmovcc::ge)] = &normalize_cmovcc<cmovcc::ge>; \
557
normalizers[flags_t(cmovcc::le)] = &normalize_cmovcc<cmovcc::le>; \
558
normalizers[flags_t(cmovcc::g)] = &normalize_cmovcc<cmovcc::g>; \
559
}
560
}
// namespace plug::x86
561
562
#ifndef DOXYGEN
// don't include in Doxygen documentation
563
564
template
<>
constexpr
flags_t
Annex::Base<plug::x86::Addr>
= 0x67ef000000000000;
565
template
<>
constexpr
size_t
Annex::Num<plug::x86::Addr>
= 0;
566
template
<>
constexpr
flags_t
Annex::Base<plug::x86::Base>
= 0x67ef000000000100;
567
template
<>
constexpr
size_t
Annex::Num<plug::x86::Base>
= 0;
568
template
<>
constexpr
flags_t
Annex::Base<plug::x86::Index>
= 0x67ef000000000200;
569
template
<>
constexpr
size_t
Annex::Num<plug::x86::Index>
= 0;
570
template
<>
constexpr
flags_t
Annex::Base<plug::x86::addr>
= 0x67ef000000000300;
571
template
<>
constexpr
size_t
Annex::Num<plug::x86::addr>
= 0;
572
template
<>
constexpr
flags_t
Annex::Base<plug::x86::index>
= 0x67ef000000000400;
573
template
<>
constexpr
size_t
Annex::Num<plug::x86::index>
= 0;
574
template
<>
constexpr
flags_t
Annex::Base<plug::x86::scale_1>
= 0x67ef000000000500;
575
template
<>
constexpr
size_t
Annex::Num<plug::x86::scale_1>
= 0;
576
template
<>
constexpr
flags_t
Annex::Base<plug::x86::scale_2>
= 0x67ef000000000600;
577
template
<>
constexpr
size_t
Annex::Num<plug::x86::scale_2>
= 0;
578
template
<>
constexpr
flags_t
Annex::Base<plug::x86::scale_4>
= 0x67ef000000000700;
579
template
<>
constexpr
size_t
Annex::Num<plug::x86::scale_4>
= 0;
580
template
<>
constexpr
flags_t
Annex::Base<plug::x86::scale_8>
= 0x67ef000000000800;
581
template
<>
constexpr
size_t
Annex::Num<plug::x86::scale_8>
= 0;
582
template
<>
constexpr
flags_t
Annex::Base<plug::x86::is_gpr>
= 0x67ef000000000900;
583
template
<>
constexpr
size_t
Annex::Num<plug::x86::is_gpr>
= 0;
584
template
<>
constexpr
flags_t
Annex::Base<plug::x86::gpr>
= 0x67ef000000000a00;
585
template
<>
constexpr
size_t
Annex::Num<plug::x86::gpr>
= 0;
586
template
<>
constexpr
flags_t
Annex::Base<plug::x86::gpr16>
= 0x67ef000000000b00;
587
template
<>
constexpr
size_t
Annex::Num<plug::x86::gpr16>
= 0;
588
template
<>
constexpr
flags_t
Annex::Base<plug::x86::logic>
= 0x67ef000000000c00;
589
template
<>
constexpr
size_t
Annex::Num<plug::x86::logic>
= 0;
590
template
<>
constexpr
flags_t
Annex::Base<plug::x86::rm>
= 0x67ef000000000d00;
591
template
<>
constexpr
size_t
Annex::Num<plug::x86::rm>
= 0;
592
template
<>
constexpr
flags_t
Annex::Base<plug::x86::rm1>
= 0x67ef000000000e00;
593
template
<>
constexpr
size_t
Annex::Num<plug::x86::rm1>
= 0;
594
template
<>
constexpr
flags_t
Annex::Base<plug::x86::mr>
= 0x67ef000000000f00;
595
template
<>
constexpr
size_t
Annex::Num<plug::x86::mr>
= 0;
596
template
<>
constexpr
flags_t
Annex::Base<plug::x86::reg>
= 0x67ef000000001000;
597
template
<>
constexpr
size_t
Annex::Num<plug::x86::reg>
= 16;
598
template
<>
constexpr
flags_t
Annex::Base<plug::x86::xmm>
= 0x67ef000000001100;
599
template
<>
constexpr
size_t
Annex::Num<plug::x86::xmm>
= 16;
600
template
<>
constexpr
flags_t
Annex::Base<plug::x86::lea>
= 0x67ef000000001200;
601
template
<>
constexpr
size_t
Annex::Num<plug::x86::lea>
= 0;
602
template
<>
constexpr
flags_t
Annex::Base<plug::x86::mov>
= 0x67ef000000001300;
603
template
<>
constexpr
size_t
Annex::Num<plug::x86::mov>
= 0;
604
template
<>
constexpr
flags_t
Annex::Base<plug::x86::load>
= 0x67ef000000001400;
605
template
<>
constexpr
size_t
Annex::Num<plug::x86::load>
= 0;
606
template
<>
constexpr
flags_t
Annex::Base<plug::x86::store>
= 0x67ef000000001500;
607
template
<>
constexpr
size_t
Annex::Num<plug::x86::store>
= 0;
608
template
<>
constexpr
flags_t
Annex::Base<plug::x86::add>
= 0x67ef000000001600;
609
template
<>
constexpr
size_t
Annex::Num<plug::x86::add>
= 0;
610
template
<>
constexpr
flags_t
Annex::Base<plug::x86::sub>
= 0x67ef000000001700;
611
template
<>
constexpr
size_t
Annex::Num<plug::x86::sub>
= 0;
612
template
<>
constexpr
flags_t
Annex::Base<plug::x86::and_>
= 0x67ef000000001800;
613
template
<>
constexpr
size_t
Annex::Num<plug::x86::and_>
= 0;
614
template
<>
constexpr
flags_t
Annex::Base<plug::x86::or_>
= 0x67ef000000001900;
615
template
<>
constexpr
size_t
Annex::Num<plug::x86::or_>
= 0;
616
template
<>
constexpr
flags_t
Annex::Base<plug::x86::xor_>
= 0x67ef000000001a00;
617
template
<>
constexpr
size_t
Annex::Num<plug::x86::xor_>
= 0;
618
template
<>
constexpr
flags_t
Annex::Base<plug::x86::imul>
= 0x67ef000000001b00;
619
template
<>
constexpr
size_t
Annex::Num<plug::x86::imul>
= 0;
620
template
<>
constexpr
flags_t
Annex::Base<plug::x86::add3>
= 0x67ef000000001c00;
621
template
<>
constexpr
size_t
Annex::Num<plug::x86::add3>
= 0;
622
template
<>
constexpr
flags_t
Annex::Base<plug::x86::rsub>
= 0x67ef000000001d00;
623
template
<>
constexpr
size_t
Annex::Num<plug::x86::rsub>
= 0;
624
template
<>
constexpr
flags_t
Annex::Base<plug::x86::imul3>
= 0x67ef000000001e00;
625
template
<>
constexpr
size_t
Annex::Num<plug::x86::imul3>
= 0;
626
template
<>
constexpr
flags_t
Annex::Base<plug::x86::div>
= 0x67ef000000001f00;
627
template
<>
constexpr
size_t
Annex::Num<plug::x86::div>
= 0;
628
template
<>
constexpr
flags_t
Annex::Base<plug::x86::idiv>
= 0x67ef000000002000;
629
template
<>
constexpr
size_t
Annex::Num<plug::x86::idiv>
= 0;
630
template
<>
constexpr
flags_t
Annex::Base<plug::x86::shl>
= 0x67ef000000002100;
631
template
<>
constexpr
size_t
Annex::Num<plug::x86::shl>
= 0;
632
template
<>
constexpr
flags_t
Annex::Base<plug::x86::shr>
= 0x67ef000000002200;
633
template
<>
constexpr
size_t
Annex::Num<plug::x86::shr>
= 0;
634
template
<>
constexpr
flags_t
Annex::Base<plug::x86::sar>
= 0x67ef000000002300;
635
template
<>
constexpr
size_t
Annex::Num<plug::x86::sar>
= 0;
636
template
<>
constexpr
flags_t
Annex::Base<plug::x86::movzx>
= 0x67ef000000002400;
637
template
<>
constexpr
size_t
Annex::Num<plug::x86::movzx>
= 0;
638
template
<>
constexpr
flags_t
Annex::Base<plug::x86::movsx>
= 0x67ef000000002500;
639
template
<>
constexpr
size_t
Annex::Num<plug::x86::movsx>
= 0;
640
template
<>
constexpr
flags_t
Annex::Base<plug::x86::trunc>
= 0x67ef000000002600;
641
template
<>
constexpr
size_t
Annex::Num<plug::x86::trunc>
= 0;
642
template
<>
constexpr
flags_t
Annex::Base<plug::x86::zero>
= 0x67ef000000002700;
643
template
<>
constexpr
size_t
Annex::Num<plug::x86::zero>
= 0;
644
template
<>
constexpr
flags_t
Annex::Base<plug::x86::cmp>
= 0x67ef000000002800;
645
template
<>
constexpr
size_t
Annex::Num<plug::x86::cmp>
= 0;
646
template
<>
constexpr
flags_t
Annex::Base<plug::x86::test>
= 0x67ef000000002900;
647
template
<>
constexpr
size_t
Annex::Num<plug::x86::test>
= 0;
648
template
<>
constexpr
flags_t
Annex::Base<plug::x86::cc>
= 0x67ef000000002a00;
649
template
<>
constexpr
size_t
Annex::Num<plug::x86::cc>
= 16;
650
template
<>
constexpr
flags_t
Annex::Base<plug::x86::cmovcc>
= 0x67ef000000002b00;
651
template
<>
constexpr
size_t
Annex::Num<plug::x86::cmovcc>
= 16;
652
template
<>
constexpr
flags_t
Annex::Base<plug::x86::fmov>
= 0x67ef000000002c00;
653
template
<>
constexpr
size_t
Annex::Num<plug::x86::fmov>
= 0;
654
template
<>
constexpr
flags_t
Annex::Base<plug::x86::fload>
= 0x67ef000000002d00;
655
template
<>
constexpr
size_t
Annex::Num<plug::x86::fload>
= 0;
656
template
<>
constexpr
flags_t
Annex::Base<plug::x86::fstore>
= 0x67ef000000002e00;
657
template
<>
constexpr
size_t
Annex::Num<plug::x86::fstore>
= 0;
658
template
<>
constexpr
flags_t
Annex::Base<plug::x86::fadd>
= 0x67ef000000002f00;
659
template
<>
constexpr
size_t
Annex::Num<plug::x86::fadd>
= 0;
660
template
<>
constexpr
flags_t
Annex::Base<plug::x86::fsub>
= 0x67ef000000003000;
661
template
<>
constexpr
size_t
Annex::Num<plug::x86::fsub>
= 0;
662
template
<>
constexpr
flags_t
Annex::Base<plug::x86::fmul>
= 0x67ef000000003100;
663
template
<>
constexpr
size_t
Annex::Num<plug::x86::fmul>
= 0;
664
template
<>
constexpr
flags_t
Annex::Base<plug::x86::fdiv>
= 0x67ef000000003200;
665
template
<>
constexpr
size_t
Annex::Num<plug::x86::fdiv>
= 0;
666
template
<>
constexpr
flags_t
Annex::Base<plug::x86::fsqrt>
= 0x67ef000000003300;
667
template
<>
constexpr
size_t
Annex::Num<plug::x86::fsqrt>
= 0;
668
template
<>
constexpr
flags_t
Annex::Base<plug::x86::fabs>
= 0x67ef000000003400;
669
template
<>
constexpr
size_t
Annex::Num<plug::x86::fabs>
= 0;
670
template
<>
constexpr
flags_t
Annex::Base<plug::x86::fcmp>
= 0x67ef000000003500;
671
template
<>
constexpr
size_t
Annex::Num<plug::x86::fcmp>
= 16;
672
template
<>
constexpr
flags_t
Annex::Base<plug::x86::fsel>
= 0x67ef000000003600;
673
template
<>
constexpr
size_t
Annex::Num<plug::x86::fsel>
= 0;
674
template
<>
constexpr
flags_t
Annex::Base<plug::x86::i2f>
= 0x67ef000000003700;
675
template
<>
constexpr
size_t
Annex::Num<plug::x86::i2f>
= 0;
676
template
<>
constexpr
flags_t
Annex::Base<plug::x86::u2f>
= 0x67ef000000003800;
677
template
<>
constexpr
size_t
Annex::Num<plug::x86::u2f>
= 0;
678
template
<>
constexpr
flags_t
Annex::Base<plug::x86::f2i>
= 0x67ef000000003900;
679
template
<>
constexpr
size_t
Annex::Num<plug::x86::f2i>
= 0;
680
template
<>
constexpr
flags_t
Annex::Base<plug::x86::f2u>
= 0x67ef000000003a00;
681
template
<>
constexpr
size_t
Annex::Num<plug::x86::f2u>
= 0;
682
template
<>
constexpr
flags_t
Annex::Base<plug::x86::f2f>
= 0x67ef000000003b00;
683
template
<>
constexpr
size_t
Annex::Num<plug::x86::f2f>
= 0;
684
template
<>
constexpr
flags_t
Annex::Base<plug::x86::isel>
= 0x67ef000000003c00;
685
template
<>
constexpr
size_t
Annex::Num<plug::x86::isel>
= 0;
686
template
<>
constexpr
flags_t
Annex::Base<plug::x86::emit>
= 0x67ef000000003d00;
687
template
<>
constexpr
size_t
Annex::Num<plug::x86::emit>
= 0;
688
689
template
<>
struct
Axm::IsANode
<
plug
::x86::Base> {
using
type
=
Axm
; };
690
template
<>
struct
Axm::IsANode
<
plug
::x86::Index> {
using
type
=
Axm
; };
691
template
<>
struct
Axm::IsANode
<
plug
::x86::scale_1> {
using
type
=
Axm
; };
692
template
<>
struct
Axm::IsANode
<
plug
::x86::scale_2> {
using
type
=
Axm
; };
693
template
<>
struct
Axm::IsANode
<
plug
::x86::scale_4> {
using
type
=
Axm
; };
694
template
<>
struct
Axm::IsANode
<
plug
::x86::scale_8> {
using
type
=
Axm
; };
695
template
<>
struct
Axm::IsANode
<
plug
::x86::is_gpr> {
using
type
=
Axm
; };
696
template
<>
struct
Axm::IsANode
<
plug
::x86::gpr> {
using
type
=
Axm
; };
697
template
<>
struct
Axm::IsANode
<
plug
::x86::gpr16> {
using
type
=
Axm
; };
698
template
<>
struct
Axm::IsANode
<
plug
::x86::logic> {
using
type
=
Axm
; };
699
template
<>
struct
Axm::IsANode
<
plug
::x86::reg> {
using
type
=
Axm
; };
700
template
<>
struct
Axm::IsANode
<
plug
::x86::xmm> {
using
type
=
Axm
; };
701
template
<>
struct
Axm::IsANode
<
plug
::x86::isel> {
using
type
=
Axm
; };
702
template
<>
struct
Axm::IsANode
<
plug
::x86::emit> {
using
type
=
Axm
; };
703
704
#endif
705
}
// namespace mim
706
707
#ifndef DOXYGEN
// don't include in Doxygen documentation
708
709
template
<>
struct
fe::is_bit_enum<
mim
::plug::x86::reg> : std::true_type {};
710
template
<>
struct
fe::is_bit_enum<
mim
::plug::x86::xmm> : std::true_type {};
711
template
<>
struct
fe::is_bit_enum<
mim
::plug::x86::cc> : std::true_type {};
712
template
<>
struct
fe::is_bit_enum<
mim
::plug::x86::cmovcc> : std::true_type {};
713
template
<>
struct
fe::is_bit_enum<
mim
::plug::x86::fcmp> : std::true_type {};
714
715
#endif
axm.h
mim::Axm::IsANode::type
App type
Definition
axm.h:70
mim::Axm::IsANode
Definition
axm.h:69
mim::Def
Base class for all Defs.
Definition
def.h:285
mim::plug::x86
The x86 Plugin
Definition
emit.h:9
mim::plug::x86::sub
sub
Definition
autogen.h:209
mim::plug::x86::fstore
fstore
Definition
autogen.h:408
mim::plug::x86::mr
mr
Definition
autogen.h:120
mim::plug::x86::fmov
fmov
Definition
autogen.h:394
mim::plug::x86::movzx
movzx
Definition
autogen.h:300
mim::plug::x86::emit
emit
Definition
autogen.h:529
mim::plug::x86::normalize_trunc
const Def * normalize_trunc(const Def *type, const Def *, const Def *x)
Definition
normalizers.cpp:12
mim::plug::x86::fcmp
fcmp
Definition
autogen.h:457
mim::plug::x86::div
div
Definition
autogen.h:265
mim::plug::x86::imul3
imul3
Definition
autogen.h:258
mim::plug::x86::gpr
gpr
Definition
autogen.h:85
mim::plug::x86::test
test
Definition
autogen.h:338
mim::plug::x86::fmul
fmul
Definition
autogen.h:429
mim::plug::x86::add
add
Definition
autogen.h:202
mim::plug::x86::is_gpr
is_gpr
Definition
autogen.h:78
mim::plug::x86::scale_8
scale_8
Definition
autogen.h:71
mim::plug::x86::fabs
fabs
Definition
autogen.h:450
mim::plug::x86::normalize_addr
const Def * normalize_addr(const Def *type, const Def *, const Def *arg)
Definition
normalizers.cpp:14
mim::plug::x86::i2f
i2f
Definition
autogen.h:487
mim::plug::x86::rsub
rsub
Definition
autogen.h:251
mim::plug::x86::xor_
xor_
Definition
autogen.h:230
mim::plug::x86::isel
isel
Definition
autogen.h:522
mim::plug::x86::load
load
Definition
autogen.h:188
mim::plug::x86::fsel
fsel
Definition
autogen.h:480
mim::plug::x86::register_normalizers
void register_normalizers(Normalizers &normalizers)
mim::plug::x86::normalize_cmovcc
const Def * normalize_cmovcc(const Def *type, const Def *, const Def *arg)
Definition
normalizers.cpp:36
mim::plug::x86::movsx
movsx
Definition
autogen.h:308
mim::plug::x86::u2f
u2f
Definition
autogen.h:494
mim::plug::x86::fload
fload
Definition
autogen.h:401
mim::plug::x86::Plugin_Id
static constexpr plugin_t Plugin_Id
Definition
autogen.h:10
mim::plug::x86::zero
zero
Definition
autogen.h:324
mim::plug::x86::lea
lea
Definition
autogen.h:173
mim::plug::x86::reg
reg
Definition
autogen.h:127
mim::plug::x86::reg::r15
@ r15
Definition
autogen.h:143
mim::plug::x86::reg::rbx
@ rbx
Definition
autogen.h:131
mim::plug::x86::reg::r13
@ r13
Definition
autogen.h:141
mim::plug::x86::reg::rax
@ rax
Definition
autogen.h:128
mim::plug::x86::reg::r9
@ r9
Definition
autogen.h:137
mim::plug::x86::reg::r14
@ r14
Definition
autogen.h:142
mim::plug::x86::reg::rdx
@ rdx
Definition
autogen.h:130
mim::plug::x86::reg::rsp
@ rsp
Definition
autogen.h:132
mim::plug::x86::reg::r11
@ r11
Definition
autogen.h:139
mim::plug::x86::reg::rbp
@ rbp
Definition
autogen.h:133
mim::plug::x86::reg::rcx
@ rcx
Definition
autogen.h:129
mim::plug::x86::reg::r8
@ r8
Definition
autogen.h:136
mim::plug::x86::reg::r10
@ r10
Definition
autogen.h:138
mim::plug::x86::reg::rsi
@ rsi
Definition
autogen.h:134
mim::plug::x86::reg::r12
@ r12
Definition
autogen.h:140
mim::plug::x86::reg::rdi
@ rdi
Definition
autogen.h:135
mim::plug::x86::addr
addr
Definition
autogen.h:35
mim::plug::x86::scale_2
scale_2
Definition
autogen.h:57
mim::plug::x86::f2f
f2f
Definition
autogen.h:515
mim::plug::x86::sar
sar
Definition
autogen.h:293
mim::plug::x86::mov
mov
Definition
autogen.h:181
mim::plug::x86::normalize_lea
const Def * normalize_lea(const Def *type, const Def *, const Def *a)
Definition
normalizers.cpp:24
mim::plug::x86::normalize_movzx
const Def * normalize_movzx(const Def *type, const Def *, const Def *x)
Definition
normalizers.cpp:10
mim::plug::x86::scale_4
scale_4
Definition
autogen.h:64
mim::plug::x86::and_
and_
Definition
autogen.h:216
mim::plug::x86::rm1
rm1
Definition
autogen.h:113
mim::plug::x86::fadd
fadd
Definition
autogen.h:415
mim::plug::x86::xmm
xmm
Definition
autogen.h:150
mim::plug::x86::xmm::xmm6
@ xmm6
Definition
autogen.h:157
mim::plug::x86::xmm::xmm7
@ xmm7
Definition
autogen.h:158
mim::plug::x86::xmm::xmm8
@ xmm8
Definition
autogen.h:159
mim::plug::x86::xmm::xmm5
@ xmm5
Definition
autogen.h:156
mim::plug::x86::xmm::xmm3
@ xmm3
Definition
autogen.h:154
mim::plug::x86::xmm::xmm1
@ xmm1
Definition
autogen.h:152
mim::plug::x86::xmm::xmm4
@ xmm4
Definition
autogen.h:155
mim::plug::x86::xmm::xmm11
@ xmm11
Definition
autogen.h:162
mim::plug::x86::xmm::xmm9
@ xmm9
Definition
autogen.h:160
mim::plug::x86::xmm::xmm0
@ xmm0
Definition
autogen.h:151
mim::plug::x86::xmm::xmm15
@ xmm15
Definition
autogen.h:166
mim::plug::x86::xmm::xmm2
@ xmm2
Definition
autogen.h:153
mim::plug::x86::xmm::xmm13
@ xmm13
Definition
autogen.h:164
mim::plug::x86::xmm::xmm10
@ xmm10
Definition
autogen.h:161
mim::plug::x86::xmm::xmm14
@ xmm14
Definition
autogen.h:165
mim::plug::x86::xmm::xmm12
@ xmm12
Definition
autogen.h:163
mim::plug::x86::fsub
fsub
Definition
autogen.h:422
mim::plug::x86::idiv
idiv
Definition
autogen.h:272
mim::plug::x86::rm
rm
Definition
autogen.h:106
mim::plug::x86::Addr
Addr
Definition
autogen.h:14
mim::plug::x86::cmp
cmp
Definition
autogen.h:331
mim::plug::x86::shr
shr
Definition
autogen.h:286
mim::plug::x86::store
store
Definition
autogen.h:195
mim::plug::x86::fdiv
fdiv
Definition
autogen.h:436
mim::plug::x86::Index
Index
Definition
autogen.h:28
mim::plug::x86::cc
cc
Definition
autogen.h:345
mim::plug::x86::cc::no
@ no
Definition
autogen.h:347
mim::plug::x86::cc::p
@ p
Definition
autogen.h:356
mim::plug::x86::cc::be
@ be
Definition
autogen.h:352
mim::plug::x86::cc::b
@ b
Definition
autogen.h:348
mim::plug::x86::cc::ae
@ ae
Definition
autogen.h:349
mim::plug::x86::cc::np
@ np
Definition
autogen.h:357
mim::plug::x86::cc::ns
@ ns
Definition
autogen.h:355
mim::plug::x86::gpr16
gpr16
Definition
autogen.h:92
mim::plug::x86::trunc
trunc
Definition
autogen.h:316
mim::plug::x86::imul
imul
Definition
autogen.h:237
mim::plug::x86::shl
shl
Definition
autogen.h:279
mim::plug::x86::scale_1
scale_1
Definition
autogen.h:50
mim::plug::x86::f2i
f2i
Definition
autogen.h:501
mim::plug::x86::add3
add3
Definition
autogen.h:244
mim::plug::x86::or_
or_
Definition
autogen.h:223
mim::plug::x86::f2u
f2u
Definition
autogen.h:508
mim::plug::x86::cmovcc
cmovcc
Definition
autogen.h:368
mim::plug::x86::index
index
Definition
autogen.h:43
mim::plug::x86::logic
logic
Definition
autogen.h:99
mim::plug::x86::fsqrt
fsqrt
Definition
autogen.h:443
mim::plug::x86::Base
Base
Definition
autogen.h:21
mim::plug::x86::normalize_movsx
const Def * normalize_movsx(const Def *type, const Def *, const Def *x)
Definition
normalizers.cpp:11
mim::plug
Definition
affine.h:10
mim
Definition
ast.h:16
mim::flags_t
u64 flags_t
Definition
types.h:39
mim::Normalizers
ankerl::unordered_dense::map< flags_t, NormalizeFn > Normalizers
Definition
plugin.h:28
mim::plugin_t
u64 plugin_t
Definition
types.h:40
mim::Node::Axm
@ Axm
Definition
def.h:123
plugin.h
mim::Annex::Num
static constexpr size_t Num
Number of Axm::subtags.
Definition
plugin.h:275
mim::Annex::Base
static constexpr flags_t Base
Definition
plugin.h:276
build-docs
include
mim
plug
x86
autogen.h
Generated by
1.18.0