LLVM 22.0.0git
MipsTargetStreamer.h
Go to the documentation of this file.
1//===-- MipsTargetStreamer.h - Mips Target Streamer ------------*- C++ -*--===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_LIB_TARGET_MIPS_MIPSTARGETSTREAMER_H
10#define LLVM_LIB_TARGET_MIPS_MIPSTARGETSTREAMER_H
11
14#include "llvm/ADT/STLExtras.h"
17#include "llvm/MC/MCStreamer.h"
18
19namespace llvm {
20
21class formatted_raw_ostream;
22
24public:
26
27 virtual void emitGPRel32Value(const MCExpr *);
28 virtual void emitGPRel64Value(const MCExpr *);
29 virtual void emitDTPRel32Value(const MCExpr *);
30 virtual void emitDTPRel64Value(const MCExpr *);
31 virtual void emitTPRel32Value(const MCExpr *);
32 virtual void emitTPRel64Value(const MCExpr *);
33
34 virtual void setPic(bool Value) {}
35
36 virtual void emitDirectiveSetMicroMips();
37 virtual void emitDirectiveSetNoMicroMips();
38 virtual void setUsesMicroMips();
39 virtual void emitDirectiveSetMips16();
40 virtual void emitDirectiveSetNoMips16();
41
42 virtual void emitDirectiveSetReorder();
43 virtual void emitDirectiveSetNoReorder();
44 virtual void emitDirectiveSetMacro();
45 virtual void emitDirectiveSetNoMacro();
46 virtual void emitDirectiveSetMsa();
47 virtual void emitDirectiveSetNoMsa();
48 virtual void emitDirectiveSetMt();
49 virtual void emitDirectiveSetNoMt();
50 virtual void emitDirectiveSetCRC();
51 virtual void emitDirectiveSetNoCRC();
52 virtual void emitDirectiveSetVirt();
53 virtual void emitDirectiveSetNoVirt();
54 virtual void emitDirectiveSetGINV();
55 virtual void emitDirectiveSetNoGINV();
56 virtual void emitDirectiveSetAt();
57 virtual void emitDirectiveSetAtWithArg(unsigned RegNo);
58 virtual void emitDirectiveSetNoAt();
59 virtual void emitDirectiveEnd(StringRef Name);
60
61 virtual void emitDirectiveEnt(const MCSymbol &Symbol);
62 virtual void emitDirectiveAbiCalls();
63 virtual void emitDirectiveNaN2008();
64 virtual void emitDirectiveNaNLegacy();
65 virtual void emitDirectiveOptionPic0();
66 virtual void emitDirectiveOptionPic2();
67 virtual void emitDirectiveInsn();
68 virtual void emitFrame(MCRegister StackReg, unsigned StackSize,
70 virtual void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff);
71 virtual void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff);
72
73 virtual void emitDirectiveSetArch(StringRef Arch);
74 virtual void emitDirectiveSetMips0();
75 virtual void emitDirectiveSetMips1();
76 virtual void emitDirectiveSetMips2();
77 virtual void emitDirectiveSetMips3();
78 virtual void emitDirectiveSetMips4();
79 virtual void emitDirectiveSetMips5();
80 virtual void emitDirectiveSetMips32();
81 virtual void emitDirectiveSetMips32R2();
82 virtual void emitDirectiveSetMips32R3();
83 virtual void emitDirectiveSetMips32R5();
84 virtual void emitDirectiveSetMips32R6();
85 virtual void emitDirectiveSetMips64();
86 virtual void emitDirectiveSetMips64R2();
87 virtual void emitDirectiveSetMips64R3();
88 virtual void emitDirectiveSetMips64R5();
89 virtual void emitDirectiveSetMips64R6();
90 virtual void emitDirectiveSetDsp();
91 virtual void emitDirectiveSetDspr2();
92 virtual void emitDirectiveSetNoDsp();
93 virtual void emitDirectiveSetMips3D();
94 virtual void emitDirectiveSetNoMips3D();
95 virtual void emitDirectiveSetPop();
96 virtual void emitDirectiveSetPush();
97 virtual void emitDirectiveSetSoftFloat();
98 virtual void emitDirectiveSetHardFloat();
99
100 // PIC support
101 virtual void emitDirectiveCpAdd(unsigned RegNo);
102 virtual void emitDirectiveCpLoad(unsigned RegNo);
103 virtual void emitDirectiveCpLocal(unsigned RegNo);
104 virtual bool emitDirectiveCpRestore(int Offset,
105 function_ref<unsigned()> GetATReg,
106 SMLoc IDLoc, const MCSubtargetInfo *STI);
107 virtual void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset,
108 const MCSymbol &Sym, bool IsReg);
109 virtual void emitDirectiveCpreturn(unsigned SaveLocation,
110 bool SaveLocationIsRegister);
111
112 // FP abiflags directives
113 virtual void emitDirectiveModuleFP();
114 virtual void emitDirectiveModuleOddSPReg();
115 virtual void emitDirectiveModuleSoftFloat();
116 virtual void emitDirectiveModuleHardFloat();
117 virtual void emitDirectiveModuleMT();
119 virtual void emitDirectiveSetOddSPReg();
120 virtual void emitDirectiveSetNoOddSPReg();
121 virtual void emitDirectiveModuleCRC();
122 virtual void emitDirectiveModuleNoCRC();
123 virtual void emitDirectiveModuleVirt();
124 virtual void emitDirectiveModuleNoVirt();
125 virtual void emitDirectiveModuleGINV();
126 virtual void emitDirectiveModuleNoGINV();
127
128 void emitR(unsigned Opcode, MCRegister Reg0, SMLoc IDLoc,
129 const MCSubtargetInfo *STI);
130 void emitII(unsigned Opcode, int16_t Imm1, int16_t Imm2, SMLoc IDLoc,
131 const MCSubtargetInfo *STI);
132 void emitRX(unsigned Opcode, MCRegister Reg0, MCOperand Op1, SMLoc IDLoc,
133 const MCSubtargetInfo *STI);
134 void emitRI(unsigned Opcode, MCRegister Reg0, int32_t Imm, SMLoc IDLoc,
135 const MCSubtargetInfo *STI);
136 void emitRR(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, SMLoc IDLoc,
137 const MCSubtargetInfo *STI);
138 void emitRRX(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, MCOperand Op2,
139 SMLoc IDLoc, const MCSubtargetInfo *STI);
140 void emitRRR(unsigned Opcode, MCRegister Reg0, MCRegister Reg1,
141 MCRegister Reg2, SMLoc IDLoc, const MCSubtargetInfo *STI);
142 void emitRRRX(unsigned Opcode, MCRegister Reg0, MCRegister Reg1,
143 MCRegister Reg2, MCOperand Op3, SMLoc IDLoc,
144 const MCSubtargetInfo *STI);
145 void emitRRI(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, int16_t Imm,
146 SMLoc IDLoc, const MCSubtargetInfo *STI);
147 void emitRRIII(unsigned Opcode, MCRegister Reg0, MCRegister Reg1,
148 int16_t Imm0, int16_t Imm1, int16_t Imm2, SMLoc IDLoc,
149 const MCSubtargetInfo *STI);
150 void emitAddu(MCRegister DstReg, MCRegister SrcReg, MCRegister TrgReg,
151 bool Is64Bit, const MCSubtargetInfo *STI);
152 void emitDSLL(MCRegister DstReg, MCRegister SrcReg, int16_t ShiftAmount,
153 SMLoc IDLoc, const MCSubtargetInfo *STI);
155 const MCSubtargetInfo *STI);
156 void emitNop(SMLoc IDLoc, const MCSubtargetInfo *STI);
157
158 /// Emit a store instruction with an offset. If the offset is out of range
159 /// then it will be synthesized using the assembler temporary.
160 ///
161 /// GetATReg() is a callback that can be used to obtain the current assembler
162 /// temporary and is only called when the assembler temporary is required. It
163 /// must handle the case where no assembler temporary is available (typically
164 /// by reporting an error).
165 void emitStoreWithImmOffset(unsigned Opcode, MCRegister SrcReg,
166 MCRegister BaseReg, int64_t Offset,
167 function_ref<unsigned()> GetATReg, SMLoc IDLoc,
168 const MCSubtargetInfo *STI);
169 void emitLoadWithImmOffset(unsigned Opcode, MCRegister DstReg,
170 MCRegister BaseReg, int64_t Offset,
171 MCRegister TmpReg, SMLoc IDLoc,
172 const MCSubtargetInfo *STI);
173 void emitGPRestore(int Offset, SMLoc IDLoc, const MCSubtargetInfo *STI);
174
175 void forbidModuleDirective() { ModuleDirectiveAllowed = false; }
176 void reallowModuleDirective() { ModuleDirectiveAllowed = true; }
177 bool isModuleDirectiveAllowed() { return ModuleDirectiveAllowed; }
178
179 // This method enables template classes to set internal abi flags
180 // structure values.
181 template <class PredicateLibrary>
182 void updateABIInfo(const PredicateLibrary &P) {
183 ABI = P.getABI();
185 }
186
188 const MipsABIInfo &getABI() const {
189 assert(ABI && "ABI hasn't been set!");
190 return *ABI;
191 }
192
193protected:
194 std::optional<MipsABIInfo> ABI;
196
198 unsigned GPRBitMask;
200
202 unsigned FPRBitMask;
204
207 unsigned FrameReg;
208 unsigned GPReg;
209 unsigned ReturnReg;
210
211private:
212 bool ModuleDirectiveAllowed;
213};
214
215// This part is for ascii assembly output
218
219public:
221
222 void emitGPRel32Value(const MCExpr *) override;
223 void emitGPRel64Value(const MCExpr *) override;
224 void emitDTPRel32Value(const MCExpr *) override;
225 void emitDTPRel64Value(const MCExpr *) override;
226 void emitTPRel32Value(const MCExpr *) override;
227 void emitTPRel64Value(const MCExpr *) override;
228
229 void emitDirectiveSetMicroMips() override;
230 void emitDirectiveSetNoMicroMips() override;
231 void emitDirectiveSetMips16() override;
232 void emitDirectiveSetNoMips16() override;
233
234 void emitDirectiveSetReorder() override;
235 void emitDirectiveSetNoReorder() override;
236 void emitDirectiveSetMacro() override;
237 void emitDirectiveSetNoMacro() override;
238 void emitDirectiveSetMsa() override;
239 void emitDirectiveSetNoMsa() override;
240 void emitDirectiveSetMt() override;
241 void emitDirectiveSetNoMt() override;
242 void emitDirectiveSetCRC() override;
243 void emitDirectiveSetNoCRC() override;
244 void emitDirectiveSetVirt() override;
245 void emitDirectiveSetNoVirt() override;
246 void emitDirectiveSetGINV() override;
247 void emitDirectiveSetNoGINV() override;
248 void emitDirectiveSetAt() override;
249 void emitDirectiveSetAtWithArg(unsigned RegNo) override;
250 void emitDirectiveSetNoAt() override;
251 void emitDirectiveEnd(StringRef Name) override;
252
253 void emitDirectiveEnt(const MCSymbol &Symbol) override;
254 void emitDirectiveAbiCalls() override;
255 void emitDirectiveNaN2008() override;
256 void emitDirectiveNaNLegacy() override;
257 void emitDirectiveOptionPic0() override;
258 void emitDirectiveOptionPic2() override;
259 void emitDirectiveInsn() override;
260 void emitFrame(MCRegister StackReg, unsigned StackSize,
261 MCRegister ReturnReg) override;
262 void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override;
263 void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override;
264
265 void emitDirectiveSetArch(StringRef Arch) override;
266 void emitDirectiveSetMips0() override;
267 void emitDirectiveSetMips1() override;
268 void emitDirectiveSetMips2() override;
269 void emitDirectiveSetMips3() override;
270 void emitDirectiveSetMips4() override;
271 void emitDirectiveSetMips5() override;
272 void emitDirectiveSetMips32() override;
273 void emitDirectiveSetMips32R2() override;
274 void emitDirectiveSetMips32R3() override;
275 void emitDirectiveSetMips32R5() override;
276 void emitDirectiveSetMips32R6() override;
277 void emitDirectiveSetMips64() override;
278 void emitDirectiveSetMips64R2() override;
279 void emitDirectiveSetMips64R3() override;
280 void emitDirectiveSetMips64R5() override;
281 void emitDirectiveSetMips64R6() override;
282 void emitDirectiveSetDsp() override;
283 void emitDirectiveSetDspr2() override;
284 void emitDirectiveSetNoDsp() override;
285 void emitDirectiveSetMips3D() override;
286 void emitDirectiveSetNoMips3D() override;
287 void emitDirectiveSetPop() override;
288 void emitDirectiveSetPush() override;
289 void emitDirectiveSetSoftFloat() override;
290 void emitDirectiveSetHardFloat() override;
291
292 // PIC support
293 void emitDirectiveCpAdd(unsigned RegNo) override;
294 void emitDirectiveCpLoad(unsigned RegNo) override;
295 void emitDirectiveCpLocal(unsigned RegNo) override;
296
297 /// Emit a .cprestore directive. If the offset is out of range then it will
298 /// be synthesized using the assembler temporary.
299 ///
300 /// GetATReg() is a callback that can be used to obtain the current assembler
301 /// temporary and is only called when the assembler temporary is required. It
302 /// must handle the case where no assembler temporary is available (typically
303 /// by reporting an error).
304 bool emitDirectiveCpRestore(int Offset, function_ref<unsigned()> GetATReg,
305 SMLoc IDLoc, const MCSubtargetInfo *STI) override;
306 void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset,
307 const MCSymbol &Sym, bool IsReg) override;
308 void emitDirectiveCpreturn(unsigned SaveLocation,
309 bool SaveLocationIsRegister) override;
310
311 // FP abiflags directives
312 void emitDirectiveModuleFP() override;
313 void emitDirectiveModuleOddSPReg() override;
314 void emitDirectiveModuleSoftFloat() override;
315 void emitDirectiveModuleHardFloat() override;
316 void emitDirectiveModuleMT() override;
317 void emitDirectiveModuleCRC() override;
318 void emitDirectiveModuleNoCRC() override;
319 void emitDirectiveModuleVirt() override;
320 void emitDirectiveModuleNoVirt() override;
321 void emitDirectiveModuleGINV() override;
322 void emitDirectiveModuleNoGINV() override;
324 void emitDirectiveSetOddSPReg() override;
325 void emitDirectiveSetNoOddSPReg() override;
326};
327
328// This part is for ELF object output
330 bool MicroMipsEnabled;
331 const MCSubtargetInfo &STI;
332 bool Pic;
333
334public:
335 bool isMicroMipsEnabled() const { return MicroMipsEnabled; }
338
339 void setPic(bool Value) override { Pic = Value; }
340
341 void emitLabel(MCSymbol *Symbol) override;
342 void emitAssignment(MCSymbol *Symbol, const MCExpr *Value) override;
343 void finish() override;
344
345 void emitGPRel32Value(const MCExpr *) override;
346 void emitGPRel64Value(const MCExpr *) override;
347 void emitDTPRel32Value(const MCExpr *) override;
348 void emitDTPRel64Value(const MCExpr *) override;
349 void emitTPRel32Value(const MCExpr *) override;
350 void emitTPRel64Value(const MCExpr *) override;
351
352 void emitDirectiveSetMicroMips() override;
353 void emitDirectiveSetNoMicroMips() override;
354 void setUsesMicroMips() override;
355 void emitDirectiveSetMips16() override;
356
357 void emitDirectiveSetNoReorder() override;
358 void emitDirectiveEnd(StringRef Name) override;
359
360 void emitDirectiveEnt(const MCSymbol &Symbol) override;
361 void emitDirectiveAbiCalls() override;
362 void emitDirectiveNaN2008() override;
363 void emitDirectiveNaNLegacy() override;
364 void emitDirectiveOptionPic0() override;
365 void emitDirectiveOptionPic2() override;
366 void emitDirectiveInsn() override;
367 void emitFrame(MCRegister StackReg, unsigned StackSize,
368 MCRegister ReturnReg) override;
369 void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override;
370 void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override;
371
372 // PIC support
373 void emitDirectiveCpAdd(unsigned RegNo) override;
374 void emitDirectiveCpLoad(unsigned RegNo) override;
375 void emitDirectiveCpLocal(unsigned RegNo) override;
376 bool emitDirectiveCpRestore(int Offset, function_ref<unsigned()> GetATReg,
377 SMLoc IDLoc, const MCSubtargetInfo *STI) override;
378 void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset,
379 const MCSymbol &Sym, bool IsReg) override;
380 void emitDirectiveCpreturn(unsigned SaveLocation,
381 bool SaveLocationIsRegister) override;
382
383 void emitMipsAbiFlags();
384};
385}
386#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
std::string Name
Symbol * Sym
Definition: ELF_riscv.cpp:479
static bool hasShortDelaySlot(MCInst &Inst)
#define P(N)
This file contains some templates that are useful if you are working with the STL at all.
raw_pwrite_stream & OS
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:34
Instances of this class represent operands of the MCInst class.
Definition: MCInst.h:40
Wrapper class representing physical registers. Should be passed by value.
Definition: MCRegister.h:33
Streaming machine code generation interface.
Definition: MCStreamer.h:220
Generic base class for all target subtargets.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:42
Target specific streamer interface.
Definition: MCStreamer.h:93
void emitDirectiveSetFp(MipsABIFlagsSection::FpABIKind Value) override
void emitDirectiveSetArch(StringRef Arch) override
bool emitDirectiveCpRestore(int Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI) override
Emit a .cprestore directive.
void emitDirectiveCpLoad(unsigned RegNo) override
void emitDirectiveSetNoOddSPReg() override
void emitDirectiveEnt(const MCSymbol &Symbol) override
void emitDirectiveModuleSoftFloat() override
void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset, const MCSymbol &Sym, bool IsReg) override
void emitDTPRel64Value(const MCExpr *) override
void emitTPRel64Value(const MCExpr *) override
void emitDirectiveCpLocal(unsigned RegNo) override
void emitFrame(MCRegister StackReg, unsigned StackSize, MCRegister ReturnReg) override
void emitDirectiveModuleHardFloat() override
void emitDirectiveEnd(StringRef Name) override
void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override
void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override
void emitDirectiveCpreturn(unsigned SaveLocation, bool SaveLocationIsRegister) override
void emitDirectiveCpAdd(unsigned RegNo) override
void emitDTPRel32Value(const MCExpr *) override
void emitTPRel32Value(const MCExpr *) override
void emitDirectiveSetAtWithArg(unsigned RegNo) override
void emitGPRel64Value(const MCExpr *) override
void emitDirectiveSetNoMicroMips() override
void emitGPRel32Value(const MCExpr *) override
void emitDirectiveModuleOddSPReg() override
void emitDTPRel32Value(const MCExpr *) override
void emitDirectiveCpAdd(unsigned RegNo) override
void setPic(bool Value) override
void emitDirectiveCpLoad(unsigned RegNo) override
void emitGPRel64Value(const MCExpr *) override
void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset, const MCSymbol &Sym, bool IsReg) override
void emitGPRel32Value(const MCExpr *) override
void emitDirectiveEnd(StringRef Name) override
void emitFrame(MCRegister StackReg, unsigned StackSize, MCRegister ReturnReg) override
bool emitDirectiveCpRestore(int Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI) override
void emitTPRel64Value(const MCExpr *) override
void emitLabel(MCSymbol *Symbol) override
void emitTPRel32Value(const MCExpr *) override
void emitDTPRel64Value(const MCExpr *) override
void emitDirectiveCpLocal(unsigned RegNo) override
void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override
void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override
void emitAssignment(MCSymbol *Symbol, const MCExpr *Value) override
void emitDirectiveCpreturn(unsigned SaveLocation, bool SaveLocationIsRegister) override
void emitDirectiveEnt(const MCSymbol &Symbol) override
std::optional< MipsABIInfo > ABI
virtual void emitDirectiveSetMips64R5()
virtual void emitDirectiveModuleNoVirt()
void emitRRX(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, MCOperand Op2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetReorder()
virtual void emitDirectiveSetNoCRC()
virtual void emitFrame(MCRegister StackReg, unsigned StackSize, MCRegister ReturnReg)
void emitRRRX(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, MCRegister Reg2, MCOperand Op3, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveModuleNoGINV()
virtual void emitDirectiveSetSoftFloat()
virtual void emitDirectiveCpreturn(unsigned SaveLocation, bool SaveLocationIsRegister)
virtual void emitGPRel32Value(const MCExpr *)
virtual void emitDirectiveSetNoMicroMips()
void emitRX(unsigned Opcode, MCRegister Reg0, MCOperand Op1, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetMips64R2()
virtual void emitDirectiveEnd(StringRef Name)
virtual void emitDirectiveSetFp(MipsABIFlagsSection::FpABIKind Value)
virtual void emitTPRel64Value(const MCExpr *)
virtual void emitDirectiveSetMips64R3()
virtual void emitDirectiveSetNoVirt()
virtual void emitDirectiveSetMacro()
virtual void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset, const MCSymbol &Sym, bool IsReg)
void emitR(unsigned Opcode, MCRegister Reg0, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetNoGINV()
virtual void emitDirectiveSetMips32R3()
virtual void emitDirectiveSetMips32R2()
void emitRRI(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, int16_t Imm, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveEnt(const MCSymbol &Symbol)
virtual void emitDirectiveSetNoMips3D()
void emitLoadWithImmOffset(unsigned Opcode, MCRegister DstReg, MCRegister BaseReg, int64_t Offset, MCRegister TmpReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit a load instruction with an immediate offset.
virtual void emitDirectiveCpLocal(unsigned RegNo)
virtual void emitDirectiveCpLoad(unsigned RegNo)
virtual void emitDirectiveSetHardFloat()
void emitEmptyDelaySlot(bool hasShortDelaySlot, SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitAddu(MCRegister DstReg, MCRegister SrcReg, MCRegister TrgReg, bool Is64Bit, const MCSubtargetInfo *STI)
void emitRI(unsigned Opcode, MCRegister Reg0, int32_t Imm, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitTPRel32Value(const MCExpr *)
virtual void emitDirectiveSetNoMips16()
virtual void setPic(bool Value)
virtual void emitDirectiveSetNoOddSPReg()
virtual void emitGPRel64Value(const MCExpr *)
void emitII(unsigned Opcode, int16_t Imm1, int16_t Imm2, SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitRR(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetOddSPReg()
virtual void emitDirectiveModuleGINV()
void updateABIInfo(const PredicateLibrary &P)
virtual void emitDirectiveNaNLegacy()
virtual void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff)
void emitRRIII(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, int16_t Imm0, int16_t Imm1, int16_t Imm2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetMicroMips()
virtual void emitDTPRel64Value(const MCExpr *)
virtual void emitDirectiveModuleSoftFloat()
virtual void emitDirectiveSetArch(StringRef Arch)
virtual void emitDTPRel32Value(const MCExpr *)
virtual void emitDirectiveSetAtWithArg(unsigned RegNo)
virtual bool emitDirectiveCpRestore(int Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveModuleNoCRC()
virtual void emitDirectiveSetNoMacro()
void emitDSLL(MCRegister DstReg, MCRegister SrcReg, int16_t ShiftAmount, SMLoc IDLoc, const MCSubtargetInfo *STI)
const MipsABIInfo & getABI() const
virtual void emitDirectiveModuleOddSPReg()
virtual void emitDirectiveCpAdd(unsigned RegNo)
virtual void emitDirectiveSetMips64R6()
virtual void emitDirectiveSetNoMsa()
void emitGPRestore(int Offset, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit the $gp restore operation for .cprestore.
virtual void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff)
virtual void emitDirectiveModuleVirt()
void emitNop(SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitRRR(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, MCRegister Reg2, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveSetNoReorder()
MipsABIFlagsSection & getABIFlagsSection()
virtual void emitDirectiveOptionPic0()
virtual void emitDirectiveModuleHardFloat()
virtual void emitDirectiveSetMips32R5()
virtual void emitDirectiveSetMips32R6()
virtual void emitDirectiveOptionPic2()
virtual void emitDirectiveSetMips16()
virtual void emitDirectiveAbiCalls()
void emitStoreWithImmOffset(unsigned Opcode, MCRegister SrcReg, MCRegister BaseReg, int64_t Offset, function_ref< unsigned()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit a store instruction with an offset.
MipsABIFlagsSection ABIFlagsSection
Represents a location in source code.
Definition: SMLoc.h:23
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
LLVM Value Representation.
Definition: Value.h:75
formatted_raw_ostream - A raw_ostream that wraps another one and keeps track of line and column posit...
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Offset
Definition: DWP.cpp:477
void setAllFromPredicates(const PredicateLibrary &P)