From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7896) id 821B53858D37; Wed, 21 Sep 2022 08:10:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 821B53858D37 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tsukasa OI To: bfd-cvs@sourceware.org Subject: [binutils-gdb] RISC-V: Set EF_RISCV_TSO also on .option arch X-Act-Checkin: binutils-gdb X-Git-Author: Tsukasa OI X-Git-Refname: refs/heads/master X-Git-Oldrev: 3094c89e9ce3ae656ac56147ee34bf1f65e63d04 X-Git-Newrev: acab2a6872db8e6ebab3e91bc22a4df384d1c8ed Message-Id: <20220921081006.821B53858D37@sourceware.org> Date: Wed, 21 Sep 2022 08:10:06 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2022 08:10:06 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dacab2a6872db= 8e6ebab3e91bc22a4df384d1c8ed commit acab2a6872db8e6ebab3e91bc22a4df384d1c8ed Author: Tsukasa OI Date: Wed Sep 21 06:23:55 2022 +0000 RISC-V: Set EF_RISCV_TSO also on .option arch =20 This is a minor fix to commit 96462b012988d35ebb1137a2ad9fd0a96547d79a ("RISC-V: Implement Ztso extension"). Currently, it sets EF_RISCV_TSO = ELF flag when initial ISA string contains the 'Ztso' extension. However, G= AS has a way to update the ISA string: ".option arch". =20 When the architecture is updated by ".option arch", EF_RISCV_RVC ELF fl= ag is set when the 'C' extension is detected. Analogously, this commit se= ts the EF_RISCV_TSO when the 'Ztso' extension is detected. =20 gas/ChangeLog: =20 * config/tc-riscv.c (s_riscv_option): Set TSO ELF flag if the 'Ztso' extension is specified via ".option arch" directive. Diff: --- gas/config/tc-riscv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index b1abc8553b0..42d7bf62e4f 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -3888,6 +3888,9 @@ s_riscv_option (int x ATTRIBUTE_UNUSED) riscv_set_rvc (false); if (riscv_subset_supports (&riscv_rps_as, "c")) riscv_set_rvc (true); + + if (riscv_subset_supports (&riscv_rps_as, "ztso")) + riscv_set_tso (); } else if (strcmp (name, "push") =3D=3D 0) {