[MPlayer-dev-eng] Non-inline asm code

Nick Kurshev nickols_k at mail.ru
Sat Dec 22 18:56:06 CET 2001


Hello, Arpi!

On Sat, 22 Dec 2001 19:32:02 +0200 (CEST) you wrote:

> Hi,
> 
> > > In this case it would be better to write: kill asm stuff by "C" with inline asm.
> > > It's no big problem - I'll do it soon (during jan-feb-2002).
> > > I don't like function inlining and prefer call them through pointer
> > > (for runtime support of each x86 clone - due unnecesary cache pollution).
> > 
> > Agreed. However it WOULD be possible to use "plugins" or whatever you wanted
> > to call ... We would be able to produce .a files for every CPUs, maybe
> > separated demuxer, native codecs and so on. This technique is used by XFree
> > for example: it CAN load .a files runtime! This is quite good thing, since
> did you already implemented .a loader/linker? :)
> 
> > we don't need use dl_open() and other functions (refeering functions with
> > pointers, slowing down because of used register for GOT in shared libraries).
> > It would be simply as fast as if mplayer would be statically linked together.
> > Nice, isn't it? 
> > 
> 
> .so does the same if compiled without -fPIC option. it's nice feature of
> linux, and a few other system (-fPIC means pointers for everythink, but
> without fPIC it will be relocated runtime so no pointers needed)
> 
You are able to build SO file with -fno-pic too ;)
But pointers are needed anyway.
Example:
func_ptr
if(cpu == sse) func_ptr = sse_func
else if(cpu==3dnow) func_ptr = c_func; /* to do it later */
Well - we need locate every function for clone in separate file like 3dnow_funcs.c
Linker will group it together and cpu will swap out unnecessary stuff from cpu's cache during mplayer working.
Also we need change function names from func_sse (now) to sse_func to get possibility
in the future perform sorting by names during linking.
> 
> A'rpi / Astral & ESP-team
> 
> --
> mailto:arpi at thot.banki.hu
> http://esp-team.scene.hu
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> 


Best regards! Nick



More information about the MPlayer-dev-eng mailing list