On Sun, Feb 17, 2002 at 01:06:07PM +1100, David Burrows wrote: > On 16 Feb 2002, Alexander Ehlert wrote: > > > Hi, > > > > AFAIK there are no flags whatsoever to indicate which processor a plugin > > might use. So if someone wants to hack a plugin that uses SSE > > instructions and someone else tries to use that on a host without SSE > > support -> crash. So wouldn't it be good to add some architecture flags, > > that could be queried by the host? > > Under Linux with proc filesystem support you can simply take a look at > /proc/cpuinfo, specifically the flags line. There may even be some kind > of kernel syscall that returns the processor flags that are set/available.
Well, thats the local CPU part, but the point was to query the subarchitecture the _plugin_ was compiled for. F.I. if you run a SSE using plugin on a not-SSE-supporting platform you get SIGILL and probably a crash of your whole program. Btw, querying would be not enough, but instead having multiple objects for each subarchitecture would be necessary - or autodetection of CPU capability inside the plugin. Richard. -- Richard Guenther <[EMAIL PROTECTED]> WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/ The GLAME Project: http://www.glame.de/
