'mac.l' Assembler Operands Mismatch on 5282
Sam Skuce
sskuce at ati-ia.com
Thu Aug 23 16:50:17 UTC 2007
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
(difference is -m528x versus -mcpu=5282)
Here is a sample file I used to duplicate the problem, all the mac.l
instructions generate the error:
/* BEGIN SAMPLE FILE */
.global function
.global _function
.text
.align 4
function:
_function:
move.l #0, %acc
move.l (%a2)+, %d7
mac.l %d0, %d7
move.l (%a2)+, %d7
mac.l %d1, %d7
move.l (%a2)+, %d7
mac.l %d2, %d7
move.l (%a2)+, %d7
mac.l %d3, %d7
move.l (%a2)+, %d7
mac.l %d4, %d7
move.l (%a2)+, %d7
mac.l %d5, %d7
move.l %acc, %d7
move.l %d7, (%a0)+
rts
.end
/* END SAMPLE FILE */
What do I need to change to make this work with the new gcc version?
Thanks!
More information about the coldfire-gnu-discuss
mailing list