ass3 increment array pointer

30 views
Skip to first unread message

Taha Liaqat

unread,
Oct 28, 2020, 8:25:42 PM10/28/20
to cmpt-295-sfu
SFU ID: 301393248
Github username: tliaqat
Line and file: line 122 matmul.s
Expected behavior: d prints out correct answers
Observed behavior: d prints out garbage
Question: All my other code is done, but I can't know if its correct because my matmul just prints out garbage values in the array. I believe it is because my pointer to d is not being incremented properly, but Im pretty sure I am because that's how I've been doing it for my other functions, and they all work. Any help is much appreciated.
Screen Shot 2020-10-28 at 5.20.31 PM.png

ali sedaghati

unread,
Oct 28, 2020, 9:15:42 PM10/28/20
to cmpt-295-sfu
At first, a6 is pointing to the beginning of the array that you should be saving the result of the dot product in each element of it. So basically:
1. you should store the dot product in the location which the array pointer is pointing to.
2. Increase the pointer by a proper offset.
and keep doing to fill all elements of d.

Taha Liaqat

unread,
Oct 28, 2020, 9:20:38 PM10/28/20
to cmpt-295-sfu
when I try that ( sw a6 0(a0) ) I get an error saying the instruction is not found, and I don't know what that means. And is the offset different than the other functions we have to write? Because those functions work properly withe the same offset, and I don't see aa reason that the offsets should be different.
Screen Shot 2020-10-28 at 6.17.18 PM.png
Reply all
Reply to author
Forward
0 new messages