On Sun, Jun 19, 2016 at 11:43 PM, David Wohlferd <d...@limegreensocks.com> wrote: > Perhaps this post should be directed toward port maintainers? > > Since several global maintainers have now suggested it, I have created a > patch that deprecates basic asm when used in a function (attached). It > excludes (ie does not deprecate) top level asm, asm in "naked" functions, > asm with empty instruction strings, and extended asm. > > Building gcc using this patch turns up a few places that use this feature, > so I fixed them. Where possible, I used builtins to replace the asm. For > ease-of-review, these changes are in their own patch (attached) and > obviously this patch should be checked in first. > > But before I send these 2 off to gcc-patches, there's a problem. What about > platforms other than x86/x64? I don't speak other assembler languages, and > have no setup with which to test them. > > I could try to provide patches for other platforms, but it would probably be > faster for platform experts to just make the changes themselves, rather than > trying to review my efforts. Especially if they also want to move to > builtins (which I hope they do). > > I could just send the patches and let the chips fall where they may, but if > there's a less disruptive approach, let me know.
+ /* Acceptable. */ + asm (" "); /* { dg-warning "Deprecated: asm in function without extended syntax" } */ You say it is acceptable but then have a dg-warning on it. Also I think the other place where we should accept basic asm is for "nop" instructions. I have seen people use that heavily. Note really I don't like the idea of deprecating basic asm at all. Thanks, Andrew > > dw > > PS I have done a scan for uses of basic asm to get some idea of the scope of > the remaining work. My results: > > All basic asm in trunk: 1,105 instances. > - Exclude 273 instances with empty strings leaving 832. > - Exclude 271 instances for boehm-gc project leaving 561. > - Exclude 202 instances for testsuite project leaving 359. > - Exclude 282 instances that are (apparently) top-level leaving > > ~77 instances of basic-asm-in-a-function to be fixed for gcc builds. Most > of these are in gcc/config or libgcc/config with just a handful per > platform. Lists available upon request. > > FWIW...