Re: how to use macro in assemble language embedded in C?
From: Kaoru Fukui <hidden>
Date: 2000-12-27 11:04:44
Hi,
(NOTE: when reply this mail, please cc: kerler@newmail.net , thanks)
I change the first line of temp.c:
asm("#include <asm\\ptrace.h>\n\t");
to
asm("#include <asm/ptrace.h>\n\t");
==========temp.c==================
asm("#include <asm/ptrace.h>\n\t");
void dummy (void)
{
asm("stwu %r1, -PT_R16(%r1)"); /* stack */
}The problem is in YOUR syntax. Inline asm is C launguage ,so C rabel can not put in string field like "-PT _R16". The compiler doesn't search the rabel which is put in string field You can find some examples in asm-ppc. cd /usr/include/asm grep -n asm * | more The documentation is gcc source. Plaese get some new gcc's source,then open that. *importance* Read gcc/extend.texi. There is much help. More help is there(in gcc source). cd gcc grep -n asm | more You will have much help there. Kaoru ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/