From: Jim Wilson Date: Thu, 27 Feb 1992 02:36:26 +0000 (-0800) Subject: *** empty log message *** X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3f07e47a8452c8308a8da8c5aa47e6a65b187a13;p=gcc.git *** empty log message *** From-SVN: r359 --- diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index 02776abbe27..f8f549578c6 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -790,11 +790,11 @@ 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 @@ -824,7 +824,14 @@ (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")]) diff --git a/gcc/unroll.c b/gcc/unroll.c index 249099afded..86c229df14c 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -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"); }