From patchwork Mon Nov 11 14:36:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 290324 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1BCA72C0096 for ; Tue, 12 Nov 2013 01:44:41 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:to:date:from:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=lHPjXm9tetfS6gSY a+MRr0fhVXAv74VJhHo5sQvT0MbxgdaQzM+s2ZGeP6KkyVGQHqpcA+CZFL/ol9lN T+npksV4r8AaGH146/Y8BcUfwqcOyQpowULBdPLXY3TRG5TH7eP1N0k7X8VDZiqx lYxO9ovZrcYHPoOYwPb/VYUqbCU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:to:date:from:mime-version:content-type :content-transfer-encoding; s=default; bh=r2l1VlDLOCtg6OeQ7LzI9v lGInM=; b=GTBlXMbzaX6RmgWwS5rDVrYfOoYPCdSFGUkscWDGyQvnofQz7unsG2 27LTDgeMuJ94fsx7uHWehAVnMyq1UCOpTTrH+AjYQriyjLUIjDq4nUKvTfvJoFZu 01lNnZPdwH7j5r0JZxNTkyM2tykjdo7kGEP0dJT6YcJEaepNhK2wY= Received: (qmail 31535 invoked by alias); 11 Nov 2013 14:39:44 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 31434 invoked by uid 89); 11 Nov 2013 14:39:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL, BAYES_50, MSGID_FROM_MTA_HEADER, RDNS_NONE, SPF_PASS autolearn=no version=3.3.2 X-HELO: e06smtp15.uk.ibm.com Received: from Unknown (HELO e06smtp15.uk.ibm.com) (195.75.94.111) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 11 Nov 2013 14:38:18 +0000 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 11 Nov 2013 14:38:09 -0000 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 11 Nov 2013 14:38:08 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1634217D8057 for ; Mon, 11 Nov 2013 14:37:48 +0000 (GMT) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rABEaelE40632368 for ; Mon, 11 Nov 2013 14:36:40 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rABEaqhq026491 for ; Mon, 11 Nov 2013 07:36:52 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id rABEaphC026392 for ; Mon, 11 Nov 2013 07:36:51 -0700 Message-Id: <201311111436.rABEaphC026392@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 11 Nov 2013 15:36:51 +0100 Subject: [PATCH, rs6000] ELFv2 ABI preparation: Remove USE_FP/ALTIVEC_FOR_ARG_P type arg To: gcc-patches@gcc.gnu.org Date: Mon, 11 Nov 2013 15:36:51 +0100 (CET) From: "Ulrich Weigand" MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13111114-0342-0000-0000-000006D2C952 Hello, another patch in preparation for the new ABI. USE_FP_FOR_ARG_P and USE_ALTIVEC_FOR_ARG_P take a TYPE argument which they never use. Since passing a correct TYPE for the homogeneous struct case would be a bit problematic, it seems cleaner to just remove the unused argument. No change in generated code intented. Tested on powerpc64-linux and powerpc64le-linux. OK for mainline? Bye, Ulrich ChangeLog: 2013-11-11 Ulrich Weigand * config/rs6000/rs6000.c (USE_FP_FOR_ARG_P): Remove TYPE argument. (USE_ALTIVEC_FOR_ARG_P): Likewise. (rs6000_darwin64_record_arg_advance_recurse): Update uses. (rs6000_function_arg_advance_1):Likewise. (rs6000_darwin64_record_arg_recurse): Likewise. (rs6000_function_arg): Likewise. (rs6000_arg_partial_bytes): Likewise. Index: gcc/gcc/config/rs6000/rs6000.c =================================================================== --- gcc.orig/gcc/config/rs6000/rs6000.c +++ gcc/gcc/config/rs6000/rs6000.c @@ -8434,13 +8434,13 @@ rs6000_member_type_forces_blk (const_tre } /* Nonzero if we can use a floating-point register to pass this arg. */ -#define USE_FP_FOR_ARG_P(CUM,MODE,TYPE) \ +#define USE_FP_FOR_ARG_P(CUM,MODE) \ (SCALAR_FLOAT_MODE_P (MODE) \ && (CUM)->fregno <= FP_ARG_MAX_REG \ && TARGET_HARD_FLOAT && TARGET_FPRS) /* Nonzero if we can use an AltiVec register to pass this arg. */ -#define USE_ALTIVEC_FOR_ARG_P(CUM,MODE,TYPE,NAMED) \ +#define USE_ALTIVEC_FOR_ARG_P(CUM,MODE,NAMED) \ (ALTIVEC_OR_VSX_VECTOR_MODE (MODE) \ && (CUM)->vregno <= ALTIVEC_ARG_MAX_REG \ && TARGET_ALTIVEC_ABI \ @@ -8889,7 +8889,7 @@ rs6000_darwin64_record_arg_advance_recur if (TREE_CODE (ftype) == RECORD_TYPE) rs6000_darwin64_record_arg_advance_recurse (cum, ftype, bitpos); - else if (USE_FP_FOR_ARG_P (cum, mode, ftype)) + else if (USE_FP_FOR_ARG_P (cum, mode)) { unsigned n_fpregs = (GET_MODE_SIZE (mode) + 7) >> 3; rs6000_darwin64_record_arg_advance_flush (cum, bitpos, 0); @@ -8930,7 +8930,7 @@ rs6000_darwin64_record_arg_advance_recur else cum->words += n_fpregs; } - else if (USE_ALTIVEC_FOR_ARG_P (cum, mode, type, 1)) + else if (USE_ALTIVEC_FOR_ARG_P (cum, mode, 1)) { rs6000_darwin64_record_arg_advance_flush (cum, bitpos, 0); cum->vregno++; @@ -8993,7 +8993,7 @@ rs6000_function_arg_advance_1 (CUMULATIV { bool stack = false; - if (USE_ALTIVEC_FOR_ARG_P (cum, mode, type, named)) + if (USE_ALTIVEC_FOR_ARG_P (cum, mode, named)) { cum->vregno++; if (!TARGET_ALTIVEC) @@ -9366,7 +9366,7 @@ rs6000_darwin64_record_arg_recurse (CUMU if (TREE_CODE (ftype) == RECORD_TYPE) rs6000_darwin64_record_arg_recurse (cum, ftype, bitpos, rvec, k); - else if (cum->named && USE_FP_FOR_ARG_P (cum, mode, ftype)) + else if (cum->named && USE_FP_FOR_ARG_P (cum, mode)) { unsigned n_fpreg = (GET_MODE_SIZE (mode) + 7) >> 3; #if 0 @@ -9394,7 +9394,7 @@ rs6000_darwin64_record_arg_recurse (CUMU if (mode == TFmode || mode == TDmode) cum->fregno++; } - else if (cum->named && USE_ALTIVEC_FOR_ARG_P (cum, mode, ftype, 1)) + else if (cum->named && USE_ALTIVEC_FOR_ARG_P (cum, mode, 1)) { rs6000_darwin64_record_arg_flush (cum, bitpos, rvec, k); rvec[(*k)++] @@ -9579,7 +9579,7 @@ rs6000_function_arg (cumulative_args_t c /* Else fall through to usual handling. */ } - if (USE_ALTIVEC_FOR_ARG_P (cum, mode, type, named)) + if (USE_ALTIVEC_FOR_ARG_P (cum, mode, named)) if (TARGET_64BIT && ! cum->prototype) { /* Vector parameters get passed in vector register @@ -9707,7 +9707,7 @@ rs6000_function_arg (cumulative_args_t c if (mode == TDmode && (cum->fregno % 2) == 1) cum->fregno++; - if (USE_FP_FOR_ARG_P (cum, mode, type)) + if (USE_FP_FOR_ARG_P (cum, mode)) { rtx rvec[GP_ARG_NUM_REG + 1]; rtx r; @@ -9823,7 +9823,7 @@ rs6000_arg_partial_bytes (cumulative_arg if (DEFAULT_ABI == ABI_V4) return 0; - if (USE_ALTIVEC_FOR_ARG_P (cum, mode, type, named) + if (USE_ALTIVEC_FOR_ARG_P (cum, mode, named) && cum->nargs_prototype >= 0) return 0; @@ -9833,7 +9833,7 @@ rs6000_arg_partial_bytes (cumulative_arg align_words = rs6000_parm_start (mode, type, cum->words); - if (USE_FP_FOR_ARG_P (cum, mode, type)) + if (USE_FP_FOR_ARG_P (cum, mode)) { /* If we are passing this arg in the fixed parameter save area (gprs or memory) as well as fprs, then this function should