mips汇编问题

发布于 2024-08-08 03:24:31 字数 50 浏览 1 评论 0原文

有谁知道CPU如何确定哪个寄存器应该接收指令产生的结果?

有人吗???

does anyone know how the CPU determines which register should receive the result produced by an instruction?

anyone???

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

女中豪杰 2024-08-15 03:24:32

这取决于指令。许多指令将目标寄存器作为参数,而其他指令则定义了结果存储位置的行为。例如ADD指令:

add $d, $s, $t 

$s + $t的结果存入$d

这是完整的参考

That would depend on the instruction. Many instructions take the destination register as an argument, and others have defined behavior as to where a result is stored. For example, the ADD instruction:

add $d, $s, $t 

The result of $s + $t is stored into $d

Here is the full reference

还给你自由 2024-08-15 03:24:32

它被编码在指令中。例如,“add”采用 dest、op1、op2,并且 dest = op1+op2。

请参阅有关 MIPS 架构的维基百科页面

It's encoded in the instruction. For example, "add" takes dest, op1, op2 and does dest = op1+op2.

See Wikipedia's page on MIPS architecture

吃不饱 2024-08-15 03:24:32

对于添加或配音等基本指令,您需要定义它所在的寄存器。 mul 和 div 指令将值放入 hi 和 lo 寄存器中。

For basic instructions like an add or a dub you need to define the register it goes into. mul and div instructions put values in hi and lo registers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文