在MIPS中,HI和LO是什么 [英] In MIPS, what are HI and LO

查看:768
本文介绍了在MIPS中,HI和LO是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读有关MIPS中的除法的信息,并且发现了div

I'm reading about division in MIPS and I've found that div

将$ s除以$ t并存储 $ LO中的商,其余部分中的商 $ HI

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

http://www.mrc.uidaho.edu/mrc/people/jff/digital/MIPSir.html

维基百科说

HI和LO用于访问乘数/除法器结果,可通过mfhi(从高位移动)和mflo命令访问.

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寄存器吗?它们是什么数字寄存器?

Are HI and LO registers? What number registers are they?

推荐答案

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

These are special registers used to store the result of multiplication and division. They are separate from the $0 .. $31 general purpose registers, not directly addressable. Their contents are accessed with special instructions mfhi and mflo (Move From HI/LO).

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

They are present in the Multiply Unit and are 32-bits each. More info here. As a pair, they hold the 64-bit full result of a 32x32-bit integer mult.

Raymond Chen的博客文章 MIPS R4000,第3部分:乘法,除法,并且气质的HI和LO寄存器具有有关早期MIPS的非直观行为的一些很好的信息,包括mtlo/mtlo分别使先前的hi/lo无效.

Raymond Chen's blog article The MIPS R4000, part 3: Multiplication, division, and the temperamental HI and LO registers has some very good info about early MIPS's non-intuitive behaviours, including mtlo / mtlo invalidating the previous hi / lo (respectively).

早期MIPS的不完整整数指令集参考(在问题中链接)也有一些详细信息,

The incomplete integer instruction-set reference (linked in the question) for early MIPS also has some details, http://www.mrc.uidaho.edu/mrc/people/jff/digital/MIPSir.html, or see MIPS's official PDF manuals, or PDFs of manuals for classic MIPS CPUs.

这篇关于在MIPS中,HI和LO是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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