On Fri, Nov 30, 2018 at 9:33 AM Alexander Monakov <amona...@ispras.ru> wrote: > > On Fri, 30 Nov 2018, Richard Biener wrote: > > > Ping - as I think this approach addresses the root of the problem, I > > > wouldn't > > > like it to be forgotten. > > > > I agree this is also useful but it addresses another issue (that may appear > > to > > be related). asm inline is really a hint to the inliner estimates (with no > > way > > to get semantics botched) while marking off-section parts is making the > > asm text more precise also affecting code generation and thus has the > > possibility to cause correctness issues (if you say mark everything as > > off-section just to make it inline better). > > I don't think that's true: if the user marks too much of the template as > off-section and makes GCC under-estimate branch ranges, they may receive an > error from the assembler. But that's a build failure, not a correctness > issue. Surely build error is a reasonable outcome from misuse of inline asm.
Yes, but I say they can't mark all of the asm test off-section to make it more likely be inlined. Because that might fire back (only on some weird targets in weird circumstances). But they can use asm inline for that. > > I'm sympathtetic to both patches but clearly the kernel folks have shown > > need for the inline hint (arguably the kernel folks are the ones we could > > expect to get usages of %` correct ...). I haven't seen any comments > > from possible users of %` > > FWIW, when I raised the idea in the kernel thread, the response from Borislav > was: > > >> I don't mind it but I see you guys are still discussing what would be > >> the better solution here, on the gcc ML. And we, as one user, are a > >> happy camper as long as it does what it is meant to do. But how the > >> feature looks like syntactically is something for gcc folk to decide as > >> they're going to support it for the foreseeable future and I'm very well > >> aware of how important it is for a supportable feature to be designed > >> properly. > > Alexander