Re: [AD] sincos() also found in BCC32

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> I believe (if bcc32.txt is right) that BCC still cannot compile Allegro by
> itself. So, I guess this is not really interesting for now, but might be
> in the future.

I confirm that BCC still can't compile Allegro, because of a big problem:
assembly syntax. Allegro's assembly part is written in AT&T syntax, that BCC
doesn't understand. The same problem was worked around for MSVC by using GAS
(the GNU assembler) to assemble the files, but this doesn't work for BCC
because the object file format is not the same (GCC/MSVC: COFF, BCC: OMF).
The solution would be a COFF->OMF object file converter, but I haven't found
any yet.

> I had used the sincos() function also within BCC, which is declared at
> fastmath.h (line 84):
>
> void _FMAPI _fm_sincos(double __a, double *__x, double *__y);
>
> and is defined with a macro (#define sincos _fm_sincos). This routine is
> inlined (ie: no additional libraries), and is about 35-45% faster than
> calling cos() and sin() alone. However, I am not sure if it will work
> while in Allegro enviroment (Why not? Who knows?). Anyway, I cannot test
> if the addition is worth. Volunteers?

Thanks for the info. I think it would work, as this 'sincos' thing is
actually a feature of the 386 FPU so the function presumably compiles down
to a few asm instructions.

We plan to directly code an internal 386 asm 'sincos' function so as to get
rid of the dependency on the compiler runtime library.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/