Question: Problem 1 [24 points]: MIPS warm-up Many assemblers can provide instructions that are not directly available in the ISA. These pseudoinstructions are implemented by using

 Problem 1 [24 points]: MIPS warm-up Many assemblers can provide instructions

Problem 1 [24 points]: MIPS warm-up Many assemblers can provide instructions that are not directly available in the ISA. These pseudoinstructions are implemented by using a small sequence of actual instructions, or by "repurposing" actual instructions with more useful names. Some of these pseudoinstructions require a register to hold temporary data. Register $at (assembler temporary, or MIPS register 1) is reserved for the assembler's use for such instructions. Expand the pseudo instructions in the table into actual MIPS assembly instructions. = Pseudoinstruction What it accomplishes 1 clear $ti $t1 = 0 2 bne $t3, big, H If ($t3 != big) goto H 3 li $t1, small $t1 = small 4 la $t2, addr $t2 = addr 5 bge $t3, $t4, H If ($t3 >= $t4) goto H 6 blt $t4, $t3, H If ($t4 $s2), otherwise 10 rem $t0, $t1, $t2 $t0 = $t1 = $t2 11 nop (no visible change to the processor) 12 not $t1, $t2 $t1 = $$t2 Variables big (32 bits wide) and small (16 bits wide) are immediate numbers. Variable addr is a memory address. You can use the commands upper (big) and lower (big) to get the upper and lower sets of 16 bits from big. Note that your answers should only use the special $at (assembler) register and $zero along with those provided in the pseudoinstruction. Use as few instructions as possible in your answers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!