aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/srai.h
blob: 7360d5fcd6cbb50022cfa2bc2c8acab1c705b5cb (plain)
1
2
3
4
5
6
7
8
if(xpr64)
  RD = sreg_t(RS1) >> SHAMT;
else
{
  if(SHAMT & 0x20)
    throw trap_illegal_instruction();
  RD = sext32(int32_t(RS1) >> SHAMT);
}