Assignment 3 matmul.s

117 views
Skip to first unread message

Jenna Liebe

unread,
Oct 26, 2020, 2:20:23 PM10/26/20
to cmpt-295-sfu
SFU ID: 301358537
Github username: jel-cmpt295
Github: Link to github repo (your assignment repos are private so these links are only accessible to TAs and Instructor): https://github.com/CMPT-295-SFU/assignment-3-jel-cmpt295
Line and file: matmul.s, line 93
Expected behavior: Outputs 3x3 matrix with values from ref/test_matmul.out (calculated by dot.s)
Observed behavior: Outputs 3x3 matrix with all zeros
Question: 
My test_matmul outputs a 3x3 matrix filled with zeros and I can't figure out why the values from dot.s aren't there instead. I thought I calculated the addresses correctly and I'm pretty sure all the arguments I need for dot.s to work are included in my matmul.s file. I'm not sure if this is a problem with dot.s, matmul.s, or test_matmul.s - my test_dot.s works though.

Any help/ideas would be great!

ali sedaghati

unread,
Oct 26, 2020, 3:07:37 PM10/26/20
to cmpt-295-sfu
Please make sure that you're following the calling conventions. For example, you should change how you're using "a" registers for storing the temp variables. Apart from that, you're never increasing the pointer which points to "d". So, you're writing on one location over and over. 

Jenna Liebe

unread,
Oct 26, 2020, 5:33:04 PM10/26/20
to cmpt-295-sfu
Okay, thank you! So is it just a problem with my matmul.s file?

ali sedaghati

unread,
Oct 26, 2020, 9:42:04 PM10/26/20
to cmpt-295-sfu
Yes, changing it should solve the problem.

Jenna Liebe

unread,
Oct 27, 2020, 12:12:05 AM10/27/20
to cmpt-295-sfu
Thanks for the help! I finally got it figured out!
Reply all
Reply to author
Forward
0 new messages