RISC-V Instruction Set Online Reference

Instructions · Registers · CSRs · ABI

RVOPcode is a developer-focused RISC-V instruction set online reference. Search by mnemonic, extension, function, scenario, register name, CSR name, or topic to quickly find instruction syntax, encodings, examples, pseudo-instruction expansions, ABI rules, and CSR field details.

Try: addi·jalr·mstatus·ra·call·I-type·function call
How To Search

Search directly by mnemonic, ABI name, CSR name, or topic keyword.

InstructionsRegistersCSRTopics↑ ↓ NavigateEnter Open

Recent Searches

No search history yet

Core Entry Points

Browse By Multiple Dimensions

By Format
AMOAMO-typeB-typeCC-typeC2 (Zcmp CMPP)CA formatCA-formatCB-formatCBO MISC-MEM fixed fieldsCI formatCI-formatCJ formatCL-formatCR formatCS-formatCSS-formatI-typeI-type (HINT)I-type (OP-IMM)I-type (OP-IMM-32)I-type (OP-IMM-32, RV64)J-typeOP-32 (R-type)OP-FPOP-FP conversion fieldsOP-FP move fieldsOP-IMM (I-type)OP-VOP-V (OPFVF)OP-V (OPFVV)OP-V (OPIVV)OP-V / OPFVFOP-V / OPFVVOP-V / OPFVV VFUNARY1OP-V / OPIVIOP-V / OPIVVOP-V / OPIVXOP-V OPIVV (funct6=010101, funct3=000)OP-V OPIVX (funct6=010101, funct3=100)OP-V OPMVV (funct6=010010, vs1=01001, funct3=010)OP-V VXUNARY0 (funct3=010)OP-V vector arithmetic formatOP-V vector configuration (immediate AVL)OP-V vector configuration (register vtype)OP-V vector-configuration formatOP-V vector-immediate formOP-V vector-scalar formOP-V vector-vector formOP-VE OPMVV (funct6=101000, vm=1, vs1=10001, funct3=010)OP-VE OPMVV (funct6=101100, vm=1, funct3=010)OPFVFOPFVVOPIVIOPIVI (OP-V)OPIVVOPIVV (OP-V)OPIVXOPIVX (OP-V)OPMVVOPMVV (OP-V)OPMVXR-typeR-type (OP with bs in bits 31:30)R-type HINT (ADD x0, x0, x2)R-type HINT (ADD x0, x0, x3)R-type HINT (ADD x0, x0, x4)R-type HINT (ADD x0, x0, x5)R4-typeS-typeSYSTEM (MOP.R.28)SYSTEM (MOP.RR.7)SYSTEM (R-type encoding)SYSTEM R-typeSYSTEM R-type fieldsU-typeU-type (AUIPC HINT)V-typeV-type (OP-V / OPFVF)V-type (OP-V / OPFVV VFUNARY0)V-type (OP-V / OPFVV)V-type (OP-V / OPIVI)V-type (OP-V / OPIVV)V-type (OP-V / OPIVX)V-type (OP-VE / OPMVV)Vector OP-V (OPIVI)Vector OP-V (OPIVV)Vector OP-V (OPIVX)Vector OP-VE (OPMVV)Zimop MOP.RR SYSTEM fields
By Scenario
Address & PointerBasic ArithmeticRegister OperationsImmediates & ConstantsBranch & JumpFunction Call & ReturnData LoadingData StoringStack & FrameComparison & DetectionType ConversionNumerical ComputingBit Operations & MasksDebug & MonitoringSystem & PrivilegeExecution Environment CallNetwork & Byte OrderArrays & Memory AccessPipeline padding and code alignmentReplace disabled instructions (nopout)Placeholder for performance profilingBit-field CombinationMultiplication & DivisionBit OperationsLogical OperationsMemory OrderingDevice & IOConcurrent SynchronizationRV64-Specific OperationsUnsigned Data LoadAtomic & SyncCSR AccessSelf-modifying CodeJIT CompilationDynamic Code GenerationXLEN-bit integer multiplicationSigned product high halfMulti-word signed multiplicationUnsigned product high halfRV64 low-32-bit integer multiplicationRV64 Operations32-bit Atomic OperationsSigned ComparisonsBounded UpdatesUnsigned ComparisonsUnsigned BoundsZcmop MOPExtension-definedShift & RotateInteger ComparisonInteger Min/MaxZero-Byte DetectionCrypto & SecurityBit ManipulationResource ManagementSystem & PrivilegedExtension CompatibilityConcurrency & Multi-corePower OptimizationFloating-point arithmeticNumerical computingFloating-Point ConditionsFused Floating PointFloating-Point CompareFP bit constructionNaN payload preservationraw encoding debuggingFP bit inspectionSign OperationsFloating-Point Bit ManipulationFP Type InspectionNaN DetectionSpecial Value HandlingMath LibraryDouble-precision numerical computingGeometryScientific ComputingFloating-Point Format ConversionFloating Point Basicdouble bit constructionRV64 raw encoding debugdouble bit inspectionFloating-Point MemoryData Load/StoreInteger-to-Floating-Point ConversionFloating-Point-to-Integer ConversionFloating-Point Bit MoveDebugging Bit PatternsJavaScript EnginesWebAssemblyModular ArithmeticFloating-Point ConstantsRV32 Double Data MovementFloating-Point RoundingNumeric Format HandlingFloating-Point Memory AccessCompressed & Code SizeDeep learning inferenceBF16 model deploymentMemory bandwidth reductionBF16 type promotionBF16↔FP32 interopLoops & IterationCache & HintsIndirect Jump & ReturnStack AccessShift OperationsMemory StoreStack-frame register savesSigned integer scalingVector OperationsCompressed integer arithmeticCompressed integer bit operationsSigned byte-value extensionSigned halfword-value extensionCompact halfword storesStack & FunctionsSecurity MechanismsVector AccelerationVector Integer ArithmeticWidening OperationsVectorized LoopsFixed-point averagingVector data processingRVV masked executionMulti-precision ArithmeticBig Integer AddArray Opskeeping selected bits, clearing bit fields, or combining per-element bit masksRVV per-element bit operationsSparse CompressionStream CompactionVector Integer ScalingBatch QuotientsDSPVector Float OpsNumeric ClassificationNaN / Infinity TestsVectorized Data CleaningInteger data to FP vectorsMixed-type vector mathVectorized numeric preparationFP results to integer vectorsTruncating numeric conversionfrm-rounded conversionVector normalizationScalar scalingNumeric computingLane-wise FP divisionConditional LoopMask TraversalMatrix OpsPolynomial EvalMatrix MultiplySignal ProcessingConstant OffsetPolynomial EvaluationScalar threshold clippingLane-wise FP maximumVector numeric comparisonUpper-threshold selectionConditional AssignmentTernary OperatorLane-wise FP minimumLower-threshold selectionSeries SummationAlternating SignScalingGain AdjustmentVector FP MultiplyElement-wise MultiplyReduction ResultScalar-Vector InterfaceReduction InitScalar to Element 0Vector InitConstant BroadcastCompress after higher-precision FP computationNarrow FP vectors before storageCompress wide signed integers into narrower FP formatMixed integer/FP vector processingCompress wide unsigned integers into narrower FP formatVector numeric format conversionMulti-step FP narrowingIntermediate step to avoid double roundingTruncate wide FP to narrower signed integersVectorized format conversionFormat compaction needing truncation semanticsWide FP to narrower unsigned integersStore wide FP results as narrower signed integersConversion before storage or integer post-processingStore wide FP results as narrower unsigned integersVectorized format compactionAlternating Add/SubReciprocal scalingDivision OptimizationNewton-RaphsonVector ReductionExtremumMinimumVector SumDot ProductHigh-Perf ReductionVector NormalizationConstant Minus VectorControl vector signs from a scalarVector copysignLane-wise sign copyLane-wise sign-bit copyVector copysign constructionSign-bit teaching examplesControl vector signs from an inverted scalar signBulk result sign selectionSign-bit inversionLane-wise inverted sign injectionVector negative copysign constructionConditionally flip vector signs from a scalarSign-bit XORVector absolute-value / negation constructionLane-wise conditional sign flipLane-wise square rootVector normsDifferencesHigh-Precision AccumMixed Precisionbinary32 vectors promoted to binary64mixed-precision FP compute entryhigher-precision processing after wideninginteger vectors promoted to binary64 FPmixed-precision vector compute entryFP paths preserving 32-bit integer precisionFP results to 64-bit integer vectorsmixed-type vector conversionnumeric paths needing double-width integer resultsHigh-Precision MatrixMixed-Precision MLHigh-Precision SumWidening SumHigh-Precision DifferenceSequence GenLoop CounterGather IndexSparse IndexingCompress HelperConditional GatherContiguous Array ReadVectorized Memory AccessVectorized String ScanContiguous Memory ProbingVector Loads That Can Trim vlRestore packed mask dataVector mask save/restoreMask spill/fillOrdered indirect readsDevice or side-effecting address spacesSparse table readsStructure field accessMatrix row or column stride accessNon-contiguous vector readsSparse data readsGather access without ordering needsIndirect array loadsConvolutionMatrix/TensorMulti-Precision AddBigIntCarry PropagationScale-AccumulateData ClippingThresholdingMask WideningPredicate mask generationFP condition testingNaN checksVectorized conditional executionMulti-Precision SubLoop TerminationData-Dependent ExitConditional ExecutionRange CheckPredicate GenerationGeneral MultiplyFixed-PointFractionalElement 0 SetupVector Constant SetupCopy vector-register body elementsVector initializationInteger scalar broadcastRead vector element 0Extract a scalar vector resultCompiler register shuffleVector register group rearrangementComplete vector-register group copyFixed-point result narrowingVector DSP scaled outputWide-to-narrow conversion that needs a saturation flagFixed-point scaled and rounded outputVector integer product subtractionDestructive SEW-width multiply-subtractVector-scalar integer product subtractionFixed-Point ScalingPrecision Reductionsetting selected bits, combining bit fields, or merging per-element data bit patternsLoop ConditionMask DensityGlobal AggregateNormalizationConditionVector ModuloCyclic IndexingTable LookupReorderCompress/DecompressLarge Table LookupSparse DataSymmetric RangeComplementContiguous Array WriteStripmining LoopVector LengthContext SwitchVector State RestoreVector Integer ExtensionEEW-to-SEW extensionV standard vector extensionData ShiftShift RegisterPower-of-2 MultiplySave packed mask dataMask-state save during context switchingFixed-point DSP fractional multiplyAudio and signal-processing kernelsVector fixed-point code that needs a saturation flagOrdered indirect writesSparse table updatesSigned ShiftsBitfield OpsNon-contiguous vector writesFixed-point scalingVector shiftsDSP data pathsSparse data writesScatter access without ordering needsIndirect array storesInteger MultiplyMulti-Precision AccumulationMulti-Precision ArithmeticVector sumDot productStatistical aggregationUnsigned widening sumVector reductionSigned Widening SubtractionUnsigned Widening Operationstoggling selected bits, combining parity patterns, or building per-element difference masksMachine LearningPredicate condition compositionMask logical family comparisonMask construction before masked executionPerformanceData ProtectionKey ScheduleHash AlgorithmsChinese National Cryptobyte-local bit permutationper-byte bit reversalForward-edge CFIIndirect call/jump markingSecurity hardeningRegister Bit InterleaveRegister LookupM-mode handler returnFirmware/SEE returnOS kernel exception/interrupt returnIdle loop power savingLow-power waitingTLB sync after page table modFlush after munmap/mprotectAddress space switchDebugger returnHardware breakpoint resumeVirtualization memory managementG-stage page-table syncVMID-scoped fenceVS-stage page-table syncASID-scoped fenceHypervisor device emulationGuest memory accessVirtual-machine loadHypervisor Device EmulationGuest Memory AccessVirtualized Instruction SimulationOS InterfaceMemory ManagementTranslation InvalidationTranslation Cache InvalidationSvinval SequenceSvinval sequenceG-stage invalidationVirtualization TLB shootdownVS-stage invalidationCode Optimization

Instruction of the Day

Register Quick Reference

RV32 / RV64 Compare
View All →
RegisterABIRoleSaved by
x0zeroZero constantN/A
x1raFunction return addressCaller
x2spStack pointerCallee
x3gpGlobal pointer; unallocatable and not modified by normal procedures.N/A
x4tpThread pointer for accessing thread-local storage (TLS); ordinary procedures should not modify it.N/A
x5t0Temporary / alternate link registerCaller
x10a0Argument / Return valueCaller
x11a1Argument / Return valueCaller