public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: francisco.blasco@ds2.es To: gcc-gnats@gcc.gnu.org Subject: c/3429: GCC-2.95.3 on target arc-elf32 generates bad code. Date: Tue, 26 Jun 2001 10:16:00 -0000 [thread overview] Message-ID: <20010626171525.15496.qmail@sourceware.cygnus.com> (raw) >Number: 3429 >Category: c >Synopsis: GCC-2.95.3 on target arc-elf32 generates bad code. >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Jun 26 10:16:02 PDT 2001 >Closed-Date: >Last-Modified: >Originator: francisco.blasco@ds2.es >Release: gcc-2.95.3 >Organization: >Environment: >Description: If you compiles GCC-2.95.3 for arc-elf32 target, it appears to work nicely. But when you use the cross-compiler ans tries to compile next code: int ll(int k) { return k<0?1234:0; } It generates bad assembler code: .cpu base __gnu_compiled_c: .section .text .align 4 .global ll .type ll,@function ll: ; BEGIN PROLOGUE ; vars= 0, regs= 0, args= 0, extra= 0 st %fp,[%sp] mov %fp,%sp ; END PROLOGUE sub.f 0,%r0,0 mov %r0,1234 mov.gt %r0,0 <<<<<<<<<<< BAD!!!!!!!!! ; EPILOGUE j.d %blink ld.a %fp,[%sp,0] .Lfe1: .size ll,.Lfe1-ll .ident "GCC: (GNU) 2.95.3 20010315 (release)" The instruction "mov.gt %r0, 0" must be "mov.ge %r0, 0". >How-To-Repeat: arc-elf32-gcc -S -O2 -o - kk3.c >Fix: I don't know. I learned to do some modifications to the arc.md file to add some new intructions, but I don't know where I must search. I can try to fix it, but I believe I don't know enough the gcc code. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="kk3.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="kk3.c" aW50IGxsKGludCBrKQp7CiAgcmV0dXJuIGs8MD8xMjM0OjA7Cn0K
reply other threads:[~2001-06-26 10:16 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20010626171525.15496.qmail@sourceware.cygnus.com \ --to=francisco.blasco@ds2.es \ --cc=gcc-gnats@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).