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

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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: new syscall stub support for ia64 libc


On Thu, Oct 30, 2003 at 12:04:22AM -0800, David Mosberger wrote:
> +    __asm __volatile ("adds r2 = -8, r13;;\n"
> +		      "ld8 r2 = [r2];;\n"
> +		      "mov b7=r2;\n"
> +		      "br.call.sptk.many b6=b7;;\n"
> +                      : "=r" (_r8), "=r" (_r10),
> +			   "=r" (_r15) ASM_OUTARGS_##nr
> +                      : "2" (_r15) ASM_ARGS_##nr
> +		      : "memory", "ar.pfs" ASM_CLOBBERS_##nr);

Any particular reason why you're managing the memory load
from assembly?  Seems to me you could do

	__asm __volatile ("br.call.sptk.many b6=%0"
			  : ...
			  : "b" (__thread_self->whatever)
			  : ...);

Anyway, the magic -8 there certainly looks dangerous.


r~


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