exception error using SSE extensions with gcc3.1/cygwin

Andreas Jaeger aj@suse.de
Sun Mar 31 03:34:00 GMT 2002


"Dylan Cuthbert" <dylan@q-games.com> writes:

> Hi there,
>
> I've attached some very simplified (and *very* crap) source code that causes
> an exception error using gcc 3.1 (March 25th snapshot), specs are at bottom
> of mail.
>
> I'm at a loss at how to debug this - as the version of gdb I've got (5.1)
> doesn't like the SSE instructions, (or maybe gcc 3.1's object file format,
> I'm not sure which but it seems pretty flakey).

GCC 3.1 produces dwarf2 by default, this might be one problem.

> compile with the following:
>
> $ g++ -L /usr/local/lib -msse math.cpp -o math.exe
>
> $ ./math.exe
> Start test
> set mUnitMatrix
> set_x
> set_y
> set_z
> set_w
> set_x
> set_y
> set_z
> set_w
> set_x
> set_y
> set_z
> set_w
> set_x
> set_y
> set_z
> set_w
> Illegal instruction (core dumped)

Which instruction is this?  

What CPU do you have?

On my PentiumIII I get:

Program received signal SIGSEGV, Segmentation fault.
0x08048847 in Test() () at math.cpp:232
232             );
(gdb) x /i $pc
0x8048847 <_Z4Testv+267>:       movaps %xmm0,0x4(%esp,1)
(gdb) p $esp
$1 = (void *) 0xbffff360
(gdb) p $xmm0
$2 = {f = {1, 0, 0, 0}}

Not sure what goes wrong here,
Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj



More information about the Gcc mailing list