From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16345 invoked by alias); 29 Nov 2004 10:48:22 -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 16212 invoked from network); 29 Nov 2004 10:48:13 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sourceware.org with SMTP; 29 Nov 2004 10:48:13 -0000 Received: from hermes.suse.de (hermes-ext.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 4BB39118CCCC; Mon, 29 Nov 2004 11:48:13 +0100 (CET) To: "Sam Lauber" Cc: gcc@gcc.gnu.org Subject: Re: Useless assembly References: <20041128212717.4590B2B2B86@ws5-7.us4.outblaze.com> From: Andreas Schwab X-Yow: An Italian is COMBING his hair in suburban DES MOINES! Date: Mon, 29 Nov 2004 12:04:00 -0000 In-Reply-To: <20041128212717.4590B2B2B86@ws5-7.us4.outblaze.com> (Sam Lauber's message of "Sun, 28 Nov 2004 22:27:17 +0100") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2004-11/txt/msg01114.txt.bz2 "Sam Lauber" writes: > By hand-optimizing the assembly, I made this: > > .LC0: > .string "Hello World!\n" > .globl main > .type main, @function > main: > pushl %ebp > movl %esp, %ebp > movl $.LC0, (%esp) > call printf > leave > > It worked the exact same. It doesn't return the correct exit code. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."