Stock files.
This commit is contained in:
parent
2554b2d12b
commit
31a119f3ed
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146906
@ -505,8 +505,16 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
|
||||
# Additional sources to handle exceptions; overridden by targets as needed.
|
||||
LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
|
||||
$(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
|
||||
LIB2ADDEHSTATIC = $(LIB2ADDEH)
|
||||
LIB2ADDEHSHARED = $(LIB2ADDEH)
|
||||
LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
|
||||
|
||||
# Don't build libunwind by default.
|
||||
LIBUNWIND =
|
||||
LIBUNWINDDEP =
|
||||
SHLIBUNWIND_LINK =
|
||||
SHLIBUNWIND_INSTALL =
|
||||
|
||||
# nm flags to list global symbols in libgcc object files.
|
||||
SHLIB_NM_FLAGS = -pg
|
||||
|
||||
@ -545,6 +553,10 @@ LIB2FUNCS_EXTRA =
|
||||
# Assembler files should have names ending in `.asm'.
|
||||
LIB2FUNCS_STATIC_EXTRA =
|
||||
|
||||
# List of extra C and assembler files to add to shared libgcc2.
|
||||
# Assembler files should have names ending in `.asm'.
|
||||
LIB2FUNCS_SHARED_EXTRA =
|
||||
|
||||
# Program to convert libraries.
|
||||
LIBCONVERT =
|
||||
|
||||
@ -938,6 +950,9 @@ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
|
||||
# language hooks, generated by configure
|
||||
@language_hooks@
|
||||
|
||||
# Set up library path if needed.
|
||||
@set_gcc_lib_path@
|
||||
|
||||
# per-language makefile fragments
|
||||
ifneq ($(LANG_MAKEFRAGS),)
|
||||
include $(LANG_MAKEFRAGS)
|
||||
@ -1133,16 +1148,25 @@ xlimits.h: glimits.h limitx.h limity.h
|
||||
|
||||
LIB2ADD = $(LIB2FUNCS_EXTRA)
|
||||
LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA)
|
||||
LIB2ADD_SH = $(LIB2FUNCS_SHARED_EXTRA)
|
||||
|
||||
libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) xgcc$(exeext) specs
|
||||
libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) $(LIB2ADD_ST) $(LIB2ADD_SH) \
|
||||
xgcc$(exeext) specs
|
||||
objext='$(objext)' \
|
||||
LIB1ASMFUNCS='$(LIB1ASMFUNCS)' \
|
||||
LIB2FUNCS_ST='$(LIB2FUNCS_ST)' \
|
||||
LIBGCOV='$(LIBGCOV)' \
|
||||
LIB2ADD='$(LIB2ADD)' \
|
||||
LIB2ADD_ST='$(LIB2ADD_ST)' \
|
||||
LIB2ADD_SH='$(LIB2ADD_SH)' \
|
||||
LIB2ADDEH='$(LIB2ADDEH)' \
|
||||
LIB2ADDEHSTATIC='$(LIB2ADDEHSTATIC)' \
|
||||
LIB2ADDEHSHARED='$(LIB2ADDEHSHARED)' \
|
||||
LIB2ADDEHDEP='$(LIB2ADDEHDEP)' \
|
||||
LIBUNWIND='$(LIBUNWIND)' \
|
||||
LIBUNWINDDEP='$(LIBUNWINDDEP)' \
|
||||
SHLIBUNWIND_LINK='$(SHLIBUNWIND_LINK)' \
|
||||
SHLIBUNWIND_INSTALL='$(SHLIBUNWIND_INSTALL)' \
|
||||
FPBIT='$(FPBIT)' \
|
||||
FPBIT_FUNCS='$(FPBIT_FUNCS)' \
|
||||
LIB2_DIVMOD_FUNCS='$(LIB2_DIVMOD_FUNCS)' \
|
||||
@ -1170,8 +1194,8 @@ LIBGCC_DEPS = $(GCC_PASSES) $(LANGUAGES) stmp-int-hdrs $(STMP_FIXPROTO) \
|
||||
libgcc.mk $(srcdir)/libgcc2.c $(srcdir)/libgcov.c $(TCONFIG_H) \
|
||||
$(MACHMODE_H) longlong.h gbl-ctors.h config.status stmp-int-hdrs \
|
||||
tsystem.h $(FPBIT) $(DPBIT) $(TPBIT) $(LIB2ADD) \
|
||||
$(LIB2ADD_ST) $(LIB2ADDEH) $(LIB2ADDEHDEP) $(EXTRA_PARTS) \
|
||||
$(srcdir)/config/$(LIB1ASMSRC) \
|
||||
$(LIB2ADD_ST) $(LIB2ADD_SH) $(LIB2ADDEH) $(LIB2ADDEHDEP) \
|
||||
$(EXTRA_PARTS) $(srcdir)/config/$(LIB1ASMSRC) \
|
||||
$(srcdir)/gcov-io.h $(srcdir)/gcov-io.c gcov-iov.h
|
||||
|
||||
libgcov.a: libgcc.a; @true
|
||||
@ -1578,7 +1602,7 @@ expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) f
|
||||
except.h reload.h $(GGC_H) langhooks.h intl.h $(TM_P_H) real.h $(TARGET_H)
|
||||
dojump.o : dojump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
|
||||
flags.h function.h $(EXPR_H) $(OPTABS_H) $(INSN_ATTR_H) insn-config.h \
|
||||
langhooks.h
|
||||
langhooks.h $(GGC_H) gt-dojump.h
|
||||
builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H)\
|
||||
flags.h $(TARGET_H) function.h $(REGS_H) $(EXPR_H) $(OPTABS_H) insn-config.h \
|
||||
$(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
|
||||
@ -1727,7 +1751,8 @@ dominance.o : dominance.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||||
et-forest.o : et-forest.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) et-forest.h alloc-pool.h
|
||||
combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \
|
||||
function.h insn-config.h $(INSN_ATTR_H) $(REGS_H) $(EXPR_H) \
|
||||
$(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h $(TM_P_H) $(TREE_H) $(TARGET_H)
|
||||
$(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h $(TM_P_H) \
|
||||
$(TREE_H) $(TARGET_H) $(PARAMS_H)
|
||||
regclass.o : regclass.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||||
hard-reg-set.h flags.h $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(RECOG_H) reload.h \
|
||||
real.h toplev.h function.h output.h $(GGC_H) $(TM_P_H) $(EXPR_H) $(TIMEVAR_H)
|
||||
@ -2060,6 +2085,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
|
||||
$(srcdir)/c-common.h $(srcdir)/c-tree.h \
|
||||
$(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
|
||||
$(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
|
||||
$(srcdir)/dojump.c \
|
||||
$(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
|
||||
$(srcdir)/fold-const.c $(srcdir)/function.c \
|
||||
$(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
|
||||
@ -2079,7 +2105,7 @@ gt-cgraph.h gt-coverage.h gtype-desc.h gtype-desc.c gt-except.h \
|
||||
gt-function.h gt-integrate.h gt-stmt.h gt-tree.h gt-varasm.h \
|
||||
gt-emit-rtl.h gt-explow.h gt-stor-layout.h gt-regclass.h \
|
||||
gt-lists.h gt-alias.h gt-cselib.h gt-fold-const.h gt-gcse.h \
|
||||
gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h \
|
||||
gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h gt-dojump.h \
|
||||
gt-dwarf2out.h gt-ra-build.h gt-reg-stack.h gt-dwarf2asm.h \
|
||||
gt-dbxout.h gt-c-common.h gt-c-decl.h gt-c-parse.h \
|
||||
gt-c-pragma.h gtype-c.h gt-input.h gt-cfglayout.h \
|
||||
@ -2779,7 +2805,8 @@ mostlyclean: lang.mostlyclean
|
||||
# that don't exist in the distribution.
|
||||
clean: mostlyclean lang.clean
|
||||
-rm -f libgcc.a libgcc_eh.a libgcov.a
|
||||
-rm -f libgcc_s$(SHLIB_EXT) libgcc_s$(SHLIB_EXT).1
|
||||
-rm -f libgcc_s*
|
||||
-rm -f libunwind*
|
||||
-rm -f config.h tconfig.h bconfig.h tm_p.h tm.h
|
||||
-rm -f cs-*
|
||||
-rm -rf libgcc
|
||||
@ -3606,6 +3633,7 @@ stage1-start:
|
||||
-if [ -f collect-ld$(exeext) ] ; then (cd stage1 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
|
||||
-rm -f stage1/libgcc.a stage1/libgcc_eh.a stage1/libgcov.a
|
||||
-rm -f stage1/libgcc_s*$(SHLIB_EXT)
|
||||
-rm -f stage1/libunwind.a stage1/libunwind*$(SHLIB_EXT)
|
||||
-cp libgcc.a stage1
|
||||
-$(RANLIB_FOR_TARGET) stage1/libgcc.a
|
||||
-cp libgcov.a stage1
|
||||
@ -3614,6 +3642,7 @@ stage1-start:
|
||||
$(RANLIB_FOR_TARGET) stage1/libgcc_eh.a; \
|
||||
fi
|
||||
-cp libgcc_s*$(SHLIB_EXT) stage1
|
||||
-cp libunwind.a libunwind*$(SHLIB_EXT) stage1
|
||||
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
|
||||
cp stage1/$${f} . ; \
|
||||
else true; \
|
||||
@ -3641,6 +3670,7 @@ stage2-start:
|
||||
-if [ -f collect-ld$(exeext) ] ; then (cd stage2 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
|
||||
-rm -f stage2/libgcc.a stage2/libgcov.a stage2/libgcc_eh.a
|
||||
-rm -f stage2/libgcc_s*$(SHLIB_EXT)
|
||||
-rm -f stage2/libunwind.a stage2/libunwind*$(SHLIB_EXT)
|
||||
-cp libgcc.a stage2
|
||||
-$(RANLIB_FOR_TARGET) stage2/libgcc.a
|
||||
-cp libgcov.a stage2
|
||||
@ -3649,6 +3679,7 @@ stage2-start:
|
||||
$(RANLIB_FOR_TARGET) stage2/libgcc_eh.a; \
|
||||
fi
|
||||
-cp libgcc_s*$(SHLIB_EXT) stage2
|
||||
-cp libunwind.a libunwind*$(SHLIB_EXT) stage2
|
||||
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
|
||||
cp stage2/$${f} . ; \
|
||||
else true; \
|
||||
@ -3672,6 +3703,7 @@ stage3-start:
|
||||
-if [ -f collect-ld$(exeext) ] ; then (cd stage3 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
|
||||
-rm -f stage3/libgcc.a stage3/libgcov.a stage3/libgcc_eh.a
|
||||
-rm -f stage3/libgcc_s*$(SHLIB_EXT)
|
||||
-rm -f stage3/libunwind.a stage3/libunwind*$(SHLIB_EXT)
|
||||
-cp libgcc.a stage3
|
||||
-$(RANLIB_FOR_TARGET) stage3/libgcc.a
|
||||
-cp libgcov.a stage3
|
||||
@ -3680,6 +3712,7 @@ stage3-start:
|
||||
$(RANLIB_FOR_TARGET) stage3/libgcc_eh.a; \
|
||||
fi
|
||||
-cp libgcc_s*$(SHLIB_EXT) stage3
|
||||
-cp libunwind.a libunwind*$(SHLIB_EXT) stage3
|
||||
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
|
||||
cp stage3/$${f} . ; \
|
||||
else true; \
|
||||
@ -3703,6 +3736,7 @@ stage4-start:
|
||||
-if [ -f collect-ld$(exeext) ] ; then (cd stage4 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
|
||||
-rm -f stage4/libgcc.a stage4/libgcov.a stage4/libgcc_eh.a
|
||||
-rm -f stage4/libgcc_s*$(SHLIB_EXT)
|
||||
-rm -f stage4/libunwind.a stage4/libunwind*$(SHLIB_EXT)
|
||||
-cp libgcc.a stage4
|
||||
-$(RANLIB_FOR_TARGET) stage4/libgcc.a
|
||||
-cp libgcov.a stage4
|
||||
@ -3711,6 +3745,7 @@ stage4-start:
|
||||
$(RANLIB_FOR_TARGET) stage4/libgcc_eh.a; \
|
||||
fi
|
||||
-cp libgcc_s*$(SHLIB_EXT) stage4
|
||||
-cp libunwind.a libunwind*$(SHLIB_EXT) stage4
|
||||
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
|
||||
cp stage4/$${f} . ; \
|
||||
else true; \
|
||||
@ -3732,6 +3767,7 @@ stageprofile-start:
|
||||
-if [ -f collect-ld$(exeext) ] ; then (cd stageprofile && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
|
||||
-rm -f stageprofile/libgcc.a stageprofile/libgcov.a stageprofile/libgcc_eh.a
|
||||
-rm -f stageprofile/libgcc_s*$(SHLIB_EXT)
|
||||
-rm -f stageprofile/libunwind.a stageprofile/libunwind*$(SHLIB_EXT)
|
||||
-cp libgcc.a stageprofile
|
||||
-$(RANLIB_FOR_TARGET) stageprofile/libgcc.a
|
||||
-cp libgcov.a stageprofile
|
||||
@ -3740,6 +3776,7 @@ stageprofile-start:
|
||||
$(RANLIB_FOR_TARGET) stageprofile/libgcc_eh.a; \
|
||||
fi
|
||||
-cp libgcc_s*$(SHLIB_EXT) stageprofile
|
||||
-cp libunwind.a libunwind*$(SHLIB_EXT) stageprofile
|
||||
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
|
||||
cp stageprofile/$${f} . ; \
|
||||
else true; \
|
||||
@ -3761,6 +3798,7 @@ stagefeedback-start:
|
||||
-if [ -f collect-ld$(exeext) ] ; then (cd stagefeedback && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
|
||||
-rm -f stagefeedback/libgcc.a stagefeedback/libgcov.a stagefeedback/libgcc_eh.a
|
||||
-rm -f stagefeedback/libgcc_s*$(SHLIB_EXT)
|
||||
-rm -f stagefeedback/libunwind.a stagefeedback/libunwind*$(SHLIB_EXT)
|
||||
-rm -f *.da
|
||||
-for dir in fixinc po testsuite $(SUBDIRS); \
|
||||
do \
|
||||
@ -3774,6 +3812,7 @@ stagefeedback-start:
|
||||
$(RANLIB_FOR_TARGET) stagefeedback/libgcc_eh.a; \
|
||||
fi
|
||||
-cp libgcc_s*$(SHLIB_EXT) stagefeedback
|
||||
-cp libunwind.a libunwind*$(SHLIB_EXT) stagefeedback
|
||||
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
|
||||
cp stagefeedback/$${f} . ; \
|
||||
else true; \
|
||||
|
@ -1708,6 +1708,7 @@ expand_builtin_mathfn (tree exp, rtx target, rtx subtarget)
|
||||
narg = save_expr (arg);
|
||||
if (narg != arg)
|
||||
{
|
||||
arg = narg;
|
||||
arglist = build_tree_list (NULL_TREE, arg);
|
||||
exp = build_function_call_expr (fndecl, arglist);
|
||||
}
|
||||
@ -1840,6 +1841,7 @@ expand_builtin_mathfn_2 (tree exp, rtx target, rtx subtarget)
|
||||
narg = save_expr (arg1);
|
||||
if (narg != arg1)
|
||||
{
|
||||
arg1 = narg;
|
||||
temp = build_tree_list (NULL_TREE, narg);
|
||||
stable = false;
|
||||
}
|
||||
@ -1849,6 +1851,7 @@ expand_builtin_mathfn_2 (tree exp, rtx target, rtx subtarget)
|
||||
narg = save_expr (arg0);
|
||||
if (narg != arg0)
|
||||
{
|
||||
arg0 = narg;
|
||||
arglist = tree_cons (NULL_TREE, narg, temp);
|
||||
stable = false;
|
||||
}
|
||||
@ -6581,7 +6584,7 @@ fold_builtin (tree exp)
|
||||
return build_function_call_expr (expfn, arglist);
|
||||
}
|
||||
|
||||
/* Optimize sqrt(pow(x,y)) = pow(x,y*0.5). */
|
||||
/* Optimize sqrt(pow(x,y)) = pow(|x|,y*0.5). */
|
||||
if (flag_unsafe_math_optimizations
|
||||
&& (fcode == BUILT_IN_POW
|
||||
|| fcode == BUILT_IN_POWF
|
||||
@ -6590,8 +6593,11 @@ fold_builtin (tree exp)
|
||||
tree powfn = TREE_OPERAND (TREE_OPERAND (arg, 0), 0);
|
||||
tree arg0 = TREE_VALUE (TREE_OPERAND (arg, 1));
|
||||
tree arg1 = TREE_VALUE (TREE_CHAIN (TREE_OPERAND (arg, 1)));
|
||||
tree narg1 = fold (build (MULT_EXPR, type, arg1,
|
||||
build_real (type, dconsthalf)));
|
||||
tree narg1;
|
||||
if (!tree_expr_nonnegative_p (arg0))
|
||||
arg0 = build1 (ABS_EXPR, type, arg0);
|
||||
narg1 = fold (build (MULT_EXPR, type, arg1,
|
||||
build_real (type, dconsthalf)));
|
||||
arglist = tree_cons (NULL_TREE, arg0,
|
||||
build_tree_list (NULL_TREE, narg1));
|
||||
return build_function_call_expr (powfn, arglist);
|
||||
|
@ -3622,10 +3622,6 @@ grokdeclarator (tree declarator, tree declspecs,
|
||||
}
|
||||
}
|
||||
|
||||
/* Check the type and width of a bit-field. */
|
||||
if (bitfield)
|
||||
check_bitfield_type_and_width (&type, width, orig_name);
|
||||
|
||||
/* Figure out the type qualifiers for the declaration. There are
|
||||
two ways a declaration can become qualified. One is something
|
||||
like `const int i' where the `const' is explicit. Another is
|
||||
@ -3985,7 +3981,17 @@ grokdeclarator (tree declarator, tree declspecs,
|
||||
}
|
||||
else if (TREE_CODE (declarator) == CALL_EXPR)
|
||||
{
|
||||
/* Say it's a definition only for the declarator closest to
|
||||
the identifier, apart possibly from some attributes. */
|
||||
bool really_funcdef = false;
|
||||
tree arg_types;
|
||||
if (funcdef_flag)
|
||||
{
|
||||
tree t = TREE_OPERAND (declarator, 0);
|
||||
while (TREE_CODE (t) == TREE_LIST)
|
||||
t = TREE_VALUE (t);
|
||||
really_funcdef = (TREE_CODE (t) == IDENTIFIER_NODE);
|
||||
}
|
||||
|
||||
/* Declaring a function type.
|
||||
Make sure we have a valid type for the function to return. */
|
||||
@ -4011,11 +4017,7 @@ grokdeclarator (tree declarator, tree declspecs,
|
||||
inner layer of declarator. */
|
||||
|
||||
arg_types = grokparms (TREE_OPERAND (declarator, 1),
|
||||
funcdef_flag
|
||||
/* Say it's a definition
|
||||
only for the CALL_EXPR
|
||||
closest to the identifier. */
|
||||
&& TREE_CODE (TREE_OPERAND (declarator, 0)) == IDENTIFIER_NODE);
|
||||
really_funcdef);
|
||||
/* Type qualifiers before the return type of the function
|
||||
qualify the return type, not the function type. */
|
||||
if (type_quals)
|
||||
@ -4129,6 +4131,10 @@ grokdeclarator (tree declarator, tree declspecs,
|
||||
|
||||
/* Now TYPE has the actual type. */
|
||||
|
||||
/* Check the type and width of a bit-field. */
|
||||
if (bitfield)
|
||||
check_bitfield_type_and_width (&type, width, orig_name);
|
||||
|
||||
/* Did array size calculations overflow? */
|
||||
|
||||
if (TREE_CODE (type) == ARRAY_TYPE
|
||||
@ -5128,7 +5134,7 @@ finish_struct (tree t, tree fieldlist, tree attributes)
|
||||
make it one, warn and turn off the flag. */
|
||||
if (TREE_CODE (t) == UNION_TYPE
|
||||
&& TYPE_TRANSPARENT_UNION (t)
|
||||
&& TYPE_MODE (t) != DECL_MODE (TYPE_FIELDS (t)))
|
||||
&& (!TYPE_FIELDS (t) || TYPE_MODE (t) != DECL_MODE (TYPE_FIELDS (t))))
|
||||
{
|
||||
TYPE_TRANSPARENT_UNION (t) = 0;
|
||||
warning ("union cannot be made transparent");
|
||||
@ -5280,9 +5286,19 @@ finish_enum (tree enumtype, tree values, tree attributes)
|
||||
|
||||
TYPE_MIN_VALUE (enumtype) = minnode;
|
||||
TYPE_MAX_VALUE (enumtype) = maxnode;
|
||||
TYPE_PRECISION (enumtype) = precision;
|
||||
TREE_UNSIGNED (enumtype) = unsign;
|
||||
TYPE_SIZE (enumtype) = 0;
|
||||
|
||||
/* If the precision of the type was specific with an attribute and it
|
||||
was too small, give an error. Otherwise, use it. */
|
||||
if (TYPE_PRECISION (enumtype))
|
||||
{
|
||||
if (precision > TYPE_PRECISION (enumtype))
|
||||
error ("specified mode too small for enumeral values");
|
||||
}
|
||||
else
|
||||
TYPE_PRECISION (enumtype) = precision;
|
||||
|
||||
layout_type (enumtype);
|
||||
|
||||
if (values != error_mark_node)
|
||||
|
@ -1947,6 +1947,17 @@ alpha_legitimize_address (rtx x, rtx scratch,
|
||||
}
|
||||
}
|
||||
|
||||
/* Primarily this is required for TLS symbols, but given that our move
|
||||
patterns *ought* to be able to handle any symbol at any time, we
|
||||
should never be spilling symbolic operands to the constant pool, ever. */
|
||||
|
||||
static bool
|
||||
alpha_cannot_force_const_mem (rtx x)
|
||||
{
|
||||
enum rtx_code code = GET_CODE (x);
|
||||
return code == SYMBOL_REF || code == LABEL_REF || code == CONST;
|
||||
}
|
||||
|
||||
/* We do not allow indirect calls to be optimized into sibling calls, nor
|
||||
can we allow a call to a function with a different GP to be optimized
|
||||
into a sibcall. */
|
||||
@ -3186,7 +3197,13 @@ alpha_emit_conditional_branch (enum rtx_code code)
|
||||
/* If the constants doesn't fit into an immediate, but can
|
||||
be generated by lda/ldah, we adjust the argument and
|
||||
compare against zero, so we can use beq/bne directly. */
|
||||
else if (GET_CODE (op1) == CONST_INT && (code == EQ || code == NE))
|
||||
/* ??? Don't do this when comparing against symbols, otherwise
|
||||
we'll reduce (&x == 0x1234) to (&x-0x1234 == 0), which will
|
||||
be declared false out of hand (at least for non-weak). */
|
||||
else if (GET_CODE (op1) == CONST_INT
|
||||
&& (code == EQ || code == NE)
|
||||
&& !(symbolic_operand (op0, VOIDmode)
|
||||
|| (GET_CODE (op0) == REG && REG_POINTER (op0))))
|
||||
{
|
||||
HOST_WIDE_INT v = INTVAL (op1), n = -v;
|
||||
|
||||
@ -6786,11 +6803,6 @@ alpha_sa_mask (unsigned long *imaskP, unsigned long *fmaskP)
|
||||
break;
|
||||
imask |= 1UL << regno;
|
||||
}
|
||||
|
||||
/* Glibc likes to use $31 as an unwind stopper for crt0. To
|
||||
avoid hackery in unwind-dw2.c, we need to actively store a
|
||||
zero in the prologue of _Unwind_RaiseException et al. */
|
||||
imask |= 1UL << 31;
|
||||
}
|
||||
|
||||
/* If any register spilled, then spill the return address also. */
|
||||
@ -7046,6 +7058,48 @@ set_frame_related_p (void)
|
||||
|
||||
#define FRP(exp) (start_sequence (), exp, set_frame_related_p ())
|
||||
|
||||
/* Generates a store with the proper unwind info attached. VALUE is
|
||||
stored at BASE_REG+BASE_OFS. If FRAME_BIAS is non-zero, then BASE_REG
|
||||
contains SP+FRAME_BIAS, and that is the unwind info that should be
|
||||
generated. If FRAME_REG != VALUE, then VALUE is being stored on
|
||||
behalf of FRAME_REG, and FRAME_REG should be present in the unwind. */
|
||||
|
||||
static void
|
||||
emit_frame_store_1 (rtx value, rtx base_reg, HOST_WIDE_INT frame_bias,
|
||||
HOST_WIDE_INT base_ofs, rtx frame_reg)
|
||||
{
|
||||
rtx addr, mem, insn;
|
||||
|
||||
addr = plus_constant (base_reg, base_ofs);
|
||||
mem = gen_rtx_MEM (DImode, addr);
|
||||
set_mem_alias_set (mem, alpha_sr_alias_set);
|
||||
|
||||
insn = emit_move_insn (mem, value);
|
||||
RTX_FRAME_RELATED_P (insn) = 1;
|
||||
|
||||
if (frame_bias || value != frame_reg)
|
||||
{
|
||||
if (frame_bias)
|
||||
{
|
||||
addr = plus_constant (stack_pointer_rtx, frame_bias + base_ofs);
|
||||
mem = gen_rtx_MEM (DImode, addr);
|
||||
}
|
||||
|
||||
REG_NOTES (insn)
|
||||
= gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
|
||||
gen_rtx_SET (VOIDmode, mem, frame_reg),
|
||||
REG_NOTES (insn));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
emit_frame_store (unsigned int regno, rtx base_reg,
|
||||
HOST_WIDE_INT frame_bias, HOST_WIDE_INT base_ofs)
|
||||
{
|
||||
rtx reg = gen_rtx_REG (DImode, regno);
|
||||
emit_frame_store_1 (reg, base_reg, frame_bias, base_ofs, reg);
|
||||
}
|
||||
|
||||
/* Write function prologue. */
|
||||
|
||||
/* On vms we have two kinds of functions:
|
||||
@ -7075,7 +7129,7 @@ alpha_expand_prologue (void)
|
||||
HOST_WIDE_INT frame_size;
|
||||
/* Offset from base reg to register save area. */
|
||||
HOST_WIDE_INT reg_offset;
|
||||
rtx sa_reg, mem;
|
||||
rtx sa_reg;
|
||||
int i;
|
||||
|
||||
sa_size = alpha_sa_size ();
|
||||
@ -7225,37 +7279,40 @@ alpha_expand_prologue (void)
|
||||
|
||||
if (!TARGET_ABI_UNICOSMK)
|
||||
{
|
||||
HOST_WIDE_INT sa_bias = 0;
|
||||
|
||||
/* Cope with very large offsets to the register save area. */
|
||||
sa_reg = stack_pointer_rtx;
|
||||
if (reg_offset + sa_size > 0x8000)
|
||||
{
|
||||
int low = ((reg_offset & 0xffff) ^ 0x8000) - 0x8000;
|
||||
HOST_WIDE_INT bias;
|
||||
rtx sa_bias_rtx;
|
||||
|
||||
if (low + sa_size <= 0x8000)
|
||||
bias = reg_offset - low, reg_offset = low;
|
||||
sa_bias = reg_offset - low, reg_offset = low;
|
||||
else
|
||||
bias = reg_offset, reg_offset = 0;
|
||||
sa_bias = reg_offset, reg_offset = 0;
|
||||
|
||||
sa_reg = gen_rtx_REG (DImode, 24);
|
||||
FRP (emit_insn (gen_adddi3 (sa_reg, stack_pointer_rtx,
|
||||
GEN_INT (bias))));
|
||||
sa_bias_rtx = GEN_INT (sa_bias);
|
||||
|
||||
if (add_operand (sa_bias_rtx, DImode))
|
||||
emit_insn (gen_adddi3 (sa_reg, stack_pointer_rtx, sa_bias_rtx));
|
||||
else
|
||||
{
|
||||
emit_move_insn (sa_reg, sa_bias_rtx);
|
||||
emit_insn (gen_adddi3 (sa_reg, stack_pointer_rtx, sa_reg));
|
||||
}
|
||||
}
|
||||
|
||||
/* Save regs in stack order. Beginning with VMS PV. */
|
||||
if (TARGET_ABI_OPEN_VMS && alpha_procedure_type == PT_STACK)
|
||||
{
|
||||
mem = gen_rtx_MEM (DImode, stack_pointer_rtx);
|
||||
set_mem_alias_set (mem, alpha_sr_alias_set);
|
||||
FRP (emit_move_insn (mem, gen_rtx_REG (DImode, REG_PV)));
|
||||
}
|
||||
emit_frame_store (REG_PV, stack_pointer_rtx, 0, 0);
|
||||
|
||||
/* Save register RA next. */
|
||||
if (imask & (1UL << REG_RA))
|
||||
{
|
||||
mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset));
|
||||
set_mem_alias_set (mem, alpha_sr_alias_set);
|
||||
FRP (emit_move_insn (mem, gen_rtx_REG (DImode, REG_RA)));
|
||||
emit_frame_store (REG_RA, sa_reg, sa_bias, reg_offset);
|
||||
imask &= ~(1UL << REG_RA);
|
||||
reg_offset += 8;
|
||||
}
|
||||
@ -7264,36 +7321,14 @@ alpha_expand_prologue (void)
|
||||
for (i = 0; i < 31; i++)
|
||||
if (imask & (1UL << i))
|
||||
{
|
||||
mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset));
|
||||
set_mem_alias_set (mem, alpha_sr_alias_set);
|
||||
FRP (emit_move_insn (mem, gen_rtx_REG (DImode, i)));
|
||||
emit_frame_store (i, sa_reg, sa_bias, reg_offset);
|
||||
reg_offset += 8;
|
||||
}
|
||||
|
||||
/* Store a zero if requested for unwinding. */
|
||||
if (imask & (1UL << 31))
|
||||
{
|
||||
rtx insn, t;
|
||||
|
||||
mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset));
|
||||
set_mem_alias_set (mem, alpha_sr_alias_set);
|
||||
insn = emit_move_insn (mem, const0_rtx);
|
||||
|
||||
RTX_FRAME_RELATED_P (insn) = 1;
|
||||
t = gen_rtx_REG (Pmode, 31);
|
||||
t = gen_rtx_SET (VOIDmode, mem, t);
|
||||
t = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, t, REG_NOTES (insn));
|
||||
REG_NOTES (insn) = t;
|
||||
|
||||
reg_offset += 8;
|
||||
}
|
||||
|
||||
for (i = 0; i < 31; i++)
|
||||
if (fmask & (1UL << i))
|
||||
{
|
||||
mem = gen_rtx_MEM (DFmode, plus_constant (sa_reg, reg_offset));
|
||||
set_mem_alias_set (mem, alpha_sr_alias_set);
|
||||
FRP (emit_move_insn (mem, gen_rtx_REG (DFmode, i+32)));
|
||||
emit_frame_store (i+32, sa_reg, sa_bias, reg_offset);
|
||||
reg_offset += 8;
|
||||
}
|
||||
}
|
||||
@ -7307,19 +7342,13 @@ alpha_expand_prologue (void)
|
||||
for (i = 9; i < 15; i++)
|
||||
if (imask & (1UL << i))
|
||||
{
|
||||
mem = gen_rtx_MEM (DImode, plus_constant(hard_frame_pointer_rtx,
|
||||
reg_offset));
|
||||
set_mem_alias_set (mem, alpha_sr_alias_set);
|
||||
FRP (emit_move_insn (mem, gen_rtx_REG (DImode, i)));
|
||||
emit_frame_store (i, hard_frame_pointer_rtx, 0, reg_offset);
|
||||
reg_offset -= 8;
|
||||
}
|
||||
for (i = 2; i < 10; i++)
|
||||
if (fmask & (1UL << i))
|
||||
{
|
||||
mem = gen_rtx_MEM (DFmode, plus_constant (hard_frame_pointer_rtx,
|
||||
reg_offset));
|
||||
set_mem_alias_set (mem, alpha_sr_alias_set);
|
||||
FRP (emit_move_insn (mem, gen_rtx_REG (DFmode, i+32)));
|
||||
emit_frame_store (i+32, hard_frame_pointer_rtx, 0, reg_offset);
|
||||
reg_offset -= 8;
|
||||
}
|
||||
}
|
||||
@ -7713,9 +7742,6 @@ alpha_expand_epilogue (void)
|
||||
reg_offset += 8;
|
||||
}
|
||||
|
||||
if (imask & (1UL << 31))
|
||||
reg_offset += 8;
|
||||
|
||||
for (i = 0; i < 31; ++i)
|
||||
if (fmask & (1UL << i))
|
||||
{
|
||||
@ -10215,6 +10241,8 @@ alpha_init_libfuncs (void)
|
||||
#define TARGET_FUNCTION_OK_FOR_SIBCALL alpha_function_ok_for_sibcall
|
||||
#undef TARGET_CANNOT_COPY_INSN_P
|
||||
#define TARGET_CANNOT_COPY_INSN_P alpha_cannot_copy_insn_p
|
||||
#undef TARGET_CANNOT_FORCE_CONST_MEM
|
||||
#define TARGET_CANNOT_FORCE_CONST_MEM alpha_cannot_force_const_mem
|
||||
|
||||
#if TARGET_ABI_OSF
|
||||
#undef TARGET_ASM_OUTPUT_MI_THUNK
|
||||
@ -10257,4 +10285,3 @@ struct gcc_target targetm = TARGET_INITIALIZER;
|
||||
|
||||
|
||||
#include "gt-alpha.h"
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
1766
contrib/gcc/configure
vendored
1766
contrib/gcc/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
/* Process declarations and variables for C++ compiler.
|
||||
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
Contributed by Michael Tiemann (tiemann@cygnus.com)
|
||||
|
||||
This file is part of GCC.
|
||||
@ -119,6 +119,7 @@ static void initialize_local_var (tree, tree);
|
||||
static void expand_static_init (tree, tree);
|
||||
static tree next_initializable_field (tree);
|
||||
static tree reshape_init (tree, tree *);
|
||||
static bool reshape_init_array (tree, tree, tree *, tree);
|
||||
static tree build_typename_type (tree, tree, tree);
|
||||
|
||||
/* Erroneous argument lists can use this *IFF* they do not modify it. */
|
||||
@ -1067,6 +1068,12 @@ decls_match (tree newdecl, tree olddecl)
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Need to check scope for variable declaration (VAR_DECL).
|
||||
For typedef (TYPE_DECL), scope is ignored. */
|
||||
if (TREE_CODE (newdecl) == VAR_DECL
|
||||
&& CP_DECL_CONTEXT (newdecl) != CP_DECL_CONTEXT (olddecl))
|
||||
return 0;
|
||||
|
||||
if (TREE_TYPE (newdecl) == error_mark_node)
|
||||
types_match = TREE_TYPE (olddecl) == error_mark_node;
|
||||
else if (TREE_TYPE (olddecl) == NULL_TREE)
|
||||
@ -1410,19 +1417,32 @@ duplicate_decls (tree newdecl, tree olddecl)
|
||||
/* One of the declarations is a template instantiation, and the
|
||||
other is not a template at all. That's OK. */
|
||||
return NULL_TREE;
|
||||
else if (TREE_CODE (newdecl) == NAMESPACE_DECL
|
||||
&& DECL_NAMESPACE_ALIAS (newdecl)
|
||||
&& DECL_NAMESPACE_ALIAS (newdecl) == DECL_NAMESPACE_ALIAS (olddecl))
|
||||
/* In [namespace.alias] we have:
|
||||
else if (TREE_CODE (newdecl) == NAMESPACE_DECL)
|
||||
{
|
||||
/* In [namespace.alias] we have:
|
||||
|
||||
In a declarative region, a namespace-alias-definition can be
|
||||
used to redefine a namespace-alias declared in that declarative
|
||||
region to refer only to the namespace to which it already
|
||||
refers.
|
||||
|
||||
Therefore, if we encounter a second alias directive for the same
|
||||
alias, we can just ignore the second directive. */
|
||||
if (DECL_NAMESPACE_ALIAS (newdecl)
|
||||
&& (DECL_NAMESPACE_ALIAS (newdecl)
|
||||
== DECL_NAMESPACE_ALIAS (olddecl)))
|
||||
return olddecl;
|
||||
/* [namespace.alias]
|
||||
|
||||
In a declarative region, a namespace-alias-definition can be
|
||||
used to redefine a namespace-alias declared in that declarative
|
||||
region to refer only to the namespace to which it already
|
||||
refers.
|
||||
|
||||
Therefore, if we encounter a second alias directive for the same
|
||||
alias, we can just ignore the second directive. */
|
||||
return olddecl;
|
||||
A namespace-name or namespace-alias shall not be declared as
|
||||
the name of any other entity in the same declarative region.
|
||||
A namespace-name defined at global scope shall not be
|
||||
declared as the name of any other entity in any glogal scope
|
||||
of the program. */
|
||||
error ("declaration of `namespace %D' conflicts with", newdecl);
|
||||
cp_error_at ("previous declaration of `namespace %D' here", olddecl);
|
||||
return error_mark_node;
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *errmsg = redeclaration_error_message (newdecl, olddecl);
|
||||
@ -2009,7 +2029,8 @@ redeclaration_error_message (tree newdecl, tree olddecl)
|
||||
/* If both functions come from different namespaces, this is not
|
||||
a redeclaration - this is a conflict with a used function. */
|
||||
if (DECL_NAMESPACE_SCOPE_P (olddecl)
|
||||
&& DECL_CONTEXT (olddecl) != DECL_CONTEXT (newdecl))
|
||||
&& DECL_CONTEXT (olddecl) != DECL_CONTEXT (newdecl)
|
||||
&& ! decls_match (olddecl, newdecl))
|
||||
return "`%D' conflicts with used function";
|
||||
|
||||
/* We'll complain about linkage mismatches in
|
||||
@ -3690,12 +3711,12 @@ start_decl (tree declarator,
|
||||
deprecated_state = DEPRECATED_NORMAL;
|
||||
|
||||
if (decl == NULL_TREE || TREE_CODE (decl) == VOID_TYPE)
|
||||
return NULL_TREE;
|
||||
return error_mark_node;
|
||||
|
||||
type = TREE_TYPE (decl);
|
||||
|
||||
if (type == error_mark_node)
|
||||
return NULL_TREE;
|
||||
return error_mark_node;
|
||||
|
||||
context = DECL_CONTEXT (decl);
|
||||
|
||||
@ -4183,6 +4204,62 @@ next_initializable_field (tree field)
|
||||
return field;
|
||||
}
|
||||
|
||||
/* Subroutine of reshape_init. Reshape the constructor for an array. INITP
|
||||
is the pointer to the old constructor list (to the CONSTRUCTOR_ELTS of
|
||||
the CONSTRUCTOR we are processing), while NEW_INIT is the CONSTRUCTOR we
|
||||
are building.
|
||||
ELT_TYPE is the element type of the array. MAX_INDEX is an INTEGER_CST
|
||||
representing the size of the array minus one (the maximum index), or
|
||||
NULL_TREE if the array was declared without specifying the size. */
|
||||
|
||||
static bool
|
||||
reshape_init_array (tree elt_type, tree max_index,
|
||||
tree *initp, tree new_init)
|
||||
{
|
||||
bool sized_array_p = (max_index != NULL_TREE);
|
||||
unsigned HOST_WIDE_INT max_index_cst = 0;
|
||||
unsigned HOST_WIDE_INT index;
|
||||
|
||||
if (sized_array_p)
|
||||
{
|
||||
if (host_integerp (max_index, 1))
|
||||
max_index_cst = tree_low_cst (max_index, 1);
|
||||
/* sizetype is sign extended, not zero extended. */
|
||||
else
|
||||
max_index_cst = tree_low_cst (convert (size_type_node, max_index), 1);
|
||||
}
|
||||
|
||||
/* Loop until there are no more initializers. */
|
||||
for (index = 0;
|
||||
*initp && (!sized_array_p || index <= max_index_cst);
|
||||
++index)
|
||||
{
|
||||
tree element_init;
|
||||
tree designated_index;
|
||||
|
||||
element_init = reshape_init (elt_type, initp);
|
||||
if (element_init == error_mark_node)
|
||||
return false;
|
||||
TREE_CHAIN (element_init) = CONSTRUCTOR_ELTS (new_init);
|
||||
CONSTRUCTOR_ELTS (new_init) = element_init;
|
||||
designated_index = TREE_PURPOSE (element_init);
|
||||
if (designated_index)
|
||||
{
|
||||
/* Handle array designated initializers (GNU extension). */
|
||||
if (TREE_CODE (designated_index) == IDENTIFIER_NODE)
|
||||
{
|
||||
error ("name `%D' used in a GNU-style designated "
|
||||
"initializer for an array", designated_index);
|
||||
TREE_PURPOSE (element_init) = NULL_TREE;
|
||||
}
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Undo the brace-elision allowed by [dcl.init.aggr] in a
|
||||
brace-enclosed aggregate initializer.
|
||||
|
||||
@ -4206,6 +4283,7 @@ reshape_init (tree type, tree *initp)
|
||||
tree old_init_value;
|
||||
tree new_init;
|
||||
bool brace_enclosed_p;
|
||||
bool string_init_p;
|
||||
|
||||
old_init = *initp;
|
||||
old_init_value = (TREE_CODE (*initp) == TREE_LIST
|
||||
@ -4270,6 +4348,7 @@ reshape_init (tree type, tree *initp)
|
||||
return old_init;
|
||||
}
|
||||
|
||||
string_init_p = false;
|
||||
if (TREE_CODE (old_init_value) == STRING_CST
|
||||
&& TREE_CODE (type) == ARRAY_TYPE
|
||||
&& char_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (type))))
|
||||
@ -4284,6 +4363,7 @@ reshape_init (tree type, tree *initp)
|
||||
/* Move past the initializer. */
|
||||
*initp = TREE_CHAIN (old_init);
|
||||
TREE_CHAIN (old_init) = NULL_TREE;
|
||||
string_init_p = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4351,38 +4431,15 @@ reshape_init (tree type, tree *initp)
|
||||
}
|
||||
else if ((TREE_CODE (type) == ARRAY_TYPE)|| (TREE_CODE (type) == VECTOR_TYPE))
|
||||
{
|
||||
tree index;
|
||||
tree max_index;
|
||||
|
||||
/* If the bound of the array is known, take no more initializers
|
||||
than are allowed. */
|
||||
max_index = ((TYPE_DOMAIN (type) && (TREE_CODE (type) == ARRAY_TYPE))
|
||||
? array_type_nelts (type) : NULL_TREE);
|
||||
/* Loop through the array elements, gathering initializers. */
|
||||
for (index = size_zero_node;
|
||||
*initp && (!max_index || !tree_int_cst_lt (max_index, index));
|
||||
index = size_binop (PLUS_EXPR, index, size_one_node))
|
||||
{
|
||||
tree element_init;
|
||||
|
||||
element_init = reshape_init (TREE_TYPE (type), initp);
|
||||
if (element_init == error_mark_node)
|
||||
return error_mark_node;
|
||||
TREE_CHAIN (element_init) = CONSTRUCTOR_ELTS (new_init);
|
||||
CONSTRUCTOR_ELTS (new_init) = element_init;
|
||||
if (TREE_PURPOSE (element_init))
|
||||
{
|
||||
tree next_index = TREE_PURPOSE (element_init);
|
||||
if (TREE_CODE (next_index) == IDENTIFIER_NODE)
|
||||
{
|
||||
error ("name `%D' used in a GNU-style designated "
|
||||
"initializer for an array", next_index);
|
||||
TREE_PURPOSE (element_init) = NULL_TREE;
|
||||
}
|
||||
else
|
||||
index = next_index;
|
||||
}
|
||||
}
|
||||
if (!reshape_init_array (TREE_TYPE (type), max_index,
|
||||
initp, new_init))
|
||||
return error_mark_node;
|
||||
}
|
||||
else
|
||||
abort ();
|
||||
@ -4395,10 +4452,15 @@ reshape_init (tree type, tree *initp)
|
||||
new_init = build_tree_list (TREE_PURPOSE (old_init), new_init);
|
||||
}
|
||||
|
||||
/* If this was a brace-enclosed initializer and all of the
|
||||
initializers were not used up, there is a problem. */
|
||||
if (brace_enclosed_p && *initp)
|
||||
error ("too many initializers for `%T'", type);
|
||||
/* If there are more initializers than necessary, issue a
|
||||
diagnostic. */
|
||||
if (*initp)
|
||||
{
|
||||
if (brace_enclosed_p)
|
||||
error ("too many initializers for `%T'", type);
|
||||
else if (warn_missing_braces && !string_init_p)
|
||||
warning ("missing braces around initializer");
|
||||
}
|
||||
|
||||
return new_init;
|
||||
}
|
||||
@ -4723,6 +4785,7 @@ cp_finish_decl (tree decl, tree init, tree asmspec_tree, int flags)
|
||||
tree cleanup;
|
||||
const char *asmspec = NULL;
|
||||
int was_readonly = 0;
|
||||
bool var_definition_p = false;
|
||||
|
||||
if (decl == error_mark_node)
|
||||
return;
|
||||
@ -4875,6 +4938,11 @@ cp_finish_decl (tree decl, tree init, tree asmspec_tree, int flags)
|
||||
/* Remember that the initialization for this variable has
|
||||
taken place. */
|
||||
DECL_INITIALIZED_P (decl) = 1;
|
||||
/* This declaration is the definition of this variable,
|
||||
unless we are initializing a static data member within
|
||||
the class specifier. */
|
||||
if (!DECL_EXTERNAL (decl))
|
||||
var_definition_p = true;
|
||||
}
|
||||
/* If the variable has an array type, lay out the type, even if
|
||||
there is no initializer. It is valid to index through the
|
||||
@ -4949,8 +5017,16 @@ cp_finish_decl (tree decl, tree init, tree asmspec_tree, int flags)
|
||||
initialize_local_var (decl, init);
|
||||
}
|
||||
|
||||
if (TREE_STATIC (decl))
|
||||
expand_static_init (decl, init);
|
||||
/* If a variable is defined, and then a subsequent
|
||||
definintion with external linkage is encountered, we will
|
||||
get here twice for the same variable. We want to avoid
|
||||
calling expand_static_init more than once. For variables
|
||||
that are not static data members, we can call
|
||||
expand_static_init only when we actually process the
|
||||
initializer. It is not legal to redeclare a static data
|
||||
member, so this issue does not arise in that case. */
|
||||
if (var_definition_p && TREE_STATIC (decl))
|
||||
expand_static_init (decl, init);
|
||||
}
|
||||
finish_end0:
|
||||
|
||||
@ -6317,6 +6393,32 @@ check_special_function_return_type (special_function_kind sfk,
|
||||
return type;
|
||||
}
|
||||
|
||||
/* A variable or data member (whose unqualified name is IDENTIFIER)
|
||||
has been declared with the indicated TYPE. If the TYPE is not
|
||||
acceptable, issue an error message and return a type to use for
|
||||
error-recovery purposes. */
|
||||
|
||||
tree
|
||||
check_var_type (tree identifier, tree type)
|
||||
{
|
||||
if (VOID_TYPE_P (type))
|
||||
{
|
||||
if (!identifier)
|
||||
error ("unnamed variable or field declared void");
|
||||
else if (TREE_CODE (identifier) == IDENTIFIER_NODE)
|
||||
{
|
||||
if (IDENTIFIER_OPNAME_P (identifier))
|
||||
abort ();
|
||||
error ("variable or field `%E' declared void", identifier);
|
||||
}
|
||||
else
|
||||
error ("variable or field declared void");
|
||||
type = integer_type_node;
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
/* Given declspecs and a declarator (abstract or otherwise), determine
|
||||
the name and type of the object declared and construct a DECL node
|
||||
for it.
|
||||
@ -8016,30 +8118,25 @@ grokdeclarator (tree declarator,
|
||||
&& ! bitfield)
|
||||
{
|
||||
error ("abstract declarator `%T' used as declaration", type);
|
||||
declarator = make_anon_name ();
|
||||
return error_mark_node;
|
||||
}
|
||||
|
||||
/* `void' at top level (not within pointer)
|
||||
is allowed only in typedefs or type names.
|
||||
We don't complain about parms either, but that is because
|
||||
a better error message can be made later. */
|
||||
|
||||
if (TREE_CODE (type) == VOID_TYPE && decl_context != PARM)
|
||||
/* Only functions may be declared using an operator-function-id. */
|
||||
if (declarator
|
||||
&& TREE_CODE (declarator) == IDENTIFIER_NODE
|
||||
&& IDENTIFIER_OPNAME_P (declarator)
|
||||
&& TREE_CODE (type) != FUNCTION_TYPE
|
||||
&& TREE_CODE (type) != METHOD_TYPE)
|
||||
{
|
||||
if (! declarator)
|
||||
error ("unnamed variable or field declared void");
|
||||
else if (TREE_CODE (declarator) == IDENTIFIER_NODE)
|
||||
{
|
||||
if (IDENTIFIER_OPNAME_P (declarator))
|
||||
abort ();
|
||||
else
|
||||
error ("variable or field `%s' declared void", name);
|
||||
}
|
||||
else
|
||||
error ("variable or field declared void");
|
||||
type = integer_type_node;
|
||||
error ("declaration of `%D' as non-function", declarator);
|
||||
return error_mark_node;
|
||||
}
|
||||
|
||||
/* We don't check parameter types here because we can emit a better
|
||||
error message later. */
|
||||
if (decl_context != PARM)
|
||||
type = check_var_type (declarator, type);
|
||||
|
||||
/* Now create the decl, which may be a VAR_DECL, a PARM_DECL
|
||||
or a FUNCTION_DECL, depending on DECL_CONTEXT and TYPE. */
|
||||
|
||||
@ -9848,7 +9945,14 @@ finish_enum (tree enumtype)
|
||||
underlying type in the range bmin to bmax, where bmin and bmax are,
|
||||
respectively, the smallest and largest values of the smallest bit-
|
||||
field that can store emin and emax. */
|
||||
TYPE_PRECISION (enumtype) = precision;
|
||||
|
||||
/* The middle-end currently assumes that types with TYPE_PRECISION
|
||||
narrower than their underlying type are suitably zero or sign
|
||||
extended to fill their mode. g++ doesn't make these guarantees.
|
||||
Until the middle-end can represent such paradoxical types, we
|
||||
set the TYPE_PRECISON to the width of the underlying type. */
|
||||
TYPE_PRECISION (enumtype) = TYPE_PRECISION (underlying_type);
|
||||
|
||||
set_min_and_max_values_for_integral_type (enumtype, precision, unsignedp);
|
||||
|
||||
/* [dcl.enum]
|
||||
|
@ -594,9 +594,9 @@ build_throw (tree exp)
|
||||
fn = push_throw_library_fn (fn, tmp);
|
||||
}
|
||||
else if (really_overloaded_fn (fn))
|
||||
{
|
||||
{
|
||||
error ("`%D' should never be overloaded", fn);
|
||||
return error_mark_node;
|
||||
return error_mark_node;
|
||||
}
|
||||
fn = OVL_CURRENT (fn);
|
||||
exp = build_function_call (fn, tree_cons (NULL_TREE, exp, NULL_TREE));
|
||||
@ -610,18 +610,18 @@ build_throw (tree exp)
|
||||
tree temp_expr, allocate_expr;
|
||||
bool elided;
|
||||
|
||||
/* The CLEANUP_TYPE is the internal type of a destructor. */
|
||||
if (!cleanup_type)
|
||||
{
|
||||
tmp = void_list_node;
|
||||
tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);
|
||||
tmp = build_function_type (void_type_node, tmp);
|
||||
cleanup_type = build_pointer_type (tmp);
|
||||
}
|
||||
|
||||
fn = get_identifier ("__cxa_throw");
|
||||
if (!get_global_value_if_present (fn, &fn))
|
||||
{
|
||||
/* The CLEANUP_TYPE is the internal type of a destructor. */
|
||||
if (cleanup_type == NULL_TREE)
|
||||
{
|
||||
tmp = void_list_node;
|
||||
tmp = tree_cons (NULL_TREE, ptr_type_node, tmp);
|
||||
tmp = build_function_type (void_type_node, tmp);
|
||||
cleanup_type = build_pointer_type (tmp);
|
||||
}
|
||||
|
||||
/* Declare void __cxa_throw (void*, void*, void (*)(void*)). */
|
||||
/* ??? Second argument is supposed to be "std::type_info*". */
|
||||
tmp = void_list_node;
|
||||
@ -631,7 +631,7 @@ build_throw (tree exp)
|
||||
tmp = build_function_type (void_type_node, tmp);
|
||||
fn = push_throw_library_fn (fn, tmp);
|
||||
}
|
||||
|
||||
|
||||
/* throw expression */
|
||||
/* First, decay it. */
|
||||
exp = decay_conversion (exp);
|
||||
|
@ -434,6 +434,9 @@ static void
|
||||
dbxout_function_end (void)
|
||||
{
|
||||
char lscope_label_name[100];
|
||||
|
||||
/* The Lscope label must be emitted even if we aren't doing anything
|
||||
else; dbxout_block needs it. */
|
||||
/* Convert Ltext into the appropriate format for local labels in case
|
||||
the system doesn't insert underscores in front of user generated
|
||||
labels. */
|
||||
@ -441,6 +444,16 @@ dbxout_function_end (void)
|
||||
(*targetm.asm_out.internal_label) (asmfile, "Lscope", scope_labelno);
|
||||
scope_labelno++;
|
||||
|
||||
/* The N_FUN tag at the end of the function is a GNU extension,
|
||||
which may be undesirable, and is unnecessary if we do not have
|
||||
named sections. */
|
||||
if (!use_gnu_debug_info_extensions
|
||||
#if defined(NO_DBX_FUNCTION_END)
|
||||
|| NO_DBX_FUNCTION_END
|
||||
#endif
|
||||
|| !targetm.have_named_sections)
|
||||
return;
|
||||
|
||||
/* By convention, GCC will mark the end of a function with an N_FUN
|
||||
symbol and an empty string. */
|
||||
#ifdef DBX_OUTPUT_NFUN
|
||||
@ -774,12 +787,7 @@ dbxout_function_decl (tree decl)
|
||||
#ifdef DBX_OUTPUT_FUNCTION_END
|
||||
DBX_OUTPUT_FUNCTION_END (asmfile, decl);
|
||||
#endif
|
||||
if (use_gnu_debug_info_extensions
|
||||
#if defined(NO_DBX_FUNCTION_END)
|
||||
&& ! NO_DBX_FUNCTION_END
|
||||
#endif
|
||||
&& targetm.have_named_sections)
|
||||
dbxout_function_end ();
|
||||
dbxout_function_end ();
|
||||
}
|
||||
|
||||
#endif /* DBX_DEBUGGING_INFO */
|
||||
@ -2439,6 +2447,37 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home)
|
||||
|
||||
letter = decl_function_context (decl) ? 'V' : 'S';
|
||||
|
||||
/* Some ports can transform a symbol ref into a label ref,
|
||||
because the symbol ref is too far away and has to be
|
||||
dumped into a constant pool. Alternatively, the symbol
|
||||
in the constant pool might be referenced by a different
|
||||
symbol. */
|
||||
if (GET_CODE (current_sym_addr) == SYMBOL_REF
|
||||
&& CONSTANT_POOL_ADDRESS_P (current_sym_addr))
|
||||
{
|
||||
bool marked;
|
||||
rtx tmp = get_pool_constant_mark (current_sym_addr, &marked);
|
||||
|
||||
if (GET_CODE (tmp) == SYMBOL_REF)
|
||||
{
|
||||
current_sym_addr = tmp;
|
||||
if (CONSTANT_POOL_ADDRESS_P (current_sym_addr))
|
||||
get_pool_constant_mark (current_sym_addr, &marked);
|
||||
else
|
||||
marked = true;
|
||||
}
|
||||
else if (GET_CODE (tmp) == LABEL_REF)
|
||||
{
|
||||
current_sym_addr = tmp;
|
||||
marked = true;
|
||||
}
|
||||
|
||||
/* If all references to the constant pool were optimized
|
||||
out, we just ignore the symbol. */
|
||||
if (!marked)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This should be the same condition as in assemble_variable, but
|
||||
we don't have access to dont_output_data here. So, instead,
|
||||
we rely on the fact that error_mark_node initializers always
|
||||
@ -2453,37 +2492,6 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home)
|
||||
current_sym_code = DBX_STATIC_CONST_VAR_CODE;
|
||||
else
|
||||
{
|
||||
/* Some ports can transform a symbol ref into a label ref,
|
||||
because the symbol ref is too far away and has to be
|
||||
dumped into a constant pool. Alternatively, the symbol
|
||||
in the constant pool might be referenced by a different
|
||||
symbol. */
|
||||
if (GET_CODE (current_sym_addr) == SYMBOL_REF
|
||||
&& CONSTANT_POOL_ADDRESS_P (current_sym_addr))
|
||||
{
|
||||
bool marked;
|
||||
rtx tmp = get_pool_constant_mark (current_sym_addr, &marked);
|
||||
|
||||
if (GET_CODE (tmp) == SYMBOL_REF)
|
||||
{
|
||||
current_sym_addr = tmp;
|
||||
if (CONSTANT_POOL_ADDRESS_P (current_sym_addr))
|
||||
get_pool_constant_mark (current_sym_addr, &marked);
|
||||
else
|
||||
marked = true;
|
||||
}
|
||||
else if (GET_CODE (tmp) == LABEL_REF)
|
||||
{
|
||||
current_sym_addr = tmp;
|
||||
marked = true;
|
||||
}
|
||||
|
||||
/* If all references to the constant pool were optimized
|
||||
out, we just ignore the symbol. */
|
||||
if (!marked)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Ultrix `as' seems to need this. */
|
||||
#ifdef DBX_STATIC_STAB_DATA_SECTION
|
||||
data_section ();
|
||||
@ -3037,6 +3045,46 @@ dbxout_args (tree args)
|
||||
}
|
||||
}
|
||||
|
||||
/* Subroutine of dbxout_block. Emit an N_LBRAC stab referencing LABEL.
|
||||
BEGIN_LABEL is the name of the beginning of the function, which may
|
||||
be required. */
|
||||
static void
|
||||
dbx_output_lbrac (const char *label,
|
||||
const char *begin_label ATTRIBUTE_UNUSED)
|
||||
{
|
||||
#ifdef DBX_OUTPUT_LBRAC
|
||||
DBX_OUTPUT_LBRAC (asmfile, label);
|
||||
#else
|
||||
fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_LBRAC);
|
||||
assemble_name (asmfile, label);
|
||||
#if DBX_BLOCKS_FUNCTION_RELATIVE
|
||||
putc ('-', asmfile);
|
||||
assemble_name (asmfile, begin_label);
|
||||
#endif
|
||||
fprintf (asmfile, "\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Subroutine of dbxout_block. Emit an N_RBRAC stab referencing LABEL.
|
||||
BEGIN_LABEL is the name of the beginning of the function, which may
|
||||
be required. */
|
||||
static void
|
||||
dbx_output_rbrac (const char *label,
|
||||
const char *begin_label ATTRIBUTE_UNUSED)
|
||||
{
|
||||
#ifdef DBX_OUTPUT_RBRAC
|
||||
DBX_OUTPUT_RBRAC (asmfile, label);
|
||||
#else
|
||||
fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_RBRAC);
|
||||
assemble_name (asmfile, label);
|
||||
#if DBX_BLOCKS_FUNCTION_RELATIVE
|
||||
putc ('-', asmfile);
|
||||
assemble_name (asmfile, begin_label);
|
||||
#endif
|
||||
fprintf (asmfile, "\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Output everything about a symbol block (a BLOCK node
|
||||
that represents a scope level),
|
||||
including recursive output of contained blocks.
|
||||
@ -3057,15 +3105,11 @@ dbxout_args (tree args)
|
||||
static void
|
||||
dbxout_block (tree block, int depth, tree args)
|
||||
{
|
||||
int blocknum = -1;
|
||||
|
||||
#if DBX_BLOCKS_FUNCTION_RELATIVE
|
||||
const char *begin_label;
|
||||
if (current_function_func_begin_label != NULL_TREE)
|
||||
begin_label = IDENTIFIER_POINTER (current_function_func_begin_label);
|
||||
else
|
||||
begin_label = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
|
||||
#endif
|
||||
|
||||
while (block)
|
||||
{
|
||||
@ -3073,6 +3117,7 @@ dbxout_block (tree block, int depth, tree args)
|
||||
if (TREE_USED (block) && TREE_ASM_WRITTEN (block))
|
||||
{
|
||||
int did_output;
|
||||
int blocknum = BLOCK_NUMBER (block);
|
||||
|
||||
/* In dbx format, the syms of a block come before the N_LBRAC.
|
||||
If nothing is output, we don't need the N_LBRAC, either. */
|
||||
@ -3086,11 +3131,20 @@ dbxout_block (tree block, int depth, tree args)
|
||||
the block. Use the block's tree-walk order to generate
|
||||
the assembler symbols LBBn and LBEn
|
||||
that final will define around the code in this block. */
|
||||
if (depth > 0 && did_output)
|
||||
if (did_output)
|
||||
{
|
||||
char buf[20];
|
||||
blocknum = BLOCK_NUMBER (block);
|
||||
ASM_GENERATE_INTERNAL_LABEL (buf, "LBB", blocknum);
|
||||
const char *scope_start;
|
||||
|
||||
if (depth == 0)
|
||||
/* The outermost block doesn't get LBB labels; use
|
||||
the function symbol. */
|
||||
scope_start = begin_label;
|
||||
else
|
||||
{
|
||||
ASM_GENERATE_INTERNAL_LABEL (buf, "LBB", blocknum);
|
||||
scope_start = buf;
|
||||
}
|
||||
|
||||
if (BLOCK_HANDLER_BLOCK (block))
|
||||
{
|
||||
@ -3100,44 +3154,30 @@ dbxout_block (tree block, int depth, tree args)
|
||||
{
|
||||
fprintf (asmfile, "%s\"%s:C1\",%d,0,0,", ASM_STABS_OP,
|
||||
IDENTIFIER_POINTER (DECL_NAME (decl)), N_CATCH);
|
||||
assemble_name (asmfile, buf);
|
||||
assemble_name (asmfile, scope_start);
|
||||
fprintf (asmfile, "\n");
|
||||
decl = TREE_CHAIN (decl);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DBX_OUTPUT_LBRAC
|
||||
DBX_OUTPUT_LBRAC (asmfile, buf);
|
||||
#else
|
||||
fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_LBRAC);
|
||||
assemble_name (asmfile, buf);
|
||||
#if DBX_BLOCKS_FUNCTION_RELATIVE
|
||||
putc ('-', asmfile);
|
||||
assemble_name (asmfile, begin_label);
|
||||
#endif
|
||||
fprintf (asmfile, "\n");
|
||||
#endif
|
||||
dbx_output_lbrac (scope_start, begin_label);
|
||||
}
|
||||
|
||||
/* Output the subblocks. */
|
||||
dbxout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE);
|
||||
|
||||
/* Refer to the marker for the end of the block. */
|
||||
if (depth > 0 && did_output)
|
||||
if (did_output)
|
||||
{
|
||||
char buf[20];
|
||||
ASM_GENERATE_INTERNAL_LABEL (buf, "LBE", blocknum);
|
||||
#ifdef DBX_OUTPUT_RBRAC
|
||||
DBX_OUTPUT_RBRAC (asmfile, buf);
|
||||
#else
|
||||
fprintf (asmfile, "%s%d,0,0,", ASM_STABN_OP, N_RBRAC);
|
||||
assemble_name (asmfile, buf);
|
||||
#if DBX_BLOCKS_FUNCTION_RELATIVE
|
||||
putc ('-', asmfile);
|
||||
assemble_name (asmfile, begin_label);
|
||||
#endif
|
||||
fprintf (asmfile, "\n");
|
||||
#endif
|
||||
char buf[100];
|
||||
if (depth == 0)
|
||||
/* The outermost block doesn't get LBE labels;
|
||||
use the "scope" label which will be emitted
|
||||
by dbxout_function_end. */
|
||||
ASM_GENERATE_INTERNAL_LABEL (buf, "Lscope", scope_labelno);
|
||||
else
|
||||
ASM_GENERATE_INTERNAL_LABEL (buf, "LBE", blocknum);
|
||||
|
||||
dbx_output_rbrac (buf, begin_label);
|
||||
}
|
||||
}
|
||||
block = BLOCK_CHAIN (block);
|
||||
|
@ -2910,11 +2910,19 @@ get_first_nonnote_insn (void)
|
||||
{
|
||||
rtx insn = first_insn;
|
||||
|
||||
while (insn)
|
||||
if (insn)
|
||||
{
|
||||
insn = next_insn (insn);
|
||||
if (insn == 0 || GET_CODE (insn) != NOTE)
|
||||
break;
|
||||
if (NOTE_P (insn))
|
||||
for (insn = next_insn (insn);
|
||||
insn && NOTE_P (insn);
|
||||
insn = next_insn (insn))
|
||||
continue;
|
||||
else
|
||||
{
|
||||
if (GET_CODE (insn) == INSN
|
||||
&& GET_CODE (PATTERN (insn)) == SEQUENCE)
|
||||
insn = XVECEXP (PATTERN (insn), 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return insn;
|
||||
@ -2928,11 +2936,20 @@ get_last_nonnote_insn (void)
|
||||
{
|
||||
rtx insn = last_insn;
|
||||
|
||||
while (insn)
|
||||
if (insn)
|
||||
{
|
||||
insn = previous_insn (insn);
|
||||
if (insn == 0 || GET_CODE (insn) != NOTE)
|
||||
break;
|
||||
if (NOTE_P (insn))
|
||||
for (insn = previous_insn (insn);
|
||||
insn && NOTE_P (insn);
|
||||
insn = previous_insn (insn))
|
||||
continue;
|
||||
else
|
||||
{
|
||||
if (GET_CODE (insn) == INSN
|
||||
&& GET_CODE (PATTERN (insn)) == SEQUENCE)
|
||||
insn = XVECEXP (PATTERN (insn), 0,
|
||||
XVECLEN (PATTERN (insn), 0) - 1);
|
||||
}
|
||||
}
|
||||
|
||||
return insn;
|
||||
|
@ -415,9 +415,9 @@ typedef __WINT_TYPE__ wint_t;
|
||||
#else
|
||||
/* The cast to "char &" below avoids problems with user-defined
|
||||
"operator &", which can appear in a POD type. */
|
||||
#define offsetof(TYPE, MEMBER) \
|
||||
(__offsetof__ (reinterpret_cast <size_t> \
|
||||
(&reinterpret_cast <char &> \
|
||||
#define offsetof(TYPE, MEMBER) \
|
||||
(__offsetof__ (reinterpret_cast <size_t> \
|
||||
(&reinterpret_cast <const volatile char &> \
|
||||
(static_cast<TYPE *> (0)->MEMBER))))
|
||||
#endif /* C++ */
|
||||
#endif /* _STDDEF_H was defined this time */
|
||||
|
@ -73,7 +73,7 @@ __negdi2 (DWtype u)
|
||||
|
||||
#ifdef L_addvsi3
|
||||
Wtype
|
||||
__addvsi3 (Wtype a, Wtype b)
|
||||
__addvSI3 (Wtype a, Wtype b)
|
||||
{
|
||||
const Wtype w = a + b;
|
||||
|
||||
@ -82,11 +82,23 @@ __addvsi3 (Wtype a, Wtype b)
|
||||
|
||||
return w;
|
||||
}
|
||||
#ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC
|
||||
SItype
|
||||
__addvsi3 (SItype a, SItype b)
|
||||
{
|
||||
const SItype w = a + b;
|
||||
|
||||
if (b >= 0 ? w < a : w > a)
|
||||
abort ();
|
||||
|
||||
return w;
|
||||
}
|
||||
#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */
|
||||
#endif
|
||||
|
||||
#ifdef L_addvdi3
|
||||
DWtype
|
||||
__addvdi3 (DWtype a, DWtype b)
|
||||
__addvDI3 (DWtype a, DWtype b)
|
||||
{
|
||||
const DWtype w = a + b;
|
||||
|
||||
@ -99,20 +111,32 @@ __addvdi3 (DWtype a, DWtype b)
|
||||
|
||||
#ifdef L_subvsi3
|
||||
Wtype
|
||||
__subvsi3 (Wtype a, Wtype b)
|
||||
__subvSI3 (Wtype a, Wtype b)
|
||||
{
|
||||
const DWtype w = a - b;
|
||||
const Wtype w = a - b;
|
||||
|
||||
if (b >= 0 ? w > a : w < a)
|
||||
abort ();
|
||||
|
||||
return w;
|
||||
}
|
||||
#ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC
|
||||
SItype
|
||||
__subvsi3 (SItype a, SItype b)
|
||||
{
|
||||
const SItype w = a - b;
|
||||
|
||||
if (b >= 0 ? w > a : w < a)
|
||||
abort ();
|
||||
|
||||
return w;
|
||||
}
|
||||
#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */
|
||||
#endif
|
||||
|
||||
#ifdef L_subvdi3
|
||||
DWtype
|
||||
__subvdi3 (DWtype a, DWtype b)
|
||||
__subvDI3 (DWtype a, DWtype b)
|
||||
{
|
||||
const DWtype w = a - b;
|
||||
|
||||
@ -126,22 +150,34 @@ __subvdi3 (DWtype a, DWtype b)
|
||||
#ifdef L_mulvsi3
|
||||
#define WORD_SIZE (sizeof (Wtype) * BITS_PER_UNIT)
|
||||
Wtype
|
||||
__mulvsi3 (Wtype a, Wtype b)
|
||||
__mulvSI3 (Wtype a, Wtype b)
|
||||
{
|
||||
const DWtype w = (DWtype) a * (DWtype) b;
|
||||
|
||||
if (((a >= 0) == (b >= 0))
|
||||
? (UDWtype) w > (UDWtype) (((DWtype) 1 << (WORD_SIZE - 1)) - 1)
|
||||
: (UDWtype) w < (UDWtype) ((DWtype) -1 << (WORD_SIZE - 1)))
|
||||
if ((Wtype) (w >> WORD_SIZE) != (Wtype) w >> (WORD_SIZE - 1))
|
||||
abort ();
|
||||
|
||||
return w;
|
||||
}
|
||||
#ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC
|
||||
#undef WORD_SIZE
|
||||
#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
|
||||
SItype
|
||||
__mulvsi3 (SItype a, SItype b)
|
||||
{
|
||||
const DItype w = (DItype) a * (DItype) b;
|
||||
|
||||
if ((SItype) (w >> WORD_SIZE) != (SItype) w >> (WORD_SIZE-1))
|
||||
abort ();
|
||||
|
||||
return w;
|
||||
}
|
||||
#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */
|
||||
#endif
|
||||
|
||||
#ifdef L_negvsi2
|
||||
Wtype
|
||||
__negvsi2 (Wtype a)
|
||||
__negvSI2 (Wtype a)
|
||||
{
|
||||
const Wtype w = -a;
|
||||
|
||||
@ -150,11 +186,23 @@ __negvsi2 (Wtype a)
|
||||
|
||||
return w;
|
||||
}
|
||||
#ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC
|
||||
SItype
|
||||
__negvsi2 (SItype a)
|
||||
{
|
||||
const SItype w = -a;
|
||||
|
||||
if (a >= 0 ? w > 0 : w < 0)
|
||||
abort ();
|
||||
|
||||
return w;
|
||||
}
|
||||
#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */
|
||||
#endif
|
||||
|
||||
#ifdef L_negvdi2
|
||||
DWtype
|
||||
__negvdi2 (DWtype a)
|
||||
__negvDI2 (DWtype a)
|
||||
{
|
||||
const DWtype w = -a;
|
||||
|
||||
@ -167,10 +215,28 @@ __negvdi2 (DWtype a)
|
||||
|
||||
#ifdef L_absvsi2
|
||||
Wtype
|
||||
__absvsi2 (Wtype a)
|
||||
__absvSI2 (Wtype a)
|
||||
{
|
||||
Wtype w = a;
|
||||
|
||||
if (a < 0)
|
||||
#ifdef L_negvsi2
|
||||
w = __negvSI2 (a);
|
||||
#else
|
||||
w = -a;
|
||||
|
||||
if (w < 0)
|
||||
abort ();
|
||||
#endif
|
||||
|
||||
return w;
|
||||
}
|
||||
#ifdef COMPAT_SIMODE_TRAPPING_ARITHMETIC
|
||||
SItype
|
||||
__absvsi2 (SItype a)
|
||||
{
|
||||
SItype w = a;
|
||||
|
||||
if (a < 0)
|
||||
#ifdef L_negvsi2
|
||||
w = __negvsi2 (a);
|
||||
@ -183,17 +249,18 @@ __absvsi2 (Wtype a)
|
||||
|
||||
return w;
|
||||
}
|
||||
#endif /* COMPAT_SIMODE_TRAPPING_ARITHMETIC */
|
||||
#endif
|
||||
|
||||
#ifdef L_absvdi2
|
||||
DWtype
|
||||
__absvdi2 (DWtype a)
|
||||
__absvDI2 (DWtype a)
|
||||
{
|
||||
DWtype w = a;
|
||||
|
||||
if (a < 0)
|
||||
#ifdef L_negvdi2
|
||||
w = __negvdi2 (a);
|
||||
w = __negvDI2 (a);
|
||||
#else
|
||||
w = -a;
|
||||
|
||||
@ -208,7 +275,7 @@ __absvdi2 (DWtype a)
|
||||
#ifdef L_mulvdi3
|
||||
#define WORD_SIZE (sizeof (Wtype) * BITS_PER_UNIT)
|
||||
DWtype
|
||||
__mulvdi3 (DWtype u, DWtype v)
|
||||
__mulvDI3 (DWtype u, DWtype v)
|
||||
{
|
||||
/* The unchecked multiplication needs 3 Wtype x Wtype multiplications,
|
||||
but the checked multiplication needs only two. */
|
||||
|
@ -2144,12 +2144,15 @@ operands_match_p (rtx x, rtx y)
|
||||
j = REGNO (y);
|
||||
|
||||
/* On a WORDS_BIG_ENDIAN machine, point to the last register of a
|
||||
multiple hard register group, so that for example (reg:DI 0) and
|
||||
(reg:SI 1) will be considered the same register. */
|
||||
multiple hard register group of scalar integer registers, so that
|
||||
for example (reg:DI 0) and (reg:SI 1) will be considered the same
|
||||
register. */
|
||||
if (WORDS_BIG_ENDIAN && GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD
|
||||
&& SCALAR_INT_MODE_P (GET_MODE (x))
|
||||
&& i < FIRST_PSEUDO_REGISTER)
|
||||
i += HARD_REGNO_NREGS (i, GET_MODE (x)) - 1;
|
||||
if (WORDS_BIG_ENDIAN && GET_MODE_SIZE (GET_MODE (y)) > UNITS_PER_WORD
|
||||
&& SCALAR_INT_MODE_P (GET_MODE (y))
|
||||
&& j < FIRST_PSEUDO_REGISTER)
|
||||
j += HARD_REGNO_NREGS (j, GET_MODE (y)) - 1;
|
||||
|
||||
@ -3061,6 +3064,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
|
||||
{
|
||||
/* Operands don't match. */
|
||||
rtx value;
|
||||
int loc1, loc2;
|
||||
/* Retroactively mark the operand we had to match
|
||||
as a loser, if it wasn't already. */
|
||||
if (this_alternative_win[m])
|
||||
@ -3069,12 +3073,26 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
|
||||
if (this_alternative[m] == (int) NO_REGS)
|
||||
bad = 1;
|
||||
/* But count the pair only once in the total badness of
|
||||
this alternative, if the pair can be a dummy reload. */
|
||||
this alternative, if the pair can be a dummy reload.
|
||||
The pointers in operand_loc are not swapped; swap
|
||||
them by hand if necessary. */
|
||||
if (swapped && i == commutative)
|
||||
loc1 = commutative + 1;
|
||||
else if (swapped && i == commutative + 1)
|
||||
loc1 = commutative;
|
||||
else
|
||||
loc1 = i;
|
||||
if (swapped && m == commutative)
|
||||
loc2 = commutative + 1;
|
||||
else if (swapped && m == commutative + 1)
|
||||
loc2 = commutative;
|
||||
else
|
||||
loc2 = m;
|
||||
value
|
||||
= find_dummy_reload (recog_data.operand[i],
|
||||
recog_data.operand[m],
|
||||
recog_data.operand_loc[i],
|
||||
recog_data.operand_loc[m],
|
||||
recog_data.operand_loc[loc1],
|
||||
recog_data.operand_loc[loc2],
|
||||
operand_mode[i], operand_mode[m],
|
||||
this_alternative[m], -1,
|
||||
this_alternative_earlyclobber[m]);
|
||||
|
Loading…
Reference in New Issue
Block a user