LLVM: lib/Target/SystemZ/SystemZMCInstLower.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

16

17using namespace llvm;

18

19

31

34 : Ctx(ctx), AsmPrinter(asmprinter) {}

35

39 bool HasOffset = true;

43 HasOffset = false;

44 break;

45

47 Symbol = AsmPrinter.getSymbol(MO.getGlobal());

48 break;

49

51 Symbol = AsmPrinter.GetExternalSymbolSymbol(MO.getSymbolName());

52 break;

53

55 Symbol = AsmPrinter.GetJTISymbol(MO.getIndex());

56 HasOffset = false;

57 break;

58

60 Symbol = AsmPrinter.GetCPISymbol(MO.getIndex());

61 break;

62

64 Symbol = AsmPrinter.GetBlockAddressSymbol(MO.getBlockAddress());

65 break;

66

67 default:

69 }

71 if (HasOffset)

75 }

76 return Expr;

77}

78

83

86

87 default: {

90 }

91 }

92}

93

97

98 if (!MO.isReg() || !MO.isImplicit())

100}

static SystemZ::Specifier getSpecifierForTFlags(unsigned Flags)

Definition SystemZMCInstLower.cpp:20

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.

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

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.

@ MO_Immediate

Immediate operand.

@ MO_ConstantPoolIndex

Address of indexed Constant in Constant Pool.

@ MO_GlobalAddress

Address of a global value.

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

const MCExpr * getExpr(const MachineOperand &MO, SystemZ::Specifier) const

Definition SystemZMCInstLower.cpp:36

MCOperand lowerOperand(const MachineOperand &MO) const

Definition SystemZMCInstLower.cpp:79

SystemZMCInstLower(MCContext &ctx, SystemZAsmPrinter &asmPrinter)

Definition SystemZMCInstLower.cpp:32

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

Definition SystemZMCInstLower.cpp:94

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