1 //===-- jitcs_ids.h - ID types for instructions et al. ----------*- C++ -*-===//
5 //===----------------------------------------------------------------------===//
10 #include "jitcs_base.h"
15 CM_Construct
, // add instructions to basic blocks
16 CM_Analyze
, // use/def analysis, cross bb cluster construction, ...
17 CM_Allocate
, // local and cross bb register allocation
18 CM_Generate
, // layout and generate machine code
24 MMODE_Mask
= (1 << MMODE_Bits
) - 1,
26 MMODE_None
= 0, // address undefined
27 MMODE_Base
= 1, // base + scale * index + offset
28 MMODE_Sym
= 2, // symbol + offset - the symbol may be global or local(SPREL/FPREL)
29 MMODE_Global
= 3, // global pointer + offset (in X64 encoded as RIP-relative)
30 MMODE_VRegSpillSlot
= 4, // memory address of a VReg spill slot
31 MMODE_SPRel
= 8, // stack (aka FP0) pointer + offset
32 MMODE_FP1Rel
= MMODE_SPRel
+1, // frame pointer 1 + offset
33 MMODE_FP2Rel
= MMODE_SPRel
+2, // frame pointer 2 + offset
34 MMODE_FP3Rel
= MMODE_SPRel
+3, // frame pointer 3 + offset
35 MMODE_FP4Rel
= MMODE_SPRel
+4, // frame pointer 4 + offset
36 MMODE_FP5Rel
= MMODE_SPRel
+5, // frame pointer 5 + offset
37 MMODE_FP6Rel
= MMODE_SPRel
+6, // frame pointer 6 + offset
38 MMODE_FP7Rel
= MMODE_SPRel
+7, // frame pointer 7 + offset
46 R_HardwareLimit
= 0x100,
68 } // end of namespace jitcs