Assembler for vector calculus
Saturday December 22nd, 2012By: CyrIngThe assembler calculator is enhanced with vector computing.
According to the ARM processor specifications, three operation modes are available:
- scalars
- vectors
- scalars and vectors mixed (our choice)
How do we program this :
- using a vector lenght of 4, the control register FPSCR is loaded with ( 4 – 1 ) × ²↑16
- the registers s8, s9, s10 and s11 are loaded with the first vector operand [a1 a2 a3 a4]
- if the second operand is a vector then the registers s20, s21, s22 and s23 are loaded with [b1 b2 b3 b4] ;
else, if the operand is a scalar then the register s0 must be used and loaded with b - the result of the operation in the registers s8, s9, s10 and s11 is stored into [c1 c2 c3 c4]