This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Sythetic registers: modrm/gas question.
- From: Tom Lord <lord at emf dot net>
- To: dewar at gnat dot com
- Cc: gcc at gcc dot gnu dot org, ja_walker at earthlink dot net
- Date: Sun, 5 Jan 2003 04:48:45 -0800 (PST)
- Subject: Re: Sythetic registers: modrm/gas question.
- References: <20030105114202.8AB15F2D6B@nile.gnat.com>
> How do I tell gas to assemble an operand as a one-byte offset
> instead of a four-byte offset?
>
> e.g.
>
> MOV eax,[ebp + 4]
>
> Does it "just know?"
Yes, of course it "just knows", that's why your guess that gcc
is generating poor code seems ill-informed. It is inconceivable
that *any* compiler would use four byte offsets to access the
local stack frame.
_That's_ rude.
The question since it could almost certainly have been answered with a
five-minute experiment (what, you don't have the necessary platform
around?)
The caustic reply (beginning at "that's why...") because it is
illogical and prejudicial: the synthregs proposal is argued for
at a much higher level than would require that close an examination
of GCC's generated code -- and by-eye examination of that code
doesn't at all easily help us decide if/when synthregs is a win.
Or are you good at simulating complex caches in your head based
on disassembly listings and demand that we all are as well?
-t