Vector Floating-point Programming

6.5.2FPEXC, the floating-point exception register

You can only access the FPEXC in privileged modes. It contains the following bits:

bit[31] is the EX bit. You can read it in all VFP implementations. In some implementations you might also be able to write to it.

If the value is 0, the only significant state in the VFP system is the contents of the general purpose registers plus FPSCR and FPEXC.

If the value is 1, you need implementation-specific information to save state (see the technical reference manual for the VFP coprocessor you are using).

bit[30] is the EN bit. You can read and write it in all VFP implementations.

If the value is 1, the VFP coprocessor is enabled and operates normally.

If the value is 0, the VFP coprocessor is disabled. When the coprocessor is disabled, you can read or write the FPSID or FPEXC registers, but other VFP instructions are treated as undefined instructions.

bits[29:0] might be used by particular implementations of VFP. You can use all the VFP functions described in this chapter without accessing these bits.

You must not alter these bits except in accordance with their use in a particular implementation (see the technical reference manual for the VFP coprocessor you are using).

To alter some bits without affecting other bits, use a read-modify-write procedure (see Modifying individual bits of a VFP system register).

6.5.3FPSID, the floating-point system ID register

The FPSID is a read-only register. You can read it to find out which implementation of the VFP architecture your program is running on.

6.5.4Modifying individual bits of a VFP system register

To alter some bits of a VFP system register without affecting other bits, use a read-modify-write procedure similar to the following example:

FMRX

r10,FPSCR

; copy

FPSCR into r10

BIC

r10,r10,#0x00370000

; clears STRIDE and LEN

ORR

r10,r10,#0x00030000

;

sets

STRIDE = 1, LEN = 4

FMXR

FPSCR,r10

;

copy

r10 back into FPSCR

See FMRX, FMXR, and FMSTAT on page 6-33.

6-12

Copyright © 2000, 2001 ARM Limited. All rights reserved.

ARM DUI 0068B

Page 250
Image 250
ARM VERSION 1.2 manual FPEXC, the floating-point exception register, FPSID, the floating-point system ID register