Expand description
Shared RISC-V intrinsics
ยงMissing floating-point register instructions
We are deliberately not providing instructions that could change the floating-point rounding
mode or exception behavior or read the accrued exceptions flags: frcsr
, fscsr
, fsrm
,
frflags
, fsflags
.
Rust makes no guarantees whatsoever about the contents of the accrued exceptions register: Rust floating-point operations may or may not result in this register getting updated with exception state, and the register can change between two invocations of this function even when no floating-point operations appear in the source code (since floating-point operations appearing earlier or later can be reordered).
Modifying the rounding mode leads to immediate Undefined Behavior: Rust assumes that the default rounding mode is always set and will optimize accordingly. This even applies when the rounding mode is altered and later reset to its original value without any floating-point operations appearing in the source code between those operations (since floating-point operations appearing earlier or later can be reordered).
If you need to perform some floating-point operations and check whether they raised an exception, use a single inline assembly block for the entire sequence of operations.
If you need to perform some floating-point operations under a differen rounding mode, use a single inline assembly block and make sure to restore the original rounding mode before the end of the block.
Re-exportsยง
Modulesยง
Functionsยง
- fence_iโ
Experimental - Generates the
FENCE.I
instruction - frrm
Experimental - Reads the floating-point rounding mode register
frm
- hfence_
gvma โExperimental - Hypervisor memory management fence for guest physical address and virtual machine
- hfence_
gvma_ โall Experimental - Hypervisor memory management fence for all virtual machines and guest physical addresses
- hfence_
gvma_ โgaddr Experimental - Hypervisor memory management fence for guest physical address
- hfence_
gvma_ โvmid Experimental - Hypervisor memory management fence for given virtual machine
- hfence_
vvma โExperimental - Hypervisor memory management fence for given guest virtual address and guest address space
- hfence_
vvma_ โall Experimental - Hypervisor memory management fence for all guest address spaces and guest virtual addresses
- hfence_
vvma_ โasid Experimental - Hypervisor memory management fence for given guest address space
- hfence_
vvma_ โvaddr Experimental - Hypervisor memory management fence for given guest virtual address
- hinval_
gvma โExperimental - Invalidate hypervisor translation cache for guest physical address and virtual machine
- hinval_
gvma_ โall Experimental - Invalidate hypervisor translation cache for all virtual machines and guest physical addresses
- hinval_
gvma_ โgaddr Experimental - Invalidate hypervisor translation cache for guest physical address
- hinval_
gvma_ โvmid Experimental - Invalidate hypervisor translation cache for given virtual machine
- hinval_
vvma โExperimental - Invalidate hypervisor translation cache for given guest virtual address and guest address space
- hinval_
vvma_ โall Experimental - Invalidate hypervisor translation cache for all guest address spaces and guest virtual addresses
- hinval_
vvma_ โasid Experimental - Invalidate hypervisor translation cache for given guest address space
- hinval_
vvma_ โvaddr Experimental - Invalidate hypervisor translation cache for given guest virtual address
- hlv_bโ
Experimental - Loads virtual machine memory by signed byte integer
- hlv_buโ
Experimental - Loads virtual machine memory by unsigned byte integer
- hlv_hโ
Experimental - Loads virtual machine memory by signed half integer
- hlv_huโ
Experimental - Loads virtual machine memory by unsigned half integer
- hlv_wโ
Experimental - Loads virtual machine memory by signed word integer
- hlvx_huโ
Experimental - Accesses virtual machine instruction by unsigned half integer
- hlvx_wuโ
Experimental - Accesses virtual machine instruction by unsigned word integer
- hsv_bโ
Experimental - Stores virtual machine memory by byte integer
- hsv_hโ
Experimental - Stores virtual machine memory by half integer
- hsv_wโ
Experimental - Stores virtual machine memory by word integer
- nop
Experimental - Generates the
NOP
instruction - pause
Experimental - Generates the
PAUSE
instruction - sfence_
inval_ โir Experimental - Generates the
SFENCE.INVAL.IR
instruction - sfence_
vma โExperimental - Supervisor memory management fence for given virtual address and address space
- sfence_
vma_ โall Experimental - Supervisor memory management fence for all address spaces and virtual addresses
- sfence_
vma_ โasid Experimental - Supervisor memory management fence for given address space
- sfence_
vma_ โvaddr Experimental - Supervisor memory management fence for given virtual address
- sfence_
w_ โinval Experimental - Generates the
SFENCE.W.INVAL
instruction - sinval_
vma โExperimental - Invalidate supervisor translation cache for given virtual address and address space
- sinval_
vma_ โall Experimental - Invalidate supervisor translation cache for all address spaces and virtual addresses
- sinval_
vma_ โasid Experimental - Invalidate supervisor translation cache for given address space
- sinval_
vma_ โvaddr Experimental - Invalidate supervisor translation cache for given virtual address
- wfiโ
Experimental - Generates the
WFI
instruction