xvcvspsxws
Vector Convert with round to zero Single-Precision to Signed Word format
xvcvspsxws XT,XB
Converts a vector of single-precision floating-point numbers to signed integers using round towards zero.
Details
Converts each single-precision floating-point element in XB to a signed 32-bit integer in XT, rounding towards zero. This is a VSX instruction operating element-wise on a vector of single-precision values. No condition registers or status fields are modified.
Pseudocode Operation
for i in 0 to 3 do
XT[i*32:(i+1)*32-1] ← CVTSP_TO_SI_RZ(XB[i*32:(i+1)*32-1])
end for
Programming Note
xvcvspsxws rounds using Round towards Zero rounding mode. For other rounding modes, software must use a Round to Single-Precision Integer instruction that corresponds to the desired rounding mode.
Example
xvcvspsxws vs1, vs3
Encoding
Binary Layout
18
0
T
6
B
11
152
16
BX
21
TX
26
Operands
-
XT
Target Vector Register -
XB
Source Vector Register