[Fwd: Re: [sldev] SSE2 / Ouch]
Dzonatas
dzonatas at dzonux.net
Mon Jul 9 09:11:53 PDT 2007
Actually, I'm not fond of the C++ auto-initialized global constructors.
There is no way to tell in source code when they are executed and in
what order. (See: VWR-225 and
https://wiki.secondlife.com/wiki/Bug_triage/2007-06-11 where such
movement to fix it went stale)
They are good for debug code, but that is about it. All intentional
globals should be constructed explicitly within main() or likewise;
otherwise, it is a chaotic startup. Even so, I still doubt there
actually is stray SSE code unless someone enabled "whole program
optimization", which was off.
Most of this is beyond what the original contract wanted me to do. We
did research it to find out what other changes need to be made. The
heuristic step added in made it so we could avoid a lot of other changes.
SO.....
What's left is that there is the possibility that LLV4Matrix4 globals
being initialized with SSE code on non-SSE CPUs. It looks like VWR-225
would have helped avoid this, but I was being told that I wasted their
time. (...hunger strike continues)
Nicholaz Beresford 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 ...
>
>
>
> Nick
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> /index.html
>
>
--
Power to Change the Void
More information about the SLDev
mailing list