Is there a reason why NOT to force 8-byte alignment for complex float type?

[亡魂溺海] 提交于 2019-12-13 03:38:23

问题


This is a follow-up for this question.

We have an implementation of GCC for our embedded architecture. As such we have control over some aspects of the compiler and optimizer. Such aspect may be potentially forcing the 8-byte aligned allocation of complex float objects. Generally speaking, on our architecture we can optimize access to these objects if they are properly aligned, by requiring a single double-load instruction instead of two regular loads.

Just before a round of enhancements and bug fixes, I am trying to figure out if there are good arguments against forcing such alignment when a complex float object is declared. Is there a reason why not to force that?

来源:https://stackoverflow.com/questions/10934987/is-there-a-reason-why-not-to-force-8-byte-alignment-for-complex-float-type

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