Commit a76063a6 by Clinton Popetz Committed by Clinton Popetz

jump.c (mark_jump_label): Add in_mem param, check SYMBOL_REFs when in_mem is set.

	* jump.c (mark_jump_label): Add in_mem param, check SYMBOL_REFs
	when in_mem is set.  Update all callers.

From-SVN: r31787
parent 2e3af27c
2000-02-04 Clinton Popetz <cpopetz@cygnus.com>
* jump.c (mark_jump_label): Add in_mem param, check SYMBOL_REFs
when in_mem is set. Update all callers.
2000-02-04 Richard Henderson <rth@cygnus.com> 2000-02-04 Richard Henderson <rth@cygnus.com>
* i386/openbsd.h (INT_ASM_OP): Define. * i386/openbsd.h (INT_ASM_OP): Define.
......
...@@ -118,7 +118,7 @@ static void find_cross_jump PARAMS ((rtx, rtx, int, rtx *, rtx *)); ...@@ -118,7 +118,7 @@ static void find_cross_jump PARAMS ((rtx, rtx, int, rtx *, rtx *));
static void do_cross_jump PARAMS ((rtx, rtx, rtx)); static void do_cross_jump PARAMS ((rtx, rtx, rtx));
static int jump_back_p PARAMS ((rtx, rtx)); static int jump_back_p PARAMS ((rtx, rtx));
static int tension_vector_labels PARAMS ((rtx, int)); static int tension_vector_labels PARAMS ((rtx, int));
static void mark_jump_label PARAMS ((rtx, rtx, int)); static void mark_jump_label PARAMS ((rtx, rtx, int, int));
static void delete_computation PARAMS ((rtx)); static void delete_computation PARAMS ((rtx));
static void delete_from_jump_chain PARAMS ((rtx)); static void delete_from_jump_chain PARAMS ((rtx));
static int delete_labelref_insn PARAMS ((rtx, rtx, int)); static int delete_labelref_insn PARAMS ((rtx, rtx, int));
...@@ -2272,7 +2272,7 @@ mark_all_labels (f, cross_jump) ...@@ -2272,7 +2272,7 @@ mark_all_labels (f, cross_jump)
for (insn = f; insn; insn = NEXT_INSN (insn)) for (insn = f; insn; insn = NEXT_INSN (insn))
if (GET_RTX_CLASS (GET_CODE (insn)) == 'i') if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
{ {
mark_jump_label (PATTERN (insn), insn, cross_jump); mark_jump_label (PATTERN (insn), insn, cross_jump, 0);
if (! INSN_DELETED_P (insn) && GET_CODE (insn) == JUMP_INSN) if (! INSN_DELETED_P (insn) && GET_CODE (insn) == JUMP_INSN)
{ {
if (JUMP_LABEL (insn) != 0 && simplejump_p (insn)) if (JUMP_LABEL (insn) != 0 && simplejump_p (insn))
...@@ -2771,7 +2771,7 @@ duplicate_loop_exit_test (loop_start) ...@@ -2771,7 +2771,7 @@ duplicate_loop_exit_test (loop_start)
if (reg_map) if (reg_map)
replace_regs (PATTERN (copy), reg_map, max_reg, 1); replace_regs (PATTERN (copy), reg_map, max_reg, 1);
mark_jump_label (PATTERN (copy), copy, 0); mark_jump_label (PATTERN (copy), copy, 0, 0);
/* Copy all REG_NOTES except REG_LABEL since mark_jump_label will /* Copy all REG_NOTES except REG_LABEL since mark_jump_label will
make them. */ make them. */
...@@ -2789,7 +2789,7 @@ duplicate_loop_exit_test (loop_start) ...@@ -2789,7 +2789,7 @@ duplicate_loop_exit_test (loop_start)
copy = emit_jump_insn_before (copy_insn (PATTERN (insn)), loop_start); copy = emit_jump_insn_before (copy_insn (PATTERN (insn)), loop_start);
if (reg_map) if (reg_map)
replace_regs (PATTERN (copy), reg_map, max_reg, 1); replace_regs (PATTERN (copy), reg_map, max_reg, 1);
mark_jump_label (PATTERN (copy), copy, 0); mark_jump_label (PATTERN (copy), copy, 0, 0);
if (REG_NOTES (insn)) if (REG_NOTES (insn))
{ {
REG_NOTES (copy) = copy_insn_1 (REG_NOTES (insn)); REG_NOTES (copy) = copy_insn_1 (REG_NOTES (insn));
...@@ -2832,7 +2832,7 @@ duplicate_loop_exit_test (loop_start) ...@@ -2832,7 +2832,7 @@ duplicate_loop_exit_test (loop_start)
if (! first_copy) if (! first_copy)
first_copy = copy; first_copy = copy;
mark_jump_label (PATTERN (copy), copy, 0); mark_jump_label (PATTERN (copy), copy, 0, 0);
if (INSN_UID (copy) < max_jump_chain if (INSN_UID (copy) < max_jump_chain
&& INSN_UID (JUMP_LABEL (copy)) < max_jump_chain) && INSN_UID (JUMP_LABEL (copy)) < max_jump_chain)
{ {
...@@ -3862,10 +3862,11 @@ tension_vector_labels (x, idx) ...@@ -3862,10 +3862,11 @@ tension_vector_labels (x, idx)
two labels distinct if they are separated by only USE or CLOBBER insns. */ two labels distinct if they are separated by only USE or CLOBBER insns. */
static void static void
mark_jump_label (x, insn, cross_jump) mark_jump_label (x, insn, cross_jump, in_mem)
register rtx x; register rtx x;
rtx insn; rtx insn;
int cross_jump; int cross_jump;
int in_mem;
{ {
register RTX_CODE code = GET_CODE (x); register RTX_CODE code = GET_CODE (x);
register int i; register int i;
...@@ -3878,17 +3879,22 @@ mark_jump_label (x, insn, cross_jump) ...@@ -3878,17 +3879,22 @@ mark_jump_label (x, insn, cross_jump)
case REG: case REG:
case SUBREG: case SUBREG:
case CONST_INT: case CONST_INT:
case SYMBOL_REF:
case CONST_DOUBLE: case CONST_DOUBLE:
case CLOBBER: case CLOBBER:
case CALL: case CALL:
return; return;
case MEM: case MEM:
in_mem = 1;
break;
case SYMBOL_REF:
if (!in_mem)
return;
/* If this is a constant-pool reference, see if it is a label. */ /* If this is a constant-pool reference, see if it is a label. */
if (GET_CODE (XEXP (x, 0)) == SYMBOL_REF if (CONSTANT_POOL_ADDRESS_P (x))
&& CONSTANT_POOL_ADDRESS_P (XEXP (x, 0))) mark_jump_label (get_pool_constant (x), insn, cross_jump, in_mem);
mark_jump_label (get_pool_constant (XEXP (x, 0)), insn, cross_jump);
break; break;
case LABEL_REF: case LABEL_REF:
...@@ -3974,7 +3980,8 @@ mark_jump_label (x, insn, cross_jump) ...@@ -3974,7 +3980,8 @@ mark_jump_label (x, insn, cross_jump)
int eltnum = code == ADDR_DIFF_VEC ? 1 : 0; int eltnum = code == ADDR_DIFF_VEC ? 1 : 0;
for (i = 0; i < XVECLEN (x, eltnum); i++) for (i = 0; i < XVECLEN (x, eltnum); i++)
mark_jump_label (XVECEXP (x, eltnum, i), NULL_RTX, cross_jump); mark_jump_label (XVECEXP (x, eltnum, i), NULL_RTX,
cross_jump, in_mem);
} }
return; return;
...@@ -3986,12 +3993,12 @@ mark_jump_label (x, insn, cross_jump) ...@@ -3986,12 +3993,12 @@ mark_jump_label (x, insn, cross_jump)
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{ {
if (fmt[i] == 'e') if (fmt[i] == 'e')
mark_jump_label (XEXP (x, i), insn, cross_jump); mark_jump_label (XEXP (x, i), insn, cross_jump, in_mem);
else if (fmt[i] == 'E') else if (fmt[i] == 'E')
{ {
register int j; register int j;
for (j = 0; j < XVECLEN (x, i); j++) for (j = 0; j < XVECLEN (x, i); j++)
mark_jump_label (XVECEXP (x, i, j), insn, cross_jump); mark_jump_label (XVECEXP (x, i, j), insn, cross_jump, in_mem);
} }
} }
} }
......
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