C Expression Operands in asm instructions
Tue Oct 16 07:08:00 GMT 2001
I am compiling a C program for the Motorola 68040 and am having a little
trouble creating a macro which has assembler instructions with C expression
operands. I have read the section "Assembler Instructions with C Expression
Operands" in the "Extensions to the C Language Family" manual but I am not
all that skilled in compiler technology.
The macro I have created is:
#define BugSystemCall(x) asm("TRAP #15; DC.W %0"::"n" (x))
The use of the macro is:
The the compiler output is:
TRAP #15; DC.W #99
The problem with this is the assembler does not like the '#' in front of the
99 and I don't know how to get rid of it. If I hard code the macro to be
asm("TRAP #15; DC.W 99") there is no problem.
I have tried every operand constraint that seemed like it might apply but no
This seems like it ought to be rather simple but I am somehow missing it.
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to email@example.com
More information about the crossgcc