[PATCH] RISC-V : Support bitmanip-0.93 ZBA/ZBB/ZBC instructions

Jim Wilson jimw@sifive.com
Thu Feb 25 03:54:47 GMT 2021


On Wed, Feb 24, 2021 at 12:50 AM Kuan-Lin Chen <kuanlinchentw@gmail.com>
wrote:

> This patch is to support bitmanip-0.93 ZBA/ZBB/ZBC extensions.
>

ror and rorw don't accept immediates.  This would be useful and is
expected, same as how the rv32i sll with immediate is supported as an alias
for slli.

zext.h for rv32 uses the pack encoding, but zext.h for rv64 uses the
packw encoding.  You have it using the pack encoding always which is wrong
for rv64.

You are missing a rv64 zbb zext.w.  This uses the same encoding as add.uw,
though add.uw itself remains zba.  So zext.h should be available for both
zba and zbb.  it is an instruction for zbb and an alias for zba, but
probably simpler to just always mark it as an alias.

Otherwise this looks good, just a few small issues to fix.

Jim


More information about the Binutils mailing list