[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Assembler Language Reference

fsqrt (Floating Square Root, Double-Precision) Instruction

Purpose

Calculate the square root of the contents of a floating- point register, placing the result in a floating-point register.

Syntax

Bits Value
0-5 63
6-10 D
11-15 00000
16-20 B
21-25 00000
26-30 22
31 Rc
PowerPC 
fsqrt FRT, FRB (Rc=0)
fsqrt. FRT, FRB (Rc=1)

Description

The square root of the operand in floating-point register (FPR) FRB is placed into register FPR FRT.

If the most-significant bit of the resultant significand is not a one the result is normalized. The result is rounded to the target precision under control of the floating-point rounding control field RN of the FPSCR and placed into register FPR FRT.

Operation with various special values of the operand is summarized below.

Operand Result Exception
- infinity QNaN* VXSQRT
< 0 QNaN* VXSQRT
- 0 - 0 None
+ infinity + infinity None
SNaN QNaN* VXSNAN
QNaN QNaN None

Notes: * No result if FPSCR[VE] = 1

FPSCR[FPRF] is set to the class and sign of the result, except for invalid operation exceptions when FPSCR[VE] = 1.

The fsqrt instruction has two syntax forms. Each syntax form has a different effect on Condition Register Field 1.

Syntax Form Floating-Point Status and Control Register Record Bit (Rc) Condition Register Field 1
fsqrt FPRF,FR,FI,FX,XX,VXSNAN,VXSQRT 0 None
fsqrt. FPRF,FR,FI,FX,XX,VXSNAN,VXSQRT 1 FX,FEX,VX,OX

Parameters

FRT Specifies the target floating-point register for the operation.
FRB Specifies the source floating-point register for the operation.

Implementation

This instruction is optionally defined for PowerPC implementations. Using it on an implementation that does not support this instruction will cause the system illegal instruction error handler to be invoked.

This instruction is an optional instruction of the PowerPC architecture and may not be implemented in all machines.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]