lib: sbi_misaligned_ldst: Fix handling of C.SWSP and C.SDSP
Unlike C.LWSP/C.LDSP, these encodings can be used with the zero register, so checking that the rs2 field is non-zero is unnecessary. Additionally, the previous check was incorrect since it was checking the immediate field of the instruction instead of the rs2 field. Signed-off-by:Amanieu d'Antras <amanieu@gmail.com> Reviewed-by:
Anup Patel <anup@brainfault.org>
parent
3632f2b5
Please register or sign in to comment