openhwgroup / corev-gcc

GNU General Public License v2.0
22 stars 23 forks source link

unrecognized opcode 'csrr' extension 'zicsr' required #70

Closed promodkumar-ashling closed 1 year ago

promodkumar-ashling commented 1 year ago

Getting following error when building the cli_test sample project of CORE-V-SDK with latest toolchain(15th Aug 2023), it seems latest toolchain doesn’t have the support for the pseudo instruction ‘csrr’.

image

jeremybennett commented 1 year ago

@promodkumar-ashling Thanks for raising. Can I check you are specifying zicsr in the -march string. It used to be implicit, but in recent tool chains has to be specified explicitly.

jeremybennett commented 1 year ago

@promodkumar-ashling Can you provide the pre-processed test case (compile with --save-temps and attach the .i file), and the command used to compile it. With a reproducer we can track this down.

jeremybennett commented 1 year ago

Added @MaryBennett to investigate.

simonpcook commented 1 year ago

This is the issue where where when the RISC-V Base Instruction Sets were ratified, the CSR instructions were removed and placed into their own extension zicsr, and our GCC build defaults to this updated version of the base instruction sets/etc.

I see above a reference to Ubuntu 22.04 specifically being an issue... all the tools should be behaving the same, did this change at some point. I can check that against whether some rebase happened between versions.

PaoloS02 commented 1 year ago

This issue is a bit old now. I'd leave it around for another week for any quick feedback or follow-up and then I'd close it. If needed it can be reopened afterwards.

MaryBennett commented 1 year ago

Closing this issue. If the problem remains, please reopen the issue.