aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/vrem_vx.h
blob: f068842f0a8de94cf196ee03f5112eae67d4ec42 (plain)
1
2
3
4
5
6
7
8
9
10
// vrem.vx vd, vs2, rs1
VI_VX_LOOP
({
  if (rs1 == 0)
    vd = vs2;
  else if (vs2 == -(1 << (sew - 1)) && rs1 == -1)
    vd = 0;
  else
    vd = vs2 % rs1;
})