4 ms·
You think a chip will be a financial success based on whether it supports unaligned reads? Almost zero software out there actually needs unaligned reads.
by kayamon 8y ago
You think a chip will be a financial success based on whether it supports unaligned reads?
Almost zero software out there actually needs unaligned reads.
- burfog 8y agoYes. Most of the troubles related to -fstrict-aliasing involve unaligned reads. All sorts of file formats, TIFF for example, are most easily handled with unaligned reads.
- kayamon 8y agoMost of the troubles related to -fstrict-aliasing involve -fstrict-aliasing.
- burfog 8y agoIf the processor supports unaligned reads, sure, you could say that, though it still technically violates the C standard. Otherwise, no. A typical issue would have code like this: foo = * (bar * )baz; // baz is a char pointer into a binary blob, and bar is a type that needs alignment If the data were all properly aligned, then most likely there would be no desire to write such code. The correct types would be used. Aside from gcc abusively optimizing, the above works fine on x86, PowerPC, and modern ARM. It does not work on older ARM. That sort of code is everywhere.