David Miller wrote:
> I think the hook to install the routines should be all hidden away in
> some header file and all ugly ifdefs removed. Here is a suggested
> layout:
>
> 1) Create a directory src/asm, here goes things like asm_386_xxx.S,
> asm_sparc_xxx.S etc.
>
> 2) Create src/asm.h which looks something like:
>
> extern ... install_arch_xform_asm(...)
> extern ... install_arch_blend_asm(...)
>
> So files like src/xform.c call their function.
>
> 3) Under src/asm we have a "asm_none.c" file which just implements
> the above install_arch_*() functions as doing nothing.
>
> 4) Each asm support layer has several components, for example:
>
> asm_i386_xform.S i386 vertex transformations
> asm_i386_blend.S perhaps MMX blending routines
> asm_i386.c installs the routines
>
> and similarly for sparc etc. asm_i386.c is where you can
> implement the checking of the processor type to install the
> correct routines for example.
>
> 5) src/asm/Makefile magic to compile in the appropriate stuff and
> create a libasm.o object which the toplevel makefile links into
> the final Mesa lib...
>
> Comments? I think it would be really nice to see all the ifdef
> ASM_XXX stuff not be in the toplevel src/*.[ch] files, it's pretty
> ugly. Next we can clean up similar stuff from src/mmath.h for
> example.
I like your ideas David. Minimizing #ifdefs in the core code has
been a goal of mine all along.
Now's the time to define these conventions for assembly code since
the transformation code probably won't be dramatically changed
for a long time and we're on the verge of getting several new
batches of assembly optimization (i.e. 3DNow, PIII).
-Brian
----------------------------------------------------------------------
Brian Paul Avid Technology / Softimage [EMAIL PROTECTED]