From patchwork Wed Jul 31 00:32:09 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: 1966797 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=gVzrz1KQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; 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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4WYY6Y62QGz1ybb for ; Wed, 31 Jul 2024 10:35:49 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0B2AF386075D for ; Wed, 31 Jul 2024 00:35:48 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by sourceware.org (Postfix) with ESMTPS id 1F760385ED4B for ; Wed, 31 Jul 2024 00:35:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F760385ED4B 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 1F760385ED4B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::235 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722386126; cv=none; b=DESx/Yg4rutRwow4IcEaHbWg/DQeD/DxgIPB/KGosyPpReDkgDxjuzpmiU3KITa1tEwUGAHXWTdnFxtEf2ynC0RyfQbeZ0dxxw4FuXU4bu/tgCug51DcvSm8PdG7jq903XdrE/G5O7B6JAx3dRUETrAFfPsHdHqppp1l3X7Hsvk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722386126; c=relaxed/simple; bh=X6g6+WfWLrNdN9q3ZP9rnIKnGofFna3hK/tmkDT3osY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=l7Q4OovPikRKapjLzi17ahbGUxo2RK8cu69N3l8ZN8JMIdCS3YoIANdQ5UQ79Pda+dYRss8vr/F4euuQkchDTHGScy+8wfBkcTS3YF+WoqyPNQvEPJfBKDzfxAmZULW4/2DcR6RYdckW6pn0XwGe3Q1MAiJzejrt6R/2I+iBusU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3db1d4dab7fso3160484b6e.1 for ; Tue, 30 Jul 2024 17:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1722386124; x=1722990924; 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=G8wgwL/Mwwl7mwLFqlzmN+ZP6C4HIatEOSY9Owesuls=; b=gVzrz1KQX9024M3AMigfSpn+ZIanAdhwEFc0a2ZHJHDE732ODu4xFabwgYvdegvOog QK1X3aRwhTR/kFTMeq5FDKY9FHo7yeOr0hNbcXUCpbyqwHapqDSZD5Wioc7qI64RuYEo QQvxsUjLpQ2B0mm12H0DPNbzt0IrYMFhHqeMY08ZJ2ySySIn8ec5jecVuRKybGBBWAi5 4lziEglW0ki5S2aNDBOHsOGgTBt5VMn7JwN7lTELb0hLQRKRRFJXrZvLdWY5gxvFz4xr El36g8puPhroBI7oDKdouMolH8EsAPiu5MKzi2VOsfBsVKfw0X/3FcZh07uPXf5c7tT9 KGiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722386124; x=1722990924; 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=G8wgwL/Mwwl7mwLFqlzmN+ZP6C4HIatEOSY9Owesuls=; b=uEDmzvAdwM7dflGiP/aGSFvrO3giLJs4wMo/OFQE2rKu3g2pDND7bdLm8QJSaGpanI 3oGuCnBGcn5fBq4xKp1T3PNjE7QyxWJMgFBKpeznQmfaxvSQZm0PfLjQ1k3AwAne/7nb sj4y33IToyhYN2zpcUNM8u8C/7xjCsZn7Oq2imOhGG+s32qm2KxpSnqi+BA8kODUJTrA ZGxX4wICTXaCKFyKQSXNkP7aX3/0DE6TNC06NljzUu1BpaheHuO+zPd5FeEhY2BZVj0g a93t2zQIITCRq2ZBtn/GQh+cs429VTfT/IAiP6327RyXUByIef5rGd3BIh72nYT8w+Nn we6A== X-Gm-Message-State: AOJu0YwgST80Mcpaz/aZHyMKPDgto4ChN6hXxaeUO0llPaBZZVWjwrN5 914dTAI88u97fats1WBjFfUjFeG5Xf+OSiiLQF/neSMAjmRJRQ/gs2XNbzBlY7KZKuZI+n7eGxy u X-Google-Smtp-Source: AGHT+IHeLvp4FIUOPN/kfnz0IuURnshpeEk1FU+L49lojMx9n9cMcDoVReCZagFAiMGnBF8lZjunGw== X-Received: by 2002:a05:6808:130b:b0:3d9:2925:cd37 with SMTP id 5614622812f47-3db2389c251mr17261192b6e.2.1722386123581; Tue, 30 Jul 2024 17:35:23 -0700 (PDT) Received: from patrick-ThinkPad-X1-Carbon-Gen-8.hq.rivosinc.com ([50.145.13.30]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7a9f836c845sm9567577a12.37.2024.07.30.17.35.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 17:35:23 -0700 (PDT) From: Patrick O'Neill To: gcc-patches@gcc.gnu.org Cc: jeffreyalaw@gmail.com, kito.cheng@gmail.com, gnu-toolchain@rivosinc.com, pinskia@gmail.com, Patrick O'Neill Subject: [PATCH v2] RISC-V: Add deprecation warning to LP64E abi Date: Tue, 30 Jul 2024 17:32:09 -0700 Message-ID: <20240731003209.344379-1-patrick@rivosinc.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLACK 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 gcc/ChangeLog: PR 116152 * config/riscv/riscv.cc (riscv_option_override): Add deprecation warning. gcc/testsuite/ChangeLog: * gcc.target/riscv/predef-9.c: Add check for warning. Signed-off-by: Patrick O'Neill --- v2 ChangeLog: Shorten message and split into warning and note. --- gcc/config/riscv/riscv.cc | 7 +++++++ gcc/testsuite/gcc.target/riscv/predef-9.c | 2 ++ 2 files changed, 9 insertions(+) -- 2.34.1 diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 8ece7859945..b0526529980 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -9818,6 +9818,13 @@ riscv_option_override (void) error ("rv64e requires lp64e ABI"); } + if (riscv_abi == ABI_LP64E) + { + if (warning (OPT_Wdeprecated, "LP64E ABI is marked for deprecation in GCC")) + inform (UNKNOWN_LOCATION, "If you need LP64E please notify the GCC " + "project via https://gcc.gnu.org/PR116152"); + } + /* Zfinx require abi ilp32, ilp32e, lp64 or lp64e. */ if (TARGET_ZFINX && riscv_abi != ABI_ILP32 && riscv_abi != ABI_LP64 diff --git a/gcc/testsuite/gcc.target/riscv/predef-9.c b/gcc/testsuite/gcc.target/riscv/predef-9.c index cc3abc9a741..0d9488529ea 100644 --- a/gcc/testsuite/gcc.target/riscv/predef-9.c +++ b/gcc/testsuite/gcc.target/riscv/predef-9.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-march=rv64em -mabi=lp64e -mno-div -mcmodel=medlow" } */ +/* { dg-warning "LP64E ABI is marked for deprecation in GCC" "" { target *-*-* } 0 } */ +/* { dg-note "If you need LP64E please notify the GCC project via https://gcc.gnu.org/PR116152" "" { target *-*-* } 0 } */ int main () { #if !defined(__riscv)