Pseudo instructions ------------------- You may have noticed that we use commands like mv, li, and la, but that these are not listed in the RISC-V RV32I base integer instructions. Why? This is because they are pseudo instructions. (See the backside of the Reference Data Card in your book.) A pseudo instruction is a notational convenience for us, the assembly-language programmers. Consider the command: addi t0, t1, 0 It takes the current value of t1, adds it to 0, and stores the result in t0. t0 = t1 + 0 We can simplify this to: t0 = t1 which has the effect of moving t1's value to t0. Thus, the pseudo instruction mv t0, t1 is actually translated to the addi command. It's easier for us to work with mv, and helps make the code readable. Similarly, li t2, 5 could be implemented as addi t2, x0, 5 And la can be done with commands auipc to set the high bits, followed by addi for the low bits. auipc means Add Upper Immediate to Program Counter, which adds an immediate value, which is left-shifted by 12 bits, to PC, storing the result in whatever register you specify. This allows the address to be relative to the current PC value, so that the code is relocatable. Here are a couple links for more information: https://cs107e.github.io/readings/RISC-V-cheatsheet-RV32I-4-3.pdf https://github.com/riscv-non-isa/riscv-asm-manual/blob/main/src/asm-manual.adoc#pseudoinstructions This is also found in your book, pages 132-133.