mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Replace TSFlagsFields and TSFlagsShifts with a simpler TSFlags field.
When a target instruction wants to set target-specific flags, it should simply set bits in the TSFlags bit vector defined in the Instruction TableGen class. This works well because TableGen resolves member references late: class I : Instruction { AddrMode AM = AddrModeNone; let TSFlags{3-0} = AM.Value; } let AM = AddrMode4 in def ADD : I; TSFlags gets the expected bits from AddrMode4 in this example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100384 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -23,13 +23,18 @@ class I<bits<6> opcode, dag OOL, dag IOL, string asmstr, InstrItinClass itin>
|
||||
let InOperandList = IOL;
|
||||
let AsmString = asmstr;
|
||||
let Itinerary = itin;
|
||||
|
||||
/// These fields correspond to the fields in PPCInstrInfo.h. Any changes to
|
||||
/// these must be reflected there! See comments there for what these are.
|
||||
|
||||
bits<1> PPC970_First = 0;
|
||||
bits<1> PPC970_Single = 0;
|
||||
bits<1> PPC970_Cracked = 0;
|
||||
bits<3> PPC970_Unit = 0;
|
||||
|
||||
/// These fields correspond to the fields in PPCInstrInfo.h. Any changes to
|
||||
/// these must be reflected there! See comments there for what these are.
|
||||
let TSFlags{0} = PPC970_First;
|
||||
let TSFlags{1} = PPC970_Single;
|
||||
let TSFlags{2} = PPC970_Cracked;
|
||||
let TSFlags{5-3} = PPC970_Unit;
|
||||
}
|
||||
|
||||
class PPC970_DGroup_First { bits<1> PPC970_First = 1; }
|
||||
|
Reference in New Issue
Block a user