new syscall stub support for ia64 libc

Richard Henderson rth@twiddle.net
Fri Oct 31 08:45:00 GMT 2003


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~



More information about the Libc-hacker mailing list