public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nelson Chu <nelson@rivosinc.com>
To: Tsukasa OI <research_trasio@irq.a4lg.com>
Cc: Shihua LIAO <shihua@iscas.ac.cn>, binutils@sourceware.org
Subject: Re: [PATCH 1/1] RISC-V: Set EF_RISCV_TSO also on .option arch
Date: Wed, 21 Sep 2022 15:24:26 +0800	[thread overview]
Message-ID: <CAPpQWtAi=VtyBaY=5s49W3HKYPBZ0QmWWMS3oDJo8JF6cy0WMg@mail.gmail.com> (raw)
In-Reply-To: <b9a6f3d727144e4d2e51005501d810d6efd09d1b.1663742326.git.research_trasio@irq.a4lg.com>

OK, looks good, please commit if you think it's time.

Thanks
Nelson

On Wed, Sep 21, 2022 at 2:41 PM Tsukasa OI <research_trasio@irq.a4lg.com> 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
>

  reply	other threads:[~2022-09-21  7:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20  9:45 [PATCH V4] RISC-V: Implement Ztso extension shihua
2022-09-21  3:47 ` Nelson Chu
2022-09-21  6:40   ` [PATCH 0/1] RISC-V: Minor fix to the 'Ztso' extension support Tsukasa OI
2022-09-21  6:40     ` [PATCH 1/1] RISC-V: Set EF_RISCV_TSO also on .option arch Tsukasa OI
2022-09-21  7:24       ` Nelson Chu [this message]
2022-09-21  9:53     ` [PATCH 0/1] RISC-V: Minor fix to the 'Ztso' extension support shihua
2022-09-21 10:14       ` Tsukasa OI
2022-09-21 10:21         ` shihua

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPpQWtAi=VtyBaY=5s49W3HKYPBZ0QmWWMS3oDJo8JF6cy0WMg@mail.gmail.com' \
    --to=nelson@rivosinc.com \
    --cc=binutils@sourceware.org \
    --cc=research_trasio@irq.a4lg.com \
    --cc=shihua@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).