Example 2. C Code for Computing a Dot Product

int dotp(short a[], shortb[]) { int sum0 = 0; int sum1 = 0; int sum, I; for (I = 0; I < 100/4; I +=4) { sum0 += a[i] * b[i]; sum0 += a[i+1] * b[i+1]; sum1 += a[i+2] * b[i+2]; sum1 += a[i+3] * [b[i+3]; } return }

The old method of partitioning registers indirectly by partitioning instructions can still be used. Side and functional unit specifiers can still be used on instructions. However, functional unit specifiers (.L/.S/.D/.M) are ignored. Side specifiers are translated into partitioning constraints on the corresponding symbolic names, if any. For example:

MV .1 x, y ; translated to .REGA y LDW .D2T2 *u, v:w ; translated to .REGB u, v, w

In the linear assembler, you can also specify register pairs using the .cproc and/or .reg directive as in Example 3: