-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
riscv: Introduce T-Head extensions relevant to E serie #79004
base: main
Are you sure you want to change the base?
Conversation
Hello @VynDragon, and thank you very much for your first pull request to the Zephyr project! |
Adds xtheadba, xtheadbb, xtheadbs, xtheadcmo, xthead, xtheadcondmov, xtheadfmv, xtheadint, xtheadmac, xtheadmemidx, xtheadsync GCC can take those options already, but it doesnt do anything at this moment as there is no implementation These extensions are available on T-Head E907, and some as well on T-Head E906 Signed-off-by: Camille BAUD <mail@massdriver.space>
9de33ae
to
bf6a1f3
Compare
Hi, thanks for the PR!
Which GCC can? From the changelog I can see that GCC 13 supports those extensions: https://gcc.gnu.org/gcc-13/changes.html But in Zephyr SDK we're using GCC 12.2.0 (with custom Zephyr patches): https://github.com/zephyrproject-rtos/gcc/commits/zephyr-gcc-12.2.0 |
Hi, it doesn't do anything with gcc 13 either, there is still no implementation of those extensions in mainline/riscv gcc at all beside the extension names input. LLVM/clang does support them fully, I believe they share target_riscv.cmake so that also gives it the support as well. |
I get that. My main concern is that even though the GCC 12.2.0 that Zephyr SDK uses can "accept" (i.e. it doesn't error out when they are passed) these extensions in the But I guess that falls more into the "Toolchain Integration" area of maintenance, so @tejlmand or @stephanosio would have to chime in here. |
The question is: does Binutils support these extensions? (i.e. can the assembler assemble the instructions from these extensions?) If yes, then I do not think we need to do anything special here since If no, then we should emit a warning. |
Ah sorry, yes, but currently it does have the extensions listed in 13 but still does nothing with them as mentioned, so it's just inline with the current support status, even on 12. The difference is likely that on 13 you dont have to specify the version to avoid a error.
If you mean does it take 'th.icache.iall' in __asm__, no it does not, had to use .insn and direct CSR numbers for bl616 that requires xtheadcmo to work. |
Adds xtheadba, xtheadbb, xtheadbs, xtheadcmo, xthead, xtheadcondmov, xtheadfmv, xtheadint, xtheadmac, xtheadmemidx, and xtheadsync.
GCC can take those options already, but it doesnt do anything at this moment as there is no implementation
These extensions are available on T-Head E907, and some as well on T-Head E906. These instructions are relevant for devices like Bouffalolab BL616, Allwinner V853, Artin D133...