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