Re: Compiler/Assembler warnings <patch>

Horst von Brand (vonbrand@pincoya.inf.utfsm.cl)
Wed, 15 Dec 1999 13:53:00 -0300


"Richard B. Johnson" <root@chaos.analogic.com> said:
> On Wed, 15 Dec 1999, Horst von Brand wrote:
> > "Richard B. Johnson" <root@chaos.analogic.com> said:
> > > The following patch is submitted again <sigh>. I wished I have saved
> > > the previous one which never got into the kernel. Most of the stuff
> > > is asm syntax errors where it is not possible to move a longword into
> > > a short register so GAS fixes the code and issues a warning.

> > Are you sure there aren't any old binutils that misassemble this stuff out
> > there anymore? I (among _many_ others) also fixed this, and was told that a
> > warning with new binutils is preferable to silence and crashes with older
> > ones.

> GAS is one of the latest. There is a version (later, I think) that is
> broken.
>
> GNU assembler 2.9.5
> Copyright 1997 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License. This program has absolutely no warranty.
> This assembler was configured for a target of `i686-pc-linux-gnu'.
>
> GAS is not lying. The code I fixed for the second time was broken.
> There is no way that a "movl something, %ax" should ever even assemble.
> | |____ short register
> |__________________ long operand.
>
> And if you were told that warnings of this kind are preferable, preferable
> to whom?

To me. I prefer a warning over machines all over the place getting serevely
suboptimal code out of the assembler just so I can enjoy silence. I think
it was Linus who pointed this out to me when I posted such a patch quite a
while back. When all old binutils have been scrapped, the patches will go
in. AFAIR it was decreed a 2.5 matter.

--
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/