[RFC,0/8] RISC-V: Bit-manipulation extension.

Message ID 20210923075731.50125-1-kito.cheng@sifive.com
Headers
Series RISC-V: Bit-manipulation extension. |

Message

Kito Cheng Sept. 23, 2021, 7:57 a.m. UTC
  Bit manipulation extension[1] is finishing the public review and waiting for
the rest of the ratification process, I believe that will become a ratified
extension soon, so I think it's time to submit to upstream for review now :)

As the title included RFC, it's not a rush to merge to trunk yet, I would
like to merge that until it is officially ratified.

This patch set is the implementation of bit-manipulation extension, which
includes zba, zbb, zbc and zbs extension, but only included in instruction/md
pattern only, no intrinsic function implementation.

Most work is done by Jim Willson and many other contributors
on https://github.com/riscv-collab/riscv-gcc.


[1] https://github.com/riscv/riscv-bitmanip/releases/tag/1.0.0
  

Comments

Christoph Muellner Sept. 27, 2021, 11:20 a.m. UTC | #1
In case somebody wants to test this patchset, a patchset for Binutils
is required as well.
AFAIK here would be the Binutils branch with the required changes:
https://github.com/riscv-collab/riscv-binutils-gdb/tree/riscv-binutils-experiment

On Thu, Sep 23, 2021 at 9:57 AM Kito Cheng <kito.cheng@sifive.com> wrote:
>
> Bit manipulation extension[1] is finishing the public review and waiting for
> the rest of the ratification process, I believe that will become a ratified
> extension soon, so I think it's time to submit to upstream for review now :)
>
> As the title included RFC, it's not a rush to merge to trunk yet, I would
> like to merge that until it is officially ratified.
>
> This patch set is the implementation of bit-manipulation extension, which
> includes zba, zbb, zbc and zbs extension, but only included in instruction/md
> pattern only, no intrinsic function implementation.
>
> Most work is done by Jim Willson and many other contributors
> on https://github.com/riscv-collab/riscv-gcc.
>
>
> [1] https://github.com/riscv/riscv-bitmanip/releases/tag/1.0.0
>
>
  
Jim Wilson Sept. 28, 2021, 10 p.m. UTC | #2
On Thu, Sep 23, 2021 at 12:57 AM Kito Cheng <kito.cheng@sifive.com> wrote:

> Bit manipulation extension[1] is finishing the public review and waiting
> for
> the rest of the ratification process, I believe that will become a ratified
> extension soon, so I think it's time to submit to upstream for review now
> :)
>

We still don't have upstream zbs assembler support.  We have rejected other
patches because they didn't upstream the assembler support first.  We
should be following the same rule here for bitmanip.

Maybe we can ask PLCT to write the missing assembler support?

Jim
  
Jim Wilson Sept. 28, 2021, 10:02 p.m. UTC | #3
On Mon, Sep 27, 2021 at 4:20 AM Christoph Muellner <
cmuellner@ventanamicro.com> wrote:

> In case somebody wants to test this patchset, a patchset for Binutils
> is required as well.
> AFAIK here would be the Binutils branch with the required changes:
>
> https://github.com/riscv-collab/riscv-binutils-gdb/tree/riscv-binutils-experiment


This branch only has the zba/zbb/zbc support that is already upstream.
There is nothing useful here.

Jim
  
Christoph Muellner Sept. 28, 2021, 10:05 p.m. UTC | #4
On Wed, Sep 29, 2021 at 12:01 AM Jim Wilson <jimw@sifive.com> wrote:
>
> On Thu, Sep 23, 2021 at 12:57 AM Kito Cheng <kito.cheng@sifive.com> wrote:
>>
>> Bit manipulation extension[1] is finishing the public review and waiting for
>> the rest of the ratification process, I believe that will become a ratified
>> extension soon, so I think it's time to submit to upstream for review now :)
>
>
> We still don't have upstream zbs assembler support.  We have rejected other patches because they didn't upstream the assembler support first.  We should be following the same rule here for bitmanip.
>
> Maybe we can ask PLCT to write the missing assembler support?

We talked about this in the T&R meeting on Monday.
Philipp Tomsich mentioned, that he has a patchset from earlier this
year, which adds support for Zbs.
He proposed to rebase it and send it to the list in the next days.
  
Jim Wilson Sept. 28, 2021, 11:40 p.m. UTC | #5
On Tue, Sep 28, 2021 at 3:05 PM Christoph Muellner <
cmuellner@ventanamicro.com> wrote:

> We talked about this in the T&R meeting on Monday.
> Philipp Tomsich mentioned, that he has a patchset from earlier this
> year, which adds support for Zbs.
> He proposed to rebase it and send it to the list in the next days.
>

And this is hopefully a patch that isn't contaminated by any of the changes
from Claire that we can't use.  That is one of the benefits of asking PLCT
as they never worked with Claire.  But at this point I think that enough
time has passed and enough changes were made to the zbs spec, and
considering that there is really only one good way to implement the zbs
binutils support anyways, I think we are probably safe to use patches from
one of us that did work with Claire.

