xref: /freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfo.h (revision 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
106c3fb27SDimitry Andric //===-- RISCVInstrInfo.h - RISC-V Instruction Information -------*- C++ -*-===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric //
906c3fb27SDimitry Andric // This file contains the RISC-V implementation of the TargetInstrInfo class.
100b57cec5SDimitry Andric //
110b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
120b57cec5SDimitry Andric 
130b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_RISCV_RISCVINSTRINFO_H
140b57cec5SDimitry Andric #define LLVM_LIB_TARGET_RISCV_RISCVINSTRINFO_H
150b57cec5SDimitry Andric 
160b57cec5SDimitry Andric #include "RISCVRegisterInfo.h"
170b57cec5SDimitry Andric #include "llvm/CodeGen/TargetInstrInfo.h"
18fe6060f1SDimitry Andric #include "llvm/IR/DiagnosticInfo.h"
190b57cec5SDimitry Andric 
200b57cec5SDimitry Andric #define GET_INSTRINFO_HEADER
210eae32dcSDimitry Andric #define GET_INSTRINFO_OPERAND_ENUM
220b57cec5SDimitry Andric #include "RISCVGenInstrInfo.inc"
230b57cec5SDimitry Andric 
240b57cec5SDimitry Andric namespace llvm {
250b57cec5SDimitry Andric 
268bcb0991SDimitry Andric class RISCVSubtarget;
278bcb0991SDimitry Andric 
2806c3fb27SDimitry Andric static const MachineMemOperand::Flags MONontemporalBit0 =
2906c3fb27SDimitry Andric     MachineMemOperand::MOTargetFlag1;
3006c3fb27SDimitry Andric static const MachineMemOperand::Flags MONontemporalBit1 =
3106c3fb27SDimitry Andric     MachineMemOperand::MOTargetFlag2;
3206c3fb27SDimitry Andric 
33349cc55cSDimitry Andric namespace RISCVCC {
34349cc55cSDimitry Andric 
35349cc55cSDimitry Andric enum CondCode {
36349cc55cSDimitry Andric   COND_EQ,
37349cc55cSDimitry Andric   COND_NE,
38349cc55cSDimitry Andric   COND_LT,
39349cc55cSDimitry Andric   COND_GE,
40349cc55cSDimitry Andric   COND_LTU,
41349cc55cSDimitry Andric   COND_GEU,
42349cc55cSDimitry Andric   COND_INVALID
43349cc55cSDimitry Andric };
44349cc55cSDimitry Andric 
45349cc55cSDimitry Andric CondCode getOppositeBranchCondition(CondCode);
46*5f757f3fSDimitry Andric unsigned getBrCond(CondCode CC);
47349cc55cSDimitry Andric 
48349cc55cSDimitry Andric } // end of namespace RISCVCC
49349cc55cSDimitry Andric 
500b57cec5SDimitry Andric class RISCVInstrInfo : public RISCVGenInstrInfo {
510b57cec5SDimitry Andric 
520b57cec5SDimitry Andric public:
538bcb0991SDimitry Andric   explicit RISCVInstrInfo(RISCVSubtarget &STI);
540b57cec5SDimitry Andric 
55fe6060f1SDimitry Andric   MCInst getNop() const override;
56349cc55cSDimitry Andric   const MCInstrDesc &getBrCond(RISCVCC::CondCode CC) const;
57fe6060f1SDimitry Andric 
580b57cec5SDimitry Andric   unsigned isLoadFromStackSlot(const MachineInstr &MI,
590b57cec5SDimitry Andric                                int &FrameIndex) const override;
6006c3fb27SDimitry Andric   unsigned isLoadFromStackSlot(const MachineInstr &MI, int &FrameIndex,
6106c3fb27SDimitry Andric                                unsigned &MemBytes) const override;
620b57cec5SDimitry Andric   unsigned isStoreToStackSlot(const MachineInstr &MI,
630b57cec5SDimitry Andric                               int &FrameIndex) const override;
6406c3fb27SDimitry Andric   unsigned isStoreToStackSlot(const MachineInstr &MI, int &FrameIndex,
6506c3fb27SDimitry Andric                               unsigned &MemBytes) const override;
660b57cec5SDimitry Andric 
67*5f757f3fSDimitry Andric   void copyPhysRegVector(MachineBasicBlock &MBB,
68*5f757f3fSDimitry Andric                          MachineBasicBlock::iterator MBBI, const DebugLoc &DL,
69*5f757f3fSDimitry Andric                          MCRegister DstReg, MCRegister SrcReg, bool KillSrc,
70*5f757f3fSDimitry Andric                          unsigned Opc, unsigned NF = 1) const;
710b57cec5SDimitry Andric   void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
72480093f4SDimitry Andric                    const DebugLoc &DL, MCRegister DstReg, MCRegister SrcReg,
730b57cec5SDimitry Andric                    bool KillSrc) const override;
740b57cec5SDimitry Andric 
750b57cec5SDimitry Andric   void storeRegToStackSlot(MachineBasicBlock &MBB,
765ffd83dbSDimitry Andric                            MachineBasicBlock::iterator MBBI, Register SrcReg,
770b57cec5SDimitry Andric                            bool IsKill, int FrameIndex,
780b57cec5SDimitry Andric                            const TargetRegisterClass *RC,
79bdd1243dSDimitry Andric                            const TargetRegisterInfo *TRI,
80bdd1243dSDimitry Andric                            Register VReg) const override;
810b57cec5SDimitry Andric 
820b57cec5SDimitry Andric   void loadRegFromStackSlot(MachineBasicBlock &MBB,
835ffd83dbSDimitry Andric                             MachineBasicBlock::iterator MBBI, Register DstReg,
840b57cec5SDimitry Andric                             int FrameIndex, const TargetRegisterClass *RC,
85bdd1243dSDimitry Andric                             const TargetRegisterInfo *TRI,
86bdd1243dSDimitry Andric                             Register VReg) const override;
870b57cec5SDimitry Andric 
88fcaf7f86SDimitry Andric   using TargetInstrInfo::foldMemoryOperandImpl;
89fcaf7f86SDimitry Andric   MachineInstr *foldMemoryOperandImpl(MachineFunction &MF, MachineInstr &MI,
90fcaf7f86SDimitry Andric                                       ArrayRef<unsigned> Ops,
91fcaf7f86SDimitry Andric                                       MachineBasicBlock::iterator InsertPt,
92fcaf7f86SDimitry Andric                                       int FrameIndex,
93fcaf7f86SDimitry Andric                                       LiveIntervals *LIS = nullptr,
94fcaf7f86SDimitry Andric                                       VirtRegMap *VRM = nullptr) const override;
95fcaf7f86SDimitry Andric 
968bcb0991SDimitry Andric   // Materializes the given integer Val into DstReg.
978bcb0991SDimitry Andric   void movImm(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
988bcb0991SDimitry Andric               const DebugLoc &DL, Register DstReg, uint64_t Val,
99*5f757f3fSDimitry Andric               MachineInstr::MIFlag Flag = MachineInstr::NoFlags,
100*5f757f3fSDimitry Andric               bool DstRenamable = false, bool DstIsDead = false) const;
1010b57cec5SDimitry Andric 
1020b57cec5SDimitry Andric   unsigned getInstSizeInBytes(const MachineInstr &MI) const override;
1030b57cec5SDimitry Andric 
1040b57cec5SDimitry Andric   bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
1050b57cec5SDimitry Andric                      MachineBasicBlock *&FBB,
1060b57cec5SDimitry Andric                      SmallVectorImpl<MachineOperand> &Cond,
1070b57cec5SDimitry Andric                      bool AllowModify) const override;
1080b57cec5SDimitry Andric 
1090b57cec5SDimitry Andric   unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
1100b57cec5SDimitry Andric                         MachineBasicBlock *FBB, ArrayRef<MachineOperand> Cond,
1110b57cec5SDimitry Andric                         const DebugLoc &dl,
1120b57cec5SDimitry Andric                         int *BytesAdded = nullptr) const override;
1130b57cec5SDimitry Andric 
114349cc55cSDimitry Andric   void insertIndirectBranch(MachineBasicBlock &MBB,
1150b57cec5SDimitry Andric                             MachineBasicBlock &NewDestBB,
116349cc55cSDimitry Andric                             MachineBasicBlock &RestoreBB, const DebugLoc &DL,
117349cc55cSDimitry Andric                             int64_t BrOffset, RegScavenger *RS) const override;
1180b57cec5SDimitry Andric 
1190b57cec5SDimitry Andric   unsigned removeBranch(MachineBasicBlock &MBB,
1200b57cec5SDimitry Andric                         int *BytesRemoved = nullptr) const override;
1210b57cec5SDimitry Andric 
1220b57cec5SDimitry Andric   bool
1230b57cec5SDimitry Andric   reverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const override;
1240b57cec5SDimitry Andric 
125*5f757f3fSDimitry Andric   bool optimizeCondBranch(MachineInstr &MI) const override;
126*5f757f3fSDimitry Andric 
1270b57cec5SDimitry Andric   MachineBasicBlock *getBranchDestBlock(const MachineInstr &MI) const override;
1280b57cec5SDimitry Andric 
1290b57cec5SDimitry Andric   bool isBranchOffsetInRange(unsigned BranchOpc,
1300b57cec5SDimitry Andric                              int64_t BrOffset) const override;
1310b57cec5SDimitry Andric 
132bdd1243dSDimitry Andric   bool analyzeSelect(const MachineInstr &MI,
133bdd1243dSDimitry Andric                      SmallVectorImpl<MachineOperand> &Cond, unsigned &TrueOp,
134bdd1243dSDimitry Andric                      unsigned &FalseOp, bool &Optimizable) const override;
135bdd1243dSDimitry Andric 
136bdd1243dSDimitry Andric   MachineInstr *optimizeSelect(MachineInstr &MI,
137bdd1243dSDimitry Andric                                SmallPtrSetImpl<MachineInstr *> &SeenMIs,
138bdd1243dSDimitry Andric                                bool) const override;
139bdd1243dSDimitry Andric 
1400b57cec5SDimitry Andric   bool isAsCheapAsAMove(const MachineInstr &MI) const override;
1418bcb0991SDimitry Andric 
142bdd1243dSDimitry Andric   std::optional<DestSourcePair>
143e8d8bef9SDimitry Andric   isCopyInstrImpl(const MachineInstr &MI) const override;
144e8d8bef9SDimitry Andric 
1458bcb0991SDimitry Andric   bool verifyInstruction(const MachineInstr &MI,
1468bcb0991SDimitry Andric                          StringRef &ErrInfo) const override;
1478bcb0991SDimitry Andric 
148*5f757f3fSDimitry Andric   bool canFoldIntoAddrMode(const MachineInstr &MemI, Register Reg,
149*5f757f3fSDimitry Andric                            const MachineInstr &AddrI,
150*5f757f3fSDimitry Andric                            ExtAddrMode &AM) const override;
151*5f757f3fSDimitry Andric 
152*5f757f3fSDimitry Andric   MachineInstr *emitLdStWithAddr(MachineInstr &MemI,
153*5f757f3fSDimitry Andric                                  const ExtAddrMode &AM) const override;
154*5f757f3fSDimitry Andric 
155*5f757f3fSDimitry Andric   bool getMemOperandsWithOffsetWidth(
156*5f757f3fSDimitry Andric       const MachineInstr &MI, SmallVectorImpl<const MachineOperand *> &BaseOps,
157*5f757f3fSDimitry Andric       int64_t &Offset, bool &OffsetIsScalable, unsigned &Width,
158*5f757f3fSDimitry Andric       const TargetRegisterInfo *TRI) const override;
159*5f757f3fSDimitry Andric 
160*5f757f3fSDimitry Andric   bool shouldClusterMemOps(ArrayRef<const MachineOperand *> BaseOps1,
161*5f757f3fSDimitry Andric                            int64_t Offset1, bool OffsetIsScalable1,
162*5f757f3fSDimitry Andric                            ArrayRef<const MachineOperand *> BaseOps2,
163*5f757f3fSDimitry Andric                            int64_t Offset2, bool OffsetIsScalable2,
164*5f757f3fSDimitry Andric                            unsigned ClusterSize,
165*5f757f3fSDimitry Andric                            unsigned NumBytes) const override;
166*5f757f3fSDimitry Andric 
167480093f4SDimitry Andric   bool getMemOperandWithOffsetWidth(const MachineInstr &LdSt,
168480093f4SDimitry Andric                                     const MachineOperand *&BaseOp,
169480093f4SDimitry Andric                                     int64_t &Offset, unsigned &Width,
170480093f4SDimitry Andric                                     const TargetRegisterInfo *TRI) const;
171480093f4SDimitry Andric 
172480093f4SDimitry Andric   bool areMemAccessesTriviallyDisjoint(const MachineInstr &MIa,
173480093f4SDimitry Andric                                        const MachineInstr &MIb) const override;
174480093f4SDimitry Andric 
175480093f4SDimitry Andric 
176480093f4SDimitry Andric   std::pair<unsigned, unsigned>
177480093f4SDimitry Andric   decomposeMachineOperandsTargetFlags(unsigned TF) const override;
178480093f4SDimitry Andric 
179480093f4SDimitry Andric   ArrayRef<std::pair<unsigned, const char *>>
180480093f4SDimitry Andric   getSerializableDirectMachineOperandTargetFlags() const override;
181480093f4SDimitry Andric 
182480093f4SDimitry Andric   // Return true if the function can safely be outlined from.
183972a253aSDimitry Andric   bool isFunctionSafeToOutlineFrom(MachineFunction &MF,
184480093f4SDimitry Andric                                    bool OutlineFromLinkOnceODRs) const override;
185480093f4SDimitry Andric 
186480093f4SDimitry Andric   // Return true if MBB is safe to outline from, and return any target-specific
187480093f4SDimitry Andric   // information in Flags.
188972a253aSDimitry Andric   bool isMBBSafeToOutlineFrom(MachineBasicBlock &MBB,
189480093f4SDimitry Andric                               unsigned &Flags) const override;
190480093f4SDimitry Andric 
19181ad6265SDimitry Andric   bool shouldOutlineFromFunctionByDefault(MachineFunction &MF) const override;
19281ad6265SDimitry Andric 
193480093f4SDimitry Andric   // Calculate target-specific information for a set of outlining candidates.
19406c3fb27SDimitry Andric   std::optional<outliner::OutlinedFunction> getOutliningCandidateInfo(
195480093f4SDimitry Andric       std::vector<outliner::Candidate> &RepeatedSequenceLocs) const override;
196480093f4SDimitry Andric 
197480093f4SDimitry Andric   // Return if/how a given MachineInstr should be outlined.
19806c3fb27SDimitry Andric   virtual outliner::InstrType
19906c3fb27SDimitry Andric   getOutliningTypeImpl(MachineBasicBlock::iterator &MBBI,
200480093f4SDimitry Andric                        unsigned Flags) const override;
201480093f4SDimitry Andric 
202480093f4SDimitry Andric   // Insert a custom frame for outlined functions.
203972a253aSDimitry Andric   void buildOutlinedFrame(MachineBasicBlock &MBB, MachineFunction &MF,
204480093f4SDimitry Andric                           const outliner::OutlinedFunction &OF) const override;
205480093f4SDimitry Andric 
206480093f4SDimitry Andric   // Insert a call to an outlined function into a given basic block.
207972a253aSDimitry Andric   MachineBasicBlock::iterator
208480093f4SDimitry Andric   insertOutlinedCall(Module &M, MachineBasicBlock &MBB,
209480093f4SDimitry Andric                      MachineBasicBlock::iterator &It, MachineFunction &MF,
21081ad6265SDimitry Andric                      outliner::Candidate &C) const override;
211fe6060f1SDimitry Andric 
212*5f757f3fSDimitry Andric   std::optional<RegImmPair> isAddImmediate(const MachineInstr &MI,
213*5f757f3fSDimitry Andric                                            Register Reg) const override;
214*5f757f3fSDimitry Andric 
215fe6060f1SDimitry Andric   bool findCommutedOpIndices(const MachineInstr &MI, unsigned &SrcOpIdx1,
216fe6060f1SDimitry Andric                              unsigned &SrcOpIdx2) const override;
217fe6060f1SDimitry Andric   MachineInstr *commuteInstructionImpl(MachineInstr &MI, bool NewMI,
218fe6060f1SDimitry Andric                                        unsigned OpIdx1,
219fe6060f1SDimitry Andric                                        unsigned OpIdx2) const override;
220fe6060f1SDimitry Andric 
221349cc55cSDimitry Andric   MachineInstr *convertToThreeAddress(MachineInstr &MI, LiveVariables *LV,
222349cc55cSDimitry Andric                                       LiveIntervals *LIS) const override;
223fe6060f1SDimitry Andric 
22481ad6265SDimitry Andric   // MIR printer helper function to annotate Operands with a comment.
22581ad6265SDimitry Andric   std::string
22681ad6265SDimitry Andric   createMIROperandComment(const MachineInstr &MI, const MachineOperand &Op,
22781ad6265SDimitry Andric                           unsigned OpIdx,
22881ad6265SDimitry Andric                           const TargetRegisterInfo *TRI) const override;
22981ad6265SDimitry Andric 
230bdd1243dSDimitry Andric   void getVLENFactoredAmount(
231fe6060f1SDimitry Andric       MachineFunction &MF, MachineBasicBlock &MBB,
232bdd1243dSDimitry Andric       MachineBasicBlock::iterator II, const DebugLoc &DL, Register DestReg,
233bdd1243dSDimitry Andric       int64_t Amount, MachineInstr::MIFlag Flag = MachineInstr::NoFlags) const;
234bdd1243dSDimitry Andric 
235bdd1243dSDimitry Andric   bool useMachineCombiner() const override { return true; }
236bdd1243dSDimitry Andric 
23706c3fb27SDimitry Andric   MachineTraceStrategy getMachineCombinerTraceStrategy() const override;
23806c3fb27SDimitry Andric 
239bdd1243dSDimitry Andric   bool
240bdd1243dSDimitry Andric   getMachineCombinerPatterns(MachineInstr &Root,
241bdd1243dSDimitry Andric                              SmallVectorImpl<MachineCombinerPattern> &Patterns,
242bdd1243dSDimitry Andric                              bool DoRegPressureReduce) const override;
243bdd1243dSDimitry Andric 
244bdd1243dSDimitry Andric   void
245bdd1243dSDimitry Andric   finalizeInsInstrs(MachineInstr &Root, MachineCombinerPattern &P,
246bdd1243dSDimitry Andric                     SmallVectorImpl<MachineInstr *> &InsInstrs) const override;
247bdd1243dSDimitry Andric 
248bdd1243dSDimitry Andric   void genAlternativeCodeSequence(
249bdd1243dSDimitry Andric       MachineInstr &Root, MachineCombinerPattern Pattern,
250bdd1243dSDimitry Andric       SmallVectorImpl<MachineInstr *> &InsInstrs,
251bdd1243dSDimitry Andric       SmallVectorImpl<MachineInstr *> &DelInstrs,
252bdd1243dSDimitry Andric       DenseMap<unsigned, unsigned> &InstrIdxForVirtReg) const override;
253bdd1243dSDimitry Andric 
254bdd1243dSDimitry Andric   bool hasReassociableSibling(const MachineInstr &Inst,
255bdd1243dSDimitry Andric                               bool &Commuted) const override;
256bdd1243dSDimitry Andric 
257bdd1243dSDimitry Andric   bool isAssociativeAndCommutative(const MachineInstr &Inst,
258bdd1243dSDimitry Andric                                    bool Invert) const override;
259bdd1243dSDimitry Andric 
260bdd1243dSDimitry Andric   std::optional<unsigned> getInverseOpcode(unsigned Opcode) const override;
261bdd1243dSDimitry Andric 
26206c3fb27SDimitry Andric   ArrayRef<std::pair<MachineMemOperand::Flags, const char *>>
26306c3fb27SDimitry Andric   getSerializableMachineMemOperandTargetFlags() const override;
264fe6060f1SDimitry Andric 
2658bcb0991SDimitry Andric protected:
2668bcb0991SDimitry Andric   const RISCVSubtarget &STI;
26706c3fb27SDimitry Andric 
26806c3fb27SDimitry Andric private:
26906c3fb27SDimitry Andric   unsigned getInstBundleLength(const MachineInstr &MI) const;
2700b57cec5SDimitry Andric };
2715ffd83dbSDimitry Andric 
272349cc55cSDimitry Andric namespace RISCV {
2730eae32dcSDimitry Andric 
274fcaf7f86SDimitry Andric // Returns true if this is the sext.w pattern, addiw rd, rs1, 0.
275fcaf7f86SDimitry Andric bool isSEXT_W(const MachineInstr &MI);
276fcaf7f86SDimitry Andric bool isZEXT_W(const MachineInstr &MI);
277fcaf7f86SDimitry Andric bool isZEXT_B(const MachineInstr &MI);
278fcaf7f86SDimitry Andric 
27981ad6265SDimitry Andric // Returns true if the given MI is an RVV instruction opcode for which we may
28081ad6265SDimitry Andric // expect to see a FrameIndex operand.
28181ad6265SDimitry Andric bool isRVVSpill(const MachineInstr &MI);
28281ad6265SDimitry Andric 
283bdd1243dSDimitry Andric std::optional<std::pair<unsigned, unsigned>>
284bdd1243dSDimitry Andric isRVVSpillForZvlsseg(unsigned Opcode);
28581ad6265SDimitry Andric 
28681ad6265SDimitry Andric bool isFaultFirstLoad(const MachineInstr &MI);
28781ad6265SDimitry Andric 
2880eae32dcSDimitry Andric // Implemented in RISCVGenInstrInfo.inc
2890eae32dcSDimitry Andric int16_t getNamedOperandIdx(uint16_t Opcode, uint16_t NamedIndex);
2900eae32dcSDimitry Andric 
291bdd1243dSDimitry Andric // Return true if both input instructions have equal rounding mode. If at least
292bdd1243dSDimitry Andric // one of the instructions does not have rounding mode, false will be returned.
293bdd1243dSDimitry Andric bool hasEqualFRM(const MachineInstr &MI1, const MachineInstr &MI2);
294bdd1243dSDimitry Andric 
295*5f757f3fSDimitry Andric // If \p Opcode is a .vx vector instruction, returns the lower number of bits
296*5f757f3fSDimitry Andric // that are used from the scalar .x operand for a given \p Log2SEW. Otherwise
297*5f757f3fSDimitry Andric // returns null.
298*5f757f3fSDimitry Andric std::optional<unsigned> getVectorLowDemandedScalarBits(uint16_t Opcode,
299*5f757f3fSDimitry Andric                                                        unsigned Log2SEW);
300*5f757f3fSDimitry Andric 
301*5f757f3fSDimitry Andric // Returns the MC opcode of RVV pseudo instruction.
302*5f757f3fSDimitry Andric unsigned getRVVMCOpcode(unsigned RVVPseudoOpcode);
303*5f757f3fSDimitry Andric 
304349cc55cSDimitry Andric // Special immediate for AVL operand of V pseudo instructions to indicate VLMax.
305349cc55cSDimitry Andric static constexpr int64_t VLMaxSentinel = -1LL;
306bdd1243dSDimitry Andric 
30706c3fb27SDimitry Andric // Mask assignments for floating-point
30806c3fb27SDimitry Andric static constexpr unsigned FPMASK_Negative_Infinity = 0x001;
30906c3fb27SDimitry Andric static constexpr unsigned FPMASK_Negative_Normal = 0x002;
31006c3fb27SDimitry Andric static constexpr unsigned FPMASK_Negative_Subnormal = 0x004;
31106c3fb27SDimitry Andric static constexpr unsigned FPMASK_Negative_Zero = 0x008;
31206c3fb27SDimitry Andric static constexpr unsigned FPMASK_Positive_Zero = 0x010;
31306c3fb27SDimitry Andric static constexpr unsigned FPMASK_Positive_Subnormal = 0x020;
31406c3fb27SDimitry Andric static constexpr unsigned FPMASK_Positive_Normal = 0x040;
31506c3fb27SDimitry Andric static constexpr unsigned FPMASK_Positive_Infinity = 0x080;
31606c3fb27SDimitry Andric static constexpr unsigned FPMASK_Signaling_NaN = 0x100;
31706c3fb27SDimitry Andric static constexpr unsigned FPMASK_Quiet_NaN = 0x200;
318349cc55cSDimitry Andric } // namespace RISCV
319349cc55cSDimitry Andric 
320fe6060f1SDimitry Andric namespace RISCVVPseudosTable {
321fe6060f1SDimitry Andric 
322fe6060f1SDimitry Andric struct PseudoInfo {
323fe6060f1SDimitry Andric   uint16_t Pseudo;
324fe6060f1SDimitry Andric   uint16_t BaseInstr;
325fe6060f1SDimitry Andric };
326fe6060f1SDimitry Andric 
327fe6060f1SDimitry Andric #define GET_RISCVVPseudosTable_DECL
328fe6060f1SDimitry Andric #include "RISCVGenSearchableTables.inc"
329fe6060f1SDimitry Andric 
330fe6060f1SDimitry Andric } // end namespace RISCVVPseudosTable
331fe6060f1SDimitry Andric 
3325ffd83dbSDimitry Andric } // end namespace llvm
3330b57cec5SDimitry Andric #endif
334