Skip to content

Commit 75e97c6

Browse files
authored
Merge pull request #1987 from riscv-software-src/fix-vssra
Fix regression in vssra.vi instruction
2 parents b0d7621 + d0122b4 commit 75e97c6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

riscv/insns/vsra_vi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// vsra.vi vd, vs2, zimm5
2-
VI_VI_LOOP
2+
VI_VI_ULOOP
33
({
4-
vd = vs2 >> (simm5 & (sew - 1) & 0x1f);
4+
vd = vs2 >> (zimm5 & (sew - 1));
55
})

riscv/insns/vssra_vi.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// vssra.vi vd, vs2, simm5
2-
VI_VI_LOOP
1+
// vssra.vi vd, vs2, zimm5
2+
VI_VI_ULOOP
33
({
44
VRM xrm = P.VU.get_vround_mode();
5-
int sh = simm5 & (sew - 1);
5+
int sh = zimm5 & (sew - 1);
66
int128_t val = vs2;
77

88
INT_ROUNDING(val, xrm, sh);

riscv/insns/vssrl_vi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// vssra.vi vd, vs2, simm5
1+
// vssra.vi vd, vs2, zimm5
22
VI_VI_ULOOP
33
({
44
VRM xrm = P.VU.get_vround_mode();

0 commit comments

Comments
 (0)