Message ID | 20240214194631.1877280-1-ewlu@rivosinc.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1457902dyb; Wed, 14 Feb 2024 11:47:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWyZVoRENzOp5BrnDYoSsIuxcEtBsRboNiOSNp5e6Z4X1dzSA4X85VJSpVTv4zl1erWnuLOMYk9rbgy6xbE26KyeSYJTg== X-Google-Smtp-Source: AGHT+IFsUuMV2tTwLKbVofFVIQjzCULA2sx9A5oD8Mob7hyjijNMK3eDy76nY/ItLEgQghRbb5qp X-Received: by 2002:ac8:7e90:0:b0:42d:a70d:6df3 with SMTP id w16-20020ac87e90000000b0042da70d6df3mr4160902qtj.32.1707940050448; Wed, 14 Feb 2024 11:47:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707940050; cv=pass; d=google.com; s=arc-20160816; b=nTBhJ3Wuh9/i8dn8ZdrnZNdJVvi2zY46jb9xEzbbzVl6AZV3C+tZsJFSHUHxGMbIoC jomjkMF0GZXAU9lb7/e2yFjrIDGiotL47Ei7VH7DGgsWsqczLAPiseL4P12MCXukAsBn LA91qc1hhadjVlSudayc6KfuB9atbhymdllX2icxVfY3s0c0ksBBmBaTY0rH4oV/A362 ELOk5IMlM9zY2/UJdjDzYZCa3OXd1FS7DGwJtZUVaQ4/fLXJcd3coxUXrUbEQcBjNOI/ Te6Xnc3kR7yIrMnYmUICGyzHWWlM2mv5xLIzU7lfDybke6Hfe/LOuaBS6Nwq7ZJYkOME ywEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=UGB9djUqrsrF+0CK3UWFAgFfzVioB028HWCSm+5qnI4=; fh=PajsTiUD+Zom4STkTKWiSXkInHCgsZ6BgwxSSCARjB4=; b=qTn/WV7NUWh44QBm8TY1rIdtclhgElHJRi/KyKiMIVvcCpLL8TxnYiVpR4lGgV1tOU L5/LrKQswigoLEDMnSvIl9NLHgr7SjGoaJqKfBCRaGkN+wfrzJgTmvAtvaH0PDvNtwur chXHT3ZhAiDlqqge+OgGuDhGzgoivltcMiv0XyhsCdW1AB9SqD1WEJzTrUDVpLVK78hM Vjvn2CFbwgAz4Z1Ln187MOlxluY/nWHOeo/v5sLTBDHu8L4VmKSYEG1KXhNKJmCvY7NO 1CB6AQGvIob/NoxS4sbJ5riZD9T7Q87Pxchu9VSEy1H3jvXmkzC6F64pqQ01sZUDkvAK RyUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=yzkSEDKx; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" X-Forwarded-Encrypted: i=2; AJvYcCX/741jUtUCkf0ijetAY704lofYrl6sms30Ibc3TjrfNKyp7VdInIuTCDMReA2kQvCdbIHB9j9vLlRPE323PWkoa47xpg== Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id v12-20020ac8578c000000b0042c75ce439fsi6687864qta.169.2024.02.14.11.47.30 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 11:47:30 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=yzkSEDKx; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 22E973860768 for <ouuuleilei@gmail.com>; Wed, 14 Feb 2024 19:47:30 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id C134C3858C36 for <gcc-patches@gcc.gnu.org>; Wed, 14 Feb 2024 19:46:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C134C3858C36 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 C134C3858C36 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707939999; cv=none; b=Vx8dGcT3XydO2wE0kggtKFqZhBYacXtBFd21jPdI8kppizyofHBA1JIvITwbnvHFFzuW7Cx3/+CBkfuJGKl9xhG3kOM2vvZwPTuHiPQP7C9UB0w0u44w4Cy+b8h/2ZWlejBtp5aqjrmoa4nw1jwL0oozpQwPa1fCfyCMt5+NWWw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707939999; c=relaxed/simple; bh=IpPNaNoHhZQKNhyK+5hyJd+0LAJrPYm4vM7K9vCGpKQ=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=axivBPfvYr4eZeFsVCwBRPIT5OuyFO3YJX49nqqKkaYEC2U/xIeX6A5nv5uojvtFYe5QQf2SJvRZbwJwFTsKAnnN8m9P5cQvQJSqVpZrMIjX4hWLZE54/jfVLCIfCn1aPGK4Y4L63nWCHwFPsDFAErjxRooSyCG+/t6UlHiGuk0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-5d8b276979aso104559a12.2 for <gcc-patches@gcc.gnu.org>; Wed, 14 Feb 2024 11:46:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1707939995; x=1708544795; 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=UGB9djUqrsrF+0CK3UWFAgFfzVioB028HWCSm+5qnI4=; b=yzkSEDKxSgfYknU5Kw4hiiWbkPw9OHnCeG5GF5tLcrqRu1OcOm05fc5DQST8raIR4x VXepfTgcJmNWb3NNyU+8lsu0xEnKaSLxqZCCcxeQjSRey5fQaYkW5ODKodvwojzdJK1H 59vmbadueaktZWdMctEhb+7KPHd/YB5Jw67keLWwQ2NFINmFcJvnTQRAln6NMEeJrOrU ZlO30fQZdsdnVZSRGEde5JtKKb3RwCnVQ5vPBR+iagL5YPjHgbJXkXrE29HctD+92H09 oNT8gKZQvS9aOm2umqCg1LcediZ4rIX7aA9M8/0tWtIDlYobiSbEuV+zov4eWQ94NK/q J9Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707939995; x=1708544795; 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=UGB9djUqrsrF+0CK3UWFAgFfzVioB028HWCSm+5qnI4=; b=AQr2WXuEBX4MXEkzNkLI++dx8huSwt98sCKRshyvxZzysOt1HcTrC8xcbBJGYHlKCj Xu0AAvNtwTOOxa9vXV6fA9jkLyvVI2wjaU5s2zzerfCokifPGmiFfwjH2lnFwxq7KNr3 Td+Kod6yfsQRwSicxSoaT+rIXlG0E0QQjFwABI8+ASsmt30eWAliWeqGUsEBv/qomus1 omsCXGEVSwkGgOIYuey4nuzr5gtRPRh5yDoQzsjDT5WuBnARdiF8bfkBOd6C6SbYWhPu iFuQQ4//1kPoYNy2BDEPT5Up2ktMfG4TR2r13u/YpgJ4dAaFwpV4SdWXXjqHltAVrxBq TfmA== X-Gm-Message-State: AOJu0YzLXW71GwzqK1dHjfi0piym9dmwE0u/uaCAGX8jqEriiL/IZWZY NTiCrbNXtuPuzCrrjHDwtQTxK0/VpPwCC9G2YIzBg9Rd/PB6+mOA/lsb63/acQIaUGZH5rRufWu N X-Received: by 2002:a05:6a21:3512:b0:19e:cd5d:88f6 with SMTP id zc18-20020a056a21351200b0019ecd5d88f6mr4686498pzb.53.1707939995456; Wed, 14 Feb 2024 11:46:35 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUGZ+8SFhNqrqE5+fu59EdI+9HMjlcJJ66iO77C1fuo1Yxt/vt8m+mIoHt1yHyK8U816R3SF6LMbmjFuXwQJn2unhve7aGynrbSrClHS5qhAbC+uM2YpqOEXRgrV1EqLeadkry5G93v6wUJxDhQ5KhG Received: from ewlu.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id r15-20020a638f4f000000b005dc389409c1sm4609005pgn.93.2024.02.14.11.46.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 11:46:34 -0800 (PST) From: Edwin Lu <ewlu@rivosinc.com> To: gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com, monk.chiang@sifive.com, jeffreyalaw@gmail.com, Edwin Lu <ewlu@rivosinc.com> Subject: [PATCH] RISC-V: Set require-effective-target rv64 for PR113742 Date: Wed, 14 Feb 2024 11:46:31 -0800 Message-Id: <20240214194631.1877280-1-ewlu@rivosinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790904946494744505 X-GMAIL-MSGID: 1790904946494744505 |
Series |
RISC-V: Set require-effective-target rv64 for PR113742
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Edwin Lu
Feb. 14, 2024, 7:46 p.m. UTC
The testcase pr113742.c is failing for 32 bit targets due to the following cc1
error:
cc1: error: ABI requries '-march=rv64'
Disable testing on rv32 targets
PR target/113742
gcc/testsuite/ChangeLog:
* gcc.target/riscv/pr113742.c: add require-effective-target
Signed-off-by: Edwin Lu <ewlu@rivosinc.com>
---
gcc/testsuite/gcc.target/riscv/pr113742.c | 1 +
1 file changed, 1 insertion(+)
Comments
On 2/14/24 20:46, Edwin Lu wrote: > The testcase pr113742.c is failing for 32 bit targets due to the following cc1 > error: > cc1: error: ABI requries '-march=rv64' I think we usually just add exactly this to the test options (so it is always run rather than just on a 64-bit target. Regards Robin
On 2/14/2024 12:09 PM, Robin Dapp wrote: > On 2/14/24 20:46, Edwin Lu wrote: >> The testcase pr113742.c is failing for 32 bit targets due to the following cc1 >> error: >> cc1: error: ABI requries '-march=rv64' > I think we usually just add exactly this to the test options (so > it is always run rather than just on a 64-bit target. > > Regards > Robin Ah oops I glanced over the /* { dg-do compile } */part. It should be fine to add '-march=rv64gc' instead then? Edwin
> Ah oops I glanced over the /* { dg-do compile } */part. It should be > fine to add '-march=rv64gc' instead then? Hmm it's a bit tricky. So generally -mcpu=sifive-p670 includes rv64 but it does not override a previously specified -march=rv32 (that might have been added by the test harness or the test target). It looks like it does override a (build option and thus not directly specified when compiling) --with-arch=rv32. For now I'd stick with something like -march=rv64gc -mtune=sifive-p670 (but please check if the original problem does occur with this). While you're at it you could delete the redundant '/' in the first line. In general it's a bit counterintuitive a test specifying a particular CPU (that supports several extensions) might have those overridden when e.g. testing on a rv32 target not supporting those. We also do not support cpu names in the march string so there is no nice way of overriding previously specified marchs. Kito: Any idea regarding this? I read in your commit message that mcpu has lower precedence than march. Right now that allows us to somewhat silently remove architecture options that are specified last on the command line. aarch64 warns in case something is in conflict, maybe we should do that as well? At least I find it a bit annoying that we don't have a way of saying: "This test always needs to be compiled with all arch features of cpu = ..." and rather need to specify -march=rv64gcv_z..._z... Without having this thought through, can't mcpu be of kind of similar precedence to march and we'd let the one specified last "win" in case of conflicts? Possibly with an exception for the 32/64 bit. Does LLVM not have this problem? Regards Robin
Hi Edwin, I think just replace to: /* { dg-options "-O2 -finstrument-functions -mabi=lp64d -march=rv64gc -mtune=sifive-p600-series" } */ On Thu, Feb 15, 2024 at 7:43 PM Robin Dapp <rdapp.gcc@gmail.com> wrote: > > Ah oops I glanced over the /* { dg-do compile } */part. It should be > > fine to add '-march=rv64gc' instead then? > > Hmm it's a bit tricky. So generally -mcpu=sifive-p670 includes rv64 > but it does not override a previously specified -march=rv32 (that might > have been added by the test harness or the test target). It looks > like it does override a (build option and thus not directly specified > when compiling) --with-arch=rv32. > > For now I'd stick with something like -march=rv64gc -mtune=sifive-p670 > (but please check if the original problem does occur with this). > While you're at it you could delete the redundant '/' in the first > line. > > In general it's a bit counterintuitive a test specifying a > particular CPU (that supports several extensions) might have > those overridden when e.g. testing on a rv32 target not supporting > those. We also do not support cpu names in the march string > so there is no nice way of overriding previously specified marchs. > > Kito: Any idea regarding this? I read in your commit message that > mcpu has lower precedence than march. Right now that allows us to > somewhat silently remove architecture options that are specified > last on the command line. > > aarch64 warns in case something is in conflict, maybe we should do > that as well? > > At least I find it a bit annoying that we don't have a way of > saying: > "This test always needs to be compiled with all arch features of > cpu = ..." and rather need to specify -march=rv64gcv_z..._z... > > Without having this thought through, can't mcpu be of kind of > similar precedence to march and we'd let the one specified last > "win" in case of conflicts? Possibly with an exception for > the 32/64 bit. Does LLVM not have this problem? > > Regards > Robin > >
diff --git a/gcc/testsuite/gcc.target/riscv/pr113742.c b/gcc/testsuite/gcc.target/riscv/pr113742.c index ab8934c2a8a..9cea92ed97c 100644 --- a/gcc/testsuite/gcc.target/riscv/pr113742.c +++ b/gcc/testsuite/gcc.target/riscv/pr113742.c @@ -1,4 +1,5 @@ //* { dg-do compile } */ /* { dg-options "-O2 -finstrument-functions -mabi=lp64d -mcpu=sifive-p670" } */ +/* { dg-require-effective-target rv64 } */ void foo(void) {}