[xcc] minor performance tweaks
[riscv-isa-sim.git] / riscv / insns / srli.h
index e0d8ae079bf5541a470e36161c88404648ee22c6..5378fd1e57118756fbf8574ff5ddeeeb5c7ed8d2 100644 (file)
@@ -1,2 +1,8 @@
-require64;
-RD = RS1 >> SHAMT;
+if(xpr64)
+  RD = RS1 >> SHAMT;
+else
+{
+  if(SHAMT & 0x20)
+    throw trap_illegal_instruction;
+  RD = sext32((uint32_t)RS1 >> SHAMT);
+}