[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    Re: Difference in assembly
From:       Manmeet Singh Johar <manmeet.johar () conexant ! com>
Date:       2004-12-31 7:52:09
Message-ID: 41D50259.3000006 () conexant ! com
[Download RAW message or body]

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 <stdio.h>
> 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."

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic