Why does gcc produce an unnecessary `nop' instruction?

John Love-Jensen eljay@adobe.com
Sat Jan 26 02:33:00 GMT 2008


Hi PRC,

> Is there a particular good reason for 8-byte alignment, even if the target
ARCH is 32-bit rather than 64-bit and aligment is quite a little waste of
storage and runtime memory?

Perhaps your platform supports 64-bit floating point, and that entails
alignment requirements?

Sometimes the "requirements" are performance related (e.g. Intel), sometimes
they avoid SIGBUS but can be "faked" with a sigtrap to handle misalignment
(such as what could be done on the DEC Alpha), sometimes they are really
hard requirements such as MMX/SSE or AltiVec.

Hard to say without looking at the config file for your particular platform.

Sincerely,
--Eljay



More information about the Gcc-help mailing list