[cairo] [PATCH/pixman] Fix the SSE related AMD64 build breakage

Nicholas Miell nmiell at comcast.net
Mon Mar 17 15:18:19 PDT 2008


On Mon, 2008-03-17 at 20:05 +0100, Soeren Sandmann wrote:
> Nicholas Miell <nmiell at comcast.net> writes:
> 
> > >From 2527b35ff8eeacf9f42d529c12523f2c375295c8 Mon Sep 17 00:00:00 2001
> > From: nmiell at gmail.com <Nicholas Miell>
> > Date: Fri, 14 Mar 2008 22:23:19 -0700
> > Subject: [PATCH] Fix the SSE related AMD64 build breakage
> > 
> > The introduction of pixman_have_sse() copied the #ifdef __amd64__
> > found around pixman_have_mmx() in pixman-mmx.c but didn't include the
> > equivalents of the macros in pixman-mmx.h. As a result, the AMD64 link
> > fails because the pixman_have_sse() function doesn't exist.
> 
> Is it actually correct to skip the runtime check on x86-64? I don't
> think there is a guarantee that MMX will be supported forever. 

Hardware guys take backwards compatibility seriously -- I seriously
doubt Intel or AMD will ever remove MMX. (Doing so would break apps that
use MMX and have no fallbacks for non-MMX capable CPUs.)

> Also, is the optimization really worth it? It gets rid of one function
> call at the expense of compile-time complexity leading to bugs like
> this one.

It's a function call that occupies space in the RAS, the BTB, the
I-cache, and the D-cache for no reason when the bare minimum
architecture is defined to support MMX and SSE2.

> The patch looks otherwise fine to me.
> 
> 
> Soren
-- 
Nicholas Miell <nmiell at comcast.net>



More information about the cairo mailing list