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