Short answers questions. a. True or false: It is of equal importance to eliminat
ID: 663810 • Letter: S
Question
Short answers questions.
a. True or false: It is of equal importance to eliminate nop instructions whether they occur inside a loop or immediately following an annulled branching instruction at the end of a loop.
b. Why do we not allow memory to memory operations for the SPARC machine?
c. Can we replace mov %o1, %o2 with add %o1, %g0, %o2?
d. Consider the following code as stored in the designated addresses. Provide the values of %r1 and %r2 after tracing the code.
mov 22, %r1
mov 35, %r2
subcc %r1, %r2, %r2
bg else
add %r2, 5, %r2
subcc %r1, 3, %r1
ba done
clr %r1
else: add %r2, 5, %r2
done: nop
Explanation / Answer
1. True
2. Because it has a very large latency to do this operation which will effect the performance of the machine. There is a swap instruction in sparc architecture.
3. Yes it is possible in sparc machines.
4. r1 should be 0 and r2 should be 40.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.