[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] gnubg sse problems on non-sse cpu's

From: Christian Anthon
Subject: [Bug-gnubg] gnubg sse problems on non-sse cpu's
Date: Wed, 5 Apr 2006 23:06:52 +0200
User-agent: Mutt/1.5.10i

Hi all,

I wrote to the mingw-users list about the sse problem on athlons. It
seems that basically the sse code has to be entirely separated from the
rest. Only this way can one compile with -msse on those file that need
it and not the rest. It seems that -msse tells gcc that it may use sse
extensions and it does so even in places where it is not explicitely
told so by the gnubg code.

In essence gnubg dies with sigill (illegal instruction) on both linux
and windows, when the cpu doesn't have sse support. The problem is in
a integer->float typecast. 

On linux gnubg(without board3d) ran through gdb gives:

Program received signal SIGILL, Illegal instruction.
[Switching to Thread -1222429008 (LWP 26181)]
0x080e4213 in SetColourX (arColour=0x87652a4, sz=0xbf902cae "#FF3333")
at renderprefs.c:130
130             arColour[ 0 ] = anColour[ 0 ] / 255.0f;
(gdb) disas
Dump of assembler code for function SetColourX:
0x080e41d0 <SetColourX+0>:      push   %ebp
0x080e41d1 <SetColourX+1>:      mov    %esp,%ebp
0x080e41d3 <SetColourX+3>:      push   %esi
0x080e41d4 <SetColourX+4>:      mov    %eax,%esi
0x080e41d6 <SetColourX+6>:      mov    $0x3b,%eax
0x080e41db <SetColourX+11>:     push   %ebx
0x080e41dc <SetColourX+12>:     sub    $0x30,%esp
0x080e41df <SetColourX+15>:     mov    %edx,%ebx
0x080e41e1 <SetColourX+17>:     mov    %eax,0x4(%esp)
0x080e41e5 <SetColourX+21>:     mov    %edx,(%esp)
0x080e41e8 <SetColourX+24>:     call   0x806e714 <address@hidden>
0x080e41ed <SetColourX+29>:     test   %eax,%eax
0x080e41ef <SetColourX+31>:     je     0x80e41f4 <SetColourX+36>
0x080e41f1 <SetColourX+33>:     movb   $0x0,(%eax)
0x080e41f4 <SetColourX+36>:     lea    0xffffffe8(%ebp),%edx
0x080e41f7 <SetColourX+39>:     mov    %ebx,%eax
0x080e41f9 <SetColourX+41>:     call   0x80e4080 <SetColour>
0x080e41fe <SetColourX+46>:     test   %eax,%eax
0x080e4200 <SetColourX+48>:     mov    $0xffffffff,%edx
0x080e4205 <SetColourX+53>:     jne    0x80e424d <SetColourX+125>
0x080e4207 <SetColourX+55>:     movzbl 0xffffffe8(%ebp),%eax
0x080e420b <SetColourX+59>:     xor    %edx,%edx
0x080e420d <SetColourX+61>:     flds   0x823744c
0x080e4213 <SetColourX+67>:     cvtsi2ss %eax,%xmm0
0x080e4217 <SetColourX+71>:     movzbl 0xffffffe9(%ebp),%eax
0x080e421b <SetColourX+75>:     movss  %xmm0,0xffffffe4(%ebp)
0x080e4220 <SetColourX+80>:     cvtsi2ss %eax,%xmm0
0x080e4224 <SetColourX+84>:     flds   0xffffffe4(%ebp)
0x080e4227 <SetColourX+87>:     movzbl 0xffffffea(%ebp),%eax
0x080e422b <SetColourX+91>:     fdiv   %st(1),%st
0x080e422d <SetColourX+93>:     movss  %xmm0,0xffffffe4(%ebp)
0x080e4232 <SetColourX+98>:     cvtsi2ss %eax,%xmm0
0x080e4236 <SetColourX+102>:    fstpl  (%esi)
0x080e4238 <SetColourX+104>:    flds   0xffffffe4(%ebp)
0x080e423b <SetColourX+107>:    movss  %xmm0,0xffffffe4(%ebp)
0x080e4240 <SetColourX+112>:    fdiv   %st(1),%st
0x080e4242 <SetColourX+114>:    fstpl  0x8(%esi)
0x080e4245 <SetColourX+117>:    flds   0xffffffe4(%ebp)
0x080e4248 <SetColourX+120>:    fdivp  %st,%st(1)
0x080e424a <SetColourX+122>:    fstpl  0x10(%esi)
0x080e424d <SetColourX+125>:    add    $0x30,%esp
0x080e4250 <SetColourX+128>:    mov    %edx,%eax
0x080e4252 <SetColourX+130>:    pop    %ebx
0x080e4253 <SetColourX+131>:    pop    %esi
0x080e4254 <SetColourX+132>:    pop    %ebp
0x080e4255 <SetColourX+133>:    ret
---Type <return> to continue, or q <return> to quit---
End of assembler dump.
(gdb) quit

"I can't promise that I'll try. But, I'll try to try." -- Bart

reply via email to

[Prev in Thread] Current Thread [Next in Thread]