xvcvbf16spn

VSX Vector Convert bfloat16 to Single-Precision format Non-signaling

xvcvbf16spn XT,XB

Converts a vector of bfloat16 values to single-precision floating-point format.

Details

The xvcvbf16spn instruction converts each element of the source vector VSR[XB] from bfloat16 format to single-precision floating-point format and stores the result in the target vector VSR[XT].

Pseudocode Operation

if MSR.VSX=0 then VSX_Unavailable()
reset_flags()
do i = 0 to 3
    VSR[32×TX+T].word[i].hword[0] ← VSR[32×BX+B].word[i].hword[1]
    VSR[32×TX+T].word[i].hword[1] ←0x0000
end

Programming Note

This instruction is used to convert bfloat16 values in a vector to single-precision floating-point format. Ensure that the VSX (Vector Scalar Extensions) are enabled by checking and setting the MSR.VSX bit. The operation processes four elements per iteration, converting the high 16 bits of each source element to the corresponding target element while zeroing out the lower 16 bits. This instruction does not raise exceptions for invalid operations.

Example

xvcvbf16spn vs1, vs3

Encoding

Binary Layout
T
6
BX
11
TX
16
 
Format XX2-form
Opcode 0xF010076C
Extension VSX
Registers Altered MSR

Operands

  • XT
    Target Vector Register
  • XB
    Source Vector Register