This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] RISC-V: Add fence.tso instruction
- From: Jim Wilson <jimw at sifive dot com>
- To: Palmer Dabbelt <palmer at sifive dot com>
- Cc: Binutils <binutils at sourceware dot org>, Andrew Waterman <andrew at sifive dot com>
- Date: Mon, 1 Oct 2018 13:34:58 -0700
- Subject: Re: [PATCH] RISC-V: Add fence.tso instruction
- References: <20181001183048.29304-1-palmer@sifive.com>
On Mon, Oct 1, 2018 at 11:31 AM Palmer Dabbelt <palmer@sifive.com> wrote:
> The RISC-V memory model has been ratified, and it includes an additional
> fence: "fence.tso". This pseudo instruction extends one of the
> previously reserved full fence patterns to be less restrictive, and
> therefor will execute correctly on all existing microarchitectures.
> Thus there is no reason to allow this instruction to be disabled (or
> unconverted to a full fence), so it's just unconditionally allowed.
The v2.2 ISA fence description says that reserved bits should be
ignored, so yes, this should be a safe forward compatible change. I
see that the draft v2.3 ISA fence description adds a new field "fence
mode" (fm) which we aren't explicitly handling here, but there is no
way to set it other than via a fence.tso instruction, so it doesn't
look like we need explicit support for it.
This looks OK to me.
Jim