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

Assembler Language Reference

fnabs (Floating Negative Absolute Value) Instruction

Purpose

Negates the absolute contents of a floating-point register and places the result in another floating-point register.

Syntax

Bits Value
0-5 63
6-10 FRT
11-15 ///
16-20 FRB
21-30 136
31 /
fnabs FRT, FRB
fnabs. FRT, FRB

Description

The fnabs instruction places the negative absolute of the contents of floating-point register (FPR) FRB with bit 0 set to 1 into the target FPR FRT.

The fnabs 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
fnabs None 0 None
fnabs. None 1 FX,FEX,VX,OX

The two syntax forms of the fnabs instruction never affect the Floating-Point Status and Control Register. If the syntax form sets the Record (Rc) bit to 1, the instruction affects the Floating-Point Exception (FX), Floating-Point Enabled Exception (FEX), Floating-Point Invalid Operation Exception (VX), and Floating-Point Overflow Exception (OX) bits in Condition Register Field 1.

Parameters

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

Examples

  1. The following code negates the absolute contents of FPR 5 and places the result into FPR 6:

    # Assume FPR 5 contains 0x400C 0000 0000 0000.
    fnabs 6,5
    # FPR 6 now contains 0xC00C 0000 0000 0000.
  2. The following code negates the absolute contents of FPR 4, places the result into FPR 6, and sets Condition Register Field 1 to reflect the result of the operation:

    # Assume FPR 4 contains 0xC053 4000 0000 0000.
    # Assume CR = 0.
    fnabs. 6,4
    # FPR 6 now contains 0xC053 4000 0000 0000.
    # CR now contains 0x0.

Related Information

Floating-Point Processor .

Floating-Point Move Instructions .

Interpreting the Contents of a Floating-Point Register .

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