From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 16 14:23:22 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E5D1516A4CE for ; Mon, 16 Feb 2004 14:23:22 -0800 (PST) Received: from newman.gte.com (newman.gte.com [132.197.8.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8ABAE43D1D for ; Mon, 16 Feb 2004 14:23:22 -0800 (PST) (envelope-from ak03@gte.com) Received: from h132-197-179-27.gte.com (kanpc.gte.com [132.197.179.27]) by newman.gte.com (8.9.1/8.9.1) with ESMTP id RAA01722; Mon, 16 Feb 2004 17:23:21 -0500 (EST) Received: from kanpc.gte.com (localhost [IPv6:::1])i1GMNIed011846; Mon, 16 Feb 2004 17:23:18 -0500 (EST) (envelope-from ak03@gte.com) Date: Mon, 16 Feb 2004 17:23:18 -0500 From: Alexander Kabaev To: "Juan Tumani" Message-Id: <20040216172318.4b76daa2@kanpc.gte.com> In-Reply-To: References: Organization: Verizon Data Services X-Mailer: Sylpheed version 0.9.8claws23 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: des@des.no cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance (gcc3.3.3v/sgcc2.9.5) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2004 22:23:23 -0000 On Mon, 16 Feb 2004 16:36:35 -0500 "Juan Tumani" wrote: > Thanks Matt for picking up on the linker problem. Patching the kernel > would, to me, be masking the real problem. > > What other "improvements" does gcc333 have over gcc295 that might > explain why it's linked products run in a half-fast mode (take twice+ > as long)? > > JT > > > >From: Matthew Dillon > >To: "Juan Tumani" > >CC: des@des.no, freebsd-hackers@freebsd.org > >Subject: Re: FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance > >(gcc3.3.3v/sgcc2.9.5) > >Date: Mon, 16 Feb 2004 13:12:15 -0800 (PST) > > > > I'm surprised Bruce hasn't chimed in here yet. I guess he's > > tired of repeating himself. > > > > In 4.9, libcsu, which generates crt1.o (which is the start code > > for C programs which the linker links in automatically) has this > > line in > >it: > > > > andl $~0xf, %%esp # align stack to 16-byte > > boundary > > > > So anything linked with 4.9 is going to align the stack on a > > 16 byte boundary no matter WHAT the kernel does. > > > > FreeBSD-5 does not have this alignment in its crt1.o because > > GCC3 automatically aligns the stack on a per-procedure basis. > > Or at least it is supposed to. Maybe it's broke? :-) > > > > -Matt > > Quite possibly. I run the same test using the latest GCC snapshot configured as system compiler and did not see such a massive slowdown. GCC 3.3.3 wins slightly on most tests and loses only on module #2 of the flops.c program posted here. -- Alexander Kabaev