🔬This is a nightly-only experimental API. (
riscv_ext_intrinsics
#114544)Available on RISC-V RV64 only.
Expand description
Platform-specific intrinsics for the riscv64
platform.
See the module documentation for more details.
Functions
- add8ExperimentalAdds packed 8-bit signed numbers, discarding overflow bits
- add16ExperimentalAdds packed 16-bit signed numbers, discarding overflow bits
- AES final round decryption instruction for RV64.
- AES middle round decryption instruction for RV64.
- AES final round encryption instruction for RV64.
- AES middle round encryption instruction for RV64.
- This instruction accelerates the inverse MixColumns step of the AES Block Cipher, and is used to aid creation of the decryption KeySchedule.
- This instruction implements part of the KeySchedule operation for the AES Block cipher involving the SBox operation.
- This instruction implements part of the KeySchedule operation for the AES Block cipher.
- Carry-less multiply (low-part)
- Carry-less multiply (high-part)
- Carry-less multiply (reversed)
- clrs8ExperimentalCount the number of redundant sign bits of the packed 8-bit elements
- clrs16ExperimentalCount the number of redundant sign bits of the packed 16-bit elements
- clrs32ExperimentalCount the number of redundant sign bits of the packed 32-bit elements
- clz8ExperimentalCount the number of leading zero bits of the packed 8-bit elements
- clz16ExperimentalCount the number of leading zero bits of the packed 16-bit elements
- clz32ExperimentalCount the number of leading zero bits of the packed 32-bit elements
- cmpeq8ExperimentalCompare equality for packed 8-bit elements
- cmpeq16ExperimentalCompare equality for packed 16-bit elements
- cras16ExperimentalCross adds and subtracts packed 16-bit signed numbers, discarding overflow bits
- crsa16ExperimentalCross subtracts and adds packed 16-bit signed numbers, discarding overflow bits
- fence_i⚠ExperimentalGenerates the
FENCE.I
instruction - frcsrExperimentalReads the floating-point control and status register
fcsr
- frflagsExperimentalReads the floating-point accrued exception flags register
fflags
- frrmExperimentalReads the floating-point rounding mode register
frm
- fscsrExperimentalSwaps the floating-point control and status register
fcsr
- fsflagsExperimentalSwaps the floating-point accrued exception flags register
fflags
- fsrmExperimentalSwaps the floating-point rounding mode register
frm
- hfence_gvma⚠ExperimentalHypervisor memory management fence for guest physical address and virtual machine
- hfence_gvma_all⚠ExperimentalHypervisor memory management fence for all virtual machines and guest physical addresses
- hfence_gvma_gaddr⚠ExperimentalHypervisor memory management fence for guest physical address
- hfence_gvma_vmid⚠ExperimentalHypervisor memory management fence for given virtual machine
- hfence_vvma⚠ExperimentalHypervisor memory management fence for given guest virtual address and guest address space
- hfence_vvma_all⚠ExperimentalHypervisor memory management fence for all guest address spaces and guest virtual addresses
- hfence_vvma_asid⚠ExperimentalHypervisor memory management fence for given guest address space
- hfence_vvma_vaddr⚠ExperimentalHypervisor memory management fence for given guest virtual address
- hinval_gvma⚠ExperimentalInvalidate hypervisor translation cache for guest physical address and virtual machine
- hinval_gvma_all⚠ExperimentalInvalidate hypervisor translation cache for all virtual machines and guest physical addresses
- hinval_gvma_gaddr⚠ExperimentalInvalidate hypervisor translation cache for guest physical address
- hinval_gvma_vmid⚠ExperimentalInvalidate hypervisor translation cache for given virtual machine
- hinval_vvma⚠ExperimentalInvalidate hypervisor translation cache for given guest virtual address and guest address space
- hinval_vvma_all⚠ExperimentalInvalidate hypervisor translation cache for all guest address spaces and guest virtual addresses
- hinval_vvma_asid⚠ExperimentalInvalidate hypervisor translation cache for given guest address space
- hinval_vvma_vaddr⚠ExperimentalInvalidate hypervisor translation cache for given guest virtual address
- hlv_b⚠ExperimentalLoads virtual machine memory by signed byte integer
- hlv_bu⚠ExperimentalLoads virtual machine memory by unsigned byte integer
- hlv_d⚠ExperimentalLoads virtual machine memory by double integer
- hlv_h⚠ExperimentalLoads virtual machine memory by signed half integer
- hlv_hu⚠ExperimentalLoads virtual machine memory by unsigned half integer
- hlv_w⚠ExperimentalLoads virtual machine memory by signed word integer
- hlv_wu⚠ExperimentalLoads virtual machine memory by unsigned word integer
- hlvx_hu⚠ExperimentalAccesses virtual machine instruction by unsigned half integer
- hlvx_wu⚠ExperimentalAccesses virtual machine instruction by unsigned word integer
- hsv_b⚠ExperimentalStores virtual machine memory by byte integer
- hsv_d⚠ExperimentalStores virtual machine memory by double integer
- hsv_h⚠ExperimentalStores virtual machine memory by half integer
- hsv_w⚠ExperimentalStores virtual machine memory by word integer
- kabs8ExperimentalCompute the absolute value of packed 8-bit signed integers
- kabs16ExperimentalCompute the absolute value of packed 16-bit signed integers
- kadd8ExperimentalAdds packed 8-bit signed numbers, saturating at the numeric bounds
- kadd16ExperimentalAdds packed 16-bit signed numbers, saturating at the numeric bounds
- kaddhExperimentalAdds signed lower 16-bit content of two registers with Q15 saturation
- kcras16ExperimentalCross adds and subtracts packed 16-bit signed numbers, saturating at the numeric bounds
- kcrsa16ExperimentalCross subtracts and adds packed 16-bit signed numbers, saturating at the numeric bounds
- ksll8ExperimentalLogical left shift packed 8-bit elements, saturating at the numeric bounds
- ksll16ExperimentalLogical left shift packed 16-bit elements, saturating at the numeric bounds
- kslra8ExperimentalLogical saturating left then arithmetic right shift packed 8-bit elements
- kslra8uExperimentalLogical saturating left then arithmetic right shift packed 8-bit elements
- kslra16ExperimentalLogical saturating left then arithmetic right shift packed 16-bit elements
- kslra16uExperimentalLogical saturating left then arithmetic right shift packed 16-bit elements
- kstas16ExperimentalStraight adds and subtracts packed 16-bit signed numbers, saturating at the numeric bounds
- kstsa16ExperimentalStraight subtracts and adds packed 16-bit signed numbers, saturating at the numeric bounds
- ksub8ExperimentalSubtracts packed 8-bit signed numbers, saturating at the numeric bounds
- ksub16ExperimentalSubtracts packed 16-bit signed numbers, saturating at the numeric bounds
- ksubhExperimentalSubtracts signed lower 16-bit content of two registers with Q15 saturation
- nopExperimentalGenerates the
NOP
instruction - Bitwise OR-Combine, byte granule
- pauseExperimentalGenerates the
PAUSE
instruction - pbsadExperimentalCalculate the sum of absolute difference of unsigned 8-bit data elements
- pbsadaExperimentalCalculate and accumulate the sum of absolute difference of unsigned 8-bit data elements
- pkbt16ExperimentalPack two 16-bit data from bottom and top half from 32-bit chunks
- pktb16ExperimentalPack two 16-bit data from top and bottom half from 32-bit chunks
- radd8ExperimentalHalves the sum of packed 8-bit signed numbers, dropping least bits
- radd16ExperimentalHalves the sum of packed 16-bit signed numbers, dropping least bits
- rcras16ExperimentalCross halves of adds and subtracts packed 16-bit signed numbers, dropping least bits
- rcrsa16ExperimentalCross halves of subtracts and adds packed 16-bit signed numbers, dropping least bits
- rstas16ExperimentalStraight halves of adds and subtracts packed 16-bit signed numbers, dropping least bits
- rstsa16ExperimentalStraight halves of subtracts and adds packed 16-bit signed numbers, dropping least bits
- rsub8ExperimentalHalves the subtraction result of packed 8-bit signed numbers, dropping least bits
- rsub16ExperimentalHalves the subtraction result of packed 16-bit signed numbers, dropping least bits
- scmple8ExperimentalCompare whether 8-bit packed signed integers are less than or equal to the others
- scmple16ExperimentalCompare whether 16-bit packed signed integers are less than or equal to the others
- scmplt8ExperimentalCompare whether 8-bit packed signed integers are less than the others
- scmplt16ExperimentalCompare whether 16-bit packed signed integers are less than the others
- sfence_inval_ir⚠ExperimentalGenerates the
SFENCE.INVAL.IR
instruction - sfence_vma⚠ExperimentalSupervisor memory management fence for given virtual address and address space
- sfence_vma_all⚠ExperimentalSupervisor memory management fence for all address spaces and virtual addresses
- sfence_vma_asid⚠ExperimentalSupervisor memory management fence for given address space
- sfence_vma_vaddr⚠ExperimentalSupervisor memory management fence for given virtual address
- sfence_w_inval⚠ExperimentalGenerates the
SFENCE.W.INVAL
instruction - Implements the Sigma0 transformation function as used in the SHA2-256 hash function [49] (Section 4.1.2).
- Implements the Sigma1 transformation function as used in the SHA2-256 hash function [49] (Section 4.1.2).
- Implements the Sum0 transformation function as used in the SHA2-256 hash function [49] (Section 4.1.2).
- Implements the Sum1 transformation function as used in the SHA2-256 hash function [49] (Section 4.1.2).
- Implements the Sigma0 transformation function as used in the SHA2-512 hash function [49] (Section 4.1.3).
- Implements the Sigma1 transformation function as used in the SHA2-512 hash function [49] (Section 4.1.3).
- Implements the Sum0 transformation function as used in the SHA2-512 hash function [49] (Section 4.1.3).
- Implements the Sum1 transformation function as used in the SHA2-512 hash function [49] (Section 4.1.3).
- sinval_vma⚠ExperimentalInvalidate supervisor translation cache for given virtual address and address space
- sinval_vma_all⚠ExperimentalInvalidate supervisor translation cache for all address spaces and virtual addresses
- sinval_vma_asid⚠ExperimentalInvalidate supervisor translation cache for given address space
- sinval_vma_vaddr⚠ExperimentalInvalidate supervisor translation cache for given virtual address
- sll8ExperimentalLogical left shift packed 8-bit elements, discarding overflow bits
- sll16ExperimentalLogical left shift packed 16-bit elements, discarding overflow bits
- Implements the P0 transformation function as used in the SM3 hash function [4, 30].
- Implements the P1 transformation function as used in the SM3 hash function [4, 30].
- Accelerates the block encrypt/decrypt operation of the SM4 block cipher [5, 31].
- Accelerates the Key Schedule operation of the SM4 block cipher [5, 31] with
bs=0
. - smaqaExperimentalMultiply signed 8-bit elements and add 16-bit elements on results for packed 32-bit chunks
- smaqasuExperimentalMultiply signed to unsigned 8-bit and add 16-bit elements on results for packed 32-bit chunks
- smax8ExperimentalGet maximum values from 8-bit packed signed integers
- smax16ExperimentalGet maximum values from 16-bit packed signed integers
- smin8ExperimentalGet minimum values from 8-bit packed signed integers
- smin16ExperimentalGet minimum values from 16-bit packed signed integers
- sra8ExperimentalArithmetic right shift packed 8-bit elements without rounding up
- sra8uExperimentalArithmetic right shift packed 8-bit elements with rounding up
- sra16ExperimentalArithmetic right shift packed 16-bit elements without rounding up
- sra16uExperimentalArithmetic right shift packed 16-bit elements with rounding up
- srl8ExperimentalLogical right shift packed 8-bit elements without rounding up
- srl8uExperimentalLogical right shift packed 8-bit elements with rounding up
- srl16ExperimentalLogical right shift packed 16-bit elements without rounding up
- srl16uExperimentalLogical right shift packed 16-bit elements with rounding up
- stas16ExperimentalStraight adds and subtracts packed 16-bit signed numbers, discarding overflow bits
- stsa16ExperimentalStraight subtracts and adds packed 16-bit signed numbers, discarding overflow bits
- sub8ExperimentalSubtracts packed 8-bit signed numbers, discarding overflow bits
- sub16ExperimentalSubtracts packed 16-bit signed numbers, discarding overflow bits
- sunpkd810ExperimentalUnpack first and zeroth into two 16-bit signed halfwords in each 32-bit chunk
- sunpkd820ExperimentalUnpack second and zeroth into two 16-bit signed halfwords in each 32-bit chunk
- sunpkd830ExperimentalUnpack third and zeroth into two 16-bit signed halfwords in each 32-bit chunk
- sunpkd831ExperimentalUnpack third and first into two 16-bit signed halfwords in each 32-bit chunk
- sunpkd832ExperimentalUnpack third and second into two 16-bit signed halfwords in each 32-bit chunk
- swap8ExperimentalSwap the 8-bit bytes within each 16-bit halfword of a register.
- swap16ExperimentalSwap the 16-bit halfwords within each 32-bit word of a register
- ucmple8ExperimentalCompare whether 8-bit packed unsigned integers are less than or equal to the others
- ucmple16ExperimentalCompare whether 16-bit packed unsigned integers are less than or equal to the others
- ucmplt8ExperimentalCompare whether 8-bit packed unsigned integers are less than the others
- ucmplt16ExperimentalCompare whether 16-bit packed unsigned integers are less than the others
- ukadd8ExperimentalAdds packed 8-bit unsigned numbers, saturating at the numeric bounds
- ukadd16ExperimentalAdds packed 16-bit unsigned numbers, saturating at the numeric bounds
- ukaddhExperimentalAdds signed lower 16-bit content of two registers with U16 saturation
- ukcras16ExperimentalCross adds and subtracts packed 16-bit unsigned numbers, saturating at the numeric bounds
- ukcrsa16ExperimentalCross subtracts and adds packed 16-bit unsigned numbers, saturating at the numeric bounds
- ukstas16ExperimentalStraight adds and subtracts packed 16-bit unsigned numbers, saturating at the numeric bounds
- ukstsa16ExperimentalStraight subtracts and adds packed 16-bit unsigned numbers, saturating at the numeric bounds
- uksub8ExperimentalSubtracts packed 8-bit unsigned numbers, saturating at the numeric bounds
- uksub16ExperimentalSubtracts packed 16-bit unsigned numbers, saturating at the numeric bounds
- uksubhExperimentalSubtracts signed lower 16-bit content of two registers with U16 saturation
- umaqaExperimentalMultiply unsigned 8-bit elements and add 16-bit elements on results for packed 32-bit chunks
- umax8ExperimentalGet maximum values from 8-bit packed unsigned integers
- umax16ExperimentalGet maximum values from 16-bit packed unsigned integers
- umin8ExperimentalGet minimum values from 8-bit packed unsigned integers
- umin16ExperimentalGet minimum values from 16-bit packed unsigned integers
- uradd8ExperimentalHalves the sum of packed 8-bit unsigned numbers, dropping least bits
- uradd16ExperimentalHalves the sum of packed 16-bit unsigned numbers, dropping least bits
- urcras16ExperimentalCross halves of adds and subtracts packed 16-bit unsigned numbers, dropping least bits
- urcrsa16ExperimentalCross halves of subtracts and adds packed 16-bit unsigned numbers, dropping least bits
- urstas16ExperimentalStraight halves of adds and subtracts packed 16-bit unsigned numbers, dropping least bits
- urstsa16ExperimentalStraight halves of subtracts and adds packed 16-bit unsigned numbers, dropping least bits
- ursub8ExperimentalHalves the subtraction result of packed 8-bit unsigned numbers, dropping least bits
- ursub16ExperimentalHalves the subtraction result of packed 16-bit unsigned numbers, dropping least bits
- wfi⚠ExperimentalGenerates the
WFI
instruction - Nibble-wise lookup of indicies into a vector.
- Byte-wise lookup of indicies into a vector in registers.
- zunpkd810ExperimentalUnpack first and zeroth into two 16-bit unsigned halfwords in each 32-bit chunk
- zunpkd820ExperimentalUnpack second and zeroth into two 16-bit unsigned halfwords in each 32-bit chunk
- zunpkd830ExperimentalUnpack third and zeroth into two 16-bit unsigned halfwords in each 32-bit chunk
- zunpkd831ExperimentalUnpack third and first into two 16-bit unsigned halfwords in each 32-bit chunk
- zunpkd832ExperimentalUnpack third and second into two 16-bit unsigned halfwords in each 32-bit chunk