aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/vfslide1up_vf.h
blob: 4e4e499abb4ac7d86e463495a3bf228b8eb45a67 (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
//vfslide1up.vf vd, vs2, rs1
VI_CHECK_SLIDE(true);

VI_VFP_LOOP_BASE
if (i != 0) {
  switch (P.VU.vsew) {
    case e16: {
      VI_XI_SLIDEUP_PARAMS(e16, 1);
      vd = vs2;
    }
    break;
    case e32: {
      VI_XI_SLIDEUP_PARAMS(e32, 1);
      vd = vs2;
    }
    break;
    case e64: {
      VI_XI_SLIDEUP_PARAMS(e64, 1);
      vd = vs2;
    }
    break;
  }
} else {
  switch (P.VU.vsew) {
    case e16:
      P.VU.elt<float16_t>(rd_num, 0, true) = FRS1_H;
      break;
    case e32:
      P.VU.elt<float32_t>(rd_num, 0, true) = FRS1_F;
      break;
    case e64:
      P.VU.elt<float64_t>(rd_num, 0, true) = FRS1_D;
      break;
  }
}
VI_VFP_LOOP_END