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 0A3083865C3C for ; Thu, 15 Feb 2024 15:58:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A3083865C3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0A3083865C3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708012738; cv=none; b=cK1JSHEN8V+s/uoZBUK6WpvJcjnfsn/LzLf9ik3zqXxb0Jd2R6koMb2qKAJi/MiW4KwSdwmRwWq814CLOAZ9ul2jl/42swUiBE9EesiJMq/5Wdv7WN9kJiuY8FKXiw3jarg/e+v7/U/EJpQFcrer+t4U3Wq67POlF00tIlnvi60= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708012738; c=relaxed/simple; bh=J1YbQRO79fxz80gMwutbhnh6ZRCgW8m2AxYIQPipZUA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Y6d7NLrfA5tDVMopEmRg1qhrnenQw0xCqXdcJwHpaEvOtfcHnWRAyX43VCaFriK0CisKe9Qx9vteZLFZucgIoaHI4eWGnL/8Gt37dogpH/RkpCjp25vIQl6JWOXaPHNIZJc0m/k201Ha/2/dE3rSh9kQk/KjV8IWsEKzzZWWmUk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41FFNM4M006089 for ; Thu, 15 Feb 2024 15:58:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=H20oIu2jQa843bxDsj+JwqCe8OvKRhcic/AsPIQxMrY=; b=q32bevbSklpLlirl3992cnfbCcfoBZSA/sc43j7mF9fvhFGcKO7/QDczWE0lqvrrKGE/ uV5rLHyvXrAIzmnf0rJ+TcwglWWieWUtBySL1oLTOMwzwZQ824I9kySX/f7orvCFWeVb zrUBdJH9Kglk0zDlbOPYew5ZQvFYOOttkVkO2AffPWNC32yOky9ayAV4KLqAWz7S8E1L ioWfC+1WLxXouJLfEOW2nOw22ppIs0y1D+uV1FqD6JuCdwAulLNdnscXf2yT6pDUU820 kykNEYgtbgR3Ap7BiWNmjZrM0LImtmMDDPvmx9KnkBC7kxJ4ObHJRNgv5FPErxl6R5rX Mg== Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w9n72rtfy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 15 Feb 2024 15:58:51 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41FFo63a009741 for ; Thu, 15 Feb 2024 15:58:33 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3w6p6358p5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 15 Feb 2024 15:58:33 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41FFwS4H23593648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Feb 2024 15:58:30 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D2042004B; Thu, 15 Feb 2024 15:58:28 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E1F3520040; Thu, 15 Feb 2024 15:58:27 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 15 Feb 2024 15:58:27 +0000 (GMT) From: Jens Remus To: binutils@sourceware.org Cc: Jens Remus , Andreas Krebbel Subject: [PATCH 00/14] s390: Enhancements to working with addressing operands Date: Thu, 15 Feb 2024 16:58:07 +0100 Message-Id: <20240215155821.4065623-1-jremus@linux.ibm.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: URZZmch9vqOXhWuxxRcnWOZ9rQaOqNxo X-Proofpoint-ORIG-GUID: URZZmch9vqOXhWuxxRcnWOZ9rQaOqNxo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-15_14,2024-02-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 priorityscore=1501 mlxlogscore=951 mlxscore=0 malwarescore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402150129 X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This patch series provides enhancements to the s390 assembler and disassembler when working with instructions with addressing operands with index and base register. Additionally it includes a few more or less related cleanups. Patch 1 and 2 enhance the reporting of s390 assembler syntax errors. Patch 3 corrects the parsing of length operands in the s390 assembler. Patch 4 corrects the setting of the ELF highgprs flag, regardless of the order of specification of the -m31 and -mzarch s390 assembler options. Patch 5 assembles the processor specific test cases on s390 for their intended processor. Previously they were assembled for the latest supported processor. Patch 6 adds comments to the s390 assembler operand parsing logic, to make it easier to follow. Patch 7 and 8 add test cases related to base and index register as preparation for the actual enhancements from this series. Patch 9 revises the s390-specific assembler option descriptions as preparation for the actual enhancements from this series. Patch 10 adds register name type checks to the s390 assembler, which can be configured with the new s390-specific assembler option "warn-regtype-mismatch=strict|relaxed|no". When enabled a warning message is printed if a register name type does not match the operand type. The default is "relaxed", which allows floating-point and vector register names to be used interchangeably, becazse the floating-point registers are embedded into the vector registers and GCC generates assembler code making use of this knowledge. This should minimize mostly hand-written assembler coding errors, especially when omitting either index (X) or base (B) register in D(X,B). Patch 11 changes the s390 disassembler to print base register 0 as "0" instead of "%r0". This is to enhance readability of the disassembly. It makes it easier to spot the use of base register 0. Patch 12 allows to explicitly omit base register 0 in the s390 assembler. The base register B in D(X,B) can be explicitly omitted by coding D(X,) instead of D(X,0). This is very similar to explicitly omitting the index register X in D(X,B) by coding D(,B). This enhances the readability. Additionally it can also be explicitly omitted in D(L,B) by coding D(L,) instead of D(L,0) or D(L). Patch 13 adds printing of the operand number in all operand parsing related warning/error messages, given that the information is now available (see patch 10). Patch 14 adds printing of the expected operand type of a missing operand. Thanks and regards, Jens Jens Remus (14): s390: Lower severity of assembler syntax errors from fatal to error s390: Enhance handling of syntax errors in assembler s390: Do not erroneously use base operand value for length operand s390: Correct setting of highgprs flag in ELF output s390: Assemble processor specific test cases for their processor s390: Add comments to assembler operand parsing logic s390: Add test cases for base/index register 0 s390: Add test case for disassembler option warn-areg-zero s390: Revise s390-specific assembler option descriptions s390: Warn when register name type does not match operand s390: Print base register 0 as "0" in disassembly s390: Allow to explicitly omit base register operand in assembly s390: Provide operand number in assembler warning and error messages s390: Be more verbose about missing operand type binutils/NEWS | 2 + gas/NEWS | 10 + gas/config/tc-s390.c | 373 ++++++++++++++---- gas/doc/as.texi | 20 + gas/testsuite/gas/s390/blank.s | 0 gas/testsuite/gas/s390/esa-g5.s | 8 +- gas/testsuite/gas/s390/esa-highgprs-0.d | 24 ++ .../gas/s390/esa-highgprs-machinemode-0.d | 23 ++ .../gas/s390/esa-highgprs-machinemode-0.s | 2 + .../gas/s390/esa-highgprs-machinemode-1.d | 23 ++ .../gas/s390/esa-highgprs-machinemode-1.s | 3 + gas/testsuite/gas/s390/s390.exp | 23 +- .../gas/s390/zarch-base-index-0-err.l | 74 ++++ .../gas/s390/zarch-base-index-0-err.s | 47 +++ gas/testsuite/gas/s390/zarch-base-index-0.d | 103 +++++ gas/testsuite/gas/s390/zarch-base-index-0.s | 116 ++++++ gas/testsuite/gas/s390/zarch-highgprs-0.d | 24 ++ gas/testsuite/gas/s390/zarch-highgprs-1.d | 24 ++ .../gas/s390/zarch-omitted-base-index-err.l | 21 + .../gas/s390/zarch-omitted-base-index-err.s | 19 + .../gas/s390/zarch-omitted-base-index.d | 25 ++ .../gas/s390/zarch-omitted-base-index.s | 26 ++ gas/testsuite/gas/s390/zarch-warn-areg-zero.l | 65 +++ gas/testsuite/gas/s390/zarch-warn-areg-zero.s | 116 ++++++ .../zarch-warn-regtype-mismatch-relaxed.l | 15 + .../zarch-warn-regtype-mismatch-relaxed.s | 7 + .../s390/zarch-warn-regtype-mismatch-strict.l | 15 + .../s390/zarch-warn-regtype-mismatch-strict.s | 7 + gas/testsuite/gas/s390/zarch-z13.s | 8 +- gas/testsuite/gas/s390/zarch-z9-109-err.l | 2 +- gas/testsuite/gas/s390/zarch-z900-err.l | 4 +- include/opcode/s390.h | 3 + opcodes/s390-dis.c | 22 +- opcodes/s390-opc.c | 62 +-- 34 files changed, 1190 insertions(+), 126 deletions(-) create mode 100644 gas/testsuite/gas/s390/blank.s create mode 100644 gas/testsuite/gas/s390/esa-highgprs-0.d create mode 100644 gas/testsuite/gas/s390/esa-highgprs-machinemode-0.d create mode 100644 gas/testsuite/gas/s390/esa-highgprs-machinemode-0.s create mode 100644 gas/testsuite/gas/s390/esa-highgprs-machinemode-1.d create mode 100644 gas/testsuite/gas/s390/esa-highgprs-machinemode-1.s create mode 100644 gas/testsuite/gas/s390/zarch-base-index-0-err.l create mode 100644 gas/testsuite/gas/s390/zarch-base-index-0-err.s create mode 100644 gas/testsuite/gas/s390/zarch-base-index-0.d create mode 100644 gas/testsuite/gas/s390/zarch-base-index-0.s create mode 100644 gas/testsuite/gas/s390/zarch-highgprs-0.d create mode 100644 gas/testsuite/gas/s390/zarch-highgprs-1.d create mode 100644 gas/testsuite/gas/s390/zarch-omitted-base-index-err.l create mode 100644 gas/testsuite/gas/s390/zarch-omitted-base-index-err.s create mode 100644 gas/testsuite/gas/s390/zarch-omitted-base-index.d create mode 100644 gas/testsuite/gas/s390/zarch-omitted-base-index.s create mode 100644 gas/testsuite/gas/s390/zarch-warn-areg-zero.l create mode 100644 gas/testsuite/gas/s390/zarch-warn-areg-zero.s create mode 100644 gas/testsuite/gas/s390/zarch-warn-regtype-mismatch-relaxed.l create mode 100644 gas/testsuite/gas/s390/zarch-warn-regtype-mismatch-relaxed.s create mode 100644 gas/testsuite/gas/s390/zarch-warn-regtype-mismatch-strict.l create mode 100644 gas/testsuite/gas/s390/zarch-warn-regtype-mismatch-strict.s -- 2.40.1