Closed lcgamboa closed 2 years ago
Great find! Would you mind adding tests in https://github.com/mortbopet/Ripes/blob/master/test/riscv-tests-c/rvc.s which captures the issues?
Great find! Would you mind adding tests in https://github.com/mortbopet/Ripes/blob/master/test/riscv-tests-c/rvc.s which captures the issues?
To test these instructions, is needed to make big jumps backward and forward, to test the limits of arguments. For example c.bnez x15, 255 and c.bnez x15, -255. Do you know any way to do this without having to use a bunch of nop instructions to fill in addresses between jumps?
One way is to use the .zero
directive inside the .text
segment:
This PR fixes a bug in decoding the compressed instructions c.bnez and c.beqz.