Difference between adding 0 and moving a register in MIPS

心已入冬 提交于 2021-02-05 09:55:34

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!