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: [PATCH] ppc vdso, A working gettimeofday


On Fri, 2005-04-29 at 16:37 -0500, Steve Munroe wrote:
> This is the working kludge for binding to vdso functions from libc. In 
> this case userland gettimeofday for powerpc32/powerpc64. Tested with and 
> without (2.6.12 vs earlier kernels for powerpc) vdso and both modes 
> (32-/64-bit of powerpc.

  .../...

> 	   
> +#ifdef SHARED
> +    else
> +    {		   
> +    	return (*__vdso_gettimeofday)(tv, tz);
> +    }
> +#endif

You go through the burden of setting up a descriptor and calling through
it, which means unnecessary TOC loads etc... Best here is probably to
write __gettimeofday() entirely in assembly and to do a simpler pointer
call (or alternatively, just use an inline asm for the call itself, but
that is probably still overkill). The vDSO case doesn't even need a
stackframe to be built

Ben.



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