[cairo] [PATCH] MMX and SSE work will not overlap for a few days.

André Tupinambá andrelrt at gmail.com
Tue Mar 18 04:21:46 PDT 2008


Hi Frédéric,

That's ok to me, I'm working only in SSE2 code and I promise to don't
touch anything before ask you so :)

BTW, Look at the e-mail from Jeff Muizelaar about a change in
pix_multiply function, he made some math optimization in the code.

Appling his optimization in MMX code, the pix_multiply can be changed
to something like:

mmx_4x0101 = 0x0101010101010101ULL,

static inline __m64
pix_multiply (__m64 a, __m64 b)
{
    __m64 res;

    res = _mm_mullo_pi16 (a, b);
    res = _mm_adds_pu16 (res, MC(4x0080));
    res = _mm_mulhi_pu16 (res, MC(4x0101));

    return res;
}

This modification speeds up the SSE2 code a lot and can be applied in
MMX code too.

Regards,

André

On Mon, Mar 17, 2008 at 2:11 PM, Frédéric Plourde
<frederic.plourde at polymtl.ca> wrote:
> For the next few days, I think our work won't overlap, as I'll be
>  working exclusively on MMX code. I found many perf regressions and weird
>  behaviors that I'm going to take a look at and resolve (many patches are
>  coming up soon). Even with SSE2 enabled, MMX paths seem important to me
>  because my team still need to maintain non-SSE systems like the OLPC.
>
>  I'll keep you posted if I change course.
>  -fred-


More information about the cairo mailing list