public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: target/7282: powerpc64 SImode in FPR
Date: Sat, 13 Jul 2002 04:36:00 -0000	[thread overview]
Message-ID: <20020713113601.16863.qmail@sources.redhat.com> (raw)

The following reply was made to PR target/7282; it has been noted by GNATS.

From: Alan Modra <amodra@bigpond.net.au>
To: gcc-gnats@gcc.gnu.org
Cc: gcc-patches@gcc.gnu.org, David Edelsohn <dje@watson.ibm.com>
Subject: Re: target/7282: powerpc64 SImode in FPR
Date: Sat, 13 Jul 2002 21:05:15 +0930

 This cures the ICE.  Thanks to dje for putting me on the right track.
 
 gcc/ChangeLog
 	PR 7282
 	* config/rs6000/rs6000.md (floatsidf2): Enable for POWERPC64.
 	(floatsidf_ppc64): New insn_and_split.
 
 Checked with gcc-3.1 i686-linux -> powerpc64-linux cross-compiler.
 Bootstrapping and regresssion testing powerpc-linux mainline just to
 be sure.
 
 -- 
 Alan Modra
 IBM OzLabs - Linux Technology Centre
 
 diff -up gcc-ppc64-31.orig/gcc/config/rs6000/rs6000.md gcc-ppc64-31/gcc/config/rs6000/rs6000.md
 --- gcc-ppc64-31.orig/gcc/config/rs6000/rs6000.md	2002-07-04 19:40:32.000000000 +0930
 +++ gcc-ppc64-31/gcc/config/rs6000/rs6000.md	2002-07-13 20:26:05.000000000 +0930
 @@ -5271,9 +5428,18 @@
  	      (clobber (match_dup 4))
  	      (clobber (match_dup 5))
  	      (clobber (match_dup 6))])]
 -  "! TARGET_POWERPC64 && TARGET_HARD_FLOAT"
 +  "TARGET_HARD_FLOAT"
    "
  {
 +  if (TARGET_POWERPC64)
 +    {
 +      rtx mem = assign_stack_temp (DImode, GET_MODE_SIZE (DImode), 0);
 +      rtx t1 = gen_reg_rtx (DImode);
 +      rtx t2 = gen_reg_rtx (DImode);
 +      emit_insn (gen_floatsidf_ppc64 (operands[0], operands[1], mem, t1, t2));
 +      DONE;
 +    }
 +
    operands[2] = force_reg (SImode, GEN_INT (0x43300000));
    operands[3] = force_reg (DFmode, rs6000_float_const (\"4503601774854144\", DFmode));
    operands[4] = assign_stack_temp (DFmode, GET_MODE_SIZE (DFmode), 0);
 @@ -5456,6 +5622,22 @@
    "fcfid %0,%1"
    [(set_attr "type" "fp")])
  
 +(define_insn_and_split "floatsidf_ppc64"
 +  [(set (match_operand:DF 0 "gpc_reg_operand" "=f")
 +	(float:DF (match_operand:SI 1 "gpc_reg_operand" "*f")))
 +   (clobber (match_operand:DI 2 "memory_operand" "=o"))
 +   (clobber (match_operand:DI 3 "gpc_reg_operand" "=r"))
 +   (clobber (match_operand:DI 4 "gpc_reg_operand" "=f"))]
 +  "TARGET_POWERPC64 && TARGET_HARD_FLOAT"
 +  "#"
 +  ""
 +  [(set (match_dup 3) (sign_extend:DI (match_dup 1)))
 +   (set (match_dup 2) (match_dup 3))
 +   (set (match_dup 4) (match_dup 2))
 +   (set (match_dup 0) (float:DF (match_dup 4)))]
 +  ""
 +  [(set_attr "type" "fp")])
 +
  (define_insn "fix_truncdfdi2"
    [(set (match_operand:DI 0 "gpc_reg_operand" "=*f")
  	(fix:DI (match_operand:DF 1 "gpc_reg_operand" "f")))]


             reply	other threads:[~2002-07-13 11:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-13  4:36 Alan Modra [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-13 22:46 Alan Modra
2002-07-13  7:26 David Edelsohn
2002-07-12  0:16 Alan Modra

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=20020713113601.16863.qmail@sources.redhat.com \
    --to=amodra@bigpond.net.au \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@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).