[PATCH 11/25] libcpu: Use __asm instead asm that can be recognized by both clang-cl and gcc
Mark Wielaard
mark@klomp.org
Mon Dec 12 12:42:30 GMT 2022
Hi,
On Fri, 2022-10-21 at 02:25 +0800, Yonggang Luo via Elfutils-devel
wrote:
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
> libcpu/i386_disasm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
> index 599d1654..cc75a7b1 100644
> --- a/libcpu/i386_disasm.c
> +++ b/libcpu/i386_disasm.c
> @@ -480,7 +480,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)),
>
> /* gcc is not clever enough to see the following
> variables
> are not used uninitialized. */
> - asm (""
> + __asm (""
> : "=mr" (opoff), "=mr" (correct_prefix), "=mr"
> (codep),
> "=mr" (next_curr), "=mr" (len));
> }
Urgh. Is this really (still) necessary? It is inside an if (0) block.
So it also is never used. Can we just get rid of the whole block?
Thanks,
Mark
More information about the Elfutils-devel
mailing list