Sample Exercises for Quiz 4
Subroutines, IEEE Floating Point
Describe the differences between open, closed, and leaf subroutines. What
are the advantages and disadvantages of each?
What is recursion?
Describe the general calling convention of general architectures with
regards to building and breaking down the Stack Frame, passing parameters,
etc. Who (the calling function or the called function) is responsible for
building and breaking down the various parts of the Stack Frame? Caller
Pre-Call, Call instr, Callee Prologue, Callee Epilogue, Caller Post-Return
Describe the calling convention of the SPARC architecture, in particular,
and how the SPARC architecture does something similar.
Describe each of the following SPARC instructions (what do they do?
what registers do they access/modify?).
Describe how you would pass more than 6 arguments to a function in the
SPARC architecture. How are they accessed from both the calling and the
What register do you use to access local variables allocated on the Stack?
With what relative offset do you access these local variables?
Why is it "a bad thing" to return a pointer to a local Stack variable? Why
are you "unlucky" if you do this and your program seems to work?
Describe the internal format for single- and double-precision IEEE floating
What is normalization? Hidden bit operation?
Why is the stored exponent in biased/excess notation of the real exponent?
Convert the following decimal values to single-precision IEEE floating
point representation (expressed in hex) showing the binary fixed-point
intermediate value __________ x 20.
Convert the following single-precision IEEE floating point representations
to fixed-point decimal values.