*** empty log message ***
authorJim Wilson <wilson@gcc.gnu.org>
Thu, 27 Feb 1992 02:36:26 +0000 (18:36 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 27 Feb 1992 02:36:26 +0000 (18:36 -0800)
From-SVN: r359

gcc/config/sparc/sparc.md
gcc/unroll.c

index 02776abbe2767f1be9de3f50ff83db18fd5fd52a..f8f549578c67e0767983fca47751392177735990 100644 (file)
   else if (GET_CODE (op1) == CONST_DOUBLE)
     {
       operands[0] = operand_subword (op0, 1, 0, DImode);
-      operands[1] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_HIGH (op1));
+      operands[1] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (op1));
       output_asm_insn (\"sethi %%hi(%a1),%0\", operands);
 
       operands[0] = operand_subword (op0, 0, 0, DImode);
-      operands[1] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (op1));
+      operands[1] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_HIGH (op1));
       output_asm_insn (singlemove_string (operands), operands);
     }
   else
        (lo_sum:DI (match_operand:DI 1 "register_operand" "r")
                   (match_operand:DI 2 "immediate_operand" "in")))]
   ""
-  "or %R1,%%lo(%a2),%R0"
+  "*
+{
+  /* Don't output a 64 bit constant, since we can't trust the assembler to
+     handle it correctly.  */
+  if (GET_CODE (operands[2]) == CONST_DOUBLE)
+    operands[2] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (operands[2]));
+  return \"or %R1,%%lo(%a2),%R0\";
+}"
   ;; Need to set length for this arith insn because operand2
   ;; is not an "arith_operand".
   [(set_attr "length" "1")])
index 249099afded235604fdde83e947dc0f30f9ff1ce..86c229df14c4759f75c0e0571df7574e9acf9809 100644 (file)
@@ -1461,8 +1461,10 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
              for (tv = bl->giv; tv; tv = tv->next_iv)
                if (tv->giv_type == DEST_ADDR && tv->same == v)
                  {
+                   /* Increment the giv by the amount that was calculated in
+                      find_splittable_givs, and saved in add_val.  */
                    tv->dest_reg = plus_constant (tv->dest_reg,
-                                                 INTVAL (giv_inc));
+                                                 INTVAL (tv->add_val));
                    *tv->location = tv->dest_reg;
                    
                    if (last_iteration && unroll_type != UNROLL_COMPLETELY)
@@ -2596,7 +2598,14 @@ find_splittable_givs (bl, unroll_type, loop_start, loop_end, increment,
                      addr_combined_regs[REGNO (v->new_reg)] = v;
                    }
                }
-             
+
+             /* Overwrite the old add_val, which is no longer needed, and
+                substitute the amount that the giv is incremented on each
+                iteration.  We need to save this somewhere, so we know how
+                much to increment split DEST_ADDR giv's in copy_loop_body.  */
+
+             v->add_val = giv_inc;
+
              if (loop_dump_stream)
                fprintf (loop_dump_stream, "DEST_ADDR giv being split.\n");
            }