Question: A RISC machine may do both a mapping of symbolic registers to actual registers and a rearrangement of instructions for pipeline efficiency. An interesting question
A RISC machine may do both a mapping of symbolic registers to actual registers and a rearrangement of instructions for pipeline efficiency. An interesting question arises as to the order in which these two operations should be done. Consider the following program fragment:
.png)
a. First do the register mapping and then any possible instruction reordering. How many machine registers are used? Has there been any pipeline improvement?
b. Starting with the original program, now do instruction reordering and then any possible mapping. How many machine registers are used? Has there been any pipeline improvement?
LD SR1,A LD SR2, B ADD SR3, SR1, SR2 add contents of SR1 and SR2 and store in SR3 LD SR4, C LD SR5, D ADD SR6, SR4. SR5 load A into symbolic register 1 load B into symbolic register2
Step by Step Solution
3.44 Rating (160 Votes )
There are 3 Steps involved in it
a LD MR1 A load A into machine register 1 LD MR2 B load B into machine regist... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
896-C-S-S-A-D (2589).docx
120 KBs Word File
