From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20085 invoked by alias); 16 Dec 2015 12:51:53 -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 20070 invoked by uid 89); 16 Dec 2015 12:51:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp07.uk.ibm.com Received: from e06smtp07.uk.ibm.com (HELO e06smtp07.uk.ibm.com) (195.75.94.103) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 16 Dec 2015 12:51:51 +0000 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 16 Dec 2015 12:51:48 -0000 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 16 Dec 2015 12:51:46 -0000 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: uweigand@de.ibm.com X-IBM-RcptTo: gcc-patches@gcc.gnu.org Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id A43A917D8063 for ; Wed, 16 Dec 2015 12:52:21 +0000 (GMT) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tBGCpkFN5767508 for ; Wed, 16 Dec 2015 12:51:46 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tBGCpkdP027203 for ; Wed, 16 Dec 2015 05:51:46 -0700 Received: from oc7340732750.ibm.com (dyn-9-152-213-173.boeblingen.de.ibm.com [9.152.213.173]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id tBGCpkLw027198; Wed, 16 Dec 2015 05:51:46 -0700 Received: by oc7340732750.ibm.com (Postfix, from userid 500) id C22A51513; Wed, 16 Dec 2015 13:51:45 +0100 (CET) Subject: Re: [PATCH] S/390: Allow to use r1 to r4 as literal pool base. To: vogt@linux.vnet.ibm.com Date: Wed, 16 Dec 2015 12:51:00 -0000 From: "Ulrich Weigand" Cc: gcc-patches@gcc.gnu.org, krebbel@linux.vnet.ibm.com (Andreas Krebbel), Ulrich.Weigand@de.ibm.com (Ulrich Weigand) In-Reply-To: <20151216064952.GA3191@linux.vnet.ibm.com> from "Dominik Vogt" at Dec 16, 2015 07:49:52 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20151216125145.C22A51513@oc7340732750.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15121612-0029-0000-0000-0000053317E8 X-SW-Source: 2015-12/txt/msg01596.txt.bz2 Dominik Vogt wrote: > On Mon, Dec 14, 2015 at 04:08:32PM +0100, Ulrich Weigand wrote: > > I don't think that r1 is actually safe here. Note that it may be used > > (unconditionally) as temp register in s390_emit_prologue in certain cases; > > the upcoming split-stack code will also need to use r1 in some cases. > > How about the attached patch? It also allows to use r0 as the > temp register if possible (needs more testing). This doesn't look safe either. In particular: - you use cfun_save_high_fprs_p at a place where its value might not yet have been determined (when calling s390_get_prologue_temp_regno from s390_init_frame_layout *before* the s390_register_info/s390_frame_info calls) - r0 might hold the incoming static chain value, in which case it cannot be used as temp register > If that's too > much effort, I'm fine with limiting the original patch to r4 to > r2. That seems preferable to me. > > r2 through r4 should be fine. [ Not sure if there will be many (any?) cases > > where one of those is unused but r5 isn't, however. ] > > This can happen if the function only uses register pairs > (__int128). Actually I'm not sure whether r2 and r4 are valid > candidates. Huh? Why not? Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com