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

1

2

3

4

5

6

7

8

9#ifndef LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H

10#define LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H

11

16#include

17#include

18#include

19

20namespace llvm {

21

24 std::optional<uint32_t> Index;

27};

28

32

35

37

38private:

39 bool IsXCOFF;

40 bool HasType;

41

42public:

50 IsXCOFF(IsXCOFF), HasType(true) {}

51 bool isXCOFF() const { return IsXCOFF; }

52

53private:

55 assert((P1.IsXCOFF == P2.IsXCOFF && P1.HasType == P2.HasType) &&

56 "The value of IsXCOFF and HasType in P1 and P2 should be the same "

57 "respectively.");

58

59 if (P1.IsXCOFF && P1.HasType)

62

63 if (P1.IsXCOFF)

66

67

69 return std::tie(P1.Addr, MS1, P1.Name, P1.Type) <

71 }

72};

73

75

76template class ArrayRef;

81

82

83

85public:

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

113

115 : Ctx(Ctx), STI(STI) {}

116

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

194

195private:

197

198protected:

199

202

203public:

204

208

210

211

212

213 void setSymbolizer(std::unique_ptr Symzer);

214

216

218

219

221

222

223

225};

226

227}

228

229#endif

Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx

assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

Tagged union holding either a T or a Error.

Context object for machine code objects.

Superclass for all disassemblers.

MCDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx)

virtual void setABIVersion(unsigned Version)

ELF-specific, set the ABI version from the object header.

MCContext & getContext() const

virtual Expected< bool > onSymbolStart(SymbolInfoTy &Symbol, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address) const

Used to perform separate target specific disassembly for a particular symbol.

bool tryAddingSymbolicOperand(MCInst &Inst, int64_t Value, uint64_t Address, bool IsBranch, uint64_t Offset, uint64_t OpSize, uint64_t InstSize) const

const MCSubtargetInfo & getSubtargetInfo() const

std::unique_ptr< MCSymbolizer > Symbolizer

const MCSubtargetInfo & STI

raw_ostream * CommentStream

void setSymbolizer(std::unique_ptr< MCSymbolizer > Symzer)

Set Symzer as the current symbolizer.

void tryAddingPcLoadReferenceComment(int64_t Value, uint64_t Address) const

virtual uint64_t suggestBytesToSkip(ArrayRef< uint8_t > Bytes, uint64_t Address) const

Suggest a distance to skip in a buffer of data to find the next place to look for the start of an ins...

DecodeStatus

Ternary decode status.

virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef< uint8_t > Bytes, uint64_t Address, raw_ostream &CStream) const =0

Returns the disassembly of a single instruction.

virtual ~MCDisassembler()

Instances of this class represent a single low-level machine instruction.

Generic base class for all target subtargets.

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

The instances of the Type class are immutable: once they are created, they are never changed.

LLVM Value Representation.

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

This is an optimization pass for GlobalISel generic memory operations.

std::vector< SymbolInfoTy > SectionSymbolsTy

SymInfo contains information about symbol: it's address and section index which is -1LL for absolute ...

SymbolInfoTy(std::optional< XCOFF::StorageMappingClass > Smc, uint64_t Addr, StringRef Name, std::optional< uint32_t > Idx, bool Label)

SymbolInfoTy(uint64_t Addr, StringRef Name, uint8_t Type, bool IsMappingSymbol=false, bool IsXCOFF=false)

XCOFFSymbolInfoTy XCOFFSymInfo

friend bool operator<(const SymbolInfoTy &P1, const SymbolInfoTy &P2)

bool operator<(const XCOFFSymbolInfoTy &SymInfo) const

The function is for symbol sorting when symbols have the same address.

std::optional< uint32_t > Index

std::optional< XCOFF::StorageMappingClass > StorageMappingClass