LLVM: include/llvm/MC/MCParser/MCParsedAsmOperand.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_MC_MCPARSER_MCPARSEDASMOPERAND_H

10#define LLVM_MC_MCPARSER_MCPARSEDASMOPERAND_H

11

15#include

16

17namespace llvm {

18

22

23

24

25

26

28

29

30 unsigned MCOperandNum = ~0u;

31

32

33

34 std::string Constraint;

35

36protected:

37

38

39

40

44

45public:

47

50

53

55 virtual void *getOpDecl() { return nullptr; }

56

57

59

60 virtual bool isImm() const = 0;

61

62 virtual bool isReg() const = 0;

64

65

66 virtual bool isMem() const = 0;

67

68

69

70

71

72

74

75

77

79

80

81

83

84

85

86

88

89

91

92

94

95

96 virtual void dump() const;

97};

98}

99

100#endif

This class is intended to be used as a base class for asm properties and features specific to the tar...

virtual bool isMemUseUpRegs() const

isMemUseUpRegs - Is memory operand use up regs, for example, intel MS inline asm may use ARR[baseReg ...

Definition MCParsedAsmOperand.h:73

MCParsedAsmOperand()=default

virtual SMLoc getStartLoc() const =0

getStartLoc - Get the location of the first token of this operand.

void setConstraint(StringRef C)

Definition MCParsedAsmOperand.h:48

MCParsedAsmOperand(const MCParsedAsmOperand &RHS)=default

virtual bool isReg() const =0

isReg - Is this a register operand?

virtual bool isMem() const =0

isMem - Is this a memory operand?

virtual ~MCParsedAsmOperand()=default

virtual bool needAddressOf() const

needAddressOf - Do we need to emit code to get the address of the variable/label?

Definition MCParsedAsmOperand.h:82

virtual void dump() const

dump - Print to the debug stream.

virtual SMLoc getOffsetOfLoc() const

getOffsetOfLoc - Get the location of the offset operator.

Definition MCParsedAsmOperand.h:90

virtual MCRegister getReg() const =0

virtual bool isOffsetOfLocal() const

isOffsetOfLocal - Do we need to emit code to get the offset of the local variable,...

Definition MCParsedAsmOperand.h:87

virtual StringRef getSymName()

Definition MCParsedAsmOperand.h:54

virtual bool isToken() const =0

isToken - Is this a token operand?

virtual bool isImm() const =0

isImm - Is this an immediate operand?

unsigned getMCOperandNum()

Definition MCParsedAsmOperand.h:52

void setMCOperandNum(unsigned OpNum)

Definition MCParsedAsmOperand.h:51

virtual void print(raw_ostream &, const MCAsmInfo &) const =0

print - Print a debug representation of the operand to the given stream.

virtual SMLoc getEndLoc() const =0

getEndLoc - Get the location of the last token of this operand.

StringRef getConstraint()

Definition MCParsedAsmOperand.h:49

MCParsedAsmOperand & operator=(const MCParsedAsmOperand &)=default

virtual void * getOpDecl()

Definition MCParsedAsmOperand.h:55

Wrapper class representing physical registers. Should be passed by value.

Represents a location in source code.

StringRef - Represent a constant reference to a string, i.e.

This class implements an extremely fast bulk output stream that can only output to a stream.

@ C

The default llvm calling convention, compatible with C.

This is an optimization pass for GlobalISel generic memory operations.