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