aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/vrem_vv.h
blob: 5c58fa499fee836b36debad04bed5935337ad42e (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 == -(((intmax_t)1) << (sew - 1)) && vs1 == -1)
    vd = 0;
  else {
    vd = vs2 % vs1;
  }
})