LLVM 24.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"
18#include "llvm/MC/MCStreamer.h"
19
20namespace llvm {
21
23
25public:
27
28 virtual void emitGPRel32Value(const MCExpr *);
29 virtual void emitGPRel64Value(const MCExpr *);
30 virtual void emitDTPRel32Value(const MCExpr *);
31 virtual void emitDTPRel64Value(const MCExpr *);
32 virtual void emitTPRel32Value(const MCExpr *);
33 virtual void emitTPRel64Value(const MCExpr *);
34
35 virtual void setPic(bool Value) {}
36
37 virtual void emitDirectiveSetMicroMips();
38 virtual void emitDirectiveSetNoMicroMips();
39 virtual void setUsesMicroMips();
40 virtual void emitDirectiveSetMips16();
41 virtual void emitDirectiveSetNoMips16();
42
43 virtual void emitDirectiveSetReorder();
44 virtual void emitDirectiveSetNoReorder();
45 virtual void emitDirectiveSetMacro();
46 virtual void emitDirectiveSetNoMacro();
47 virtual void emitDirectiveSetMsa();
48 virtual void emitDirectiveSetNoMsa();
49 virtual void emitDirectiveSetMt();
50 virtual void emitDirectiveSetNoMt();
51 virtual void emitDirectiveSetCRC();
52 virtual void emitDirectiveSetNoCRC();
53 virtual void emitDirectiveSetVirt();
54 virtual void emitDirectiveSetNoVirt();
55 virtual void emitDirectiveSetGINV();
56 virtual void emitDirectiveSetNoGINV();
57 virtual void emitDirectiveSetEVA();
58 virtual void emitDirectiveSetNoEVA();
59 virtual void emitDirectiveSetAt();
60 virtual void emitDirectiveSetAtWithArg(unsigned RegNo);
61 virtual void emitDirectiveSetNoAt();
62 virtual void emitDirectiveEnd(StringRef Name);
63
64 virtual void emitDirectiveEnt(const MCSymbol &Symbol);
65 virtual void emitDirectiveAbiCalls();
66 virtual void emitDirectiveNaN2008();
67 virtual void emitDirectiveNaNLegacy();
68 virtual void emitDirectiveOptionPic0();
69 virtual void emitDirectiveOptionPic2();
70 virtual void emitDirectiveInsn();
71 virtual void emitFrame(MCRegister StackReg, unsigned StackSize,
73 virtual void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff);
74 virtual void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff);
75
76 virtual void emitDirectiveSetArch(StringRef Arch);
77 virtual void emitDirectiveSetMips0();
78 virtual void emitDirectiveSetMips1();
79 virtual void emitDirectiveSetMips2();
80 virtual void emitDirectiveSetMips3();
81 virtual void emitDirectiveSetMips4();
82 virtual void emitDirectiveSetMips5();
83 virtual void emitDirectiveSetMips32();
84 virtual void emitDirectiveSetMips32R2();
85 virtual void emitDirectiveSetMips32R3();
86 virtual void emitDirectiveSetMips32R5();
87 virtual void emitDirectiveSetMips32R6();
88 virtual void emitDirectiveSetMips64();
89 virtual void emitDirectiveSetMips64R2();
90 virtual void emitDirectiveSetMips64R3();
91 virtual void emitDirectiveSetMips64R5();
92 virtual void emitDirectiveSetMips64R6();
93 virtual void emitDirectiveSetDsp();
94 virtual void emitDirectiveSetDspr2();
95 virtual void emitDirectiveSetNoDsp();
96 virtual void emitDirectiveSetMips3D();
97 virtual void emitDirectiveSetNoMips3D();
98 virtual void emitDirectiveSetPop();
99 virtual void emitDirectiveSetPush();
100 virtual void emitDirectiveSetSoftFloat();
101 virtual void emitDirectiveSetHardFloat();
102
103 // PIC support
104 virtual void emitDirectiveCpAdd(MCRegister Reg);
105 virtual void emitDirectiveCpLoad(MCRegister Reg);
106 virtual void emitDirectiveCpLocal(MCRegister Reg);
107 virtual bool emitDirectiveCpRestore(int Offset,
108 function_ref<MCRegister()> GetATReg,
109 SMLoc IDLoc, const MCSubtargetInfo *STI);
110 virtual void emitDirectiveCpsetup(MCRegister Reg, int RegOrOffset,
111 const MCSymbol &Sym, bool IsReg);
112 virtual void emitDirectiveCpreturn(unsigned SaveLocation,
113 bool SaveLocationIsRegister);
114
115 // FP abiflags directives
116 virtual void emitDirectiveModuleFP();
117 virtual void emitDirectiveModuleOddSPReg();
118 virtual void emitDirectiveModuleSoftFloat();
119 virtual void emitDirectiveModuleHardFloat();
120 virtual void emitDirectiveModuleMT();
122 virtual void emitDirectiveSetOddSPReg();
123 virtual void emitDirectiveSetNoOddSPReg();
124 virtual void emitDirectiveModuleCRC();
125 virtual void emitDirectiveModuleNoCRC();
126 virtual void emitDirectiveModuleVirt();
127 virtual void emitDirectiveModuleNoVirt();
128 virtual void emitDirectiveModuleGINV();
129 virtual void emitDirectiveModuleNoGINV();
130
131 void emitR(unsigned Opcode, MCRegister Reg0, SMLoc IDLoc,
132 const MCSubtargetInfo *STI);
133 void emitII(unsigned Opcode, int16_t Imm1, int16_t Imm2, SMLoc IDLoc,
134 const MCSubtargetInfo *STI);
135 void emitRX(unsigned Opcode, MCRegister Reg0, MCOperand Op1, SMLoc IDLoc,
136 const MCSubtargetInfo *STI);
137 void emitRI(unsigned Opcode, MCRegister Reg0, int32_t Imm, SMLoc IDLoc,
138 const MCSubtargetInfo *STI);
139 void emitRR(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, SMLoc IDLoc,
140 const MCSubtargetInfo *STI);
141 void emitRRX(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, MCOperand Op2,
142 SMLoc IDLoc, const MCSubtargetInfo *STI);
143 void emitRRR(unsigned Opcode, MCRegister Reg0, MCRegister Reg1,
144 MCRegister Reg2, SMLoc IDLoc, const MCSubtargetInfo *STI);
145 void emitRRRX(unsigned Opcode, MCRegister Reg0, MCRegister Reg1,
146 MCRegister Reg2, MCOperand Op3, SMLoc IDLoc,
147 const MCSubtargetInfo *STI);
148 void emitRRI(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, int16_t Imm,
149 SMLoc IDLoc, const MCSubtargetInfo *STI);
150 void emitRRIII(unsigned Opcode, MCRegister Reg0, MCRegister Reg1,
151 int16_t Imm0, int16_t Imm1, int16_t Imm2, SMLoc IDLoc,
152 const MCSubtargetInfo *STI);
153 void emitAddu(MCRegister DstReg, MCRegister SrcReg, MCRegister TrgReg,
154 bool Is64Bit, const MCSubtargetInfo *STI);
155 void emitDSLL(MCRegister DstReg, MCRegister SrcReg, int16_t ShiftAmount,
156 SMLoc IDLoc, const MCSubtargetInfo *STI);
158 const MCSubtargetInfo *STI);
159 void emitNop(SMLoc IDLoc, const MCSubtargetInfo *STI);
160
161 /// Emit a store instruction with an offset. If the offset is out of range
162 /// then it will be synthesized using the assembler temporary.
163 ///
164 /// GetATReg() is a callback that can be used to obtain the current assembler
165 /// temporary and is only called when the assembler temporary is required. It
166 /// must handle the case where no assembler temporary is available (typically
167 /// by reporting an error).
168 void emitStoreWithImmOffset(unsigned Opcode, MCRegister SrcReg,
169 MCRegister BaseReg, int64_t Offset,
170 function_ref<MCRegister()> GetATReg, SMLoc IDLoc,
171 const MCSubtargetInfo *STI);
172 void emitLoadWithImmOffset(unsigned Opcode, MCRegister DstReg,
173 MCRegister BaseReg, int64_t Offset,
174 MCRegister TmpReg, SMLoc IDLoc,
175 const MCSubtargetInfo *STI);
176 void emitGPRestore(int Offset, SMLoc IDLoc, const MCSubtargetInfo *STI);
177
178 void forbidModuleDirective() { ModuleDirectiveAllowed = false; }
179 void reallowModuleDirective() { ModuleDirectiveAllowed = true; }
180 bool isModuleDirectiveAllowed() { return ModuleDirectiveAllowed; }
181
182 // This method enables template classes to set internal abi flags
183 // structure values.
184 template <class PredicateLibrary>
185 void updateABIInfo(const PredicateLibrary &P) {
186 ABI = P.getABI();
187 ABIFlagsSection.setAllFromPredicates(P);
188 }
189
191 const MipsABIInfo &getABI() const {
192 assert(ABI && "ABI hasn't been set!");
193 return *ABI;
194 }
195
196protected:
197 std::optional<MipsABIInfo> ABI;
199
201 unsigned GPRBitMask;
203
205 unsigned FPRBitMask;
207
210 unsigned FrameReg;
212 unsigned ReturnReg;
213
214private:
215 bool ModuleDirectiveAllowed;
216};
217
218// This part is for ascii assembly output
221
222public:
224
225 void emitGPRel32Value(const MCExpr *) override;
226 void emitGPRel64Value(const MCExpr *) override;
227 void emitDTPRel32Value(const MCExpr *) override;
228 void emitDTPRel64Value(const MCExpr *) override;
229 void emitTPRel32Value(const MCExpr *) override;
230 void emitTPRel64Value(const MCExpr *) override;
231
232 void emitDirectiveSetMicroMips() override;
233 void emitDirectiveSetNoMicroMips() override;
234 void emitDirectiveSetMips16() override;
235 void emitDirectiveSetNoMips16() override;
236
237 void emitDirectiveSetReorder() override;
238 void emitDirectiveSetNoReorder() override;
239 void emitDirectiveSetMacro() override;
240 void emitDirectiveSetNoMacro() override;
241 void emitDirectiveSetMsa() override;
242 void emitDirectiveSetNoMsa() override;
243 void emitDirectiveSetMt() override;
244 void emitDirectiveSetNoMt() override;
245 void emitDirectiveSetCRC() override;
246 void emitDirectiveSetNoCRC() override;
247 void emitDirectiveSetVirt() override;
248 void emitDirectiveSetNoVirt() override;
249 void emitDirectiveSetGINV() override;
250 void emitDirectiveSetNoGINV() override;
251 void emitDirectiveSetEVA() override;
252 void emitDirectiveSetNoEVA() override;
253 void emitDirectiveSetAt() override;
254 void emitDirectiveSetAtWithArg(unsigned RegNo) override;
255 void emitDirectiveSetNoAt() override;
256 void emitDirectiveEnd(StringRef Name) override;
257
258 void emitDirectiveEnt(const MCSymbol &Symbol) override;
259 void emitDirectiveAbiCalls() override;
260 void emitDirectiveNaN2008() override;
261 void emitDirectiveNaNLegacy() override;
262 void emitDirectiveOptionPic0() override;
263 void emitDirectiveOptionPic2() override;
264 void emitDirectiveInsn() override;
265 void emitFrame(MCRegister StackReg, unsigned StackSize,
266 MCRegister ReturnReg) override;
267 void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override;
268 void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override;
269
270 void emitDirectiveSetArch(StringRef Arch) override;
271 void emitDirectiveSetMips0() override;
272 void emitDirectiveSetMips1() override;
273 void emitDirectiveSetMips2() override;
274 void emitDirectiveSetMips3() override;
275 void emitDirectiveSetMips4() override;
276 void emitDirectiveSetMips5() override;
277 void emitDirectiveSetMips32() override;
278 void emitDirectiveSetMips32R2() override;
279 void emitDirectiveSetMips32R3() override;
280 void emitDirectiveSetMips32R5() override;
281 void emitDirectiveSetMips32R6() override;
282 void emitDirectiveSetMips64() override;
283 void emitDirectiveSetMips64R2() override;
284 void emitDirectiveSetMips64R3() override;
285 void emitDirectiveSetMips64R5() override;
286 void emitDirectiveSetMips64R6() override;
287 void emitDirectiveSetDsp() override;
288 void emitDirectiveSetDspr2() override;
289 void emitDirectiveSetNoDsp() override;
290 void emitDirectiveSetMips3D() override;
291 void emitDirectiveSetNoMips3D() override;
292 void emitDirectiveSetPop() override;
293 void emitDirectiveSetPush() override;
294 void emitDirectiveSetSoftFloat() override;
295 void emitDirectiveSetHardFloat() override;
296
297 // PIC support
298 void emitDirectiveCpAdd(MCRegister Reg) override;
299 void emitDirectiveCpLoad(MCRegister Reg) override;
300 void emitDirectiveCpLocal(MCRegister Reg) override;
301
302 /// Emit a .cprestore directive. If the offset is out of range then it will
303 /// be synthesized using the assembler temporary.
304 ///
305 /// GetATReg() is a callback that can be used to obtain the current assembler
306 /// temporary and is only called when the assembler temporary is required. It
307 /// must handle the case where no assembler temporary is available (typically
308 /// by reporting an error).
310 SMLoc IDLoc, const MCSubtargetInfo *STI) override;
311 void emitDirectiveCpsetup(MCRegister Reg, int RegOrOffset,
312 const MCSymbol &Sym, bool IsReg) override;
313 void emitDirectiveCpreturn(unsigned SaveLocation,
314 bool SaveLocationIsRegister) override;
315
316 // FP abiflags directives
317 void emitDirectiveModuleFP() override;
318 void emitDirectiveModuleOddSPReg() override;
319 void emitDirectiveModuleSoftFloat() override;
320 void emitDirectiveModuleHardFloat() override;
321 void emitDirectiveModuleMT() override;
322 void emitDirectiveModuleCRC() override;
323 void emitDirectiveModuleNoCRC() override;
324 void emitDirectiveModuleVirt() override;
325 void emitDirectiveModuleNoVirt() override;
326 void emitDirectiveModuleGINV() override;
327 void emitDirectiveModuleNoGINV() override;
329 void emitDirectiveSetOddSPReg() override;
330 void emitDirectiveSetNoOddSPReg() override;
331};
332
333// This part is for ELF object output
335 enum class ISAMode { Standard, MicroMips, Mips16 };
336 static ISAMode getISAMode(const MCSubtargetInfo &STI);
337
338 ISAMode Mode;
339 SmallVector<ISAMode, 4> ModeStack;
340 const MCSubtargetInfo &STI;
341 bool Pic;
342
343public:
344 bool isMicroMipsEnabled() const { return Mode == ISAMode::MicroMips; }
345 bool isMips16Enabled() const { return Mode == ISAMode::Mips16; }
348
349 void setPic(bool Value) override { Pic = Value; }
350
351 void emitLabel(MCSymbol *Symbol) override;
352 void emitAssignment(MCSymbol *Symbol, const MCExpr *Value) override;
353 void finish() override;
354
355 void emitGPRel32Value(const MCExpr *) override;
356 void emitGPRel64Value(const MCExpr *) override;
357 void emitDTPRel32Value(const MCExpr *) override;
358 void emitDTPRel64Value(const MCExpr *) override;
359 void emitTPRel32Value(const MCExpr *) override;
360 void emitTPRel64Value(const MCExpr *) override;
361
362 void emitDirectiveSetMicroMips() override;
363 void emitDirectiveSetNoMicroMips() override;
364 void emitDirectiveSetPush() override;
365 void emitDirectiveSetPop() override;
366 void emitDirectiveSetMips0() override;
367 void setUsesMicroMips() override;
368 void emitDirectiveSetMips16() override;
369 void emitDirectiveSetNoMips16() override;
370
371 void emitDirectiveSetNoReorder() override;
372 void emitDirectiveEnd(StringRef Name) override;
373
374 void emitDirectiveEnt(const MCSymbol &Symbol) override;
375 void emitDirectiveAbiCalls() override;
376 void emitDirectiveNaN2008() override;
377 void emitDirectiveNaNLegacy() override;
378 void emitDirectiveOptionPic0() override;
379 void emitDirectiveOptionPic2() override;
380 void emitDirectiveInsn() override;
381 void emitFrame(MCRegister StackReg, unsigned StackSize,
382 MCRegister ReturnReg) override;
383 void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override;
384 void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override;
385
386 // PIC support
387 void emitDirectiveCpAdd(MCRegister Reg) override;
388 void emitDirectiveCpLoad(MCRegister Reg) override;
389 void emitDirectiveCpLocal(MCRegister Reg) override;
391 SMLoc IDLoc, const MCSubtargetInfo *STI) override;
392 void emitDirectiveCpsetup(MCRegister Reg, int RegOrOffset,
393 const MCSymbol &Sym, bool IsReg) override;
394 void emitDirectiveCpreturn(unsigned SaveLocation,
395 bool SaveLocationIsRegister) override;
396
397 void emitMipsAbiFlags();
398};
399}
400#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
unsigned Imm
Register Reg
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.
This file defines the SmallVector class.
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:41
Streaming machine code generation interface.
Definition MCStreamer.h:222
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
MCTargetStreamer(MCStreamer &S)
void emitDirectiveSetFp(MipsABIFlagsSection::FpABIKind Value) override
void emitDirectiveSetArch(StringRef Arch) override
void emitDirectiveCpsetup(MCRegister Reg, int RegOrOffset, const MCSymbol &Sym, bool IsReg) override
MipsTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
void emitDirectiveCpLocal(MCRegister Reg) override
void emitDirectiveEnt(const MCSymbol &Symbol) override
void emitDTPRel64Value(const MCExpr *) override
void emitTPRel64Value(const MCExpr *) override
bool emitDirectiveCpRestore(int Offset, function_ref< MCRegister()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI) override
Emit a .cprestore directive.
void emitDirectiveCpAdd(MCRegister Reg) override
void emitDirectiveCpLoad(MCRegister Reg) override
void emitFrame(MCRegister StackReg, unsigned StackSize, MCRegister ReturnReg) 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 emitDTPRel32Value(const MCExpr *) override
void emitTPRel32Value(const MCExpr *) override
void emitDirectiveSetAtWithArg(unsigned RegNo) override
void emitGPRel64Value(const MCExpr *) override
void emitGPRel32Value(const MCExpr *) override
bool emitDirectiveCpRestore(int Offset, function_ref< MCRegister()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI) override
void emitDTPRel32Value(const MCExpr *) override
void setPic(bool Value) override
MipsTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
void emitGPRel64Value(const MCExpr *) override
void emitGPRel32Value(const MCExpr *) override
void emitDirectiveEnd(StringRef Name) override
void emitFrame(MCRegister StackReg, unsigned StackSize, MCRegister ReturnReg) override
void emitDirectiveCpsetup(MCRegister Reg, int RegOrOffset, const MCSymbol &Sym, bool IsReg) override
void emitDirectiveCpAdd(MCRegister Reg) override
void emitDirectiveCpLocal(MCRegister Reg) override
void emitTPRel64Value(const MCExpr *) override
void emitLabel(MCSymbol *Symbol) override
void emitTPRel32Value(const MCExpr *) override
void emitDTPRel64Value(const MCExpr *) override
void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override
void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override
void emitDirectiveCpLoad(MCRegister Reg) 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
void emitRRX(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, MCOperand Op2, SMLoc IDLoc, const MCSubtargetInfo *STI)
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 emitDirectiveCpLoad(MCRegister Reg)
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 emitDirectiveEnd(StringRef Name)
virtual void emitDirectiveSetFp(MipsABIFlagsSection::FpABIKind Value)
virtual void emitTPRel64Value(const MCExpr *)
void emitR(unsigned Opcode, MCRegister Reg0, SMLoc IDLoc, const MCSubtargetInfo *STI)
void emitRRI(unsigned Opcode, MCRegister Reg0, MCRegister Reg1, int16_t Imm, SMLoc IDLoc, const MCSubtargetInfo *STI)
virtual void emitDirectiveEnt(const MCSymbol &Symbol)
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.
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 bool emitDirectiveCpRestore(int Offset, function_ref< MCRegister()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
void updateABIInfo(const PredicateLibrary &P)
virtual void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff)
virtual void emitDirectiveCpsetup(MCRegister Reg, int RegOrOffset, const MCSymbol &Sym, bool IsReg)
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 emitDirectiveCpAdd(MCRegister Reg)
virtual void emitDirectiveSetAtWithArg(unsigned RegNo)
void emitDSLL(MCRegister DstReg, MCRegister SrcReg, int16_t ShiftAmount, SMLoc IDLoc, const MCSubtargetInfo *STI)
const MipsABIInfo & getABI() const
virtual void emitDirectiveModuleOddSPReg()
void emitGPRestore(int Offset, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit the $gp restore operation for .cprestore.
virtual void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff)
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()
void emitStoreWithImmOffset(unsigned Opcode, MCRegister SrcReg, MCRegister BaseReg, int64_t Offset, function_ref< MCRegister()> GetATReg, SMLoc IDLoc, const MCSubtargetInfo *STI)
Emit a store instruction with an offset.
virtual void emitDirectiveModuleHardFloat()
virtual void emitDirectiveCpLocal(MCRegister Reg)
MipsABIFlagsSection ABIFlagsSection
Represents a location in source code.
Definition SMLoc.h:22
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
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.
@ Offset
Definition DWP.cpp:577