Re: Question: MCF5275 parameter passing assembly in C code
Yevgeni Tunik <[email protected]> Mon, 17 Mar 2008 23:03:25 -0700 (PDT)
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers.coldfire |
|---|---|
| Message-ID | <[email protected]> |
Possibly, two Freescale sets of source code (CodeWarrior) can help: 1. DSPLIBUM : Digital Signal Processing Libraries Using the ColdFire eMAC and MAC (pdf) http://www.freescale.com/files/32bit/doc/ref_manual/DSPLIBUM.pdf?fsrch=1 "This document provides a library of macros designed to ensure efficient programming of the ColdFire processor using MAX..." DSPLIBUMSW : "Digital Signal Processing Libraries Using the ColdFire eMAC and MAC User's Manual" Software (zip) http://www.freescale.com/webapp/sps/download/license.jsp?colCode=DSPLIBUMSW&location=null&fsrch=1 "Accompanying software to the "Digital Signal Processing Libraries Using the ColdFire eMAC and MAC User's Manual" 2. CFLMOPM : Library of Macros for Optimization Using eMAC and MAC Programmer's Manual (pdf) "This programmer's manual provides a detailed description of a set of macros used for optimizations." http://www.freescale.com/files/32bit/doc/ref_manual/CFLMOPM.pdf?fsrch=1 CFLMOPMSW : Software for the Library of Macros for Optimization Using eMAC and MAC Programmer's Manual (zip) https://www.freescale.com/webapp/Download?colCode=CFLMOPMSW&appType=license&location=null&fsrch=1 "Software for the CFLMOPM" --- Andy Gabler <[email protected]> wrote: > Greetings all, > > I am working on an FIR filter to implement on the MCF5275. When I > compile my FIR filter from C it uses the "mul" command rather than the > "mac" command to implement the multiply accumulate stage of the FIR > filter. I would like to place some assembly code inline to force the > use of the "mac" command. > > This is what I have been playing with and would like to do; however, I > do not know the proper way to define which register my variable in C > (like "itap") gets stored in so I can reference it in my "mac" > instruction. Can anyone shed any light on how to do this? > > //sum += taps[i] * delayLine[i]; > itap = taps[i]; > iDelayLine = delayLine[i]; > asm ("move.l _itap, %d0\n\t" > "move.l _iDelayLine, %d1\n\t" > "mac.w %d0.l, %d1.l 00, %ACC0"); > delayLine[i+1] = delayLine[i]; > > Also do any of you have any idea why the compiler comes up with this error: > > "/tmp/ccjIiru2.s Error: syntax error -- statement `mac.w %d0.l,%d1.l > 00,%ACC0' ignored" > > concerning my mac instruction? > > Thank you! > > -andy > --- > [email protected] Send a post to the list. > [email protected] Join the list. > [email protected] Join the list in digest mode. > [email protected] Leave the list. > > Regards, Yevgeni Tunik 052-448-9271 ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ --- [email protected] Send a post to the list. [email protected] Join the list. [email protected] Join the list in digest mode. [email protected] Leave the list.