From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16994 invoked by alias); 6 Jan 2003 19:42:27 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 16941 invoked from network); 6 Jan 2003 19:42:26 -0000 Received: from unknown (HELO emf.net) (205.149.0.20) by sources.redhat.com with SMTP; 6 Jan 2003 19:42:26 -0000 Received: (from lord@localhost) by emf.net (K/K) id EAA23500; Sun, 5 Jan 2003 04:48:45 -0800 (PST) Date: Mon, 06 Jan 2003 19:47:00 -0000 From: Tom Lord Message-Id: <200301051248.EAA23500@emf.net> To: dewar@gnat.com CC: gcc@gcc.gnu.org, ja_walker@earthlink.net In-reply-to: <20030105114202.8AB15F2D6B@nile.gnat.com> (dewar@gnat.com) Subject: Re: Sythetic registers: modrm/gas question. References: <20030105114202.8AB15F2D6B@nile.gnat.com> X-SW-Source: 2003-01/txt/msg00284.txt.bz2 > 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