MimIR
MimIR is my Intermediate Representation
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
7namespace mim {
8namespace plug::x86 {
9
10static constexpr plugin_t Plugin_Id = 0x67ef000000000000;
11
12/// @name `x86.Addr`
13///@{
14enum class Addr : flags_t {
15};
16
17///@}
18
19/// @name `x86.Base`
20///@{
21enum class Base : flags_t {
22};
23
24///@}
25
26/// @name `x86.Index`
27///@{
28enum class Index : flags_t {
29};
30
31///@}
32
33/// @name `x86.addr`
34///@{
35enum class addr : flags_t {
36};
37
38const Def* normalize_addr(const Def*, const Def*, const Def*);
39///@}
40
41/// @name `x86.index`
42///@{
43enum class index : flags_t {
44};
45
46///@}
47
48/// @name `x86.scale_1`
49///@{
50enum class scale_1 : flags_t {
51};
52
53///@}
54
55/// @name `x86.scale_2`
56///@{
57enum class scale_2 : flags_t {
58};
59
60///@}
61
62/// @name `x86.scale_4`
63///@{
64enum class scale_4 : flags_t {
65};
66
67///@}
68
69/// @name `x86.scale_8`
70///@{
71enum class scale_8 : flags_t {
72};
73
74///@}
75
76/// @name `x86.is_gpr`
77///@{
78enum class is_gpr : flags_t {
79};
80
81///@}
82
83/// @name `x86.gpr`
84///@{
85enum class gpr : flags_t {
86};
87
88///@}
89
90/// @name `x86.gpr16`
91///@{
92enum class gpr16 : flags_t {
93};
94
95///@}
96
97/// @name `x86.logic`
98///@{
99enum class logic : flags_t {
100};
101
102///@}
103
104/// @name `x86.rm`
105///@{
106enum class rm : flags_t {
107};
108
109///@}
110
111/// @name `x86.rm1`
112///@{
113enum class rm1 : flags_t {
114};
115
116///@}
117
118/// @name `x86.mr`
119///@{
120enum class mr : flags_t {
121};
122
123///@}
124
125/// @name `x86.reg`
126///@{
127enum 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///@{
150enum 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///@{
173enum class lea : flags_t {
174};
175
176const Def* normalize_lea(const Def*, const Def*, const Def*);
177///@}
178
179/// @name `x86.mov`
180///@{
181enum class mov : flags_t {
182};
183
184///@}
185
186/// @name `x86.load`
187///@{
188enum class load : flags_t {
189};
190
191///@}
192
193/// @name `x86.store`
194///@{
195enum class store : flags_t {
196};
197
198///@}
199
200/// @name `x86.add`
201///@{
202enum class add : flags_t {
203};
204
205///@}
206
207/// @name `x86.sub`
208///@{
209enum class sub : flags_t {
210};
211
212///@}
213
214/// @name `x86.and`
215///@{
216enum class and_ : flags_t {
217};
218
219///@}
220
221/// @name `x86.or`
222///@{
223enum class or_ : flags_t {
224};
225
226///@}
227
228/// @name `x86.xor`
229///@{
230enum class xor_ : flags_t {
231};
232
233///@}
234
235/// @name `x86.imul`
236///@{
237enum class imul : flags_t {
238};
239
240///@}
241
242/// @name `x86.add3`
243///@{
244enum class add3 : flags_t {
245};
246
247///@}
248
249/// @name `x86.rsub`
250///@{
251enum class rsub : flags_t {
252};
253
254///@}
255
256/// @name `x86.imul3`
257///@{
258enum class imul3 : flags_t {
259};
260
261///@}
262
263/// @name `x86.div`
264///@{
265enum class div : flags_t {
266};
267
268///@}
269
270/// @name `x86.idiv`
271///@{
272enum class idiv : flags_t {
273};
274
275///@}
276
277/// @name `x86.shl`
278///@{
279enum class shl : flags_t {
280};
281
282///@}
283
284/// @name `x86.shr`
285///@{
286enum class shr : flags_t {
287};
288
289///@}
290
291/// @name `x86.sar`
292///@{
293enum class sar : flags_t {
294};
295
296///@}
297
298/// @name `x86.movzx`
299///@{
300enum class movzx : flags_t {
301};
302
303const Def* normalize_movzx(const Def*, const Def*, const Def*);
304///@}
305
306/// @name `x86.movsx`
307///@{
308enum class movsx : flags_t {
309};
310
311const Def* normalize_movsx(const Def*, const Def*, const Def*);
312///@}
313
314/// @name `x86.trunc`
315///@{
316enum class trunc : flags_t {
317};
318
319const Def* normalize_trunc(const Def*, const Def*, const Def*);
320///@}
321
322/// @name `x86.zero`
323///@{
324enum class zero : flags_t {
325};
326
327///@}
328
329/// @name `x86.cmp`
330///@{
331enum class cmp : flags_t {
332};
333
334///@}
335
336/// @name `x86.test`
337///@{
338enum class test : flags_t {
339};
340
341///@}
342
343/// @name `x86.cc`
344///@{
345enum 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///@{
368enum 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
387template<cmovcc>
388const Def* normalize_cmovcc(const Def*, const Def*, const Def*);
389
390///@}
391
392/// @name `x86.fmov`
393///@{
394enum class fmov : flags_t {
395};
396
397///@}
398
399/// @name `x86.fload`
400///@{
401enum class fload : flags_t {
402};
403
404///@}
405
406/// @name `x86.fstore`
407///@{
408enum class fstore : flags_t {
409};
410
411///@}
412
413/// @name `x86.fadd`
414///@{
415enum class fadd : flags_t {
416};
417
418///@}
419
420/// @name `x86.fsub`
421///@{
422enum class fsub : flags_t {
423};
424
425///@}
426
427/// @name `x86.fmul`
428///@{
429enum class fmul : flags_t {
430};
431
432///@}
433
434/// @name `x86.fdiv`
435///@{
436enum class fdiv : flags_t {
437};
438
439///@}
440
441/// @name `x86.fsqrt`
442///@{
443enum class fsqrt : flags_t {
444};
445
446///@}
447
448/// @name `x86.fabs`
449///@{
450enum class fabs : flags_t {
451};
452
453///@}
454
455/// @name `x86.fcmp`
456///@{
457enum 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///@{
480enum class fsel : flags_t {
481};
482
483///@}
484
485/// @name `x86.i2f`
486///@{
487enum class i2f : flags_t {
488};
489
490///@}
491
492/// @name `x86.u2f`
493///@{
494enum class u2f : flags_t {
495};
496
497///@}
498
499/// @name `x86.f2i`
500///@{
501enum class f2i : flags_t {
502};
503
504///@}
505
506/// @name `x86.f2u`
507///@{
508enum class f2u : flags_t {
509};
510
511///@}
512
513/// @name `x86.f2f`
514///@{
515enum class f2f : flags_t {
516};
517
518///@}
519
520/// @name `x86.isel`
521///@{
522enum class isel : flags_t {
523};
524
525///@}
526
527/// @name `x86.emit`
528///@{
529enum class emit : flags_t {
530};
531
532///@}
533
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
564template<> constexpr flags_t Annex::Base<plug::x86::Addr> = 0x67ef000000000000;
565template<> constexpr size_t Annex::Num<plug::x86::Addr> = 0;
566template<> constexpr flags_t Annex::Base<plug::x86::Base> = 0x67ef000000000100;
567template<> constexpr size_t Annex::Num<plug::x86::Base> = 0;
568template<> constexpr flags_t Annex::Base<plug::x86::Index> = 0x67ef000000000200;
569template<> constexpr size_t Annex::Num<plug::x86::Index> = 0;
570template<> constexpr flags_t Annex::Base<plug::x86::addr> = 0x67ef000000000300;
571template<> constexpr size_t Annex::Num<plug::x86::addr> = 0;
572template<> constexpr flags_t Annex::Base<plug::x86::index> = 0x67ef000000000400;
573template<> constexpr size_t Annex::Num<plug::x86::index> = 0;
574template<> constexpr flags_t Annex::Base<plug::x86::scale_1> = 0x67ef000000000500;
575template<> constexpr size_t Annex::Num<plug::x86::scale_1> = 0;
576template<> constexpr flags_t Annex::Base<plug::x86::scale_2> = 0x67ef000000000600;
577template<> constexpr size_t Annex::Num<plug::x86::scale_2> = 0;
578template<> constexpr flags_t Annex::Base<plug::x86::scale_4> = 0x67ef000000000700;
579template<> constexpr size_t Annex::Num<plug::x86::scale_4> = 0;
580template<> constexpr flags_t Annex::Base<plug::x86::scale_8> = 0x67ef000000000800;
581template<> constexpr size_t Annex::Num<plug::x86::scale_8> = 0;
582template<> constexpr flags_t Annex::Base<plug::x86::is_gpr> = 0x67ef000000000900;
583template<> constexpr size_t Annex::Num<plug::x86::is_gpr> = 0;
584template<> constexpr flags_t Annex::Base<plug::x86::gpr> = 0x67ef000000000a00;
585template<> constexpr size_t Annex::Num<plug::x86::gpr> = 0;
586template<> constexpr flags_t Annex::Base<plug::x86::gpr16> = 0x67ef000000000b00;
587template<> constexpr size_t Annex::Num<plug::x86::gpr16> = 0;
588template<> constexpr flags_t Annex::Base<plug::x86::logic> = 0x67ef000000000c00;
589template<> constexpr size_t Annex::Num<plug::x86::logic> = 0;
590template<> constexpr flags_t Annex::Base<plug::x86::rm> = 0x67ef000000000d00;
591template<> constexpr size_t Annex::Num<plug::x86::rm> = 0;
592template<> constexpr flags_t Annex::Base<plug::x86::rm1> = 0x67ef000000000e00;
593template<> constexpr size_t Annex::Num<plug::x86::rm1> = 0;
594template<> constexpr flags_t Annex::Base<plug::x86::mr> = 0x67ef000000000f00;
595template<> constexpr size_t Annex::Num<plug::x86::mr> = 0;
596template<> constexpr flags_t Annex::Base<plug::x86::reg> = 0x67ef000000001000;
597template<> constexpr size_t Annex::Num<plug::x86::reg> = 16;
598template<> constexpr flags_t Annex::Base<plug::x86::xmm> = 0x67ef000000001100;
599template<> constexpr size_t Annex::Num<plug::x86::xmm> = 16;
600template<> constexpr flags_t Annex::Base<plug::x86::lea> = 0x67ef000000001200;
601template<> constexpr size_t Annex::Num<plug::x86::lea> = 0;
602template<> constexpr flags_t Annex::Base<plug::x86::mov> = 0x67ef000000001300;
603template<> constexpr size_t Annex::Num<plug::x86::mov> = 0;
604template<> constexpr flags_t Annex::Base<plug::x86::load> = 0x67ef000000001400;
605template<> constexpr size_t Annex::Num<plug::x86::load> = 0;
606template<> constexpr flags_t Annex::Base<plug::x86::store> = 0x67ef000000001500;
607template<> constexpr size_t Annex::Num<plug::x86::store> = 0;
608template<> constexpr flags_t Annex::Base<plug::x86::add> = 0x67ef000000001600;
609template<> constexpr size_t Annex::Num<plug::x86::add> = 0;
610template<> constexpr flags_t Annex::Base<plug::x86::sub> = 0x67ef000000001700;
611template<> constexpr size_t Annex::Num<plug::x86::sub> = 0;
612template<> constexpr flags_t Annex::Base<plug::x86::and_> = 0x67ef000000001800;
613template<> constexpr size_t Annex::Num<plug::x86::and_> = 0;
614template<> constexpr flags_t Annex::Base<plug::x86::or_> = 0x67ef000000001900;
615template<> constexpr size_t Annex::Num<plug::x86::or_> = 0;
616template<> constexpr flags_t Annex::Base<plug::x86::xor_> = 0x67ef000000001a00;
617template<> constexpr size_t Annex::Num<plug::x86::xor_> = 0;
618template<> constexpr flags_t Annex::Base<plug::x86::imul> = 0x67ef000000001b00;
619template<> constexpr size_t Annex::Num<plug::x86::imul> = 0;
620template<> constexpr flags_t Annex::Base<plug::x86::add3> = 0x67ef000000001c00;
621template<> constexpr size_t Annex::Num<plug::x86::add3> = 0;
622template<> constexpr flags_t Annex::Base<plug::x86::rsub> = 0x67ef000000001d00;
623template<> constexpr size_t Annex::Num<plug::x86::rsub> = 0;
624template<> constexpr flags_t Annex::Base<plug::x86::imul3> = 0x67ef000000001e00;
625template<> constexpr size_t Annex::Num<plug::x86::imul3> = 0;
626template<> constexpr flags_t Annex::Base<plug::x86::div> = 0x67ef000000001f00;
627template<> constexpr size_t Annex::Num<plug::x86::div> = 0;
628template<> constexpr flags_t Annex::Base<plug::x86::idiv> = 0x67ef000000002000;
629template<> constexpr size_t Annex::Num<plug::x86::idiv> = 0;
630template<> constexpr flags_t Annex::Base<plug::x86::shl> = 0x67ef000000002100;
631template<> constexpr size_t Annex::Num<plug::x86::shl> = 0;
632template<> constexpr flags_t Annex::Base<plug::x86::shr> = 0x67ef000000002200;
633template<> constexpr size_t Annex::Num<plug::x86::shr> = 0;
634template<> constexpr flags_t Annex::Base<plug::x86::sar> = 0x67ef000000002300;
635template<> constexpr size_t Annex::Num<plug::x86::sar> = 0;
636template<> constexpr flags_t Annex::Base<plug::x86::movzx> = 0x67ef000000002400;
637template<> constexpr size_t Annex::Num<plug::x86::movzx> = 0;
638template<> constexpr flags_t Annex::Base<plug::x86::movsx> = 0x67ef000000002500;
639template<> constexpr size_t Annex::Num<plug::x86::movsx> = 0;
640template<> constexpr flags_t Annex::Base<plug::x86::trunc> = 0x67ef000000002600;
641template<> constexpr size_t Annex::Num<plug::x86::trunc> = 0;
642template<> constexpr flags_t Annex::Base<plug::x86::zero> = 0x67ef000000002700;
643template<> constexpr size_t Annex::Num<plug::x86::zero> = 0;
644template<> constexpr flags_t Annex::Base<plug::x86::cmp> = 0x67ef000000002800;
645template<> constexpr size_t Annex::Num<plug::x86::cmp> = 0;
646template<> constexpr flags_t Annex::Base<plug::x86::test> = 0x67ef000000002900;
647template<> constexpr size_t Annex::Num<plug::x86::test> = 0;
648template<> constexpr flags_t Annex::Base<plug::x86::cc> = 0x67ef000000002a00;
649template<> constexpr size_t Annex::Num<plug::x86::cc> = 16;
650template<> constexpr flags_t Annex::Base<plug::x86::cmovcc> = 0x67ef000000002b00;
651template<> constexpr size_t Annex::Num<plug::x86::cmovcc> = 16;
652template<> constexpr flags_t Annex::Base<plug::x86::fmov> = 0x67ef000000002c00;
653template<> constexpr size_t Annex::Num<plug::x86::fmov> = 0;
654template<> constexpr flags_t Annex::Base<plug::x86::fload> = 0x67ef000000002d00;
655template<> constexpr size_t Annex::Num<plug::x86::fload> = 0;
656template<> constexpr flags_t Annex::Base<plug::x86::fstore> = 0x67ef000000002e00;
657template<> constexpr size_t Annex::Num<plug::x86::fstore> = 0;
658template<> constexpr flags_t Annex::Base<plug::x86::fadd> = 0x67ef000000002f00;
659template<> constexpr size_t Annex::Num<plug::x86::fadd> = 0;
660template<> constexpr flags_t Annex::Base<plug::x86::fsub> = 0x67ef000000003000;
661template<> constexpr size_t Annex::Num<plug::x86::fsub> = 0;
662template<> constexpr flags_t Annex::Base<plug::x86::fmul> = 0x67ef000000003100;
663template<> constexpr size_t Annex::Num<plug::x86::fmul> = 0;
664template<> constexpr flags_t Annex::Base<plug::x86::fdiv> = 0x67ef000000003200;
665template<> constexpr size_t Annex::Num<plug::x86::fdiv> = 0;
666template<> constexpr flags_t Annex::Base<plug::x86::fsqrt> = 0x67ef000000003300;
667template<> constexpr size_t Annex::Num<plug::x86::fsqrt> = 0;
668template<> constexpr flags_t Annex::Base<plug::x86::fabs> = 0x67ef000000003400;
669template<> constexpr size_t Annex::Num<plug::x86::fabs> = 0;
670template<> constexpr flags_t Annex::Base<plug::x86::fcmp> = 0x67ef000000003500;
671template<> constexpr size_t Annex::Num<plug::x86::fcmp> = 16;
672template<> constexpr flags_t Annex::Base<plug::x86::fsel> = 0x67ef000000003600;
673template<> constexpr size_t Annex::Num<plug::x86::fsel> = 0;
674template<> constexpr flags_t Annex::Base<plug::x86::i2f> = 0x67ef000000003700;
675template<> constexpr size_t Annex::Num<plug::x86::i2f> = 0;
676template<> constexpr flags_t Annex::Base<plug::x86::u2f> = 0x67ef000000003800;
677template<> constexpr size_t Annex::Num<plug::x86::u2f> = 0;
678template<> constexpr flags_t Annex::Base<plug::x86::f2i> = 0x67ef000000003900;
679template<> constexpr size_t Annex::Num<plug::x86::f2i> = 0;
680template<> constexpr flags_t Annex::Base<plug::x86::f2u> = 0x67ef000000003a00;
681template<> constexpr size_t Annex::Num<plug::x86::f2u> = 0;
682template<> constexpr flags_t Annex::Base<plug::x86::f2f> = 0x67ef000000003b00;
683template<> constexpr size_t Annex::Num<plug::x86::f2f> = 0;
684template<> constexpr flags_t Annex::Base<plug::x86::isel> = 0x67ef000000003c00;
685template<> constexpr size_t Annex::Num<plug::x86::isel> = 0;
686template<> constexpr flags_t Annex::Base<plug::x86::emit> = 0x67ef000000003d00;
687template<> constexpr size_t Annex::Num<plug::x86::emit> = 0;
688
689template<> struct Axm::IsANode<plug::x86::Base> { using type = Axm; };
690template<> struct Axm::IsANode<plug::x86::Index> { using type = Axm; };
691template<> struct Axm::IsANode<plug::x86::scale_1> { using type = Axm; };
692template<> struct Axm::IsANode<plug::x86::scale_2> { using type = Axm; };
693template<> struct Axm::IsANode<plug::x86::scale_4> { using type = Axm; };
694template<> struct Axm::IsANode<plug::x86::scale_8> { using type = Axm; };
695template<> struct Axm::IsANode<plug::x86::is_gpr> { using type = Axm; };
696template<> struct Axm::IsANode<plug::x86::gpr> { using type = Axm; };
697template<> struct Axm::IsANode<plug::x86::gpr16> { using type = Axm; };
698template<> struct Axm::IsANode<plug::x86::logic> { using type = Axm; };
699template<> struct Axm::IsANode<plug::x86::reg> { using type = Axm; };
700template<> struct Axm::IsANode<plug::x86::xmm> { using type = Axm; };
701template<> struct Axm::IsANode<plug::x86::isel> { using type = Axm; };
702template<> 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
709template<> struct fe::is_bit_enum<mim::plug::x86::reg> : std::true_type {};
710template<> struct fe::is_bit_enum<mim::plug::x86::xmm> : std::true_type {};
711template<> struct fe::is_bit_enum<mim::plug::x86::cc> : std::true_type {};
712template<> struct fe::is_bit_enum<mim::plug::x86::cmovcc> : std::true_type {};
713template<> struct fe::is_bit_enum<mim::plug::x86::fcmp> : std::true_type {};
714
715#endif
Base class for all Defs.
Definition def.h:285
The x86 Plugin
Definition emit.h:9
const Def * normalize_trunc(const Def *type, const Def *, const Def *x)
const Def * normalize_addr(const Def *type, const Def *, const Def *arg)
void register_normalizers(Normalizers &normalizers)
const Def * normalize_cmovcc(const Def *type, const Def *, const Def *arg)
static constexpr plugin_t Plugin_Id
Definition autogen.h:10
const Def * normalize_lea(const Def *type, const Def *, const Def *a)
const Def * normalize_movzx(const Def *type, const Def *, const Def *x)
const Def * normalize_movsx(const Def *type, const Def *, const Def *x)
Definition ast.h:16
u64 flags_t
Definition types.h:39
ankerl::unordered_dense::map< flags_t, NormalizeFn > Normalizers
Definition plugin.h:28
u64 plugin_t
Definition types.h:40
@ Axm
Definition def.h:123
static constexpr size_t Num
Number of Axm::subtags.
Definition plugin.h:275
static constexpr flags_t Base
Definition plugin.h:276