mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Compress flags in X86 op folding to reduce space in static tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159073 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f318457547
commit
3ed920f308
@ -55,12 +55,24 @@ ReMatPICStubLoad("remat-pic-stub-load",
|
||||
|
||||
enum {
|
||||
// Select which memory operand is being unfolded.
|
||||
// (stored in bits 0 - 7)
|
||||
// (stored in bits 0 - 3)
|
||||
TB_INDEX_0 = 0,
|
||||
TB_INDEX_1 = 1,
|
||||
TB_INDEX_2 = 2,
|
||||
TB_INDEX_3 = 3,
|
||||
TB_INDEX_MASK = 0xff,
|
||||
TB_INDEX_MASK = 0xf,
|
||||
|
||||
// Do not insert the reverse map (MemOp -> RegOp) into the table.
|
||||
// This may be needed because there is a many -> one mapping.
|
||||
TB_NO_REVERSE = 1 << 4,
|
||||
|
||||
// Do not insert the forward map (RegOp -> MemOp) into the table.
|
||||
// This is needed for Native Client, which prohibits branch
|
||||
// instructions from using a memory operand.
|
||||
TB_NO_FORWARD = 1 << 5,
|
||||
|
||||
TB_FOLDED_LOAD = 1 << 6,
|
||||
TB_FOLDED_STORE = 1 << 7,
|
||||
|
||||
// Minimum alignment required for load/store.
|
||||
// Used for RegOp->MemOp conversion.
|
||||
@ -69,25 +81,13 @@ enum {
|
||||
TB_ALIGN_NONE = 0 << TB_ALIGN_SHIFT,
|
||||
TB_ALIGN_16 = 16 << TB_ALIGN_SHIFT,
|
||||
TB_ALIGN_32 = 32 << TB_ALIGN_SHIFT,
|
||||
TB_ALIGN_MASK = 0xff << TB_ALIGN_SHIFT,
|
||||
|
||||
// Do not insert the reverse map (MemOp -> RegOp) into the table.
|
||||
// This may be needed because there is a many -> one mapping.
|
||||
TB_NO_REVERSE = 1 << 16,
|
||||
|
||||
// Do not insert the forward map (RegOp -> MemOp) into the table.
|
||||
// This is needed for Native Client, which prohibits branch
|
||||
// instructions from using a memory operand.
|
||||
TB_NO_FORWARD = 1 << 17,
|
||||
|
||||
TB_FOLDED_LOAD = 1 << 18,
|
||||
TB_FOLDED_STORE = 1 << 19
|
||||
TB_ALIGN_MASK = 0xff << TB_ALIGN_SHIFT
|
||||
};
|
||||
|
||||
struct X86OpTblEntry {
|
||||
uint16_t RegOp;
|
||||
uint16_t MemOp;
|
||||
uint32_t Flags;
|
||||
uint16_t Flags;
|
||||
};
|
||||
|
||||
X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
|
||||
|
Loading…
Reference in New Issue
Block a user