From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15875 invoked by alias); 31 Dec 2004 07:41:15 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15774 invoked from network); 31 Dec 2004 07:41:04 -0000 Received: from unknown (HELO newmail.india.globespan.net) (203.196.162.98) by sourceware.org with SMTP; 31 Dec 2004 07:41:04 -0000 Received: from [172.26.1.197] (joharms.india.ficon-tech.com [172.26.1.197]) (authenticated) by newmail.india.globespan.net (8.11.6/8.11.6) with ESMTP id iBV7bfE07414 for ; Fri, 31 Dec 2004 13:07:41 +0530 Message-ID: <41D50259.3000006@conexant.com> Date: Fri, 31 Dec 2004 07:41:00 -0000 From: Manmeet Singh Johar Reply-To: manmeet.johar@conexant.com Organization: Conexant India User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) MIME-Version: 1.0 To: gcc-bugs@gcc.gnu.org Subject: Re: Difference in assembly References: <41D2903B.9040402@conexant.com> In-Reply-To: <41D2903B.9040402@conexant.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-12/txt/msg03993.txt.bz2 List-Id: Has anybody faced with such a problem? Please do help me out. regards manmeet Manmeet Singh Johar wrote: > Hello, > I am building cross compilers for SPARC variant for Cygwin and MingW > hosts. In the process I am faced with a very peculiar problem. For the > code shown below, though I am getting same assembly instructions in > same sequence, but the registers used in add are swapped. O0 has no > problem, but the problem comes in as soon as I compile with O1. > Code: > #include > extern unsigned int index; > extern unsigned char arr[100]; > int main(int argc, char *argv[]) > { > if(arr[index] != 0) printf("\n FATAL....") ; > return 0; > } > I also built the cross compiler for linux and the assembly generated > matches with the one generated by compiler on Cygwin. Could someone > please help me out. > Regards > Manmeet > > -- Manmeet Singh Johar Software Engineer Conexant (+91-93120-54285) "Forget yourself and you will not be forgotten."