[PATCH v3 09/17] riscv: misaligned: factorize trap handling