https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111020
Bug ID: 111020 Summary: RFE: RISC-V: ability to cherry-pick additional instructions Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: hpa at zytor dot com Target Milestone: --- For very deeply embedded use, it is sometimes highly desirable to control the instruction set on a very fine grained basis. For example, the Zbb extension contains a mixture of things that most likely requires separate functional units. However, as an example, the ctz instruction is highly useful to speed up interrupt latency in designs that do not have vectorized interrupt handling (which is, in its most basic form, a dedicated ctz unit.) It would be massive hardware bloat to require the full Zbb set to add this one instruction. Once the instruction is added, though, one would like to be able to use it as fully as possible. This, obviously, creates binaries that are specifically tuned toward a single processor implementation, but that is pretty much the essence of deeply embedded, where in the normal case the entire software stack from the OS to application is linked together in a single binary, or at the very least compiled together, often from a single source tree. As far as object code compatibility is concerned, this is very much a "programmer beware" situation. There is no need for heroics in terms of tagging objects with the exact instruction set, for example.