Bytes are typically extracted from e.g. u64's by something like #define D5(v) (((v) >> 40) & 0xff)
Testcase shows that gcc does not optimize this "good enough". -- Summary: Suboptimal byte extraction from larger integers Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: vda at port dot imtp dot ilyichevsk dot odessa dot ua CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i386-pc-linux-gnu GCC host triplet: i386-pc-linux-gnu GCC target triplet: i386-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21150