Skip to content

Commit

Permalink
Merge pull request riscv-software-src#1749 from YenHaoChen/pr-vnclip_wx
Browse files Browse the repository at this point in the history
vnclip.wx: Check if there is any vector extension before using vector CSRs
  • Loading branch information
aswaterman authored Jul 31, 2024
2 parents 4703ad9 + 54a5e38 commit adacda4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions riscv/insns/vnclip_wx.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// vnclip: vd[i] = clip(round(vs2[i] + rnd) >> rs1[i])
VRM xrm = P.VU.get_vround_mode();
int64_t int_max = INT64_MAX >> (64 - P.VU.vsew);
int64_t int_min = INT64_MIN >> (64 - P.VU.vsew);
VI_VX_LOOP_NARROW
({
VRM xrm = P.VU.get_vround_mode();
int64_t int_max = INT64_MAX >> (64 - P.VU.vsew);
int64_t int_min = INT64_MIN >> (64 - P.VU.vsew);
int128_t result = vs2;
unsigned shift = rs1 & ((sew * 2) - 1);

Expand Down

0 comments on commit adacda4

Please sign in to comment.