为什么浮点寄存器与通用寄存器不同 [英] Why floating point registers are different than general purpose ones

查看:145
本文介绍了为什么浮点寄存器与通用寄存器不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大多数体系结构都有一组不同的寄存器,用于存储常规整数和浮点数.从二进制存储的角度来看,将对象存储在正确的位置应该没关系吗?只是1和0,难道它们不能将相同的通用寄存器传送到浮点ALU中吗?

Most architectures have different set of registers for storing regular integers and floating points. From a binary storage point of view, it shouldn't matter where things are stored right? it's just 1's and 0's, couldn't they pipe the same general purpose registers into floating point ALUs?

SIMD(x64中为 xmm )寄存器能够存储浮点数和正整数,因此为什么同一概念不适用于常规寄存器?

SIMD (xmm in x64) registers are capable of storing both Floating point and regular integers, so why doesn't the same concept apply to regular registers?

推荐答案

对于实际的处理器设计,要考虑的问题比二进制存储的观点"要多得多.

For practical processor design, there are a lot more issues to consider than "a binary storage point of view".

例如,线长很重要,这是因为可以一次移动数十位的并行路径占用了芯片空间,而且沿线获取信号也需要时间.几分之一英寸的时间并不多,但是当周期为几分之一秒时仍然很重要.为了进行比较,真空中的光可以在一纳秒内传播约11.8英寸.电线中的电信号较慢.

For example, wire lengths matter, both because parallel paths that can move dozens of bits at a time take chip space, and because getting a signal along a wire takes time. Not much time for fractions of an inch, but still significant when a cycle is a fraction of a nanosecond. For comparison, light in a vacuum can travel about 11.8 inches in one nanosecond. Electrical signals in wires are slower.

将寄存器放在要使用其内容的算术单元附近是个好主意.通过使用单独的整数和浮点寄存器,处理器可以使整数寄存器接近通用ALU,而浮点寄存器则接近浮点单元.

That makes it a good idea to put registers close to the arithmetic unit that is going to use their contents. With separate integer and floating point registers the processor can have integer registers close to the general ALU, and floating point registers close to the floating point unit.

还存在用于读取和写入寄存器的路径数量有限的问题.通过单独的寄存器组,ALU和浮点单元具有独立的寄存器访问路径,从而允许同时发生更多的事情.周期时间不再快速减少,并且处理器速度提高的其他来源之一是并行执行更多操作.

There are also issues of limited numbers of paths for reading and writing registers. With separate register banks, the ALU and the floating point unit have independent register access paths, allowing for more things to happen at the same time. Cycle times are no longer dropping rapidly, and one of the other sources of processor speed improvement is doing more in parallel.

我不知道目前哪个问题重要,但总的来说,将寄存器组分开给处理器设计人员提供了机会,如果将这些组合并在一起,将是他们没有的机会.

I don't know which of these issues matter currently, but in general separating the register banks gives processor designers opportunities they would not have if the banks were combined.

这篇关于为什么浮点寄存器与通用寄存器不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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