14.06.2015 Views

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Version</strong> <strong>2.03</strong><br />

mented by one. For the leading-zero case, the significand<br />

is shifted left while decrementing its exponent by<br />

one for each bit shifted, until the leading significand bit<br />

becomes one. The Guard bit and the Round bit (see<br />

Section 4.5.1, “Execution Model for IEEE Operations”<br />

on page 103) participate in the shift with zeros shifted<br />

into the Round bit. The exponent is regarded as if its<br />

range were unlimited.<br />

After normalization, or if normalization was not<br />

required, the intermediate result may have a nonzero<br />

significand and an exponent value that is less than the<br />

minimum value that can be represented in the format<br />

specified for the result. In this case, the intermediate<br />

result is said to be “Tiny” and the stored result is determined<br />

by the rules described in Section 4.4.4, “Underflow<br />

Exception”. These rules may require<br />

denormalization.<br />

A number is denormalized by shifting its significand<br />

right while incrementing its exponent by 1 for each bit<br />

shifted, until the exponent is equal to the format’s minimum<br />

value. If any significant bits are lost in this shifting<br />

process then “Loss of Accuracy” has occurred (See<br />

Section 4.4.4, “Underflow Exception” on page 102) and<br />

Underflow Exception is signaled.<br />

4.3.5 Data Handling and Precision<br />

Most of the Floating-Point Processor Architecture,<br />

including all computational, Move, and Select instructions,<br />

use the floating-point double format to represent<br />

data in the FPRs. Single-precision and integer-valued<br />

operands may be manipulated using double-precision<br />

operations. Instructions are provided to coerce these<br />

values from a double format operand. Instructions are<br />

also provided for manipulations which do not require<br />

double-precision. In addition, instructions are provided<br />

to access a true single-precision representation in storage,<br />

and a fixed-point integer representation in GPRs.<br />

4.3.5.1 Single-Precision Operands<br />

For single format data, a format conversion from single<br />

to double is performed when loading from storage into<br />

an FPR and a format conversion from double to single<br />

is performed when storing from an FPR to storage. No<br />

floating-point exceptions are caused by these instructions.<br />

An instruction is provided to explicitly convert a<br />

double format operand in an FPR to single-precision.<br />

Floating-point single-precision is enabled with four<br />

types of instruction.<br />

2. Round to Floating-Point Single-Precision<br />

The Floating Round to Single-Precision instruction<br />

rounds a double-precision operand to single-precision,<br />

checking the exponent for single-precision<br />

range and handling any exceptions according to<br />

respective enable bits, and places that operand<br />

into an FPR in double format. For results produced<br />

by single-precision arithmetic instructions, single-precision<br />

loads, and other instances of the<br />

Floating Round to Single-Precision instruction, this<br />

operation does not alter the value.<br />

3. Single-Precision Arithmetic Instructions<br />

This form of instruction takes operands from the<br />

FPRs in double format, performs the operation as<br />

if it produced an intermediate result having infinite<br />

precision and unbounded exponent range, and<br />

then coerces this intermediate result to fit in single<br />

format. Status bits, in the FPSCR and optionally in<br />

the Condition Register, are set to reflect the single-precision<br />

result. The result is then converted to<br />

double format and placed into an FPR. The result<br />

lies in the range supported by the single format.<br />

All input values must be representable in single<br />

format; if they are not, the result placed into the target<br />

FPR, and the setting of status bits in the<br />

FPSCR and in the Condition Register (if Rc=1),<br />

are undefined.<br />

4. Store Floating-Point Single<br />

This form of instruction converts a double-precision<br />

operand to single format and stores that operand<br />

into storage. No floating-point exceptions are<br />

caused by these instructions. (The value being<br />

stored is effectively assumed to be the result of an<br />

instruction of one of the preceding three types.)<br />

When the result of a Load Floating-Point Single, Floating<br />

Round to Single-Precision, or single-precision arithmetic<br />

instruction is stored in an FPR, the low-order 29<br />

FRACTION bits are zero.<br />

1. Load Floating-Point Single<br />

This form of instruction accesses a single-precision<br />

operand in single format in storage, converts it<br />

to double format, and loads it into an FPR. No<br />

floating-point exceptions are caused by these<br />

instructions.<br />

96<br />

<strong>Power</strong> ISA -- Book I

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!