blob: 7a16c241ff8fe9885b9ee7c444f5f1c3de60cae9 [file] [log] [blame]
Sirish Pande26f61a12012-05-03 21:52:53 +00001//===- HexagonMCInst.h - Hexagon sub-class of MCInst ----------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This class extends MCInst to allow some VLIW annotation.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef HEXAGONMCINST_H
15#define HEXAGONMCINST_H
16
17#include "llvm/MC/MCInst.h"
18#include "llvm/CodeGen/MachineInstr.h"
19
20namespace llvm {
21 class HexagonMCInst: public MCInst {
22 // Packet start and end markers
23 unsigned startPacket: 1, endPacket: 1;
24 const MachineInstr *MachineI;
25 public:
26 explicit HexagonMCInst(): MCInst(),
27 startPacket(0), endPacket(0) {}
28
Eric Christopher22b291a2012-05-08 20:45:04 +000029 const MachineInstr* getMI() const { return MachineI; }
Sirish Pande26f61a12012-05-03 21:52:53 +000030
Eric Christopher22b291a2012-05-08 20:45:04 +000031 void setMI(const MachineInstr *MI) { MachineI = MI; }
Sirish Pande26f61a12012-05-03 21:52:53 +000032
Eric Christopher22b291a2012-05-08 20:45:04 +000033 bool isStartPacket() const { return (startPacket); }
34 bool isEndPacket() const { return (endPacket); }
Sirish Pande26f61a12012-05-03 21:52:53 +000035
Eric Christopher22b291a2012-05-08 20:45:04 +000036 void setStartPacket(bool yes) { startPacket = yes; }
37 void setEndPacket(bool yes) { endPacket = yes; }
Sirish Pande26f61a12012-05-03 21:52:53 +000038 };
39}
40
41#endif