From patchwork Tue Jul 30 02:52:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick O'Neill X-Patchwork-Id: 1966292 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=SajOdB5+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WY0CC0Gxwz1ybX for ; Tue, 30 Jul 2024 12:52:55 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3D67F3858420 for ; Tue, 30 Jul 2024 02:52:53 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 90FF33858294 for ; Tue, 30 Jul 2024 02:52:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 90FF33858294 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 90FF33858294 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::629 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722307949; cv=none; b=B+sMo0RFBL2cjDwczu2qz0GDC6GD/dOjvuKfPqvSKRWR7A6eWJg8PxBrwbMclRTq/tSezgddZ2i5Jb/kB6uFvzPRMxgzTgajTrQBy962ZjP9qUadii0RYTeqTX4Y8xVq/ncVjlyZa9LI9flMjM7rYMZ4P3U9rSa3dIep5NZ86s4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722307949; c=relaxed/simple; bh=NKSeyVUlF8PB0y9aB/ZZrBJcgoqnZdzXGbLMyCzKan0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=WFWvXEdutQBSHcP2fSwBDsmQ9KEuIBkK9hRrg69NpdhjaIyPRcUoSBm6kZKqZp0g3U+keWKAxlMl/0DnMkzDl8WTzhPSnhFt+zzGnkDudEd9jgTHr4R+dMvCS1XZl3lFHu6SzMgQZqC0S5nfNSty+3laAC6l/KYTIOnyn1EWjCc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1fd66cddd07so25325505ad.2 for ; Mon, 29 Jul 2024 19:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1722307946; x=1722912746; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MKpUo4sPbKZfwDf9uMpSe0XFWLM0pJv3tz8K99wBLFg=; b=SajOdB5+LlZkoIvAfzuzBfArbdtbnpAz03rZ4LJzNqaz36aiBO2/36ei1RA64BNGBy 07R0tGErJTVKiYK8D9INK2KqPmvdnWdD5tnBBUYAJg/9b5hD2WSOMJxN5vsGseML6U5s QvRZ8c2eM1O3/7r5e1JUNs/YCY46ju/D1rbhpr+SrIH5BwBo9UyBUGwECjWoRBdJfdv9 ddN5cm5QfvTbECJiTOyM1/N7YdUR92Y1PPAxZ6DsvKuhqA3mf2wexxYggbSRbkKE75oz e6L0KMZtb5M0hBf7o4VFvFGiERjjgUPCL9O6qZlz0yw8XSfHTPmHMP0ffldTS/g7KlV/ xhmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722307946; x=1722912746; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MKpUo4sPbKZfwDf9uMpSe0XFWLM0pJv3tz8K99wBLFg=; b=X8TrZTFF/VEJinbEIfHPUnLismiyyXBBXjrL2MtQA35zUCcFLnviA36cXccTAAz92X AE/0ahxbqPF7JRLf3dWJU4RUlVHjEFpJ6S1l8GDvdgbpMDRJJoS+n+BQgQjgVARytmy1 biGdL8C8qzD8xoXoeo0gjZcLqstNDihyrZACfXumvmeWcBzElK2HNWWdhpozfc9Wg81j scYw0Kq5MuqfRCGGggr04KcakoIF3NW2LpHWIJ7QkPopnJP4UjrEDf8aWHexJMRcCTLK s5CqJj1hXSmgB3w5J9lzexzihb9yoLUXtzn5bgTYriLZ/XGZ4G3Dl2LUXHbOomzUfKAq 84lg== X-Gm-Message-State: AOJu0Yw04mPZPJH4L0m5uw7wPCHkpnfdWzOn5M+R+GF37m4ZOqG/6X44 v+w7Ud8Qf3dSRx9B3+zQ6ZdTQTmy4aueNTPdUk+2N0OSSI/t1tK9gRXAFXgJAlL7wy/X2lPPgrn m X-Google-Smtp-Source: AGHT+IHbQ5c7TSQmgibh2WGa1iBtDhNsVYag4/URAibbiC1eTzhbWb3eO3aSR38xKxbfpytYFQSBWg== X-Received: by 2002:a17:903:2352:b0:1fb:3e52:8b5d with SMTP id d9443c01a7336-1ff048059a0mr78472125ad.1.1722307945953; Mon, 29 Jul 2024 19:52:25 -0700 (PDT) Received: from patrick-ThinkPad-X1-Carbon-Gen-8.ba.rivosinc.com ([2601:647:6700:2d90:dc95:3e30:3329:f98]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fed7ee4b0asm90812605ad.176.2024.07.29.19.52.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 19:52:25 -0700 (PDT) From: Patrick O'Neill To: gcc-patches@gcc.gnu.org Cc: jeffreyalaw@gmail.com, kito.cheng@gmail.com, gnu-toolchain@rivosinc.com, Patrick O'Neill Subject: [PATCH] RISC-V: Remove configure check for zabha Date: Mon, 29 Jul 2024 19:52:02 -0700 Message-ID: <20240730025202.3467744-1-patrick@rivosinc.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org This patch removes the zabha configure check since it's not a breaking change and updates the existing zaamo/zalrsc comment. gcc/ChangeLog: * common/config/riscv/riscv-common.cc (riscv_subset_list::to_string): Remove zabha configure check handling and clarify zaamo/zalrsc comment. * config.in: Regenerate. * configure: Regenerate. * configure.ac: Remove zabha configure check. Signed-off-by: Patrick O'Neill --- The user has to specify zabha in order for binutils to throw an error. This is in contrast to zaamo/zalrsc which are expanded from 'a' without being specified. Relying on precommit to do testing. --- gcc/common/config/riscv/riscv-common.cc | 12 +++------- gcc/config.in | 6 ----- gcc/configure | 31 ------------------------- gcc/configure.ac | 5 ---- 4 files changed, 3 insertions(+), 51 deletions(-) -- 2.34.1 diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index 682826c0e34..d2912877784 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -855,7 +855,6 @@ riscv_subset_list::to_string (bool version_p) const bool skip_zifencei = false; bool skip_zaamo_zalrsc = false; - bool skip_zabha = false; bool skip_zicsr = false; bool i2p0 = false; @@ -884,13 +883,11 @@ riscv_subset_list::to_string (bool version_p) const skip_zifencei = true; #endif #ifndef HAVE_AS_MARCH_ZAAMO_ZALRSC - /* Skip since binutils 2.42 and earlier don't recognize zaamo/zalrsc. */ + /* Skip since binutils 2.42 and earlier don't recognize zaamo/zalrsc. + Expanding 'a' to zaamo/zalrsc would otherwise break compilations + for users with an older version of binutils. */ skip_zaamo_zalrsc = true; #endif -#ifndef HAVE_AS_MARCH_ZABHA - /* Skip since binutils 2.42 and earlier don't recognize zabha. */ - skip_zabha = true; -#endif for (subset = m_head; subset != NULL; subset = subset->next) { @@ -908,9 +905,6 @@ riscv_subset_list::to_string (bool version_p) const if (skip_zaamo_zalrsc && subset->name == "zalrsc") continue; - if (skip_zabha && subset->name == "zabha") - continue; - /* For !version_p, we only separate extension with underline for multi-letter extension. */ if (!first && diff --git a/gcc/config.in b/gcc/config.in index bc819005bd6..3af153eaec5 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -635,12 +635,6 @@ #endif -/* Define if the assembler understands -march=rv*_zabha. */ -#ifndef USED_FOR_TARGET -#undef HAVE_AS_MARCH_ZABHA -#endif - - /* Define if the assembler understands -march=rv*_zifencei. */ #ifndef USED_FOR_TARGET #undef HAVE_AS_MARCH_ZIFENCEI diff --git a/gcc/configure b/gcc/configure index 01acca7fb5c..7541bdeb724 100755 --- a/gcc/configure +++ b/gcc/configure @@ -30882,37 +30882,6 @@ if test $gcc_cv_as_riscv_march_zaamo_zalrsc = yes; then $as_echo "#define HAVE_AS_MARCH_ZAAMO_ZALRSC 1" >>confdefs.h -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -march=rv32i_zabha support" >&5 -$as_echo_n "checking assembler for -march=rv32i_zabha support... " >&6; } -if ${gcc_cv_as_riscv_march_zabha+:} false; then : - $as_echo_n "(cached) " >&6 -else - gcc_cv_as_riscv_march_zabha=no - if test x$gcc_cv_as != x; then - $as_echo '' > conftest.s - if { ac_try='$gcc_cv_as $gcc_cv_as_flags -march=rv32i_zabha -o conftest.o conftest.s >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - then - gcc_cv_as_riscv_march_zabha=yes - else - echo "configure: failed program was" >&5 - cat conftest.s >&5 - fi - rm -f conftest.o conftest.s - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_riscv_march_zabha" >&5 -$as_echo "$gcc_cv_as_riscv_march_zabha" >&6; } -if test $gcc_cv_as_riscv_march_zabha = yes; then - -$as_echo "#define HAVE_AS_MARCH_ZABHA 1" >>confdefs.h - fi ;; diff --git a/gcc/configure.ac b/gcc/configure.ac index 3f20c107b6a..52c1780379d 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -5461,11 +5461,6 @@ configured with --enable-newlib-nano-formatted-io.]) [-march=rv32i_zaamo_zalrsc],,, [AC_DEFINE(HAVE_AS_MARCH_ZAAMO_ZALRSC, 1, [Define if the assembler understands -march=rv*_zaamo_zalrsc.])]) - gcc_GAS_CHECK_FEATURE([-march=rv32i_zabha support], - gcc_cv_as_riscv_march_zabha, - [-march=rv32i_zabha],,, - [AC_DEFINE(HAVE_AS_MARCH_ZABHA, 1, - [Define if the assembler understands -march=rv*_zabha.])]) ;; loongarch*-*-*) gcc_GAS_CHECK_FEATURE([.dtprelword support],