blob: 41ebe411b98d927f83d33c4637c5aa7020650573 [file] [log] [blame]
Rafael Espindolaa17151a2013-10-08 13:08:17 +00001//===-- MipsTargetStreamer.h - Mips Target Streamer ------------*- C++ -*--===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000010#ifndef LLVM_LIB_TARGET_MIPS_MIPSTARGETSTREAMER_H
11#define LLVM_LIB_TARGET_MIPS_MIPSTARGETSTREAMER_H
Rafael Espindolaa17151a2013-10-08 13:08:17 +000012
Chandler Carruthd9903882015-01-14 11:23:27 +000013#include "MCTargetDesc/MipsABIFlagsSection.h"
Eric Christophera5762812015-01-26 17:33:46 +000014#include "MCTargetDesc/MipsABIInfo.h"
Simon Atanasyan4d45c762015-09-14 11:18:03 +000015#include "llvm/ADT/Optional.h"
Benjamin Kramerd3f4c052016-06-12 16:13:55 +000016#include "llvm/ADT/STLExtras.h"
Jack Carter86ac5c12013-11-18 23:55:27 +000017#include "llvm/MC/MCELFStreamer.h"
Daniel Sandersd97a6342014-08-13 10:07:34 +000018#include "llvm/MC/MCRegisterInfo.h"
Rafael Espindolaa17151a2013-10-08 13:08:17 +000019#include "llvm/MC/MCStreamer.h"
20
21namespace llvm {
Vladimir Medicfb8a2a92014-07-08 08:59:22 +000022
Daniel Sanders324ad952014-07-08 13:13:42 +000023struct MipsABIFlagsSection;
Vladimir Medicfb8a2a92014-07-08 08:59:22 +000024
Rafael Espindolaa17151a2013-10-08 13:08:17 +000025class MipsTargetStreamer : public MCTargetStreamer {
Rafael Espindolaa17151a2013-10-08 13:08:17 +000026public:
Rafael Espindola24ea09e2014-01-26 06:06:37 +000027 MipsTargetStreamer(MCStreamer &S);
Daniel Sanders8de3d3c2016-05-06 14:37:24 +000028
29 virtual void setPic(bool Value) {}
30
Rafael Espindola60890b82014-06-23 19:43:40 +000031 virtual void emitDirectiveSetMicroMips();
32 virtual void emitDirectiveSetNoMicroMips();
Daniel Sanderscda908a2016-05-16 09:10:13 +000033 virtual void setUsesMicroMips();
Rafael Espindola60890b82014-06-23 19:43:40 +000034 virtual void emitDirectiveSetMips16();
35 virtual void emitDirectiveSetNoMips16();
Rafael Espindolaeb0a8af2014-01-26 05:06:48 +000036
Rafael Espindola60890b82014-06-23 19:43:40 +000037 virtual void emitDirectiveSetReorder();
38 virtual void emitDirectiveSetNoReorder();
39 virtual void emitDirectiveSetMacro();
40 virtual void emitDirectiveSetNoMacro();
Daniel Sanders44934432014-08-07 12:03:36 +000041 virtual void emitDirectiveSetMsa();
42 virtual void emitDirectiveSetNoMsa();
Rafael Espindola60890b82014-06-23 19:43:40 +000043 virtual void emitDirectiveSetAt();
Toma Tabacu16a74492015-02-13 10:30:57 +000044 virtual void emitDirectiveSetAtWithArg(unsigned RegNo);
Rafael Espindola60890b82014-06-23 19:43:40 +000045 virtual void emitDirectiveSetNoAt();
46 virtual void emitDirectiveEnd(StringRef Name);
Rafael Espindolaeb0a8af2014-01-26 05:06:48 +000047
Rafael Espindola60890b82014-06-23 19:43:40 +000048 virtual void emitDirectiveEnt(const MCSymbol &Symbol);
49 virtual void emitDirectiveAbiCalls();
50 virtual void emitDirectiveNaN2008();
51 virtual void emitDirectiveNaNLegacy();
52 virtual void emitDirectiveOptionPic0();
53 virtual void emitDirectiveOptionPic2();
Toma Tabacu9ca50962015-04-16 09:53:47 +000054 virtual void emitDirectiveInsn();
Rafael Espindola054234f2014-01-27 03:53:56 +000055 virtual void emitFrame(unsigned StackReg, unsigned StackSize,
Rafael Espindola60890b82014-06-23 19:43:40 +000056 unsigned ReturnReg);
57 virtual void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff);
58 virtual void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff);
Vladimir Medic615b26e2014-03-04 09:54:09 +000059
Toma Tabacu85618b32014-08-19 14:22:52 +000060 virtual void emitDirectiveSetArch(StringRef Arch);
Toma Tabacu26647792014-09-09 12:52:14 +000061 virtual void emitDirectiveSetMips0();
Daniel Sandersf0df2212014-08-04 12:20:00 +000062 virtual void emitDirectiveSetMips1();
63 virtual void emitDirectiveSetMips2();
64 virtual void emitDirectiveSetMips3();
65 virtual void emitDirectiveSetMips4();
66 virtual void emitDirectiveSetMips5();
67 virtual void emitDirectiveSetMips32();
Rafael Espindola60890b82014-06-23 19:43:40 +000068 virtual void emitDirectiveSetMips32R2();
Daniel Sanders17793142015-02-18 16:24:50 +000069 virtual void emitDirectiveSetMips32R3();
70 virtual void emitDirectiveSetMips32R5();
Daniel Sandersf0df2212014-08-04 12:20:00 +000071 virtual void emitDirectiveSetMips32R6();
Rafael Espindola60890b82014-06-23 19:43:40 +000072 virtual void emitDirectiveSetMips64();
73 virtual void emitDirectiveSetMips64R2();
Daniel Sanders17793142015-02-18 16:24:50 +000074 virtual void emitDirectiveSetMips64R3();
75 virtual void emitDirectiveSetMips64R5();
Daniel Sandersf0df2212014-08-04 12:20:00 +000076 virtual void emitDirectiveSetMips64R6();
Rafael Espindola60890b82014-06-23 19:43:40 +000077 virtual void emitDirectiveSetDsp();
Toma Tabacu351b2fe2014-09-17 09:01:54 +000078 virtual void emitDirectiveSetNoDsp();
Toma Tabacu9db22db2014-09-09 10:15:38 +000079 virtual void emitDirectiveSetPop();
80 virtual void emitDirectiveSetPush();
Toma Tabacu29696502015-06-02 09:48:04 +000081 virtual void emitDirectiveSetSoftFloat();
82 virtual void emitDirectiveSetHardFloat();
Matheus Almeida525bc4f2014-04-30 11:28:42 +000083
84 // PIC support
Toma Tabacuc4c202a2014-10-01 14:53:19 +000085 virtual void emitDirectiveCpLoad(unsigned RegNo);
Daniel Sandersdf8510d2016-05-11 12:48:19 +000086 virtual bool emitDirectiveCpRestore(int Offset,
Benjamin Kramerd3f4c052016-06-12 16:13:55 +000087 function_ref<unsigned()> GetATReg,
Daniel Sandersdf8510d2016-05-11 12:48:19 +000088 SMLoc IDLoc, const MCSubtargetInfo *STI);
Matheus Almeidad92a3fa2014-05-01 10:24:46 +000089 virtual void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset,
Rafael Espindola60890b82014-06-23 19:43:40 +000090 const MCSymbol &Sym, bool IsReg);
Daniel Sandersf173dda2015-09-22 10:50:09 +000091 virtual void emitDirectiveCpreturn(unsigned SaveLocation,
92 bool SaveLocationIsRegister);
Daniel Sanders7e527422014-07-10 13:38:23 +000093
Toma Tabacua64e5402015-06-25 12:44:38 +000094 // FP abiflags directives
95 virtual void emitDirectiveModuleFP();
Toma Tabacu3c499582015-06-25 10:56:57 +000096 virtual void emitDirectiveModuleOddSPReg();
Toma Tabacu0f093132015-06-30 13:46:03 +000097 virtual void emitDirectiveModuleSoftFloat();
98 virtual void emitDirectiveModuleHardFloat();
Toma Tabacu4e0cf8e2015-03-06 12:15:12 +000099 virtual void emitDirectiveSetFp(MipsABIFlagsSection::FpABIKind Value);
Toma Tabacu32c72aa2015-06-30 09:36:50 +0000100 virtual void emitDirectiveSetOddSPReg();
101 virtual void emitDirectiveSetNoOddSPReg();
Toma Tabacua64e5402015-06-25 12:44:38 +0000102
Daniel Sandersa736b372016-04-29 13:33:12 +0000103 void emitR(unsigned Opcode, unsigned Reg0, SMLoc IDLoc,
104 const MCSubtargetInfo *STI);
105 void emitII(unsigned Opcode, int16_t Imm1, int16_t Imm2, SMLoc IDLoc,
106 const MCSubtargetInfo *STI);
107 void emitRX(unsigned Opcode, unsigned Reg0, MCOperand Op1, SMLoc IDLoc,
108 const MCSubtargetInfo *STI);
109 void emitRI(unsigned Opcode, unsigned Reg0, int32_t Imm, SMLoc IDLoc,
110 const MCSubtargetInfo *STI);
111 void emitRR(unsigned Opcode, unsigned Reg0, unsigned Reg1, SMLoc IDLoc,
112 const MCSubtargetInfo *STI);
113 void emitRRX(unsigned Opcode, unsigned Reg0, unsigned Reg1, MCOperand Op2,
114 SMLoc IDLoc, const MCSubtargetInfo *STI);
115 void emitRRR(unsigned Opcode, unsigned Reg0, unsigned Reg1, unsigned Reg2,
116 SMLoc IDLoc, const MCSubtargetInfo *STI);
117 void emitRRI(unsigned Opcode, unsigned Reg0, unsigned Reg1, int16_t Imm,
118 SMLoc IDLoc, const MCSubtargetInfo *STI);
119 void emitAddu(unsigned DstReg, unsigned SrcReg, unsigned TrgReg, bool Is64Bit,
120 const MCSubtargetInfo *STI);
121 void emitDSLL(unsigned DstReg, unsigned SrcReg, int16_t ShiftAmount,
122 SMLoc IDLoc, const MCSubtargetInfo *STI);
123 void emitEmptyDelaySlot(bool hasShortDelaySlot, SMLoc IDLoc,
124 const MCSubtargetInfo *STI);
125 void emitNop(SMLoc IDLoc, const MCSubtargetInfo *STI);
Daniel Sanders241c6792016-05-12 14:01:50 +0000126
127 /// Emit a store instruction with an offset. If the offset is out of range
128 /// then it will be synthesized using the assembler temporary.
129 ///
130 /// GetATReg() is a callback that can be used to obtain the current assembler
131 /// temporary and is only called when the assembler temporary is required. It
132 /// must handle the case where no assembler temporary is available (typically
133 /// by reporting an error).
Daniel Sandersfba875f2016-04-29 13:43:45 +0000134 void emitStoreWithImmOffset(unsigned Opcode, unsigned SrcReg,
Daniel Sanders241c6792016-05-12 14:01:50 +0000135 unsigned BaseReg, int64_t Offset,
Benjamin Kramerd3f4c052016-06-12 16:13:55 +0000136 function_ref<unsigned()> GetATReg, SMLoc IDLoc,
Daniel Sanders241c6792016-05-12 14:01:50 +0000137 const MCSubtargetInfo *STI);
Daniel Sandersfba875f2016-04-29 13:43:45 +0000138 void emitStoreWithSymOffset(unsigned Opcode, unsigned SrcReg,
139 unsigned BaseReg, MCOperand &HiOperand,
140 MCOperand &LoOperand, unsigned ATReg, SMLoc IDLoc,
141 const MCSubtargetInfo *STI);
142 void emitLoadWithImmOffset(unsigned Opcode, unsigned DstReg, unsigned BaseReg,
143 int64_t Offset, unsigned TmpReg, SMLoc IDLoc,
144 const MCSubtargetInfo *STI);
145 void emitLoadWithSymOffset(unsigned Opcode, unsigned DstReg, unsigned BaseReg,
146 MCOperand &HiOperand, MCOperand &LoOperand,
147 unsigned ATReg, SMLoc IDLoc,
148 const MCSubtargetInfo *STI);
Daniel Sanders7225cd52016-04-29 16:16:49 +0000149 void emitGPRestore(int Offset, SMLoc IDLoc, const MCSubtargetInfo *STI);
Daniel Sandersa736b372016-04-29 13:33:12 +0000150
Daniel Sanderscdb45fa2014-08-14 09:18:14 +0000151 void forbidModuleDirective() { ModuleDirectiveAllowed = false; }
Toma Tabacu4e0cf8e2015-03-06 12:15:12 +0000152 void reallowModuleDirective() { ModuleDirectiveAllowed = true; }
Daniel Sanderscdb45fa2014-08-14 09:18:14 +0000153 bool isModuleDirectiveAllowed() { return ModuleDirectiveAllowed; }
Vladimir Medicfb8a2a92014-07-08 08:59:22 +0000154
Vladimir Medicfb8a2a92014-07-08 08:59:22 +0000155 // This method enables template classes to set internal abi flags
156 // structure values.
157 template <class PredicateLibrary>
158 void updateABIInfo(const PredicateLibrary &P) {
Simon Atanasyan4d45c762015-09-14 11:18:03 +0000159 ABI = P.getABI();
Daniel Sandersc7dbc632014-07-08 10:11:38 +0000160 ABIFlagsSection.setAllFromPredicates(P);
Vladimir Medicfb8a2a92014-07-08 08:59:22 +0000161 }
162
Daniel Sandersc7dbc632014-07-08 10:11:38 +0000163 MipsABIFlagsSection &getABIFlagsSection() { return ABIFlagsSection; }
Eric Christophera5762812015-01-26 17:33:46 +0000164 const MipsABIInfo &getABI() const {
Simon Atanasyan4d45c762015-09-14 11:18:03 +0000165 assert(ABI.hasValue() && "ABI hasn't been set!");
Eric Christophera5762812015-01-26 17:33:46 +0000166 return *ABI;
167 }
Daniel Sandersc7dbc632014-07-08 10:11:38 +0000168
Vladimir Medicfb8a2a92014-07-08 08:59:22 +0000169protected:
Simon Atanasyan4d45c762015-09-14 11:18:03 +0000170 llvm::Optional<MipsABIInfo> ABI;
Daniel Sandersc7dbc632014-07-08 10:11:38 +0000171 MipsABIFlagsSection ABIFlagsSection;
Vladimir Medicfb8a2a92014-07-08 08:59:22 +0000172
Daniel Sandersd97a6342014-08-13 10:07:34 +0000173 bool GPRInfoSet;
174 unsigned GPRBitMask;
175 int GPROffset;
176
177 bool FPRInfoSet;
178 unsigned FPRBitMask;
179 int FPROffset;
180
181 bool FrameInfoSet;
182 int FrameOffset;
183 unsigned FrameReg;
184 unsigned ReturnReg;
185
Vladimir Medicfb8a2a92014-07-08 08:59:22 +0000186private:
Daniel Sanderscdb45fa2014-08-14 09:18:14 +0000187 bool ModuleDirectiveAllowed;
Rafael Espindolaa17151a2013-10-08 13:08:17 +0000188};
Jack Carter86ac5c12013-11-18 23:55:27 +0000189
190// This part is for ascii assembly output
191class MipsTargetAsmStreamer : public MipsTargetStreamer {
Jack Carter6ef6cc52013-11-19 20:53:28 +0000192 formatted_raw_ostream &OS;
193
Jack Carter86ac5c12013-11-18 23:55:27 +0000194public:
Rafael Espindola24ea09e2014-01-26 06:06:37 +0000195 MipsTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS);
Craig Topper56c590a2014-04-29 07:58:02 +0000196 void emitDirectiveSetMicroMips() override;
197 void emitDirectiveSetNoMicroMips() override;
198 void emitDirectiveSetMips16() override;
199 void emitDirectiveSetNoMips16() override;
Rafael Espindolaeb0a8af2014-01-26 05:06:48 +0000200
Craig Topper56c590a2014-04-29 07:58:02 +0000201 void emitDirectiveSetReorder() override;
202 void emitDirectiveSetNoReorder() override;
203 void emitDirectiveSetMacro() override;
204 void emitDirectiveSetNoMacro() override;
Daniel Sanders44934432014-08-07 12:03:36 +0000205 void emitDirectiveSetMsa() override;
206 void emitDirectiveSetNoMsa() override;
Craig Topper56c590a2014-04-29 07:58:02 +0000207 void emitDirectiveSetAt() override;
Toma Tabacu16a74492015-02-13 10:30:57 +0000208 void emitDirectiveSetAtWithArg(unsigned RegNo) override;
Craig Topper56c590a2014-04-29 07:58:02 +0000209 void emitDirectiveSetNoAt() override;
210 void emitDirectiveEnd(StringRef Name) override;
Rafael Espindolaeb0a8af2014-01-26 05:06:48 +0000211
Craig Topper56c590a2014-04-29 07:58:02 +0000212 void emitDirectiveEnt(const MCSymbol &Symbol) override;
213 void emitDirectiveAbiCalls() override;
214 void emitDirectiveNaN2008() override;
215 void emitDirectiveNaNLegacy() override;
216 void emitDirectiveOptionPic0() override;
217 void emitDirectiveOptionPic2() override;
Toma Tabacu9ca50962015-04-16 09:53:47 +0000218 void emitDirectiveInsn() override;
Craig Topper56c590a2014-04-29 07:58:02 +0000219 void emitFrame(unsigned StackReg, unsigned StackSize,
220 unsigned ReturnReg) override;
221 void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override;
222 void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override;
Vladimir Medic615b26e2014-03-04 09:54:09 +0000223
Toma Tabacu85618b32014-08-19 14:22:52 +0000224 void emitDirectiveSetArch(StringRef Arch) override;
Toma Tabacu26647792014-09-09 12:52:14 +0000225 void emitDirectiveSetMips0() override;
Daniel Sandersf0df2212014-08-04 12:20:00 +0000226 void emitDirectiveSetMips1() override;
227 void emitDirectiveSetMips2() override;
228 void emitDirectiveSetMips3() override;
229 void emitDirectiveSetMips4() override;
230 void emitDirectiveSetMips5() override;
231 void emitDirectiveSetMips32() override;
Craig Topper56c590a2014-04-29 07:58:02 +0000232 void emitDirectiveSetMips32R2() override;
Daniel Sanders17793142015-02-18 16:24:50 +0000233 void emitDirectiveSetMips32R3() override;
234 void emitDirectiveSetMips32R5() override;
Daniel Sandersf0df2212014-08-04 12:20:00 +0000235 void emitDirectiveSetMips32R6() override;
Craig Topper56c590a2014-04-29 07:58:02 +0000236 void emitDirectiveSetMips64() override;
237 void emitDirectiveSetMips64R2() override;
Daniel Sanders17793142015-02-18 16:24:50 +0000238 void emitDirectiveSetMips64R3() override;
239 void emitDirectiveSetMips64R5() override;
Daniel Sandersf0df2212014-08-04 12:20:00 +0000240 void emitDirectiveSetMips64R6() override;
Craig Topper56c590a2014-04-29 07:58:02 +0000241 void emitDirectiveSetDsp() override;
Toma Tabacu351b2fe2014-09-17 09:01:54 +0000242 void emitDirectiveSetNoDsp() override;
Toma Tabacu9db22db2014-09-09 10:15:38 +0000243 void emitDirectiveSetPop() override;
244 void emitDirectiveSetPush() override;
Toma Tabacu29696502015-06-02 09:48:04 +0000245 void emitDirectiveSetSoftFloat() override;
246 void emitDirectiveSetHardFloat() override;
Matheus Almeida525bc4f2014-04-30 11:28:42 +0000247
248 // PIC support
Toma Tabacuc4c202a2014-10-01 14:53:19 +0000249 void emitDirectiveCpLoad(unsigned RegNo) override;
Daniel Sanders241c6792016-05-12 14:01:50 +0000250
251 /// Emit a .cprestore directive. If the offset is out of range then it will
252 /// be synthesized using the assembler temporary.
253 ///
254 /// GetATReg() is a callback that can be used to obtain the current assembler
255 /// temporary and is only called when the assembler temporary is required. It
256 /// must handle the case where no assembler temporary is available (typically
257 /// by reporting an error).
Benjamin Kramerd3f4c052016-06-12 16:13:55 +0000258 bool emitDirectiveCpRestore(int Offset, function_ref<unsigned()> GetATReg,
Daniel Sandersdf8510d2016-05-11 12:48:19 +0000259 SMLoc IDLoc, const MCSubtargetInfo *STI) override;
Matheus Almeidad92a3fa2014-05-01 10:24:46 +0000260 void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset,
261 const MCSymbol &Sym, bool IsReg) override;
Daniel Sandersf173dda2015-09-22 10:50:09 +0000262 void emitDirectiveCpreturn(unsigned SaveLocation,
263 bool SaveLocationIsRegister) override;
Vladimir Medicfb8a2a92014-07-08 08:59:22 +0000264
Toma Tabacua64e5402015-06-25 12:44:38 +0000265 // FP abiflags directives
266 void emitDirectiveModuleFP() override;
Toma Tabacu3c499582015-06-25 10:56:57 +0000267 void emitDirectiveModuleOddSPReg() override;
Toma Tabacu0f093132015-06-30 13:46:03 +0000268 void emitDirectiveModuleSoftFloat() override;
269 void emitDirectiveModuleHardFloat() override;
Daniel Sanders7e527422014-07-10 13:38:23 +0000270 void emitDirectiveSetFp(MipsABIFlagsSection::FpABIKind Value) override;
Toma Tabacu32c72aa2015-06-30 09:36:50 +0000271 void emitDirectiveSetOddSPReg() override;
272 void emitDirectiveSetNoOddSPReg() override;
Jack Carter86ac5c12013-11-18 23:55:27 +0000273};
274
275// This part is for ELF object output
276class MipsTargetELFStreamer : public MipsTargetStreamer {
Rafael Espindola6d5f7ce2014-01-14 04:25:13 +0000277 bool MicroMipsEnabled;
Rafael Espindola972e71a2014-01-31 23:10:26 +0000278 const MCSubtargetInfo &STI;
Matheus Almeidaf79b2812014-03-26 13:40:29 +0000279 bool Pic;
Jack Carter39536722014-01-22 23:08:42 +0000280
Jack Carter86ac5c12013-11-18 23:55:27 +0000281public:
Rafael Espindola6d5f7ce2014-01-14 04:25:13 +0000282 bool isMicroMipsEnabled() const { return MicroMipsEnabled; }
Jack Carter86ac5c12013-11-18 23:55:27 +0000283 MCELFStreamer &getStreamer();
Rafael Espindolacb1953f2014-01-26 06:57:13 +0000284 MipsTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI);
Rafael Espindola6d5f7ce2014-01-14 04:25:13 +0000285
Daniel Sanders8de3d3c2016-05-06 14:37:24 +0000286 void setPic(bool Value) override { Pic = Value; }
287
Craig Topper56c590a2014-04-29 07:58:02 +0000288 void emitLabel(MCSymbol *Symbol) override;
289 void emitAssignment(MCSymbol *Symbol, const MCExpr *Value) override;
Craig Topper73156022014-03-02 09:09:27 +0000290 void finish() override;
Rafael Espindola6d5f7ce2014-01-14 04:25:13 +0000291
Craig Topper56c590a2014-04-29 07:58:02 +0000292 void emitDirectiveSetMicroMips() override;
293 void emitDirectiveSetNoMicroMips() override;
Daniel Sanderscda908a2016-05-16 09:10:13 +0000294 void setUsesMicroMips() override;
Craig Topper56c590a2014-04-29 07:58:02 +0000295 void emitDirectiveSetMips16() override;
Rafael Espindolaeb0a8af2014-01-26 05:06:48 +0000296
Craig Topper56c590a2014-04-29 07:58:02 +0000297 void emitDirectiveSetNoReorder() override;
Craig Topper56c590a2014-04-29 07:58:02 +0000298 void emitDirectiveEnd(StringRef Name) override;
Rafael Espindolaeb0a8af2014-01-26 05:06:48 +0000299
Craig Topper56c590a2014-04-29 07:58:02 +0000300 void emitDirectiveEnt(const MCSymbol &Symbol) override;
301 void emitDirectiveAbiCalls() override;
302 void emitDirectiveNaN2008() override;
303 void emitDirectiveNaNLegacy() override;
304 void emitDirectiveOptionPic0() override;
305 void emitDirectiveOptionPic2() override;
Toma Tabacu9ca50962015-04-16 09:53:47 +0000306 void emitDirectiveInsn() override;
Craig Topper56c590a2014-04-29 07:58:02 +0000307 void emitFrame(unsigned StackReg, unsigned StackSize,
308 unsigned ReturnReg) override;
309 void emitMask(unsigned CPUBitmask, int CPUTopSavedRegOff) override;
310 void emitFMask(unsigned FPUBitmask, int FPUTopSavedRegOff) override;
Vladimir Medic615b26e2014-03-04 09:54:09 +0000311
Matheus Almeida525bc4f2014-04-30 11:28:42 +0000312 // PIC support
Toma Tabacuc4c202a2014-10-01 14:53:19 +0000313 void emitDirectiveCpLoad(unsigned RegNo) override;
Benjamin Kramerd3f4c052016-06-12 16:13:55 +0000314 bool emitDirectiveCpRestore(int Offset, function_ref<unsigned()> GetATReg,
Daniel Sandersdf8510d2016-05-11 12:48:19 +0000315 SMLoc IDLoc, const MCSubtargetInfo *STI) override;
Matheus Almeidad92a3fa2014-05-01 10:24:46 +0000316 void emitDirectiveCpsetup(unsigned RegNo, int RegOrOffset,
317 const MCSymbol &Sym, bool IsReg) override;
Daniel Sandersf173dda2015-09-22 10:50:09 +0000318 void emitDirectiveCpreturn(unsigned SaveLocation,
319 bool SaveLocationIsRegister) override;
Matheus Almeida525bc4f2014-04-30 11:28:42 +0000320
Toma Tabacue95a4912015-03-13 11:40:01 +0000321 void emitMipsAbiFlags();
Jack Carter86ac5c12013-11-18 23:55:27 +0000322};
Alexander Kornienkof00654e2015-06-23 09:49:53 +0000323}
Rafael Espindolaa17151a2013-10-08 13:08:17 +0000324#endif