|
From: Greg C. <chi...@co...> - 2006-04-05 13:14:54
|
On 2006-4-5 12:04 UTC, Christian Anthon wrote: > > I have a problem using the gnubg progam (www.gnubg.org) when compiled with > mingw using the -msse flag. The program contains uses sse for cpu's that > have it and checks for it's presence at runtime. When the program is ran > my old athlon-thunderbird it crashes shortly after start. > > Running gnubg through gnudb tells me that it is a integer to float > conversion that fails: [...] > Program received signal SIGILL, Illegal instruction. > randRange (range=0.705000103) at misc3d.c:792 > 792 return range * ((float)rand() / (float)RAND_MAX); Presumably typing 'disas' at this point in gdb would show you the illegal instruction, so that you could verify whether it's indeed not implemented on your hardware. I haven't worked with gcc's '-msse' in particular, but I wouldn't be surprised by a compiler that trusts the user to specify which floating-point instructions are available, and then uses them for floating-integral conversions. Even if some instructions aren't available on the build machine, they might be available on the target machine where the program is to be run. Let's see...the gcc manual says: | Applications which perform runtime CPU detection must compile | separate files for each supported architecture, using the | appropriate flags. Perhaps this program doesn't heed that guidance? |