David Wohlferd
2016-06-20 06:43:00 UTC
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.
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...
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.
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...