- /* These types may be freely shared so we needn't do any resetting
- for them. */
-
- switch (code)
- {
- case REG:
- case CONST_INT:
- case CONST_DOUBLE:
- case CONST_FIXED:
- case CONST_VECTOR:
- case SYMBOL_REF:
- case CODE_LABEL:
- case PC:
- case CC0:
- return;
-
- case INSN:
- case JUMP_INSN:
- case CALL_INSN:
- case NOTE:
- case LABEL_REF:
- case BARRIER:
- /* The chain of insns is not being copied. */
- return;
-
- default:
- break;
- }
-
- RTX_FLAG (x, used) = 1;
-
- format_ptr = GET_RTX_FORMAT (code);
- for (i = 0; i < GET_RTX_LENGTH (code); i++)
- {
- switch (*format_ptr++)
- {
- case 'e':
- set_used_flags (XEXP (x, i));
- break;
-
- case 'E':
- for (j = 0; j < XVECLEN (x, i); j++)
- set_used_flags (XVECEXP (x, i, j));
- break;
- }
- }
-}
-\f
-/* Copy X if necessary so that it won't be altered by changes in OTHER.
- Return X or the rtx for the pseudo reg the value of X was copied into.
- OTHER must be valid as a SET_DEST. */
-
-rtx
-make_safe_from (rtx x, rtx other)
-{
- while (1)
- switch (GET_CODE (other))
- {
- case SUBREG:
- other = SUBREG_REG (other);
- break;
- case STRICT_LOW_PART:
- case SIGN_EXTEND:
- case ZERO_EXTEND:
- other = XEXP (other, 0);
- break;
- default:
- goto done;
- }
- done:
- if ((MEM_P (other)
- && ! CONSTANT_P (x)
- && !REG_P (x)
- && GET_CODE (x) != SUBREG)
- || (REG_P (other)
- && (REGNO (other) < FIRST_PSEUDO_REGISTER
- || reg_mentioned_p (other, x))))
- {
- rtx temp = gen_reg_rtx (GET_MODE (x));
- emit_move_insn (temp, x);
- return temp;
- }
- return x;
-}
-\f
-/* Emission of insns (adding them to the doubly-linked list). */
-
-/* Return the first insn of the current sequence or current function. */
-
-rtx
-get_insns (void)
-{
- return first_insn;
-}
-
-/* Specify a new insn as the first in the chain. */
-
-void
-set_first_insn (rtx insn)
-{
- gcc_assert (!PREV_INSN (insn));
- first_insn = insn;
-}
-
-/* Return the last insn emitted in current sequence or current function. */
-
-rtx
-get_last_insn (void)
-{
- return last_insn;
-}
-
-/* Specify a new insn as the last in the chain. */
-
-void
-set_last_insn (rtx insn)
-{
- gcc_assert (!NEXT_INSN (insn));
- last_insn = insn;
-}
-
-/* Return the last insn emitted, even if it is in a sequence now pushed. */