From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id DEF8D3858D35 for ; Tue, 20 Feb 2024 09:37:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DEF8D3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DEF8D3858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708421841; cv=none; b=idKHw17QcznG65kX1YvToFKUxuNTTesVz/BUQUyVieskuwumujFUSfGlQSQE/RJPFHl62sI393B3o0hv1CeXXeQVUzqBQRVacFZU1q5ACd+t/O5tmSc8cn747jyCMgRdvIEb0yB3RTgFyM5y3RfHC4+SJ3L+g60whNtpy1fWTkc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708421841; c=relaxed/simple; bh=/LRiFUU52qGUKSED/GOvCIcfle7S/a31yV99fd187vM=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=mOSeFTsf8NSy2kHU5OGATy2H+XJgwncmiy6DxR47Zxois3tNOnMAUYRjfgGKy3iT3vYIs7wHFp/e07760pidC0l8IlUe4g2clswe9eaS69Z7VjENhXOjjfTmyryrG936cTgIePPwNdP1gecOJnBUCJ6hQf0rwp+KYAUwwRJrx1M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-6e2fb9263a6so1461202a34.1 for ; Tue, 20 Feb 2024 01:37:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1708421838; x=1709026638; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vGcF2zYOO3lEVhh5C6+r2MgTSlS6qXiAgFiRuKrKk90=; b=b0/MmcpOqIS/xkniXoYUQt/N1oC6681VPsjVH/FzIhN/BTpDJx/EBU1alQul+S3OdA g+0rcCF4CGH07mppVWXGIWLCS1Sdyan1SJo7MmPRyMOOpVNljgVXa/sZf49ZIowPU4jd QcjG5C4NJK5NlhavNLlTOaMONrfCjmvajN11Np7jQsm5d4Q7YGNtUuvtkLT2qNmR3MJk gepZDKjRjGYHNRLVzl5CTgtjqkSj/PGMr91Jg7VuwX7Q4pN/xnSRymh5IkS2UHPODoau FLAYEXq5ZPf4na6/4jVnd3hUMy7jJlzzo0XaNGlXeNrJ4vKU0OiOGZLIs4ReOC6ZSpZg 1Iqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708421838; x=1709026638; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vGcF2zYOO3lEVhh5C6+r2MgTSlS6qXiAgFiRuKrKk90=; b=rcvByhW7gNturJC00B2j2su6F3sOcu1wpCtDzQViYtQuIzULOlQ9iXEOLwQkcmwWNJ GlbloFDvwIPWn8l5ZfKedT8/Q1zY2PmQTROJ4itY6cStNmWZVWKqM1lLFOcy76ZLCU/m zCq4T/pcZWd43f3HNYUX71Ppc5lnotQmjc2LYhZafQ0nHsbsPECrT3pi19x3sRoqEkbs a41DV3oZHfhE+wAwdb+suEc0CJ3xMMo1XMIadNqbYPegYZ3oN9TqMXBP63kMlSsMsLId dFtaX3cYIo1tu16k08XkVU4ipdmaGoh0vBgqHB6ZiorLVKZmymz5PocqFMcGY2Apvmnn FhQg== X-Forwarded-Encrypted: i=1; AJvYcCWRVgPT6aGKTtD1/z2ywa2hBzRGtGz4GCyy9B14kPl4G6lNlZgwTslXEmtWjFljRBP/DzObey3mFiprMvRR1dw7nR3DvodCww== X-Gm-Message-State: AOJu0YyAISBWGyfo/iE99SvIA4I9BFkjFcCrcM97ZISI29q7Gr5u57AA /7+8uz2UzyuA8Vx8R63JHniiYSS+z6MHCGb38veA1jhGFGTfIw5LtbaV69QL7D6L4IPStowbavv +8geRw/VnWl058Uo1cYQ0hJTF0Kxn/6nsgkMkIQ== X-Google-Smtp-Source: AGHT+IHhJJxN286cXNuFhL19vlNBBN+txMTq0UFbDbRfopjokyvnL/MIjMZMfsmJ/W7/6Gtgd5fTcmj+o9NhHrwW+Ws= X-Received: by 2002:a05:6830:44d:b0:6e2:da22:1369 with SMTP id d13-20020a056830044d00b006e2da221369mr14443485otc.35.1708421838051; Tue, 20 Feb 2024 01:37:18 -0800 (PST) MIME-Version: 1.0 References: <20240214194631.1877280-1-ewlu@rivosinc.com> <27c61c1e-8f5f-4016-a72d-7a85c1cc8825@gmail.com> In-Reply-To: <27c61c1e-8f5f-4016-a72d-7a85c1cc8825@gmail.com> From: Monk Chiang Date: Tue, 20 Feb 2024 17:37:07 +0800 Message-ID: Subject: Re: [PATCH] RISC-V: Set require-effective-target rv64 for PR113742 To: Robin Dapp Cc: Edwin Lu , gcc-patches@gcc.gnu.org, Kito Cheng , gnu-toolchain@rivosinc.com, jeffreyalaw@gmail.com Content-Type: multipart/alternative; boundary="000000000000c8b0cd0611ccf411" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000c8b0cd0611ccf411 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Edwin, I think just replace to: /* { dg-options "-O2 -finstrument-functions -mabi=3Dlp64d -march=3Drv64gc -mtune=3Dsifive-p600-series" } */ On Thu, Feb 15, 2024 at 7:43=E2=80=AFPM Robin Dapp wr= ote: > > Ah oops I glanced over the /* { dg-do compile } */part. It should be > > fine to add '-march=3Drv64gc' instead then? > > Hmm it's a bit tricky. So generally -mcpu=3Dsifive-p670 includes rv64 > but it does not override a previously specified -march=3Drv32 (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=3Drv32. > > For now I'd stick with something like -march=3Drv64gc -mtune=3Dsifive-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 =3D ..." and rather need to specify -march=3Drv64gcv_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 > > --000000000000c8b0cd0611ccf411--