Why floating point registers are different than general purpose ones

筅森魡賤 提交于 2021-02-05 07:13:25

问题


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 (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?


回答1:


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

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.

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.

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.



来源:https://stackoverflow.com/questions/62047194/why-floating-point-registers-are-different-than-general-purpose-ones

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!