xscvdphp

VSX Scalar Convert Double to Half-Precision

xscvdphp XT, XB

Converts a double-precision floating-point value to a half-precision floating-point value with rounding.

Details

Converts the double-precision floating-point value in XB to a half-precision floating-point value, placing the result in the lower half of XT. The conversion applies rounding according to the current floating-point rounding mode in FPSCR. Requires VSX support.

Pseudocode Operation

XT ← convert_to_half_precision(XB, round_mode=FPSCR[RN])

Programming Note

This instruction can be used to operate on a single-precision source operand. Previous versions of the architecture allowed the contents of doubleword 1 of the result register to be undefined. However, all processors that support this instruction write 0s into doubleword 1 of the result register, as is required by this version of the architecture.

Example

xscvdphp vs1, vs3

Encoding

Binary Layout
60
0
T
6
17
11
B
16
347
21
BX TX
30 31
 
Format XX2-form
Opcode 0xF011056C
Extension VSX
Registers Altered FPSCR, VSR[TX×32+T].hword[3]

Operands

  • XT
    Target
  • XB
    Source