[coldfire-gnu-discuss] 'mac.l' Assembler Operands Mismatch on 5282

Nathan Sidwell nathan at codesourcery.com
Thu Aug 23 18:04:38 UTC 2007


Sam Skuce wrote:
> I have some code that compiled with no errors under a 3.3.2 version of
> m68k-elf-gcc, that gives me the error "operands mismatch -- statement
> `mac.l %d0,%d7' ignored" with m68k-elf-gcc-4.2.0.  I have tried
> compiling it with:
> 
> $ m68k-elf-gcc-4.2.0 -c -g -mcpu=5282 -Wall -O3 -fno-builtin
> operandmismatch.S -Wa,-acdhlns=../obj/operandmismatch.lst -o
> ../obj/operandmismatch.o
> 
> And 
> 
> $ m68k-elf-gcc-4.2.0 -c -g -m528x -Wall -O3 -fno-builtin
> operandmismatch.S -Wa,-acdhlns=../obj/operandmismatch.lst -o
> ../obj/operandmismatch.o

the 5282 has an emac, not a mac.  You need to specify the accumulator too.  for 
instance
	mac.l %d0,%d1,%acc0

btw, this is a feature of the assembler, not the compiler.  The versions you 
name (3.3.2 and 4.2.0) are compiler versions.

nathan
-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery




More information about the coldfire-gnu-discuss mailing list