Pseudoinstructions
Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.
Pseudoinstructions
The questions below will be asking you to write possible equivalent lines of assembly code from pseudoinstructions to non-pseudo instructions and vice versa. You may need to use the RISC-V ISA Handout for reference.
1) Pseudo to non-pseudo
For each of the following, write a possible equivalent line of assembly code that does the same thing using non-pseudo instructions
1.1) mv a3, a7
1.2) call function_name
1.3) beqz a4, return
1.4) li a2, 17
2) Non-pseudo to pseudo
For each of the following, write a possible equivalent line of assembly code that does the same thing using pseudoinstructions
2.1) blt a3, zero, name
2.2) sub a4, zero, a2
2.3) addi a2, zero, 31
2.4) add a4, zero, a3
2.5) bne a5, zero, loop