aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/aes64ks1i.h
diff options
context:
space:
mode:
Diffstat (limited to 'riscv/insns/aes64ks1i.h')
-rw-r--r--riscv/insns/aes64ks1i.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/riscv/insns/aes64ks1i.h b/riscv/insns/aes64ks1i.h
index fff7109..c7354d6 100644
--- a/riscv/insns/aes64ks1i.h
+++ b/riscv/insns/aes64ks1i.h
@@ -10,16 +10,13 @@ uint8_t round_consts [10] = {
uint8_t enc_rcon = insn.rcon() ;
-if(enc_rcon > 0xA) {
- // Invalid opcode.
- throw trap_illegal_instruction(0);
-}
+require(enc_rcon <= 0xA);
uint32_t temp = (RS1 >> 32) & 0xFFFFFFFF ;
uint8_t rcon = 0 ;
uint64_t result ;
-if(enc_rcon != 0xA) {
+if (enc_rcon != 0xA) {
temp = (temp >> 8) | (temp << 24); // Rotate right by 8
rcon = round_consts[enc_rcon];
}