1 //===- HexagonMCInst.h - Hexagon sub-class of MCInst ----------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This class extends MCInst to allow some VLIW annotation.
12 //===----------------------------------------------------------------------===//
14 #ifndef HEXAGONMCINST_H
15 #define HEXAGONMCINST_H
17 #include "llvm/MC/MCInst.h"
18 #include "llvm/CodeGen/MachineInstr.h"
21 class HexagonMCInst: public MCInst {
22 // Packet start and end markers
23 unsigned startPacket: 1, endPacket: 1;
24 const MachineInstr *MachineI;
26 explicit HexagonMCInst(): MCInst(),
27 startPacket(0), endPacket(0) {}
29 const MachineInstr* getMI() const { return MachineI; }
31 void setMI(const MachineInstr *MI) { MachineI = MI; }
33 bool isStartPacket() const { return (startPacket); }
34 bool isEndPacket() const { return (endPacket); }
36 void setStartPacket(bool yes) { startPacket = yes; }
37 void setEndPacket(bool yes) { endPacket = yes; }