From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25291 invoked by alias); 5 Dec 2018 13:16:19 -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 25212 invoked by uid 89); 5 Dec 2018 13:16:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT autolearn=ham version=3.3.2 spammy=mixed, 20181129-1.c, 201811291c, 201811292c X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Dec 2018 13:16:06 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 0D310EF7; Wed, 5 Dec 2018 14:16:02 +0100 (CET) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id SJUcTdMkLj0T; Wed, 5 Dec 2018 14:15:58 +0100 (CET) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id BE9D6EF4; Wed, 5 Dec 2018 14:15:58 +0100 (CET) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id wB5DFviY011869; Wed, 5 Dec 2018 14:15:57 +0100 (MET) From: Rainer Orth To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org Subject: Re: [SPARC] Fix PR target/87807 References: <37650183.iAzO7P3RYW@polaris> Date: Wed, 05 Dec 2018 13:16:00 -0000 In-Reply-To: <37650183.iAzO7P3RYW@polaris> (Eric Botcazou's message of "Fri, 30 Nov 2018 00:08:24 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00275.txt.bz2 --=-=-= Content-Type: text/plain Content-length: 3353 Hi Eric, > This started as a simple fix for a small issue (passing floating-point vectors > to variadic functions in 64-bit mode) and then evolved into a small cleanup of > the code implementing the calling conventions of the 2 SPARC ABIs. > > Tested and compat-regtested on SPARC/Solaris 11, applied on the mainline. > > > 2018-11-29 Eric Botcazou > > PR target/87807 > * config/sparc/sparc-modes.def: Minor tweak. > * config/sparc/sparc.c: Minor reordering. > (sparc_pass_by_reference): Move around. > (traverse_record_type): Change offset from HOST_WIDE_INT to int. > (classify_registers): Likewise for bitpos. > (function_arg_slotno): Remove dead test and tweak comments. > : Remove useless assertion and test whether the > parameter is named in order to pass it in FP registers. Return > the regno for floating-point vector types. > (compute_int_layout): Change bitpos from HOST_WIDE_INT to int. > (compute_fp_layout): Likewise. > (count_registers): Likewise. > (assign_int_registers): Likewise. > (assign_fp_registers): Likewise. > (assign_registers): Likewise. > (function_arg_record_value): Change size from HOST_WIDE_INT to int > and use CEIL_NWORDS to compute the number of registers. > (function_arg_union_value): Minor tweaks. > (function_arg_vector_value): Add slotno and named parameters, use > CEIL_NWORDS to compute the number of registers. > (sparc_function_arg_1): Rework handling of vector types. Change > size from HOST_WIDE_INT to int. > (sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal > with vector types for the 64-bt ABI. > (sparc_function_arg_advance): Likewise. > (sparc_return_in_memory): Add reference to -fpcc-struct-return. > (sparc_struct_value_rtx): Return NULL_RTX instead of 0. > (sparc_function_value_1): Rework handling of vector types. Change > size from HOST_WIDE_INT to int. > > > 2018-11-29 Eric Botcazou > > * gcc.target/sparc/20181129-1.c: New test. > * gcc.target/sparc/20181129-2.c: Likewise. unfortunately, the new tests FAIL to compile, both 32 and 64-bit: +FAIL: gcc.target/sparc/20181129-1.c (test for excess errors) +UNRESOLVED: gcc.target/sparc/20181129-1.c compilation failed to produce executable +FAIL: gcc.target/sparc/20181129-2.c (test for excess errors) +UNRESOLVED: gcc.target/sparc/20181129-2.c compilation failed to produce executable Excess errors: /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.target/sparc/20181129-1.c:17:3: error: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.target/sparc/20181129-2.c: In function 'f': /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.target/sparc/20181129-2.c:17:3: error: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] The following patch fixes this by building as C99. Alternatively, it would work just as well to split the x declaration and initialization. Tested on sparc-sun-solaris2.11. Ok for mainline? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2018-12-04 Rainer Orth * gcc.target/sparc/20181129-1.c: Compile with -std=c99. * gcc.target/sparc/20181129-2.c: Likewise. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=testsuite-sparc-20181129-c99.patch Content-length: 914 # HG changeset patch # Parent 3a9647e8254db33d54bc0ed4f11e3b89fcda10b2 Build gcc.target/sparc/20181129-?.c as C99 * gcc.target/sparc/20181129-1.c: Compile with -std=c99. * gcc.target/sparc/20181129-2.c: Likewise. diff --git a/gcc/testsuite/gcc.target/sparc/20181129-1.c b/gcc/testsuite/gcc.target/sparc/20181129-1.c --- a/gcc/testsuite/gcc.target/sparc/20181129-1.c +++ b/gcc/testsuite/gcc.target/sparc/20181129-1.c @@ -2,6 +2,7 @@ /* Reported by Rainer Orth */ /* { dg-do run } */ +/* { dg-options "-std=c99" } */ #include diff --git a/gcc/testsuite/gcc.target/sparc/20181129-2.c b/gcc/testsuite/gcc.target/sparc/20181129-2.c --- a/gcc/testsuite/gcc.target/sparc/20181129-2.c +++ b/gcc/testsuite/gcc.target/sparc/20181129-2.c @@ -2,6 +2,7 @@ /* Reported by Rainer Orth */ /* { dg-do run } */ +/* { dg-options "-std=c99" } */ #include --=-=-=--