"error: bp cannot be used in asm here"
Roland McGrath
roland@frob.com
Sat Aug 14 06:11:00 GMT 2004
> 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
More information about the Libc-alpha
mailing list