Version 19 (modified by cameron, 6 years ago) (diff) |
---|
IDISA Field Movement Operations
The tables below list the various IDISA field movement operations on vectors of w-bit fields, together with their description and semantic specification.
An important characteristic of these operations is that fields may be moved or rearranged in various ways, but the contents of the fields remain unchanged.
Field Extract Operations
The operation mvmd<w>::extract<p>(v) extracts and returns the pth w-bit field from the vector v.
Field Insert Operations
The operation mvmd<w>::insert<p>(v, a) returns a copy of vector v replacing its pth w-bit with the value a.
Constant Fill Operations
The operations r = mvmd<w>::fill<c>() and r = mvmd<w>::fill(c) fill each w-bit field with an integer value c. In the first case, the fill value is a compile-time constant.
Pattern Fill Operations
These operations fill a vector with a repeating pattern of field values.
mvmd<w>::fill2(a1, a2) | fill alternating w-bit fields with the values a1 and a2 |
mvmd<w>::fill4(a1, a2, a3, a4) | fill each set of 4 fields with values a1 through a4 |
mvmd<w>::fill8(a1, a2, a3, a4, a5, a6, a7, a8) | fill each set of 8 fields with values a1 through a8 |
mvmd<w>::fill16(a1, a2, a3, a4, a5, a6, a7, a8, a8, a9, a10, a11, a12, a13, a14, a15, a16) | fill each set of 16 fields with values a1 through a16 |
Unary Movement Operations
These operations generally have the form r = mvmd<w>::op(a) for each operation op, where a is an operand vectors of w-bit fields and r is the corresponding result vector. Let N = W/w be the number of w-bit fields in a vector.
splat<j> | splat | r_{i} = a_{j} |
slli<j> | shift left logical immediate | r_{i} = a_{i+j} if i + j < N, 0 otherwise |
srli<j> | shift right logical immediate | r_{i} = a_{i-j} if i >= j, 0 otherwise |
shufflei<m> | shuffle immediate | r_{i} = a_{t}, where t = index(m, i) |
The immediate constant value used for shufflei is computed by one of the functions:
shufflemask2(s1, s2) | compute mask for selecting 1 of 2 fields |
shufflemask4(s1, s2, s3, s4) | compute mask for selecting 1 of 4 fields |
shufflemask8(s1, s2, s3, s4, s5, s6, s7, s8) | compute mask for selecting 1 of 8 fields |
shufflemask16(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16) | compute mask for selecting 1 of 16 fields |
Binary Movement Operations
These operations generally have the form r = mvmd<w>::op(a, b) for each operation op, where a and b are operand vectors of w-bit fields and r is the corresponding result vector.
dslli<j> | double shift left logical immediate | r_{i} = a_{i+j} if i + j < N, b_{i + j - N} otherwise |
dsrli<j> | double shift right logical immediate | r_{i} = a_{i + N -j} if i < j, b_{i - j} otherwise |
shuffle | shuffle | r_{i} = a_{t}, where t = b_{i} |