GCC 4.2 is generating wrong offset while compiling the attached example. This only happens when using -mcpu=iwmmxt option. It works ok on 3.4.6
/tmp/cc4oD6OO.s: Assembler messages: /tmp/cc4oD6OO.s:15151: Error: bad immediate value for half-word offset (328) /tmp/cc4oD6OO.s:15151: Error: bad immediate value for half-word offset (512) /tmp/cc4oD6OO.s:15151: Error: bad immediate value for half-word offset (328) /tmp/cc4oD6OO.s:15151: Error: bad immediate value for half-word offset (328) To reproduce this compile the testcase with gcc -O2 -c -mcpu=iwmmxt -- Summary: [Regression 4.2] Out of range offset for ldrd/strd intruction. Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: raj dot khem at gmail dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: armv5tel-*-linux-gnueabi http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29983