https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115728
Bug ID: 115728 Summary: Feature Request: inline assembly improvements for C++ Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eric-bugs at omnifarious dot org Target Milestone: --- I would like a few things added to inline assembly support. The first is I would very much like to be able to use templates to generate inline assembly. The second is I want finer grain control over marking memory regions as needing to be updated before inline assembly code is executed, or invalidated after. My motivation is that I'm working on a library that allows system calls to be inlined. And so I can't rely on the normal "functional call boundary" to make sure that everything makes it to memory that should before the system call, or that the memory a system call may have updated is considered changed (and so has to be reloaded into registers) afterward. And being able to use templates makes it much easier to handle common patterns, with a fairly compact template function. I think these changes would actually have broad applicability when doing inline assembly in C++ in general though. C++ is a very different language than C, and the current inline assembly features support C very well, but do not support C++ very well.