-
Notifications
You must be signed in to change notification settings - Fork 14
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
Bitmanip support #8
Comments
The quick answer is no one has support for the bit manipulation extension yet. Not in clang trunk, and not in GCC/binutils. As far as LLVM/Clang goes, the following sequence of patches exists, but has not been reviewed or applied:
1 is a target-independent change, which has almost been approved by everyone it affects. 2+ are all RISC-V specific, and we probably need only 1-3 (+ maybe 6) to land for assembler support. In terms of other tool support:
Another solution is to look for binutils patches! There are two potential courses of action:
I think 1 is the more sensible course of action, which doesn't rush the switch to LLVM unnecessarily. Then we can apply the LLVM patches (or slowly land them) and switch to LLVM in our own time. |
I agree (1) is the most actionable path forward, it's probably not too much effort and buys us a significant amount of time. Opened #9 to get that done. |
For LLVM: a branch with bitmanip patches is available at https://github.com/embecosm/llvm-project/tree/riscv-bitmanip |
The patches are starting to land on LLVM master, which is fantastic! |
I've started #14 to track adding a build of the combined toolchains that includes support for the B extension. There are a few issues to iron out, but we're most of the way there with the existing work. |
We have preliminary B extension support for both GCC and Clang, but there are some outstanding parts, including the GCC functionality added by this PR: riscvarchive/riscv-gcc#166 The following toolchains have B support:
Any new toolchain builds will also have B support, if all goes to plan. |
I'm going to start a new PR (done: #29) which sets Reading the GCC patch, this should mean that GCC no longer emits B instructions during code generation, but |
Hi there!
Thanks! |
To cover GCC first:
And for clang/LLVM:
|
We are making fast progress on implementing the B extension on Ibex. In order to be able to compile code for it we need a toolchain (GCC or clang) with:
We currently use a GCC toolchain, but this could be a motivating factor to switch to clang.
The current plan is to implement all subgroups of B instructions, so we probably don't need the ability to enable only subgroups (e.g. Zbb).
@lenary What's the current status of the B extension in LLVM and GCC?
Timeline: I'd expect the initial implementations to be committed in ~4 weeks from now, so we should have something ready in roughly that timeframe. This can of course be an out-of-tree patch we apply to a toolchain here in this repository.
CC @asb
The text was updated successfully, but these errors were encountered: