The VFPASSERT VECTOR directive informs the assembler that following VFP instructions are in vector mode. It can also specify the length and stride of the vectors.





is the vector length, 1-8.


is the vector stride, 1-2.


Use the VFPASSERT VECTOR directive to mark the start of a block of instructions where the VFP mode is VECTOR, and to mark changes in the length or stride of vectors.

Place the VFPASSERT VECTOR directive immediately after the instruction where the change occurs. This is usually an FMXR instruction, but might be a BL instruction.

If a function expects the VFP to be in vector mode on entry, place a VFPASSERT VECTOR directive immediately before the first instruction. Such a function would not be AAPCS conformant. See the Using the Procedure Call Standard appendix in RealView Compilation Tools v2.2 Developer Guide for more information.



This directive does not generate any code. It is only an assertion by the programmer. The assembler produces error messages if any such assertions are inconsistent with each other, or with any vector notation in VFP data processing instructions.


    FMRX    r10,FPSCR
    BIC     r10,r10,#0x00370000
    ORR     r10,r10,#0x00020000    ; set length = 3, stride = 1
    FMXR    FPSCR,r10

    VFPASSERT VECTOR           ; assert vector mode, unspecified length & stride
    faddd  d4, d4, d0          ; ERROR, scalar in vector mode
    fadds  s16<3>, s0, s8<3>   ; okay
    fabss  s24<1>, s28<1>      ; wrong length, but not faulted (unspecified)

    FMRX    r10,FPSCR
    BIC     r10,r10,#0x00370000
    ORR     r10,r10,#0x00030000    ; set length = 4, stride = 1
    FMXR    FPSCR,r10

    VFPASSERT VECTOR<4>        ; assert vector mode, length 4, stride 1
    fadds  s24<4>, s0, s8<4>   ; okay
    fabss  s24<2>, s24<2>      ; ERROR, wrong length

    FMRX    r10,FPSCR
    BIC     r10,r10,#0x00370000
    ORR     r10,r10,#0x00130000    ; set length = 4, stride = 2
    FMXR    FPSCR,r10

    VFPASSERT VECTOR<4:2>      ; assert vector mode, length 4, stride 2
    fadds  s8<4>, s0, s16<4>   ; ERROR, wrong stride
    fabss  s16<4:2>, s28<4:2>  ; okay
    fadds  s8<>, s2, s16<>     ; okay (s8 and s16 both have
                               ; length 4 and stride 2.
                               ; s2 is scalar.)
Copyright © 2002-2005 ARM Limited. All rights reserved.ARM DUI 0204F