为什么不存在MIPS的子操作码? [英] Why doesn't there exists a subi opcode for MIPS?

查看:374
本文介绍了为什么不存在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