Question: As you know, the assembler translates pscudoinstructions into real instructions. Do this for each of the following pseudoinstructions (i.e., you are the assembler). Make sure
As you know, the assembler translates pscudoinstructions into real instructions. Do this for each of the following pseudoinstructions (i.e., you are the assembler).
Make sure to do it as efficiently as possible.
| Pseudoinstruction | What it accomplishes |
|---|---|
| move $s1,$t1 | $s1 <-- $t1 |
| bge $t1,$sp,label | If $t1 $sp go to L |
| addi $s1,$t3,big | $s1 <-- $t3+big |
| lw $sp,big($gp) | Like lw but with a 32-bit offset |
In the above instructions, "big" refers to a 32-bit immediate. You may use the notation biglo and bighi to refer to the lower and upper 16 bits of big (this can be determined by the assembler since big is an immediate). As always, the only branch-related instructions we are allowed to use in this course are slt, slti, beq, and bne (and the various forms of jump).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
