Skip to content

Commit 37db712

Browse files
committed
Partially revert #1987 to fix regrssion in vsra.vi and vssra.vi
Use arithmetic shifts, not logical shifts. I broke them while fixing #1915.
1 parent c8b8821 commit 37db712

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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_ULOOP
2+
VI_VI_LOOP
33
({
4-
vd = vs2 >> (zimm5 & (sew - 1));
4+
vd = vs2 >> (insn.v_zimm5() & (sew - 1));
55
})

riscv/insns/vssra_vi.h

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

88
INT_ROUNDING(val, xrm, sh);

0 commit comments

Comments
 (0)