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 compliant.


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.


    VMRS    r10,FPSCR          ; UAL mnemonic - could be FMRX instead.
    BIC     r10,r10,#0x00370000
    ORR     r10,r10,#0x00020000    ; set length = 3, stride = 1
    VMSR    FPSCR,r10
    VFPASSERT VECTOR           ; assert vector mode, unspecified length & stride
    faddd  d4, d4, d0          ; ERROR, scalars in vector mode
    fadds  s16<3>, s8<3>, s0   ; okay
    fabss  s24<1>, s28<1>      ; wrong length, but not faulted (unspecified)
    VMRS    r10,FPSCR
    BIC     r10,r10,#0x00370000
    ORR     r10,r10,#0x00030000    ; set length = 4, stride = 1
    VMSR    FPSCR,r10
    VFPASSERT VECTOR<4>        ; assert vector mode, length 4, stride 1
    fadds  s24<4>, s8<4>, s0   ; okay
    fabss  s24<2>, s24<2>      ; ERROR, wrong length
    VMRS    r10,FPSCR
    BIC     r10,r10,#0x00370000
    ORR     r10,r10,#0x00130000    ; set length = 4, stride = 2
    VMSR    FPSCR,r10
    VFPASSERT VECTOR<4:2>      ; assert vector mode, length 4, stride 2
    fadds  s8<4>, s16<4>, s0   ; ERROR, wrong stride because omitting the stride
                               ; causes a default stride of 1.
    fabss  s16<4:2>, s28<4:2>  ; okay
    fadds  s8<>, s16<>, s2     ; okay (s8 and s16 both have
                               ; length 4 and stride 2.
                               ; s2 is scalar.) 

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0473H