Hi,
I have found an error in the documentation of SPRUEO2A.pdf. On page 6 it covers this instruction:
MACF32 R7H, R3H, mem32, *XAR7++
Now it says the following in a code example:
RPT #3 ; Repeat MACF32 N+1 (4) times
|| MACF32 R7H, R3H, *XAR6++, *XAR7++
ADDF32 R7H, R7H, R3H ; Final Accumulate
However, I have used this instruction and found that not only do you have to add R3H to R7H, you also have to add R6H and R2H to R7H. This is probably due to how it works:
Cycle 1: R3H = R3H + R2H, R2H = [mem32] * [XAR7++]
Cycle 2: R7H = R7H + R6H, R6H = [mem32] * [XAR7++]
Cycle 3: R3H = R3H + R2H, R2H = [mem32] * [XAR7++] ; R3H = R3H + R2H (calculated in Cycle 1)
Cycle 4: R7H = R7H + R6H, R6H = [mem32] * [XAR7++] ; R7H = R7H + R6H (calculated in Cycle 2)
Thus if you end on cycle 4, R2H (calculated in cycle 3) and R6H (calculated in cycle 4) have NOT been added to the accumulate.
I verified this by getting the correct answer when I did the extra additions.
Is this just a documentation issue or is this not working as intended?
Thanks
Tim