LLVM  16.0.0git
MipsMCCodeEmitter.h
Go to the documentation of this file.
1 //===- MipsMCCodeEmitter.h - Convert Mips Code to Machine Code --*- 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 // This file defines the MipsMCCodeEmitter class.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSMCCODEEMITTER_H
14 #define LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSMCCODEEMITTER_H
15 
16 #include "llvm/MC/MCCodeEmitter.h"
17 #include <cstdint>
18 
19 namespace llvm {
20 
21 class MCContext;
22 class MCExpr;
23 class MCFixup;
24 class MCInst;
25 class MCInstrInfo;
26 class MCOperand;
27 class MCSubtargetInfo;
28 class raw_ostream;
29 
31  const MCInstrInfo &MCII;
32  MCContext &Ctx;
33  bool IsLittleEndian;
34 
35  bool isMicroMips(const MCSubtargetInfo &STI) const;
36  bool isMips32r6(const MCSubtargetInfo &STI) const;
37 
38 public:
39  MipsMCCodeEmitter(const MCInstrInfo &mcii, MCContext &Ctx_, bool IsLittle)
40  : MCII(mcii), Ctx(Ctx_), IsLittleEndian(IsLittle) {}
41  MipsMCCodeEmitter(const MipsMCCodeEmitter &) = delete;
43  ~MipsMCCodeEmitter() override = default;
44 
45  void EmitByte(unsigned char C, raw_ostream &OS) const;
46 
47  void emitInstruction(uint64_t Val, unsigned Size, const MCSubtargetInfo &STI,
48  raw_ostream &OS) const;
49 
50  void encodeInstruction(const MCInst &MI, raw_ostream &OS,
52  const MCSubtargetInfo &STI) const override;
53 
54  // getBinaryCodeForInstr - TableGen'erated function for getting the
55  // binary encoding for an instruction.
58  const MCSubtargetInfo &STI) const;
59 
60  // getJumpTargetOpValue - Return binary encoding of the jump
61  // target operand. If the machine operand requires relocation,
62  // record the relocation and return zero.
63  unsigned getJumpTargetOpValue(const MCInst &MI, unsigned OpNo,
65  const MCSubtargetInfo &STI) const;
66 
67  // getBranchJumpOpValueMM - Return binary encoding of the microMIPS jump
68  // target operand. If the machine operand requires relocation,
69  // record the relocation and return zero.
70  unsigned getJumpTargetOpValueMM(const MCInst &MI, unsigned OpNo,
72  const MCSubtargetInfo &STI) const;
73 
74  // getUImm5Lsl2Encoding - Return binary encoding of the microMIPS jump
75  // target operand.
76  unsigned getUImm5Lsl2Encoding(const MCInst &MI, unsigned OpNo,
78  const MCSubtargetInfo &STI) const;
79 
80  unsigned getSImm3Lsa2Value(const MCInst &MI, unsigned OpNo,
82  const MCSubtargetInfo &STI) const;
83 
84  unsigned getUImm6Lsl2Encoding(const MCInst &MI, unsigned OpNo,
86  const MCSubtargetInfo &STI) const;
87 
88  // getSImm9AddiuspValue - Return binary encoding of the microMIPS addiusp
89  // instruction immediate operand.
90  unsigned getSImm9AddiuspValue(const MCInst &MI, unsigned OpNo,
92  const MCSubtargetInfo &STI) const;
93 
94  // getBranchTargetOpValue - Return binary encoding of the branch
95  // target operand. If the machine operand requires relocation,
96  // record the relocation and return zero.
97  unsigned getBranchTargetOpValue(const MCInst &MI, unsigned OpNo,
99  const MCSubtargetInfo &STI) const;
100 
101  // getBranchTargetOpValue1SImm16 - Return binary encoding of the branch
102  // target operand. If the machine operand requires relocation,
103  // record the relocation and return zero.
104  unsigned getBranchTargetOpValue1SImm16(const MCInst &MI, unsigned OpNo,
106  const MCSubtargetInfo &STI) const;
107 
108  // getBranchTargetOpValueMMR6 - Return binary encoding of the branch
109  // target operand. If the machine operand requires relocation,
110  // record the relocation and return zero.
111  unsigned getBranchTargetOpValueMMR6(const MCInst &MI, unsigned OpNo,
113  const MCSubtargetInfo &STI) const;
114 
115  // getBranchTargetOpValueLsl2MMR6 - Return binary encoding of the branch
116  // target operand. If the machine operand requires relocation,
117  // record the relocation and return zero.
118  unsigned getBranchTargetOpValueLsl2MMR6(const MCInst &MI, unsigned OpNo,
120  const MCSubtargetInfo &STI) const;
121 
122  // getBranchTarget7OpValue - Return binary encoding of the microMIPS branch
123  // target operand. If the machine operand requires relocation,
124  // record the relocation and return zero.
125  unsigned getBranchTarget7OpValueMM(const MCInst &MI, unsigned OpNo,
127  const MCSubtargetInfo &STI) const;
128 
129  // getBranchTargetOpValueMMPC10 - Return binary encoding of the microMIPS
130  // 10-bit branch target operand. If the machine operand requires relocation,
131  // record the relocation and return zero.
132  unsigned getBranchTargetOpValueMMPC10(const MCInst &MI, unsigned OpNo,
134  const MCSubtargetInfo &STI) const;
135 
136  // getBranchTargetOpValue - Return binary encoding of the microMIPS branch
137  // target operand. If the machine operand requires relocation,
138  // record the relocation and return zero.
139  unsigned getBranchTargetOpValueMM(const MCInst &MI, unsigned OpNo,
141  const MCSubtargetInfo &STI) const;
142 
143  // getBranchTarget21OpValue - Return binary encoding of the branch
144  // offset operand. If the machine operand requires relocation,
145  // record the relocation and return zero.
146  unsigned getBranchTarget21OpValue(const MCInst &MI, unsigned OpNo,
148  const MCSubtargetInfo &STI) const;
149 
150  // getBranchTarget21OpValueMM - Return binary encoding of the branch
151  // offset operand for microMIPS. If the machine operand requires
152  // relocation,record the relocation and return zero.
153  unsigned getBranchTarget21OpValueMM(const MCInst &MI, unsigned OpNo,
155  const MCSubtargetInfo &STI) const;
156 
157  // getBranchTarget26OpValue - Return binary encoding of the branch
158  // offset operand. If the machine operand requires relocation,
159  // record the relocation and return zero.
160  unsigned getBranchTarget26OpValue(const MCInst &MI, unsigned OpNo,
162  const MCSubtargetInfo &STI) const;
163 
164  // getBranchTarget26OpValueMM - Return binary encoding of the branch
165  // offset operand. If the machine operand requires relocation,
166  // record the relocation and return zero.
167  unsigned getBranchTarget26OpValueMM(const MCInst &MI, unsigned OpNo,
169  const MCSubtargetInfo &STI) const;
170 
171  // getJumpOffset16OpValue - Return binary encoding of the jump
172  // offset operand. If the machine operand requires relocation,
173  // record the relocation and return zero.
174  unsigned getJumpOffset16OpValue(const MCInst &MI, unsigned OpNo,
176  const MCSubtargetInfo &STI) const;
177 
178  // getMachineOpValue - Return binary encoding of operand. If the machin
179  // operand requires relocation, record the relocation and return zero.
180  unsigned getMachineOpValue(const MCInst &MI, const MCOperand &MO,
182  const MCSubtargetInfo &STI) const;
183 
184  unsigned getMSAMemEncoding(const MCInst &MI, unsigned OpNo,
186  const MCSubtargetInfo &STI) const;
187 
188  template <unsigned ShiftAmount = 0>
189  unsigned getMemEncoding(const MCInst &MI, unsigned OpNo,
191  const MCSubtargetInfo &STI) const;
192  unsigned getMemEncodingMMImm4(const MCInst &MI, unsigned OpNo,
194  const MCSubtargetInfo &STI) const;
195  unsigned getMemEncodingMMImm4Lsl1(const MCInst &MI, unsigned OpNo,
197  const MCSubtargetInfo &STI) const;
198  unsigned getMemEncodingMMImm4Lsl2(const MCInst &MI, unsigned OpNo,
200  const MCSubtargetInfo &STI) const;
201  unsigned getMemEncodingMMSPImm5Lsl2(const MCInst &MI, unsigned OpNo,
203  const MCSubtargetInfo &STI) const;
204  unsigned getMemEncodingMMGPImm7Lsl2(const MCInst &MI, unsigned OpNo,
206  const MCSubtargetInfo &STI) const;
207  unsigned getMemEncodingMMImm9(const MCInst &MI, unsigned OpNo,
209  const MCSubtargetInfo &STI) const;
210  unsigned getMemEncodingMMImm11(const MCInst &MI, unsigned OpNo,
212  const MCSubtargetInfo &STI) const;
213  unsigned getMemEncodingMMImm12(const MCInst &MI, unsigned OpNo,
215  const MCSubtargetInfo &STI) const;
216  unsigned getMemEncodingMMImm16(const MCInst &MI, unsigned OpNo,
218  const MCSubtargetInfo &STI) const;
219  unsigned getMemEncodingMMImm4sp(const MCInst &MI, unsigned OpNo,
221  const MCSubtargetInfo &STI) const;
222  unsigned getSizeInsEncoding(const MCInst &MI, unsigned OpNo,
224  const MCSubtargetInfo &STI) const;
225 
226  /// Subtract Offset then encode as a N-bit unsigned integer.
227  template <unsigned Bits, int Offset>
228  unsigned getUImmWithOffsetEncoding(const MCInst &MI, unsigned OpNo,
230  const MCSubtargetInfo &STI) const;
231 
232  unsigned getSimm19Lsl2Encoding(const MCInst &MI, unsigned OpNo,
234  const MCSubtargetInfo &STI) const;
235 
236  unsigned getSimm18Lsl3Encoding(const MCInst &MI, unsigned OpNo,
238  const MCSubtargetInfo &STI) const;
239 
240  unsigned getUImm3Mod8Encoding(const MCInst &MI, unsigned OpNo,
242  const MCSubtargetInfo &STI) const;
243  unsigned getUImm4AndValue(const MCInst &MI, unsigned OpNo,
245  const MCSubtargetInfo &STI) const;
246 
247  unsigned getMovePRegPairOpValue(const MCInst &MI, unsigned OpNo,
249  const MCSubtargetInfo &STI) const;
250  unsigned getMovePRegSingleOpValue(const MCInst &MI, unsigned OpNo,
252  const MCSubtargetInfo &STI) const;
253 
254  unsigned getSimm23Lsl2Encoding(const MCInst &MI, unsigned OpNo,
256  const MCSubtargetInfo &STI) const;
257 
258  unsigned getExprOpValue(const MCExpr *Expr, SmallVectorImpl<MCFixup> &Fixups,
259  const MCSubtargetInfo &STI) const;
260 
261  unsigned getRegisterListOpValue(const MCInst &MI, unsigned OpNo,
263  const MCSubtargetInfo &STI) const;
264 
265  unsigned getRegisterListOpValue16(const MCInst &MI, unsigned OpNo,
267  const MCSubtargetInfo &STI) const;
268 
269 private:
270  void LowerCompactBranch(MCInst& Inst) const;
271 };
272 
273 } // end namespace llvm
274 
275 #endif // LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSMCCODEEMITTER_H
llvm::MipsMCCodeEmitter
Definition: MipsMCCodeEmitter.h:30
llvm::MipsMCCodeEmitter::getMemEncodingMMSPImm5Lsl2
unsigned getMemEncodingMMSPImm5Lsl2(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:810
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:108
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::MipsMCCodeEmitter::getMemEncodingMMGPImm7Lsl2
unsigned getMemEncodingMMGPImm7Lsl2(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:825
llvm::MipsMCCodeEmitter::getBranchTargetOpValue
unsigned getBranchTargetOpValue(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getBranchTargetOpValue - Return binary encoding of the branch target operand.
Definition: MipsMCCodeEmitter.cpp:234
llvm::MipsMCCodeEmitter::getUImmWithOffsetEncoding
unsigned getUImmWithOffsetEncoding(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Subtract Offset then encode as a N-bit unsigned integer.
Definition: MipsMCCodeEmitter.cpp:945
llvm::MipsMCCodeEmitter::getMemEncodingMMImm16
unsigned getMemEncodingMMImm16(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:891
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:76
MCCodeEmitter.h
llvm::MipsMCCodeEmitter::getBranchTargetOpValue1SImm16
unsigned getBranchTargetOpValue1SImm16(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getBranchTargetOpValue1SImm16 - Return binary encoding of the branch target operand.
Definition: MipsMCCodeEmitter.cpp:256
llvm::MipsMCCodeEmitter::getJumpTargetOpValueMM
unsigned getJumpTargetOpValueMM(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:514
llvm::MipsMCCodeEmitter::getMemEncodingMMImm4
unsigned getMemEncodingMMImm4(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:768
llvm::MipsMCCodeEmitter::getSimm23Lsl2Encoding
unsigned getSimm23Lsl2Encoding(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:1120
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
llvm::MipsMCCodeEmitter::getBinaryCodeForInstr
uint64_t getBinaryCodeForInstr(const MCInst &MI, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
llvm::MipsMCCodeEmitter::getMemEncodingMMImm12
unsigned getMemEncodingMMImm12(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:867
llvm::MipsMCCodeEmitter::getJumpTargetOpValue
unsigned getJumpTargetOpValue(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getJumpTargetOpValue - Return binary encoding of the jump target operand.
Definition: MipsMCCodeEmitter.cpp:497
llvm::MipsMCCodeEmitter::getSImm9AddiuspValue
unsigned getSImm9AddiuspValue(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:575
llvm::MipsMCCodeEmitter::getMemEncodingMMImm9
unsigned getMemEncodingMMImm9(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:840
llvm::MipsMCCodeEmitter::getSimm18Lsl3Encoding
unsigned getSimm18Lsl3Encoding(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:977
llvm::MipsMCCodeEmitter::getBranchTargetOpValueMM
unsigned getBranchTargetOpValueMM(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getBranchTargetOpValue - Return binary encoding of the microMIPS branch target operand.
Definition: MipsMCCodeEmitter.cpp:366
llvm::MipsMCCodeEmitter::getMachineOpValue
unsigned getMachineOpValue(const MCInst &MI, const MCOperand &MO, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getMachineOpValue - Return binary encoding of operand.
Definition: MipsMCCodeEmitter.cpp:732
llvm::MipsMCCodeEmitter::encodeInstruction
void encodeInstruction(const MCInst &MI, raw_ostream &OS, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const override
encodeInstruction - Emit the instruction.
Definition: MipsMCCodeEmitter.cpp:151
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::MipsMCCodeEmitter::getRegisterListOpValue
unsigned getRegisterListOpValue(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:1036
llvm::MipsMCCodeEmitter::getJumpOffset16OpValue
unsigned getJumpOffset16OpValue(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getJumpOffset16OpValue - Return binary encoding of the jump target operand.
Definition: MipsMCCodeEmitter.cpp:476
llvm::MipsMCCodeEmitter::getMemEncodingMMImm4sp
unsigned getMemEncodingMMImm4sp(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:904
llvm::MipsMCCodeEmitter::getBranchTargetOpValueMMPC10
unsigned getBranchTargetOpValueMMPC10(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getBranchTargetOpValueMMPC10 - Return binary encoding of the microMIPS 10-bit branch target operand.
Definition: MipsMCCodeEmitter.cpp:345
llvm::AArch64::Fixups
Fixups
Definition: AArch64FixupKinds.h:17
llvm::MipsMCCodeEmitter::getMSAMemEncoding
unsigned getMSAMemEncoding(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
llvm::MipsMCCodeEmitter::getBranchTarget21OpValueMM
unsigned getBranchTarget21OpValueMM(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getBranchTarget21OpValueMM - Return binary encoding of the branch target operand for microMIPS.
Definition: MipsMCCodeEmitter.cpp:410
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
llvm::MipsMCCodeEmitter::getUImm3Mod8Encoding
unsigned getUImm3Mod8Encoding(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:999
llvm::MipsMCCodeEmitter::getMemEncodingMMImm4Lsl1
unsigned getMemEncodingMMImm4Lsl1(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:782
llvm::MipsMCCodeEmitter::EmitByte
void EmitByte(unsigned char C, raw_ostream &OS) const
Definition: MipsMCCodeEmitter.cpp:126
llvm::MipsMCCodeEmitter::getMemEncodingMMImm4Lsl2
unsigned getMemEncodingMMImm4Lsl2(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:796
llvm::MipsMCCodeEmitter::getBranchTargetOpValueMMR6
unsigned getBranchTargetOpValueMMR6(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getBranchTargetOpValueMMR6 - Return binary encoding of the branch target operand.
Definition: MipsMCCodeEmitter.cpp:278
llvm::MipsMCCodeEmitter::getSizeInsEncoding
unsigned getSizeInsEncoding(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:932
uint64_t
llvm::MipsMCCodeEmitter::getBranchTarget7OpValueMM
unsigned getBranchTarget7OpValueMM(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getBranchTarget7OpValueMM - Return binary encoding of the microMIPS branch target operand.
Definition: MipsMCCodeEmitter.cpp:324
llvm::MipsMCCodeEmitter::getMemEncodingMMImm11
unsigned getMemEncodingMMImm11(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:854
llvm::MipsMCCodeEmitter::getRegisterListOpValue16
unsigned getRegisterListOpValue16(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:1056
llvm::MipsMCCodeEmitter::getMovePRegPairOpValue
unsigned getMovePRegPairOpValue(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:1063
llvm::MipsMCCodeEmitter::getBranchTarget26OpValueMM
unsigned getBranchTarget26OpValueMM(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getBranchTarget26OpValueMM - Return binary encoding of the branch target operand.
Definition: MipsMCCodeEmitter.cpp:453
llvm::MipsMCCodeEmitter::getUImm6Lsl2Encoding
unsigned getUImm6Lsl2Encoding(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:562
llvm::MipsMCCodeEmitter::MipsMCCodeEmitter
MipsMCCodeEmitter(const MCInstrInfo &mcii, MCContext &Ctx_, bool IsLittle)
Definition: MipsMCCodeEmitter.h:39
llvm::MipsMCCodeEmitter::~MipsMCCodeEmitter
~MipsMCCodeEmitter() override=default
llvm::MipsMCCodeEmitter::getSImm3Lsa2Value
unsigned getSImm3Lsa2Value(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:549
llvm::MipsMCCodeEmitter::emitInstruction
void emitInstruction(uint64_t Val, unsigned Size, const MCSubtargetInfo &STI, raw_ostream &OS) const
Definition: MipsMCCodeEmitter.cpp:130
llvm::MipsMCCodeEmitter::getBranchTarget26OpValue
unsigned getBranchTarget26OpValue(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getBranchTarget26OpValue - Return binary encoding of the branch target operand.
Definition: MipsMCCodeEmitter.cpp:432
llvm::MipsMCCodeEmitter::getUImm4AndValue
unsigned getUImm4AndValue(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:1008
llvm::MCInstrInfo
Interface to description of machine instruction set.
Definition: MCInstrInfo.h:26
llvm::MipsMCCodeEmitter::operator=
MipsMCCodeEmitter & operator=(const MipsMCCodeEmitter &)=delete
llvm::MCCodeEmitter
MCCodeEmitter - Generic instruction encoding interface.
Definition: MCCodeEmitter.h:21
llvm::MipsMCCodeEmitter::getBranchTargetOpValueLsl2MMR6
unsigned getBranchTargetOpValueLsl2MMR6(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getBranchTargetOpValueLsl2MMR6 - Return binary encoding of the branch target operand.
Definition: MipsMCCodeEmitter.cpp:301
llvm::MipsMCCodeEmitter::getBranchTarget21OpValue
unsigned getBranchTarget21OpValue(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
getBranchTarget21OpValue - Return binary encoding of the branch target operand.
Definition: MipsMCCodeEmitter.cpp:388
llvm::MipsMCCodeEmitter::getSimm19Lsl2Encoding
unsigned getSimm19Lsl2Encoding(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:955
llvm::MipsMCCodeEmitter::getMemEncoding
unsigned getMemEncoding(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Return binary encoding of memory related operand.
Definition: MipsMCCodeEmitter.cpp:752
llvm::SmallVectorImpl
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: APFloat.h:42
llvm::MCOperand
Instances of this class represent operands of the MCInst class.
Definition: MCInst.h:36
llvm::MipsMCCodeEmitter::getMovePRegSingleOpValue
unsigned getMovePRegSingleOpValue(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:1097
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition: MCSubtargetInfo.h:76
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
llvm::MipsMCCodeEmitter::getUImm5Lsl2Encoding
unsigned getUImm5Lsl2Encoding(const MCInst &MI, unsigned OpNo, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:531
llvm::MipsMCCodeEmitter::getExprOpValue
unsigned getExprOpValue(const MCExpr *Expr, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const
Definition: MipsMCCodeEmitter.cpp:588