aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/radd64.h
blob: 110c472c3270baf20f7f69822a15ca9322274520 (plain)
1
2
3
4
5
6
7
8
P_64_PROFILE({
  rd = (rs1 + rs2) >> 1;
  if (rs1 > 0 && rs2 > 0) {
    rd &= ~((reg_t)1 << 63);
  } else if (rs1 < 0 && rs2 < 0) {
    rd |= ((reg_t)1 << 63);
  }
})