File tree Expand file tree Collapse file tree 14 files changed +33
-33
lines changed Expand file tree Collapse file tree 14 files changed +33
-33
lines changed Original file line number Diff line number Diff line change 1
1
// vnclip: vd[i] = clip(round(vs2[i] + rnd) >> simm)
2
- VRM xrm = P .VU .get_vround_mode ();
3
- int64_t int_max = INT64_MAX >> (64 - P .VU .vsew );
4
- int64_t int_min = INT64_MIN >> (64 - P .VU .vsew );
5
2
VI_VI_LOOP_NARROW
6
3
({
4
+ VRM xrm = P .VU .get_vround_mode ();
5
+ int64_t int_max = INT64_MAX >> (64 - P .VU .vsew );
6
+ int64_t int_min = INT64_MIN >> (64 - P .VU .vsew );
7
7
int128_t result = vs2 ;
8
8
unsigned shift = zimm5 & ((sew * 2 ) - 1 );
9
9
Original file line number Diff line number Diff line change 1
1
// vnclip: vd[i] = clip(round(vs2[i] + rnd) >> vs1[i])
2
- VRM xrm = P .VU .get_vround_mode ();
3
- int64_t int_max = INT64_MAX >> (64 - P .VU .vsew );
4
- int64_t int_min = INT64_MIN >> (64 - P .VU .vsew );
5
2
VI_VV_LOOP_NARROW
6
3
({
4
+ VRM xrm = P .VU .get_vround_mode ();
5
+ int64_t int_max = INT64_MAX >> (64 - P .VU .vsew );
6
+ int64_t int_min = INT64_MIN >> (64 - P .VU .vsew );
7
7
int128_t result = vs2 ;
8
8
unsigned shift = vs1 & ((sew * 2 ) - 1 );
9
9
Original file line number Diff line number Diff line change 1
1
// vnclipu: vd[i] = clip(round(vs2[i] + rnd) >> simm)
2
- VRM xrm = P .VU .get_vround_mode ();
3
- uint64_t uint_max = UINT64_MAX >> (64 - P .VU .vsew );
4
- uint64_t sign_mask = UINT64_MAX << P .VU .vsew ;
5
2
VI_VI_LOOP_NARROW
6
3
({
4
+ VRM xrm = P .VU .get_vround_mode ();
5
+ uint64_t uint_max = UINT64_MAX >> (64 - P .VU .vsew );
6
+ uint64_t sign_mask = UINT64_MAX << P .VU .vsew ;
7
7
uint128_t result = vs2_u ;
8
8
unsigned shift = zimm5 & ((sew * 2 ) - 1 );
9
9
Original file line number Diff line number Diff line change 1
1
// vnclipu: vd[i] = clip(round(vs2[i] + rnd) >> vs1[i])
2
- VRM xrm = P .VU .get_vround_mode ();
3
- uint64_t uint_max = UINT64_MAX >> (64 - P .VU .vsew );
4
- uint64_t sign_mask = UINT64_MAX << P .VU .vsew ;
5
2
VI_VV_LOOP_NARROW
6
3
({
4
+ VRM xrm = P .VU .get_vround_mode ();
5
+ uint64_t uint_max = UINT64_MAX >> (64 - P .VU .vsew );
6
+ uint64_t sign_mask = UINT64_MAX << P .VU .vsew ;
7
7
uint128_t result = vs2_u ;
8
8
unsigned shift = vs1 & ((sew * 2 ) - 1 );
9
9
Original file line number Diff line number Diff line change 1
1
// vnclipu: vd[i] = clip(round(vs2[i] + rnd) >> rs1[i])
2
- VRM xrm = P .VU .get_vround_mode ();
3
- uint64_t uint_max = UINT64_MAX >> (64 - P .VU .vsew );
4
- uint64_t sign_mask = UINT64_MAX << P .VU .vsew ;
5
2
VI_VX_LOOP_NARROW
6
3
({
4
+ VRM xrm = P .VU .get_vround_mode ();
5
+ uint64_t uint_max = UINT64_MAX >> (64 - P .VU .vsew );
6
+ uint64_t sign_mask = UINT64_MAX << P .VU .vsew ;
7
7
uint128_t result = vs2_u ;
8
8
unsigned shift = rs1 & ((sew * 2 ) - 1 );
9
9
Original file line number Diff line number Diff line change 1
1
// vsmul.vv vd, vs2, vs1
2
- VRM xrm = P .VU .get_vround_mode ();
3
- int64_t int_max = INT64_MAX >> (64 - P .VU .vsew );
4
- int64_t int_min = INT64_MIN >> (64 - P .VU .vsew );
5
-
6
2
VI_VV_LOOP
7
3
({
4
+ VRM xrm = P .VU .get_vround_mode ();
5
+ int64_t int_max = INT64_MAX >> (64 - P .VU .vsew );
6
+ int64_t int_min = INT64_MIN >> (64 - P .VU .vsew );
7
+
8
8
bool overflow = vs1 == vs2 && vs1 == int_min ;
9
9
int128_t result = (int128_t )vs1 * (int128_t )vs2 ;
10
10
Original file line number Diff line number Diff line change 1
1
// vsmul.vx vd, vs2, rs1
2
- VRM xrm = P .VU .get_vround_mode ();
3
- int64_t int_max = INT64_MAX >> (64 - P .VU .vsew );
4
- int64_t int_min = INT64_MIN >> (64 - P .VU .vsew );
5
-
6
2
VI_VX_LOOP
7
3
({
4
+ VRM xrm = P .VU .get_vround_mode ();
5
+ int64_t int_max = INT64_MAX >> (64 - P .VU .vsew );
6
+ int64_t int_min = INT64_MIN >> (64 - P .VU .vsew );
7
+
8
8
bool overflow = rs1 == vs2 && rs1 == int_min ;
9
9
int128_t result = (int128_t )rs1 * (int128_t )vs2 ;
10
10
Original file line number Diff line number Diff line change 1
1
// vssra.vi vd, vs2, simm5
2
- VRM xrm = P .VU .get_vround_mode ();
3
2
VI_VI_LOOP
4
3
({
4
+ VRM xrm = P .VU .get_vround_mode ();
5
5
int sh = simm5 & (sew - 1 ) & 0x1f ;
6
6
int128_t val = vs2 ;
7
7
Original file line number Diff line number Diff line change 1
1
// vssra.vv vd, vs2, vs1
2
- VRM xrm = P .VU .get_vround_mode ();
3
2
VI_VV_LOOP
4
3
({
4
+ VRM xrm = P .VU .get_vround_mode ();
5
5
int sh = vs1 & (sew - 1 );
6
6
int128_t val = vs2 ;
7
7
Original file line number Diff line number Diff line change 1
1
// vssra.vx vd, vs2, rs1
2
- VRM xrm = P .VU .get_vround_mode ();
3
2
VI_VX_LOOP
4
3
({
4
+ VRM xrm = P .VU .get_vround_mode ();
5
5
int sh = rs1 & (sew - 1 );
6
6
int128_t val = vs2 ;
7
7
You can’t perform that action at this time.
0 commit comments