From owner-freebsd-questions@FreeBSD.ORG Thu Mar 4 05:08:22 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DBFD16A4CE for ; Thu, 4 Mar 2004 05:08:22 -0800 (PST) Received: from web9907.mail.yahoo.com (web9907.mail.yahoo.com [216.136.129.250]) by mx1.FreeBSD.org (Postfix) with SMTP id D7AE943D4C for ; Thu, 4 Mar 2004 05:08:21 -0800 (PST) (envelope-from skuma17@yahoo.com) Message-ID: <20040304130821.96170.qmail@web9907.mail.yahoo.com> Received: from [128.205.145.15] by web9907.mail.yahoo.com via HTTP; Thu, 04 Mar 2004 05:08:21 PST Date: Thu, 4 Mar 2004 05:08:21 -0800 (PST) From: bear To: cpghost@cordula.ws In-Reply-To: <20040304081612.48B2940893@fw.farid-hajji.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@freebsd.org Subject: Re: one simple question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2004 13:08:22 -0000 thank you very much for the reply yes and I am using gcc 3.2.2 if you "gdb" the executable and "disassemble main" you will see the line like that but if you use gcc -S something.s something.c it won't appear in the assembly code and I google around, I think it does the alignment for optimization purpose, in that case the memory access will be faster according to the article. best regards, Chungwei --- Cordula's Web wrote: > > I compile a test C file. I notice there are a few lines at the > > beginning of the assembly code. I want to know what it means, but > > can't figure out one of them. Can anyone tell me what the > > following line does please? > > > > and $0xfffffff0,%esp > > Hmmm, when I compile the simplest possible C file: > > ------------------------------- > int > main (int argc, char *argv[]) > { > return 0; > } > -------------------------------- > > I get this: > > -------------------------------- > .file "test1.c" > .version "01.01" > gcc2_compiled.: > .text > .p2align 2,0x90 > .globl main > .type main,@function > main: > pushl %ebp > movl %esp,%ebp > xorl %eax,%eax > jmp .L2 > .p2align 2,0x90 > .L2: > leave > ret > .Lfe1: > .size main,.Lfe1-main > .ident "GCC: (GNU) c 2.95.4 20020320 [FreeBSD]" > > -------------------------------- > > No such thing as: > > and $0xfffffff0,%esp > > Are you using gcc 3.3.x? > > Anyway, this code looks like it would align the stack > the stack pointer... > > > best regards > > Chungwei > > -- > Cordula's Web. http://www.cordula.ws/ > ===== bear