Commit 01333d81 by Richard Sandiford Committed by Richard Sandiford

mips.c (mips_record_lo_sum): Replace with...

gcc/
	* config/mips/mips.c (mips_record_lo_sum): Replace with...
	(mips_record_lo_sums): ...this new function.
	(mips_reorg_process_insns): Update accordingly.

From-SVN: r216714
parent 9b8317b4
2014-10-26 Richard Sandiford <richard.sandiford@arm.com> 2014-10-26 Richard Sandiford <richard.sandiford@arm.com>
* config/mips/mips.c (mips_record_lo_sum): Replace with...
(mips_record_lo_sums): ...this new function.
(mips_reorg_process_insns): Update accordingly.
2014-10-26 Richard Sandiford <richard.sandiford@arm.com>
* config/mips/mips.c (mips_sim_insn): Update comment. * config/mips/mips.c (mips_sim_insn): Update comment.
(mips_sim_wait_regs_2): Delete. (mips_sim_wait_regs_2): Delete.
(mips_sim_wait_regs_1): Use FOR_EACH_SUBRTX_VAR. (mips_sim_wait_regs_1): Use FOR_EACH_SUBRTX_VAR.
...@@ -16040,16 +16040,15 @@ mips_lo_sum_offset_lookup (mips_offset_table *htab, rtx x, ...@@ -16040,16 +16040,15 @@ mips_lo_sum_offset_lookup (mips_offset_table *htab, rtx x,
return INTVAL (offset) <= entry->offset; return INTVAL (offset) <= entry->offset;
} }
/* A for_each_rtx callback for which DATA is a mips_lo_sum_offset hash table. /* Search X for LO_SUMs and record them in HTAB. */
Record every LO_SUM in *LOC. */
static int static void
mips_record_lo_sum (rtx *loc, void *data) mips_record_lo_sums (const_rtx x, mips_offset_table *htab)
{ {
if (GET_CODE (*loc) == LO_SUM) subrtx_iterator::array_type array;
mips_lo_sum_offset_lookup ((mips_offset_table*) data, FOR_EACH_SUBRTX (iter, array, x, NONCONST)
XEXP (*loc, 1), INSERT); if (GET_CODE (*iter) == LO_SUM)
return 0; mips_lo_sum_offset_lookup (htab, XEXP (*iter, 1), INSERT);
} }
/* Return true if INSN is a SET of an orphaned high-part relocation. /* Return true if INSN is a SET of an orphaned high-part relocation.
...@@ -16224,10 +16223,10 @@ mips_reorg_process_insns (void) ...@@ -16224,10 +16223,10 @@ mips_reorg_process_insns (void)
get_referenced_operands (string, used, noperands); get_referenced_operands (string, used, noperands);
for (int i = 0; i < noperands; ++i) for (int i = 0; i < noperands; ++i)
if (used[i]) if (used[i])
for_each_rtx (&ops[i], mips_record_lo_sum, &htab); mips_record_lo_sums (ops[i], &htab);
} }
else else
for_each_rtx (&PATTERN (subinsn), mips_record_lo_sum, &htab); mips_record_lo_sums (PATTERN (subinsn), &htab);
} }
last_insn = 0; last_insn = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment