This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gas (was Re: A patch for linux 2.1.127)
- To: "Richard B. Johnson" <root at chaos dot analogic dot com>
- Subject: gas (was Re: A patch for linux 2.1.127)
- From: Alan Modra <alan at spri dot levels dot unisa dot edu dot au>
- Date: Wed, 11 Nov 1998 14:17:21 +1030 (CST)
- cc: Alex Buell <alex dot buell at tahallah dot demon dot co dot uk>, Linux-Egcs <egcs at cygnus dot com>, Linux Kernel <linux-kernel at vger dot rutgers dot edu>
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.