为什么不存在MIPS的子操作码? [英] Why doesn't there exists a subi opcode for MIPS?
问题描述
我对汇编语言很陌生.我在阅读有关 MIPS 体系结构的信息时,才知道您具有addi
操作码,但是没有subi
操作码.谁能解释一下为什么我们没有subi
操作码?
I am very new to Assembly language. I was reading about MIPS architecture and came to know that you have addi
opcode but there is no subi
opcode. Can anyone please explain me why don't we have a subi
opcode?
谢谢.
推荐答案
创建指令集时,您会受到一些约束,例如可以创建的指令总数. MIPS的创建者意识到不需要subi
(因为您可以使用2的补码在addi
处添加一个负数),他们只是做出了放弃该指令的决定.可能是为了节省指令数,或者仅仅是因为不需要它.
When you create an instruction set, you're bound by some constraints, such as the total number of instructions you can create. The MIPS creators realized that there isn't a need for subi
(because you can add a negative number with addi
using 2's complement), and they simply made the decision to forego making that instruction. It may have been to conserve the number of instructions, or just simply because it isn't needed.
这篇关于为什么不存在MIPS的子操作码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!