Re: failing to get the same binary with -masm=intel/-masm=att even with -Wa,-Os

Alexander Monakov via Gcc-help <[email protected]> Wed, 27 May 2026 10:00:59 +0300 (MSK)
Newsgroups gmane.comp.gcc.help
Message-ID <[email protected]>
On Tue, 26 May 2026, Zdenek Sojka via Gcc-help wrote:

> With -masm=att, there is:
> ...
>     leal    -1(,%r8), %eax
> ...
>     leal    1(,%rax), %eax
> ...
> 
> which then GNU AS encodes with the SIB byte, making it longer, even at -Os
> 
> Is this:
> 1) gcc issue
> 2) binutils/as issue
> 3) my issue
> ?

I think it's mostly a GCC issue.

Alexander