decoder.sv: fix sfence.vma when rs1 != 0
Created by: Gchauvon
Hello,
Related to PR #921 and issue #876 (closed). @Phantom1003
you might want to check this.
Unlike other instructions with minor opcode == PRIV (000), SFENCE.VMA do not check for rs1 != 0. Illegal instruction happens if :
- rd !=0
- privilege mode not in S or M.
The solution I propose check for rd != 0 which should solved the issue raised in #876 (closed). It also reset the illegal instruction flag to 0 in case it has been raised in the if case below :