LLVM: lib/Target/CSKY/CSKYMCInstLower.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

19

20#define DEBUG_TYPE "csky-mcinst-lower"

21

22using namespace llvm;

23

25 : Ctx(Ctx), Printer(Printer) {}

26

36

40 MCContext &Ctx = Printer.OutContext;

41

43 default:

47 break;

50 break;

53 break;

56 break;

59 break;

62 break;

65 break;

66 }

68

71

73}

74

78 default:

81 break;

84 break;

87 return false;

89 break;

93 break;

96 break;

100 break;

103 MO, Printer.GetExternalSymbolSymbol(MO.getSymbolName()));

104 break;

107 break;

110 break;

113 break;

114 }

115 return true;

116}

This class is intended to be used as a driving class for all asm writers.

bool lowerOperand(const MachineOperand &MO, MCOperand &MCOp) const

Definition CSKYMCInstLower.cpp:75

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

Definition CSKYMCInstLower.cpp:27

CSKYMCInstLower(MCContext &Ctx, AsmPrinter &Printer)

Definition CSKYMCInstLower.cpp:24

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

Definition CSKYMCInstLower.cpp:37

Context object for machine code objects.

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 MCSpecifierExpr * create(const MCExpr *Expr, Spec S, MCContext &Ctx, SMLoc Loc=SMLoc())

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 ...

LLVM_ABI MCSymbol * getSymbol() const

Return the MCSymbol for this basic block.

Representation of each machine instruction.

MachineOperand class - Representation of each machine instruction operand.

const GlobalValue * getGlobal() const

MachineBasicBlock * getMBB() const

const BlockAddress * getBlockAddress() const

unsigned getTargetFlags() const

MachineOperandType getType() const

getType - Returns the MachineOperandType for this operand.

const char * getSymbolName() const

Register getReg() const

getReg - Returns the register number.

MCSymbol * getMCSymbol() const

@ MO_Immediate

Immediate operand.

@ MO_ConstantPoolIndex

Address of indexed Constant in Constant Pool.

@ MO_MCSymbol

MCSymbol reference (for debug/eh info)

@ 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.

#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.