1//===- 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
29    const MachineInstr* getMI() const { return MachineI; }
30
31    void setMI(const MachineInstr *MI) { MachineI = MI; }
32
33    bool isStartPacket() const { return (startPacket); }
34    bool isEndPacket() const { return (endPacket); }
35
36    void setStartPacket(bool yes) { startPacket = yes; }
37    void setEndPacket(bool yes) { endPacket = yes; }
38  };
39}
40
41#endif
42