... | ... | @@ -24,7 +24,7 @@ For this reason, this approach has been discarded. |
|
|
|
|
|
In the end, a bithack trick was used to extend the array of 32-bit unsigned integers into a vector register with SEW width of 64-bits.
|
|
|
The trick is to load the 32-bit array into a register with 64-bit SEW, and then use an `vand` operation to blank the most significant half of the elements, mimicking an extension with zeros.
|
|
|
To get the other half, it is needed to perform a shift right logic before applying the `vand`.
|
|
|
To get the other half, it is needed to perform a shift right logic (`vsrl`)before applying the `vand`.
|
|
|
This method cannot be used in a context in which the order of the elements needs to be preserved.
|
|
|
In addition, it also requires a bit of extra handling for the case in which the array has an odd number of elements.
|
|
|
The following figure shows a representation of the operations needed for the 32-bit to 64-bit conversion.
|
... | ... | |