LLVM 23.0.0git
RISCVBaseInfo.h
Go to the documentation of this file.
1//===-- RISCVBaseInfo.h - Top level definitions for RISC-V MC ---*- 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 contains small standalone enum definitions for the RISC-V target
10// useful for the compiler back-end and the MC libraries.
11//
12//===----------------------------------------------------------------------===//
13#ifndef LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVBASEINFO_H
14#define LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVBASEINFO_H
15
17#include "llvm/ADT/APFloat.h"
18#include "llvm/ADT/APInt.h"
19#include "llvm/ADT/StringRef.h"
21#include "llvm/MC/MCInstrDesc.h"
25
26namespace llvm {
27
28namespace RISCVOp {
29enum OperandType : unsigned {
100 // Operand is a 3-bit rounding mode, '111' indicates FRM register.
101 // Represents 'frm' argument passing to floating-point operations.
103 // Operand is a 3-bit rounding mode where only RTZ is valid.
105 // Condition code used by select and short forward branch pseudos.
107 // Ordering for atomic pseudos.
109 // Vector policy operand.
111 // Vector SEW operand. Stores in log2(SEW).
113 // Special SEW for mask only instructions. Always 0.
115 // Vector rounding mode for VXRM or FRM.
117 // Vtype operand for XSfmm extension.
119 // XSfmm twiden operand.
122
125
126 // Simm12 or constant pool, global, basicblock, etc.
128
130
131 // Operand is either a register or uimm5, this is used by V extension pseudo
132 // instructions to represent a value that be passed as AVL to either vsetvli
133 // or vsetivli.
135
136 // Operand is either a register or imm, this is used by short forward branch
137 // (SFB) pseudos to enable SFB with branches on reg-reg and reg-imm compares.
139
140 // Operand is a branch opcode, this too is used by SFB pseudos.
142
144};
145} // namespace RISCVOp
146
147// RISCVII - This namespace holds all of the target specific flags that
148// instruction info tracks. All definitions must match RISCVInstrFormats.td.
149namespace RISCVII {
150enum {
180
183
189
192
193 // Is this a _TIED vector pseudo instruction. For these instructions we
194 // shouldn't skip the tied operand when converting to MC instructions.
197
198 // Does this instruction have a SEW operand. It will be the last explicit
199 // operand unless there is a vector policy operand. Used by RVV Pseudos.
202
203 // Does this instruction have a VL operand. It will be the second to last
204 // explicit operand unless there is a vector policy operand. Used by RVV
205 // Pseudos.
208
209 // Does this instruction have a vector policy operand. It will be the last
210 // explicit operand. Used by RVV Pseudos.
213
214 // Is this instruction a vector widening reduction instruction. Used by RVV
215 // Pseudos.
218
219 // Does this instruction care about mask policy. If it is not, the mask policy
220 // could be either agnostic or undisturbed. For example, unmasked, store, and
221 // reduction operations result would not be affected by mask policy, so
222 // compiler has free to select either one.
225
226 // Indicates that the result can be considered sign extended from bit 31. Some
227 // instructions with this flag aren't W instructions, but are either sign
228 // extended from a smaller size, always outputs a small integer, or put zeros
229 // in bits 63:31. Used by the SExtWRemoval pass.
232
235
238
239 // Indicates whether these instructions can partially overlap between source
240 // registers and destination registers according to the vector spec.
241 // 0 -> not a vector pseudo
242 // 1 -> default value for vector pseudos. not widening or narrowing.
243 // 2 -> narrowing case
244 // 3 -> widening case
247
250
253
254 // Indicates the EEW of a vector instruction's destination operand.
255 // 0 -> 1
256 // 1 -> SEW
257 // 2 -> SEW * 2
258 // 3 -> SEW * 4
261
264
265 // 0 -> Don't care about altfmt bit in VTYPE.
266 // 1 -> Is not altfmt.
267 // 2 -> Is altfmt(BF16).
270
271 // XSfmmbase
274
277
280};
281
282// Helper functions to read TSFlags.
283/// \returns the format of the instruction.
284static inline unsigned getFormat(uint64_t TSFlags) {
285 return (TSFlags & InstFormatMask) >> InstFormatShift;
286}
287/// \returns the LMUL for the instruction.
288static inline RISCVVType::VLMUL getLMul(uint64_t TSFlags) {
289 return static_cast<RISCVVType::VLMUL>((TSFlags & VLMulMask) >> VLMulShift);
290}
291/// \returns true if this a _TIED pseudo.
292static inline bool isTiedPseudo(uint64_t TSFlags) {
293 return TSFlags & IsTiedPseudoMask;
294}
295/// \returns true if there is a SEW operand for the instruction.
296static inline bool hasSEWOp(uint64_t TSFlags) {
297 return TSFlags & HasSEWOpMask;
298}
299/// \returns true if there is a VL operand for the instruction.
300static inline bool hasVLOp(uint64_t TSFlags) {
301 return TSFlags & HasVLOpMask;
302}
303/// \returns true if there is a vector policy operand for this instruction.
304static inline bool hasVecPolicyOp(uint64_t TSFlags) {
305 return TSFlags & HasVecPolicyOpMask;
306}
307/// \returns true if it is a vector widening reduction instruction.
308static inline bool isRVVWideningReduction(uint64_t TSFlags) {
309 return TSFlags & IsRVVWideningReductionMask;
310}
311/// \returns true if mask policy is valid for the instruction.
312static inline bool usesMaskPolicy(uint64_t TSFlags) {
313 return TSFlags & UsesMaskPolicyMask;
314}
315
316/// \returns true if there is a rounding mode operand for this instruction
317static inline bool hasRoundModeOp(uint64_t TSFlags) {
318 return TSFlags & HasRoundModeOpMask;
319}
320
322static inline AltFmtType getAltFmtType(uint64_t TSFlags) {
323 return static_cast<AltFmtType>((TSFlags & AltFmtTypeMask) >> AltFmtTypeShift);
324}
325
326/// \returns true if this instruction uses vxrm
327static inline bool usesVXRM(uint64_t TSFlags) { return TSFlags & UsesVXRMMask; }
328
329/// \returns true if the elements in the body are affected by VL,
330/// e.g. vslide1down.vx/vredsum.vs/viota.m
331static inline bool elementsDependOnVL(uint64_t TSFlags) {
332 return TSFlags & ElementsDependOnVLMask;
333}
334
335/// \returns true if the elements in the body are affected by the mask,
336/// e.g. vredsum.vs/viota.m
337static inline bool elementsDependOnMask(uint64_t TSFlags) {
338 return TSFlags & ElementsDependOnMaskMask;
339}
340
341/// \returns true if the instruction may read elements past VL, e.g.
342/// vslidedown/vrgather
343static inline bool readsPastVL(uint64_t TSFlags) {
344 return TSFlags & ReadsPastVLMask;
345}
346
347// XSfmmbase
348static inline bool hasTWidenOp(uint64_t TSFlags) {
349 return TSFlags & HasTWidenOpMask;
350}
351
352static inline bool hasTMOp(uint64_t TSFlags) { return TSFlags & HasTMOpMask; }
353
354static inline bool hasTKOp(uint64_t TSFlags) { return TSFlags & HasTKOpMask; }
355
356static inline unsigned getTWidenOpNum(const MCInstrDesc &Desc) {
357 assert(hasTWidenOp(Desc.TSFlags));
358 return Desc.getNumOperands() - 1;
359}
360
361static inline unsigned getTNOpNum(const MCInstrDesc &Desc) {
362 const uint64_t TSFlags = Desc.TSFlags;
363 assert(hasTWidenOp(TSFlags) && hasVLOp(TSFlags));
364 unsigned Offset = 3;
365 if (hasTKOp(TSFlags))
366 Offset = 4;
367 return Desc.getNumOperands() - Offset;
368}
369
370static inline unsigned getTMOpNum(const MCInstrDesc &Desc) {
371 const uint64_t TSFlags = Desc.TSFlags;
372 assert(hasTWidenOp(TSFlags) && hasTMOp(TSFlags));
373 if (hasTKOp(TSFlags))
374 return Desc.getNumOperands() - 5;
375 // vtzero.t
376 return Desc.getNumOperands() - 4;
377}
378
379static inline unsigned getTKOpNum(const MCInstrDesc &Desc) {
380 [[maybe_unused]] const uint64_t TSFlags = Desc.TSFlags;
381 assert(hasTWidenOp(TSFlags) && hasTKOp(TSFlags));
382 return Desc.getNumOperands() - 3;
383}
384
385static inline unsigned getVLOpNum(const MCInstrDesc &Desc) {
386 const uint64_t TSFlags = Desc.TSFlags;
387 // This method is only called if we expect to have a VL operand, and all
388 // instructions with VL also have SEW.
389 assert(hasSEWOp(TSFlags) && hasVLOp(TSFlags));
390 // In Xsfmmbase, TN is an alias for VL, so here we use the same TSFlags bit.
391 if (hasTWidenOp(TSFlags))
392 return getTNOpNum(Desc);
393 unsigned Offset = 2;
394 if (hasVecPolicyOp(TSFlags))
395 Offset = 3;
396 return Desc.getNumOperands() - Offset;
397}
398
399static inline MCRegister
401 // For Zicfilp, PseudoTAIL should be expanded to a software guarded branch.
402 // It means to use t2(x7) as rs1 of JALR to expand PseudoTAIL.
403 return FeatureBits[RISCV::FeatureStdExtZicfilp] ? RISCV::X7 : RISCV::X6;
404}
405
406static inline unsigned getSEWOpNum(const MCInstrDesc &Desc) {
407 const uint64_t TSFlags = Desc.TSFlags;
408 assert(hasSEWOp(TSFlags));
409 unsigned Offset = 1;
410 if (hasVecPolicyOp(TSFlags) || hasTWidenOp(TSFlags))
411 Offset = 2;
412 return Desc.getNumOperands() - Offset;
413}
414
415static inline unsigned getVecPolicyOpNum(const MCInstrDesc &Desc) {
416 assert(hasVecPolicyOp(Desc.TSFlags));
417 return Desc.getNumOperands() - 1;
418}
419
420/// \returns the index to the rounding mode immediate value if any, otherwise
421/// returns -1.
422static inline int getFRMOpNum(const MCInstrDesc &Desc) {
423 const uint64_t TSFlags = Desc.TSFlags;
424 if (!hasRoundModeOp(TSFlags) || usesVXRM(TSFlags))
425 return -1;
426
427 int Idx = RISCV::getNamedOperandIdx(Desc.getOpcode(), RISCV::OpName::rm);
428 assert(Idx >= 0 && "No rm operand?");
429 assert(Desc.operands()[Idx].OperandType == RISCVOp::OPERAND_VEC_RM &&
430 "Operand has wrong type");
431
432 return Idx;
433}
434
435/// \returns the index to the rounding mode immediate value if any, otherwise
436/// returns -1.
437static inline int getVXRMOpNum(const MCInstrDesc &Desc) {
438 const uint64_t TSFlags = Desc.TSFlags;
439 if (!hasRoundModeOp(TSFlags) || !usesVXRM(TSFlags))
440 return -1;
441
442 int Idx = RISCV::getNamedOperandIdx(Desc.getOpcode(), RISCV::OpName::rm);
443 assert(Idx >= 0 && "No rm operand?");
444 assert(Desc.operands()[Idx].OperandType == RISCVOp::OPERAND_VEC_RM &&
445 "Operand has wrong type");
446
447 return Idx;
448}
449
450// Is the first def operand tied to the first use operand. This is true for
451// vector pseudo instructions that have a merge operand for tail/mask
452// undisturbed. It's also true for vector FMA instructions where one of the
453// operands is also the destination register.
454static inline bool isFirstDefTiedToFirstUse(const MCInstrDesc &Desc) {
455 return Desc.getNumDefs() < Desc.getNumOperands() &&
456 Desc.getOperandConstraint(Desc.getNumDefs(), MCOI::TIED_TO) == 0;
457}
458
459// RISC-V Specific Machine Operand Flags
460enum {
463 MO_LO = 3,
464 MO_HI = 4,
478
479 // Used to differentiate between target-specific "direct" flags and "bitmask"
480 // flags. A machine operand can only have one "direct" flag, but can have
481 // multiple "bitmask" flags.
483};
484} // namespace RISCVII
485
486// Describes the predecessor/successor bits used in the FENCE instruction.
489 I = 8,
490 O = 4,
491 R = 2,
492 W = 1
493};
494}
495
496// Describes the supported floating point rounding mode encodings.
497namespace RISCVFPRndMode {
499 RNE = 0,
500 RTZ = 1,
501 RDN = 2,
502 RUP = 3,
503 RMM = 4,
504 DYN = 7,
506};
507
509 switch (RndMode) {
510 default:
511 llvm_unreachable("Unknown floating point rounding mode");
513 return "rne";
515 return "rtz";
517 return "rdn";
519 return "rup";
521 return "rmm";
523 return "dyn";
524 }
525}
526
537
538inline static bool isValidRoundingMode(unsigned Mode) {
539 switch (Mode) {
540 default:
541 return false;
548 return true;
549 }
550}
551} // namespace RISCVFPRndMode
552
553namespace RISCVVXRndMode {
555 RNU = 0,
556 RNE = 1,
557 RDN = 2,
558 ROD = 3,
560};
561
563 switch (RndMode) {
564 default:
565 llvm_unreachable("Unknown vector fixed-point rounding mode");
567 return "rnu";
569 return "rne";
571 return "rdn";
573 return "rod";
574 }
575}
576
585
586inline static bool isValidRoundingMode(unsigned Mode) {
587 switch (Mode) {
588 default:
589 return false;
594 return true;
595 }
596}
597} // namespace RISCVVXRndMode
598
601 NX = 0x01, // Inexact
602 UF = 0x02, // Underflow
603 OF = 0x04, // Overflow
604 DZ = 0x08, // Divide by zero
605 NV = 0x10, // Invalid operation
606 ALL = 0x1F // Mask for all accrued exception flags
607};
608}
609
610//===----------------------------------------------------------------------===//
611// Floating-point Immediates
612//
613
614namespace RISCVLoadFPImm {
615float getFPImm(unsigned Imm);
616
617/// getLoadFPImm - Return a 5-bit binary encoding of the floating-point
618/// immediate value. If the value cannot be represented as a 5-bit binary
619/// encoding, then return -1.
620int getLoadFPImm(APFloat FPImm);
621} // namespace RISCVLoadFPImm
622
623namespace RISCVSysReg {
624struct SysReg {
625 const char Name[32];
626 unsigned Encoding;
627 // FIXME: add these additional fields when needed.
628 // Privilege Access: Read, Write, Read-Only.
629 // unsigned ReadWrite;
630 // Privilege Mode: User, System or Machine.
631 // unsigned Mode;
632 // Check field name.
633 // unsigned Extra;
634 // Register number without the privilege bits.
635 // unsigned Number;
640
641 bool haveRequiredFeatures(const FeatureBitset &ActiveFeatures) const {
642 // Not in 32-bit mode.
643 if (IsRV32Only && ActiveFeatures[RISCV::Feature64Bit])
644 return false;
645 // No required feature associated with the system register.
646 if (FeaturesRequired.none())
647 return true;
648 return (FeaturesRequired & ActiveFeatures) == FeaturesRequired;
649 }
650};
651
652#define GET_SysRegEncodings_DECL
653#define GET_SysRegsList_DECL
654#include "RISCVGenSearchableTables.inc"
655} // end namespace RISCVSysReg
656
657namespace RISCVInsnOpcode {
659 char Name[10];
661};
662
663#define GET_RISCVOpcodesList_DECL
664#include "RISCVGenSearchableTables.inc"
665} // end namespace RISCVInsnOpcode
666
667namespace RISCVABI {
668
688
689// Returns the target ABI, or else a StringError if the requested ABIName is
690// not supported for the given TT and FeatureBits combination.
691ABI computeTargetABI(const Triple &TT, const FeatureBitset &FeatureBits,
692 StringRef ABIName);
693
694ABI getTargetABI(StringRef ABIName);
695
696// Returns the register used to hold the stack pointer after realignment.
698
699// Returns the register holding shadow call stack pointer.
701
702} // namespace RISCVABI
703
704namespace RISCVFeatures {
705
706// Validates if the given combination of features are valid for the target
707// triple. Exits with report_fatal_error if not.
708void validate(const Triple &TT, const FeatureBitset &FeatureBits);
709
711parseFeatureBits(bool IsRV64, const FeatureBitset &FeatureBits);
712
713} // namespace RISCVFeatures
714
715namespace RISCVRVC {
716bool compress(MCInst &OutInst, const MCInst &MI, const MCSubtargetInfo &STI);
717bool uncompress(MCInst &OutInst, const MCInst &MI, const MCSubtargetInfo &STI);
718} // namespace RISCVRVC
719
720namespace RISCVZC {
737
738inline unsigned encodeRegList(MCRegister EndReg, bool IsRVE = false) {
739 assert((!IsRVE || EndReg <= RISCV::X9) && "Invalid Rlist for RV32E");
740 switch (EndReg.id()) {
741 case RISCV::X1:
742 return RLISTENCODE::RA;
743 case RISCV::X8:
744 return RLISTENCODE::RA_S0;
745 case RISCV::X9:
747 case RISCV::X18:
749 case RISCV::X19:
751 case RISCV::X20:
753 case RISCV::X21:
755 case RISCV::X22:
757 case RISCV::X23:
759 case RISCV::X24:
761 case RISCV::X25:
763 case RISCV::X27:
765 default:
766 llvm_unreachable("Undefined input.");
767 }
768}
769
770inline static unsigned encodeRegListNumRegs(unsigned NumRegs) {
771 assert(NumRegs > 0 && NumRegs < 14 && NumRegs != 12 &&
772 "Unexpected number of registers");
773 if (NumRegs == 13)
775
776 return RLISTENCODE::RA + (NumRegs - 1);
777}
778
779inline static unsigned getStackAdjBase(unsigned RlistVal, bool IsRV64) {
780 assert(RlistVal >= RLISTENCODE::RA && RlistVal <= RLISTENCODE::RA_S0_S11 &&
781 "Invalid Rlist");
782 unsigned NumRegs = (RlistVal - RLISTENCODE::RA) + 1;
783 // s10 and s11 are saved together.
784 if (RlistVal == RLISTENCODE::RA_S0_S11)
785 ++NumRegs;
786
787 unsigned RegSize = IsRV64 ? 8 : 4;
788 return alignTo(NumRegs * RegSize, 16);
789}
790
791void printRegList(unsigned RlistEncode, raw_ostream &OS);
792} // namespace RISCVZC
793
794namespace RISCVVInversePseudosTable {
802
803#define GET_RISCVVInversePseudosTable_DECL
804#include "RISCVGenSearchableTables.inc"
805
806inline const PseudoInfo *getBaseInfo(unsigned BaseInstr, uint8_t VLMul,
807 uint8_t SEW, bool IsAltFmt = false) {
808 return getBaseInfoImpl(BaseInstr, VLMul, SEW, IsAltFmt);
809}
810} // namespace RISCVVInversePseudosTable
811
812namespace RISCV {
822
832
841
851
860
868
877
885
886#define GET_RISCVVSSEGTable_DECL
887#define GET_RISCVVLSEGTable_DECL
888#define GET_RISCVVLXSEGTable_DECL
889#define GET_RISCVVSXSEGTable_DECL
890#define GET_RISCVVLETable_DECL
891#define GET_RISCVVSETable_DECL
892#define GET_RISCVVLXTable_DECL
893#define GET_RISCVVSXTable_DECL
894#define GET_RISCVNDSVLNTable_DECL
895#include "RISCVGenSearchableTables.inc"
896
897inline bool isValidYBNDSWImm(int64_t Imm) {
898 return (Imm >= 1 && Imm <= 255) ||
899 (Imm >= 256 && Imm <= 504 && (Imm % 8) == 0) ||
900 (Imm >= 512 && Imm <= 4096 && (Imm % 16) == 0);
901}
902} // namespace RISCV
903
904} // namespace llvm
905
906#endif
unsigned RegSize
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file declares a class to represent arbitrary precision floating point values and provide a varie...
This file implements a class to represent arbitrary precision integral constant values and operations...
IRTranslator LLVM IR MI
static cl::opt< RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Development, "development", "for training")))
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
Tagged union holding either a T or a Error.
Definition Error.h:485
Container class for subtarget features.
Instances of this class represent a single low-level machine instruction.
Definition MCInst.h:188
Describe properties that are true of each instruction in the target description file.
Wrapper class representing physical registers. Should be passed by value.
Definition MCRegister.h:41
constexpr unsigned id() const
Definition MCRegister.h:82
Generic base class for all target subtargets.
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:47
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ OPERAND_FIRST_TARGET
Definition MCInstrDesc.h:79
ABI getTargetABI(StringRef ABIName)
ABI computeTargetABI(const Triple &TT, const FeatureBitset &FeatureBits, StringRef ABIName)
MCRegister getBPReg()
MCRegister getSCSPReg()
static bool isValidRoundingMode(unsigned Mode)
static RoundingMode stringToRoundingMode(StringRef Str)
static StringRef roundingModeToString(RoundingMode RndMode)
void validate(const Triple &TT, const FeatureBitset &FeatureBits)
llvm::Expected< std::unique_ptr< RISCVISAInfo > > parseFeatureBits(bool IsRV64, const FeatureBitset &FeatureBits)
static unsigned getVecPolicyOpNum(const MCInstrDesc &Desc)
static unsigned getTMOpNum(const MCInstrDesc &Desc)
static bool usesMaskPolicy(uint64_t TSFlags)
static bool hasRoundModeOp(uint64_t TSFlags)
@ TargetOverlapConstraintTypeMask
@ TargetOverlapConstraintTypeShift
static bool readsPastVL(uint64_t TSFlags)
static bool hasTWidenOp(uint64_t TSFlags)
static bool isTiedPseudo(uint64_t TSFlags)
static RISCVVType::VLMUL getLMul(uint64_t TSFlags)
static unsigned getTKOpNum(const MCInstrDesc &Desc)
static unsigned getVLOpNum(const MCInstrDesc &Desc)
static AltFmtType getAltFmtType(uint64_t TSFlags)
static unsigned getFormat(uint64_t TSFlags)
static unsigned getTWidenOpNum(const MCInstrDesc &Desc)
static bool hasTKOp(uint64_t TSFlags)
static bool hasVLOp(uint64_t TSFlags)
static MCRegister getTailExpandUseRegNo(const FeatureBitset &FeatureBits)
static bool elementsDependOnMask(uint64_t TSFlags)
static int getFRMOpNum(const MCInstrDesc &Desc)
static bool hasTMOp(uint64_t TSFlags)
static int getVXRMOpNum(const MCInstrDesc &Desc)
static unsigned getTNOpNum(const MCInstrDesc &Desc)
static bool hasVecPolicyOp(uint64_t TSFlags)
static bool usesVXRM(uint64_t TSFlags)
static bool isRVVWideningReduction(uint64_t TSFlags)
static unsigned getSEWOpNum(const MCInstrDesc &Desc)
static bool elementsDependOnVL(uint64_t TSFlags)
static bool hasSEWOp(uint64_t TSFlags)
static bool isFirstDefTiedToFirstUse(const MCInstrDesc &Desc)
int getLoadFPImm(APFloat FPImm)
getLoadFPImm - Return a 5-bit binary encoding of the floating-point immediate value.
float getFPImm(unsigned Imm)
@ OPERAND_UIMMLOG2XLEN_NONZERO
@ OPERAND_UIMM10_LSB00_NONZERO
@ OPERAND_SIMM10_LSB0000_NONZERO
bool uncompress(MCInst &OutInst, const MCInst &MI, const MCSubtargetInfo &STI)
bool compress(MCInst &OutInst, const MCInst &MI, const MCSubtargetInfo &STI)
const PseudoInfo * getBaseInfo(unsigned BaseInstr, uint8_t VLMul, uint8_t SEW, bool IsAltFmt=false)
static bool isValidRoundingMode(unsigned Mode)
static RoundingMode stringToRoundingMode(StringRef Str)
static StringRef roundingModeToString(RoundingMode RndMode)
unsigned encodeRegList(MCRegister EndReg, bool IsRVE=false)
static unsigned getStackAdjBase(unsigned RlistVal, bool IsRV64)
void printRegList(unsigned RlistEncode, raw_ostream &OS)
static unsigned encodeRegListNumRegs(unsigned NumRegs)
bool isValidYBNDSWImm(int64_t Imm)
This is an optimization pass for GlobalISel generic memory operations.
@ Offset
Definition DWP.cpp:558
Op::Description Desc
constexpr uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
Definition Alignment.h:144
bool haveRequiredFeatures(const FeatureBitset &ActiveFeatures) const