public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bergner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/92488] GCC generates calls to __dpd_trunctdsd2 with -mhard-dfp
Date: Wed, 15 Jul 2020 20:33:33 +0000	[thread overview]
Message-ID: <bug-92488-4-URdWaZrDaz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-92488-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92488

--- Comment #4 from Peter Bergner <bergner at gcc dot gnu.org> ---
So the following pattern added to dfp.md:

+(define_insn "trunctdsd2"
+  [(set (match_operand:SD 0 "gpc_reg_operand" "=d")
+       (float_truncate:SD (match_operand:TD 1 "gpc_reg_operand" "d")))
+   (clobber (match_scratch:TD 2 "=d"))
+   (clobber (match_scratch:DF 3 "=&d"))]
+  "TARGET_DFP"
+  "mffs %3\;mtfsfi 7,7,1\;drdpq %2,%1\;mtfsf 0xff,%3,1,0\;drsp %0,%2"
+  [(set_attr "type" "dfp")
+   (set_attr "length" "20")])

Gives me the following on Paul's test case:

truncd128:
.LFB0:
        .cfi_startproc
        mffs 0
        mtfsfi 7,7,1
        drdpq 12,2
        mtfsf 0xff,0,1,0
        drsp 1,12
        blr

Does this look like what we want?

  parent reply	other threads:[~2020-07-15 20:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-92488-4@http.gcc.gnu.org/bugzilla/>
2020-07-13 16:14 ` bergner at gcc dot gnu.org
2020-07-15  0:04 ` segher at gcc dot gnu.org
2020-07-15  2:51 ` bergner at gcc dot gnu.org
2020-07-15 20:33 ` bergner at gcc dot gnu.org [this message]
2020-07-15 21:04 ` segher at gcc dot gnu.org
2020-07-15 21:05 ` segher at gcc dot gnu.org
2020-07-15 21:13 ` bergner at gcc dot gnu.org
2020-07-15 21:31 ` bergner at gcc dot gnu.org
2020-07-18  2:12 ` cvs-commit at gcc dot gnu.org
2020-07-18  2:14 ` bergner at gcc dot gnu.org
2020-07-21 21:23 ` cvs-commit 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-92488-4-URdWaZrDaz@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).