gpt4 book ai didi

assembly - 在 MIPS 中,什么是 HI 和 LO

转载 作者:行者123 更新时间:2023-12-03 11:50:41 24 4
gpt4 key购买 nike

我正在阅读 MIPS 中的除法,我发现 div

Divides $s by $t and stores thequotient in $LO and the remainder in$HI


https://web.archive.org/web/20201111203150/http://www.mrc.uidaho.edu/mrc/people/jff/digital/MIPSir.html
维基百科说

HI and LO are used to access the multiplier/divider results, accessed by the mfhi (move from high) and mflo commands.


http://en.wikipedia.org/wiki/MIPS_architecture
HI 和 LO 是寄存器吗?它们是什么数字寄存器?

最佳答案

这些是用于存储乘法和除法结果的特殊寄存器。它们与 $0 .. $31 分开通用寄存器,不可直接寻址。它们的内容通过特殊说明访问 mfhimflo (从高/低移动)。

它们出现在乘法单元中,每个都是 32 位。更多信息 here .作为一对,它们保存 32x32 位整数的 64 位完整结果 mult .

Raymond Chen 的博客文章 The MIPS R4000, part 3: Multiplication, division, and the temperamental HI and LO registers有一些关于早期 MIPS 的非直觉行为的非常好的信息,包括 mtlo/mtlo使之前的 hi 失效/lo (分别)。

早期 MIPS 的不完整整数指令集引用(在问题中链接)也有一些细节,http://www.mrc.uidaho.edu/mrc/people/jff/digital/MIPSir.html ,或查看 MIPS 的官方 PDF 手册,或经典 MIPS CPU 手册的 PDF。

关于assembly - 在 MIPS 中,什么是 HI 和 LO,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2320196/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com