Vector Floating-point Programming

Example

FMRX

r10,FPSCR

 

BIC

r10,r10,#0x00370000

 

ORR

r10,r10,#0x00020000

; set length = 3, stride = 1

FMXR

FPSCR,r10

 

VFPASSERT VECTOR faddd d4, d4, d0 fadds s16<3>, s0, s8<3> fabss s24<1>, s28<1>

;assert vector mode, unspecified length and stride

;ERROR, scalar in vector mode

;okay

;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> fadds s24<4>, s0, s8<4> fabss s24<2>, s24<2>

;assert vector mode, length 4, stride 1

;okay

;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> fadds s8<4>, s0, s16<4> fabss s16<4:2>, s28<4:2> fadds s8<>, s2, s16<>

;assert vector mode, length 4, stride 2

;ERROR, wrong stride

;okay

;okay (s8 and s16 both have

;length 4 and stride 2.

;s2 is scalar.)

ARM DUI 0068B

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

6-43

Page 281
Image 281
ARM VERSION 1.2 manual R10,FPSCR