gas (was Re: A patch for linux 2.1.127)

Alan Modra (alan@spri.levels.unisa.edu.au)
Wed, 11 Nov 1998 14:17:21 +1030 (CST)


On Tue, 10 Nov 1998, Richard B. Johnson wrote:

> It is thoretically possible to convert correct code to GNU `as` junk,
> however, the damn thing doesn't even do MACROs so if I am going to
> make:
> adc eax, [ebx+1000]
> adc eax, [ebx+996]
> adc eax, [ebx+992]

gasp. No, that's not an exclamation. Use the gnu assembler preprocessor
called gasp to do your macros.

> ... etc.. a thousand times I would certainly
> want to use another tool. It also doesn't know how to write
> a byte to a memory location, i.e., it doesn't know about the PTR
> expression to tell it whether to write a byte, a word, or a longword
> to a memory location when you do something like:
>
> mov variable,0
>
> That's why we have BYTE PTR, WORD PTR, DWORD PTR, etc. Otherwise a
> zero could (and does) smash adjacent data. It's a very bad tool.

gas has movb, movw, movl to accomplish the same thing, but admittedly you
can't give the type when defining the variable and have gas automatically
size the instruction. I suppose this could be added to gas without too
much trouble.

-
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/