* c-common.c (STDC_0_IN_SYSTEM_HEADERS, REGISTER_PREFIX):
Default-define here.
(builtin_define_with_value): Can now wrap the expansion in
quotation marks if such is wanted.
(cb_register_builtins): Update calls to builtin_define_with_value.
Define __REGISTER_PREFIX__, __USER_LABEL_PREFIX__, and __VERSION__
here.
(c_common_init): Set options->stdc_0_in_system_headers.
* c-lex.h: Update prototype of builtin_define_with_value.
* cppdefault.h: Remove default definitions of USER_LABEL_PREFIX
and REGISTER_PREFIX.
* cppinit.c (VERS, ULP, C, X): Kill.
(builtin_array): Remove entries for __VERSION__,
__USER_LABEL_PREFIX__, __REGISTER_PREFIX__, and
__HAVE_BUILTIN_SETJMP__. Make __STDC__ always a builtin, not
a constant.
(init_builtins): Kill off a bunch of now-dead code.
(COMMAND_LINE_OPTIONS): Remove -fleading-underscore and
-fno-leading-underscore.
(cpp_handle_option): Remove code to set user_label_prefix.
(cpp_post_options): Likewise.
* cpplib.h (struct cpp_options): Remove user_label_prefix.
(stdc_0_in_system_headers): New.
* cppmacro.c (builtin_macro): Check CPP_OPTION (pfile,
stdc_0_in_system_headers) too to decide the value of __STDC__.
* tradcpp.c (user_label_prefix): Kill.
(main): Remove code handling -f(no-)leading-underscore.
(initialize_builtins): Don't define __REGISTER_PREFIX__
or __USER_LABEL_PREFIX__.
(install_value): Wrap compound statement in dummy loop so the
macro works properly in an if statement.
Janis Johnson [Thu, 16 May 2002 18:37:06 +0000 (18:37 +0000)]
loop.h (struct loop_info): Add member has_prefetch.
* loop.h (struct loop_info): Add member has_prefetch.
* loop.c (PREFETCH_CONDITIONAL): Change default to 1.
(prescan_loop): Initialize has_prefetch.
(struct prefetch_info): Change prefetch_in_loop and
prefetch_before_loop from bit fields to ints.
(emit_prefetch_instructions): Several small fixes.
(check_dbra_loop): Don't reverse loop that uses prefetch.
Nick Clifton [Thu, 16 May 2002 15:17:41 +0000 (15:17 +0000)]
arm.c (arm_rtx_costs): Check for RTX being a SYMBOL_REF before calling CONSTANT_POOL_ADDRESS_P.
* config/arm/arm.c (arm_rtx_costs): Check for RTX being a
SYMBOL_REF before calling CONSTANT_POOL_ADDRESS_P.
(arm_adjust_cost): Check for RTX being a SYMBOL_REF before
calling CONSTANT_POOL_ADDRESS_P.
* config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Fix typo in code
to decide whether to define __arm__ or __thumb.
(THUMB_GO_IF_LEGITIMATE_ADDRESS): Check for RTX being a
SYMBOL_REF before calling CONSTANT_POOL_ADDRESS_P.
re PR c++/6620 (partial template specialization on int)
PR c++/6620
* pt.c (verify_class_unification): Don't check if PARM is template
parameter dependent. Simplify.
(unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
parameter dependent expression.
* cp/rtti.c (get_tinfo_decl): Don't call comdat_linkage.
Do set DECL_COMDAT.
(synthesize_tinfo_var): Take the public decl.
(create_real_tinfo_var): Likewise. Check DECL_COMDAT.
(emit_tinfo_decl): Adjust. Call import_export_decl.
* cp/decl2.c (import_export_decl): Simplify tinfo decl handling.
* config/mips/mips.c (mips_output_external): Don't do sdata
optimization for a variable with DECL_COMDAT set.
Aldy Hernandez [Thu, 16 May 2002 01:12:42 +0000 (01:12 +0000)]
altivec.h: Cleanups for tighter typechecking.
2002-05-15 Aldy Hernandez <aldyh@redhat.com>
* config/rs6000/altivec.h: Cleanups for tighter typechecking.
Cleanups for accepting modifiers on pointers.
Fix predicate typos.
Allow long pointers as well as int pointers.
2002-05-15 Eric Botcazou <ebotcazou@multimania.com>
* fold-const.c (fold) [LT_EXPR]: Move the transformation of a
comparison against the highest or lowest integer value before
the 'X >= CST to X > (CST - 1)' and 'X < CST to X <= (CST - 1)'
transformation and that of an unsigned comparison against 0
right after.
varasm.c (merge_weak): Error for any weakening after definition.
* varasm.c (merge_weak): Error for any weakening after definition.
Adjust weakening after use warning to catch more cases.
(assemble_alias): Set TREE_USED and TREE_ASM_WRITTEN consistently.
* config/alpha/alpha.c (alpha_encode_section_info): Do not abort.
* gcc.dg/weak-5.c (vfoo1c): No warning here.
(vfoo1f): Warning here.
(vfoo1l): Don't redefine the alias.
* dwarf2out.c (output_call_frame_info): Do not skip unwind info
when flag_asynchronous_unwind_tables is set.
* flags.h (flag_reorder_functions): Declare.
* function.c (prepare_function_start): Initialize frequnecy.
* params.def (HOT_BB_COUNT_FRACTION, HOT_BB_FREQUENCY_FRACTION): New paramters.
* Makefile.in (predict.o): Add dependency on target.h and params.h
* defaults.h (HOT_TEXT_SECTION_NAME,
UNLIKELY_EXECUTED_TEXT_SECTION_NAME): New macros.
* predict.c (choose_function_section): New function.
(estimate_bb_frequencies): Use it.
* toplev.c (flag_reorder_functions): New global variable.
(lang_independent_options): New.
(parse_options_and_default_flags): Set.
* varasm.c (assemble_start_function): Bypass functdion alignment
for never executed functions.
* invoke.texi (-freorder-blocks, -freorder-functions): Document.
(param hot-bb-count-fraction, hot-bb-frequency-fraction): New.
* tm.texi (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME):
Document.
Thu Jan 3 21:52:09 CET 2002 Jan Hubicka <jh@suse.cz>
* predict.c: Inlude profile.h
(MIN_COUNT): Rename to MIN_COUNT_FRACTION
(maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p):
Use the information about maximal counter in the program.
Thu Dec 20 22:14:00 CET 2001 Jan Hubicka <jh@suse.cz>
* basic-block.h (maybe_hot_bb_p, probably_cold_bb_p,
probably_never_executed_bb_p): New functions.
* cfgcleanup.c (outgoing_edges_match): Use them.
* predict.c (MIN_COUNT, MIN_FREQUENCY): New macros.
(maybe_hot_bb_p, probably_cold_bb_p,
probably_never_executed_bb_p): New functions.
* function.h (function): Add new field function_frequency.
* predict.c (compute_function_frequency): New function.
(estimate_probability): Call it.
Zack Weinberg [Wed, 15 May 2002 05:30:01 +0000 (05:30 +0000)]
c-parse.in (MODIFIED_WCHAR_TYPE): New macro.
* c-parse.in (MODIFIED_WCHAR_TYPE): New macro.
(c_common_nodes_and_builtins): Use it.
(builtin_define_with_value): New function.
(cb_register_builtins): Define __SIZE_TYPE__,
__PTRDIFF_TYPE__, __WCHAR_TYPE__, and __WINT_TYPE__ here,
using builtin_define_with_value. Use consistent notation when
defining __GXX_WEAK__.
(WCHAR_TYPE_SIZE): Don't redefine.
(combine_strings): Don't use WCHAR_TYPE_SIZE.
* cppdefault.h: Don't provide defaults for SIZE_TYPE,
PTRDIFF_TYPE, WCHAR_TYPE, or WINT_TYPE.
* cppinit.c (builtin_array): Remove entries for __SIZE_TYPE__ etc.
* tradcpp.c (initialize_builtins): Likewise.
* gcc.c (cpp_unique_options): Don't muck with __WCHAR_TYPE__.
* c-lex.h (builtin_define_with_value): Prototype.
* system.h: Poison NO_BUILTIN_SIZE_TYPE, NO_BUILTIN_WCHAR_TYPE,
NO_BUILTIN_PTRDIFF_TYPE, and NO_BUILTIN_WINT_TYPE.
* doc/tm.texi: Remove mention of NO_BUILTIN_SIZE_TYPE etc.
* config/avr/avr.h, config/h8300/h8300.h, config/i386/i386.h,
config/ia64/ia64.h, config/mips/dec-osf1.h, config/mips/iris6.h,
config/mips/linux.h, config/mips/mips.h, config/mips/netbsd.h,
config/mips/osfrose.h, config/mips/sni-svr4.h, config/rs6000/aix51.h,
config/s390/linux.h, config/sh/sh.h, config/sh/sh64.h,
config/sparc/linux64.h, config/sparc/netbsd-elf.h,
config/sparc/sol2-bi.h, config/sparc/sparc.h:
Do not define NO_BUILTIN_SIZE_TYPE etc. Remove all references
to __SIZE_TYPE__ etc from all spec strings. When this makes
extra specs empty, delete them.
* cp-tree.h (struct lang_type): Added non_zero_init.
(CLASS_NON_ZERO_INIT_P): New macro.
(zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
* class.c (check_field_decls): Test non_zero_init.
* cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
zero-to-NULL conversions.
* decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
type that needs zero-initialization without zeros.
(check_initializer_decl): Compute zero-initializer for types
that require a non-trivial one.
* init.c (build_forced_zero_init): New function.
(build_default_init): Use it.
* tree.c (zero_init_p): New function.
* typeck2.c (force_store_init_value): New function.
(process_init_constructor): Create non-trivial zero-initializers
for array members and class fields.
Neil Booth [Tue, 14 May 2002 17:12:16 +0000 (17:12 +0000)]
gcc.c (cpp_options): Must pass -m* and -f* options to the front end even when only preprocessing.
* gcc.c (cpp_options): Must pass -m* and -f* options
to the front end even when only preprocessing.
(cc1_options): Remove redundant -lang-c.
* tradcpp.c (main): Ignore -m options.
cp:
* lang-specs.h: Remove redundant -lang-c++.
objc:
* lang-specs.h: Similarly.
Gerald Pfeifer [Tue, 14 May 2002 09:14:50 +0000 (11:14 +0200)]
install.texi (Specific, [...]): Update passus on setting CONFIG_SHELL to /bin/ksh and remove alternate trick to...
* doc/install.texi (Specific, *-*-solaris2*): Update passus on
setting CONFIG_SHELL to /bin/ksh and remove alternate trick to
(possibly) work around broken /bin/sh.
Andreas Schwab [Tue, 14 May 2002 08:35:59 +0000 (08:35 +0000)]
varasm.c (resolve_unique_section): Add third parameter flag_function_or_data_sections and use it instead of...
* varasm.c (resolve_unique_section): Add third parameter
flag_function_or_data_sections and use it instead of
flag_function_sections.
(assemble_start_function): Pass flag_function_sections.
(asm_emit_uninitialised): Pass flag_data_sections.
(assemble_variable): Likewise.
Jeff Law [Tue, 14 May 2002 04:15:57 +0000 (22:15 -0600)]
flow.c (invalidate_mems_from_autoinc): Rewrite to use for_each_rtx.
* flow.c (invalidate_mems_from_autoinc): Rewrite to use for_each_rtx.
Update prototype and callers.
(propagate_one_insn): Stack pointer adjustments kill MEMs on
the mem_set_list which reference the stack pointer, as do
calls to constant functions as they may clobber outgoing
argument space.
Tom Tromey [Mon, 13 May 2002 20:10:37 +0000 (20:10 +0000)]
re PR libgcj/6389 (System.getProperty("") should always throw an IllegalArgumentException)
Fixes PR libgcj/6389:
* Makefile.in: Rebuilt.
* Makefile.am (nat_source_files): Added natTimeZone.cc.
* java/util/natTimeZone.cc: New file.
* java/util/TimeZone.java (getDefaultTimeZoneId): New method.
* java/lang/System.java: Merged with Classpath.
* java/lang/Runtime.java: Merged with Classpath.
* java/lang/natSystem.cc (setErr0): Renamed from setErr; don't run
security check.
(setIn0): Renamed from setIn; don't run security check.
(setOut0): Renamed from setOut; don't run security check.
(file_encoding, getpwuid_adaptor, getSystemTimeZone,
init_properties): Moved to natRuntime.cc.
Moved many includes to natRuntime.cc.
(isWordsBigEndian): New method.
* java/lang/natRuntime.cc: Include Long.h, also other includes
previously in natSystem.cc.
(maxMemory): New function.
(exitInternal): Renamed from `_exit'.
(exit): Removed.
(init): Don't set finalize_on_exit.
(exitInternal): Use `finalizeOnExit'.
(file_encoding, getpwuid_adaptor): New functions from
natSystem.cc.
(insertSystemProperties): New method, renamed from
System::init_properties. Don't set user.timezone.
(_load): Don't call checkLink.
(execInternal): New method.
(availableProcessors): Likewise.
(nativeGetLibname): Likewise.
Kaveh R. Ghazi [Mon, 13 May 2002 13:52:08 +0000 (13:52 +0000)]
ctype_inline.h (scan_is, scan_not): Fix typo, use this->is() rather than manually (and perhaps incorrectly) inlining it.
* config/os/irix/irix5.2/bits/ctype_inline.h (scan_is, scan_not):
Fix typo, use this->is() rather than manually (and perhaps
incorrectly) inlining it.
* config/os/irix/irix6.5/bits/ctype_inline.h (scan_is, scan_not):
Likewise.
* testsuite/22_locale/ctype_scan_char.cc: New file.
Paolo Carlini [Mon, 13 May 2002 12:31:50 +0000 (14:31 +0200)]
2002-05-13 Paolo Carlini <pcarlini@unitus.it>
Jakub Jelinek <jakub@redhat.com>
* testsuite/22_locale/money_get_members_char.cc
(test01, test02, test04): Use the de_DE@euro named locale
instead of de_DE to allow for an uniform behaviour with
both old and Euro-era localedata; tweak some tests.
* testsuite/22_locale/money_get_members_wchar_t.cc
(test01, test02, test04): Likewise.
* testsuite/22_locale/money_put_members_char.cc
(test01, test02, test04): Likewise.
* testsuite/22_locale/money_put_members_wchar_t.cc
(test01, test02, test04): Likewise.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r53420
* rtti.c (emit_tinfo_decl): Call import_export_decl.
* decl2.c (import_export_decl): Set DECL_NOT_REALLY_EXTERN on
tinfo decls by default. Don't mess with the builtins.
Jason Merrill [Mon, 13 May 2002 08:00:48 +0000 (04:00 -0400)]
class.c (build_vtbl_ref_1): Use fixed_type_or_null.
* class.c (build_vtbl_ref_1): Use fixed_type_or_null.
(fixed_type_or_null): See through reference vars.
(build_base_path): Vtable contents are constant.
* typeck.c (get_member_function_from_ptrfunc): Likewise.
* rtti.c (emit_tinfo_decl): Call import_export_decl.
* decl2.c (import_export_decl): Set DECL_NOT_REALLY_EXTERN on
tinfo decls by default. Don't mess with the builtins.
Zack Weinberg [Mon, 13 May 2002 04:50:20 +0000 (04:50 +0000)]
emit-rtl.c (global_rtl): Update comment.
* emit-rtl.c (global_rtl): Update comment.
(const_double_htab, const_double_htab_hash,
const_double_htab_hash, lookup_const_double): New.
(const_int_htab_hash, const_int_htab_eq): Remove const
qualifiers, which cause tons of warnings with RTL checking on.
(gen_rtx_CONST_DOUBLE): Deleted.
(const_double_from_real_value): New function - bears some
resemblance to the former immed_real_const_1.
(immed_double_const): Moved here from varasm.c and
simplified.
(gen_rtx_REG): Make REGNO unsigned to squelch warnings.
(gen_rtx_SUBREG): Use gen_rtx_raw_SUBREG.
(gen_rtx): Use immed_double_const.
(init_emit_once): Initialize the const_double_htab. Use
REAL_VALUE_FROM_INT where possible. Can now use
CONST_DOUBLE_FROM_REAL_VALUE when setting up const_tiny_rtx.
* varasm.c (struct varasm_status): Remove x_const_double_chain.
(const_double_chain, immed_real_const, clear_const_double_mem): Delete.
(immed_double_const, immed_real_const_1): Moved to emit-rtl.c.
(init_varasm_status, mark_varasm_status): Don't touch
x_const_double_chain.
* output.h: Delete prototype for clear_const_double_mem.
* real.h: Make REAL_VALUE_TYPE a macro again. Remove leading
'0' slot from all CONST_DOUBLE_FORMAT definitions. Prototype
const_double_from_real_value, not immed_real_const_1, and use
it to define CONST_DOUBLE_FROM_REAL_VALUE. Define new macro
CONST_DOUBLE_ATOF.
* rtl.h (CONST_DOUBLE_CHAIN): Kill.
(CONST_DOUBLE_LOW, CONST_DOUBLE_HIGH): Adjust.
(gen_rtx_CONST_DOUBLE, immed_real_const): Delete prototypes.
(gen_rtx_REG): Second arg is unsigned.
* gengenrtl.c (special_rtx): Take out CONST_DOUBLE.
(excluded_rtx): New, return true for CONST_DOUBLE.
(genmacro): Write nothing for excluded codes.
* combine.c (combine_simplify_rtx): Use CONST_DOUBLE_FROM_REAL_VALUE.
* expr.c (expand_expr): Likewise.
* ggc-common.c (ggc_mark_rtx_children_1): Don't mark the
CONST_DOUBLE_CHAIN.
* toplev.c (rest_of_compilation): Don't call
clear_const_double_mem.
* config/rs6000/rs6000.c (rs6000_float_const): Delete.
(rs6000_hash_constant): Remove CONST_DOUBLE special case.
(toc_hash_eq): Remove CONST_DOUBLE and LABEL_REF special cases.
* config/rs6000/rs6000-protos.h: Don't prototype rs6000_float_const.
* config/c4x/c4x.md, config/rs6000/rs6000.md: Use CONST_DOUBLE_ATOF.
* config/dsp16xx/dsp16xx.md, config/mips/mips.md,
config/pa/pa.md: Use CONST_DOUBLE_FROM_REAL_VALUE.
* config/sparc/sparc.md, config/sparc/sparc.c: Use immed_double_const.
Zack Weinberg [Sun, 12 May 2002 18:43:33 +0000 (18:43 +0000)]
gensupport.c (n_comma_elts): Moved here from genattrtab.c.
* gensupport.c (n_comma_elts): Moved here from genattrtab.c.
(scan_comma_elt): New function. Accepts whitespace in comma lists.
* gensupport.h: Prototype new routines.
* genattr.c (gen_attr): Use scan_comma_elt. Avoid unnecessary
use of printf.
* genattrtab.c (n_comma_elts): Moved to gensupport.c.
(next_comma_elt): Use scan_comma_elt.
* config/i386/i386.md: Use new attribute notation to break up
long lines in define_attr forms.
* expr.c (compress_float_constant): New.
(emit_move_insn): Use it.
(float_extend_from_mem): New.
(init_expr_once): Initialize it.
* real.c (exact_real_truncate): New.
* config/i386/i386.h (CONST_COSTS): Assume CONST_DOUBLE gets
dropped into memory; penalize for size.
(RTX_COSTS): FLOAT_EXTEND is free.
* config/i386/i386.md (extendsfdf2, extendsfxf2, extendsftf2,
extenddfxf2, extenddftf2): Accept constants and drop them to memory.
os_defines.h (__glibcpp_long_bits): Define to 64 for hppa 64-bit port.
* config/os/gnu-linux/bits/os_defines.h (__glibcpp_long_bits): Define
to 64 for hppa 64-bit port.
(__glibcpp_long_double_bits): Define to 64 for all hppa ports.
Zack Weinberg [Sat, 11 May 2002 16:25:05 +0000 (16:25 +0000)]
rs6000.c (rs6000_default_long_calls, [...]): New.
* config/rs6000/rs6000.c (rs6000_default_long_calls,
rs6000_longcall_switch, rs6000_set_default_type_attributes): New.
(TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): Set it.
(rs6000_override_options): Handle -m(no-)longcall.
(init_cumulative_args, output_mi_thunk): Check for both
longcall and shortcall attributes on the function.
(rs6000_attribute_table): Add "shortcall".
(rs6000_handle_longcall_attribute): Update comment.
(altivec_expand_unop_builtin, altivec_expand_binop_builtin,
altivec_expand_ternop_builtin): Add default clauses to switches
to silence warnings.
* config/rs6000/rs6000.h: Declare rs6000_longcall_switch and
rs6000_default_long_calls. Define REGISTER_TARGET_PRAGMAS.
(TARGET_OPTIONS): Add longcall and no-longcall.
* config/rs6000/rs6000.md (call_nonlocal_sysv,
call_value_nonlocal_sysv): Split by alternatives. One pair
accepts only SYMBOL_REFs and rejects if CALL_LONG is set in
the call cookie. The other pair accepts only LR/CTR and has
no restriction.
* config.gcc (rs6000-*-* | powerpc*-*-* trailer stanza):
Set c_target_objs, cxx_target_objs; add t-rs6000-c-rule to
tmake_file.
* config/rs6000/rs6000-c.c: New file.
* config/rs6000/t-rs6000-c-rule: New file.
* config/rs6000/rs6000-protos.c: Add multiple-include guard.
Prototype rs6000_pragma_longcall.