From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83838 invoked by alias); 4 Apr 2017 11:46:46 -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 83752 invoked by uid 89); 4 Apr 2017 11:46:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=krebbel@linux.vnet.ibm.com, U*krebbel, krebbellinuxvnetibmcom, sk:krebbel X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Apr 2017 11:46:44 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v34BcxGN031855 for ; Tue, 4 Apr 2017 07:46:43 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 29m24agp13-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 04 Apr 2017 07:46:43 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 4 Apr 2017 12:46:41 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 4 Apr 2017 12:46:33 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v34BkWPm67043352; Tue, 4 Apr 2017 11:46:32 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 94DB511C05C; Tue, 4 Apr 2017 12:45:56 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 797B711C054; Tue, 4 Apr 2017 12:45:56 +0100 (BST) Received: from [9.152.212.134] (unknown [9.152.212.134]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 4 Apr 2017 12:45:56 +0100 (BST) Subject: Re: [RFC]: Fix Ada boostrap failure on S/390 with -mzarch To: Eric Botcazou References: <20170403142327.GA29110@maggie> <19368902.hv6JJgyYOG@polaris> Cc: gcc-patches@gcc.gnu.org From: Andreas Krebbel Date: Tue, 04 Apr 2017 11:46:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <19368902.hv6JJgyYOG@polaris> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17040411-0040-0000-0000-0000037B9202 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17040411-0041-0000-0000-00001F8C9F08 Message-Id: <488cbb73-5d39-dfd3-c1bb-2f109e6ed9d7@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-04_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704040104 X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00144.txt.bz2 On 04/03/2017 06:18 PM, Eric Botcazou wrote: >> On S/390 UNITS_PER_WORD is: >> 8 with -m64 >> 4 with -m31 >> 8 with -m31 -mzarch >> >> This has been chosen to support use of 64 bit registers also in 32 bit >> code. Code compiled with -m31 -mzarch is supposed to adhere to the 32 >> bit ABI. In order to make that work it was required to prevent >> UNITS_PER_WORD from being used in ABI-relevant contexts. That's why >> Ulrich added the TARGET_UNWIND_WORD_MODE in 2008 (for SPU). > > We do that for 32-bit SPARC on Solaris (-mv8plus) but UNITS_PER_WORD is 4. > >> Now I could either fix this by reverting that change for S/390 >> (similiar to what Andreas Schwab did to fix the BZ) or I could just >> use the size of the long data type (as we do in the ABI-relevant parts >> of the backend as well). Which one do you prefer? > > Having System.Word_Size != Standard'Word_Size is a bit disturbing. Does it > work to change only Memory_Size to 2 ** Long_Integer'Size? This will also > correct the definition of Address below. This worked as well. I've committed the following patch: gcc/ada/ChangeLog: 2017-04-04 Andreas Krebbel * system-linux-s390.ads: Use Long_Integer'Size to define Memory_Size. --- gcc/ada/system-linux-s390.ads | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/system-linux-s390.ads b/gcc/ada/system-linux-s390.ads index 485a8de..9bf8375 100644 --- a/gcc/ada/system-linux-s390.ads +++ b/gcc/ada/system-linux-s390.ads @@ -70,7 +70,7 @@ package System is Storage_Unit : constant := 8; Word_Size : constant := Standard'Word_Size; - Memory_Size : constant := 2 ** Word_Size; + Memory_Size : constant := 2 ** Long_Integer'Size; -- Address comparison