riscv-collab / riscv-gnu-toolchain

GNU toolchain for RISC-V, including GCC
Other
3.49k stars 1.15k forks source link

extension doesn't work as it was supported in GCC13 #1584

Open RRArinc opened 3 hours ago

RRArinc commented 3 hours ago

Hi, I started cloning the GCC14 from riscv repo and implemented custom instruction as i did in GCC 13, however toolchain builds successfully but fails to compile the custom instructions with below error. Error: riscv32-unknown-elf-gcc: error: '-march=rv32imc_xwfe': extension 'xwfe' starts with 'x' but is unsupported non-standard extension

May i know the GCC14 is ready to use and build custom instructions

Thanks

TommyMurphyTM1234 commented 2 hours ago

If there's a difference in behaviour between GCC 13 and 14 then you should probably look at the GCC sources and mailing list patches for changes to how the architecture string is processed and custom non-standard extensions are detected.

RRArinc commented 2 hours ago

Hi, Yeah, thanks for sharing the inputs. Infact, it also worked perfectly with other GCC sources imported by corev. However, i will verify the same again. Thanks

TommyMurphyTM1234 commented 45 minutes ago

What does riscv64-unknown-elf-gcc -march=help show for your toolchain?

If it doesn't list your custom extension then you probably need to tweak something in GCC 14 to enable it.