Quiz4.fa07

SPARC Architecture, Assembly Language Programming, and C (2nd Edition)

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Student ID __________________ Name_______________ cs30x____ Signature ____________________ Score: Quiz 4 CSE 30 Fall 2007 #1. On the SPARC architecture, ________________________ are accessed with a positive offset from %fp. ___________ instruction saves the current value of %pc in ___________. ___________ instruction adds ________ to the value %i7 and stores the result in %pc. ___________ do not guarantee their arguments will be evaluated only once. ___________ subroutine is a subroutine that uses save and restore instructions. ___________ instruction should never have a restore instruction in its delay slot. ___________ subroutine is a traditional subroutine that passes parameters on the stack. Why is it a "bad thing" to return a pointer to a local variable or parameter? #2. Write the appropriate save instruction to allocate stack space for the following local variable . struct foo { char a; short b; long c; char d; double e; } fubar; save ________ , ______________________________________, _________
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Quiz4.fa07 - Student ID _ Signature _ Name_ cs30x_ Score:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online