[Openal-devel] [Fwd: [PATCH] MMX routines for mixing audio (linux)
(v2)]
James Tomaschke
james at infosemi.com
Thu Sep 8 11:17:41 PDT 2005
>>>I am a bit confused: Does the compiled code actually work? The
>>>pointers in the
>>>code are 32bit wide, but on x86_64 they are 64bit wide, so how can
>>>this work
>>>if you link it to 64biot code? I think _alHaveMMX() might work, but
>>>alMMXmemcpy()?
>>>
>>>
>>>
>>>
>>You would think it would, oh and it does segfault. I am working on a
>>testcase for that specific routine, it's going to require "yasm -m amd64
>>-f elf" to assemble so if you can work that into the configure.ac I'll
>>try and patch the asm.
>>
>>
>
>Here, I did a quick hacking, and I guess it should work.
>
>
That'll run the assembler, and it's pretty much what I got.
Have you checked the MPlayer sources? It does all this fast memcpy
stuff as well as detection of processer during config/compile and
runtime. It also supports SSE2/MMX2/3DNow/MMX/fallback, in that order
(fastest first). They used a simple if(gCpuCaps.hasSSE2) { ... } else
..., but I would have setup function pointers to the proper fast_memcpy
routines on startup and get rid of the memory access/test overhead.
Their assembly is done through inline gas in libvo/aclib_template.c, but
can be converted to NASM/YASM.
/j
--
James Tomaschke
Snr. Software Engineer
InfoSemiconductor, Inc.
More information about the Openal-devel
mailing list