[Fwd: Re: [sldev] SSE2 / Ouch]
Robin Cornelius
robin.cornelius at gmail.com
Mon Jul 9 08:41:04 PDT 2007
On 7/9/07, Nicholaz Beresford <nicholaz at blueflash.cc> wrote:
>
> Dzon says:
> > From what I read on the jira issue and in these mails, it sounds like
> > the gSysCPU.hasSSE() doesn't return the correct result for AMD
> > processors.
>
> From the way I read it (the JIRA and what Dirk says), there's code
> executed through constructors of global objects, long before the
> crt startup code even thinks about calling main()/WinMain().
>
> Either that, or you rely on gSysCPU being istantiated globally
> before those other global or static objects ...
>
In this case could somthing like the following be done (note I'm just
digging in so I suspect practacly this is hard due to what i hear
about the code base).
Don't have global objects per say, have a CGlobal for example that
contains everything else then you can build two versions of CGlobal
as well with and without SSE and simply have one global pointer
CGlobal * plobal; You shouldn;t get any early initalisation cause no
global stuff will exist untill a new GGlobal or a new CGlobal_sse is
created (i hope).
As for your previous comment, yes I too would have fallen for this
trap and it *seemed* like the right thing to do at the time
--
Robin Cornelius
http://www.byteme.org.uk
More information about the SLDev
mailing list