LLVM: lib/Target/MSP430/MSP430MCInstLower.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

28using namespace llvm;

29

33 default: llvm_unreachable("Unknown target flag on GV operand");

34 case 0: break;

35 }

36

37 return Printer.getSymbol(MO.getGlobal());

38}

39

43 default: llvm_unreachable("Unknown target flag on GV operand");

44 case 0: break;

45 }

46

47 return Printer.GetExternalSymbolSymbol(MO.getSymbolName());

48}

49

52 const DataLayout &DL = Printer.getDataLayout();

55 << Printer.getFunctionNumber() << '_'

57

59 default: llvm_unreachable("Unknown target flag on GV operand");

60 case 0: break;

61 }

62

63

64 return Ctx.getOrCreateSymbol(Name);

65}

66

69 const DataLayout &DL = Printer.getDataLayout();

72 << Printer.getFunctionNumber() << '_'

74

76 default: llvm_unreachable("Unknown target flag on GV operand");

77 case 0: break;

78 }

79

80

81 return Ctx.getOrCreateSymbol(Name);

82}

83

87 default: llvm_unreachable("Unknown target flag on GV operand");

88 case 0: break;

89 }

90

91 return Printer.GetBlockAddressSymbol(MO.getBlockAddress());

92}

93

96

97

99

101 default: llvm_unreachable("Unknown target flag on GV operand");

102 case 0: break;

103 }

104

108 Ctx);

110}

111

112#define GET_REGINFO_ENUM

113#include "MSP430GenRegisterInfo.inc"

114

117

120 switch (MO.getType()) {

121 default:

125

126 if (MO.isImplicit()) continue;

128 break;

131 break;

134 MO.getMBB()->getSymbol(), Ctx));

135 break;

138 break;

141 break;

144 break;

147 break;

150 break;

152 continue;

153 }

154

156 }

157}

MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL

This file defines the SmallString class.

A parsed version of the target data layout string in and methods for querying it.

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)

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.

void addOperand(const MCOperand Op)

void setOpcode(unsigned Op)

Instances of this class represent operands of the MCInst class.

static MCOperand createExpr(const MCExpr *Val)

static MCOperand createReg(MCRegister Reg)

static MCOperand createImm(int64_t 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 ...

void Lower(const MachineInstr *MI, MCInst &OutMI) const

Definition MSP430MCInstLower.cpp:115

MCSymbol * GetExternalSymbolSymbol(const MachineOperand &MO) const

Definition MSP430MCInstLower.cpp:41

MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const

Definition MSP430MCInstLower.cpp:95

MCSymbol * GetGlobalAddressSymbol(const MachineOperand &MO) const

Definition MSP430MCInstLower.cpp:31

MCSymbol * GetBlockAddressSymbol(const MachineOperand &MO) const

Definition MSP430MCInstLower.cpp:85

MCSymbol * GetConstantPoolIndexSymbol(const MachineOperand &MO) const

Definition MSP430MCInstLower.cpp:68

MCSymbol * GetJumpTableSymbol(const MachineOperand &MO) const

Definition MSP430MCInstLower.cpp:51

Representation of each machine instruction.

MachineOperand class - Representation of each machine instruction operand.

const GlobalValue * getGlobal() const

bool isJTI() const

isJTI - Tests if this is a MO_JumpTableIndex operand.

const BlockAddress * getBlockAddress() const

unsigned getTargetFlags() const

const char * getSymbolName() 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.

int64_t getOffset() const

Return the offset from the symbol in this operand.

SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...

A raw_ostream that writes to an SmallVector or SmallString.

#define llvm_unreachable(msg)

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

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI raw_fd_ostream & errs()

This returns a reference to a raw_ostream for standard error.