From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3826 invoked by alias); 24 Feb 2009 17:00:05 -0000 Received: (qmail 3755 invoked by uid 22791); 24 Feb 2009 17:00:03 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from yx-out-1718.google.com (HELO yx-out-1718.google.com) (74.125.44.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Feb 2009 16:59:51 +0000 Received: by yx-out-1718.google.com with SMTP id 4so922513yxp.26 for ; Tue, 24 Feb 2009 08:59:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.100.173.18 with SMTP id v18mr41284ane.20.1235494788800; Tue, 24 Feb 2009 08:59:48 -0800 (PST) In-Reply-To: <49A32428.8020607@verizon.net> References: <470cb4e0e9f0fb26fd9dac501dcf288d@prager.ws> <20090223162016.GB30071@NANO-66-21.grenoble.cnrs.fr> <49A32428.8020607@verizon.net> Date: Tue, 24 Feb 2009 17:00:00 -0000 Message-ID: Subject: Re: MinGW x86_64 ABI problem From: NightStrike To: John Fine , Kai Tietz Cc: gcc-help@gcc.gnu.org, mingw-w64-public@lists.sourceforge.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg00185.txt.bz2 On Mon, Feb 23, 2009 at 5:33 PM, John Fine wrote: > > The Windows version of the x86_64 ABI specifies that registers xmm6-xmm15= be callee saved. > > I'm building a .dll with MinGW used by an .exe from a different compiler. > > I debugged a failure to the point of determining that the code produced b= y MinGW clobbers xmm9 in violation of the ABI. > > I tried a bunch of Google searches, expecting this problem would be discu= ssed somewhere, but couldn't find it. > > I'm using a downloaded binary copy of MinGW for x86_64. =A0I expect I wil= l need to download source code and figure out how to build it, in order to = deal with this problem. > > But I don't know where to look in the gcc source code included in MinGW f= or the registers that should be callee saved. > > 1) Can you tell me where callee saved registers are specified in the gcc = source code. > > 2) I tried adding "-f-call-saved-xmm9" to the g++ command to see if that = would fix the problem for one register. =A0That compile aborted with > internal compiler error: in copyprop_hardreg_forward_1, at regrename.c:15= 90 > Is that switch so incorrect? =A0I understand it would generate .obj code = incompatible with anything generated without that switch. =A0But why should= it crash gcc? > First, I added both the mingw-w64 mailing list to the chain as well as Kai Tietz. Second, what version of the toolchain are you using? Is it from our site? Is it after Jan 19th of 2009?