From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16506 invoked by alias); 27 Jun 2006 08:04:46 -0000 Received: (qmail 16498 invoked by uid 22791); 27 Jun 2006 08:04:46 -0000 X-Spam-Check-By: sourceware.org Received: from mx.laposte.net (HELO mx.laposte.net) (81.255.54.11) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 27 Jun 2006 08:04:41 +0000 Received: from smtp.laposte.net (10.150.9.36) by mx.laposte.net (7.2.060.1) id 449AA13000395E86 for gcc-help@gcc.gnu.org; Tue, 27 Jun 2006 10:04:38 +0200 Received: from laposte.net (10.150.9.82) by smtp.laposte.net (7.3.105.2) id 449814D0005A7945 for gcc-help@gcc.gnu.org; Tue, 27 Jun 2006 11:05:36 +0200 Date: Tue, 27 Jun 2006 08:04:00 -0000 Message-Id: Subject: question about gcc assembly MIME-Version: 1.0 X-Sensitivity: 3 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable From: "Coline Lelong-Pantel" To: "gcc-help" X-XaM3-API-Version: 4.1 (B103) X-SenderIP: 127.0.0.1 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-06/txt/msg00231.txt.bz2 Hi I've compiled a short program with two different gcc versions (3.2.3 and 3.4.3) but it seems that the produced assembly code isn't the same. In fact 3.4.3 produce a more important code. For example when gcc 3.2.3 produces : movl $0x405c28f6, -4(%ebp) gcc 3.4.3 may use: movl $0x405c28f6, %eax movl %eax, -4(%ebp) I wonder why it now uses %eax register ? And is there any way to prevent this, in order to have similar assembly code with both gcc versions ? Maybe some kind of option ? Thanks for your answers. Coline PS Excuse my poor english, but it isn't my native langage. Acc=E9dez au courrier =E9lectronique de La Poste : www.laposte.net 3615 LAPOSTENET (0,34 =80/mn)