@@ -102,9 +102,16 @@ class MachineInstr
102102 // no unsigned wrap.
103103 NoSWrap = 1 << 12 , // Instruction supports binary operator
104104 // no signed wrap.
105- IsExact = 1 << 13 // Instruction supports division is
106- // known to be exact.
105+ IsExact = 1 << 13 , // Instruction supports division is
106+ // SSITH
107+ FnProlog = 1 << 14 , // Instruction is part of the compiler generated
108+ // prolog
109+ FnEpilog = 1 << 15 , // Instruction is part of the compiler generated
110+ // epilog
111+ FPtrStore = 1 << 16 , // Instruction writes a function pointer to memory
112+ FPtrCreate = 1 << 17 // Instruction creates a function pointer
107113 };
114+ // SSITH NOTE: Flags is only 16 bits long, getting close to the max here
108115
109116private:
110117 const MCInstrDesc *MCID; // Instruction descriptor.
@@ -116,7 +123,7 @@ class MachineInstr
116123 using OperandCapacity = ArrayRecycler<MachineOperand>::Capacity;
117124 OperandCapacity CapOperands; // Capacity of the Operands array.
118125
119- uint16_t Flags = 0 ; // Various bits of additional
126+ uint32_t Flags = 0 ; // Various bits of additional
120127 // information about machine
121128 // instruction.
122129
@@ -286,7 +293,7 @@ class MachineInstr
286293 }
287294
288295 // / Return the MI flags bitvector.
289- uint16_t getFlags () const {
296+ uint32_t getFlags () const {
290297 return Flags;
291298 }
292299
@@ -297,7 +304,7 @@ class MachineInstr
297304
298305 // / Set a MI flag.
299306 void setFlag (MIFlag Flag) {
300- Flags |= (uint16_t )Flag;
307+ Flags |= (uint32_t )Flag;
301308 }
302309
303310 void setFlags (unsigned flags) {
@@ -308,7 +315,7 @@ class MachineInstr
308315
309316 // / clearFlag - Clear a MI flag.
310317 void clearFlag (MIFlag Flag) {
311- Flags &= ~((uint16_t )Flag);
318+ Flags &= ~((uint32_t )Flag);
312319 }
313320
314321 // / Return true if MI is in a bundle (but not the first MI in a bundle).
@@ -1551,7 +1558,7 @@ class MachineInstr
15511558 // / Return the MIFlags which represent both MachineInstrs. This
15521559 // / should be used when merging two MachineInstrs into one. This routine does
15531560 // / not modify the MIFlags of this MachineInstr.
1554- uint16_t mergeFlagsWith (const MachineInstr& Other) const ;
1561+ uint32_t mergeFlagsWith (const MachineInstr& Other) const ;
15551562
15561563 static uint16_t copyFlagsFromInstruction (const Instruction &I);
15571564
0 commit comments