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 576473858418 for ; Wed, 21 Sep 2022 06:41:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 576473858418 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 9C11130008A; Wed, 21 Sep 2022 06:41:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1663742470; bh=lHeOGok4IXXdLqvVk+XPog146gr0YBmxgnDc4bzmDI0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Mime-Version:Content-Transfer-Encoding; b=QFCraaAXAoQlBBHhf9zCUcHB1khyHpe7HmuHSs6f8DIej2JXP4o0p3Q2VUIj4WxKl eyNpH1CB13kpnGoKvu1XaVKQwugA+vQz9/swDcWdMcaTKBwMRWwcsdSXbnb7TV3l/V JpwsFCbbThoBvXCHzeCD97JCOP0GnvGNEGsUJ/K8= From: Tsukasa OI To: Tsukasa OI , Nelson Chu , Shihua LIAO Cc: binutils@sourceware.org Subject: [PATCH 1/1] RISC-V: Set EF_RISCV_TSO also on .option arch Date: Wed, 21 Sep 2022 06:40:43 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP 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: 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, GAS has a way to update the ISA string: ".option arch". When the architecture is updated by ".option arch", EF_RISCV_RVC ELF flag is set when the 'C' extension is detected. Analogously, this commit sets the EF_RISCV_TSO when the 'Ztso' extension is detected. gas/ChangeLog: * config/tc-riscv.c (s_riscv_option): Set TSO ELF flag if the 'Ztso' extension is specified via ".option arch" directive. --- 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") == 0) { -- 2.34.1