blob: 074aa50868e44e2e258a49c9fdc18b35a8f5b71a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
//vslidedown.vx vd, vs2, rs1
VI_CHECK_SLIDE(false);
const uint128_t sh = RS1;
VI_LOOP_BASE
reg_t offset = 0;
bool is_valid = (i + sh) < P.VU.vlmax;
if (is_valid) {
offset = sh;
}
switch (sew) {
case e8: {
VI_XI_SLIDEDOWN_PARAMS(e8, offset);
vd = is_valid ? vs2 : 0;
}
break;
case e16: {
VI_XI_SLIDEDOWN_PARAMS(e16, offset);
vd = is_valid ? vs2 : 0;
}
break;
case e32: {
VI_XI_SLIDEDOWN_PARAMS(e32, offset);
vd = is_valid ? vs2 : 0;
}
break;
default: {
VI_XI_SLIDEDOWN_PARAMS(e64, offset);
vd = is_valid ? vs2 : 0;
}
break;
}
VI_LOOP_END
|