static enum rtx_code get_rtx_code (enum tree_code, bool);
static rtx vector_compare_rtx (tree, bool, enum insn_code);
+/* Current libcall id. It doesn't matter what these are, as long
+ as they are unique to each libcall that is emitted. */
+static HOST_WIDE_INT libcall_id = 0;
+
#ifndef HAVE_conditional_trap
#define HAVE_conditional_trap 0
#define gen_conditional_trap(a,b) (gcc_unreachable (), NULL_RTX)
trapv = INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_TRAPS (type);
switch (code)
{
+ case POINTER_PLUS_EXPR:
case PLUS_EXPR:
return trapv ? addv_optab : add_optab;
logically equivalent to EQUIV, so it gets manipulated as a unit if it
is possible to do so. */
-static void
+void
maybe_encapsulate_block (rtx first, rtx last, rtx equiv)
{
if (!flag_non_call_exceptions || !may_trap_p (equiv))
REG_NOTES (first));
REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first,
REG_NOTES (last));
+ next = NEXT_INSN (last);
+ for (insn = first; insn != next; insn = NEXT_INSN (insn))
+ REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_LIBCALL_ID,
+ GEN_INT (libcall_id),
+ REG_NOTES (insn));
+ libcall_id++;
}
}
}
remove_note (insn, note);
if ((note = find_reg_note (insn, REG_RETVAL, NULL)) != NULL)
remove_note (insn, note);
+ if ((note = find_reg_note (insn, REG_LIBCALL_ID, NULL)) != NULL)
+ remove_note (insn, note);
data.target = target;
data.first = insns;
Except for the first group of insns (the ones setting pseudos), the
block is delimited by REG_RETVAL and REG_LIBCALL notes. */
-
void
emit_libcall_block (rtx insns, rtx target, rtx result, rtx equiv)
{
remove_note (insn, note);
if ((note = find_reg_note (insn, REG_RETVAL, NULL)) != NULL)
remove_note (insn, note);
+ if ((note = find_reg_note (insn, REG_LIBCALL_ID, NULL)) != NULL)
+ remove_note (insn, note);
next = NEXT_INSN (insn);
movstrict_optab = init_optab (STRICT_LOW_PART);
cmp_optab = init_optab (COMPARE);
+ storent_optab = init_optab (UNKNOWN);
+
ucmp_optab = init_optab (UNKNOWN);
tst_optab = init_optab (UNKNOWN);
h = &o->handlers[j];
if (h->libfunc)
{
- gcc_assert (GET_CODE (h->libfunc) = SYMBOL_REF);
+ gcc_assert (GET_CODE (h->libfunc) == SYMBOL_REF);
fprintf (stderr, "%s\t%s:\t%s\n",
GET_RTX_NAME (o->code),
GET_MODE_NAME (j),
h = &o->handlers[j][k];
if (h->libfunc)
{
- gcc_assert (GET_CODE (h->libfunc) = SYMBOL_REF);
+ gcc_assert (GET_CODE (h->libfunc) == SYMBOL_REF);
fprintf (stderr, "%s\t%s\t%s:\t%s\n",
GET_RTX_NAME (o->code),
GET_MODE_NAME (j),