Hi! I think there is a problem in riscv-trunk when compiled with -O1 option. I attached an example in c and the generated assembly.
I compile with:
/.../clang -O1 -target riscv -mriscv=RV32I test.c -S -o test.S
/.../riscv32-unknown-elf-gcc test.S -o test.o
I think that the last jalr (line 42) jumps to a wrong address.
test.zip
Hi! I think there is a problem in riscv-trunk when compiled with -O1 option. I attached an example in c and the generated assembly.
I compile with:
/.../clang -O1 -target riscv -mriscv=RV32I test.c -S -o test.S
/.../riscv32-unknown-elf-gcc test.S -o test.o
I think that the last jalr (line 42) jumps to a wrong address.
test.zip