target/riscv: fix undefined operation