This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Bug with SSE on mingw32
- From: "François-Xavier Coudert" <fxcoudert at gmail dot com>
- To: "GCC Development" <gcc at gcc dot gnu dot org>, GFortran <fortran at gcc dot gnu dot org>
- Date: Tue, 25 Apr 2006 15:52:27 +0200
- Subject: Re: Bug with SSE on mingw32
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AhqSPM3lH40QbvDwaVeq9sXolGVj3N5veX0fa/kFUcb3svTsTR27YpmSwBKB489uOo6oWILls4mRsPYyNByXHsNRzKDowW4zRY5EVv63UIFl4YcTaCtcSkirlq1y4EaSVD9/03cl/2GP31oHGaw6hq8mvHD74d7CYA8QJYIlmmc=
- References: <19c433eb0604240939p5154b35dk9c9c14af455f684f@mail.gmail.com>
> I'm experiencing a strange gfortran bug, i686-pc-mingw32 specific,
> with options -march=pentium4 -mfpmath=sse -msse.
Some more input... the bug appears when SSE sqrtsd is called, but only
if libgfortran contrusctors have been run:
cat a.s
.file "a.f90"
.section .rdata,"dr"
.align 8
LC0:
.long 0
.long 1073741824
.text
.globl _MAIN__
.def _MAIN__; .scl 2; .type 32; .endef
_MAIN__:
pushl %ebp
movl %esp, %ebp
subl $16, %esp
movsd LC0, %xmm0
movsd %xmm0, -8(%ebp)
sqrtsd -8(%ebp), %xmm0
movsd %xmm0, -8(%ebp)
leave
ret
$ gcc a.s -lgfortranbegin -lgfortran && ./a.exe
[popus up crash dialog]
$ diff a.s a_nolibgfortran.s
8,10c8,10
< .globl _MAIN__
< .def _MAIN__; .scl 2; .type 32; .endef
< _MAIN__:
---
> .globl _main
> .def _main; .scl 2; .type 32; .endef
> _main:
$ gcc a.s && ./a.exe
[works ok]
The problem appears to be inside the libgfortran constructor and
functions called herein. I'll try to narrow it, but I don't really
know what to look for... What kind of code can be expected to generate
such bad behaviour?
FX