From patchwork Tue Feb 20 04:02:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 1901186 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; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=IDjnqXky; 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 4Tf5Pj0Knkz1yP6 for ; Tue, 20 Feb 2024 15:04:07 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 155653858C5F for ; Tue, 20 Feb 2024 04:04:05 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id BE1D03858D1E for ; Tue, 20 Feb 2024 04:03:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BE1D03858D1E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BE1D03858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::534 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708401827; cv=none; b=uCBDrANPdaMukLHsdJxfKVuFxOoT4EnDJIaQZ0cupf7XNvzp6+19+zMyWRL7tltiN1cV8VW1cbaHedkpI8Mxpu6yvJBTp+gepHTWbJaSioTT2OKoEvfK3ia2qsdlwlbEwLflT3AEzKdoG9R+9CKrA6I6Ip0586TR4MECSCQCAJ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708401827; c=relaxed/simple; bh=spjFa3jSjaF8qco60AqAjbsZ6YdxiurCCoRtoCen+20=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=KGvv5j3oSDu+ylEx/IReHbpmd9pYllM1WBzw5RgiZge85iotE+dxBRPTjIoziMoA1iw3+3mZ8IISKmvPtvDH+L/LgbVlf7fWOiA0IUIWTSozZwS8CEJtpJKlJw6Vdc+OXHCPQ2Sg8UwUO8eJWjn076GAQ65fABm1fprIUZ90iA8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-5d8b519e438so4744376a12.1 for ; Mon, 19 Feb 2024 20:03:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1708401818; x=1709006618; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=ITztVPRuWP3M9+Y3/WXl2kFkydeOWg6HAPiVh582f1Q=; b=IDjnqXkySbTAs3VEq4n/MfvmnyOI6yRkOO5PxEMuLYA4wxlRRBzQn+a3CV2O7lH7GJ 4tbnENA4fzS6k8+DpF3o966jiF6pK+gxxLlNCbF3K8IUIglziIZosInzriZnj6zMEoNq ssqceRM9VrjSHNBRD1a28XXTuUi8alhYXAGkmhjnDgffJI1Yd24pR5f8LurW4yA5OhCh Ou+Jbj6DAUSATB+WIuXDd6o575+QVtCAjPnJ0q0ZSd1JJ8iWsrK3dKOvTANHpCDx1x7G 16Kj0FIkwm6xOR+zCF8YgTPNNC+gxmybIdBXtd6pFAJT/lgKhxQr6Tm4TizVl4Iw5dS5 dNug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708401818; x=1709006618; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ITztVPRuWP3M9+Y3/WXl2kFkydeOWg6HAPiVh582f1Q=; b=NtnPh6FYcTJxwXaHrycac9JjEF/IKYdAbF7UVFjFaI/+YiZJ228aDfaIzWZptGFdZq A3wXevZFrZ5eG8wghVKJaRqiygdSfn25VnnacNhV+PT5aWfxUAlG6jY5ykUrmCfeqF+U usdXkz/QcztJmMgzCnwPm/ALaqPnpEEfus7tPiroP46nU2+dm/EHlbSkUidueoQy5dzE tQbnQ/wKhvPxDg6pJCF1FvpNhTUHrRWmFJ4Cq7hrbSN179wlN6taCy7qOaFWSshwKLIx KUIeE6C4J6gC6aYXeCJX3X7eAm+x92dO0PqwBmAqDNMY6MgIImWkeKKD2yYdWx2TQLWD kUWA== X-Gm-Message-State: AOJu0YyJ2aFeI2fPB4MWXkZTyYgbFkyGbr2SthJOjt7fNwIjYbayujGj THcvlmOdvrQ5Ur0DzIZvd9HFMSnoeGWg8Uvqfdv/p0hXxQZ7IUHMvcLChx+2TdTbOtpjq6S1cse dQg== X-Google-Smtp-Source: AGHT+IHtsG4yW1GNKI1haZs+WD5FzRfuAMLAt6tnVAdJd4aoWdX3LDBhjTVhdM2OreLlgFUZZ0HnwQ== X-Received: by 2002:a05:6a20:2d09:b0:1a0:8a3f:e536 with SMTP id g9-20020a056a202d0900b001a08a3fe536mr10178790pzl.30.1708401818372; Mon, 19 Feb 2024 20:03:38 -0800 (PST) Received: from free.home ([2804:7f1:218a:c88b:e868:4eaf:8258:c30b]) by smtp.gmail.com with ESMTPSA id j19-20020a170902f25300b001d9537cf238sm5204233plc.295.2024.02.19.20.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 20:03:38 -0800 (PST) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 41K42op4005552 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 20 Feb 2024 01:02:51 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Cc: Kito Cheng , Palmer Dabbelt , Andrew Waterman , Jim Wilson Subject: [PATCH] RISC-V: Fix riscv/arch-19.c with different ISA spec version Organization: Free thinker, does not speak for AdaCore Date: Tue, 20 Feb 2024 01:02:50 -0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, WEIRD_QUOTING 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 testcase is failing with riscv64-elf and riscv32-elf in the gcc-13 branch, if configured to use an assembler that supports -misa-spec; with an assembler that doesn't, the test passes both with and without the following backport from the trunk, so I'd like to install it in gcc-13. Regstrapped on x86_64-linux-gnu, along with other backports, and tested manually on riscv64-elf. Ok to install? From: Kito Cheng In newer ISA spec, F will implied zicsr, add that into -march option to prevent different test result on different default -misa-spec version. gcc/testsuite/ * gcc.target/riscv/arch-19.c: Add -misa-spec. (cherry picked from commit 9fde76a3be8e1717d9d38492c40675e742611e45) --- gcc/testsuite/gcc.target/riscv/arch-19.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/riscv/arch-19.c b/gcc/testsuite/gcc.target/riscv/arch-19.c index b042e1a49fe6f..95204ede26a69 100644 --- a/gcc/testsuite/gcc.target/riscv/arch-19.c +++ b/gcc/testsuite/gcc.target/riscv/arch-19.c @@ -1,4 +1,4 @@ /* { dg-do compile } */ -/* { dg-options "-march=rv64if_zfinx -mabi=lp64" } */ +/* { dg-options "-march=rv64if_zicsr_zfinx -mabi=lp64" } */ int foo() {} -/* { dg-error "'-march=rv64if_zfinx': z\\*inx conflicts with floating-point extensions" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv64if_zicsr_zfinx': z\\*inx conflicts with floating-point extensions" "" { target *-*-* } 0 } */