05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Application Level Programmers’ Model<br />

Behavior in Flush-to-zero mode differs from normal IEEE 754 arithmetic in the following ways:<br />

All inputs to floating-point operations that are double-precision de-normalized numbers or<br />

single-precision de-normalized numbers are treated as though they were zero. This causes an Input<br />

Denormal exception, but does not cause an Inexact exception. The Input Denormal exception occurs<br />

only in Flush-to-zero mode.<br />

The FPSCR contains a cumulative exception bit FPSCR.IDC <strong>and</strong> trap enable bit FPSCR.IDE<br />

corresponding to the Input Denormal exception. For details of how these are used when processing<br />

the exception see Advanced SIMD <strong>and</strong> VFP system registers on page A2-28.<br />

The occurrence of all exceptions except Input Denormal is determined using the input values after<br />

flush-to-zero processing has occurred.<br />

The result of a floating-point operation is flushed to zero if the result of the operation before rounding<br />

satisfies the condition:<br />

0 < Abs(result) < MinNorm, where:<br />

— MinNorm ==2-126 for single-precision<br />

— MinNorm ==2-1022 for double-precision.<br />

This causes the FPSCR.UFC bit to be set to 1, <strong>and</strong> prevents any Inexact exception from occurring for<br />

the operation.<br />

Underflow exceptions occur only when a result is flushed to zero.<br />

In a VFPv2 or VFPv3U implementation Underflow exceptions that occur in Flush-to-zero mode are<br />

always treated as untrapped, even when the Underflow trap enable bit, FPSCR.UFE, is set to 1.<br />

An Inexact exception does not occur if the result is flushed to zero, even though the final result of<br />

zero is not equivalent to the value that would be produced if the operation were performed with<br />

unbounded precision <strong>and</strong> exponent range.<br />

For information on the FPSCR bits see Floating-point Status <strong>and</strong> Control Register (FPSCR) on page A2-28.<br />

When an input or a result is flushed to zero the value of the sign bit of the zero is determined as follows:<br />

In VFPv3 or VFPv3U, it is preserved. That is, the sign bit of the zero matches the sign bit of the input<br />

or result that is being flushed to zero.<br />

In VFPv2, it is IMPLEMENTATION DEFINED whether it is preserved or always positive. The same<br />

choice must be made for all cases of flushing an input or result to zero.<br />

Flush-to-zero mode has no effect on half-precision numbers that are inputs to floating-point operations, or<br />

results from floating-point operations.<br />

A2-40 Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DDI 0406B

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

Saved successfully!

Ooh no, something went wrong!