GNU assembler question for MPC555X assembler macros
Peter Dufault
dufault at hda.com
Thu May 29 20:25:57 UTC 2014
This is off-topic for RTEMS, but before I go to another list I'll see if anyone here can answer, plus people will know I'm looking at the MPC55XX DSP library. I'm sure this is simple but I've spent .5 hours and not figured it out.
I want to do some timings on the Freescale MPC55XX DSP library, which comes in C and SPE (signal processing extension) assembler. The C all built, but the macros don't assemble:
bitrev_table_16bit.s: Assembler messages:
bitrev_table_16bit.s:116: Error: syntax error; end of line, expected `('
Here's the macro definition causing the above error:
.set ONE_ITEM_TABLE_BYTESIZE, 2 #/* size of one item in seed table in bytes */
#/* macros defining load/store instructions for different data types */
.macro load a,b
.if ONE_ITEM_BYTESIZE == 8
evldw a,b
.elseif ONE_ITEM_BYTESIZE == 4
lwz a,b
.else
lhz a,b
.endif
.endm
And here is its invocation at line 116:
load tmp_i,0(i_addr); #/* load tmp_i */
I tried lots of variations of parenthesis without luck, always getting the same error:
load (tmp_i),(0(i_addr)); #/* load tmp_i */
load tmp_i,(0(i_addr)); #/* load tmp_i */
Replacing it with what I know the expansion should be causes it to work:
lhz tmp_i,0(i_addr); #/* load tmp_i */
Does anyone know the correct incantation?
Peter
-----------------
Peter Dufault
HD Associates, Inc. Software and System Engineering
More information about the users
mailing list