Commit 173cd571 by Josef Zlomek Committed by Josef Zlomek

rtlanal.c (replace_label): Fix replacing labels in constant pool.

	PR/14240
	* rtlanal.c (replace_label): Fix replacing labels in constant pool.

From-SVN: r78392
parent b79cef06
2004-02-24 Josef Zlomek <zlomekj@suse.cz>
PR/14240
* rtlanal.c (replace_label): Fix replacing labels in constant pool.
2004-02-24 Geoffrey Keating <geoffk@apple.com> 2004-02-24 Geoffrey Keating <geoffk@apple.com>
* config/darwin.h (TARGET_HAS_F_SETLKW): Define. * config/darwin.h (TARGET_HAS_F_SETLKW): Define.
......
...@@ -2715,7 +2715,6 @@ int ...@@ -2715,7 +2715,6 @@ int
replace_label (rtx *x, void *data) replace_label (rtx *x, void *data)
{ {
rtx l = *x; rtx l = *x;
rtx tmp;
rtx old_label = ((replace_label_data *) data)->r1; rtx old_label = ((replace_label_data *) data)->r1;
rtx new_label = ((replace_label_data *) data)->r2; rtx new_label = ((replace_label_data *) data)->r2;
bool update_label_nuses = ((replace_label_data *) data)->update_label_nuses; bool update_label_nuses = ((replace_label_data *) data)->update_label_nuses;
...@@ -2723,12 +2722,10 @@ replace_label (rtx *x, void *data) ...@@ -2723,12 +2722,10 @@ replace_label (rtx *x, void *data)
if (l == NULL_RTX) if (l == NULL_RTX)
return 0; return 0;
if (GET_CODE (l) == MEM if (GET_CODE (l) == SYMBOL_REF
&& (tmp = XEXP (l, 0)) != NULL_RTX && CONSTANT_POOL_ADDRESS_P (l))
&& GET_CODE (tmp) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (tmp))
{ {
rtx c = get_pool_constant (tmp); rtx c = get_pool_constant (l);
if (rtx_referenced_p (old_label, c)) if (rtx_referenced_p (old_label, c))
{ {
rtx new_c, new_l; rtx new_c, new_l;
...@@ -2744,7 +2741,7 @@ replace_label (rtx *x, void *data) ...@@ -2744,7 +2741,7 @@ replace_label (rtx *x, void *data)
/* Add the new constant NEW_C to constant pool and replace /* Add the new constant NEW_C to constant pool and replace
the old reference to constant by new reference. */ the old reference to constant by new reference. */
new_l = force_const_mem (get_pool_mode (tmp), new_c); new_l = XEXP (force_const_mem (get_pool_mode (l), new_c), 0);
*x = replace_rtx (l, l, new_l); *x = replace_rtx (l, l, new_l);
} }
return 0; return 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