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 {
97 // Operand is a 3-bit rounding mode, '111' indicates FRM register.
98 // Represents 'frm' argument passing to floating-point operations.
100 // Operand is a 3-bit rounding mode where only RTZ is valid.
102 // Condition code used by select and short forward branch pseudos.
104 // Ordering for atomic pseudos.
106 // Vector policy operand.
108 // Vector SEW operand. Stores in log2(SEW).
110 // Special SEW for mask only instructions. Always 0.
112 // Vector rounding mode for VXRM or FRM.
114 // Vtype operand for XSfmm extension.
116 // XSfmm twiden operand.
119
122
123 // Simm12 or constant pool, global, basicblock, etc.
125
127
128 // Operand is either a register or uimm5, this is used by V extension pseudo
129 // instructions to represent a value that be passed as AVL to either vsetvli
130 // or vsetivli.
132
133 // Operand is either a register or imm, this is used by short forward branch
134 // (SFB) pseudos to enable SFB with branches on reg-reg and reg-imm compares.
136
137 // Operand is a branch opcode, this too is used by SFB pseudos.
139
141};
142} // namespace RISCVOp
143
144// RISCVII - This namespace holds all of the target specific flags that
145// instruction info tracks. All definitions must match RISCVInstrFormats.td.
146namespace RISCVII {
147enum {
177
180
186
189
190 // Is this a _TIED vector pseudo instruction. For these instructions we
191 // shouldn't skip the tied operand when converting to MC instructions.
194
195 // Does this instruction have a SEW operand. It will be the last explicit
196 // operand unless there is a vector policy operand. Used by RVV Pseudos.
199
200 // Does this instruction have a VL operand. It will be the second to last
201 // explicit operand unless there is a vector policy operand. Used by RVV
202 // Pseudos.
205
206 // Does this instruction have a vector policy operand. It will be the last
207 // explicit operand. Used by RVV Pseudos.
210
211 // Is this instruction a vector widening reduction instruction. Used by RVV
212 // Pseudos.
215
216 // Does this instruction care about mask policy. If it is not, the mask policy
217 // could be either agnostic or undisturbed. For example, unmasked, store, and
218 // reduction operations result would not be affected by mask policy, so
219 // compiler has free to select either one.
222
223 // Indicates that the result can be considered sign extended from bit 31. Some
224 // instructions with this flag aren't W instructions, but are either sign
225 // extended from a smaller size, always outputs a small integer, or put zeros
226 // in bits 63:31. Used by the SExtWRemoval pass.
229
232
235
236 // Indicates whether these instructions can partially overlap between source
237 // registers and destination registers according to the vector spec.
238 // 0 -> not a vector pseudo
239 // 1 -> default value for vector pseudos. not widening or narrowing.
240 // 2 -> narrowing case
241 // 3 -> widening case
244
247
250
251 // Indicates the EEW of a vector instruction's destination operand.
252 // 0 -> 1
253 // 1 -> SEW
254 // 2 -> SEW * 2
255 // 3 -> SEW * 4
258
261
262 // 0 -> Don't care about altfmt bit in VTYPE.
263 // 1 -> Is not altfmt.
264 // 2 -> Is altfmt(BF16).
267
268 // XSfmmbase
271
274
277};
278
279// Helper functions to read TSFlags.
280/// \returns the format of the instruction.
281static inline unsigned getFormat(uint64_t TSFlags) {
282 return (TSFlags & InstFormatMask) >> InstFormatShift;
283}
284/// \returns the LMUL for the instruction.
285static inline RISCVVType::VLMUL getLMul(uint64_t TSFlags) {
286 return static_cast<RISCVVType::VLMUL>((TSFlags & VLMulMask) >> VLMulShift);
287}
288/// \returns true if this a _TIED pseudo.
289static inline bool isTiedPseudo(uint64_t TSFlags) {
290 return TSFlags & IsTiedPseudoMask;
291}
292/// \returns true if there is a SEW operand for the instruction.
293static inline bool hasSEWOp(uint64_t TSFlags) {
294 return TSFlags & HasSEWOpMask;
295}
296/// \returns true if there is a VL operand for the instruction.
297static inline bool hasVLOp(uint64_t TSFlags) {
298 return TSFlags & HasVLOpMask;
299}
300/// \returns true if there is a vector policy operand for this instruction.
301static inline bool hasVecPolicyOp(uint64_t TSFlags) {
302 return TSFlags & HasVecPolicyOpMask;
303}
304/// \returns true if it is a vector widening reduction instruction.
305static inline bool isRVVWideningReduction(uint64_t TSFlags) {
306 return TSFlags & IsRVVWideningReductionMask;
307}
308/// \returns true if mask policy is valid for the instruction.
309static inline bool usesMaskPolicy(uint64_t TSFlags) {
310 return TSFlags & UsesMaskPolicyMask;
311}
312
313/// \returns true if there is a rounding mode operand for this instruction
314static inline bool hasRoundModeOp(uint64_t TSFlags) {
315 return TSFlags & HasRoundModeOpMask;
316}
317
319static inline AltFmtType getAltFmtType(uint64_t TSFlags) {
320 return static_cast<AltFmtType>((TSFlags & AltFmtTypeMask) >> AltFmtTypeShift);
321}
322
323/// \returns true if this instruction uses vxrm
324static inline bool usesVXRM(uint64_t TSFlags) { return TSFlags & UsesVXRMMask; }
325
326/// \returns true if the elements in the body are affected by VL,
327/// e.g. vslide1down.vx/vredsum.vs/viota.m
328static inline bool elementsDependOnVL(uint64_t TSFlags) {
329 return TSFlags & ElementsDependOnVLMask;
330}
331
332/// \returns true if the elements in the body are affected by the mask,
333/// e.g. vredsum.vs/viota.m
334static inline bool elementsDependOnMask(uint64_t TSFlags) {
335 return TSFlags & ElementsDependOnMaskMask;
336}
337
338/// \returns true if the instruction may read elements past VL, e.g.
339/// vslidedown/vrgather
340static inline bool readsPastVL(uint64_t TSFlags) {
341 return TSFlags & ReadsPastVLMask;
342}
343
344// XSfmmbase
345static inline bool hasTWidenOp(uint64_t TSFlags) {
346 return TSFlags & HasTWidenOpMask;
347}
348
349static inline bool hasTMOp(uint64_t TSFlags) { return TSFlags & HasTMOpMask; }
350
351static inline bool hasTKOp(uint64_t TSFlags) { return TSFlags & HasTKOpMask; }
352
353static inline unsigned getTWidenOpNum(const MCInstrDesc &Desc) {
354 assert(hasTWidenOp(Desc.TSFlags));
355 return Desc.getNumOperands() - 1;
356}
357
358static inline unsigned getTNOpNum(const MCInstrDesc &Desc) {
359 const uint64_t TSFlags = Desc.TSFlags;
360 assert(hasTWidenOp(TSFlags) && hasVLOp(TSFlags));
361 unsigned Offset = 3;
362 if (hasTKOp(TSFlags))
363 Offset = 4;
364 return Desc.getNumOperands() - Offset;
365}
366
367static inline unsigned getTMOpNum(const MCInstrDesc &Desc) {
368 const uint64_t TSFlags = Desc.TSFlags;
369 assert(hasTWidenOp(TSFlags) && hasTMOp(TSFlags));
370 if (hasTKOp(TSFlags))
371 return Desc.getNumOperands() - 5;
372 // vtzero.t
373 return Desc.getNumOperands() - 4;
374}
375
376static inline unsigned getTKOpNum(const MCInstrDesc &Desc) {
377 [[maybe_unused]] const uint64_t TSFlags = Desc.TSFlags;
378 assert(hasTWidenOp(TSFlags) && hasTKOp(TSFlags));
379 return Desc.getNumOperands() - 3;
380}
381
382static inline unsigned getVLOpNum(const MCInstrDesc &Desc) {
383 const uint64_t TSFlags = Desc.TSFlags;
384 // This method is only called if we expect to have a VL operand, and all
385 // instructions with VL also have SEW.
386 assert(hasSEWOp(TSFlags) && hasVLOp(TSFlags));
387 // In Xsfmmbase, TN is an alias for VL, so here we use the same TSFlags bit.
388 if (hasTWidenOp(TSFlags))
389 return getTNOpNum(Desc);
390 unsigned Offset = 2;
391 if (hasVecPolicyOp(TSFlags))
392 Offset = 3;
393 return Desc.getNumOperands() - Offset;
394}
395
396static inline MCRegister
398 // For Zicfilp, PseudoTAIL should be expanded to a software guarded branch.
399 // It means to use t2(x7) as rs1 of JALR to expand PseudoTAIL.
400 return FeatureBits[RISCV::FeatureStdExtZicfilp] ? RISCV::X7 : RISCV::X6;
401}
402
403static inline unsigned getSEWOpNum(const MCInstrDesc &Desc) {
404 const uint64_t TSFlags = Desc.TSFlags;
405 assert(hasSEWOp(TSFlags));
406 unsigned Offset = 1;
407 if (hasVecPolicyOp(TSFlags) || hasTWidenOp(TSFlags))
408 Offset = 2;
409 return Desc.getNumOperands() - Offset;
410}
411
412static inline unsigned getVecPolicyOpNum(const MCInstrDesc &Desc) {
413 assert(hasVecPolicyOp(Desc.TSFlags));
414 return Desc.getNumOperands() - 1;
415}
416
417/// \returns the index to the rounding mode immediate value if any, otherwise
418/// returns -1.
419static inline int getFRMOpNum(const MCInstrDesc &Desc) {
420 const uint64_t TSFlags = Desc.TSFlags;
421 if (!hasRoundModeOp(TSFlags) || usesVXRM(TSFlags))
422 return -1;
423
424 int Idx = RISCV::getNamedOperandIdx(Desc.getOpcode(), RISCV::OpName::rm);
425 assert(Idx >= 0 && "No rm operand?");
426 assert(Desc.operands()[Idx].OperandType == RISCVOp::OPERAND_VEC_RM &&
427 "Operand has wrong type");
428
429 return Idx;
430}
431
432/// \returns the index to the rounding mode immediate value if any, otherwise
433/// returns -1.
434static inline int getVXRMOpNum(const MCInstrDesc &Desc) {
435 const uint64_t TSFlags = Desc.TSFlags;
436 if (!hasRoundModeOp(TSFlags) || !usesVXRM(TSFlags))
437 return -1;
438
439 int Idx = RISCV::getNamedOperandIdx(Desc.getOpcode(), RISCV::OpName::rm);
440 assert(Idx >= 0 && "No rm operand?");
441 assert(Desc.operands()[Idx].OperandType == RISCVOp::OPERAND_VEC_RM &&
442 "Operand has wrong type");
443
444 return Idx;
445}
446
447// Is the first def operand tied to the first use operand. This is true for
448// vector pseudo instructions that have a merge operand for tail/mask
449// undisturbed. It's also true for vector FMA instructions where one of the
450// operands is also the destination register.
451static inline bool isFirstDefTiedToFirstUse(const MCInstrDesc &Desc) {
452 return Desc.getNumDefs() < Desc.getNumOperands() &&
453 Desc.getOperandConstraint(Desc.getNumDefs(), MCOI::TIED_TO) == 0;
454}
455
456// RISC-V Specific Machine Operand Flags
457enum {
460 MO_LO = 3,
461 MO_HI = 4,
474
475 // Used to differentiate between target-specific "direct" flags and "bitmask"
476 // flags. A machine operand can only have one "direct" flag, but can have
477 // multiple "bitmask" flags.
479};
480} // namespace RISCVII
481
482// Describes the predecessor/successor bits used in the FENCE instruction.
485 I = 8,
486 O = 4,
487 R = 2,
488 W = 1
489};
490}
491
492// Describes the supported floating point rounding mode encodings.
493namespace RISCVFPRndMode {
495 RNE = 0,
496 RTZ = 1,
497 RDN = 2,
498 RUP = 3,
499 RMM = 4,
500 DYN = 7,
502};
503
505 switch (RndMode) {
506 default:
507 llvm_unreachable("Unknown floating point rounding mode");
509 return "rne";
511 return "rtz";
513 return "rdn";
515 return "rup";
517 return "rmm";
519 return "dyn";
520 }
521}
522
533
534inline static bool isValidRoundingMode(unsigned Mode) {
535 switch (Mode) {
536 default:
537 return false;
544 return true;
545 }
546}
547} // namespace RISCVFPRndMode
548
549namespace RISCVVXRndMode {
551 RNU = 0,
552 RNE = 1,
553 RDN = 2,
554 ROD = 3,
556};
557
559 switch (RndMode) {
560 default:
561 llvm_unreachable("Unknown vector fixed-point rounding mode");
563 return "rnu";
565 return "rne";
567 return "rdn";
569 return "rod";
570 }
571}
572
581
582inline static bool isValidRoundingMode(unsigned Mode) {
583 switch (Mode) {
584 default:
585 return false;
590 return true;
591 }
592}
593} // namespace RISCVVXRndMode
594
597 NX = 0x01, // Inexact
598 UF = 0x02, // Underflow
599 OF = 0x04, // Overflow
600 DZ = 0x08, // Divide by zero
601 NV = 0x10, // Invalid operation
602 ALL = 0x1F // Mask for all accrued exception flags
603};
604}
605
606//===----------------------------------------------------------------------===//
607// Floating-point Immediates
608//
609
610namespace RISCVLoadFPImm {
611float getFPImm(unsigned Imm);
612
613/// getLoadFPImm - Return a 5-bit binary encoding of the floating-point
614/// immediate value. If the value cannot be represented as a 5-bit binary
615/// encoding, then return -1.
616int getLoadFPImm(APFloat FPImm);
617} // namespace RISCVLoadFPImm
618
619namespace RISCVSysReg {
620struct SysReg {
621 const char Name[32];
622 unsigned Encoding;
623 // FIXME: add these additional fields when needed.
624 // Privilege Access: Read, Write, Read-Only.
625 // unsigned ReadWrite;
626 // Privilege Mode: User, System or Machine.
627 // unsigned Mode;
628 // Check field name.
629 // unsigned Extra;
630 // Register number without the privilege bits.
631 // unsigned Number;
636
637 bool haveRequiredFeatures(const FeatureBitset &ActiveFeatures) const {
638 // Not in 32-bit mode.
639 if (IsRV32Only && ActiveFeatures[RISCV::Feature64Bit])
640 return false;
641 // No required feature associated with the system register.
642 if (FeaturesRequired.none())
643 return true;
644 return (FeaturesRequired & ActiveFeatures) == FeaturesRequired;
645 }
646};
647
648#define GET_SysRegEncodings_DECL
649#define GET_SysRegsList_DECL
650#include "RISCVGenSearchableTables.inc"
651} // end namespace RISCVSysReg
652
653namespace RISCVInsnOpcode {
655 char Name[10];
657};
658
659#define GET_RISCVOpcodesList_DECL
660#include "RISCVGenSearchableTables.inc"
661} // end namespace RISCVInsnOpcode
662
663namespace RISCVABI {
664
676
677// Returns the target ABI, or else a StringError if the requested ABIName is
678// not supported for the given TT and FeatureBits combination.
679ABI computeTargetABI(const Triple &TT, const FeatureBitset &FeatureBits,
680 StringRef ABIName);
681
682ABI getTargetABI(StringRef ABIName);
683
684// Returns the register used to hold the stack pointer after realignment.
686
687// Returns the register holding shadow call stack pointer.
689
690} // namespace RISCVABI
691
692namespace RISCVFeatures {
693
694// Validates if the given combination of features are valid for the target
695// triple. Exits with report_fatal_error if not.
696void validate(const Triple &TT, const FeatureBitset &FeatureBits);
697
699parseFeatureBits(bool IsRV64, const FeatureBitset &FeatureBits);
700
701} // namespace RISCVFeatures
702
703namespace RISCVRVC {
704bool compress(MCInst &OutInst, const MCInst &MI, const MCSubtargetInfo &STI);
705bool uncompress(MCInst &OutInst, const MCInst &MI, const MCSubtargetInfo &STI);
706} // namespace RISCVRVC
707
708namespace RISCVZC {
725
726inline unsigned encodeRegList(MCRegister EndReg, bool IsRVE = false) {
727 assert((!IsRVE || EndReg <= RISCV::X9) && "Invalid Rlist for RV32E");
728 switch (EndReg.id()) {
729 case RISCV::X1:
730 return RLISTENCODE::RA;
731 case RISCV::X8:
732 return RLISTENCODE::RA_S0;
733 case RISCV::X9:
735 case RISCV::X18:
737 case RISCV::X19:
739 case RISCV::X20:
741 case RISCV::X21:
743 case RISCV::X22:
745 case RISCV::X23:
747 case RISCV::X24:
749 case RISCV::X25:
751 case RISCV::X27:
753 default:
754 llvm_unreachable("Undefined input.");
755 }
756}
757
758inline static unsigned encodeRegListNumRegs(unsigned NumRegs) {
759 assert(NumRegs > 0 && NumRegs < 14 && NumRegs != 12 &&
760 "Unexpected number of registers");
761 if (NumRegs == 13)
763
764 return RLISTENCODE::RA + (NumRegs - 1);
765}
766
767inline static unsigned getStackAdjBase(unsigned RlistVal, bool IsRV64) {
768 assert(RlistVal >= RLISTENCODE::RA && RlistVal <= RLISTENCODE::RA_S0_S11 &&
769 "Invalid Rlist");
770 unsigned NumRegs = (RlistVal - RLISTENCODE::RA) + 1;
771 // s10 and s11 are saved together.
772 if (RlistVal == RLISTENCODE::RA_S0_S11)
773 ++NumRegs;
774
775 unsigned RegSize = IsRV64 ? 8 : 4;
776 return alignTo(NumRegs * RegSize, 16);
777}
778
779void printRegList(unsigned RlistEncode, raw_ostream &OS);
780} // namespace RISCVZC
781
782namespace RISCVVInversePseudosTable {
790
791#define GET_RISCVVInversePseudosTable_DECL
792#include "RISCVGenSearchableTables.inc"
793
794inline const PseudoInfo *getBaseInfo(unsigned BaseInstr, uint8_t VLMul,
795 uint8_t SEW, bool IsAltFmt = false) {
796 return getBaseInfoImpl(BaseInstr, VLMul, SEW, IsAltFmt);
797}
798} // namespace RISCVVInversePseudosTable
799
800namespace RISCV {
810
820
829
839
848
856
865
873
874#define GET_RISCVVSSEGTable_DECL
875#define GET_RISCVVLSEGTable_DECL
876#define GET_RISCVVLXSEGTable_DECL
877#define GET_RISCVVSXSEGTable_DECL
878#define GET_RISCVVLETable_DECL
879#define GET_RISCVVSETable_DECL
880#define GET_RISCVVLXTable_DECL
881#define GET_RISCVVSXTable_DECL
882#define GET_RISCVNDSVLNTable_DECL
883#include "RISCVGenSearchableTables.inc"
884} // namespace RISCV
885
886} // namespace llvm
887
888#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.
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
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)
This is an optimization pass for GlobalISel generic memory operations.
@ Offset
Definition DWP.cpp:532
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