mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Add FrameSetup MI flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127098 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -50,12 +50,21 @@ public:
|
||||
enum CommentFlag {
|
||||
ReloadReuse = 0x1
|
||||
};
|
||||
|
||||
|
||||
enum MIFlag {
|
||||
NoFlags = 0,
|
||||
FrameSetup = 1 << 0 // Instruction is used as a part of
|
||||
// function frame setup code.
|
||||
};
|
||||
private:
|
||||
const TargetInstrDesc *TID; // Instruction descriptor.
|
||||
uint16_t NumImplicitOps; // Number of implicit operands (which
|
||||
// are determined at construction time).
|
||||
|
||||
uint8_t Flags; // Various bits of additional
|
||||
// information about machine
|
||||
// instruction.
|
||||
|
||||
uint8_t AsmPrinterFlags; // Various bits of information used by
|
||||
// the AsmPrinter to emit helpful
|
||||
// comments. This is *not* semantic
|
||||
@@ -140,7 +149,26 @@ public:
|
||||
/// setAsmPrinterFlag - Set a flag for the AsmPrinter.
|
||||
///
|
||||
void setAsmPrinterFlag(CommentFlag Flag) {
|
||||
AsmPrinterFlags |= (unsigned short)Flag;
|
||||
AsmPrinterFlags |= (uint8_t)Flag;
|
||||
}
|
||||
|
||||
/// getFlags - Return the MI flags bitvector.
|
||||
uint8_t getFlags() const {
|
||||
return Flags;
|
||||
}
|
||||
|
||||
/// getFlag - Return whether an MI flag is set.
|
||||
bool getFlag(MIFlag Flag) const {
|
||||
return Flags & Flag;
|
||||
}
|
||||
|
||||
/// setFlag - Set a MI flag.
|
||||
void setFlag(MIFlag Flag) {
|
||||
Flags |= (uint8_t)Flag;
|
||||
}
|
||||
|
||||
void setFlags(unsigned flags) {
|
||||
Flags = flags;
|
||||
}
|
||||
|
||||
/// clearAsmPrinterFlag - clear specific AsmPrinter flags
|
||||
@@ -152,7 +180,7 @@ public:
|
||||
/// getDebugLoc - Returns the debug location id of this MachineInstr.
|
||||
///
|
||||
DebugLoc getDebugLoc() const { return debugLoc; }
|
||||
|
||||
|
||||
/// getDesc - Returns the target instruction descriptor of this
|
||||
/// MachineInstr.
|
||||
const TargetInstrDesc &getDesc() const { return *TID; }
|
||||
|
Reference in New Issue
Block a user