This assignment is due 2007/03/28

Assembly languages provides opportunities to perform operations which cannot be expressed in higher level languages. One such operation is the ability to read special purpose registers. The SPARC has a register which increments at the speed of the basic clock, about 500 MHz. This clock can be used to get precise timing information about code execution.

Start with the base code, functions poly_quick_slick, poly_simple_slow, and gettick, and associated Makefile. This code computes a polynomial two different ways, while noting the time taken to do so.

Replace the call to gettick with direct use of rd %asr4, %XX (where XX is the appropriate destination register), in order to eliminate the overhead of making the extra function calls.

Describe the operation of each function by noting how the C program source maps to the assembly code, e.g., note what registers and memory locations hold what values, explain how looping is implemented in assembly code.

This description may be expressed in a separate document or in block comments within the program. (The latter has the advantage that it's easier to reference lines of code.)

Mail the file(s) to rbentson@ups.edu with the subject line "CSci281 Assignment 2007/03/28"


All the pieces


By the way...

The command info makefile will tell you all about how the make command works. I've also written a brief note about how the compiler operates.

Did you notice the different results from pss and pqs? Can you explain the difference?


CSci281/asgn0326/index.html was last edited by Randolph Bentson, on 2007/03/28T11:40:04-07:00

Valid HTML 4.01 Strict Valid CSS!