From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by sourceware.org (Postfix) with ESMTPS id 77CE73858C56 for ; Thu, 7 Dec 2023 08:12:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 77CE73858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 77CE73858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::532 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701936742; cv=none; b=wZvmdTocqCePcoYgQ3MF0R9/r4dBLvnvrBb36XdziHafHDKjO4Su62XDowhXaN2wlqC0Pw0Ai2xCoKCh6pn9rUzqoeOVjJ3oKWfVUBodmnuc4ga9QTd2EczLD0XNP2dch1dVQTePUKAwUTqtSMvU8fi3Ky02w8fF8HGGK57uJvQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701936742; c=relaxed/simple; bh=DgKYs14D4kjcSV8llqkCe0VL0pHkMs9Y81/FtO46E74=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=b0lqF6hhYob+zbJ1A5P3nm02yGZRQ7efzBUTAVMje+yM/fyG/+V0Anv/wfd6kyssUB/6HDAJmkSd64yatAAfKJ3PNgElVwQbu5UrygzspBXNGM3o8MD1HS+q8wjWzGaNs4GEeDmphbDDOKHmM5uLrx7D+43vanMw6jstb7tGsqw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-54c64316a22so831536a12.0 for ; Thu, 07 Dec 2023 00:12:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701936739; x=1702541539; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=dI99ZHRzc7rNs86LhZ5ZXyHnn4RK7WMBwhniRpnLKY8=; b=Tq+8VELN6MNDNPLymv2WpEeJFGhY8rQLtwZVgRTwTjkS1VhvnQx4xBO695kZvusIYZ wZEt6p5sTsTiHw4S4lutorWOhe1XSxWWtUSFdxKhMSDsEF0rRgSXnMmnPhVfKcmKwJEn 4FJVJ6pyT0JDyhqNLp/10N6eltOFXhlBr4aFzPaA/gO5ujGieVE5CfBNVllrSvzE/XTj Vd8vYc8hxaAzkmXm0TjtsT907CzqhO/duKPPdtstA6+682FeTjl2PjlIAj1IUETi/GPQ 95RVBnAjlAlTNBt8zy+4HjbTEi63p3DkP+zaylO2BZOFVpronlRcb/jL5lVIs7f/5MM4 o3lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701936739; x=1702541539; h=content-transfer-encoding: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=dI99ZHRzc7rNs86LhZ5ZXyHnn4RK7WMBwhniRpnLKY8=; b=YvAu3ZRagyAePm67sbl1bcM5RB599/IV+pPRtgUQgkwTZikHfXhLFQb2gF6hFafNuG B5KwsTUibj16UzJ68601ShlmJij6zjPOmG0QM2g/qo5aZJcFXwewO9+KLYDCvc42iyFQ 0JoOjk7xawpL5JODBtImu0d5P64fNkk+FewRsvAWhx7d+PZgtAZbtVGe0hyCK+yRHwY0 pM4B6SIOIgWR1WGJ9JNXRL0N8N59WiuB1zEuM6+THKbVvippAtPz+2TpEDCKQc1hvPOm 3gczmMLgT8xhf8gcorYjFSxi42Rd6DS1zRWc7GVas5sHjL/RrLtYtWzDd0mAOVhVyD4n Nnbg== X-Gm-Message-State: AOJu0YwpcHhRh7AaISfXKlBta1ucWLQy7bAxJ5ZYbjl7SaRbX36IIhBf 0QkQpDoM0lAKw4kvfg7FjcTsd6T00U/GfxbWVuY= X-Google-Smtp-Source: AGHT+IFvk4gwJ1EWu4n+15RXdrVianVRdFI2nG156iPl5/K3z478J9JkIw58aM+NXYsSUqSpEytrhCpKZQWj7m+CMVs= X-Received: by 2002:a17:906:51cd:b0:a1e:5ea5:c5d2 with SMTP id v13-20020a17090651cd00b00a1e5ea5c5d2mr678322ejk.106.1701936738823; Thu, 07 Dec 2023 00:12:18 -0800 (PST) MIME-Version: 1.0 References: <20231207031203.14734-1-zengxiao@eswincomputing.com> In-Reply-To: <20231207031203.14734-1-zengxiao@eswincomputing.com> From: Kito Cheng Date: Thu, 7 Dec 2023 16:12:06 +0800 Message-ID: Subject: Re: [PING^1][PATCH v2] RISC-V: Imply 'Zicntr' and 'Zihpm' implicitly depended on 'Zicsr' To: Xiao Zeng Cc: binutils@sourceware.org, palmer@dabbelt.com, nelson@rivosinc.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,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 List-Id: LGTM On Thu, Dec 7, 2023 at 11:13=E2=80=AFAM Xiao Zeng wrote: > > This commit adds support for ratified extensions: > 'Zicntr' and 'Zihpm', Which are all implicitly depend on 'Zicsr'. > > This is based on: > > > bfd/ChangeLog: > > * elfxx-riscv.c: Add 'Zicntr' and 'Zihpm' -> 'Zicsr'. > (riscv_supported_std_z_ext) Add 'Zicntr' and 'Zihpm' to the list. > > gas/ChangeLog: > > * testsuite/gas/riscv/attribute-15.d: New test. > * testsuite/gas/riscv/attribute-15.s: New test. > * testsuite/gas/riscv/attribute-16.d: New test. > * testsuite/gas/riscv/attribute-16.s: New test. > --- > bfd/elfxx-riscv.c | 4 ++++ > gas/testsuite/gas/riscv/attribute-15.d | 6 ++++++ > gas/testsuite/gas/riscv/attribute-15.s | 1 + > gas/testsuite/gas/riscv/attribute-16.d | 6 ++++++ > gas/testsuite/gas/riscv/attribute-16.s | 1 + > 5 files changed, 18 insertions(+) > create mode 100644 gas/testsuite/gas/riscv/attribute-15.d > create mode 100644 gas/testsuite/gas/riscv/attribute-15.s > create mode 100644 gas/testsuite/gas/riscv/attribute-16.d > create mode 100644 gas/testsuite/gas/riscv/attribute-16.s > > diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c > index 567631e7d96..4c91081acd1 100644 > --- a/bfd/elfxx-riscv.c > +++ b/bfd/elfxx-riscv.c > @@ -1144,6 +1144,8 @@ static struct riscv_implicit_subset riscv_implicit_= subsets[] =3D > {"zvl256b", "zvl128b", check_implicit_always}, > {"zvl128b", "zvl64b", check_implicit_always}, > {"zvl64b", "zvl32b", check_implicit_always}, > + {"zicntr", "zicsr", check_implicit_always}, > + {"zihpm", "zicsr", check_implicit_always}, > {"zcd", "d", check_implicit_always}, > {"zcf", "f", check_implicit_always}, > {"zfa", "f", check_implicit_always}, > @@ -1260,12 +1262,14 @@ static struct riscv_supported_ext riscv_supported= _std_z_ext[] =3D > {"zicbop", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > {"zicboz", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > {"zicond", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > + {"zicntr", ISA_SPEC_CLASS_DRAFT, 2, 0, 0 }, > {"zicsr", ISA_SPEC_CLASS_20191213, 2, 0, 0 }, > {"zicsr", ISA_SPEC_CLASS_20190608, 2, 0, 0 }, > {"zifencei", ISA_SPEC_CLASS_20191213, 2, 0, 0 }, > {"zifencei", ISA_SPEC_CLASS_20190608, 2, 0, 0 }, > {"zihintntl", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 = }, > {"zihintpause", ISA_SPEC_CLASS_DRAFT, 2, 0, 0 }, > + {"zihpm", ISA_SPEC_CLASS_DRAFT, 2, 0, 0 }, > {"zmmul", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > {"zawrs", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > {"zfa", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, > diff --git a/gas/testsuite/gas/riscv/attribute-15.d b/gas/testsuite/gas/r= iscv/attribute-15.d > new file mode 100644 > index 00000000000..a17e82c8508 > --- /dev/null > +++ b/gas/testsuite/gas/riscv/attribute-15.d > @@ -0,0 +1,6 @@ > +#as: -march-attr -misa-spec=3D20191213 > +#readelf: -A > +#source: attribute-15.s > +Attribute Section: riscv > +File Attributes > + Tag_RISCV_arch: "rv32i2p1_zicntr2p0_zicsr2p0_zihpm2p0" > diff --git a/gas/testsuite/gas/riscv/attribute-15.s b/gas/testsuite/gas/r= iscv/attribute-15.s > new file mode 100644 > index 00000000000..ecb10a298fd > --- /dev/null > +++ b/gas/testsuite/gas/riscv/attribute-15.s > @@ -0,0 +1 @@ > + .attribute arch,"rv32i_zicntr_zihpm" > diff --git a/gas/testsuite/gas/riscv/attribute-16.d b/gas/testsuite/gas/r= iscv/attribute-16.d > new file mode 100644 > index 00000000000..6ca3b5351f8 > --- /dev/null > +++ b/gas/testsuite/gas/riscv/attribute-16.d > @@ -0,0 +1,6 @@ > +#as: -march-attr -misa-spec=3D20191213 > +#readelf: -A > +#source: attribute-16.s > +Attribute Section: riscv > +File Attributes > + Tag_RISCV_arch: "rv64i2p1_zicntr2p0_zicsr2p0_zihpm2p0" > diff --git a/gas/testsuite/gas/riscv/attribute-16.s b/gas/testsuite/gas/r= iscv/attribute-16.s > new file mode 100644 > index 00000000000..8757bb5181b > --- /dev/null > +++ b/gas/testsuite/gas/riscv/attribute-16.s > @@ -0,0 +1 @@ > + .attribute arch,"rv64i_zicntr_zihpm" > -- > 2.17.1 >