int width = GET_MODE_BITSIZE (mode);
/* You want to truncate to a _what_? */
- if (! SCALAR_INT_MODE_P (mode))
- abort ();
+ gcc_assert (SCALAR_INT_MODE_P (mode));
/* Canonicalize BImode to 0 and STORE_FLAG_VALUE. */
if (mode == BImode)
x = break_out_memory_refs (x);
/* At this point, any valid address is accepted. */
- GO_IF_LEGITIMATE_ADDRESS (mode, x, win);
+ if (memory_address_p (mode, x))
+ goto win;
/* If it was valid before but breaking out memory refs invalidated it,
use it the old way. */
return replace_equiv_address (ref, XEXP (ref, 0));
}
\f
-/* Given REF, either a MEM or a REG, and T, either the type of X or
- the expression corresponding to REF, set RTX_UNCHANGING_P if
- appropriate. */
-
-void
-maybe_set_unchanging (rtx ref, tree t)
-{
- /* We can set RTX_UNCHANGING_P from TREE_READONLY for decls whose
- initialization is only executed once, or whose initializer always
- has the same value. Currently we simplify this to PARM_DECLs in the
- first case, and decls with TREE_CONSTANT initializers in the second.
-
- We cannot do this for non-static aggregates, because of the double
- writes that can be generated by store_constructor, depending on the
- contents of the initializer. Yes, this does eliminate a good fraction
- of the number of uses of RTX_UNCHANGING_P for a language like Ada.
- It also eliminates a good quantity of bugs. Let this be incentive to
- eliminate RTX_UNCHANGING_P entirely in favor of a more reliable
- solution, perhaps based on alias sets. */
-
- if ((TREE_READONLY (t) && DECL_P (t)
- && (TREE_STATIC (t) || ! AGGREGATE_TYPE_P (TREE_TYPE (t)))
- && (TREE_CODE (t) == PARM_DECL
- || (DECL_INITIAL (t) && TREE_CONSTANT (DECL_INITIAL (t)))))
- || TREE_CODE_CLASS (TREE_CODE (t)) == 'c')
- RTX_UNCHANGING_P (ref) = 1;
-}
-\f
/* Return a modified copy of X with its memory address copied
into a temporary register to protect it from side effects.
If X is not a MEM, it is returned unchanged (and not copied).
if (! general_operand (x, VOIDmode))
x = force_operand (x, temp);
- if (GET_MODE (x) != mode && GET_MODE (x) != VOIDmode)
- abort ();
+ gcc_assert (GET_MODE (x) == mode || GET_MODE (x) == VOIDmode);
if (x != temp)
emit_move_insn (temp, x);
return temp;
first one is used for the frame pointer save; the rest are sized by
STACK_SAVEAREA_MODE. Create a reference to array index 1, the first
of the stack save area slots. */
- t_save = build (ARRAY_REF, ptr_type_node, cfun->nonlocal_goto_save_area,
- integer_one_node, NULL_TREE, NULL_TREE);
+ t_save = build4 (ARRAY_REF, ptr_type_node, cfun->nonlocal_goto_save_area,
+ integer_one_node, NULL_TREE, NULL_TREE);
r_save = expand_expr (t_save, NULL_RTX, VOIDmode, EXPAND_WRITE);
emit_stack_save (SAVE_NONLOCAL, &r_save, NULL_RTX);
Right now only supported port with stack that grow upward
is the HPPA and it does not define SETJMP_VIA_SAVE_AREA. */
- if (GET_CODE (pat) != SET
- || SET_DEST (pat) != stack_pointer_rtx
- || GET_CODE (SET_SRC (pat)) != MINUS
- || XEXP (SET_SRC (pat), 0) != stack_pointer_rtx)
- abort ();
+ gcc_assert (GET_CODE (pat) == SET
+ && SET_DEST (pat) == stack_pointer_rtx
+ && GET_CODE (SET_SRC (pat)) == MINUS
+ && XEXP (SET_SRC (pat), 0) == stack_pointer_rtx);
/* This will now be transformed into a (set REG REG)
so we can just blow away all the other notes. */
if (XEXP (srch, 1) == note)
break;
- if (srch == NULL_RTX)
- abort ();
+ gcc_assert (srch);
XEXP (srch, 1) = XEXP (note, 1);
}
/* ??? Code below assumes that the save area needs maximal
alignment. This constraint may be too strong. */
- if (PREFERRED_STACK_BOUNDARY != BIGGEST_ALIGNMENT)
- abort ();
+ gcc_assert (PREFERRED_STACK_BOUNDARY == BIGGEST_ALIGNMENT);
if (GET_CODE (size) == CONST_INT)
{
/* We ought to be called always on the toplevel and stack ought to be aligned
properly. */
- if (stack_pointer_delta % (PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT))
- abort ();
+ gcc_assert (!(stack_pointer_delta
+ % (PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT)));
/* If needed, check that we have the required amount of stack. Take into
account what has already been checked. */
1, OPTAB_WIDEN);
#endif
- if (temp != test_addr)
- abort ();
+ gcc_assert (temp == test_addr);
emit_label (test_lab);
emit_cmp_and_jump_insns (test_addr, last_addr, CMP_OPCODE,
}
/* No suitable mode found. */
- if (tmpmode == VOIDmode)
- abort ();
+ gcc_assert (tmpmode != VOIDmode);
PUT_MODE (val, tmpmode);
}