[uClinux-dev] about the inline assemble error , about ColdFire MCF5249

Qiao Guangjun-rg273c rg273c at freescale.com
Wed Aug 3 17:42:26 EDT 2005


 

 
Hi, everyone
I installed the m68k-elf-tools-20030314, and to build GNU tools that support ColdFire5249's EMAC, I install binutils-0501xx.tar.bz2  too.
And the GNU tools compile the assemble program well, but as to inline assemble, error occured!
 

 

 

[root at ellis result]# m68k-elf-gcc -Wa,-m5249 -c test.c -O4 -W -Wall

 
 




/tmp/ccun8bu7.s: Assembler messages:
/tmp/ccun8bu7.s:13: Error: operands mismatch -- statement `movm.l #0x3f3c,-(%sp)' ignored
/tmp/ccun8bu7.s:120: Error: invalid instruction for this architecture; needs 68000 or higher -- statement `lsl.w #1,%d0' ignored
/tmp/ccun8bu7.s:123: Error: invalid instruction for this architecture; needs 68000 or 68010 or 68020 or 68030 or 68040 or
68060 or cpu32 or 5407 or 547x or 548x -- statement `cmp.w #31130,-1194(%a6)' ignored
/tmp/ccun8bu7.s:125: Error: invalid instruction for this architecture; needs 68000 or higher -- statement `addq.w #1,%d0'
ignored
/tmp/ccun8bu7.s:131: Error: invalid instruction for this architecture; needs 68000 or higher -- statement `dbra %d7,.L6' ignored
/tmp/ccun8bu7.s:135: Error: invalid instruction for this architecture; needs 68000 or higher -- statement `and.w #32767,(%a5)' ignored
/tmp/ccun8bu7.s:147: Error: invalid instruction for this architecture; needs 68000 or higher -- statement `dbra %d2,.L12'
ignored
/tmp/ccun8bu7.s:154: Error: invalid instruction for this architecture; needs 68000 or higher -- statement `or.w #-32768,(%a5)' ignored
/tmp/ccun8bu7.s:180: Error: operands mismatch -- statement `movm.l #0x3f3c,-(%sp)' ignored
/tmp/ccun8bu7.s:306: Error: invalid instruction for this architecture; needs 68000 or higher -- statement `and.w #65532,%d0' ignored
/tmp/ccun8bu7.s:414: Error: operands mismatch -- statement `movm.l #0x3f3c,-(%sp)' ignored
/tmp/ccun8bu7.s:545: Error: operands mismatch -- statement `mac.w %d1,%d0u,<<,%acc0' ignored
/tmp/ccun8bu7.s:582: Error: Unknown operator -- statement `return' ignored
/tmp/ccun8bu7.s:587: Error: operands mismatch -- statement `movm.l (%sp)+,#0x3cfc' ignored
/tmp/ccun8bu7.s:605: Error: operands mismatch -- statement `movm.l #0x353c,-(%sp)' ignored
/tmp/ccun8bu7.s:678: Error: operands mismatch -- statement `movm.l (%sp)+,#0x3cac' ignored
/tmp/ccun8bu7.s:696: Error: operands mismatch -- statement `movm.l #0x3b3c,-(%sp)' ignored
/tmp/ccun8bu7.s:754: Error: invalid instruction for this architecture; needs 68000 or higher -- statement `dbra %d4,.L27'
ignored
/tmp/ccun8bu7.s:758: Error: operands mismatch -- statement `movm.l (%sp)+,#0x3cdc' ignored
/tmp/ccun8bu7.s:768: Error: operands mismatch -- statement `movm.l #0x3f3c,-(%sp)' ignored
/tmp/ccun8bu7.s:889: Error: operands mismatch -- statement `movm.l (%sp)+,#0x3cfc' ignored
/tmp/ccun8bu7.s:907: Error: operands mismatch -- statement `movm.l #0x2f3c,-(%sp)' ignored
/tmp/ccun8bu7.s:1024: Error: operands mismatch -- statement `movm.l (%sp)+,#0x3cf4' ignored
/tmp/ccun8bu7.s:1042: Error: operands mismatch -- statement `movm.l #0x3f3c,-(%sp)' ignored
/tmp/ccun8bu7.s:1173: Error: operands mismatch -- statement `movm.l (%sp)+,#0x3cfc' ignored
/tmp/ccun8bu7.s:1188: Error: operands mismatch -- statement `movm.l #0x3720,-(%sp)' ignored
/tmp/ccun8bu7.s:1251: Error: operands mismatch -- statement `movm.l (%sp)+,#0x4ec' ignored
[root at ellis result]#
 

 

 

I find the problem is that, in C languge, such as :

short a, b c;

a=12;

b=34;

c=a+b;

 

The compiler will translate them into:

 

add.w %d0, %d1

 

while in MCF5249, add is long operation, add.w is illegal. only add.l is ok!

 

and  movm.l #0x3f3c,-(%sp) is illgegal too,in MCF movem.l is ok while movm.l is not ok!

 

And how can I solve the problem.

 

a section of my program is attached!

 

void  Comp_XX( Word16 *UnqDat, Word16 *PrevDat, Word16 *DataBuff )
{
   int   i,j,k ;

    Word16   Dpnt[Frame+LpcFrame-SubFrLen] ;
    Word16   Vect[LpcFrame] ;
    Word16   ShAcf_sf[SubFrames];
    Word16   Exp   ;
    Word16   *curAcf;
    Word16   Pk2;

    Word32   Acc0,Acc1 ,Acc2,Acc3,Acc4;
Word16   *Dpnt1;
   __asm
(
       "move.l  %0,%%a0\n"
      "lea  %1,%%a1\n"
      "move.l  %%a1,%%a2\n"
      "adda.l  #240,%%a2\n"
      "comp1:\n"
      "move.l   (%%a0)+,(%%a1)+\n"  
      "move.l   (%%a0)+,(%%a1)+\n"  
      "cmp.l    %%a2,%%a1\n"                        

     "move.l  %2,%%a2\n"
      "move.l  %%a2,%%a3\n"
      "adda.l  #480,%%a3\n"
"comp2:\n"
      "move.l   (%%a2)+,(%%a1)+\n"  
      "move.l   (%%a2)+,(%%a1)+\n"  
      "cmp.l   %%a3,%%a2\n"                 

      "blt   comp2\n"                           
   :
   :"m"(PrevDat),"m"(Dpnt),"m"(DataBuff)
   :"a0","a1","a2","a3"
     );
.

.

.

.

.}

 

 

Then error occur! 

Error: operands mismatch -- statement `movm.l #0x3f3c,-(%sp)' ignored

 
 
Thanks
 
Best Regard!
 
Joey 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20050803/848d9388/attachment.html>


More information about the uClinux-dev mailing list