Assigned: 16 Mar 2000
Due: 30 Mar 2000 at 5:45 PM
LD F8,0(R3) ADDD F6,F4,F2 SUBD F4,F8,F0 MULTD F10,F4,F0 DIVD F12,F8,F2 LD F14,0(R4) MULTD F0,F6,F8
....... ADDI R8, R0, #7 LOOP1: ADDI R4, R0, #5 .......
LOOP2: SUBI R4, R4, #1 ....... BNEZ R4, LOOP2 ....... BNEZ R8, LOOP1 .......
a
, b
and c
are in Ra, Rb, and Rc respectively.
You may also assume that N
, x
and y
are contained in RN, Fx, and Fy respectively. Remember that you may need to
handle the first odd lot of elements using separate code.
for (i = 0; i < N; i++) { c[i] = (a[i] + x) * b[i] * y; }