From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id A078F3858C3A for ; Fri, 24 Dec 2021 03:23:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A078F3858C3A Received: by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 005BC300089; Fri, 24 Dec 2021 03:23:13 +0000 (UTC) From: Tsukasa OI To: Tsukasa OI , Nelson Chu , Vineet Gupta Cc: binutils@sourceware.org Subject: [PATCH v2 0/3] RISC-V: Prepare Privileged Architecture 1.12 Date: Fri, 24 Dec 2021 12:22:53 +0900 Message-Id: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KAM_NUMSUBJECT, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Dec 2021 03:23:17 -0000 [DIFFERENCES: V1 and V2] Test failures on "1p12" testcases are fixed (only Patch 3 is affected). This patchset adds minimal support for the Privileged Architecture version 1.12. This is preparation for my upcoming patchset to add all CSRs as defined in recently ratified documents. Because my copyright assignment to FSF is not complete, this patchset is intentionally designed to be *not legally significant* (despite large patch size at first glance). I haven't even received the assignment form but it's okay because it's the holidays. It also improves testcases for maintainability. Those changes are hardly functional but can be a foundation of upcoming changes (by Vineet and me, at least). To quote Information for Maintainers of GNU Software , > A regular series of repeated changes, such as renaming a symbol, is not > legally significant even if the symbol has to be renamed in many places. [Patch 1/3: Make testcase indentation consistent] When "[(SPACE)(TAB)]+" pattern (regex) should be tested in RISC-V testcases, following 4 files have "[(x*SPACE)(TAB)]+" (x >= 2): - gas/testsuite/gas/riscv/option-arch-01a.d - gas/testsuite/gas/riscv/priv-reg-version-1p10.d - gas/testsuite/gas/riscv/priv-reg-version-1p11.d - gas/testsuite/gas/riscv/priv-reg-version-1p9p1.d They even have different indentation. For instance, similar "priv-reg-version-1p10.d" and "priv-reg-version-1p11.d" have different indentation and that makes making testcases tedious (per-file adoptation is required). This commit makes all such instances (except 2 occurrences in "option-arch-01a.d", which will be unaligned if I change that) to "[(1*SPACE)(TAB)]+". All those changes are considered non-creative. [Patch 2/3: Unify "access all CSRs" testcases] On some RISC-V testcases, we have to test access to all (or almost all) CSRs. However, we have two similar but separate files exist: - gas/testsuite/gas/riscv/priv-reg.s - gas/testsuite/gas/riscv/priv-reg-fail-read-only-01.s This commit moves main contents of "priv-reg.s" to "priv-reg-access-all.s" and makes two files above include that common source file. As a side effect, many .d files need additional "-I$srcdir/$subdir" option. This idea is from gas/testsuite/gas/arm/cde.[ds]. Only two lines (.include directives) are considered minimally creative. [Patch 3/3: Add Privileged Architecture version 1.12] This commit adds minimal support (with help string and testcases) to the Privileged Architecture version 1.12. Unlike Vineet Gupta's patch, 1. It also adds help string 2. It also copies "1p11" testcases to "1p12" (with non-creative version adoptation) (cf.) Vineet Gupta's privileged architecture 1.12 patch: Three lines (in total) from three files are considered minimally creative: - bfd/cpu-riscv.c - bfd/cpu-riscv.h - gas/config/tc-riscv.c >From my view, only 5 lines are minimally creative and all the rest are non-creative changes (regular series of repeated changes), hoping that this whole patchset is *not* legally significant. Tsukasa OI (3): RISC-V: Make testcase indentation consistent RISC-V: Unify "access all CSRs" testcases RISC-V: Add Privileged Architecture version 1.12 bfd/cpu-riscv.c | 1 + bfd/cpu-riscv.h | 1 + gas/config/tc-riscv.c | 2 +- gas/testsuite/gas/riscv/csr-dw-regnums.d | 2 +- gas/testsuite/gas/riscv/option-arch-01a.d | 8 +- gas/testsuite/gas/riscv/priv-reg-access-all.s | 292 ++++++++++ gas/testsuite/gas/riscv/priv-reg-fail-fext.d | 2 +- .../gas/riscv/priv-reg-fail-read-only-01.d | 2 +- .../gas/riscv/priv-reg-fail-read-only-01.s | 267 +-------- .../gas/riscv/priv-reg-fail-read-only-02.d | 2 +- .../gas/riscv/priv-reg-fail-rv32-only.d | 2 +- .../gas/riscv/priv-reg-fail-version-1p10.d | 2 +- .../gas/riscv/priv-reg-fail-version-1p11.d | 2 +- .../gas/riscv/priv-reg-fail-version-1p12.d | 11 + .../gas/riscv/priv-reg-fail-version-1p12.l | 24 + .../gas/riscv/priv-reg-fail-version-1p9p1.d | 2 +- gas/testsuite/gas/riscv/priv-reg-fail-zkr.d | 2 +- .../gas/riscv/priv-reg-version-1p10.d | 534 +++++++++--------- .../gas/riscv/priv-reg-version-1p11.d | 534 +++++++++--------- .../gas/riscv/priv-reg-version-1p12.d | 275 +++++++++ .../gas/riscv/priv-reg-version-1p9p1.d | 534 +++++++++--------- gas/testsuite/gas/riscv/priv-reg.s | 294 +--------- 22 files changed, 1421 insertions(+), 1374 deletions(-) create mode 100644 gas/testsuite/gas/riscv/priv-reg-access-all.s create mode 100644 gas/testsuite/gas/riscv/priv-reg-fail-version-1p12.d create mode 100644 gas/testsuite/gas/riscv/priv-reg-fail-version-1p12.l create mode 100644 gas/testsuite/gas/riscv/priv-reg-version-1p12.d base-commit: d20236e748ab70e9243960850eef64838f1b9721 -- 2.32.0