Ton van Overbeek wrote:
> 
> On 2005-04-05, Greg Sepesi <[EMAIL PROTECTED]> wrote:
(clipped)
> >
> > //   pPeckAudio->a *= pPeckAudio->b;
> >    __asm__("
> >       move.l   28(%a2),%d0;
> >       mulu.l   24(%a2),%d0;
> >       move.l   %d0,24(%a2);
> >    ");
> >
> > - - -
> >
> > However, that results in the compiler error: "invalid instruction for
> > this architecture; needs 68020 or 68030 or 68040 or 68060 or cpu32 or
> > 5200 or 5206e or 5307 or 5407 -- statement `mulu.l 24(%a2),%d0'
> > ignored".  That's a bit confusing because the MC68EZ328 User Manual
> > lists a mulu instruction in its EC000 instruction set.  I've never had
> > to mess much with the prc-tools.  Do I need to somewhere specify that I
> > want gcc to produce MC68EZ328 instructions?
> >
> > Before I get into this any deeper, I'd like to ask how others have
> > implemented multiplications from within callbacks.
> >
> > Thanks,
> > Greg
> >
> 
> The assembler in the m68k-palmos-gcc backend defaults to the bare-bones
> m68000 instruction set. You can see this if you do 'm68k-palmos-gcc
> -dumpspecs'.
> As a workaround use the '-Wa,-m68020' option to force the assembler to
> recognize the mulu.l instruction.
> 
> HTH
> Ton van Overbeek

For this application, to avoid some potential code maintenance problems
(e.g., updating the structure without remembering to update the
structure offsets in the inline assembly) I plan on using the gcc
multiply subroutine rather than the inline assembly.  But thanks for the
good tips on those two gcc options.

Greg

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to