Sample Exercises for Quiz 2

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
Sample Exercises for Quiz 2 Sample Exercises for Quiz 2 SPARC Pipelining, SPARC Assembly Language Instructions, Branching, Control Statements, Filling Delay Slots, Annulled Branches, Bitwise Logical Operations, Intro to the Data Segment, Intro to The Stack List the SPARC Assembly instructions that are delayed control transfer instructions that we normally fill the following instruction (the delay slot) with a nop instruction (before any optimization). Why do we need to be aware of this delay slot? What kind of instructions cannot be inserted into a delay slot? What other non-delayed control transfer instruction might cause a cycle to be wasted with a processor stall? Give an example of how this could occur. How could we avoid wasting a cycle in this particular situation? What are the Integer Condition Code (icc) bits? What does it mean if there is a 0 or a 1 in each bit? Translate the following C control statements into equivalent SPARC assembly. Give both unoptimized and optimized versions. Use only the "preferred" looping structure as specified in the Notes (the way real compilers translate loops). x = 3;
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.

This homework help was uploaded on 02/11/2008 for the course CSE 30 taught by Professor Ord during the Winter '08 term at UCSD.

Page1 / 5

Sample Exercises for Quiz 2 - Sample Exercises for Quiz 2...

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