diff options
Diffstat (limited to 'riscv/insns/slli.h')
-rw-r--r-- | riscv/insns/slli.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/riscv/insns/slli.h b/riscv/insns/slli.h index 7291276..dfe7168 100644 --- a/riscv/insns/slli.h +++ b/riscv/insns/slli.h @@ -1,8 +1,3 @@ -if (xlen == 64) - WRITE_RD(RS1 << SHAMT); -else -{ - if(SHAMT & 0x20) - throw trap_illegal_instruction(); - WRITE_RD(sext32(RS1 << SHAMT)); -} +if (SHAMT >= xlen) + throw trap_illegal_instruction(); +WRITE_RD(sext_xlen(RS1 << SHAMT)); |