although there is saturation in svp64 the mins etc instructions are standalone. would it be useful to allow zero-immediate in RA or RB?
https://git.libre-soc.org/?p=libreriscv.git;a=commitdiff;h=8e385d96fa576825af8111a3057ab39cfd34dd31 commit 8e385d96fa576825af8111a3057ab39cfd34dd31 Author: Jacob Lifshay <programmerjake@gmail.com> Date: Thu Apr 20 17:45:05 2023 -0700 change integer min/max to use (RA|0) I still need to change the simulator
this was added to the simulator in https://bugs.libre-soc.org/show_bug.cgi?id=1057#c24 https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=e3b46c6ec7911d08b8b0c4cb3c286c3786dae2ef
I assume this again needs binutils update, since they do different RA vs (RA|0).
(In reply to Dmitry Selyutin from comment #3) > I assume this again needs binutils update, since they do different RA vs > (RA|0). this should have been done as part of adding minmax instead of mins/maxs/minu/maxu
I think I know the reason We don't actually distinguish RA and RA0 in the codegen. There might be more places where we have this problem.
So this is a common problem related to sv_binutils.py. I'll revisit all instructions we added and check for RA0 operand.
It seems that minmax does not have its RA operand described as RA_OR_ZERO, therefore current binutils definition matches what we have at repo. I pushed a branch minmax_ra0 branch to openpower-isa with the relevant changes, and wait for CI to complete. That said, I rechecked all instructions we have in binutils, and it seems that setvl must be fixed: it should have RA0 operand in binutils instead of RA. For the record, the count of instructions we support is 295. I counted instructions marked as SFFS, but these are the only ones we have now.
1. openpower-isa was updated with RA_OR_ZERO for minmax instruction. 2. binutils were updated with RA0 for minmax and its aliases. 3. In scope of this task, I rechecked all instructions we added into binutils, and found that setvl must also have RA0 operand, so I updated it respectively. https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=6626fc852a2a18c85cdf8b621f7307dc1d35a25b https://git.libre-soc.org/?p=binutils-gdb.git;a=commitdiff;h=60b205de34383d8e315b2b54b7723da084b4a59f