From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id A68113858D32 for ; Wed, 21 Sep 2022 07:24:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A68113858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-oi1-x22e.google.com with SMTP id s125so6952584oie.4 for ; Wed, 21 Sep 2022 00:24:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=1uK2E8prLarkbjCYdesVB/7UjEdrKlHzw/SQDYaUaTg=; b=cLISuJZQ6rYmNXW4+6UV46rn4bHQfwgxUAdzejv+DwgFy56R6RJs2B60QpLndNkt+3 RVp8X61UghhoqWPlM/u/QLPxvG8Tk3+U5ANcfdO1gIepizC537gJ0YV2WsAmuDWfuSEN UVVX1RNRrqHm1XWRM5fHK4tFeiiM/ZMkZpAz+EuvAImW/J2KCv6ww4FdwIUBXNdp9mbI FEmlEJHwwfgvdomPyyQFbdraUwskffSkZMbLnvnga1/a8t0d9stNLjOAn8Q0n10eo/N4 pTsaZ5K5vuyJ42wbm5z9zG4V0wafx7A0BpQkZhqMHQn9WkzxF9zd59euCntBiTUxBhdB QkrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=1uK2E8prLarkbjCYdesVB/7UjEdrKlHzw/SQDYaUaTg=; b=TNDmEpW7n+9ATmm4FQ4J0s6p5JnaRZwJJPMqsZshEUrB6QbFQAVBR883qQY0UdNdqB 6msXkSMQ3a0BLY9N/n4S5JLGauOwahMfISRMgtk6Yz9tKYs3qgGhjoMbTOxtDfqLRMUK biLAY/4JtNV7Up8IVsIlvV6Q7/bzmnKmtAcji4x7vFaf15CWTC6F0uBGISXVYPi5ws06 CSqJCsPaFXofezaMzo+etlDoOIq3+1mmtjSDqCOJz2F1Gdzk9s8JnEWMNcsC+llsvzit loDN2WK91tS+lrXFPvY/R756eLq0KBTBiJLFDMoQcafqrCUMySjCMck+YfMFHaTNniVp 7EZQ== X-Gm-Message-State: ACrzQf1kkTYBKGKtRiyVnkcmTfuUbY1iFLn8SBWDNuUbk94PpxYuvpPW /2anVEa0DFK3ob+O4GgoSn8QqAOBdn8RxjioL89hrg== X-Google-Smtp-Source: AMsMyM42bN5nktJFxFcCS3DmrqPW8AL6MiLDFaGcW9DvQWCsXFzA1309W9rY3psXbsStyZYg72Epms/LnFRMMtPlj+g= X-Received: by 2002:a05:6808:188b:b0:350:b024:73c4 with SMTP id bi11-20020a056808188b00b00350b02473c4mr3233781oib.107.1663745077103; Wed, 21 Sep 2022 00:24:37 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nelson Chu Date: Wed, 21 Sep 2022 15:24:26 +0800 Message-ID: Subject: Re: [PATCH 1/1] RISC-V: Set EF_RISCV_TSO also on .option arch To: Tsukasa OI Cc: Shihua LIAO , binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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: OK, looks good, please commit if you think it's time. Thanks Nelson On Wed, Sep 21, 2022 at 2:41 PM Tsukasa OI wrote: > > 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 >