From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 687313858C50 for ; Tue, 3 May 2022 11:17:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 687313858C50 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 243A2bTV007457 for ; Tue, 3 May 2022 11:17:28 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3fu29w916u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 03 May 2022 11:17:27 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 243B71kH012860 for ; Tue, 3 May 2022 11:17:27 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3fu29w916f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 May 2022 11:17:27 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 243BHPdg005389; Tue, 3 May 2022 11:17:25 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 3ftp7frwtu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 May 2022 11:17:25 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 243BHMar25100562 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 May 2022 11:17:22 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C8D05A4055; Tue, 3 May 2022 11:17:22 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 88722A404D; Tue, 3 May 2022 11:17:22 +0000 (GMT) Received: from [9.171.78.162] (unknown [9.171.78.162]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 3 May 2022 11:17:22 +0000 (GMT) Message-ID: <88b2345a-3ca1-80ad-4e57-2257812667b5@linux.ibm.com> Date: Tue, 3 May 2022 13:17:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] IBM zSystems: Accept (. - 0x100000000) PCRel32 operands Content-Language: en-US To: Ilya Leoshkevich , Alan Modra , Nick Clifton Cc: binutils@sourceware.org References: <20220503104858.1662222-1-iii@linux.ibm.com> From: Andreas Krebbel In-Reply-To: <20220503104858.1662222-1-iii@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: swnFSBZy3mJLt_gwyHcdznuY0OdZ-Fhi X-Proofpoint-GUID: RYR49qYEKLN1uIp85Lyx-8AzMjyEIDNE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-03_03,2022-05-02_03,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 malwarescore=0 suspectscore=0 adultscore=0 mlxscore=0 clxscore=1015 bulkscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205030084 X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2022 11:17:30 -0000 On 5/3/22 12:48, Ilya Leoshkevich wrote: > as does not accept instructions like brasl %r0,.-0x100000000, because > of two problems with the overflow check: > > 1. PCRel32 operands are signed, but are treated as unsigned. > > 2. The allowed range for these operands is [-(1 << 32), (1 << 32) - 1], > and not [-(1 << 31), (1 << 31) - 1]. > > Fix the first problem by setting fx_signed in the s390 backend. > Fix the second problem by introducing fx_shift and setting it in the > s390 backend. > > gas/ChangeLog: > > * config/tc-s390.c (md_gather_operands): Set fx_signed and > fx_shift for PCRel operands. > * write.c (fix_new_internal): Initialize fx_shift. > (fixup_segment): Handle fx_shift. > * write.h (struct fix): Add fx_shift. > * testsuite/gas/s390/s390.exp: Add zarch-z900-err. > * testsuite/gas/s390/esa-z900.d: New test. > * testsuite/gas/s390/esa-z900.s: New test. > * testsuite/gas/s390/zarch-z900-err.l: New test. > * testsuite/gas/s390/zarch-z900-err.s: New test. S/390 parts are ok. Thanks! Andreas