public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "savin.zlobec at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/59784] New: Nios2: Wrong code generation for fextsd custom instruction
Date: Mon, 13 Jan 2014 10:39:00 -0000	[thread overview]
Message-ID: <bug-59784-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59784

            Bug ID: 59784
           Summary: Nios2: Wrong code generation for fextsd custom
                    instruction
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: savin.zlobec at gmail dot com

Created attachment 31819
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31819&action=edit
Fix

The following code:

double f2d(float x) { return (double)x; }

Compiled with -O2 ... -mcustom-frdy=2 ... -mcustom-fextsd=37

Compiles to:

   0:     2009c972      custom     37,r4,r4,zero
   4:     0009c0b2      custom     2,r4,zero,zero
   8:     2005883a      mov     r2,r4
   c:     2807883a      mov     r3,r5
  10:     f800283a      ret

Note the 'custom 37,r4,r4,zero', should be 'custom 37,r5,r4,zero'.

Patch attached.


             reply	other threads:[~2014-01-13 10:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 10:39 savin.zlobec at gmail dot com [this message]
2014-01-30  5:52 ` [Bug target/59784] " cltang at gcc dot gnu.org

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=bug-59784-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --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: link
Be 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).