On Jan 22, 1:23 am, Robert Relyea <rrel...@redhat.com> wrote:
> Nelson B Bolyard wrote:
> > Julien R Pierre - Sun Microsystems wrote, On 2009-01-21 15:03:
>
> >> Even if you end up building NSS with optimizations, they use the regular
> >> multiply instructions, which performs best on AMD chips, but not as well
> >> on Intel CPUs. For Intel, one needs to use the SSE2 and above
> >> instructions set, which NSS currently doesn't do - except on one
> >> platform, Linux.
>
> > Is there any reason why we can't use the same optimizations on Darwin/x86
> > as we use on Linux?
>
> If darwin/x86 uses gas, then it's should be just a matter of setting
> some defines in the freebl make file and testing. (the primary thing
> that holds back using these assembler optimizations is differences in
> the assembler syntax on our various platforms).
>

Unfortunately it doesn't use gas.

I have modified the mpi_x86.s to use be able to compile it using gcc,
but I have a question.
The darwin mpi library is configured to use 64bits mp_digit (as
ULONG_LONG_MAX is defined and long long are 64 bits), and so, the
assembly file does not works.
Now, if I use the MP_USE_UINT_DIGIT preprocessor flag, I can force it
to defined mp_digit as 32 bits value, and it compiles fine (using the
same sse2 assembly than linux).

My first test shows a significant improvement:

average: 1371 ms
min: 389 ms, max: 2648


Is there a simple way to test if the generated values are correct ?

--
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to