This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]