]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* config/rs6000/rs6000.md: Add TI constant splitter.
authorAlan Modra <amodra@bigpond.net.au>
Thu, 27 Feb 2003 02:08:01 +0000 (02:08 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Thu, 27 Feb 2003 02:08:01 +0000 (12:38 +1030)
From-SVN: r63500

gcc/ChangeLog
gcc/config/rs6000/rs6000.md

index 5e105b7a9b90f719e6b05523d4ba1567c1a22d9e..bb41154605ea7727a2687ebfcce1af73bce8034c 100644 (file)
@@ -1,3 +1,7 @@
+2003-02-27  Alan Modra  <amodra@bigpond.net.au>
+
+       * config/rs6000/rs6000.md: Add TI constant splitter.
+
 2003-02-26  Jan Hubicka  <jh@suse.cz>
 
        PR target/8343
index ec16c1918637b8872a87bc1cefff442b68e1353a..55612be09328a4429bdcb01d0057f4aa2646a6c4 100644 (file)
   operands[5] = GEN_INT (CONST_DOUBLE_LOW  (operands[1]));
 }")
 
+(define_split
+  [(set (match_operand:TI 0 "gpc_reg_operand" "")
+       (match_operand:TI 1 "const_double_operand" ""))]
+  "TARGET_POWERPC64"
+  [(set (match_dup 2) (match_dup 4))
+   (set (match_dup 3) (match_dup 5))]
+  "
+{
+  operands[2] = operand_subword_force (operands[0], WORDS_BIG_ENDIAN == 0,
+                                      TImode);
+  operands[3] = operand_subword_force (operands[0], WORDS_BIG_ENDIAN != 0,
+                                      TImode);
+  if (GET_CODE (operands[1]) == CONST_DOUBLE)
+    {
+      operands[4] = GEN_INT (CONST_DOUBLE_HIGH (operands[1]));
+      operands[5] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));
+    }
+  else if (GET_CODE (operands[1]) == CONST_INT)
+    {
+      operands[4] = GEN_INT (- (INTVAL (operands[1]) < 0));
+      operands[5] = operands[1];
+    }
+  else
+    FAIL;
+}")
+
 (define_insn "*movdi_internal64"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,f,f,m,r,*h,*h")
        (match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,f,m,f,*h,r,0"))]