This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: "error: bp cannot be used in asm here"
- From: Roland McGrath <roland at frob dot com>
- To: ams at kemisten dot nu (Alfred M. Szmidt)
- Cc: libc-alpha at sources dot redhat dot com
- Date: Fri, 13 Aug 2004 23:11:53 -0700
- Subject: Re: "error: bp cannot be used in asm here"
> The following change didn't fix the "bp cannot be used in asm here"
Note that the use of %ebp in the asm is just to clear the frame pointer,
i.e. it's a nicety rather than essential. Worst case, you can just comment
it out or I suppose put it in #ifndef PROF.
What happens if you just remove the "bp" clobber?
Something else you can experiment with is putting that bit of stub
elsewhere where gcc won't molest it. I don't know if it applies that same
check to a standalone asm, i.e.:
asm(".Lfoobar: movl %eax,%esp; movl $0,%ebp; jmp *%ecx");
and then
asm volatile ("jmp .Lfoobar" : : "a" (data), "c" (&doinit1));
> ../sysdeps/mach/hurd/i386/init-first.c:224: warning: use of cast expressions as lvalues is deprecated
This you should be able to fix by changing the type of NEWSP to int * and
adding casts to (void *) its other uses. Want to try that?
Thanks,
Roland