Stan Shebs [Thu, 2 Aug 2001 01:40:01 +0000 (01:40 +0000)]
darwin.c (machopic_stub_name): Try matching by name.
* config/darwin.c (machopic_stub_name): Try matching by name.
(update_stubs): New function.
(darwin_encode_section_info): Call it and update_non_lazy_ptrs
unconditionally.
Andrew MacLeod [Wed, 1 Aug 2001 21:40:43 +0000 (21:40 +0000)]
regclass.c (call_really_used_regs): New array for registers which are actually used by a call.
2001-08-01 Andrew MacLeod <amacleod@redhat.com>
* regclass.c (call_really_used_regs): New array for registers which
are actually used by a call.
(init_reg_sets_1): Initialize regs_invalidated_by_call with the
new array.
(fix_register): Set call_really_used too.
* config/ia64/ia64.h (CALL_REALLY_USED_REGISTERS): Initialize.
* doc/tm.texi (CALL_REALLY_USED_REGISTERS): Document.
Mark Kettenis [Wed, 1 Aug 2001 19:18:42 +0000 (19:18 +0000)]
unwind-pe.h (base_of_encoded_value, [...]): Define only if NO_BASE_OF_ENCODED_VALUE isn't defined.
* unwind-pe.h (base_of_encoded_value, read_encoded_value): Define
only if NO_BASE_OF_ENCODED_VALUE isn't defined.
* unwind-dw2-fde.c (NO_BASE_OF_ENCODED_VALUE): Define before
including "unwind-pe.h".
Ziemowit Laski [Wed, 1 Aug 2001 08:10:00 +0000 (08:10 +0000)]
c-parse.in (OBJC_NEED_RAW_IDENTIFIER): Define macro and flag for contextualizing Objective-C class name lookup by the...
2001-08-01 Ziemowit Laski <zlaski@apple.com>
* c-parse.in (OBJC_NEED_RAW_IDENTIFIER): Define macro and flag for
contextualizing Objective-C class name lookup by the lexer.
(typespec_reserved_nonattr): Disable ObjC class name lookup after
seeing a TYPESPEC.
(protocoldef): Add support for forward @protocol declarations.
(yylexname): Suppress ObjC class name lookup in certain contexts;
re-enable after lookup is complete.
(_yylex): Re-enable ObjC class name lookup when certain
punctuation marks are seen.
* objc/objc-act.c (check_protocol_recursively): New function used
for finding circular dependencies in protocols.
(objc_declare_protocols): New function for handling forward
@protocol declarations.
(receiver_is_class_object): Detect the case when 'self' is used
inside of a class method.
(build_message_expr): Issue a warning if class method is desired
but instance method is found instead.
(conforms_to_protocol): Streamline.
(objc_comptypes): Detect the fact that 'Bar<Foo> foo' conforms to
protocol Foo, even if 'Bar foo' does not.
(check_protocols): Streamline.
(start_protocol): Add checks for circular and duplicate protocol
definitions.
(encode_aggregate_within): For typedefs of structs, encode the
underlying struct.
* objc/objc-act.h (PROTOCOL_DEFINED): New tree accessor.
(objc_declare_protocols): New prototype.
Neil Booth [Wed, 1 Aug 2001 06:19:39 +0000 (06:19 +0000)]
cpphash.h (struct cpp_reader): New members line, pseudo_newlines.
* cpphash.h (struct cpp_reader): New members line, pseudo_newlines.
* cpplex.c (handle_newline): Update prototype. Maintain logical
line number.
(skip_escaped_newlines, skip_block_comment, parse_string):
Update accordingly.
(_cpp_lex_token): Update, and store token position within the token.
* cpplib.h (struct cpp_token): Add line and column entries.
* cppmacro.c (replace_args): Position stringified tokens correctly.
* parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
* parse.y (check_class_interface_creation): Allow `private' if the
enclosing is not an interface.
(create_interface): Interface tagged public if the enclosing
context is an interface.
(create_class): Class tagged public if the enclosing context
is an interface.
Fixes PR java/2959
Daniel Berlin [Tue, 31 Jul 2001 17:20:20 +0000 (17:20 +0000)]
PowerPC reorg and support for powerpc64-*-linux*.
2001-07-31 Daniel Berlin <dan@cgsoftware.com>
PowerPC reorg and support for powerpc64-*-linux*.
Also fixes emitting of constants on 32 bit and 64 bit
platforms.
* config.gcc: powerpc64-*-linux* is a new target.
Things that needed aix.h now also include xcoff.h
* config/rs6000/rs6000.h: Split XCOFF specific stuff into
xcoff.h.
Move AIX specific stuff into aix.h.
(ASM_LONG): Use DOUBLE_INT_ASM_OP if we are on a 64 bit target.
(ASM_OUTPUT_DOUBLE_INT): Ditto.
(TARGET_AIX): Renamed to TARGET_XCOFF, since the AIX ABI is used
with more than just XCOFF now.
(SET_ASM_OP): Remove, now defined where needed.
(FUNCTION_PROLOGUE): New macro definition.
(FUNCTION_EPILOGUE): New macro definition.
(CONST_OK_FOR_LETTER_P): Change N to require that value is
positive, too.
(ASM_OPEN_PAREN, ASM_CLOSE_PAREN): New macro definition.
(PREDICATE_CODES): Added exact_log2_cint_operand,
reg_or_add_cint64_operand, reg_or_sub_cint64_operand.
* config/rs6000/rs6000.c: #ifdef XCOFF debugging info stuff on
XCOFF_DEBUGGING_INFO.
Use DOUBLE_INT_ASM_OP where approriate.
(rs6000_emit_set_long_const): New function.
(rs6000_emit_set_const): New function.
(reg_or_sub_cint64_operand): New function.
(reg_or_add_cint64_operand): New function.
(exact_log2_cint_operand): New function.
* config/rs6000/rs6000.md: Fix emitting of constants.
Fix patterns that were AIX ABI specific, but depended on
!TARGET_ELF (instead of DEFAULT_ABI == ABI_AIX).
cp:
The 3.0 ABI no longer has vbase pointer fields.
* cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
FORMAT_VBASE_NAME): Remove.
* method.c (do_build_copy_constructor): Adjust.
(do_build_assign_ref): Adjust.
* search.c (lookup_field_r): Adjust.
* typeck.c (build_component_ref): Adjust.
The 3.0 ABI always has a vtable pointer at the start of every
polymorphic class.
* rtti.c (build_headof_sub): Remove.
(build_headof): Adjust.
(get_tinfo_decl_dynamic): No need to check flag_rtti
here. Adjust.
(create_real_tinfo_var): Explain why we need a hidden name.
re PR c++/3631 (another linking problem with virtual derivation)
cp:
PR c++/3631
* class.c (update_vtable_entry_for_fn): The fixed adjustment
of a virtual thunk should be from declaring base.
testsuite:
* g++.dg/abi/vthunk1.C: New test.
class.c (dfs_ctor_vtable_bases_queue_p): Always walk into the shared virtual base, so preserving inheritance graph order.
cp:
* class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
the shared virtual base, so preserving inheritance graph order.
testsuite:
* g++.dg/abi/vbase8-22.C: New test.
*doc/install.texi: Add s390 s390x as new targets.
*doc/invoke.texi: Add documantation of S/390 and zSeries
target options.
* doc/md.texi: Add documantation of S/390 and zSeries constraints.
Jeff Sturm [Tue, 31 Jul 2001 01:59:44 +0000 (01:59 +0000)]
natPlainDatagramSocketImpl.cc: Undefine bind if defined.
* java/net/natPlainDatagramSocketImpl.cc: Undefine bind if defined.
(_Jv_bind): New static function.
(bind): Use _Jv_bind.
* java/net/natPlainSocketImpl.cc: Undefine bind, connect if defined.
(_Jv_bind, _Jv_connect): New static functions.
(bind): Use _Jv_bind.
(connect): Use _Jv_connect.
Jan Hubicka [Mon, 30 Jul 2001 20:30:23 +0000 (22:30 +0200)]
i386.c (ix86_output_main_function_alignment_hack): New function.
* i386.c (ix86_output_main_function_alignment_hack): New function.
(TARGET_ASM_FUNCTION_PROLOGUE): Default to it.
* flow.c (mark_dfs_back_edges): Move from loop_p ; mark back
edges by EDGE_DFS_BACK flag.
(dump_edge_info): Add dfs_back flag.
* basic-block.h (EDGE_DFS_BACK): New constant.
(mark_dfs_back_edges): Declare.
* alias.c (loop_p): Remove.
(mark_constant_function): Use mark_dfs_back_edges.
* reg-stack.c (block_info_def): Add predecesors counter and stack_out.
(reg_to_stack): Call mark_dfs_back_edges; count the predecesors.
(compensate_edge): Break out from ...
(convert_regs_1): ... here; do smart choosing of stack_out to copy.
(convert_regs_2): Set block_done once block is really done;
Do updating of the predecesors counts.
* toplev.c (rest_of_compilation): Recompute block_for_insn
before post-reload cfg_cleanup.
* function.c (thread_prologue_epilogue_insns):
Call set_block_for_new_insns when emitting prologue directly.
Andreas Jaeger [Mon, 30 Jul 2001 18:04:33 +0000 (20:04 +0200)]
jump.c: Add prototype for mark_modified_reg.
* jump.c: Add prototype for mark_modified_reg.
* cse.c (set_live_p): Add unused attribute.
* gcov.c (calculate_branch_probs): Use gcov_type to avoid
overflow.
(scan_for_source_files): Use long for count to avoid overflow.
(output_data): Likewise.
(output_data): Don't use string concatatenation to silence gcc
-traditional.
Jan Hubicka [Sun, 29 Jul 2001 19:44:42 +0000 (21:44 +0200)]
Suggested by Richard Henderson and Richard Kenner:
* combine.c (recog_for_combine): Use the fake recog
only if instruction does not match.
* rtl.h (NOOP_MOVE_INSN_CODE): New.
* rtlanal.c (noop_move_p): Always return 1 for NOOP_MOVE_INSN_CODE.
* combine.c (try_combine): Discover noop jump as direct jump.
Neil Booth [Sun, 29 Jul 2001 17:27:57 +0000 (17:27 +0000)]
cppexp.c (parse_defined): Always record the macro name.
* cppexp.c (parse_defined): Always record the macro name.
(lex): Don't worry about identifiers, or special-case
CPP_NOT here.
(_cpp_parse_expr): Figure out at the end of the routine
whether we saw a valid !defined() expression.
* cppfiles.c (stack_include_file): Update for mi_valid.
(_cpp_pop_file_buffer): Similarly.
* cpplex.c (_cpp_lex_token): Similarly.
* cpphash.h (enum mi_state, enum mi_ind, mi_state,
mi_if_not_defined, mi_lexed): Remove.
(mi_valid): New.
* cpplib.c (do_if): Simplify.
(do_endif, push_conditional, _cpp_handle_directive): Update
for renaming of mi_state to mi_valid.
* cpp.texi: Add index entries for digraphs, and add comment
that C++ refers to them as alternative tokens.
* dwarf2out.c (dw_val_class_offset): New.
(struct dw_ranges_struct, dw_ranges_ref): New.
(ranges_table, ranges_table_allocated): New.
(ranges_table_in_use, RANGES_TABLE_INCREMENT): New.
(add_AT_offset, add_ranges, output_ranges): New.
(print_die, output_die): Handle dw_val_class_offset.
(attr_checksum, size_of_die, value_format): Likewise.
(gen_lexical_block_die): Handle non-contiguous blocks.
(gen_block_die): Likewise.
(dwarf2out_finish): Add a DW_AT_entry_pc to the compilation unit
if needed. Dump the ranges table.
* final.c (final_start_function): Remove unnecessary notes and
rebuild the block tree before numbering the blocks.
* function.c (reorder_blocks_0): Walk the existing block tree
to unmark all blocks.
(reorder_blocks_1): Create block fragments when duplicate block
notes are seen.
(reorder_fix_fragments): New.
(reorder_blocks): Call it.
* tree.h (BLOCK_FRAGMENT_ORIGIN, BLOCK_FRAGMENT_CHAIN): New.
* flow.c (add_to_mem_set_list): New function.
(init_propagate_block_info): Use it.
(mark_set_1): Likewise.
(insn_dead_p): Canonicalize memory address for dead store
comparison. Allow wider mode stores to kill narrower mode stores.
(invalidate_mems_from_autoinc): Use invalidate_mems_from_set.
(invalidate_mems_from_set): Don't handle MEMs.
Jan Hubicka [Sat, 28 Jul 2001 21:37:35 +0000 (23:37 +0200)]
basic-block.h (EDGE_FREQUENCY): New macro.
* basic-block.h (EDGE_FREQUENCY): New macro.
* bb-reorder (fixup_reorder_chain): Set counts and frequencies
for new BB/edges.
* flow.c (find_sub_basic_blocks): Likewise.
(try_crossjump_to_edge): Likewise; use EDGE_FREQUENCY
(redirect_edge_and_branch): Use EDGE_FREQUENCY.
* predict.c (DEF_PREDICTOR): New argument FLAGS.
(HITRATE): New macro.
(PRED_FLAG_FIRST_MATCH): New constant.
(predictor_info): New field flgags.
(combine_predictions_for_insn): Use DS theory to combine
probabilities; set the edge probabilities when finished.
(estimate_probability): Avoid duplicated matches
of LOOP_BRANCH heuristics for nested loops; update comment.
* predict.def: Add flags for each prediction, set probabilities
according to B&L paper.
* predict.h (DEF_PREDICTOR): New argument FLAGS.
* profile.c (compute_branch_probabilities): Cleanup way the edge
probabilities are computed and REG_BR_PROB notes are dropped; if
values does not match, emit error.
(init_branch_prob): Do error instead of warning when profile driven
feedback is missing or corrupt.
DJ Delorie [Sat, 28 Jul 2001 03:13:34 +0000 (23:13 -0400)]
ifcvt.c (noce_get_alt_condition): If the condition is a compare against a constant...
* ifcvt.c (noce_get_alt_condition): If the condition is a compare
against a constant, try to adjust the compare to have the desired
constant in it so that min/max optimizations happen more often.
class.c (mark_primary_virtual_base): Don't adjust base offsets here.
cp:
* class.c (mark_primary_virtual_base): Don't adjust base
offsets here.
(dfs_unshared_virtual_bases): Adjust them here.
(mark_primary_bases): Explain why we adjust at the end.
testsuite:
* g++.dg/abi/vbase8-21.C: New test.
class.c (finish_struct_1): When copying the primary base's VFIELD, make sure we find it is at offset zero.
cp:
* class.c (finish_struct_1): When copying the primary base's
VFIELD, make sure we find it is at offset zero.
testsuite:
* g++.dg/abi/vbase8-10.C: New test.