LLVM: lib/Target/AVR/AVRMCInstLower.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

17

22

23namespace llvm {

24

30

31 bool IsNegated = false;

33 IsNegated = true;

34 }

35

39 }

40

42

44 if (IsFunction) {

47 Expr, IsNegated, Ctx);

48 } else {

50 }

52 if (IsFunction) {

55 Expr, IsNegated, Ctx);

56 } else {

58 }

59 } else if (TF != 0) {

61 }

62

64}

65

67 MCInst &OutMI) const {

68 auto &Subtarget = MI.getParent()->getParent()->getSubtarget<AVRSubtarget>();

70

73

74 switch (MO.getType()) {

75 default:

79

80 if (MO.isImplicit())

81 continue;

83 break;

86 break;

88 MCOp =

90 break;

93 MO, Printer.GetExternalSymbolSymbol(MO.getSymbolName()), Subtarget);

94 break;

98 break;

100 continue;

103 MO, Printer.GetBlockAddressSymbol(MO.getBlockAddress()), Subtarget);

104 break;

107 Subtarget);

108 break;

111 Subtarget);

112 break;

113 }

114

116 }

117}

118

119}

static const AVRMCExpr * create(Specifier S, const MCExpr *Expr, bool isNegated, MCContext &Ctx)

Specifies the type of an expression.

void lowerInstruction(const MachineInstr &MI, MCInst &OutMI) const

Lowers a MachineInstr into a MCInst.

Definition AVRMCInstLower.cpp:66

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

Definition AVRMCInstLower.cpp:26

A specific AVR target MCU.

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

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.

unsigned getTargetFlags() const

bool isGlobal() const

isGlobal - Tests if this is a MO_GlobalAddress operand.

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

#define llvm_unreachable(msg)

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

@ MO_HI

On a symbol operand, this represents the hi part.

@ MO_NEG

On a symbol operand, this represents it has to be negated.

@ MO_LO

On a symbol operand, this represents the lo part.

@ S_LO8

Corresponds to lo8().

@ S_LO8_GS

Corresponds to lo8(gs()).

@ S_PM_LO8

Corresponds to pm_lo8().

@ S_HI8_GS

Corresponds to hi8(gs()).

@ S_PM_HI8

Corresponds to pm_hi8().

@ S_HI8

Corresponds to hi8().

This is an optimization pass for GlobalISel generic memory operations.

bool isa(const From &Val)

isa - Return true if the parameter to the template is an instance of one of the template type argu...

LLVM_ABI raw_fd_ostream & errs()

This returns a reference to a raw_ostream for standard error.