Compile the following code with: m68k-elf-gcc -c -O2 -mcpu=5272 lltest.c --save-temps -v
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- long long fred; void broken(int b) { fred = (long long)b; } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The assembler will correctly report: lltest.s:9: Error: operands mismatch -- statement `move.l 8(%fp),fred+4' ignored This is because this combination of modes ( move.l (d16,Ax),(xxx).L ) is invalid on coldfires. You'll get the same error if you specify a different cpu. The problem is in extendsidi2_mem in m68k.md. The change was introduced by Roman Zippel here: http://gcc.gnu.org/ml/gcc-patches/2007-01/msg02475.html I was able to work around the problem, and will attach the patch. The patch may not be ideal in all circumstances but I believe it does fix the problem. Jifl -- Summary: m68k coldfire uses bad mode when extending long long Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jifl-bugzilla at jifvik dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: m68k-elf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37905