1 //===-- jitcs_ids.h - ID types for instructions et al. ----------*- C++ -*-===//
5 //===----------------------------------------------------------------------===//
10 #include "jitcs_base.h"
16 R_HardwareLimit
= 0x1000,
21 enum RegClassId
: u8
{
24 enum ResClassId
: u8
{
38 // used in virtual register placement and memory reference
41 MMODE_Mask
= (1 << MMODE_Bits
) - 1,
45 MMODE_None
= 0, // address undefined
46 MMODE_Base
= 1, // base + scale * index + offset
47 //MMODE_Sym = 2, // symbol + offset - the symbol may be global or local(SPREL/FPREL)
48 MMODE_Global
= 3, // global pointer + offset (in X64 encoded as RIP-relative)
49 MMODE_VRegSpillSlot
= 4, // memory address of a VReg spill slot
50 MMODE_SPRel
= 8, // stack (aka FP0) pointer + offset
51 MMODE_FP1Rel
= MMODE_SPRel
+1, // frame pointer 1 + offset
52 MMODE_FP2Rel
= MMODE_SPRel
+2, // frame pointer 2 + offset
53 MMODE_FP3Rel
= MMODE_SPRel
+3, // frame pointer 3 + offset
54 MMODE_FP4Rel
= MMODE_SPRel
+4, // frame pointer 4 + offset
55 MMODE_FP5Rel
= MMODE_SPRel
+5, // frame pointer 5 + offset
56 MMODE_FP6Rel
= MMODE_SPRel
+6, // frame pointer 6 + offset
57 MMODE_FP7Rel
= MMODE_SPRel
+7, // frame pointer 7 + offset
61 } // end of namespace jitcs