From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25283 invoked by alias); 3 Apr 2002 18:06:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 25243 invoked by uid 71); 3 Apr 2002 18:06:02 -0000 Date: Wed, 03 Apr 2002 10:06:00 -0000 Message-ID: <20020403180602.25237.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Tim Prince Subject: Re: c++/6144: segment-faults when using sse extensions and ia32 g++ Reply-To: Tim Prince X-SW-Source: 2002-04/txt/msg00236.txt.bz2 List-Id: The following reply was made to PR c++/6144; it has been noted by GNATS. From: Tim Prince To: "Dylan Cuthbert" Cc: Subject: Re: c++/6144: segment-faults when using sse extensions and ia32 g++ Date: Wed, 3 Apr 2002 10:01:45 -0800 On Tuesday 02 April 2002 23:32, Dylan Cuthbert wrote: > Hi there, > > Sorry, the code attachment was lost when I hit "back" on my browser after a > botched post attempt and I didn't notice.it had disappeared. I have > attached it to this mail, could you please attach it to the appropriate bug > report. > > I know cygwin doesn't support gcc 3.1 (yet), gcc 3.1 doesn't support cygwin > (yet), but its pretty important to the windows programming environment that > they do soon. We don't want yet another generation weaned on Visual Studio > do we? And unfortunately using gcc 2.95.3 is like working in the dark ages > with regards to functionality, performance and general C++ iso-standard > conformity. > > I don't mind frontiering the use of gcc 3.1 in cygwin but I would like a > little help in the way of directions to go next so here are some questions: > > 1. How easy is it to configure binutils to support an aligned stack? > 2. Does the problem with cygwin actually cause me any problems - I presume > it would only cause a serious problem if I have callbacks being called from > within the cygwin dll. However I am not using the cygwin API at all, and > the only reason I am compiling with it at the moment is because MINGW > doesn't support gcc 3.1 as of yet. > > Regards > > --------------------------------- > Q-Games, Dylan Cuthbert. > http://www.q-games.com > > ----- Original Message ----- > From: "Tim Prince" > To: ; > Cc: ; > Sent: Wednesday, April 03, 2002 1:34 PM > Subject: Re: c++/6144: segment-faults when using sse extensions and ia32 > g++ > > > On Tuesday 02 April 2002 17:43, dylan@q-games.com wrote: > > > >Number: 6144 > > > >Category: c++ > > > >Synopsis: segment-faults when using sse extensions and ia32 g++ > > > >Confidential: no > > > >Severity: serious > > > >Priority: medium > > > >Responsible: unassigned > > > >State: open > > > >Class: sw-bug > > > >Submitter-Id: net > > > >Arrival-Date: Tue Apr 02 17:46:21 PST 2002 > > > >Closed-Date: > > > >Last-Modified: > > > >Originator: Dylan Cuthbert (dylan@q-games.com) > > > >Release: 3.1 (25th March 2002 snapshot) > > > >Organization: > > > >Environment: > > > > > > cygwin 1.3.9, windows 2000, Athlon MP (2 processor) 1.2Ghz (problem > > occurs > > > > also on Pentium IV machines) > > > > > > >Description: > > > > > > A simplified piece of code to demonstrate SSE 16 byte values not being > > > stack-aligned correctly in certain cases. The main problem appears to > > be > > > > when they are encapsulated in another class (like a matrix) and then > > > referenced individually in an expression. This makes use of the SSE > > > extensions unreliable and, in effect, unusable so I think the priority > > > should be high. > > > > > > >How-To-Repeat: > > > > > > compile and run the attached code on Pentium IV or Athlon 4. MP or XP > > > chipset. > > > > > > >Fix: > > > > > > Unknown > > > > > > >Release-Note: > > > >Audit-Trail: > > > >Unformatted: > > > > I don't see any "attached code." Did you build a copy of binutils which > > enables stack alignment, and configure gcc-3.1 to use that binutils? > > AFAIK, > > > there is no chance of SSE being reliable without the 16-byte alignments > > being > > > enabled in binutils bfd/coff-i386.c, as well as observing the requirement > > to > > > build the caller function with -mpreferred-stack-boundary=4. Cygwin > > policy > > > is to set only 4-byte alignment, regardless of the options chosen in > > gcc/g++. > > > There is no way that gcc can compensate for failure at least to attempt > > to over-ride that policy, and it appears that cygwin cannot change the > > policy while continuing to use g++-2.95. If I understand correctly that > > the > > default > > > 4-byte stack alignment, which gcc chooses with -Os, is incompatible with > > SSE, > > > I would like to see that documented better. Cygwin is not a supported > > platform for gcc-3.1, nor does cygwin support gcc-3.1, so I suppose there > > is > > > no chance of the associated issues being documented. > > > > -- > > Tim Prince I find that I must use -mpreferred-stack-boundary=4 along with -march=pentium3 -mfpmath=sse in order to avoid the alignment fault when running on linux. I expect this when using my preferred option -Os, but the same occurs with other options. I am having some difficulty on cygwin with failure to link the namespace std methods. I am not so proficient in c++, so please excuse my blunders. -- Tim Prince