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