Jim
  
Vineet Gupta Oct. 13, 2021, 8:22 p.m. UTC | #6
Hi Kito,

On 9/23/21 12:57 AM, Kito Cheng wrote:
> Bit manipulation extension[1] is finishing the public review and waiting for
> the rest of the ratification process, I believe that will become a ratified
> extension soon, so I think it's time to submit to upstream for review now :)
> 
> As the title included RFC, it's not a rush to merge to trunk yet, I would
> like to merge that until it is officially ratified.
> 
> This patch set is the implementation of bit-manipulation extension, which
> includes zba, zbb, zbc and zbs extension, but only included in instruction/md
> pattern only, no intrinsic function implementation.
> 
> Most work is done by Jim Willson and many other contributors
> on https://github.com/riscv-collab/riscv-gcc.
> 
> 
> [1] https://github.com/riscv/riscv-bitmanip/releases/tag/1.0.0

I wanted to give these a try. Is it reasonable to apply these to a gcc 
11.1 baseline and give a spin in buildroot or do these absolutely have 
to be bleeding edge gcc.

Thx,
-Vineet
  
Kito Cheng Oct. 18, 2021, 3:23 a.m. UTC | #7
Hi Vineet:

I am not familiar with buildroot, so I am not sure which GCC version will work,
but I think the patch set should be able to apply both gcc 11.1 and
trunk without conflict.

Here is a gcc 11.1 + this patch set on my github, hope this could help :)
https://github.com/kito-cheng/riscv-gcc/tree/riscv-gcc-11.1.0-zbabcs

On Thu, Oct 14, 2021 at 4:22 AM Vineet Gupta <vineetg@rivosinc.com> wrote:
>
> Hi Kito,
>
> On 9/23/21 12:57 AM, Kito Cheng wrote:
> > Bit manipulation extension[1] is finishing the public review and waiting for
> > the rest of the ratification process, I believe that will become a ratified
> > extension soon, so I think it's time to submit to upstream for review now :)
> >
> > As the title included RFC, it's not a rush to merge to trunk yet, I would
> > like to merge that until it is officially ratified.
> >
> > This patch set is the implementation of bit-manipulation extension, which
> > includes zba, zbb, zbc and zbs extension, but only included in instruction/md
> > pattern only, no intrinsic function implementation.
> >
> > Most work is done by Jim Willson and many other contributors
> > on https://github.com/riscv-collab/riscv-gcc.
> >
> >
> > [1] https://github.com/riscv/riscv-bitmanip/releases/tag/1.0.0
>
> I wanted to give these a try. Is it reasonable to apply these to a gcc
> 11.1 baseline and give a spin in buildroot or do these absolutely have
> to be bleeding edge gcc.
>
> Thx,
> -Vineet
  
Kito Cheng Oct. 25, 2021, 9:14 a.m. UTC | #8
As we discussed in the last RISC-V GNU sync up, I've committed this
patch-set to trunk after rebase and running regression with latest
binutils.

On Mon, Oct 18, 2021 at 11:23 AM Kito Cheng <kito.cheng@gmail.com> wrote:
>
> Hi Vineet:
>
> I am not familiar with buildroot, so I am not sure which GCC version will work,
> but I think the patch set should be able to apply both gcc 11.1 and
> trunk without conflict.
>
> Here is a gcc 11.1 + this patch set on my github, hope this could help :)
> https://github.com/kito-cheng/riscv-gcc/tree/riscv-gcc-11.1.0-zbabcs
>
> On Thu, Oct 14, 2021 at 4:22 AM Vineet Gupta <vineetg@rivosinc.com> wrote:
> >
> > Hi Kito,
> >
> > On 9/23/21 12:57 AM, Kito Cheng wrote:
> > > Bit manipulation extension[1] is finishing the public review and waiting for
> > > the rest of the ratification process, I believe that will become a ratified
> > > extension soon, so I think it's time to submit to upstream for review now :)
> > >
> > > As the title included RFC, it's not a rush to merge to trunk yet, I would
> > > like to merge that until it is officially ratified.
> > >
> > > This patch set is the implementation of bit-manipulation extension, which
> > > includes zba, zbb, zbc and zbs extension, but only included in instruction/md
> > > pattern only, no intrinsic function implementation.
> > >
> > > Most work is done by Jim Willson and many other contributors
> > > on https://github.com/riscv-collab/riscv-gcc.
> > >
> > >
> > > [1] https://github.com/riscv/riscv-bitmanip/releases/tag/1.0.0
> >
> > I wanted to give these a try. Is it reasonable to apply these to a gcc
> > 11.1 baseline and give a spin in buildroot or do these absolutely have
> > to be bleeding edge gcc.
> >
> > Thx,
> > -Vineet