1
Introduction
2
Implementation-defined Constant Parameters
3
Vector Extension Programmer’s Model
3.1
Vector Registers
3.2
Vector type register,
vtype
3.3
Vector Length Register
vl
3.4
Vector Start Index CSR
vstart
3.5
Vector Fixed-Point Rounding Mode Register
vxrm
3.6
Vector Fixed-Point Saturation Flag
vxsat
3.7
Vector Fixed-Point Fields in
fcsr
3.8
State of Vector Extension at Reset
4
Mapping of Vector Elements to Vector Register State
4.1
Mapping with LMUL=1
4.2
Mapping with LMUL > 1
4.3
Mapping across Mixed-Width Operations
4.4
Mask Register Layout
5
Vector Instruction Formats
5.1
Scalar operands
5.2
Vector Operands
5.3
Vector Masking
5.4
Prestart, Active, Inactive, Body, and Tail Element Definitions
6
Configuration-Setting Instructions
6.2
Constraints on Setting
vl
6.4
Examples
7
Vector Loads and Stores
7.1
Vector Load/Store Instruction Encoding
7.2
Vector Load/Store Addressing Modes
7.3
Vector Load/Store Width Encoding
7.4
Vector Unit-Stride Instructions
7.5
Vector Strided Instructions
7.6
Vector Indexed Instructions
7.7
Unit-stride Fault-Only-First Loads
7.8
Vector Load/Store Segment Instructions (
Zvlsseg
)
8
Vector AMO Operations (
Zvamo
)
9
Vector Memory Alignment Constraints
10
Vector Memory Consistency Model
11
Vector Arithmetic Instruction Formats
11.1
Vector Arithmetic Instruction encoding
11.2
Widening Vector Arithmetic Instructions
11.3
Narrowing Vector Arithmetic Instructions
12
Vector Integer Arithmetic Instructions
12.1
Vector Single-Width Integer Add and Subtract
12.2
Vector Widening Integer Add/Subtract
12.3
Vector Integer Add-with-Carry / Subtract-with-Borrow Instructions
12.4
Vector Bitwise Logical Instructions
12.5
Vector Single-Width Bit Shift Instructions
12.6
Vector Narrowing Integer Right Shift Instructions
12.7
Vector Integer Comparison Instructions
12.8
Vector Integer Min/Max Instructions
12.9
Vector Single-Width Integer Multiply Instructions
12.10
Vector Integer Divide Instructions
12.11
Vector Widening Integer Multiply Instructions
12.12
Vector Single-Width Integer Multiply-Add Instructions
12.13
Vector Widening Integer Multiply-Add Instructions
12.14
Vector Integer Merge and Move Instructions
13
Vector Fixed-Point Arithmetic Instructions
13.1
Vector Single-Width Saturating Add and Subtract
13.2
Vector Single-Width Averaging Add and Subtract
13.3
Vector Single-Width Fractional Multiply with Rounding and Saturation
13.4
Vector Widening Saturating Scaled Multiply-Add
13.5
Vector Single-Width Scaling Shift Instructions
13.6
Vector Narrowing Fixed-Point Clip Instructions
14
Vector Floating-Point Instructions
14.1
Vector Floating-Point Exception Flags
14.2
Vector Single-Width Floating-Point Add/Subtract Instructions
14.3
Vector Widening Floating-Point Add/Subtract Instructions
14.4
Vector Single-Width Floating-Point Multiply/Divide Instructions
14.5
Vector Widening Floating-Point Multiply
14.6
Vector Single-Width Floating-Point Fused Multiply-Add Instructions
14.7
Vector Widening Floating-Point Fused Multiply-Add Instructions
14.8
Vector Floating-Point Square-Root Instruction
14.9
Vector Floating-Point MIN/MAX Instructions
14.10
Vector Floating-Point Sign-Injection Instructions
14.11
Vector Floating-Point Compare Instructions
14.12
Vector Floating-Point Classify Instruction
14.13
Vector Floating-Point Merge Instruction
14.14
Single-Width Floating-Point/Integer Type-Convert Instructions
14.15
Widening Floating-Point/Integer Type-Convert Instructions
14.16
Narrowing Floating-Point/Integer Type-Convert Instructions
15
Vector Reduction Operations
15.1
Vector Single-Width Integer Reduction Instructions
15.2
Vector Widening Integer Reduction Instructions
15.3
Vector Single-Width Floating-Point Reduction Instructions
15.4
Vector Widening Floating-Point Reduction Instructions
16
Vector Mask Instructions
16.1
Vector Mask-Register Logical Instructions
16.2
Vector mask population count
vmpopc
16.7
Example using vector mask instructions
16.8
Vector Iota Instruction
16.9
Vector Element Index Instruction
17
Vector Permutation Instructions
17.1
Integer Extract Instruction
17.2
Integer Scalar Move Instruction
17.3
Floating-Point Scalar Move Instructions
17.4
Vector Slide Instructions
17.5
Vector Register Gather Instruction
17.6
Vector Compress Instruction
18
Exception Handling
18.1
Precise vector traps
18.2
Imprecise vector traps
18.3
Selectable precise/imprecise traps
18.4
Swappable traps
19
Divided Element Extension (Zvediv)
19.1
Instructions not affected by EDIV
19.2
Instructions Affected by EDIV
19.3
Vector Integer Dot-Product Instruction
19.4
Vector Floating-Point Dot Product Instruction
20
Vector Instruction Listing
Appendix A: Vector Assembly Code Examples
A.1. Vector-vector add example
A.2. Example with mixed-width mask and compute.
A.3. Memcpy example
A.4. Conditional example
A.5. SAXPY example
A.6. SGEMM example