

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Due: Monday 03/16/09, Multiplication Factor: 1.
This assignment is just to get you comfortable with writing x86 assembly. This assignment will not be graded on measured performance, and we will not be applying a lot of complex optimizations (eg., software pipelining). However, I will be counting off for innefficient use of resources in the normal code (for instance, performing unnecessary memory loads in loops if you have available registers). You can get some credit back for mistakes of this sort by correcting the code.
I will also be grading on readability, as assembly needs to be made as clear as possible if it is to be maintained. Use the cpp tricks we discussed in class, and provide good (though not effusive) comments, particularly when you are doing something non-straightforward. Always show your current x87 stack. You may assume all dimensions are at least 1.
You will need to write three assembly routines, which I recommend tackling in the following order:
You will ignore the ta and tb parameters, always doing the ’Trans’, ’NoTrans’ case, as before. You do not need to unroll any loops, but you do need to correctly handle all α and β cases. In particular, β == 0.0 should not cause a read of C. You do not have to worry about efficiency, so you may apply α and β in the loops (rather than specialize many different cases). However, make sure you apply them in the most outer loop possible. Your loop order (from outer to inner) should be : NMK. Why is that? Name the file dgemm asg.S.
To get the file you need, perform:
cp /home/whaley/classes/spring09/cs6463/ASG5/Makefile.
I have provided testers for these routines. Advice on their use is as follows:
Again, other than making efficient use of resources (not loading from memory if you have register space, not loading the same value to two different registers, etc), do not worry about performance.
The only files you are allowed to modify are ddot.S, sdot.S and dgemm asg.S. These files should be e-mailed (either as an multiple attachment, or an attached tarfile) to [email protected] before midnight on the due date. I will be grading this assignment on the main20x machines.