public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: Manmeet Singh Johar <manmeet.johar@conexant.com> To: gcc-bugs@gcc.gnu.org Subject: Difference in assembly Date: Wed, 29 Dec 2004 11:09:00 -0000 [thread overview] Message-ID: <41D2903B.9040402@conexant.com> (raw) 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
next reply other threads:[~2004-12-29 11:09 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-12-29 11:09 Manmeet Singh Johar [this message] 2004-12-31 7:41 ` Manmeet Singh Johar
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=41D2903B.9040402@conexant.com \ --to=manmeet.johar@conexant.com \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).