Table 22-5 Default Results For Invalid Conversion Inputs - ARM ARM1176JZF-S Technical Reference Manual

Table of Contents

Advertisement

22.6.2
Exception disabled
ARM DDI 0301H
ID012310
When the VFP11 coprocessor detects a potentially invalid condition, the EX flag, FPEXC[31],
and the IOC flag, FPEXC[0], are set. The IOC flag in the FPSCR register, FPSCR[0], is not set
by the hardware and must be set by the support code before calling the Invalid Operation user
trap handler.
The support code determines the exception status of all bounced instructions. If an invalid
condition exists, the Invalid Operation user trap handler is called. The source and destination
registers for the instruction are valid in the VFP11 register file.
If the IOE bit is not set, the VFP11 coprocessor writes a default NaN into the destination register
for all operations except integer conversion operations.
Conversion of a floating-point value that is outside the range of the destination integer is an
invalid condition rather than an overflow condition. When an invalid condition exists for a
float-to-integer conversion, the VFP11 coprocessor delivers a default result to the destination
register and sets the IOC flag, FPSCR[0]. Table 22-5 lists the default results for input values
after rounding.
If the VFP11 coprocessor is not in default NaN mode, an arithmetic instruction with an SNaN
operand sets the IOC flag and causes a bounce to support code.
FTOUIS and FTOUID
Input value
after rounding
Result
32
x 2
0xFFFFFFFF
≤ x < 2
31
32
Integer
2
0 ≤ x < 2
Integer
31
0 ≥ x ≥ –2
31
0x00000000
31
x < –2
0x00000000
NaN
0x00000000
+infinity
0xFFFFFFFF
–infinity
0x00000000
Note
A negative input to an unsigned conversion that does not round to a true zero in the conversion
process sets the IOC flag, FPEXC[0].
Copyright © 2004-2009 ARM Limited. All rights reserved.
Non-Confidential, Unrestricted Access

Table 22-5 Default results for invalid conversion inputs

FTOSIS and FTOSID
FPSCR IOC flag set?
Result
Yes
0x7FFFFFFF
No
0x7FFFFFFF
No
Integer
Yes
Integer
Yes
0x80000000
Yes
0x00000000
Yes
0x7FFFFFFF
Yes
0x80000000
VFP Exception Handling
FPSCR IOC flag set?
Yes
Yes
No
No
Yes
Yes
Yes
Yes
22-14

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents