lowRISC / lowrisc-toolchains

UNSUPPORTED INTERNAL toolchain builds
30 stars 14 forks source link

Bit manipulation instruction "rol" is unrecognized #56

Open Don-Haugaard opened 1 year ago

Don-Haugaard commented 1 year ago

Hi!

I am trying to compile a test applying the "rol" bit instruction with the rv32imcb tool version, but it fails to recognize the opcode. The test I am trying to compile can be found at https://github.com/riscv-non-isa/riscv-arch-test/blob/main/riscv-test-suite/rv32i_m/B/src/rol-01.S. The error messages given are:

(...)/riscv-arch-test/riscv-test-suite/rv32i_m/B/src/rol-01.S:47: Error: unrecognized opcode rol x31,x31,x31' (...)//riscv-arch-test/riscv-test-suite/rv32i_m/B/src/rol-01.S:52: Error: unrecognized opcoderol x30,x29,x28' (...)//riscv-arch-test/riscv-test-suite/rv32i_m/B/src/rol-01.S:57: Error: unrecognized opcode rol x28,x28,x30' (...)//riscv-arch-test/riscv-test-suite/rv32i_m/B/src/rol-01.S:62: Error: unrecognized opcoderol x29,x27,x27' (...)//riscv-arch-test/riscv-test-suite/rv32i_m/B/src/rol-01.S:67: Error: unrecognized opcode rol x26,x30,x26' (...)//riscv-arch-test/riscv-test-suite/rv32i_m/B/src/rol-01.S:72: Error: unrecognized opcoderol x27,x26,x29' (...)

The tool version I am using is the pre-build toolchain 20220524-1. The command used to compile the test is "riscv32-unknown-elf-gcc -mabi=ilp32 -march=rv32izbb -nostartfiles (...)".

Can you confirm if the "rol" instructions is supposed to work? If yes, maybe I need to apply some sort of patch? If so, perhaps you could point me to it?

Kind regards