LLVM: lib/Target/Hexagon/HexagonMCInstLower.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

29#include

30

31using namespace llvm;

32

33namespace llvm {

34

37

38}

39

44

45

46

49 default:

51 break;

54 break;

57 break;

60 break;

63 break;

66 break;

69 break;

72 break;

75 break;

78 break;

81 break;

82 }

83

85

88 MC);

89

93}

94

95

98 if (MI->getOpcode() == Hexagon::ENDLOOP0) {

100 return;

101 }

102 if (MI->getOpcode() == Hexagon::ENDLOOP1) {

104 return;

105 }

106 if (MI->getOpcode() == Hexagon::PATCHABLE_FUNCTION_ENTER) {

108 return;

109 }

110 if (MI->getOpcode() == Hexagon::PATCHABLE_FUNCTION_EXIT) {

112 return;

113 }

114 if (MI->getOpcode() == Hexagon::PATCHABLE_TAIL_CALL) {

116 return;

117 }

118

121 assert(MCI->getOpcode() == static_cast<unsigned>(MI->getOpcode()) &&

122 "MCI opcode should have been set on construction");

123

127

128 switch (MO.getType()) {

129 default:

133 continue;

135

136 if (MO.isImplicit())

137 continue;

139 break;

141 APFloat Val = MO.getFPImm()->getValueAPF();

142

143

150 break;

151 }

157 break;

158 }

165 break;

166 }

169 break;

172 AP, MustExtend);

173 break;

176 break;

179 break;

182 MustExtend);

183 break;

184 }

185

187 }

191}

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

This file declares a class to represent arbitrary precision floating point values and provide a varie...

This file implements a class to represent arbitrary precision integral constant values and operations...

This file contains the declarations for the subclasses of Constant, which represent the different fla...

dxil pretty DXIL Metadata Pretty Printer

static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol, HexagonAsmPrinter &Printer, bool MustExtend)

Definition HexagonMCInstLower.cpp:40

APInt bitcastToAPInt() const

const uint64_t * getRawData() const

This function returns a pointer to the internal storage of the APInt.

MCSymbol * getSymbol(const GlobalValue *GV) const

virtual MCSymbol * GetCPISymbol(unsigned CPID) const

Return the symbol for the specified constant pool entry.

MCSymbol * GetJTISymbol(unsigned JTID, bool isLinkerPrivate=false) const

Return the symbol for the specified jump table entry.

MCContext & OutContext

This is the context for the output file that we are streaming.

MCSymbol * GetBlockAddressSymbol(const BlockAddress *BA) const

Return the MCSymbol used to satisfy BlockAddress uses of the specified basic block.

MCSymbol * GetExternalSymbolSymbol(const Twine &Sym) const

Return the MCSymbol for the specified ExternalSymbol.

void EmitSled(const MachineInstr &MI, SledKind Kind)

void HexagonProcessInstruction(MCInst &Inst, const MachineInstr &MBB)

static HexagonMCExpr * create(MCExpr const *Expr, MCContext &Ctx)

static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx, SMLoc Loc=SMLoc())

static LLVM_ABI const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)

Context object for machine code objects.

LLVM_ABI MCInst * createMCInst()

Create and return a new MC instruction.

Base class for the full range of assembler expressions which are needed for parsing.

Instances of this class represent a single low-level machine instruction.

unsigned getOpcode() const

void addOperand(const MCOperand Op)

void setOpcode(unsigned Op)

Interface to description of machine instruction set.

Instances of this class represent operands of the MCInst class.

static MCOperand createExpr(const MCExpr *Val)

static MCOperand createReg(MCRegister Reg)

static MCOperand createInst(const MCInst *Val)

static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())

MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...

Representation of each machine instruction.

MachineOperand class - Representation of each machine instruction operand.

bool isJTI() const

isJTI - Tests if this is a MO_JumpTableIndex operand.

unsigned getTargetFlags() const

@ MO_Immediate

Immediate operand.

@ MO_ConstantPoolIndex

Address of indexed Constant in Constant Pool.

@ MO_GlobalAddress

Address of a global value.

@ MO_RegisterMask

Mask of preserved registers.

@ MO_BlockAddress

Address of a basic block.

@ MO_MachineBasicBlock

MachineBasicBlock reference.

@ MO_Register

Register operand.

@ MO_ExternalSymbol

Name of external global symbol.

@ MO_JumpTableIndex

Address of indexed Jump Table for switch.

@ MO_FPImmediate

Floating-point immediate operand.

int64_t getOffset() const

Return the offset from the symbol in this operand.

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

@ MO_PCREL

MO_PCREL - On a symbol operand, indicates a PC-relative relocation Used for computing a global addres...

@ MO_GOT

MO_GOT - Indicates a GOT-relative relocation.

void setOuterLoop(MCInst &MCI)

void setInnerLoop(MCInst &MCI)

void extendIfNeeded(MCContext &Context, MCInstrInfo const &MCII, MCInst &MCB, MCInst const &MCI)

void setMustExtend(MCExpr const &Expr, bool Val=true)

This is an optimization pass for GlobalISel generic memory operations.

void HexagonLowerToMC(const MCInstrInfo &MCII, const MachineInstr *MI, MCInst &MCB, HexagonAsmPrinter &AP)

Definition HexagonMCInstLower.cpp:96

LLVM_ABI raw_fd_ostream & errs()

This returns a reference to a raw_ostream for standard error.