From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9279 invoked by alias); 10 Sep 2013 14:11:58 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 9265 invoked by uid 89); 10 Sep 2013 14:11:57 -0000 Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Sep 2013 14:11:57 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: bromo.med.uc.edu Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id 11828B005C; Tue, 10 Sep 2013 10:11:55 -0400 (EDT) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id r8AEBsSl003007; Tue, 10 Sep 2013 10:11:54 -0400 Date: Tue, 10 Sep 2013 14:42:00 -0000 From: Jack Howarth To: Iain Sandoe Cc: Kirill Yukhin , GCC Patches , Mike Stump Subject: Re: [i386, AVX-512F, pr58269] Partial fix for PR58269: properly initialize last EXT REX SSE register. Message-ID: <20130910141154.GA2996@bromo.med.uc.edu> References: <20130906083457.GA31758@msticlxl57.ims.intel.com> <20130906092944.GP23437@tucnak.redhat.com> <74B4E75F-BDAC-4865-9CF4-F947FD77C15D@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74B4E75F-BDAC-4865-9CF4-F947FD77C15D@codesourcery.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-SW-Source: 2013-09/txt/msg00742.txt.bz2 On Fri, Sep 06, 2013 at 11:04:45AM +0100, Iain Sandoe wrote: > Hi Kirill, > > Thanks for Ilya's input on the PR thread. > > We've done some testing/checking across the Darwin versions last night and I've bootstrapped all langs including Ada, and tested the patch below (together with the fragment you posted earlier) on Darwin12. > > >> On Fri, Sep 6, 2013 at 10:34 AM, Kirill Yukhin wrote: > > >>> Here is a patch to fix pr58269. > >>> Actually this is not a full fix, but an obvious part. > > Here's what I propose for the remainder of the fix (FAOD, I cannot approve the Darwin changes). > > ==== > > Darwin is supposed to follow the System V psABI for x86_64 and, AFAICT for Darwin9, 10, 11 and 12 it is complying for function calls involving xmm0-7 (additional float args are, indeed, placed on the stack). Ergo, saving xmm8-15 in __builtin_apply_args() only consumes time and stack space - the content is not part of the call. > > As a fall-back; if I've missed a subtlety and, for some reason, we need to adjust the xmm set saved for compatibility with an older (gcc-4.2 based) system compiler, then we can override SSE_REGPARM_MAX in i386/darwin*.h for the relevant system version. > > Losing TARGET_MACHO conditional code is always nice :) > > Mike: Actually, since this seems to have uncovered a pre-existing wrong code bug, perhaps (this part of the) fix should also be applied to open branches? > > gcc: > > PR target/58269 > config/i386/i386.c (ix86_function_arg_regno_p): Make Darwin use the > xmm register set described in the psABI. > > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c > index a8d70bc..e68b3f9 100644 > --- a/gcc/config/i386/i386.c > +++ b/gcc/config/i386/i386.c > @@ -5706,17 +5706,9 @@ ix86_function_arg_regno_p (int regno) > && (regno < FIRST_SSE_REG + SSE_REGPARM_MAX))); > } > > - if (TARGET_MACHO) > - { > - if (SSE_REGNO_P (regno) && TARGET_SSE) > - return true; > - } > - else > - { > - if (TARGET_SSE && SSE_REGNO_P (regno) > - && (regno < FIRST_SSE_REG + SSE_REGPARM_MAX)) > - return true; > - } > + if (TARGET_SSE && SSE_REGNO_P (regno) > + && (regno < FIRST_SSE_REG + SSE_REGPARM_MAX)) > + return true; > > /* TODO: The function should depend on current function ABI but > builtins.c would need updating then. Therefore we use the Iain, Do you plan to commit this to gcc trunk to unbreak the darwin bootstrap for libobjc? The change seems to work fine here on x86_64-apple-darwin12... http://gcc.gnu.org/ml/gcc-testresults/2013-09/msg00610.html Jack