问题
What's the difference between:
add rd, rs, zero
and
move rd, rs
They both look like they should do the same thing.
回答1:
The move is a pseudoinstruction, they do the same job. MIPS is a reduced instruction set computer (RISC), so the instruction size and hardware complexity are minimized by keeping the number of instructions small.
However, MIPS defines pseudoinstructions that are not actually part
of the instruction set but are commonly used by programmers and compilers.
来源:https://stackoverflow.com/questions/42315308/difference-between-adding-0-and-moving-a-register-in-mips