aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/vrem_vv.h
blob: da477f01ad06a3320eb1f5b8baea07f9420e095d (plain)
1
2
3
4
5
6
7
8
9
10
11
// vrem.vv vd, vs2, vs1
VI_VV_LOOP
({
  if (vs1 == 0)
    vd = vs2;
  else if(vs2 == -(1 << (sew - 1)) && vs1 == -1)
    vd = 0;
  else {
    vd = vs2 % vs1;
  }
})