Compare commits

...

1368 Commits

Author SHA1 Message Date
No Author
d3ac81e45a This commit was manufactured by cvs2svn to create branch
'g77-net-runtime'.

From-SVN: r18761
1998-03-22 18:34:31 +00:00
Jeff Law
0cc6110ba1 Import of g77-0.5.22
From-SVN: r18756
1998-03-22 03:36:19 -07:00
Jeff Law
d8e1ac71a3 Import 0.5.21 runtime -- needed for 0.5.22 merge.
From-SVN: r18755
1998-03-22 03:34:36 -07:00
No Author
9c5393ebad This commit was manufactured by cvs2svn to create branch
'g77-net-runtime'.

From-SVN: r18754
1998-03-22 10:34:36 +00:00
Jeff Law
81fea2b1d1 * Previous contents of gcc/f/runtime moved into toplevel
"libf2c" directory.

From-SVN: r17568
1998-01-31 18:37:08 -07:00
Richard Henderson
0dfb6849ef * runtime directory -- moved into "libfc2" in the toplevel
directory.
        * Make-lang.in: Remove all runtime related stuff.
Starting libfc2 rearrangement.

From-SVN: r17567
1998-01-31 18:30:56 -07:00
Jeff Law
3464ce01a5 No longer relavent.
From-SVN: r17566
1998-01-31 18:22:52 -07:00
Richard Henderson
4208b40ff0 alpha.c (alpha_expand_unaligned_load): Use expand_binop properly.
* alpha.c (alpha_expand_unaligned_load): Use expand_binop properly.
        Make sure result winds up in TGT.
        (alpha_expand_unaligned_store): Use expand_binop properly.  Allow
        src to be other than DImode.
        (alpha_expand_unaligned_load_words): Tidy.  Take an offset argument.
        (alpha_expand_unaligned_store_words): Likewise.
        (alpha_expand_block_move): Use REGNO_POINTER_ALIGN.  Restructure so
        that source and destination are separately optimized for alignment.
        (alpha_expand_block_clear): Use REGNO_POINTER_ALIGN.

From-SVN: r17565
1998-01-31 17:14:40 -08:00
Jeffrey A Law
82301b881c mips.md (adddi3_internal_2): Be consistent with adddi3 expander with handling of -32768.
* mips.md (adddi3_internal_2): Be consistent with adddi3 expander
        with handling of -32768.

From-SVN: r17564
1998-01-31 17:54:27 -07:00
Kaveh R. Ghazi
a81fb89ebe aclocal.m4 (GCC_NEED_DECLARATION): Modify macro to accept a shell variable argument instead of only hard coded...
* aclocal.m4 (GCC_NEED_DECLARATION): Modify macro to accept a
        shell variable argument instead of only hard coded functions.
        (GCC_NEED_DECLARATIONS): New macro to accept multiple functions.
        * configure.in: Collapse multiple calls to AC_CHECK_FUNCS into one
        call.  Collapse multiple calls to GCC_NEED_DECLARATION into one
        call to GCC_NEED_DECLARATIONS (new macro.)  Check if we need
        declarations for bcopy, bcmp and bzero.
        * acconfig.h: Add stubs for bcopy, bcmp and bzero declarations.
        * gansidecl.h: If we have bcopy but don't declare it, then do so.
        Likewise for bcmp and bzero.  Only define macros for bcopy, bcmp,
        bzero, index and rindex if they aren't already present.

From-SVN: r17563
1998-01-31 17:48:06 -07:00
Jeff Law
f65a7138c4 configure.in (getlogin,getgid,getuid, [...]): Check.
* libU77/configure.in (getlogin,getgid,getuid, kill,link,ttyname):
	Check.
	* libU77/config.h.in (HAVE_GETLOGIN, HAVE_GETGID, HAVE_GETUID,
	HAVE_KILL, HAVE_LINK, HAVE_TTYNAME): New defs.
	* libU77/getlog_.c: Conditionalize for target platform. Set errno
	to ENOSYS if target libc doesn't have the function.
	* libU77/getgid_.c: Likewise.
	* libU77/getuid_.c: Likewise.
	* libU77/kill_.c: Likewise.
	* libU77/link_.c: Likewise.
	* libU77/ttynam_.c: Likewise.

From-SVN: r17562
1998-01-31 17:41:14 -07:00
Jeffrey A Law
eed90b2cec toplev.c (close_dump_file): Wrap function prototype for argument "func" in PROTO.
* toplev.c (close_dump_file): Wrap function prototype for
        argument "func" in PROTO.
        (dump_rtl): Likewise.

From-SVN: r17561
1998-01-31 03:26:48 -07:00
John Carr
bfd6bc60f5 sparc.c (sparc_override_options): Make v8plus and ultrasparc set MASK_V8PLUS.
Fri Jan 30 22:30:39 1998  John Carr  <jfc@mit.edu>
        * sparc.c (sparc_override_options): Make v8plus and ultrasparc set
        MASK_V8PLUS.
        (output_function_epilogue): Omit epilogue if nothing drops through.
        (output_move_double): Supress int ldd usage on ultrasparc and v9.
        (registers_ok_for_ldd_peep): Likewise.
        (print_operand): Supress b,a on ultrasparc.  Let Y accept a constant.
        (ultrasparc_adjust_cost): New function.
        (sparc_issue_rate): New function.
        * sparc.h (MASK_VIS, TARGET_VIS): New
        (MASK_V8PLUS, TARGET_V8PLUS): New.
        (TARGET_HARD_MUL32, TARGET_HARD_MUL): New.
        (TARGET_SWITCHES): Add vis and v8plus.
        (REG_CLASS_FROM_LETTER): Accept d and b for VIS.
        (REGISTER_MOVE_COST): FP<->INT move cost 12 for ultrasparc.
        (RTX_COSTS): Use TARGET_HARD_MUL
        (ADJUST_COST): Call ultrasparc_adjust_cost.
        (ISSUE_RATE): New.
        * sparc.md (attr type): Add sload, fpmove, fpcmove.  Adjust users
        of load & fp appropritely.
        (supersparc function units): Adjust for Haifa.
        (ultrasparc function units): Likewise.
        (get_pc_via_rdpc): All v9, not just arch64.
        (movdi_v8plus, movdi_v8plus+1): New.
        (adddi3_sp32+1): New.
        (subdi3_sp32+1): New.
        (movsi_insn, movsf_const_insn, movdf_const_insn): Know VIS.
        (addsi3, subsi3, anddi3_sp32, andsi3, and_not_di_sp32): Likewise.
        (and_not_si, iordi3_sp32, iorsi3, or_not_di_sp32, or_not_si): Likewise.
        (xorsi3_sp32, xorsi3, xor_not_di_sp32, xor_not_si): Likewise.
        (one_cmpldi2_sp32, one_cmplsi2): Likewise.
        (ldd peepholes): Suppress for v9.
        (return_adddi): Kill redundant test.  Arg1 may be arith_operand.
        (return_subsi): Revmove.

From-SVN: r17560
1998-01-30 15:34:15 -08:00
John F. Carr
4b526a9a94 patch from jfc to improve aliasing/scheduling
* mips.c (save_restore_insns): Set RTX_UNCHANGING_P in register
	save/restore MEM rtl.

From-SVN: r17559
1998-01-30 10:31:34 -08:00
Jason Merrill
6209c7e96b new
From-SVN: r17558
1998-01-30 07:04:34 -05:00
Jeff Law
9c8933591e Tweak last entry.
From-SVN: r17557
1998-01-30 01:09:16 -07:00
Jeffrey A Law
64a438d6c4 configure.in: Check for declaration of abort.
* configure.in: Check for declaration of abort.
	* acconfig.h: Corresponding changes.
        * toplev.c: Use NEED_DECLARATION_ABORT to determine if abort should
        be declared.

From-SVN: r17556
1998-01-30 01:08:31 -07:00
Jeff Law
c5afbb4907 Forgot to commit these...
From-SVN: r17555
1998-01-30 01:04:59 -07:00
Jeff Law
f266c82f18 genattrtab.c (optimize): Define in case PRESERVE_DEATH_INFO_REGNO_P uses it.
* genattrtab.c (optimize): Define in case PRESERVE_DEATH_INFO_REGNO_P
        uses it.

From-SVN: r17554
1998-01-29 12:25:26 -07:00
Jason Merrill
98e10ea1cf new
From-SVN: r17553
1998-01-29 06:07:01 -05:00
Mark Mitchell
7bf2682f3f pt.c (convert_nontype_argument): Move check for is_overloaded_fn early to avoid bogus error.
* pt.c (convert_nontype_argument): Move check for is_overloaded_fn
	early to avoid bogus error.  Handle overloaded function
	names provided as template arguments correctly.
	(coerce_template_parms): Don't mishandle overloaded functions when
	dealing with template template parameters.
	(lookup_template_class): Issue an error message, rather than
	crashing, when the TYPE_DECL provided is not a template type.

From-SVN: r17552
1998-01-29 06:06:22 -05:00
Jason Merrill
c25520e8b9 new
From-SVN: r17551
1998-01-29 05:21:37 -05:00
Jeffrey A Law
31fa441061 Bump for snapshot
From-SVN: r17549
1998-01-29 02:27:59 -07:00
Jeffrey A Law
0ee31ab17e configure.in: Check for atoq and atoll.
* configure.in: Check for atoq and atoll.
        * rtl.c (read_rtx): Use HAVE_ATOLL and HAVE_ATOQ to select the
        proper routine for converting ascii into long long values.

From-SVN: r17548
1998-01-29 02:14:37 -07:00
Klaus Kaempf
9d21ee77f4 cccp.c (SYS$SEARCH, SYS$PARSE): Write as upper-case.
* cccp.c (SYS$SEARCH, SYS$PARSE): Write as upper-case.
        * vmsconfig.com: Remove bytecode references.
        * alpha/vms.h (PREFIX): Define.
        * alpha/vms.h (ASM_OUTPUT_ALIGNED_COMMON): Remove.

From-SVN: r17547
1998-01-29 02:04:10 -07:00
Klaus Kaempf
eeeb91c5bf am-alpha.h: Don't include alloca for OPEN_VMS.
* am-alpha.h: Don't include alloca for OPEN_VMS.
        * alpha/xm-vms.h (HAVE_CPP_STRINGIFY): Define.
        * alpha/xm-vms.h (INCLUDE_DEFAULTS): Define.
        (GCC_INCLUDE_DIR): Define
        * make-cc.com, make-cccp.com, make-cc1.com: Removed.
        * makefile.vms: New file.
        * alpha/vms.h (CPP_PREDEFINES): Remove -Dalpha.
        * alpha.c (output_prolog): Output '.name' directive
        for minimal traceback information.
        * alpha.c (output_prolog): Don't prepend entry point symbols
        with '$' on OPEN_VMS.

From-SVN: r17546
1998-01-28 17:47:10 -07:00
Jason Merrill
abff8e0691 class.c (instantiate_type): Don't just return a known type if it's wrong.
* class.c (instantiate_type): Don't just return a known type if
 	it's wrong.
	* class.c (instantiate_type): Remove handling of FUNCTION_DECL
	since that code could never be reached.
	* error.c (dump_decl): Avoid aborting in the midst of printing an
	error message about an illegal template declaration.
	* parse.y (structsp): Print an error message, rather than crashing,
	when a class-head does not name a class.
	* pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
	template arguments as a g++ extension.
	* cp-tree.def (ALIGNOF_EXPR): New tree code.
	* decl2.c (grok_alignof): If processing_template_decl, just store
	the expression.
	* typeck.c (c_alignof): Likewise.
	* decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
	* error.c (dump_expr): Likewise.
	* pt.c (tsubst_copy): Likewise.
	* tree.c (cp_tree_equal): Likewise.
	* pt.c (uses_template_parms): Correctly determine whether or not a
	SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
	folding can be done.

From-SVN: r17545
1998-01-28 19:08:53 -05:00
Jeff Law
76d31c6373 rtl.c (read_rtx): Use atol/atoq based upon disposition of HOST_WIDE_INT.
* rtl.c (read_rtx): Use atol/atoq based upon disposition of
        HOST_WIDE_INT.
        * genattrtab.c (write_test_expr): Use HOST_WIDE_INT_PRINT_DEC
        as needed.
        * genemit.c (gen_exp): Likewise.
        * genpeep.c (match_rtx): Likewise.
        * genrecog.c (write_tree_1): Likewise.
        * c-lex.c (yyprint): Use proper format string based upon
        disposition of HOST_BITS_PER_WIDE_INT.
        (yylex): Put casts in right place for args to build_int_2.
        * combine.c: Fix typos in Jan27 changes.

From-SVN: r17544
1998-01-28 16:25:15 -07:00
Ollivier Robert
1b7555bd4c freebsd.h (LIB_SPEC): Correctly handle -shared, -p and friends.
* i386/freebsd.h (LIB_SPEC): Correctly handle -shared, -p and friends.
        (LINK_SPEC): Likewise.
        (STARTFILE_SPEC): Likewise.

From-SVN: r17543
1998-01-28 16:06:58 -07:00
Mike Stump
21ca87b81b rtlanal.c (dead_or_set_regno_p): Ignore REG_DEAD notes after reload completes.
* rtlanal.c (dead_or_set_regno_p): Ignore REG_DEAD notes after
        reload completes.
        * genattrtab.c (reload_completed): Define.
        * m32r.md, mips.md, mn10200.md, mn10300.md, pyr.md: Remove obsolete
        comments.

From-SVN: r17542
1998-01-28 12:21:54 -07:00
J"orn Rennecke
d2c92f5a43 reload.c (push_reload): If WORD_REGISTER_OPERATIONS...
* reload.c (push_reload): If WORD_REGISTER_OPERATIONS, reload the
        SUBREG_REG if the word count is unchanged, also in the input reload
        case.  Disable non-applicable sanity checks.

From-SVN: r17541
1998-01-28 12:09:41 -07:00
Jeffrey A Law
90ad3ab77d * config/t-svr4 (TARGET_LIBGCC2_CFLAGS): Add -fPIC.
From-SVN: r17540
1998-01-28 12:06:58 -07:00
Ian Lance Taylor
7fad712c4a * i386/t-cygwin32 (LIMITS_H_TEST, LIBGCC2_INCLUDES): Define.
From-SVN: r17539
1998-01-28 12:04:40 -07:00
Per Bothner
1aea01ea0b dbxout.c (dbxout_type): For a RECORD_TYPE...
d
	* dbxout.c (dbxout_type):  For a RECORD_TYPE, check that TYPE_BINFO
	is a TREE_VEC before trying to use it for baseclasses.
	(Chill uses the same field for a different purpose.)

From-SVN: r17535
1998-01-28 09:07:24 -08:00
Per Bothner
598fc15260 dbxout.c (dbxout_type): For a RECORD_TYPE...
�
	* dbxout.c (dbxout_type):  For a RECORD_TYPE, check that TYPE_BINFO
	is a TREE_VEC before trying to use it for baseclasses.
	(Chill uses the same field for a different purpose.)

From-SVN: r17534
1998-01-28 09:07:23 -08:00
Jason Merrill
a88b65c260 new
From-SVN: r17533
1998-01-28 06:51:38 -05:00
Per Bothner
2290e0ece4 *** empty log message ***
From-SVN: r17532
1998-01-28 03:46:37 -08:00
Jason Merrill
86052cc3d8 cp-tree.h (grok_enum_decls): Remove type parameter.
* cp-tree.h (grok_enum_decls): Remove type parameter.
	* decl.c (grok_enum_decls): Likewise.
	* decl2.c (grok_x_components): Call grok_enum_decls
	unconditionally, since it will do nothing if there is no
	current_local_enum.  Use the new calling sequence.
	* pt.c (tsubst_enum): Use the new calling sequence for
	grok_enum_decls.
	* decl.c (start_function): Make member functions of local classes
	in extern inline functions have comdat linkage here...
	(grokdeclarator): Rather than here.
	* pt.c (convert_nontype_argument): Use decl_constant_value.

From-SVN: r17531
1998-01-28 06:43:39 -05:00
Jason Merrill
fca482568a new
From-SVN: r17530
1998-01-28 05:58:52 -05:00
Jeff Law
fb0390de12 Add missing ChangeLog entry
Add missing ChangeLog entry

From-SVN: r17529
1998-01-28 02:48:01 -07:00
Manfred Hollstein
d0a8352c0d Makefile.in (BASE_FLAGS_TO_PASS): Remove passing $(local_prefix) here as it is not defined in the toplevel Makefile.
* Makefile.in (BASE_FLAGS_TO_PASS): Remove passing $(local_prefix)
        here as it is not defined in the toplevel Makefile.

From-SVN: r17528
1998-01-28 02:31:48 -07:00
Manfred Hollstein
3a744fee03 configure.in, [...]: Update with yesterday's toplevel configure.in changes.
* stdio/configure.in, tests/configure.in: Update with yesterday's
        toplevel configure.in changes.
        * testsuite/cofnigure.in: Likewise.
        * config.shared: Fix typo in yesterday's changes.

From-SVN: r17527
1998-01-28 02:30:03 -07:00
Manfred Hollstein
5dc0a69ae4 configure.in, [...]: Update with yesterday's toplevel configure.in changes.
* tests/configure.in, testsuite/configure.in: Update with yesterday's
        toplevel configure.in changes.

From-SVN: r17526
1998-01-28 02:29:07 -07:00
Jeff Law
2e1c4154c1 More comment tweaks.
From-SVN: r17525
1998-01-27 16:04:34 -07:00
Manfred Hollstein
ef14509b91 configure.in (package_makefile_rules_frag): New variable which is used in the call to config.shared...
* configure.in (package_makefile_rules_frag): New variable
        which is used in the call to config.shared; redirect file descriptor 2
        to ${package_makefile_rules_frag}.

From-SVN: r17524
1998-01-27 15:25:59 -07:00
Manfred Hollstein
c3880e4577 config.shared: Emit everything which needs to be re-definable via file descriptor 1...
* config.shared: Emit everything which needs to be re-definable
        via file descriptor 1; the generic stuff is emitted using redirection
        onto fd 2.
        * configure.in (package_makefile_rules_frag): New variable
        which is used in the call to config.shared; redirect file descriptor 2
        to ${package_makefile_rules_frag}.

From-SVN: r17523
1998-01-27 15:25:13 -07:00
Manfred Hollstein
59739e3ce9 configure (package_makefile_rules_frag): New variable, which names a file with generic rules, ...
* configure (package_makefile_rules_frag): New variable, which names
        a file with generic rules, ...
        Change comment to mention we now have FIVE parts.
        * configure: Undo last change.

From-SVN: r17522
1998-01-27 15:23:50 -07:00
Jeff Law
4c46bad038 Fix typo.
From-SVN: r17521
1998-01-27 15:18:11 -07:00
Lassi A. Tuura
228197ee23 config.guess: More accurate determination of HP processor types.
* config.guess: More accurate determination of HP processor types.
        * config.sub: More accurate determination of HP processor types.

From-SVN: r17520
1998-01-27 15:15:40 -07:00
Lassi A. Tuura
169809000c * config.sub: More accurate determine of HP processor types.
From-SVN: r17519
1998-01-27 15:15:04 -07:00
Kaveh R. Ghazi
5e9defae4f c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.
d
	* c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.  Add
	prototype for `handle_sysv_pragma', and make it static.  Add
	parentheses around assignment used as truth value.
	* combine.c (combine_instructions): Protect variable `prev' with
	macro HAVE_cc0.
	(can_combine_p): Protect variable `link' with AUTO_INC_DEC.
	(extract_left_shift): Add parentheses around operand of &.
	(merge_outer_ops): Avoid an empty body in an else-statement.
	(gen_rtx_combine): Remove unused variable `i'.
	* sparc/gmon-sol2.c: Include <fcntl.h>.  Make return type of
        function monstartup `void'.  Likewise for internal_mcount.  Add
        `static void' prototype for moncontrol.  Reconcile sprintf format
        vs. args.
	* sparc/sparc.c: Include <stdlib.h> and <string.h>/<strings.h>.
	Make return type of function_arg_slotno explicitly `int'.
	(reg_unused_after): Add	parentheses around assignment used as
	truth value.
	(save_regs): Add explicit braces to avoid ambiguous `else'.
	(function_arg_slotno): Add parentheses around && within ||.
	(function_arg_pass_by_reference): Likewise.
	(sparc_flat_output_function_prologue): Reconcile fprintf format
	vs. args.
	* svr4.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around
	assignment used as truth value.
	* cplus-dem.c: Include <stdlib.h>.
	(demangle_signature): Avoid an empty body in an else-statement.
	(do_type): Remove unused variable `lvl'.
	* cppexp.c: Don't have <stdlib.h> depend on MULTIBYTE_CHARS.
	Include <string.h>/<strings.h>.
	(cpp_lex): Remove unused variable `namelen'.
	(cpp_lex): Explicitly declare `num_chars' as an int.
	* cpplib.c: Avoid duplicate inclusion of <stdlib.h>, include
	<unistd.h> instead.  Explicitly declare is_system_include
	returning int.
	(make_assertion): Remove unused variable `kt'.
	(cpp_expand_to_buffer): Hide variable `obuf'.
	(output_line_command): Remove unused variables, `line_end',
	`line_cmd_buf' and `len'.
	(macarg): Remove unused variable `arg_start'.
	(special_symbol): Remove unused variable `i'.  Add parentheses
	around assignment used as truth value.
	(do_include):  Remove unused variables `pcfname' and `retried',
	hide `pcf' and `pcfbuflimit'.
	(do_line): Remove unused variable `i'.
	(finclude): Hide variable `missing_newline'.
	(cpp_handle_options): Remove unused variable `j'.
	(read_token_list): Remove unused variable `eofp'.
	(cpp_error_with_line): Remove unused variable `i'.
	(cpp_warning_with_line): Likewise.
	(cpp_pedwarn_with_line): Explicitly declare `column' as int.
	(cpp_error_from_errno): Remove unused variable `i'.
	* cse.c (invalidate): Add parentheses around assignment used as
	truth value.
	(find_best_addr): Move declaration of variable `our_cost' inside
	the conditional macro where its used.
	(fold_rtx): Avoid an empty body in an if-statement.
	(cse_insn): Wrap variables  `this_insn_cc0_mode' and
	`this_insn_cc0' in macro HAVE_cc0.
	* dwarf2out.c: Include <stdlib.h> and <string.h>/<string.h>.
	(ASM_OUTPUT_DWARF_DATA8):  Reconcile format vs. args in fprintf's.
	(output_uleb128): Likewise.
	(output_sleb128): Likewise.
	(output_cfi): Likewise.
	(output_call_frame_info): Remove unused variables `j', `fde_size'
	and `fde_pad'.
	(comp_unit_has_inlines): Hide declaration as per rest of file.
	(size_of_line_prolog): Correct typo in prototype.
	(add_arange): Likewise.
	(output_aranges): Likewise.
	(add_name_and_src_coords_attributes): Likewise.
	(gen_array_type_die): Likewise.
	(gen_inlined_subroutine_die): Likewise.
	(equate_decl_number_to_die): Remove unused variable `i'.
	(print_die): Reconcile format vs. args in fprintf's.
	(print_dwarf_line_table): Likewise.
	(output_die): Likewise.
	(output_line_info): Likewise.
	(add_subscript_info): Avoid an empty body in an else-statement.
	(gen_subprogram_die): Remove unused variable `fp_loc'.
	* dwarfout.c: Explicitly declare `next_pubname_number' as int.
	Protect `ordering_attribute' prototype with USE_ORDERING_ATTRIBUTE
	macro.  Protect `src_coords_attribute' prototype with
	DWARF_DECL_COORDINATES macro.  Hide `output_entry_point_die'
	prototype as in the rest of the file.  Likewise for
	`output_pointer_type_die' and `output_reference_type_die'.  Remove
	prototype for `type_of_for_scope'.
	(output_unsigned_leb128): Reconcile format vs. args in fprintf.
	(type_attribute): Add explicit braces to avoid ambiguous `else'.
	* final.c: Include <stdlib.h> and <string.h>/<strings.h>.
	(shorten_branches): Protect declaration of tmp_length with
	SHORTEN_WITH_ADJUST_INSN_LENGTH and ADJUST_INSN_LENGTH macros.
	(profile_function): Protect declaration of `sval' and `cxt'
	variables with appropriate macros.
	(final_scan_insn): Likewise for `note' variable.  Add explicit
	braces to avoid empty body in an if-statement.
	(output_asm_insn): Move variable `i' inside macro conditional
	where it is used.  Add parentheses around assignment used as truth
	value.
	(asm_fprintf) Likewise, likewise.
	* fix-header.c (main): Remove unused variable `done'.  Protect
	declaration of `i' with FIXPROTO_IGNORE_LIST.
	* pexecute.c: Include <unistd.h>.  Prototype `my_strerror'.
	* print-rtl.c (print_inline_rtx): Explicitly declare the parameter
	`ind'.
	* profile.c: Include <string.h>/<strings.h>.
	(instrument_arcs): Remove unused variables `note', `inverted',
	`zero' and `neg_one'.
	(branch_prob): Avoid empty body in an if-statement.
	* regclass.c: Include <stdlib.h>.
	(reg_alternate_class): Explicitly declare parameter `regno'.
	* regmove.c (regmove_optimize): Remove unused variable `p'.  Add
	parentheses around assignment used as truth value.
	(find_matches):  Remove unused variables `output_operand' and
	`matching_operand'.
	(fixup_match_1): Remove statement with no effect: "if (0) ;".
	* scan.c (sstring_append): Explicitly declare `count' as int.
	(scan_string): Explicitly declare parameter `init' as int.
	* sched.c: Include <stdlib.h>.
	(BLOCKAGE_RANGE): Add parentheses around arithmetic in operand of |.
	(rank_for_schedule): Add parentheses around assignment used as
	truth value.
	(schedule_block): Likewise.
	(regno_use_in): Likewise.
	(schedule_insns): Remove unused variable `i'.
	* toplev.c: Include <stdlib.h> and <string.h>/<strings.h>.
	(v_message_with_decl): Remove unused variable `n'.
	(botch): Explicitly declare parameter `s' as char *.
	(main): Add parentheses around assignment used as truth value.
	* tree.c (make_node): Protect the variable `kind' with the
	GATHER_STATISTICS macro.
	(real_value_from_int_cst): Move variable `e' inside conditional
	macro area where it is used.
	(tree_last): Add parentheses around assignment used as truth value.
	(build1): Protect the variable `kind' with the GATHER_STATISTICS
	macro.
	(print_obstack_statistics): Reconcile format vs. args in fprintf.
	Protect variables `i', `total_nodes', and `total_bytes' with the
	GATHER_STATISTICS macro.
Lots more -W -Wall warnings disappear.

From-SVN: r17518
1998-01-27 15:11:55 -07:00
Jeff Law
9870475ca0 c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.
/
	* c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.  Add
	prototype for `handle_sysv_pragma', and make it static.  Add
	parentheses around assignment used as truth value.
	* combine.c (combine_instructions): Protect variable `prev' with
	macro HAVE_cc0.
	(can_combine_p): Protect variable `link' with AUTO_INC_DEC.
	(extract_left_shift): Add parentheses around operand of &.
	(merge_outer_ops): Avoid an empty body in an else-statement.
	(gen_rtx_combine): Remove unused variable `i'.
	* sparc/gmon-sol2.c: Include <fcntl.h>.  Make return type of
        function monstartup `void'.  Likewise for internal_mcount.  Add
        `static void' prototype for moncontrol.  Reconcile sprintf format
        vs. args.
	* sparc/sparc.c: Include <stdlib.h> and <string.h>/<strings.h>.
	Make return type of function_arg_slotno explicitly `int'.
	(reg_unused_after): Add	parentheses around assignment used as
	truth value.
	(save_regs): Add explicit braces to avoid ambiguous `else'.
	(function_arg_slotno): Add parentheses around && within ||.
	(function_arg_pass_by_reference): Likewise.
	(sparc_flat_output_function_prologue): Reconcile fprintf format
	vs. args.
	* svr4.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around
	assignment used as truth value.
	* cplus-dem.c: Include <stdlib.h>.
	(demangle_signature): Avoid an empty body in an else-statement.
	(do_type): Remove unused variable `lvl'.
	* cppexp.c: Don't have <stdlib.h> depend on MULTIBYTE_CHARS.
	Include <string.h>/<strings.h>.
	(cpp_lex): Remove unused variable `namelen'.
	(cpp_lex): Explicitly declare `num_chars' as an int.
	* cpplib.c: Avoid duplicate inclusion of <stdlib.h>, include
	<unistd.h> instead.  Explicitly declare is_system_include
	returning int.
	(make_assertion): Remove unused variable `kt'.
	(cpp_expand_to_buffer): Hide variable `obuf'.
	(output_line_command): Remove unused variables, `line_end',
	`line_cmd_buf' and `len'.
	(macarg): Remove unused variable `arg_start'.
	(special_symbol): Remove unused variable `i'.  Add parentheses
	around assignment used as truth value.
	(do_include):  Remove unused variables `pcfname' and `retried',
	hide `pcf' and `pcfbuflimit'.
	(do_line): Remove unused variable `i'.
	(finclude): Hide variable `missing_newline'.
	(cpp_handle_options): Remove unused variable `j'.
	(read_token_list): Remove unused variable `eofp'.
	(cpp_error_with_line): Remove unused variable `i'.
	(cpp_warning_with_line): Likewise.
	(cpp_pedwarn_with_line): Explicitly declare `column' as int.
	(cpp_error_from_errno): Remove unused variable `i'.
	* cse.c (invalidate): Add parentheses around assignment used as
	truth value.
	(find_best_addr): Move declaration of variable `our_cost' inside
	the conditional macro where its used.
	(fold_rtx): Avoid an empty body in an if-statement.
	(cse_insn): Wrap variables  `this_insn_cc0_mode' and
	`this_insn_cc0' in macro HAVE_cc0.
	* dwarf2out.c: Include <stdlib.h> and <string.h>/<string.h>.
	(ASM_OUTPUT_DWARF_DATA8):  Reconcile format vs. args in fprintf's.
	(output_uleb128): Likewise.
	(output_sleb128): Likewise.
	(output_cfi): Likewise.
	(output_call_frame_info): Remove unused variables `j', `fde_size'
	and `fde_pad'.
	(comp_unit_has_inlines): Hide declaration as per rest of file.
	(size_of_line_prolog): Correct typo in prototype.
	(add_arange): Likewise.
	(output_aranges): Likewise.
	(add_name_and_src_coords_attributes): Likewise.
	(gen_array_type_die): Likewise.
	(gen_inlined_subroutine_die): Likewise.
	(equate_decl_number_to_die): Remove unused variable `i'.
	(print_die): Reconcile format vs. args in fprintf's.
	(print_dwarf_line_table): Likewise.
	(output_die): Likewise.
	(output_line_info): Likewise.
	(add_subscript_info): Avoid an empty body in an else-statement.
	(gen_subprogram_die): Remove unused variable `fp_loc'.
	* dwarfout.c: Explicitly declare `next_pubname_number' as int.
	Protect `ordering_attribute' prototype with USE_ORDERING_ATTRIBUTE
	macro.  Protect `src_coords_attribute' prototype with
	DWARF_DECL_COORDINATES macro.  Hide `output_entry_point_die'
	prototype as in the rest of the file.  Likewise for
	`output_pointer_type_die' and `output_reference_type_die'.  Remove
	prototype for `type_of_for_scope'.
	(output_unsigned_leb128): Reconcile format vs. args in fprintf.
	(type_attribute): Add explicit braces to avoid ambiguous `else'.
	* final.c: Include <stdlib.h> and <string.h>/<strings.h>.
	(shorten_branches): Protect declaration of tmp_length with
	SHORTEN_WITH_ADJUST_INSN_LENGTH and ADJUST_INSN_LENGTH macros.
	(profile_function): Protect declaration of `sval' and `cxt'
	variables with appropriate macros.
	(final_scan_insn): Likewise for `note' variable.  Add explicit
	braces to avoid empty body in an if-statement.
	(output_asm_insn): Move variable `i' inside macro conditional
	where it is used.  Add parentheses around assignment used as truth
	value.
	(asm_fprintf) Likewise, likewise.
	* fix-header.c (main): Remove unused variable `done'.  Protect
	declaration of `i' with FIXPROTO_IGNORE_LIST.
	* pexecute.c: Include <unistd.h>.  Prototype `my_strerror'.
	* print-rtl.c (print_inline_rtx): Explicitly declare the parameter
	`ind'.
	* profile.c: Include <string.h>/<strings.h>.
	(instrument_arcs): Remove unused variables `note', `inverted',
	`zero' and `neg_one'.
	(branch_prob): Avoid empty body in an if-statement.
	* regclass.c: Include <stdlib.h>.
	(reg_alternate_class): Explicitly declare parameter `regno'.
	* regmove.c (regmove_optimize): Remove unused variable `p'.  Add
	parentheses around assignment used as truth value.
	(find_matches):  Remove unused variables `output_operand' and
	`matching_operand'.
	(fixup_match_1): Remove statement with no effect: "if (0) ;".
	* scan.c (sstring_append): Explicitly declare `count' as int.
	(scan_string): Explicitly declare parameter `init' as int.
	* sched.c: Include <stdlib.h>.
	(BLOCKAGE_RANGE): Add parentheses around arithmetic in operand of |.
	(rank_for_schedule): Add parentheses around assignment used as
	truth value.
	(schedule_block): Likewise.
	(regno_use_in): Likewise.
	(schedule_insns): Remove unused variable `i'.
	* toplev.c: Include <stdlib.h> and <string.h>/<strings.h>.
	(v_message_with_decl): Remove unused variable `n'.
	(botch): Explicitly declare parameter `s' as char *.
	(main): Add parentheses around assignment used as truth value.
	* tree.c (make_node): Protect the variable `kind' with the
	GATHER_STATISTICS macro.
	(real_value_from_int_cst): Move variable `e' inside conditional
	macro area where it is used.
	(tree_last): Add parentheses around assignment used as truth value.
	(build1): Protect the variable `kind' with the GATHER_STATISTICS
	macro.
	(print_obstack_statistics): Reconcile format vs. args in fprintf.
	Protect variables `i', `total_nodes', and `total_bytes' with the
	GATHER_STATISTICS macro.
Lots more -W -Wall warnings disappear.

From-SVN: r17517
1998-01-27 15:11:54 -07:00
Jeff Law
b729186a44 c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.
* c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.  Add
	prototype for `handle_sysv_pragma', and make it static.  Add
	parentheses around assignment used as truth value.
	* combine.c (combine_instructions): Protect variable `prev' with
	macro HAVE_cc0.
	(can_combine_p): Protect variable `link' with AUTO_INC_DEC.
	(extract_left_shift): Add parentheses around operand of &.
	(merge_outer_ops): Avoid an empty body in an else-statement.
	(gen_rtx_combine): Remove unused variable `i'.
	* sparc/gmon-sol2.c: Include <fcntl.h>.  Make return type of
        function monstartup `void'.  Likewise for internal_mcount.  Add
        `static void' prototype for moncontrol.  Reconcile sprintf format
        vs. args.
	* sparc/sparc.c: Include <stdlib.h> and <string.h>/<strings.h>.
	Make return type of function_arg_slotno explicitly `int'.
	(reg_unused_after): Add	parentheses around assignment used as
	truth value.
	(save_regs): Add explicit braces to avoid ambiguous `else'.
	(function_arg_slotno): Add parentheses around && within ||.
	(function_arg_pass_by_reference): Likewise.
	(sparc_flat_output_function_prologue): Reconcile fprintf format
	vs. args.
	* svr4.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around
	assignment used as truth value.
	* cplus-dem.c: Include <stdlib.h>.
	(demangle_signature): Avoid an empty body in an else-statement.
	(do_type): Remove unused variable `lvl'.
	* cppexp.c: Don't have <stdlib.h> depend on MULTIBYTE_CHARS.
	Include <string.h>/<strings.h>.
	(cpp_lex): Remove unused variable `namelen'.
	(cpp_lex): Explicitly declare `num_chars' as an int.
	* cpplib.c: Avoid duplicate inclusion of <stdlib.h>, include
	<unistd.h> instead.  Explicitly declare is_system_include
	returning int.
	(make_assertion): Remove unused variable `kt'.
	(cpp_expand_to_buffer): Hide variable `obuf'.
	(output_line_command): Remove unused variables, `line_end',
	`line_cmd_buf' and `len'.
	(macarg): Remove unused variable `arg_start'.
	(special_symbol): Remove unused variable `i'.  Add parentheses
	around assignment used as truth value.
	(do_include):  Remove unused variables `pcfname' and `retried',
	hide `pcf' and `pcfbuflimit'.
	(do_line): Remove unused variable `i'.
	(finclude): Hide variable `missing_newline'.
	(cpp_handle_options): Remove unused variable `j'.
	(read_token_list): Remove unused variable `eofp'.
	(cpp_error_with_line): Remove unused variable `i'.
	(cpp_warning_with_line): Likewise.
	(cpp_pedwarn_with_line): Explicitly declare `column' as int.
	(cpp_error_from_errno): Remove unused variable `i'.
	* cse.c (invalidate): Add parentheses around assignment used as
	truth value.
	(find_best_addr): Move declaration of variable `our_cost' inside
	the conditional macro where its used.
	(fold_rtx): Avoid an empty body in an if-statement.
	(cse_insn): Wrap variables  `this_insn_cc0_mode' and
	`this_insn_cc0' in macro HAVE_cc0.
	* dwarf2out.c: Include <stdlib.h> and <string.h>/<string.h>.
	(ASM_OUTPUT_DWARF_DATA8):  Reconcile format vs. args in fprintf's.
	(output_uleb128): Likewise.
	(output_sleb128): Likewise.
	(output_cfi): Likewise.
	(output_call_frame_info): Remove unused variables `j', `fde_size'
	and `fde_pad'.
	(comp_unit_has_inlines): Hide declaration as per rest of file.
	(size_of_line_prolog): Correct typo in prototype.
	(add_arange): Likewise.
	(output_aranges): Likewise.
	(add_name_and_src_coords_attributes): Likewise.
	(gen_array_type_die): Likewise.
	(gen_inlined_subroutine_die): Likewise.
	(equate_decl_number_to_die): Remove unused variable `i'.
	(print_die): Reconcile format vs. args in fprintf's.
	(print_dwarf_line_table): Likewise.
	(output_die): Likewise.
	(output_line_info): Likewise.
	(add_subscript_info): Avoid an empty body in an else-statement.
	(gen_subprogram_die): Remove unused variable `fp_loc'.
	* dwarfout.c: Explicitly declare `next_pubname_number' as int.
	Protect `ordering_attribute' prototype with USE_ORDERING_ATTRIBUTE
	macro.  Protect `src_coords_attribute' prototype with
	DWARF_DECL_COORDINATES macro.  Hide `output_entry_point_die'
	prototype as in the rest of the file.  Likewise for
	`output_pointer_type_die' and `output_reference_type_die'.  Remove
	prototype for `type_of_for_scope'.
	(output_unsigned_leb128): Reconcile format vs. args in fprintf.
	(type_attribute): Add explicit braces to avoid ambiguous `else'.
	* final.c: Include <stdlib.h> and <string.h>/<strings.h>.
	(shorten_branches): Protect declaration of tmp_length with
	SHORTEN_WITH_ADJUST_INSN_LENGTH and ADJUST_INSN_LENGTH macros.
	(profile_function): Protect declaration of `sval' and `cxt'
	variables with appropriate macros.
	(final_scan_insn): Likewise for `note' variable.  Add explicit
	braces to avoid empty body in an if-statement.
	(output_asm_insn): Move variable `i' inside macro conditional
	where it is used.  Add parentheses around assignment used as truth
	value.
	(asm_fprintf) Likewise, likewise.
	* fix-header.c (main): Remove unused variable `done'.  Protect
	declaration of `i' with FIXPROTO_IGNORE_LIST.
	* pexecute.c: Include <unistd.h>.  Prototype `my_strerror'.
	* print-rtl.c (print_inline_rtx): Explicitly declare the parameter
	`ind'.
	* profile.c: Include <string.h>/<strings.h>.
	(instrument_arcs): Remove unused variables `note', `inverted',
	`zero' and `neg_one'.
	(branch_prob): Avoid empty body in an if-statement.
	* regclass.c: Include <stdlib.h>.
	(reg_alternate_class): Explicitly declare parameter `regno'.
	* regmove.c (regmove_optimize): Remove unused variable `p'.  Add
	parentheses around assignment used as truth value.
	(find_matches):  Remove unused variables `output_operand' and
	`matching_operand'.
	(fixup_match_1): Remove statement with no effect: "if (0) ;".
	* scan.c (sstring_append): Explicitly declare `count' as int.
	(scan_string): Explicitly declare parameter `init' as int.
	* sched.c: Include <stdlib.h>.
	(BLOCKAGE_RANGE): Add parentheses around arithmetic in operand of |.
	(rank_for_schedule): Add parentheses around assignment used as
	truth value.
	(schedule_block): Likewise.
	(regno_use_in): Likewise.
	(schedule_insns): Remove unused variable `i'.
	* toplev.c: Include <stdlib.h> and <string.h>/<strings.h>.
	(v_message_with_decl): Remove unused variable `n'.
	(botch): Explicitly declare parameter `s' as char *.
	(main): Add parentheses around assignment used as truth value.
	* tree.c (make_node): Protect the variable `kind' with the
	GATHER_STATISTICS macro.
	(real_value_from_int_cst): Move variable `e' inside conditional
	macro area where it is used.
	(tree_last): Add parentheses around assignment used as truth value.
	(build1): Protect the variable `kind' with the GATHER_STATISTICS
	macro.
	(print_obstack_statistics): Reconcile format vs. args in fprintf.
	Protect variables `i', `total_nodes', and `total_bytes' with the
	GATHER_STATISTICS macro.
Lots more -W -Wall warnings disappear.

From-SVN: r17516
1998-01-27 15:11:45 -07:00
Jeff Law
2d8b0f3ada c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.
a
	* c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.  Add
	prototype for `handle_sysv_pragma', and make it static.  Add
	parentheses around assignment used as truth value.
	* combine.c (combine_instructions): Protect variable `prev' with
	macro HAVE_cc0.
	(can_combine_p): Protect variable `link' with AUTO_INC_DEC.
	(extract_left_shift): Add parentheses around operand of &.
	(merge_outer_ops): Avoid an empty body in an else-statement.
	(gen_rtx_combine): Remove unused variable `i'.
	* sparc/gmon-sol2.c: Include <fcntl.h>.  Make return type of
        function monstartup `void'.  Likewise for internal_mcount.  Add
        `static void' prototype for moncontrol.  Reconcile sprintf format
        vs. args.
	* sparc/sparc.c: Include <stdlib.h> and <string.h>/<strings.h>.
	Make return type of function_arg_slotno explicitly `int'.
	(reg_unused_after): Add	parentheses around assignment used as
	truth value.
	(save_regs): Add explicit braces to avoid ambiguous `else'.
	(function_arg_slotno): Add parentheses around && within ||.
	(function_arg_pass_by_reference): Likewise.
	(sparc_flat_output_function_prologue): Reconcile fprintf format
	vs. args.
	* svr4.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around
	assignment used as truth value.
	* cplus-dem.c: Include <stdlib.h>.
	(demangle_signature): Avoid an empty body in an else-statement.
	(do_type): Remove unused variable `lvl'.
	* cppexp.c: Don't have <stdlib.h> depend on MULTIBYTE_CHARS.
	Include <string.h>/<strings.h>.
	(cpp_lex): Remove unused variable `namelen'.
	(cpp_lex): Explicitly declare `num_chars' as an int.
	* cpplib.c: Avoid duplicate inclusion of <stdlib.h>, include
	<unistd.h> instead.  Explicitly declare is_system_include
	returning int.
	(make_assertion): Remove unused variable `kt'.
	(cpp_expand_to_buffer): Hide variable `obuf'.
	(output_line_command): Remove unused variables, `line_end',
	`line_cmd_buf' and `len'.
	(macarg): Remove unused variable `arg_start'.
	(special_symbol): Remove unused variable `i'.  Add parentheses
	around assignment used as truth value.
	(do_include):  Remove unused variables `pcfname' and `retried',
	hide `pcf' and `pcfbuflimit'.
	(do_line): Remove unused variable `i'.
	(finclude): Hide variable `missing_newline'.
	(cpp_handle_options): Remove unused variable `j'.
	(read_token_list): Remove unused variable `eofp'.
	(cpp_error_with_line): Remove unused variable `i'.
	(cpp_warning_with_line): Likewise.
	(cpp_pedwarn_with_line): Explicitly declare `column' as int.
	(cpp_error_from_errno): Remove unused variable `i'.
	* cse.c (invalidate): Add parentheses around assignment used as
	truth value.
	(find_best_addr): Move declaration of variable `our_cost' inside
	the conditional macro where its used.
	(fold_rtx): Avoid an empty body in an if-statement.
	(cse_insn): Wrap variables  `this_insn_cc0_mode' and
	`this_insn_cc0' in macro HAVE_cc0.
	* dwarf2out.c: Include <stdlib.h> and <string.h>/<string.h>.
	(ASM_OUTPUT_DWARF_DATA8):  Reconcile format vs. args in fprintf's.
	(output_uleb128): Likewise.
	(output_sleb128): Likewise.
	(output_cfi): Likewise.
	(output_call_frame_info): Remove unused variables `j', `fde_size'
	and `fde_pad'.
	(comp_unit_has_inlines): Hide declaration as per rest of file.
	(size_of_line_prolog): Correct typo in prototype.
	(add_arange): Likewise.
	(output_aranges): Likewise.
	(add_name_and_src_coords_attributes): Likewise.
	(gen_array_type_die): Likewise.
	(gen_inlined_subroutine_die): Likewise.
	(equate_decl_number_to_die): Remove unused variable `i'.
	(print_die): Reconcile format vs. args in fprintf's.
	(print_dwarf_line_table): Likewise.
	(output_die): Likewise.
	(output_line_info): Likewise.
	(add_subscript_info): Avoid an empty body in an else-statement.
	(gen_subprogram_die): Remove unused variable `fp_loc'.
	* dwarfout.c: Explicitly declare `next_pubname_number' as int.
	Protect `ordering_attribute' prototype with USE_ORDERING_ATTRIBUTE
	macro.  Protect `src_coords_attribute' prototype with
	DWARF_DECL_COORDINATES macro.  Hide `output_entry_point_die'
	prototype as in the rest of the file.  Likewise for
	`output_pointer_type_die' and `output_reference_type_die'.  Remove
	prototype for `type_of_for_scope'.
	(output_unsigned_leb128): Reconcile format vs. args in fprintf.
	(type_attribute): Add explicit braces to avoid ambiguous `else'.
	* final.c: Include <stdlib.h> and <string.h>/<strings.h>.
	(shorten_branches): Protect declaration of tmp_length with
	SHORTEN_WITH_ADJUST_INSN_LENGTH and ADJUST_INSN_LENGTH macros.
	(profile_function): Protect declaration of `sval' and `cxt'
	variables with appropriate macros.
	(final_scan_insn): Likewise for `note' variable.  Add explicit
	braces to avoid empty body in an if-statement.
	(output_asm_insn): Move variable `i' inside macro conditional
	where it is used.  Add parentheses around assignment used as truth
	value.
	(asm_fprintf) Likewise, likewise.
	* fix-header.c (main): Remove unused variable `done'.  Protect
	declaration of `i' with FIXPROTO_IGNORE_LIST.
	* pexecute.c: Include <unistd.h>.  Prototype `my_strerror'.
	* print-rtl.c (print_inline_rtx): Explicitly declare the parameter
	`ind'.
	* profile.c: Include <string.h>/<strings.h>.
	(instrument_arcs): Remove unused variables `note', `inverted',
	`zero' and `neg_one'.
	(branch_prob): Avoid empty body in an if-statement.
	* regclass.c: Include <stdlib.h>.
	(reg_alternate_class): Explicitly declare parameter `regno'.
	* regmove.c (regmove_optimize): Remove unused variable `p'.  Add
	parentheses around assignment used as truth value.
	(find_matches):  Remove unused variables `output_operand' and
	`matching_operand'.
	(fixup_match_1): Remove statement with no effect: "if (0) ;".
	* scan.c (sstring_append): Explicitly declare `count' as int.
	(scan_string): Explicitly declare parameter `init' as int.
	* sched.c: Include <stdlib.h>.
	(BLOCKAGE_RANGE): Add parentheses around arithmetic in operand of |.
	(rank_for_schedule): Add parentheses around assignment used as
	truth value.
	(schedule_block): Likewise.
	(regno_use_in): Likewise.
	(schedule_insns): Remove unused variable `i'.
	* toplev.c: Include <stdlib.h> and <string.h>/<strings.h>.
	(v_message_with_decl): Remove unused variable `n'.
	(botch): Explicitly declare parameter `s' as char *.
	(main): Add parentheses around assignment used as truth value.
	* tree.c (make_node): Protect the variable `kind' with the
	GATHER_STATISTICS macro.
	(real_value_from_int_cst): Move variable `e' inside conditional
	macro area where it is used.
	(tree_last): Add parentheses around assignment used as truth value.
	(build1): Protect the variable `kind' with the GATHER_STATISTICS
	macro.
	(print_obstack_statistics): Reconcile format vs. args in fprintf.
	Protect variables `i', `total_nodes', and `total_bytes' with the
	GATHER_STATISTICS macro.
Lots more -W -Wall warnings disappear.

From-SVN: r17515
1998-01-27 15:11:37 -07:00
Mike Stump
4b6bb562de m32r.md, [...]: Add some comments regarding use of dead_or_set_p.
* m32r.md, mips.md, mn10200.md, mn10300.md, pyr.md: Add
        some comments regarding use of dead_or_set_p.

From-SVN: r17514
1998-01-27 15:02:13 -07:00
Todd Vierling
e95f01957f * fixincludes: Tweak fix for struct exception in math.h
From-SVN: r17513
1998-01-27 14:16:28 -07:00
Mark Mitchell
e1467ff26b call.c (add_template_candidate_real): New function.
* call.c (add_template_candidate_real): New function.
	(add_template_candidate): Use it.
	(add_template_conv_candidate): Likewise.
	(joust): Pass extra argument to more_specialized.
	* class.c (instantiate_type): Handle a single FUNCTION_DECL.
	(is_local_class): Remove.
	(finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
	* cp-tree.h (is_local_class): Remove.
	(perform_array_to_pointer_conversion): Likewise.
	(finish_member_template_decl): Add.
	(check_explicit_specialization): Return a tree, not an int.
	(more_specialized): Take additional argument.
	(get_bindings): Likewise.
	(TI_PENDING_SPECIALIZATION_FLAG): New macro.
	* cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
	(perform_array_to_pointer_conversion): Remove.
	* decl.c (saved_scope): Add processing_specialization,
	processing_explicit_instantiation fields.
	(maybe_push_to_top_level): Save them.
	(pop_from_top_level): Restore them.
	(grokfndecl): Use new return value from
	check_explicit_specialization.
	(start_decl): Don't check flag_guiding_decls before pushing
	decls.
	(cp_finish_decl): Remove previous (bogus) change.
	(grok_declarator): Use decl_function_context rather than
	is_local_class.
	* decl2.c (finish_file): Pass extra argument to get_bindings.
	(build_expr_from_tree): Let build_x_component_ref check
	validity of arguments rather than doing it here.
	* lex.c (cons_up_default_function): Remove code fooling with
	processing_specialization, processing_explicit_instantiation
	flags, as that is now done in {maybe_push_top,pop_from}_top_level.
	* method.c (build_overload_identifier): Mangle local classes in
	template functions correctly.
	* parse.y (finish_member_template_decl): Move to pt.c.
	* pt.c (finish_member_template_decl): Moved here from parse.y.
	(print_candidates): New function.
	(determine_specialization): Change interface.  Properly look for
	most specialized versions of template candidates.
	(check_explicit_specialization): Fully process explicit
	instantiations.
	(push_template_decl): Avoid looking at CLASSTYPE fields in
	FUNCTION_DECLS.
	(determine_overloaded_function): Remove.
	(convert_nontype_argument): Change name from
	convert_nontype_parameter.  Use determine_overloaded_function
	instead of instantiate_type.
	(mangle_class_name_for_template): Handle type contexts as well as
	function contexts.
	(classtype_mangled_name): Likewise.
	(lookup_template_class): Likewise.
	(tsubst): Likewise.
	(more_specialized): Take explict template arguments as a
	parameter.
	(most_specialized): Likewise.
	(get_bindings): Likewise.  Check that return types match before
	proclaiming a function a match.
	(do_decl_instantiation): Remove code searching for function to
	instantiate; that is now done in check_explicit_specialization.
	(add_maybe_template): Pass extra argument to get_bindings.
	* tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
	implementation.
	* typeck.c (build_component_ref): Check for invalid arguments.

From-SVN: r17512
1998-01-27 15:47:56 -05:00
Gavin Koch
c3499f009d Patch from Gavin to fix mips16 prologue/epilogue bugs.
* mips/mips.c (mips_expand_prologue,mips_expand_epilogue):
	Change mode of registers used to add/sub from
	hard_frame_pointer_rtx from word_mode to Pmode.

From-SVN: r17511
1998-01-27 09:22:43 -08:00
Jason Merrill
56841f01ec expr.c (cplus_expand_expr, [...]): Don't check that return_target and call_target are equivalent.
* expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
	return_target and call_target are equivalent.

From-SVN: r17510
1998-01-27 07:07:36 -05:00
Nick Clifton
6db34dd47b v850.h (ASM_OUTPUT_ALIGNED_BSS): Use asm_output_aligned_bss() instead of asm_output_bss().
* v850.h (ASM_OUTPUT_ALIGNED_BSS): Use
        asm_output_aligned_bss() instead of asm_output_bss().

From-SVN: r17509
1998-01-27 03:19:24 -07:00
Jason Merrill
c2d339975e Makefile.in (install): Remove the shared library symlink even if we aren't installing it.
* Makefile.in (install): Remove the shared library symlink even if
 	we aren't installing it.

From-SVN: r17508
1998-01-27 05:14:06 -05:00
Nick Clifton
01898d58f0 toplev.c (rest_of_compilation): Replace references to stack_reg_dump_file and dbr_sched_dump_file with...
* toplev.c (rest_of_compilation): Replace references to
        stack_reg_dump_file and dbr_sched_dump_file with references to
        rtl_dump_file.

From-SVN: r17507
1998-01-27 03:02:22 -07:00
H.J. Lu
4b52c11409 configure.in (topsrcdir): New.
* configure.in (topsrcdir): New.
        (CHECK_SUBDIRS, configdirs): Check ${topsrcdir}/gcc instead.
        (config-ml.in): Use ${topsrcdir}/config-ml.in.
        * tests/configure.in (topsrcdir): New.
        (CHECK): Check ${topsrcdir}/gcc instead.

From-SVN: r17506
1998-01-27 02:34:31 -07:00
H.J. Lu
3fdcc721ff configure.in (topsrcdir): New.
* configure.in (topsrcdir): New.
        (configdirs): Check ${topsrcdir}/gcc instead.
        (config-ml.in): Use ${topsrcdir}/config-ml.in.
        * tests/configure.in (topsrcdir): New.
        (check): Check ${topsrcdir}/gcc instead.
Fixes multilib problems when srcdir == objdir.

From-SVN: r17505
1998-01-27 02:28:32 -07:00
Kamil Iskra
7b6ffd1189 * tlink.c (scan_linker_output): Call fclose() for opened files.
From-SVN: r17504
1998-01-27 02:23:08 -07:00
Richard Henderson
6059379729 alpha.c (output_epilog [!VMS]): Don't tag global functions if compiling with -fpic -- we want to be able to...
* alpha.c (output_epilog [!VMS]): Don't tag global functions if
compiling with -fpic -- we want to be able to override symbols
properly.
(alpha_expand_block_move): Fix thinko in last change.
* alpha.h (ASM_OUTPUT_MI_THUNK): New define.
* config/alpha/win-nt.h (ASM_OUTPUT_MI_THUNK): New define.
* config/alpha/vms.h (ASM_OUTPUT_MI_THUNK): New undef.

From-SVN: r17503
1998-01-26 21:11:41 -08:00
Richard Henderson
5e4aab9798 * alpha.md (abssf, absdf): Revert last change.
From-SVN: r17502
1998-01-26 19:23:31 -08:00
Jason Merrill
2b44e25acd new
From-SVN: r17501
1998-01-26 21:58:51 -05:00
Jason Merrill
343c89cd95 pt.c (type_unification_real): Just accept function parms that don't use any template parms.
* pt.c (type_unification_real): Just accept function parms that
	don't use any template parms.

From-SVN: r17500
1998-01-26 21:30:38 -05:00
John Carr
69145bccaa dwarf2out.c (dwarf2out_frame_init): Test value of DWARF2_UNWIND_INFO.
* dwarf2out.c (dwarf2out_frame_init): Test value of DWARF2_UNWIND_INFO.
        * mips/sni-svr4.h: Define DWARF2_UNWIND_INFO as 0.

From-SVN: r17499
1998-01-26 16:26:51 -07:00
Jeffrey A Law
4926b75a9f emit-rtl.c (gen_lowpart_common): Handle more case where converting a CONST_INT into SFmode.
* emit-rtl.c (gen_lowpart_common): Handle more case where converting
        a CONST_INT into SFmode.

From-SVN: r17498
1998-01-26 16:05:08 -07:00
Anthony Green
c6aded7c2b flags.h: New flag (optimize_size).
* flags.h: New flag (optimize_size).
        * toplev.c (main): Parse -Os option and set optimize_space
        accordingly.
        * gcc.c (default_compilers), cp/lang-specs.h, f/lang-specs.h: Define
        __OPTIMIZE_SIZE__ when compiling with -Os.
        * config/dsp16xx/dsp16xx.h, config/i386/i386.h,
        config/i386/dgux.h, config/i960/i960.h, config/pdp11/pdp11.h,
        config/v850/v850.h (OPTIMIZATION_OPTIONS): New SIZE argument
        to macro.
        * config/i386/i386.c (optimization_options): Accept new SIZE argument.

From-SVN: r17497
1998-01-26 16:00:04 -07:00
Manfred Hollstein
3698f44e0e libgcc2.c (__clear_insn_cache): On sysV68 enable the memctl stuff only if MCT_TEXT is #define'd.
* libgcc2.c (__clear_insn_cache): On sysV68 enable the memctl
        stuff only if MCT_TEXT is #define'd.

From-SVN: r17496
1998-01-26 15:54:52 -07:00
Markus F.X.J. Oberhumer
ac8a456ac7 configure.in (i*86-pc-msdosdjgpp): Treat like msdos & go32 configurations.
* configure.in (i*86-pc-msdosdjgpp): Treat like msdos & go32
        configurations.

From-SVN: r17495
1998-01-26 15:51:28 -07:00
Nick Clifton
032713aa55 toplev.c: Add -dM command line option to dump RTL after the machine dependent...
* toplev.c: Add -dM command line option to dump RTL after the
        machine dependent reorganisation pass, if there is one.
        Reorganise RTL dump code, so that only one file handle is
        needed.

From-SVN: r17494
1998-01-26 15:48:32 -07:00
Benjamin Kosnik
ec2be682fb except.c (check_exception_handler_labels): Disable warning when flag_syntax_only.
* except.c (check_exception_handler_labels): Disable warning when
        flag_syntax_only.

From-SVN: r17493
1998-01-26 15:43:57 -07:00
Jim Wilson
e232b7b340 Fix C++/-fpic core dump from Brendan, side effect of Kenner's Dec 24 change.
* sparc.c (pic_setup_code): Don't set LABEL_PRESERVE_P.

From-SVN: r17491
1998-01-26 10:21:26 -08:00
J"orn Rennecke
2a851b5ccf Patch from Joern to fix dwarf1 bug: emit debug info for types defined in
parameter lists.
	* c-decl.c (grokdeclarator): Get parameter tags from
	last_function_parm_tags.
	* dwarfout.c (output_formal_types): Set TREE_ASM_WRITTEN before
	traversing the parameter types.
	(output_type): No early exit for FUNCTION_TYPE / METHOD_TYPE context.

From-SVN: r17490
1998-01-26 10:13:41 -08:00
Jeff Law
ac2f83cb38 Tweak.
From-SVN: r17489
1998-01-26 09:15:46 -07:00
Jeff Law
0cbef98f40 Remove Gavin for now.
From-SVN: r17488
1998-01-26 01:38:23 -07:00
Jeff Law
04afd9d6b7 Tweaks from Andreas.
From-SVN: r17487
1998-01-26 01:31:47 -07:00
Jeffrey A Law
808fbfacde h8300.c (print_operand): Handle CONST_DOUBLE for 'e', 'f', and the default case.
* h8300.c (print_operand): Handle CONST_DOUBLE for 'e', 'f', and
        the default case.
        (get_shift_alg): Fix typo.

From-SVN: r17486
1998-01-25 17:44:02 -07:00
Richard Henderson
1538907587 * alpha.c (alpha_expand_block_move): Copy ADDRESSOF to reg.
From-SVN: r17485
1998-01-25 14:22:29 -08:00
Richard Henderson
83c8ddef65 * toplev.c (get_run_time): Make sure each case gets its variables.
From-SVN: r17484
1998-01-25 14:14:54 -08:00
Richard Henderson
db81d74a81 configure.in (build_xm_file): Add auto-config.h if host=build.
* configure.in (build_xm_file): Add auto-config.h if host=build.
(host_xm_file_list): Don't add $(srcdir) to auto-config.h.
(build_xm_file_list): Likewise.
* configure: Rebuild.

From-SVN: r17483
1998-01-25 14:11:32 -08:00
Alasdair Baird
f745c7a273 recog.c (validate_replace_rtx_1): Only perform substitutions of arguments to commutative and comparison operators...
* recog.c (validate_replace_rtx_1): Only perform substitutions
        of arguments to commutative and comparison operators once.

From-SVN: r17482
1998-01-25 14:00:42 -07:00
Jeff Law
6a093053a3 Add some stuff
From-SVN: r17481
1998-01-25 13:19:15 -07:00
Jeff Law
029bff0a09 Tweak.
From-SVN: r17479
1998-01-25 10:13:31 -07:00
Jason Merrill
5f79cea1ef bastring.h (unique): We only need length bytes.
* std/bastring.h (unique): We only need length bytes.
	(c_str): Avoid writing over random memory.
	#include <std/bastring.cc>.
	Lose _G_ALLOC_CONTROL.
	* std/bastring.cc: Likewise.
 	(nilRep): Add initializer for selfish.
	* sinst.cc: Just #include <string>.
Fix a couple of bugs, linux undefined symbol problem.

From-SVN: r17478
1998-01-25 11:45:02 -05:00
Jason Merrill
be34355626 decl.c (cp_finish_decl): When bailing on a comdat variable, also unset DECL_NOT_REALLY_EXTERN.
* decl.c (cp_finish_decl): When bailing on a comdat variable, also
	unset DECL_NOT_REALLY_EXTERN.

From-SVN: r17477
1998-01-25 08:33:39 -05:00
Jason Merrill
d3959d607e * parse.y (typename_sub*): Fix std::.
From-SVN: r17476
1998-01-25 07:54:44 -05:00
Kaveh R. Ghazi
91a5195111 sparc.c (output_cbranch): Add default case in enumeration switch.
* config/sparc/sparc.c (output_cbranch): Add default case in
        enumeration switch.
        * reorg.c (insn_sets_resource_p): Correct typo in prototype.
        (emit_delay_sequence): Eliminate unused parameter, all callers
        changed.
        (fill_simple_delay_slots): Likewise.
        (fill_slots_from_thread): Likewise.
        (fill_eager_delay_slots):  Likewise.
        (mark_referenced_resources): Add default case in enumeration switch.
        (mark_set_resources): Likewise.
        (rare_destination): Likewise.
        (mostly_true_jump): Likewise.
        (find_dead_or_set_registers): Likewise.
        (redirect_with_delay_slots_safe_p): Remove unused variable `slots'.
        (update_reg_unused_notes): Remove unused variable `p'.
        (mark_target_live_regs): Remove unused variables `next' and
        `jump_count'.
        (fill_simple_delay_slots): Remove unused variable `j'.
        (fill_slots_from_thread): Add parentheses around assignment used
        as truth value.
        (dbr_schedule): Likewise.

From-SVN: r17475
1998-01-25 04:34:22 -07:00
Kaveh R. Ghazi
eb1d4d913f Make-lang.in (f77.stage1): Depend on stage1-start so parallel make works better.
* Make-lang.in (f77.stage1): Depend on stage1-start so parallel
        make works better.
        * (f77.stage2): Likewise for stage2-start.
        * (f77.stage3): Likewise for stage3-start.
        * (f77.stage4): Likewise for stage4-start.

From-SVN: r17474
1998-01-25 04:30:32 -07:00
Kaveh R. Ghazi
963f4057da Make-lang.in (objc.stage1): Depend on stage1-start.
* objc/Make-lang.in (objc.stage1): Depend on stage1-start.
        (objc.stage2, objc.stage3, objc.stage4): Likewise.

From-SVN: r17473
1998-01-25 04:29:50 -07:00
Michael Tiemann
e82ad93d64 cse.c (simplify_ternary_operation): Don't try to simplify IF_THEN_ELSE expressions (created by combine) that don't...
* cse.c (simplify_ternary_operation): Don't try to simplify
        IF_THEN_ELSE expressions (created by combine) that don't use
        relational operators.

From-SVN: r17472
1998-01-25 04:12:26 -07:00
Jeff Law
f69eecfbd5 Fix mismatched parens.
From-SVN: r17471
1998-01-25 02:00:18 -07:00
Jason Merrill
67c2a92854 error.c (dump_decl): Fix type default template args.
* error.c (dump_decl): Fix type default template args.
	(dump_type): Hand TEMPLATE_DECL off to dump_decl.

From-SVN: r17470
1998-01-24 07:26:46 -05:00
Jason Merrill
b7a290122f tweak
From-SVN: r17469
1998-01-23 22:04:11 -05:00
Jeff Law
19428ce400 New file. Empty until we start adding stuff to it.
From-SVN: r17468
1998-01-23 18:14:26 -07:00
Manfred Hollstein
efd4c0ba20 configure (package_makefile_frag): Move inserting the ${package_makefile_frag} to where it should be according to...
* configure (package_makefile_frag): Move inserting the
        ${package_makefile_frag} to where it should be according
        to the comment.

From-SVN: r17467
1998-01-23 17:58:07 -07:00
Jeff Law
3a0120cfe2 Tweak SCO5 stuff.
From-SVN: r17466
1998-01-23 17:31:38 -07:00
Jeffrey A Law
ed1ecb1930 cse.c (simplify_ternary_operation): Handle more IF_THEN_ELSE simplifications.
* cse.c (simplify_ternary_operation): Handle more IF_THEN_ELSE
        simplifications.

From-SVN: r17465
1998-01-23 16:06:03 -07:00
Jeffrey A Law
b4b04bf97f crtstuff.c (init_dummy): Keep the epilogue in the init section for non-ELF systems.
* crtstuff.c (init_dummy): Keep the epilogue in the init
        section for non-ELF systems.

From-SVN: r17464
1998-01-23 14:47:43 -07:00
J"orn Rennecke
deeef0aca0 * sh.md (movqi_i+1): New peephole.
From-SVN: r17463
1998-01-23 14:27:50 -07:00
Jeff Law
2645224970 Finish .cexp -> .x conversion.
From-SVN: r17462
1998-01-23 14:13:16 -07:00
Mumit Khan
ab535daca9 lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
* lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
	(file_name_nondirectory): Use.

From-SVN: r17461
1998-01-23 13:35:06 -05:00
Jason Merrill
d1fefbce9d revert last change
From-SVN: r17460
1998-01-23 13:33:28 -05:00
Jim Wilson
03566575a9 Remove rest of bytecode stuff, except for the VMS *.com files.
* Makefile.in: Remove remaining bytecode stuff.
	* emit-rtl.c, expr.c: Likewise.

From-SVN: r17459
1998-01-23 07:43:01 -08:00
Nick Clifton
eb96c1209c * toplev.c (lang_options): Add unknown-pragma options.
From-SVN: r17458
1998-01-23 04:39:49 -07:00
Per Bothner
f03204e956 dwarfout.c (byte_size_attribute): Simplify and fix - don't need special (and incomplete) handling for Chill arrays.
�
	* dwarfout.c (byte_size_attribute):  Simplify and fix - don't need
	special (and incomplete) handling for Chill arrays.

From-SVN: r17457
1998-01-22 15:48:23 -08:00
Per Bothner
fa4056256a dwarfout.c (byte_size_attribute): Simplify and fix - don't need special (and incomplete) handling for Chill arrays.
8
	* dwarfout.c (byte_size_attribute):  Simplify and fix - don't need
	special (and incomplete) handling for Chill arrays.

From-SVN: r17456
1998-01-22 15:48:22 -08:00
Philip Blundell
6eef3189b8 * config.guess: Add support for Linux/ARM.
From-SVN: r17455
1998-01-22 16:28:32 -07:00
John Carr
4e762a3831 toplev.c (get_run_time): Call sysconf(_SC_CLK_TCK), when available, to get clock rate.
* toplev.c (get_run_time): Call sysconf(_SC_CLK_TCK), when available,
        to get clock rate.

From-SVN: r17454
1998-01-22 16:26:28 -07:00
Gavin Koch
319f217eca * mips.md (muldi3_internal2): Reverse test for TARGET_MIPS16.
From-SVN: r17453
1998-01-22 16:18:55 -07:00
Jeff Law
40687a9e89 Tweak.
From-SVN: r17452
1998-01-22 16:16:12 -07:00
Scott Snyder
19f673ebcd mips.c (function_prologue): Use HARD_FRAME_POINTER_REGNUM in .frame directive instead of FRAME_POINTER_REGNUM.
1998-01-22  scott snyder  <snyder@d0sgif.fnal.gov>
        * mips.c (function_prologue): Use HARD_FRAME_POINTER_REGNUM in
        .frame directive instead of FRAME_POINTER_REGNUM.

From-SVN: r17451
1998-01-22 16:13:28 -07:00
Robin Kirkham
74cf1c6d68 m68k.h (TARGET_SWITCHES): -mcpu32 now clears MASK_68881.
* m68k.h (TARGET_SWITCHES): -mcpu32 now clears MASK_68881.
        (MACHINE_STATE_m68010_up): Replaced __mc68332__ with __mcpu32__.
        * m68k/m68k-none.h(CPP_FPU_SPEC): Update relative to TARGET_SWITCHES.
        (CPP_SPEC, ASM_SPEC, CC1_SPEC): Likewise.
        (CPP_SPEC): -m68332 defines both __mc68332 and __mcpu32__.
        * m68k/t-m68kbare (MULTILIB_OPTIONS): Add mcpu32.
        (MULTILIB_MATCHES): -m68332 now uses mcpu32 libraries, not m68000.
        (MULTILIB_EXCEPTIONS): Don't build 68881 libraries for m68000,
        mcpu32 or m5200.
        * longlong.h: Replace __mc68332__ with __mcpu32__.

From-SVN: r17450
1998-01-22 16:10:15 -07:00
Jeff Law
77474480a4 Add intel site.
From-SVN: r17449
1998-01-22 15:24:37 -07:00
Mark Mitchell
d29ab3764b * decl2.c (grok_x_components): Always call grok_enum_decls.
From-SVN: r17448
1998-01-22 17:08:11 -05:00
Jeffrey A Law
e1402e7d13 Bump for snapshot
From-SVN: r17446
1998-01-22 12:55:42 -07:00
Brendan Kehoe
e8c9459c16 lose text after #endif
From-SVN: r17445
1998-01-22 10:42:52 -05:00
Jim Wilson
6d49a073b4 Fix powerpc/rs6000 (subreg:SF (mem:SI ...)) reload problem.
* reload.c (push_reload): In WORD_REGISTER_OPERATIONS code, add test
	to require the SUBREG mode to be smaller than the SUBREG_REG mode.
	* reload1.c (eliminate_regs): Likewise.

From-SVN: r17444
1998-01-22 06:48:58 -08:00
Jeffrey A Law
c485e6a0c9 regmove.c (find_matches): Initialize matches->earlyclobber too.
* regmove.c (find_matches): Initialize matches->earlyclobber too.
Should fix pa bootstrap comparison failures.

From-SVN: r17443
1998-01-22 06:49:29 -07:00
Jason Merrill
ff7620c005 new
From-SVN: r17442
1998-01-22 06:04:02 -05:00
Kriang Lerdsuwanakij
73b0fce8fd pt.c (coerce_template_parms): Don't access elements of ARGLIST that is not really present.
Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
	* pt.c (coerce_template_parms): Don't access elements of ARGLIST
	that is not really present.  Substitute default arguments in
	template template arguments.  Correctly convert TEMPLATE_DECL to
	TEMPLATE_TEMPLATE_PARM.
	(comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
	are no longer treated specially here.
	* parse.y (template_template_parm): Fix copy error.
	* decl.c (grokdeclarator): Warn about missing `typename' for nested
	type created from template template parameters.
	* parse.y (bad_parm): Likewise
	* class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
	(push_nested_class): Likewise.
	* cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
	* cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
	(copy_template_template_parm): Declare.
	* decl.c (arg_looking_for_template): New variable.
	(lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
	Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
	node if arg_looking_for_template is nonzero.
	(pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
	(grok_op_properties, xref_tag, xref_basetypes): Likewise.
	(grokdeclarator): Handle TEMPLATE_DECL.
	* decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
	* error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
	(dump_type_prefix, dump_type_suffix) Handle TEMPLATE_TEMPLATE_PARM.
	(dump_decl): Handle unnamed template type parameters.
	Handle template template parameters.
	(dump_function_name): Handle template template parameters.
	* init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
	Handle TEMPLATE_TEMPLATE_PARM.
	* method.c (build_template_template_parm_names): New function.
	(build_template_parm_names): Handle TEMPLATE_DECL.
	(build_overload_nested_name, build_overload_name):
	Handle TEMPLATE_TEMPLATE_PARM.
	* parse.y (maybe_identifier): New nonterminal.
	(template_type_parm): Use it.
	(template_template_parm, template_arg1): New nonterminal.
	(template_parm): Add template_template_parm rules.
	(template_arg): Set processing_template_arg.
	(template_arg1): Rules moved from template_arg.
	(primary, nonnested_type): Set arg_looking_for_template if we are
	processing template arguments.
	* pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
	(process_template_parm): Handle template template parameters.
	(coerce_template_parms, comp_template_args): Likewise.
	(mangle_class_name_for_template, lookup_template_class): Likewise.
	(uses_template_parms): Handle TEMPLATE_DECL and
	TEMPLATE_TEMPLATE_PARM.
	(current_template_args): Handle TEMPLATE_DECL.
	(tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
	* search.c (dfs_walk, dfs_record_inheritance):
	Handle TEMPLATE_TEMPLATE_PARM.
	* tree.c (copy_template_template_parm): New function.
	(mapcar): Handle TEMPLATE_TEMPLATE_PARM.
	* typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.

From-SVN: r17441
1998-01-22 06:03:56 -05:00
Richard Henderson
84303d9a68 alpha.md (abssf2, absdf2): Disable in IEEE mode.
* alpha.md (abssf2, absdf2): Disable in IEEE mode.
(negsf2, negdf2): Use proper subtract in IEEE mode.

From-SVN: r17440
1998-01-21 17:44:04 -08:00
Richard Henderson
48464ebfef * configure.in: Revert 3 Jan change for alpha-linux-gnulibc1.
From-SVN: r17439
1998-01-21 17:39:33 -08:00
Jeff Law
406b9925fa Fix typo in yesterday's change.
From-SVN: r17438
1998-01-20 23:48:07 -07:00
Jason Merrill
6a88a0c00b update
From-SVN: r17437
1998-01-20 19:11:44 -05:00
Jeffrey A Law
27766f0efa Remove more bytecode stuff.
From-SVN: r17436
1998-01-20 10:02:10 -07:00
Jeffrey A Law
c980413689 More bytecode stuff disappears.
From-SVN: r17435
1998-01-20 03:02:05 -07:00
Jeffrey A Law
424e713cd1 Remove more bytecode stuff.
From-SVN: r17434
1998-01-20 01:59:50 -07:00
Jeff Law
ab29e466d5 More bytecode stuff going away.
From-SVN: r17433
1998-01-20 01:57:27 -07:00
Jeffrey A Law
b93a436e6b Makefile.in: Remove all bytecode support.
* Makefile.in: Remove all bytecode support.
        (OBJS): Make sure last entry is a real object file, not EXTRA_OBJS.
        * emit-rtl.c: Remove all bytecode support.
        * expr.c, expr.h function.c, integrate.c: Likewise.
        * output.h, regclass.c, rtl.h, stmt.c, toplev.c: Likewise.
        * tree.h, varasm.c: Likewise.
        * bi-*, bc-*: Delete bytecode related files.
Bytecode suppors disappears :-)

From-SVN: r17432
1998-01-20 01:55:07 -07:00
Jeffrey A Law
6885fc8771 configure.in: Check for atol.
* configure.in: Check for atol.
Forgot to commit this one a few days ago.

From-SVN: r17431
1998-01-20 01:24:58 -07:00
Gavin Koch
7e07e3ba4c mips.md (divsi3,divdi3,modsi3,moddi3,udivsi3,udivdi3, [...]): Handle mips16 div/mod by a constant.
* mips/mips.md (divsi3,divdi3,modsi3,moddi3,udivsi3,udivdi3,
        umodsi3,umoddi3): Handle mips16 div/mod by a constant.

From-SVN: r17430
1998-01-20 01:01:08 -07:00
Jeff Law
7169565c20 Fix ChangeLog entry format.
From-SVN: r17429
1998-01-20 00:28:54 -07:00
Jeff Law
2d608f3084 Rebuilt.
From-SVN: r17428
1998-01-20 00:22:47 -07:00
Jason Merrill
a6475d981a tests from mark
From-SVN: r17427
1998-01-19 19:57:39 -05:00
Mark Mitchell
7565064686 decl.c (start_decl): Don't allow duplicate definitions of static data members.
* decl.c (start_decl): Don't allow duplicate definitions of static
	data members.
	* call.c (build_user_type_conversion_1): Handle user-defined
	template conversion operators correctly.
	* decl2.c (build_expr_from_tree): Issue an error message if the
	object in a COMPONENT_REF is a TEMPLATE_DECL.
	* typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
	* class.c (is_local_class): New function.
	* cp-tree.h (is_local_class): Declare it.
	(last_tree): Likewise.
	(begin_tree): Likewise.
	(end_tree): Likewise.
	(lookup_template_class): Change prototype.
	* decl.c (cp_finish_decl): Check for NULL where necesary.
	Consider FUNCTION_DECLS to declare objects with top-level binding,
	when calling make_decl_rtl.
	(grokdeclarator): Give members of local classes internal linkage.
	(start_function): Remove declaration of last_tree.
	(finish_function): Set flag_keep_inline_functions around call to
	rest_of_compilation if we are processing a member function in a
	local class.
	(start_method): Call push_template_decl for member functions of
	local classes in template functions.
	* decl2.c (import_export_decl): Don't give external linkage to
	instantiations of templates with internal linkage.
	* parse.y (last_tree): Remove declaration.
	(template_type): Pass extra parameter to lookup_template_class.
	(self_template_type): Likewise.
	(structsp): Move call to reset_specialization into left_curly.
	(left_curly): Call reset_specialization, and begin_tree.
	* pt.c (saved_trees): New variable.
	(mangle_class_name_for_template): Change prototype.  Use
	additional function context to name local classes in templates
	correctly.
	(classtype_mangled_name): Pass the context.
	(push_template_decl): Handle local classes and templates, and
	member functions for such classes.
	(convert_nontype_parameter): Fix handling of pointer-to-member
	constants.
	(lookup_template_class): Handle local classes in templates.
	(tsubst): Likewise.  Don't assume that template instantiations
	have external linkage; pay attention to the template declaration.
	(mark_decl_instantiated): Likewise.
	(begin_tree): New function.
	(end_tree): Likewise.
	* decl.c (xref_basetypes): Don't call complete_type for basetypes
	that involve template parameters; that can lead to infinite
	recursion unnecessarily.
	* pt.c (register_specialization): Do not register specializations
	that aren't ready to be registered yet.
	(check_explicit_specialization): Handle explicit specialization of
	constructors and destructors.
	(build_template_decl): New function.
	(push_template_delc): Handle out-of-class specializations of
	member templates.
        * pt.c (check_explicit_specialization): Set up the template
        information before registering the specialization.
        (coerce_template_parms): Fix thinko.
        (tsubst): Handle specializations of member templates correctly.
	* class.c (finish_struct_methods): Remove calls to
	check_explicit_specialization from here.
	(finish_struct): And insert them here.
	* cp-tree.h (perform_qualification_conversions): New function.
	(perform_array_to_pointer_conversion): Likewise.
	(begin_explicit_instantiation): Likewise.
	(end_explicit_instantiation): Likewise.
	(determine_specialization): Renamed from
	determine_explicit_specialization.
	(comp_template_parms): New function.
	(processing_explicit_instantiation): New variable.
	* cvt.c (perform_qualification_conversions): New function.
	(perform_array_to_pointer_conversion): Likewise.
	* decl.c (duplicate_decls): Don't consider template functions
	alike unless they have the same parameters.  Refine handling of
	instantiation/specialization mismatches.
	(start_decl): Don't call pushdecl for template specializations,
	since they don't affect overloading.
	(start_function): Likewise
	(grokfndecl): Call check_explicit_specialization a little later.
	Don't call duplicate_decls for memberm template specializations.
	(grokdeclarator): Don't update template_count for classes that are
	themselves specializations.  Remove use of `2' as parameter to
	grokfndecl since that value isn't used.
	* lex.c (cons_up_default_function): Save and restore
	processing_explicit_instantiation around calls to grokfield.
	* parse.y (finish_member_template_decl): New function.
	(component_decl_1): Use it.
	(fn.def2): Likewise.
	(template_arg_list_opt): New nonterminal.
	(template_type): Use it.
	(self_template_type): Likewise.
	(template_id): Likewise.
	(object_template_id): Likewise.
	(notype_template_declarator): Likwise.
	(begin_explicit_instantiation): Likewise.
	(end_explicit_instantiation): Likewise.
	(explicit_instantiation): Use them.
	* pt.c (coerce_template_parms): Add parameters.
	(processing_explicit_instantiation): New variable.
	(convert_nontype_parameter): New function.
	(determine_overloaded_function): Likewise.
	(begin_explicit_instantiation): Likewise.
	(end_explicit_instantiation): Likewise.
	(retrieve_specialization): Likewise.
	(register_specialization): Likewise.
	(processing_explicit_specialization): Removed.
	(determine_specialization): Handle specializations of member
	functions of template class instantiations.
	(check_explicit_specialization): Refine to conform to standard.
	(comp_template_parms): New function.
	(coerce_template_parms): Call convert_nontype_parameter.
	(tsubst): Refine handling of member templates.  Use
	register_specialization.
	(instantiate_template): Use retrieve_specialization.
	(do_decl_instantiation): Likewise.
	(instantiate_decl): Likewise.
	(type_unification): Improve handling of explict template
	arguments.
	* tree.c (mapcar): Return error_mark_node, rather than aborting,
	on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
	* typeck.c (build_unary_op): Call determine_specialization, rather
	than determine_explicit_specialization.

From-SVN: r17426
1998-01-19 17:41:40 -05:00
Richard Henderson
685885b773 i386.md (push): Prohibit symbolic constants if flag_pic.
* i386.md (push): Prohibit symbolic constants if flag_pic.
(movsi+1): Likewise for move to non-register.

From-SVN: r17425
1998-01-19 13:54:09 -08:00
Jim Wilson
11ea364a69 Fix 32 bit host alpha ev6 target failure.
* alpha.c (mode_mask_operand): Accept 0xffffffff on 32 bit host.
	(print_operand): Handle 0xffffffff on 32 bit host.

From-SVN: r17424
1998-01-19 10:32:48 -08:00
Jim Wilson
a851212aac Fix build/host/target configure in settting of thread_file.
* configure.in (thread_file): Rename uses before main loop to
	target_thread_file.  Initialize to empty in main loop.  Set thread_file
	to target_thread_file after main loop if not set.
	* configure: Rebuild.

From-SVN: r17423
1998-01-19 05:57:04 -08:00
Jason Merrill
f62aa8f3f1 cvt.c (build_up_reference): A TARGET_EXPR has side effects.
* cvt.c (build_up_reference): A TARGET_EXPR has side effects.
14507

From-SVN: r17422
1998-01-19 08:21:59 -05:00
Jim Wilson
5830e3a0ca Fix time/space problem when (const_int 1) occurs in conflict_list.
* genattrtab.c (find_and_mark_used_attributes): Handle CONST_INT.
	(add_values_to_cover): Revert last change (which had no ChangeLog
	entry).
	(simplify_with_current_value_aux): Handle CONST_INT.

From-SVN: r17421
1998-01-19 03:16:37 -08:00
Andreas Schwab
829e1aaf72 * unprotoize.c: Define UNPROTOIZE first, to actually take effect.
From-SVN: r17420
1998-01-19 02:12:31 -08:00
Richard Henderson
7684433709 configure.in: Add cpp stringify test.
* configure.in: Add cpp stringify test.
        * acconfig.h (HAVE_CPP_STRINGIFY): New tag.
        * gengenrtl.c: Use it.
        * configure, config.in: Rebuild.

From-SVN: r17419
1998-01-19 02:09:47 -08:00
Andreas Schwab
a3f8002381 * Makefile.in (genrtl.c genrtl.h): Add dummy command for GNU make.
From-SVN: r17418
1998-01-19 01:39:38 -08:00
Richard Henderson
c5d0345e8d configure.in: Find declaration for sbrk.
* configure.in: Find declaration for sbrk.
        * acconfig.h (NEED_DECLARATION_SBRK): New tag.
        * config.in, configure: Rebuild.
        * mips-tfile.c: Properly protect declaration of sbrk and free.
        * toplev.c: Properly protect declaration of sbrk.

From-SVN: r17417
1998-01-19 01:37:12 -08:00
Richard Henderson
bb02e7eaa4 * alpha.c (alpha_handle_trap_shadows): Ignore CLOBBERs.
From-SVN: r17416
1998-01-18 12:15:24 -08:00
Richard Henderson
43ad1f80bc Typo applying the last patch.
From-SVN: r17415
1998-01-18 12:03:42 -08:00
Toon Moene
94f09d6b40 f_back (f/runtime/libI77/backspace.c): use type `uiolen' to determine size of record length specifier.
* f_back (f/runtime/libI77/backspace.c): use type `uiolen'
to determine size of record length specifier.

From-SVN: r17414
1998-01-18 12:02:04 -08:00
Jeffrey A Law
30c2fa7578 * alpha/xm-winnt.h (HAS_INIT_SECTION): Undefine.
From-SVN: r17413
1998-01-17 17:52:49 -07:00
Jeff Law
ae0d310d59 Fix various bugs in previous change.
From-SVN: r17412
1998-01-17 17:49:05 -07:00
Jeffrey A Law
a04a1bea94 c-torture.exp: Look for .x files instead of .cexp files.
* lib/c-torture.exp: Look for .x files instead of .cexp files.
        * lib/f-torture.exp: Similarly.
        * gcc.c-torture: Rename all .cexp files to .x files.

From-SVN: r17411
1998-01-17 17:32:36 -07:00
Jeff Law
70372764a3 New test from Joern.
From-SVN: r17410
1998-01-17 17:22:34 -07:00
Jeff Law
ffc3503d9f emit_rtl.c (init_emit_once): Ensure that potential aliasing between frame_pointer_rtx...
* emit_rtl.c (init_emit_once): Ensure that potential aliasing
        between frame_pointer_rtx, hard_frame_pointer_rtx, and
        arg_pointer_rtx is respected in initialization.
        (init_emit_once): Use gen_rtx_raw_REG() to create
        return_address_pointer_rtx.
	* rtl.h: Fix typo.

From-SVN: r17409
1998-01-17 17:01:22 -07:00
Mike Stump
a0372c94de * configure.in (i960-wrs-vxworks): Default to latest vxworks release.
From-SVN: r17408
1998-01-17 16:56:18 -07:00
Jeff Law
9677d5a42e Flip expectedness
From-SVN: r17407
1998-01-17 16:52:16 -07:00
Jeff Law
e925bb9d82 Rebuild configure files after recent changes.
From-SVN: r17406
1998-01-17 16:48:34 -07:00
David S. Miller
0e9ff8854f combine.c (force_to_mode, [...]): Correctly optimize constant offset computations from objects with known...
* combine.c (force_to_mode, nonzero_bits): Correctly optimize
        constant offset computations from objects with known alignment in
        the presence of STACK_BIAS.

From-SVN: r17405
1998-01-17 16:08:03 -07:00
Jeffrey A Law
aef28d1d1e acconifg.h (NEED_DECLARATION_ATOL): New declaration to check for.
* acconifg.h (NEED_DECLARATION_ATOL): New declaration to check for.
        * rtl.c (atol): Only provide the declaration if NEED_DECLARATION_ATOL.

From-SVN: r17404
1998-01-17 16:00:46 -07:00
David S. Miller
7bcac048fd varasm.c (immed_double_const): Add casts to HOST_WIDE_INT where necessary.
* varasm.c (immed_double_const): Add casts to HOST_WIDE_INT where
        necessary.
        (const_hash): Hash val is unsigned long.
        (SYMHASH): Likewise.
        * tree.c (TYPE_HASH): Type of hash val is unsigned long.
        * print-tree.c (print_node_brief): HOST_PTR_PRINTF format wants a
        char pointer, not HOST_WIDE_INT.
        (print_node): Likewise.  Also hash is unsigned long not
        HOST_WIDE_INT.
        * cse.c (canon_hash): Hash is unsigned long not HOST_WIDE_INT.

From-SVN: r17403
1998-01-17 15:50:40 -07:00
David S. Miller
c9ec4f99bc explow.c (optimize_save_area_alloca): New function for targets where SETJMP_VIA_SAVE_AREA is true.
* explow.c (optimize_save_area_alloca): New function for targets
        where SETJMP_VIA_SAVE_AREA is true.
        (allocate_dynamic_stack_space): On SETJMP_VIA_SAVE_AREA targets,
        compute the amount of stack space needed should we find later that
        setjmp is never called by this function, stuff rtl for this inside
        a REG_NOTE of the final SET of stack_pointer_rtx.
        * toplev.c (rest_of_compilation): If SETJMP_VIA_SAVE_AREA and
        current_function_calls_alloca, call optimize_save_area_alloca.
CVS ----------------------------------------------------------------------

From-SVN: r17402
1998-01-17 15:39:10 -07:00
John Wehle
ca097615db i386.md: Remove redundant integer push patterns.
* i386.md: Remove redundant integer push patterns.
        Don't bother checking for TARGET_PUSH_MEMORY when
        pushing constants or registers.

From-SVN: r17401
1998-01-17 15:20:32 -07:00
Jeffrey A Law
4399e7a324 * rtl.c (read_rtx): Initialize list_rtx to NULL, not NULL_RTX.
From-SVN: r17400
1998-01-17 15:00:51 -07:00
Jeffrey A Law
72ec635f5a loop.c (find_and_verify_loops): When attempting to move insns from inside the loop outside the loop...
* loop.c (find_and_verify_loops): When attempting to move insns from
        inside the loop outside the loop, create a BARRIER if no suitable
        one was found.

From-SVN: r17399
1998-01-17 14:50:05 -07:00
Mumit Khan
d9a3317a68 configure.in (sys/param.h,sys/times.h): Check.
* libU77/configure.in (sys/param.h,sys/times.h): Check.
	(times,alarm): Likewise.
	* libU77/config.h.in (HAVE_SYS_PARAM_H, HAVE_SYS_TIMES_H,
	HAVE_ALARM, HAVE_TIMES): New defs.
	* libU77/alarm_.c: Conditionalize for target platform. Set errno
	to ENOSYS if target libc doesn't have the function.
	* libU77/dtime_.c: Likewise.
	* libU77/etime_.c: Likewise.
	* libU77/sys_clock_.c: Likewise.

From-SVN: r17398
1998-01-17 14:39:07 -07:00
Mumit Khan
4dfa69619a configure.in (NON_UNIX_STDIO): Define if MINGW32.
* configure.in (NON_UNIX_STDIO): Define if MINGW32.
        (NON_ANSI_RW_MODE): Do not define for CYGWIN32 or MINGW32.
        * libI77/rawio.h: Don't providing conflicting declarations for
        read() and write(). MINGW32 header files use "const" quals.
        * libF77/s_paus.c: _WIN32 does not have pause().

From-SVN: r17397
1998-01-17 14:37:48 -07:00
Mumit Khan
a3105a8956 pexecute.c (pexecute): New function for mingw32.
* pexecute.c (pexecute): New function for mingw32. Supports pipes.
        (pwait): New function for mingw32.
        * gcc.c (execute): Mingw32 pexecute() supports pipes, but cygwin32
        pipe support is broken for now.

Co-Authored-By: J.J. VanderHeijden <J.J.vanderHeijden@student.utwente.nl>

From-SVN: r17396
1998-01-17 14:33:56 -07:00
Mumit Khan
77aff45955 Add mingw32 support.
* pexecute.c (pexecute): New function for mingw32. Supports pipes.
        (pwait): New function for mingw32.
        * config.table (i[3456]86-*-mingw32*): Support for i386-mingw32.
        * config/mt-mingw32: New file.
        * xmalloc.c (first_break): Not used for mingw32.
        (xmalloc_set_program_name): Don't use sbrk on mingw32.
        (xmalloc): Likewise.
        (xrealloc): Likewise.

Co-Authored-By: J.J. VanderHeijden <J.J.vanderHeijden@student.utwente.nl>

From-SVN: r17395
1998-01-17 14:30:39 -07:00
Jeffrey A Law
84f79fea91 * choose-temp.c: Sync with gcc.
From-SVN: r17394
1998-01-17 14:23:29 -07:00
Lee Iverson
51549d7665 reorg.c: #include "expr.h" for rtx prototypes.
* reorg.c: #include "expr.h" for rtx prototypes.
        * Makefile.in (reorg.o): Depend on expr.h.

From-SVN: r17393
1998-01-17 13:37:23 -07:00
Pieter Nagel
3bf810d837 Makefile.in (FLAGS_TO_PASS): Pass down gcc_include_dir and local_prefix to sub-make invocations.
8
        * Makefile.in (FLAGS_TO_PASS): Pass down gcc_include_dir and
        local_prefix to sub-make invocations.

From-SVN: r17392
1998-01-17 13:29:12 -07:00
Pieter Nagel
b24a815bdf Makefile.in (FLAGS_TO_PASS): Pass down gcc_include_dir and local_prefix to sub-make invocations.
d
        * Makefile.in (FLAGS_TO_PASS): Pass down gcc_include_dir and
        local_prefix to sub-make invocations.

From-SVN: r17391
1998-01-17 13:28:35 -07:00
Pieter Nagel
803462a79f Makefile.in (FLAGS_TO_PASS): Pass down gcc_include_dir and local_prefix to sub-make invocations.
Sat Jan 17 21:28:08 1998  Pieter Nagel <pnagel@epiuse.co.za>
        * Makefile.in (FLAGS_TO_PASS): Pass down gcc_include_dir and
        local_prefix to sub-make invocations.

From-SVN: r17390
1998-01-17 13:28:11 -07:00
David T. McWherter
1e7b997ad1 * objc-parse.c: Recognize protocol qualifiers in class definitions.
From-SVN: r17389
1998-01-17 13:23:59 -07:00
Jeff Law
1be6e437f0 jump.c (jump_optimize): Remove Dec 17, 1997 chance in favor of an equivalent change from gcc-2.8.
* jump.c (jump_optimize): Remove Dec 17, 1997 chance in
        favor of an equivalent change from gcc-2.8.

From-SVN: r17388
1998-01-17 13:20:09 -07:00
Jeffrey A Law
340fb41f69 * i386/x-sco5 (CC): Remove trailing whitespace.
From-SVN: r17387
1998-01-17 13:15:48 -07:00
Kaveh R. Ghazi
982255c878 gengenrtl.c (type_from_format): De-ANSIfy function signature.
* gengenrtl.c (type_from_format): De-ANSIfy function signature.
        (accessor_from_format): Likewise.
        (xmalloc): New function for use when linking with alloca.o.

From-SVN: r17386
1998-01-17 13:09:09 -07:00
H.J. Lu
520ab477c8 configure.in: Check makefile fragments in the source directory.
* configure.in: Check makefile fragments in the source
        directory.

From-SVN: r17385
1998-01-17 13:04:38 -07:00
Bruno Haible
db8abea377 * frame.c (find_fde): Correct FDE's upper bound.
From-SVN: r17382
1998-01-16 18:56:07 -05:00
Bruno Haible
224c649b80 * error.c (dump_decl): For enum tags, output the tag, not its value.
From-SVN: r17381
1998-01-16 18:55:44 -05:00
Richard Henderson
5d483f6374 * gengenrtl.c (DEF_RTL_EXPR): Provide a K&R compliant version.
From-SVN: r17380
1998-01-16 08:21:54 -08:00
Jeff Law
ceb832060c calls.c (expand_call): Move #ifdef code out of macro argument lists.
`
        * calls.c (expand_call): Move #ifdef code out of macro argument
        lists.
        (emit_library_call, emit_library_call_value): Likewise.

From-SVN: r17379
1998-01-16 02:16:10 -07:00
Jeff Law
9a960e6b5b calls.c (expand_call): Move #ifdef code out of macro argument lists.
d
        * calls.c (expand_call): Move #ifdef code out of macro argument
        lists.
        (emit_library_call, emit_library_call_value): Likewise.

From-SVN: r17378
1998-01-16 02:16:09 -07:00
Brendan Kehoe
3aa9d5b6fa tweak comment
From-SVN: r17377
1998-01-16 03:59:59 -05:00
Manfred Hollstein
eb2c3b995c * config.shared (FLAGS_TO_PASS): Add SHELL.
From-SVN: r17376
1998-01-15 16:46:28 -07:00
Jeffrey A Law
a4b1834644 * rtl.def (INLINE_HEADER): Fix bug exposed by gen_rtx_FOO changes.
From-SVN: r17375
1998-01-15 16:44:54 -07:00
Jeff Law
57718ce6d3 Minor tweaks & updates.
From-SVN: r17374
1998-01-15 16:42:59 -07:00
Alexandre Oliva
4bcdb76dd5 configure.in: check whether host and target makefile fragments exist before adding them to...
* configure.in: check whether host and target makefile
        fragments exist before adding them to *_makefile_frag

From-SVN: r17373
1998-01-15 16:39:59 -07:00
Jeff Law
850037bb7d Work around VxWorks bogus problems.
From-SVN: r17372
1998-01-15 16:38:58 -07:00
Jeff Law
f3e6c2d559 Initial revision
From-SVN: r17365
1998-01-14 20:36:46 -07:00
Jeffrey A Law
a252996a00 Bump for snapshot.
From-SVN: r17358
1998-01-14 17:01:51 -07:00
Richard Henderson
38a448ca5d alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO...
* alias.c: Change all uses of gen_rtx(FOO...) to gen_rtx_FOO;
change gen_rtx(expr...) to gen_rtx_fmt_foo(expr...).
* caller-save.c, calls.c, combine.c, cse.c: Likewise.
* dwarf2out.c, except.c, explow.c, expmed.c, expr.c: Likewise.
* final.c, flow.c, function.c, genpeep.c, haifa-sched.c: Likewise.
* halfpic.c, integrate.c, jump.c, local-alloc.c, loop.c: Likewise.
* profile.c, recog.c, reg-stack.c, regclass.c, regmove.c: Likewise.
* reload.c, reload1.c, reorg.c, sched.c, stmt.c, stupid.c: Likewise.
* unroll.c, varasm.c: Likewise.
* config/alpha/alpha.c, config/alpha/alpha.md: Likewise.

From-SVN: r17357
1998-01-14 15:10:50 -08:00
Jeff Law
ace62b4972 Fix minor lossage brought over in gcc-2.8.0 merge.
From-SVN: r17356
1998-01-14 14:44:01 -07:00
Jeff Law
c85f7c16ad Bring in final gcc-2.8.0 changes.
From-SVN: r17355
1998-01-14 13:57:58 -07:00
Gavin Koch
60db002df5 * mips.h: Fix some type-o's from a previous change.
From-SVN: r17353
1998-01-14 11:34:35 -07:00
Jeffrey A Law
a8decb2c2b loop.c (check_dbra_loop): Make sure initial value is a CONST_INT before trying to normalize it.
* loop.c (check_dbra_loop): Make sure initial value is a
	CONST_INT before trying to normalize it.

From-SVN: r17352
1998-01-13 17:24:33 -07:00
Robert Lipe
0e2b736c80 * sco5.h (ASM_OUTPUT_SECTION_NAME): Refresh from ../svr4.h.
From-SVN: r17351
1998-01-13 15:27:40 -07:00
Herman ten Brugge
a3aa3d8c2c * cppexp.c: Include gansidecl.h
From-SVN: r17350
1998-01-13 14:45:28 -07:00
Ian Lance Taylor
8b496c8d2e svr4.h (LINK_SPEC): Never specify -h.
* svr4.h (LINK_SPEC): Never specify -h.
        * ptx4.h (LINK_SPEC): Likewise.
        * rs6000/sysv4.h (LINK_SPEC): Likewise.
        * sparc/sol2.h (LINK_SPEC): Likewise.

From-SVN: r17349
1998-01-13 14:43:41 -07:00
Jeff Law
a4fc4b2d12 Update copyrights.
From-SVN: r17348
1998-01-13 14:42:33 -07:00
Richard Henderson
8d47dfc57f * c-typeck.c (comptypes): Exit early on NULL input.
From-SVN: r17347
1998-01-13 14:40:27 -07:00
Richard Henderson
c995fea195 haifa-sched.c (schedule_insns): Correctly remove inter-block dependencies after reload.
* haifa-sched.c (schedule_insns): Correctly remove inter-block
        dependencies after reload.

From-SVN: r17346
1998-01-13 14:38:31 -07:00
Franz Sirl
88ea0ad1b2 * rs6000/linux.h (CPP_PREDEFINES): Add -D__ELF__.
From-SVN: r17345
1998-01-13 14:21:05 -07:00
Jeff Law
f5e869593a * alpha/vms.h (DIR_SEPARATOR): define
From-SVN: r17344
1998-01-13 14:13:28 -07:00
Bruno Haible
6c32c807c3 Makefile.in (stamp-proto): Remove.
* Makefile.in (stamp-proto): Remove.
        (protoize.o, unprotoize.o): Straightforward compile.
        * unprotoize.c: Define UNPROTOIZE here, not in the Makefile.

From-SVN: r17343
1998-01-13 14:10:35 -07:00
Jeffrey A Law
69956def9a * lang-options.h: Add missing options.
From-SVN: r17342
1998-01-13 14:06:08 -07:00
Lee Iverson
0d3e11a596 config-ml.in (multi-do): LDFLAGS must include multilib designator.
* config-ml.in (multi-do): LDFLAGS must include multilib
        designator.

From-SVN: r17341
1998-01-13 14:01:03 -07:00
Mumit Khan
93006f8c2d cygwin32.h (STRIP_NAME_ENCODING): Define for Win32 to strip off the trailing @[NUM] added by ENCODE_SECTION_INFO.
* i386/cygwin32.h (STRIP_NAME_ENCODING): Define for Win32 to strip
        off the trailing @[NUM] added by ENCODE_SECTION_INFO.
Also update copyright forgotten in last change.

From-SVN: r17340
1998-01-13 13:58:47 -07:00
Jeffrey A Law
e4c4f8df43 netbsd.h (DWARF2_UNWIND_INFO): Define as zero for now.
* arm/netbsd.h (DWARF2_UNWIND_INFO): Define as zero for now.
        * i386/netbsd.h, m68k/netbsd.h, ns32k/netbsd.h: Likewise.
        * sparc/netbsd.h, vax/netbsd.h: Likewise.

From-SVN: r17339
1998-01-13 13:54:16 -07:00
Shigeya Suzuki
4aa0c2a5c1 * i386/bsd386.h (DWARF2_UNWIND_INFO): Define as zero for now.
From-SVN: r17338
1998-01-13 13:35:41 -07:00
H.J. Lu
09f6348b8b * libtxi/Makefile.in (AR_FLAGS): Defined as "rc".
From-SVN: r17337
1998-01-13 13:31:57 -07:00
H.J. Lu
af2de9e61f configure.in (CHECK_SUBDIRS): Set to testsuite only if ${srcdir}/../gcc exists.
* configure.in (CHECK_SUBDIRS): Set to testsuite only if
	${srcdir}/../gcc exists.
	(configdirs): Include testsuite only if ${srcdir}/../gcc exists.
	* tests/Makefile.in (check): Depend on $(CHECK).
	* tests/configure.in (CHECK): Set to "check-iostream
	check-stdio" if ${srcdir}/../../gcc doesn't exists.

From-SVN: r17336
1998-01-13 13:28:27 -07:00
H.J. Lu
ffa551c8d6 configure.in (configdirs): Include testsuite only if ${srcdir}/../gcc exists.
�
        * configure.in (configdirs): Include testsuite only if
        ${srcdir}/../gcc exists.
        * tests/configure.in (check): Set to ${CHECK} if
        ${srcdir}/../../gcc doesn't exists.

From-SVN: r17335
1998-01-13 13:24:06 -07:00
Jeff Law
2c44362274 configure.in (configdirs): Include testsuite only if ${srcdir}/../gcc exists.
�
        * configure.in (configdirs): Include testsuite only if
        ${srcdir}/../gcc exists.
        * tests/configure.in (check): Set to ${CHECK} if
        ${srcdir}/../../gcc doesn't exists.

From-SVN: r17334
1998-01-13 13:24:04 -07:00
Jim Wilson
c43143f6a1 Avoid shell errors when target_cpu_default* contains a | character.
* configure.in (target_cpu_default, target_cpu_default2): Use double
	quotes around them when testing their value.
	* configure: Rebuilt.

From-SVN: r17333
1998-01-13 10:01:56 -08:00
Jeff Law
d45b3d875b undo test change
From-SVN: r17332
1998-01-13 09:40:20 -07:00
Jeff Law
fe30ff7b7d Test
From-SVN: r17331
1998-01-13 09:39:53 -07:00
Anonymous CVS User
34af74f55f Test
From-SVN: r17330
1998-01-13 16:30:05 +00:00
Jeff Law
f682fc8f00 Testing.
From-SVN: r17329
1998-01-13 09:27:20 -07:00
Brendan Kehoe
1737fe20c5 decl.c (init_decl_processing): Only call init_rtti_processing FLAG_RTTI is set.
* decl.c (init_decl_processing): Only call init_rtti_processing
        FLAG_RTTI is set.

From-SVN: r17328
1998-01-13 07:54:24 -05:00
John Carr
4b8140a62f gengenrtl.c (gencode): Emit new function obstack_alloc_rtx to allocate rtx.
* gengenrtl.c (gencode): Emit new function obstack_alloc_rtx
to allocate rtx.
(gendef): Call obstack_alloc_rtx.

From-SVN: r17327
1998-01-13 01:06:31 -08:00
Jeff Law
82de9b284f Fix it after test commit :-)
From-SVN: r17326
1998-01-13 00:44:52 -07:00
Jeff Law
8e088a50e9 Test mail for commits
From-SVN: r17325
1998-01-13 00:44:06 -07:00
Jeff Law
2385157616 Clarify some collect2 stuff.
From-SVN: r17324
1998-01-13 00:37:58 -07:00
Robert Lipe
fe07d4c1cc configure.in: (i[3456]86-UnixWare7-sysv5): Treat much like SVR4 for now.
* configure.in: (i[3456]86-UnixWare7-sysv5): Treat much like SVR4
        for now.

From-SVN: r17323
1998-01-12 17:15:16 -07:00
Robert Lipe
936cb32345 * config.guess: Recognize i[3456]-i586-UnixWare7-sysv5.
From-SVN: r17322
1998-01-12 17:12:01 -07:00
Mumit Khan
2309252659 mingw32.h (INCOMING_RETURN_ADDR_RTX): Delete.
* i386/mingw32.h (INCOMING_RETURN_ADDR_RTX): Delete. Use the value
        of DWARF2_UNWIND_INFO, if any, from i386/cygwin32.h instead.
        (STANDARD_INCLUDE_DIR): Change to /usr/local/i386-mingw32/include.

From-SVN: r17321
1998-01-12 16:49:57 -07:00
Jim Wilson
32318600e9 * mips.md (return_internal): Change mode from SImode to VOIDmode.
From-SVN: r17320
1998-01-12 16:42:43 -07:00
Jason Merrill
a0d5fba7d2 init.c (build_new_1): Split out from build_new.
* init.c (build_new_1): Split out from build_new.
	(build_new): Just return a NEW_EXPR.
	* expr.c (cplus_expand_expr): Handle NEW_EXPR.
	* decl2.c (get_temp_regvar): Tweak.
	* cp-tree.h (TREE_CALLS_NEW): Comment out.
	* class.c (resolves_to_fixed_type_p): Remove use.
	* method.c (build_opfncall): Likewise.
	* call.c (build_new_op): Likewise.
Fix problem with 'new' in default argument.

From-SVN: r17319
1998-01-12 04:44:59 -05:00
J. Kean Johnston
ef720b21fd sco5.h (STARTFILE_SPEC, [...]): Correctly handle "-static".
* i386/sco5.h (STARTFILE_SPEC, ENDFILE_SPEC): Correctly handle
        "-static".

From-SVN: r17318
1998-01-10 14:11:00 -07:00
Stan Cox
cde218471b i386.md: (movsicc_1, movhicc_1): For alternate 3 set the opcode suffix from operand 3.
* i386.md: (movsicc_1, movhicc_1):  For alternate 3 set the opcode
        suffix from operand 3.

From-SVN: r17317
1998-01-10 14:03:36 -07:00
J"orn Rennecke
184bb750da regmove.c: New implementation of regmove pass.
* regmove.c: New implementation of regmove pass.
        * local-alloc.c (optimize_reg_copy_1, optimize_reg_copy_2): Remove
        decls, make them have external linkage.  Return a value from
        optimize_reg_copy_1.
        * reload.h (count_occurrences): Add decl.
        * reload1.c (count_occurrences): Delete decl, make it have external
        linkage.
        * rtl.h (optimize_reg_copy_1, optimize_reg_copy_2): Declare.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r17316
1998-01-10 13:54:37 -07:00
Jeff Law
9d1943807a Remove bogus CYGNUS LOCAL markers.
From-SVN: r17315
1998-01-10 12:57:29 -07:00
Jeffrey A Law
3f9e9508c3 regclass.c (record_address_regs): Don't use REG_OK_FOR_BASE_P if it is not defined.
* regclass.c (record_address_regs): Don't use REG_OK_FOR_BASE_P
        if it is not defined.

From-SVN: r17314
1998-01-10 12:30:33 -07:00
Brendan Kehoe
9e28580c86 fix comment at the top (just noticed)
From-SVN: r17313
1998-01-09 11:09:07 -05:00
Richard Henderson
3b80f6ca69 Makefile.in (OBJ, GEN, RTL_H): Add genrtl.[oh] bits.
* Makefile.in (OBJ, GEN, RTL_H): Add genrtl.[oh] bits.
* emit-rtl.c (gen_rtx): Move special code to ...
(gen_rtx_CONST_INT): New function.
(gen_rtx_REG): New function.
(*): Update all calls to gen_rtx.
* genemit.c (gen_exp): Emit calls to gen_rtx_FOO for constant FOO.
* rtl.h: Include genrtl.h; prototype CONST_INT & REG generators.
(GEN_INT): Call gen_rtx_CONST_INT.
* gengenrtl.c: New file.

From-SVN: r17312
1998-01-08 13:17:05 -08:00
Jason Merrill
f4a233434d exception.cc (__eh_alloc, __eh_free): New fns.
* exception.cc (__eh_alloc, __eh_free): New fns.
	(__cp_push_exception, __cp_pop_exception): Use them.
	(__uncatch_exception): Call terminate here if no exception.
	* except.c (build_terminate_handler): New fn.
	(expand_start_catch_block): Use it.
	(expand_exception_blocks): Likewise.
	(alloc_eh_object): New fn.
	(expand_throw): Use it.  Protect exception init with terminate.
	* typeck.c (build_modify_expr): Remove code that ignores trivial
	methods.

From-SVN: r17309
1998-01-07 19:29:08 -05:00
Brendan Kehoe
b450b6999c bastring.cc (basic_string::Rep::operator delete): Don't claim to return from deallocate, since this is a void method.
* std/bastring.cc (basic_string::Rep::operator delete): Don't claim
	to return from deallocate, since this is a void method.

From-SVN: r17297
1998-01-05 13:35:07 -05:00
John F. Carr
1c72c7f64f alias.c (*_dependence): Call base_alias_check before canon_rtx.
* alias.c (*_dependence): Call base_alias_check before canon_rtx.
        (base_alias_check): If no base found for address call canon_rtx and
        try again.

From-SVN: r17296
1998-01-05 05:00:00 -07:00
Jeff Law
291672e58b Add pointer to iecc comp.compilers archive.
From-SVN: r17295
1998-01-05 04:52:30 -07:00
Jeffrey A Law
8fa4e1b4e1 mips.c (mips_expand_prologue): Handle large frame with no outgoing arguments for mips16.
* mips.c (mips_expand_prologue): Handle large frame with no outgoing
        arguments for mips16.
        (mips_expand_epilogue): Pass "orig_tsize" to save_restore_insns.
        Don't lose if tsize is zero after handling large stack for mips16.
        * mips.md (return): For trivial return, return address is in $31.

From-SVN: r17294
1998-01-05 03:45:59 -07:00
Nigel Stephens
eb774d8d9a mips16.S: Various changes to make it work with -msingle-float and -EL.
*  mips/mips16.S: Various changes to make it work with -msingle-float
        and -EL.

From-SVN: r17293
1998-01-04 12:25:36 -07:00
Gavin Koch
2bcb2ab326 mips.c, [...]: First cut at merging in mips16 support.
* mips.c, mips.h, mips.md: First cut at merging in mips16
        support.  Major modifications throughout all three files.
Note mips16 doesn't work yet (no epilogue support), but I'll be working
on that shortly :-)

Co-Authored-By: Ian Lance Taylor <ian@cygnus.com>
Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r17292
1998-01-04 08:43:52 -07:00
Mumit Khan
d39cd7a1e9 config.sub: Add mingw32 support.
* config.sub: Add mingw32 support.
        * configure.in: Likewise.
        * config/mh-mingw32: New file.

From-SVN: r17291
1998-01-03 17:10:33 -07:00
Scott Snyder
db0d1ed937 configure.in: Make gthr-default.h a forwarding header instead of a symlink.
* configure.in: Make gthr-default.h a forwarding header instead of
        a symlink.

From-SVN: r17290
1998-01-03 17:02:05 -07:00
Kaveh R. Ghazi
86e011adce * gcov-io.h: Include sys/types.h to ensure we get size_t.
From-SVN: r17289
1998-01-03 04:29:44 -07:00
Jeff Law
1a9a83b1d1 Minor tweak.
From-SVN: r17288
1998-01-03 04:27:57 -07:00
Franz Sirl
93ad003a50 configure.in: Finalize support for {alpha|powerpc}*-*-linux-gnulibc1
/
        * configure.in: Finalize support for {alpha|powerpc}*-*-linux-gnulibc1

From-SVN: r17287
1998-01-03 04:16:38 -07:00
Franz Sirl
da741f3dfd configure.in: Finalize support for {alpha|powerpc}*-*-linux-gnulibc1
* configure.in: Finalize support for {alpha|powerpc}*-*-linux-gnulibc1

From-SVN: r17286
1998-01-03 04:16:36 -07:00
Franz Sirl
6decbc24a4 *** empty log message ***
From-SVN: r17285
1998-01-03 04:14:43 -07:00
Kaveh R. Ghazi
7987395822 * pa.h (ASM_OUTPUT_MI_THUNK): Add missing % in fprintf.
From-SVN: r17284
1998-01-03 04:09:27 -07:00
Jim Wilson
35a42f5f33 crtstuff.c (__frame_dummy): New function for irix6.
* crtstuff.c (__frame_dummy): New function for irix6.
        (__do_global_ctors): Call __frame_dummy for irix6.
        * iris6.h (LINK_SPEC): Hide __frame_dummy too.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r17281
1998-01-02 15:50:23 -07:00
Jeff Law
4aa0a3f4e8 Note various modula-3 thingies on the net.
From-SVN: r17280
1998-01-02 08:36:23 -07:00
Weiwen Liu
ef86d2ee00 * alpha.c (vms_valid_decl_attribute_p): Move within #if OPEN_VMS.
From-SVN: r17279
1998-01-01 20:59:12 -08:00
Richard Henderson
6c174fc0e6 c-decl.c (init_decl_processing): Provide proper fallback symbol for __builtin_memset.
* c-decl.c (init_decl_processing): Provide proper fallback symbol
for __builtin_memset.
* expr.c (expand_builtin) [MEMSET]: Arg 3 type code is INTEGER_TYPE
not INTEGER_CST.  Assert arg 3 is a constant.
* alpha.c (mode_width_operand): Accept 64-bit modes.
(mode_mask_operand): Likewise.
(print_operand): Likewise for 'M' and 'U' codes.
(alpha_expand_unaligned_load): New function.
(alpha_expand_unaligned_store): Likewise.
(alpha_expand_unaligned_load_words): Likewise.
(alpha_expand_unaligned_store_words): Likewise.
(alpha_expand_block_move): Likewise.
(alpha_expand_block_clear): Likewise.
* alpha.h (MOVE_RATIO): New define.
* alpha.md (extxl, ext*h, ins*l, mskxl): Name them.
(insql, insxh, mskxh, extv, extzv, insv, movstrqi, clrstrqi): New.
* alpha.h (ASM_OUTPUT_LOOP_ALIGN, ASM_OUTPUT_ALIGN_CODE): Set to 3.
(CONSTANT_ALIGNMENT, DATA_ALIGNMENT): Disable.

From-SVN: r17278
1998-01-01 20:48:04 -08:00
Richard Henderson
8fbf199e91 configure.in: Put parenthesis around TARGET_CPU_DEFAULT's value.
* configure.in: Put parenthesis around TARGET_CPU_DEFAULT's value.
* configure: Update.

From-SVN: r17277
1998-01-01 07:40:57 -08:00
Jeffrey A Law
aa2ae67960 emit-rtl.c (operand_subword): Correctly handle extracting a word from a CONST_DOUBLE for 16bit targets with...
* emit-rtl.c (operand_subword): Correctly handle extracting a word
	from a CONST_DOUBLE for 16bit targets with !WORDS_BIG_ENDIAN.

From-SVN: r17276
1998-01-01 05:55:19 -07:00
Jeff Law
9f1ff8e8ea Tweak from Kaveh.
From-SVN: r17275
1998-01-01 03:06:56 -07:00
Jeffrey A Law
2d490e3e4e mn10200.md (tstxx, cmpxx): Use "nonimmediate_operand" as predicate for first argument.
* mn10200.md (tstxx, cmpxx): Use "nonimmediate_operand" as predicate
        for first argument.

From-SVN: r17274
1998-01-01 02:51:30 -07:00
Ian Lance Taylor
6e26218fc9 configure.in: Set and subsitute host_exeext.
* configure.in: Set and subsitute host_exeext.  Use it when creating
	the assembler and linker symlinks.
	* configure: Rebuild.
	* Makefile.in (exeext): Set to @host_exeext@.
	(build_exeext): New variable, set to @build_exeext@.
	(FLAGS_TO_PASS): Pass down build_exeext.
	(STAGESTUFF): Use build_exeext, not exeext, for gen* and bi*
 	programs.

From-SVN: r17267
1997-12-31 11:48:25 +00:00
Jeffrey A Law
1b31097e5d * mn10200.md (addsi3, subsi3): Fix thinkos.
From-SVN: r17266
1997-12-31 02:05:15 -07:00
Richard Henderson
194faace59 sparc.h (ASM_OUTPUT_MI_THUNK): Move %o7 through %g1 instead of save+restore.
* sparc.h (ASM_OUTPUT_MI_THUNK): Move %o7 through %g1 instead of
save+restore.  Fix pic+big_offset delay slot.  Use "pic" case for
unix always, since we want to be able to thunk to functions in a
shared library from an application.

From-SVN: r17262
1997-12-29 16:02:54 -08:00
Ian Lance Taylor
975602f82c t-ecoff (CROSS_LIBGCC1): Define to libgcc1-asm.a.
* mips/t-ecoff (CROSS_LIBGCC1): Define to libgcc1-asm.a.
        (LIB1ASMSRC, LIB1ASMFUNCS): Define.
More mips16 merge stuff.

From-SVN: r17261
1997-12-29 06:40:28 -07:00
Jeff Law
2d48c13dc2 expr.c (expand_expr): For {BITFIELD,COMPONENT,ARRAY}_REF...
d
        * expr.c (expand_expr): For {BITFIELD,COMPONENT,ARRAY}_REF, if the
        offset's mode is not ptr_mode, convert it.

From-SVN: r17260
1997-12-29 06:15:21 -07:00
Jeff Law
0eb1ad44b6 expr.c (expand_expr): For {BITFIELD,COMPONENT,ARRAY}_REF...
a
        * expr.c (expand_expr): For {BITFIELD,COMPONENT,ARRAY}_REF, if the
        offset's mode is not ptr_mode, convert it.

From-SVN: r17259
1997-12-29 06:15:11 -07:00
Michael Meissner
eff0f7ace5 Do not define inhibit_libc if it was already defined
From-SVN: r17258
1997-12-29 12:59:45 +00:00
Brendan Kehoe
6a4b833147 Don't make gperf depend upon libg++.
* config.shared (TOLIBGCXX) [DOING_GPERF]: Delete.
        (LIBS) [DOING_GPERF]: Make it just `-L../libstdc++ -lstdc++'.
Bring over from devo.

From-SVN: r17249
1997-12-28 03:24:10 -07:00
Jeffrey A Law
2c3a56ad15 flow.c (find_basic_blocks): Don't create a new basic block for calls in a LIBCALL block.
* flow.c (find_basic_blocks): Don't create a new basic block
        for calls in a LIBCALL block.

From-SVN: r17247
1997-12-27 16:34:14 -07:00
David Edelsohn
fc97718fe2 * config/fp-bit.c (L_df_to_sf): Fix typo in last change.
From-SVN: r17246
1997-12-27 14:47:12 -07:00
Jeffrey A Law
5b5a2a1ecc * cse.c (rtx_cost): Remove conflicting default case.
From-SVN: r17245
1997-12-27 14:44:26 -07:00
Richard Henderson
128f7968b1 configure.in: Move default enabling of Haifa out of for loop.
* configure.in: Move default enabling of Haifa out of for loop.
        * configure: Rebuild.

From-SVN: r17244
1997-12-27 13:20:07 -08:00
Jeff Law
ab30fd533b Remove reference to CYGNUS LOCAL patch.
From-SVN: r17237
1997-12-24 17:01:34 -07:00
Jeffrey A Law
e81b4fbe92 * version.c: Bump for snapshot.
From-SVN: r17236
1997-12-24 17:00:58 -07:00
Teemu Torma
f24af81bca Makefile.in (GTHREAD_FLAGS): New var.
* Makefile.in (GTHREAD_FLAGS): New var.
	(LIBGCC2_CFLAGS): Added $(GTHREAD_FLAGS).
	(distclean): Remove gthr-default.h.
	* configure.in: Accept dce as a thread package.
	Check for thread.h and pthread.h.
	Link gthr-default.h to appropriate thread file and set
	gthread_flags.
	(hppa1.1-*-hpux10*): If --enable-threads, use dce threads and
	include multilib definitions from pa/t-dce-thr.
	(sparc-*-solaris2*): Enable threads by default, if thread.h or
	pthread.h is found, preferring posix threads over solaris ones.
	* config/pa/t-dce-thr: New file.
	* config/pa/t-pa: Removed multilibs.
	* config/sparc/t-sol2: Ditto.
	* gthr.h: New file.
	* gthr-single.h: New file.
	* gthr-posix.h: New file.
	* gthr-solaris.h: New file.
	* gthr-dce.h: New file.
	* libgcc-thr.h: Removed.
	* objc/thr-dce.c: New file copied from thr-decosf1.c.
	* frame.c: Include gthr.h instead of libgcc-thr.h.
	* libgcc2.c: Include gthr.h instead of libgcc-thr.h.
	(eh_context_initialize): If __gthread_once fails, use static eh
	context.
	(eh_context_free): Call __gthread_key_dtor.

From-SVN: r17235
1997-12-24 16:56:08 -07:00
Jeffrey A Law
df3b6ab30e libstdc++.exp (test_libstdc++): Set LD_LIBRARY_PATH and SHLIB_PATH appropriately.
* lib/libstdc++.exp (test_libstdc++): Set LD_LIBRARY_PATH
        and SHLIB_PATH appropriately.

From-SVN: r17234
1997-12-24 16:29:39 -07:00
Jim Wilson
556c714b3d cse.c (max_insn_uid): New variable.
* cse.c (max_insn_uid): New variable.
        (invalidate): Remove CYGNUS LOCAL patch.
        (cse_around_loop): Use max_insn_uid.
        (cse_main): Set max_insn_uid.

From-SVN: r17231
1997-12-24 15:54:37 -07:00
Jeffrey A Law
d9a4ee007b * expr.h (MUST_PASS_IN_STACK): Allow target port to override.
From-SVN: r17230
1997-12-24 15:31:54 -07:00
Jim Wilson
04bd620d20 abi64.h (LONG_MAX_SPEC): Check MIPS_ABI_DEFAULT and TARGET_DEFAULT, and define __LONG_MAX__ appropriately.
* abi64.h (LONG_MAX_SPEC): Check MIPS_ABI_DEFAULT and TARGET_DEFAULT,
        and define __LONG_MAX__ appropriately.  Add support for -mabi=X,
        -mlong64, and -mgp{32,64} options.
        * mips.c (mips_abi): Change type to int.
        * mips.h (enum mips_abi_type): Delete.
        (ABI_32, ABI_N32, ABI_64, ABI_EABI): Define as constants.
        (mips_abi): Change type to int.

From-SVN: r17229
1997-12-24 15:10:46 -07:00
John Carr
439d5a35d8 flags.h, [...]: Remove flag_alias_check; optimization is now always enabled.
* flags.h, toplev.c, calls.c, alias.c: Remove flag_alias_check;
        optimization is now always enabled.
        * calls.c (expand_call): Recognize C++ operator new as malloc-like
        function.
        * alias.c (memrefs_conflict_p): Eliminate tests now done by
        base_alias_check.
        (*_dependence): Call canon_rtx before base_alias_check.
        (init_alias_once): New function to precompute set of registers which
        can hold Pmode function arguments.
        * rtl.h: Declare init_alias_once.
        * toplev.c (compile_file): Call init_alias_once.

From-SVN: r17227
1997-12-24 14:44:46 -07:00
John Carr
6e73e66606 flags.h, [...]: Remove flag_alias_check; optimization is now always enabled.
* flags.h, toplev.c, calls.c, alias.c: Remove flag_alias_check;
        optimization is now always enabled.
        * calls.c (expand_call): Recognize C++ operator new as malloc-like
        function.
        * alias.c (memrefs_conflict_p): Eliminate tests now done by
        base_alias_check.
        (*_dependence): Call canon_rtx before base_alias_check.
        (init_alias_once): New function to precompute set of registers which
        can hold Pmode function arguments.
        * rtl.h: Declare init_alias_once.
        * toplev.c (compile_file): Call init_alias_once.

From-SVN: r17226
1997-12-24 14:39:44 -07:00
Jeffrey A Law
280e521f02 tree.c (restore_tree_status): Do not dereference a null pointer.
* tree.c (restore_tree_status): Do not dereference a null pointer.
Brought over from devo.  SHould fix 921215-1.c compilation failures.

From-SVN: r17225
1997-12-24 14:33:48 -07:00
Paul Eggert
95b8c0c8cb genattrtab.c (main): Check HAVE_{G,S}ETRLIMIT in addition to RLIMIT_STACK.
* genattrtab.c (main): Check HAVE_{G,S}ETRLIMIT in addition to
        RLIMIT_STACK.  This maintains consistency with the recent, similar
        patch to cccp.c and toplev.c.

From-SVN: r17218
1997-12-23 04:55:03 -07:00
Jeffrey A Law
d3d1907aac * config.guess: HP 9000/803 is a PA1.1 machine.
From-SVN: r17217
1997-12-23 04:40:37 -07:00
Richard Henderson
71d9b4930e genattrtab.c (expand_units): For large nr opclasses, expand function_units_used with ORX to prevent blowups.
* genattrtab.c (expand_units): For large nr opclasses, expand
function_units_used with ORX to prevent blowups.  Tag with FFS.
(num_unit_opclasses): New variable.
(gen_unit): Update it.
(enum operator): Add ORX_OP.
(operate_exp): Treat ORX as or, except don't expand across an if.
Reuse number rtx's after operating on them.
(check_attr_value): Accept IOR, AND, & FFS.
(write_test_expr): Transmute `in_comparison' to `flags'.  Allow
for attribute value caching.  Handle CONST_STRING, IF_THEN_ELSE.
(write_expr_attr_cache, write_toplevel_expr): New functions.
(write_attr_get): Handle FFS-tagged expressions.
(make_canonical): Don't expand const attributes.
(convert_const_symbol_ref): Dike out.
(evaluate_eq_attr): Handle SYMBOL_REF.
(main): Don't emit get_attr_foo for const attributes.
* alpha.c (override_options): Reinstate PROCESSOR_EV6.
(alpha_adjust_cost): Add EV6 tuning; streamline EV5 tests.
* alpha.h (REGISTER_MOVE_COST): Increase ftoi/itof cost slightly.
* alpha.md: Redo all of the scheduling, adding EV6 support, and
combining function units where possible.
(attr "type"): Split loads, stores, cmov into int/fp.  Combine
multiplies and divides.  Add EV6 sqrt, ftoi, itof.
(attr "opsize"): New attribute.
(sqrtsf2-1, sqrtdf2-1): Provide proper TP_INSN patterns.
(movsf2-[12], movdf2-[12]): Provide CIX varients; don't allow CIX
to control register allocation.
(movsi2-1, movdi2-1): Likewise.

From-SVN: r17212
1997-12-22 21:34:27 -08:00
Richard Henderson
b0435cf4cf alpha.h (CPP_PREDEFINES, [...]): Move OSF/1 specific defines out.
* alpha.h (CPP_PREDEFINES, LIB_SPEC, LINK_SPEC, STARTFILE_SPEC,
MD_STARTFILE_PREFIX, ASM_FILE_START, ASM_SPEC, ASM_FINAL_SPEC):
Move OSF/1 specific defines out.
* alpha/elf.h (TARGET_VERSION, CPP_PREDEFINES, DEFAULT_VTABLE_THUNKS):
Move Linux specific defines out.
(LINK_SPEC): Genericize.
(ASM_FILE_START): Emit .arch if using more than the base insn set.
(ASM_OUTPUT_SOURCE_LINE): Remove; identical to alpha.h version.
(SDB_DEBUGGING_INFO): Remove; gas can't handle it.
(HANDLE_SYSV_PRAGMA): Define.
* alpha/osf.h: New file.
* alpha/linux.h: Split.  Retain file-format independant defines.
Import Linux bits from elf.h.
(CPP_PREDEFINES): Take a file-format specific SUB_CPP_PREDEFINES
(FUNCTION_PROFILER): _mcount takes its address in $28.
(MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Remove undef.
* alpha/linux-ecoff.h: New file.
* alpha/linux-elf.h: New file.
* alpha/vms.h (LIB_SPEC, LINK_SPEC): Copy from osf.h.
* alpha/win-nt.h (TARGET_DEFAULT): Define.
* configure.in (alpha*-*-osf*, alpha*-*-linux*) [tm_file]:
Add new headers as appropriate.
* configure.in (alpha*): Enable Haifa by default.
(*-*-winnt3*): Change to winnt*, since we're not v3 specific.
* configure: Rebuild.

From-SVN: r17211
1997-12-22 20:42:30 -08:00
Richard Henderson
5768f2112c Makefile.in (clean): Remove the stages with their objects here ...
* Makefile.in (clean): Remove the stages with their objects here ...
(distclean): ... instead of here.

From-SVN: r17210
1997-12-22 19:16:26 -08:00
Benjamin Kosnik
eeaf420b47 *** empty log message ***
From-SVN: r17202
1997-12-23 00:04:13 +00:00
Jeff Law
750caf0dea Opps. Forgot to check it in.
From-SVN: r17188
1997-12-22 03:05:04 -07:00
Kaveh R. Ghazi
7f85441b70 call.c (add_builtin_candidate): Add default case in enumeration switch.
* call.c (add_builtin_candidate): Add default case in enumeration
        switch.
        (build_new_op): Likewise.
        (convert_like): Likewise.
        * cvt.c (build_expr_type_conversion): Likewise.
        * tree.c (real_lvalue_p): Likewise.
        (lvalue_p): Likewise.
        (cp_tree_equal): Likewise.
        * typeck.c (comptypes): Likewise.
        (build_component_ref): Likewise.
        (build_function_call_real): Likewise.
        (build_binary_op_nodefault): Likewise.
        (build_unary_op): Likewise.
        (build_modify_expr): Likewise.
        * typeck2.c (initializer_constant_valid_p): Likewise.

From-SVN: r17187
1997-12-22 02:35:49 -07:00
Kaveh R. Ghazi
9e04c65a52 cse.c (rtx_cost): Add default case in enumeration switch.
* cse.c (rtx_cost): Add default case in enumeration switch.
        * fix-header.c (recognized_macro): Likewise.
        (recognized_extern): Likewise.
        (write_rbrac): Likewise.
        * objc/objc-act.c (encode_aggregate): Likewise.
        (gen_declarator): Likewise.
        (gen_declspecs): Likewise.

From-SVN: r17186
1997-12-22 02:31:41 -07:00
Jeff Law
04029ca245 haifa-sched.c (create_reg_dead_note): Detect and handle another case where we kill more regs after sched than were...
* haifa-sched.c (create_reg_dead_note): Detect and handle another
        case where we kill more regs after sched than were killed before
        sched.
        * sched.c (create_reg_dead_note): Similarly.

From-SVN: r17183
1997-12-22 01:55:49 -07:00
Jeff Law
1d88b804fb haifa-sched.c (create_reg_dead_note): Detect and handle another case where we kill more regs after sched than were...
* haifa-sched.c (create_reg_dead_note): Detect and handle another
        case where we kill more regs after sched than were killed before
        sched.
        * sched.c (create_reg_dead_note): Similarly.

[[Split portion of a mixed commit.]]

From-SVN: r17182.2
1997-12-22 01:55:43 -07:00
Jeff Law
bbeba0ba83 * c-pragma.c: Include flags.h.
From-SVN: r17180
1997-12-22 01:16:44 -07:00
Richard Henderson
b104e095c1 It's alpha*-...
From-SVN: r17179
1997-12-21 18:40:10 -08:00
Jeff Law
3fe49f2249 Add pointer to motorola 68k info.
From-SVN: r17178
1997-12-21 14:43:08 -07:00
Mumit Khan
058536407a cygwin32.h (NO_IMPLICIT_EXTERN_C): Don't assume anything about system headers.
* i386/cygwin32.h (NO_IMPLICIT_EXTERN_C): Don't assume anything
        about system headers.
        (LIB_SPEC): Add -ladvapi32 -lshell32 to be consistent with mingw32
        and also to resolve symbols in prefix.c.
        * i386/xm-cygwin32.h (HAVE_BCOPY): Define. This avoids a conflict
        between gansidecl.h and newlib's _ansi.h when building libgcc2.a,
        when the definitions in auto-config.h is not visible.
        (HAVE_BZERO): Likewise.
        (HAVE_BCMP): Likewise.
        (HAVE_RINDEX): Likewise.
        (HAVE_INDEX): Likewise.

From-SVN: r17177
1997-12-21 14:07:08 -07:00
Jeff Law
06387d7cd8 Clarify comment.
From-SVN: r17176
1997-12-21 13:55:52 -07:00
Jeffrey A Law
44201dba49 pa.c (emit_move_sequence): Handle a function label source operand.
* pa.c (emit_move_sequence): Handle a function label source
        operand.

From-SVN: r17174
1997-12-21 13:50:37 -07:00
H.J. Lu
e2de3a4600 configure.in (host_makefile_frag, [...]): Handle multiple config files.
d
        * configure.in (host_makefile_frag, target_makefile_frag):
        Handle multiple config files.
        (alpha-*-linux*): Treat alpha-*-linux* as alpha-*-linux* and
        alpha-*-*.

From-SVN: r17170
1997-12-21 08:50:35 -07:00
H.J. Lu
aca823c140 configure.in (host_makefile_frag, [...]): Handle multiple config files.
F
        * configure.in (host_makefile_frag, target_makefile_frag):
        Handle multiple config files.
        (alpha-*-linux*): Treat alpha-*-linux* as alpha-*-linux* and
        alpha-*-*.

From-SVN: r17169
1997-12-21 08:50:33 -07:00
Nick Clifton
d300e55140 c-pragma.c (handle_pragma_token): Generate warning messages about unknown pragmas if warn_unknown_pragmas is set.
* c-pragma.c (handle_pragma_token): Generate warning messages
        about unknown pragmas if warn_unknown_pragmas is set.
        * c-decl.c (c_decode_option): Parse -Wunknown-pragmas command
        line option to set variable: warn_unknown_pragmas.

From-SVN: r17168
1997-12-21 08:24:48 -07:00
Nick Clifton
f9fc59e8c7 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
From-SVN: r17167
1997-12-21 08:22:02 -07:00
Manfred Hollstein
d3245704af mot3300.h (ASM_BYTE_OP): Don't include '\t' in the definition.
* m68k/mot3300.h (ASM_BYTE_OP): Don't include '\t' in the
        definition.
        (ASM_OUTPUT_ASCII): Prefix ASM_BYTE_OP by one single '\t'.

From-SVN: r17166
1997-12-21 07:48:50 -07:00
Jeff Law
168968da67 Makefile.in (FPBIT_FUNCS, [...]): Define.
L
        * Makefile.in (FPBIT_FUNCS, DPBIT_FUNCS): Define.
        (libgcc2.a): Depend on $(DPBIT) and $(FPBIT).  Add rules to
        generate more fine grained floating point emulation libraries.
        * config/fp-bit.c: Add protecting #ifdef to all functions so
        that they can be compiled separately.  If !FINE_GRAINED_LIBRARIES,
        then compile all suitable functions.
        (pack_d, unpack_d, fpcmp_parts): Add declarations, define with two
        underscores to avoid namespace pollution.
        * t-mn10200 (LIB2FUNCS_EXTRA): Remove fp-bit.c
        (FPBIT): Define.
        * t-mn10300 (LIB2FUNCS_EXTRA): Remove fp-bit.c and dp-bit.c
        (FPBIT): Define.
        (DPBIT): Define.

From-SVN: r17165
1997-12-21 06:45:26 -07:00
Jeff Law
a018144099 Makefile.in (FPBIT_FUNCS, [...]): Define.
e
        * Makefile.in (FPBIT_FUNCS, DPBIT_FUNCS): Define.
        (libgcc2.a): Depend on $(DPBIT) and $(FPBIT).  Add rules to
        generate more fine grained floating point emulation libraries.
        * config/fp-bit.c: Add protecting #ifdef to all functions so
        that they can be compiled separately.  If !FINE_GRAINED_LIBRARIES,
        then compile all suitable functions.
        (pack_d, unpack_d, fpcmp_parts): Add declarations, define with two
        underscores to avoid namespace pollution.
        * t-mn10200 (LIB2FUNCS_EXTRA): Remove fp-bit.c
        (FPBIT): Define.
        * t-mn10300 (LIB2FUNCS_EXTRA): Remove fp-bit.c and dp-bit.c
        (FPBIT): Define.
        (DPBIT): Define.

From-SVN: r17164
1997-12-21 06:45:24 -07:00
Jeffrey A Law
5198352eea Makefile.in (FPBIT_FUNCS, [...]): Define.
* Makefile.in (FPBIT_FUNCS, DPBIT_FUNCS): Define.
        (libgcc2.a): Depend on $(DPBIT) and $(FPBIT).  Add rules to
        generate more fine grained floating point emulation libraries.
        * config/fp-bit.c: Add protecting #ifdef to all functions so
        that they can be compiled separately.  If !FINE_GRAINED_LIBRARIES,
        then compile all suitable functions.
        (pack_d, unpack_d, fpcmp_parts): Add declarations, define with two
        underscores to avoid namespace pollution.
        * t-mn10200 (LIB2FUNCS_EXTRA): Remove fp-bit.c
        (FPBIT): Define.
        * t-mn10300 (LIB2FUNCS_EXTRA): Remove fp-bit.c and dp-bit.c
        (FPBIT): Define.
        (DPBIT): Define.

From-SVN: r17163
1997-12-21 06:45:20 -07:00
Kaveh R. Ghazi
1d300e19b6 bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration.
* bitmap.c (bitmap_clear): Ensure `inline' is at the beginning
        of the declaration.
        * c-decl.c (finish_decl): Use parentheses around && within ||.
        * rtl.c: Include stdlib.h.
        (read_skip_spaces): Add parentheses around assignments used as
        truth values.
        (read_rtx): Initialize list_rtx.
        * cppexp.c (parse_number): Use || when operands are truth values.
        * alias.c (find_base_value): Add default case.
        (memrefs_conflict): Likewise.
        * combine.c (sets_function_arg_p): Likewise.
        * genemit.c (gen_exp): Likewise.
        * local-alloc.c (contains_replace_regs): Likewise.
        * rtlanal.c (jmp_uses_reg_or_mem): Likewise.
        * fold-const.c (fold_convert): Use "&&" for truth values.
        (fold): Add default case.
        * sdbout.c (sdbout_field_types): Fix typo in declaration.
        (sdbout_one_type): Add default case.
        * alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS.
        (some_operand): Add default case.
        (input_operand): Likewise.
        (signed_comparison_operator): Likewise.
        (divmod_operator): Likewise.
        (alpha_set_memflags_1): Likewise.
        * reload1.c (reload_cse_simplify_operands): Ensure function
        always returns a value.
        * scan-decls.c (scan_decls): Likewise.
        * c-lex.c (skip_white_space): Fix typo in declaraion.
        * c-typeck.c (comp_target_types): Add parentheses around assignment
        used as truth value.
        (print_spelling): Likewise.
        (constructor_implicit, constructor_result): Remove unused variables.
        * collect2.c (scan_library): Protect prototype with
        #ifdef SCAN_LIBRARIES.
        * emit-rtl.c (find_line_note): Fix typo in declaration.
        * final.c (asm_insn_count): Protect prototype with
        #ifdef HAVE_ATTR_length.
        * flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC.
        (try_pre_increment_1, try_pre_increment): Likewise.
        * regclass.c (auto_inc_dec_reg_p): Protect prototype with
        #ifdef FORBIDDEN_INC_DEC_CLASSES.  Make return type explicit.
        * gcov-io.h (__store_long, __write_long, __read_long): Fix
        unsigned/signed comparisons.
        * gcov.c (read_files): Remove unused "first_type" variable.
        (scan _for_source_files): Initialize s_ptr.
        (function_summary): Eliminate "%lf" formatting, use %ld for
        longs.
        (output_data): Initialize branch_probs and last_line_num.
        Eliminate "%lf" formatting, use "%ld" for longs.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r17158
1997-12-20 04:31:54 -07:00
Ian Lance Taylor
afba61d142 * mips16.S: New file.
From-SVN: r17157
1997-12-19 09:55:53 -07:00
Jeff Law
6003a6bf75 *** empty log message ***
From-SVN: r17156
1997-12-19 09:44:46 -07:00
Ian Lance Taylor
18543a2208 expr.c (do_tablejump): Let CASE_VECTOR_PC_RELATIVE be an expression.
* expr.c (do_tablejump): Let CASE_VECTOR_PC_RELATIVE be an
        expression.
        * stmt.c (expand_end_case): Likewise.
        * alpha.h (CASE_VECTOR_PC_RELATIVE): Update.
        * fx80.h, gmicro.h, m68k.h, m88k.h, ns32k.h: Likewise.
        * rs6000.h, sh.h, tahoe.h, v850.h vax.h z8k.h: Likewise.

From-SVN: r17155
1997-12-19 09:43:29 -07:00
Jeff Law
f1f5f1422f *** empty log message ***
From-SVN: r17154
1997-12-19 09:34:17 -07:00
Jason Merrill
213ea7a65e tweak
From-SVN: r17144
1997-12-18 20:27:33 -05:00
Andreas Schwab
dbf3231e2f Make-lang.in: Create runtime-info.h and libobjc_entry.o in the build directory.
* objc/Make-lang.in: Create runtime-info.h and libobjc_entry.o in
	the build directory.
	(libobjc.a): Update dependency list.
	(libobjc.dll): Likewise.  Use libobjc_entry.o from the build
	directory.
	(objc/sendmsg.o): Add -Iobjc to find runtime-info.h.
	(objc.mostlyclean): Remove runtime-info.h.

From-SVN: r17143
1997-12-18 16:27:58 -07:00
Richard Henderson
e1ee5cdcbf tree.c (build_range_type): Allow creation of ranges with no maximum.
* tree.c (build_range_type): Allow creation of ranges with no maximum.
	* dbxout.c (dbxout_range_type): Handle missing TYPE_MAX_VALUE.
	* dwarf2out.c (add_subscript_info): Likewise.
	* dwarfout.c (subscript_data_attribute, byte_size_attribute): Likewise.
	* sdbout.c (plain_type_1): Likewise.
	* stmt.c (pushcase_range, all_cases_count, node_has_high_bound):
	Likewise.
	* fold-const.c (int_const_binop, fold_convert, make_range, fold):
	Likewise.

From-SVN: r17142
1997-12-18 16:20:19 -07:00
Richard Henderson
8342981f2d * com.c (ffecom_sym_transform_): Assumed arrays have no upper bound.
From-SVN: r17141
1997-12-18 16:11:42 -07:00
Jeff Law
dfe9141827 * mips.c (fatal): Remove declaration.
From-SVN: r17140
1997-12-18 15:48:31 -07:00
Jeff Law
1f3d3a3161 integrate.c (get_label_from_map): New function.
* integrate.c (get_label_from_map): New function.
        (expand_inline_function): Use it.  Initialize the label_map to
        NULL_RTX instead of gen_label_rtx.
        (copy_rtx_and_substitute): Use get_label_from_map.
        * integrate.h (get_label_from_map): New function.
        (set_label_from_map): New macro.
        * unroll.c (unroll_loop): Use them.
        (copy_loop_body): Ditto.

From-SVN: r17139
1997-12-18 15:42:41 -07:00
Mark Mitchell
6ba4439c3b pt.c (coerce_template_parms): Make sure to digest_init if possible.
* pt.c (coerce_template_parms): Make sure to digest_init if
	possible.

From-SVN: r17138
1997-12-18 14:26:14 -05:00
Ian Lance Taylor
337e2b6923 mips.h (INIT_SUBTARGET_OPTABS): Define if not defined.
* mips/mips.h (INIT_SUBTARGET_OPTABS): Define if not defined.
        (INIT_TARGET_OPTABS): Define.
        * mips/ecoff.h: Include gofast.h before mips.h.
        (INIT_SUBTARGET_OPTABS): Define instead of INIT_TARGET_OPTABS.
        * mips/elf64.h: Likewise.
        * mips/elf.h (ASM_OUTPUT_SECTION_NAME): Define.

From-SVN: r17137
1997-12-18 11:45:57 -07:00
Gavin Koch
efb84aa556 unroll.c (calculate_giv_inc): Handle constant increment found in a MEM with an appropriate REG_EQUAL note.
* unroll.c (calculate_giv_inc): Handle constant increment found in
        a MEM with an appropriate REG_EQUAL note.

From-SVN: r17136
1997-12-18 10:31:01 -07:00
Mark Mitchell
864b83b9bb decl.c (duplicate_decls): Make the newdecl virtual if the olddecl was...
* decl.c (duplicate_decls): Make the newdecl virtual if the
	olddecl was, just as is done with other attributes of olddecl.

From-SVN: r17135
1997-12-18 11:45:28 -05:00
Jason Merrill
4cac94646f typeck.c (unary_complex_lvalue): Ignore op0 when taking the address of an OFFSET_REF.
* typeck.c (unary_complex_lvalue): Ignore op0 when taking the
	address of an OFFSET_REF.

From-SVN: r17134
1997-12-18 10:07:48 -05:00
Gavin Koch
bb1b857adc * calls.c (expand_call): Implement LOAD_ARGS_REVERSED.
From-SVN: r17133
1997-12-18 08:00:06 -07:00
Jason Merrill
0253134551 except.c: Remove register_exception_table{,_p}.
* except.c: Remove register_exception_table{,_p}.
	* decl2.c (finish_file): Remove call to register_exception_table.
	* cp-tree.def: Add AGGR_INIT_EXPR.
	* error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
	AGGR_INIT_EXPR where appropriate.
	* expr.c (cplus_expand_expr): Likewise.  Simplify.

From-SVN: r17132
1997-12-18 09:52:24 -05:00
Gavin Koch
63d96a9559 dwarf2out.c (dwarf2out_frame_debug): Handle adjustments of the frame pointer in the prologue.
/
        * dwarf2out.c (dwarf2out_frame_debug): Handle adjustments of the
        frame pointer in the prologue.

From-SVN: r17131
1997-12-18 07:48:19 -07:00
Gavin Koch
913b5d5489 dwarf2out.c (dwarf2out_frame_debug): Handle adjustments of the frame pointer in the prologue.
* dwarf2out.c (dwarf2out_frame_debug): Handle adjustments of the
        frame pointer in the prologue.

From-SVN: r17130
1997-12-18 07:48:12 -07:00
Benjamin Kosnik
3493906725 *** empty log message ***
From-SVN: r17129
1997-12-18 13:06:20 +00:00
Benjamin Kosnik
4f4da4e99b c++: Don't inject friends while processing templates
* pt.c (instantiate_class_template): Don't do injection when
 	processing_template_decl is true, as pollutes current_binding_level
        for base classes.
PR g++/13911/14438

From-SVN: r17128
1997-12-18 13:03:54 +00:00
Robert Lipe
80aab652d4 * x-sco5 (CLIB) Deleted. (ALLOCA) Added.
* xm-sco5.h  (USE_C_ALLOCA) Added.

From-SVN: r17127
1997-12-18 04:51:41 -07:00
Peter Schmid
840b09b4cc * pt.c (maybe_fold_nontype_arg): Add prototype.
From-SVN: r17126
1997-12-17 13:15:00 -07:00
Bill Moyer
f5c4bc60df Adjusted egcs m68k-coff files to look like gcc2 m68k-coff files.
From-SVN: r17125
1997-12-17 16:05:51 +00:00
Richard Henderson
8dcb529511 sparc.md (jump): Don't use the annul bit around an empty loop.
* sparc.md (jump): Don't use the annul bit around an empty loop.
Patch from Kevin.Kelly@East.Sun.COM.

From-SVN: r17124
1997-12-17 07:07:39 -08:00
Stan Cox
a99503b17d jump.c: (optimize_jump): Don't use the return register as a source1 of a conditional move.
* jump.c: (optimize_jump): Don't use the return register as a
        source1 of a conditional move.

From-SVN: r17123
1997-12-16 16:52:36 -07:00
Richard Henderson
e13c943cb6 sparc.c (DF_MODES): Or the mask not the bit number.
* sparc.c (DF_MODES): Or the mask not the bit number.
(function_arg) [ARCH64]: Send unprototyped arg to fp reg first.

From-SVN: r17122
1997-12-16 15:46:23 -08:00
Christian Iseli
be3d27d60c * combine.c (force_to_mode): return immediately if operand is a CLOBBER.
From-SVN: r17121
1997-12-16 16:12:32 -07:00
Manfred Hollstein
ade7386a03 fixincludes (size_t): Add support for Motorola's stdlib.h which fails to provide a definition for size_t.
* fixincludes (size_t): Add support for Motorola's stdlib.h
        which fails to provide a definition for size_t.
        (fabs/hypot): Provide a prototype for fabs on m88k-motorola-sysv3.
        (strlen,strspn,strcspn return value): Handle different layout on sysV88.
        (hypot): Provide a fake for hypot for m88k-motorola-sysv3.
Fixes from Manfred.

From-SVN: r17120
1997-12-16 15:51:00 -07:00
Jeff Law
a24ebe1bad profile1.C (XFAIL): Expect it to fail on m68k-motorola-sysv and m88k-motorola-sysv3.
* g++.old-deja/g++.law/profile1.C (XFAIL): Expect it to fail on
	m68k-motorola-sysv and m88k-motorola-sysv3.
	* gcc.c-torture/execute/loop-2e.cexp: New file to indicate expected
	compile failures on m68k-motorola-sysv and m88k-motorola-sysv3.
	* gcc.c-torture/execute/loop-2f.cexp: Likewise.

From-SVN: r17119
1997-12-16 15:45:45 -07:00
Manfred Hollstein
f184a26462 xm-mot3300.h (ADD_MISSING_POSIX, [...]): Define to prevent unresolved externals in libio.
* m68k/xm-mot3300.h (ADD_MISSING_POSIX, ADD_MISSING_XOPEN): Define to
        prevent unresolved externals in libio.
        * m88k/xm-sysv3.h (ADD_MISSING_POSIX, ADD_MISSING_XOPEN): Likewise.

From-SVN: r17118
1997-12-16 15:42:33 -07:00
H.J. Lu
afc967911d linux64.h (LIBGCC_SPEC): Removed.
* config/sparc/linux64.h (LIBGCC_SPEC): Removed.
	(CPP_SUBTARGET_SPEC): Add %{pthread:-D_REENTRANT}.
	(LIB_SPEC): Updated for glibc 2.

From-SVN: r17117
1997-12-16 15:25:35 -07:00
Jeffrey A Law
e9818f3c28 stdarg.h: Undo BeOS changes, they break hpux.
* ginclude/stdarg.h: Undo BeOS changes, they break hpux.
        * ginclude/varargs.h: Likewise.

From-SVN: r17116
1997-12-16 13:00:15 -07:00
Jason Merrill
6748b64398 tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
* tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
	* error.c (dump_expr): Likewise.

From-SVN: r17115
1997-12-16 11:51:07 -05:00
Jeff Law
a3fd4e7530 frame.h (__register_frame, [...]): New.
* frame.h (__register_frame, __register_frame_table,
        __deregister_frame): New.
        * frame.c (__register_frame, __register_frame_table,
        __deregister_frame): New.
        * frame.c (__deregister_frame_info): Return void *.
        * frame.h (__deregister_frame_info): Ditto.
        * collect2.c (__deregister_frame_info): Ditto.

From-SVN: r17113
1997-12-15 16:28:44 -07:00
Jeffrey A Law
520cd33161 * version.c: Bump for snapshot.
From-SVN: r17112
1997-12-15 16:11:07 -07:00
Jeff Law
79c06341d6 Don't ever run autoconf in the toplevel directory :(
From-SVN: r17111
1997-12-15 15:07:48 -07:00
Jason Merrill
3496c0bec4 update
From-SVN: r17110
1997-12-15 15:40:20 -05:00
Jason Merrill
4bfc4dda74 typeck.c (build_function_call_real): Remove "inline called before definition" pedwarn.
* typeck.c (build_function_call_real): Remove "inline called before
	definition" pedwarn.

	* pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.

From-SVN: r17109
1997-12-15 15:34:29 -05:00
Richard Henderson
4f69985cf7 Missed this from the -mmemory-latency commit.
From-SVN: r17108
1997-12-15 10:40:42 -08:00
Richard Henderson
166cdf4ab4 * expmed.c (expand_shift): If SHIFT_COUNT_TRUNCATED, drop a SUBREG.
From-SVN: r17107
1997-12-15 10:39:02 -08:00
Richard Henderson
bcbbac264c alpha.c (alpha_cpu_name): New variable.
* alpha.c (alpha_cpu_name): New variable.
(alpha_mlat_string): Likewise.
(alpha_memory_latency): Likewise.
(override_options): Handle -mmemory-latency.
(alpha_adjust_cost): Adjust load cost for latency.
* alpha.h (TARGET_OPTIONS): Add meory-latency.
(REGISTER_MOVE_COST): Define in terms of memory_latency.  Take
TARGET_CIX into account.
(MEMORY_MOVE_COST): Define in terms of memory_latency.
* invoke.texi (DEC Alpha Options): Document -mmemory-latency.
* alpha.h (ASM_COMMENT_START): New macro.

From-SVN: r17106
1997-12-15 10:33:21 -08:00
Richard Henderson
1914f5da24 reload.h, [...]: Revert March 15 change.
* reload.h, reload1.c (eliminate_regs), caller-save.c, dbxout.c,
	dwarfout.c, dwarf2out.c, reload.c, sdbout.c: Revert March 15 change.
	* reload.c (push_reload): If WORD_REGISTER_OPERATIONS, reload the
	SUBREG_REG if the word count is unchanged.
	* reload1.c (eliminate_regs) [case SET]: If W_R_O, preserve
	subregs of identical word size for push_reload.

From-SVN: r17105
1997-12-15 09:55:58 -08:00
Mark Mitchell
a701efba7e toplev.c (rest_of_compilation): Don't call save_for_inline_copy if all we're doing is dealing with -Wreturn-type.
* toplev.c (rest_of_compilation): Don't call save_for_inline_copy
        if all we're doing is dealing with -Wreturn-type.

From-SVN: r17104
1997-12-15 10:55:11 -07:00
Richard Henderson
5e21ac7a62 alpha.md (zero_extendqihi2, [...]): Use and 255 instead of zapnot 1, since it schedules better.
* alpha.md (zero_extendqihi2, zero_extendqisi2, zero_extendqidi2):
        Use and 255 instead of zapnot 1, since it schedules better.

From-SVN: r17103
1997-12-15 09:55:10 -08:00
Richard Henderson
395928138c * com.c (ffecom_type_vardesc_): Vardesc.dims is a `ftnlen*'.
From-SVN: r17102
1997-12-15 09:34:23 -08:00
Jeffrey A Law
296f8acc11 stmt.c (expand_asm_operands): If an ASM has no outputs, then treat it as volatile.
* stmt.c (expand_asm_operands): If an ASM has no outputs, then treat
	it as volatile.

From-SVN: r17100
1997-12-15 08:46:40 -07:00
Jeff Law
acda6d8beb Rebuild.
From-SVN: r17099
1997-12-15 08:08:30 -07:00
Jason Merrill
5c0ad67204 cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
* cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.

	* pt.c (type_unification_real): Change __null to type void* with
	a warning.

From-SVN: r17098
1997-12-15 02:24:29 -05:00
Jeff Law
6d8ccdbbb2 Bring over changes from latest gcc-2.8 pre-release.
Mirror sched.c change into haifa-sched.c

From-SVN: r17097
1997-12-15 00:05:04 -07:00
Jeff Law
7b8dd49741 Change from latest gcc-2.8 prerelease
From-SVN: r17096
1997-12-14 23:11:01 -07:00
Mark Mitchell
3042d5bea2 call.c (implicit_conversion): Don't call build_user_type_conversion_1 with a NULL expr, since it will crash.
* call.c (implicit_conversion): Don't call
	build_user_type_conversion_1 with a NULL expr, since it will
	crash.

	* pt.c (unify): Don't try to unify array bounds if either array is
	unbounded.

From-SVN: r17095
1997-12-14 23:40:01 -05:00
Jason Merrill
be296fdb53 tweak
From-SVN: r17094
1997-12-14 22:58:21 -05:00
Jason Merrill
d9c92f3237 tweak comment
From-SVN: r17093
1997-12-14 22:58:03 -05:00
Per Bothner
14e83f2ef5 * expr.c (expand_builtin): Support BUILT_IN_FMOD - just call fmod.
From-SVN: r17090
1997-12-13 11:40:06 -08:00
Jason Merrill
9b8d9d6b02 flow.c (flow_analysis): Be consistent with find_basic_blocks in determining when a new basic block starts.
* flow.c (flow_analysis): Be consistent with find_basic_blocks in
	determining when a new basic block starts.

From-SVN: r17085
1997-12-12 20:49:10 -05:00
Jason Merrill
9664b89edd errfn.c (cp_pedwarn, [...]): Replace extern decls with casts.
* errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
	Replace extern decls with casts.

	* decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
	Update last_parm_cleanup_insn.
	(store_after_parms): Remove.
	* cp-tree.h: Adjust.

Fixes eh{39,40}.C

From-SVN: r17083
1997-12-12 19:28:00 -05:00
Jason Merrill
62189d7d8f add dwarf2 note
From-SVN: r17082
1997-12-12 18:30:45 -05:00
Richard Kenner
8a173c73b5 integrate.c (initialize_for_inline): In DECL_RTL of a PARM_DECL, look inside a (mem (addressof (mem ...))).
* integrate.c (initialize_for_inline): In DECL_RTL of a PARM_DECL,
	look inside a (mem (addressof (mem ...))).

From-SVN: r17075
1997-12-12 09:06:57 -07:00
Jeff Law
73cea257d4 Rebuild after recent changes.
From-SVN: r17074
1997-12-12 08:58:02 -07:00
Jason Merrill
74c3447c83 osf2or3.h (LIB_SPEC): Restore missing defn.
* alpha/osf2or3.h (LIB_SPEC): Restore missing defn.
Lost in 11/02 merge.

	* pa.h (TEXT_SPACE_P): Use TREE_CODE_CLASS.
	* pa.md (iorsi3): Add missing args to *_operand calls.
Simple bugs shown up by recent changes.

From-SVN: r17071
1997-12-12 05:31:22 -05:00
Jason Merrill
100d81d443 except.c (call_get_eh_context): Don't mess with sequences.
* except.c (call_get_eh_context): Don't mess with sequences.
	(emit_eh_context): Include the call in the sequence here.

From-SVN: r17070
1997-12-12 04:23:52 -05:00
Jeff Law
cba734eaca Finish last change. I'm no emacs wizard :(
From-SVN: r17069
1997-12-12 02:00:19 -07:00
Jeff Law
332c1bb4ba Fix minor bug in BeOS changes.
From-SVN: r17068
1997-12-12 01:50:19 -07:00
Jeff Law
c3b1131125 Revert last change
From-SVN: r17067
1997-12-12 01:13:05 -07:00
Paul Eggert
5a5ab947b8 collect2.c (write_c_file_glob): Allocate initial frame object in static storage and pass its address.
* collect2.c (write_c_file_glob): Allocate initial frame object
        in static storage and pass its address.

From-SVN: r17066
1997-12-12 00:37:57 -07:00
Jason Merrill
01eb7f9a1c except.c (call_get_eh_context): Don't take a parm.
* except.c (call_get_eh_context): Don't take a parm.
	Put the call at the top of the function.
	(emit_eh_context): Adjust.
	(get_eh_context): Replace with former use_eh_context.
	(get_eh_context_once, get_saved_pc_ref): Remove.
	(start_eh_unwinder, end_eh_unwinder, emit_unwinder): Remove.
	* except.h: Adjust.
	* integrate.c (expand_inline_function): Adjust.
	* toplev.c (rest_of_compilation): Don't call emit_unwinder.

tidy tidy tidy

From-SVN: r17065
1997-12-12 02:35:04 -05:00
Marc Lehmann
d19814a309 xm-go32.h (EXECUTABLE_SUFFIX): Define.
* i386/xm-go32.h (EXECUTABLE_SUFFIX): Define.
        (DIR_SEPARATOR, NO_SYS_SIGLIST): Likewise.

From-SVN: r17064
1997-12-12 00:03:24 -07:00
Dave Love
09fb2c774b linux.h (STACK_BOUNDARY): Define as 64 for glibc2.
* i386/linux.h (STACK_BOUNDARY): Define as 64 for glibc2.
        * i386/gnu.h (STACK_BOUNDARY): Define as 64.

From-SVN: r17063
1997-12-11 23:55:33 -07:00
Manfred Hollstein
7567d496ec fixincludes (str{len,spn,cspn} return value): Handle different layout on sysV88.
* fixincludes (str{len,spn,cspn} return value): Handle different
        layout on sysV88.
        (hypot): Provide a fake for hypot which is broken on
        m88k-motorola-sysv3.

From-SVN: r17062
1997-12-11 23:53:30 -07:00
John F. Carr
0a6969ad7c tree.c, tree.h: Change tree_code_type, tree_code_length, and tree_code_name from pointers to arrays.
* tree.c, tree.h: Change tree_code_type, tree_code_length, and
        tree_code_name from pointers to arrays.
        * tree.c: Remove standard_tree_code_* variables, no longer used.
        * print-tree.c: Remove declaration of tree_code_name.

        * cp/lex.c (init_lex): Update for tree_code_* changes.
        * objc/objc-act.c (init_objc): Likewise.

        * tree.def, cp/cp-tree.def, objc/objc-tree.def: Update for tree_code
        changes.

From-SVN: r17061
1997-12-11 23:49:29 -07:00
Fred Fish
c55dcc7ddd cvs commit ChangeLog config.sub configure configure.in toplev.c
From-SVN: r17060
1997-12-11 23:36:11 -07:00
Fred Fish
baf558778c * config.guess: Add BeOS support.
From-SVN: r17059
1997-12-11 23:28:39 -07:00
Jeffrey A Law
9cf3ae46c1 m68k.h (GO_IF_LEGITIMATE_ADDRESS): No longer cater to horribly old and broken Sun3 assemblers.
* m68k.h (GO_IF_LEGITIMATE_ADDRESS): No longer cater to horribly
        old and broken Sun3 assemblers.  Newer versions handle large
        offsets correctly as does the GNU assembler.

Co-Authored-By: Toon Moene <toon@moene.indiv.nluug.nl>

From-SVN: r17058
1997-12-11 23:23:19 -07:00
H.J. Lu
7cc273ade8 objc-act.c (lang_report_error_function): Disable.
* objc/objc-act.c (lang_report_error_function): Disable.
        * objc/objc-parse.y: Include "output.h".
        (yyerror): Remove redundant decl.
        (yyprint): Fix prototype.
        (apply_args_register_offset): Remove redundant decl.
        (get_file_function_name): Likewise.

From-SVN: r17057
1997-12-11 23:20:41 -07:00
Jason Merrill
ab23f7879d decl2.c (comdat_linkage): Also set DECL_COMDAT.
* decl2.c (comdat_linkage): Also set DECL_COMDAT.
	(finish_file): Check DECL_COMDAT instead of weak|one_only.
	(import_export_vtable): Use make_decl_one_only instead of
 	comdat_linkage for win32 tweak.
	(import_export_decl): Likewise.
	* pt.c (mark_decl_instantiated): Likewise.

Fix libgcc with -O3.

From-SVN: r17056
1997-12-12 01:20:32 -05:00
Jason Merrill
74d7ab557f flow.c (find_basic_blocks): A CALL_INSN that can throw starts a new basic block.
* flow.c (find_basic_blocks): A CALL_INSN that can throw starts
	a new basic block.
	(find_basic_blocks_1): Likewise.

From-SVN: r17055
1997-12-12 01:12:03 -05:00
Jason Merrill
0776059ee0 except.c (use_eh_context): Don't copy_rtx a REG.
* except.c (use_eh_context): Don't copy_rtx a REG.
	(emit_throw): Lose old unwinder support.
	(expand_internal_throw): Likewise.
	* libgcc2.c (struct eh_context): Likewise.
	(new_eh_context): Likewise.
	(__get_eh_info): Lose redundant cast.
	(__get_dynamic_handler_chain): Likewise.
	(__get_saved_pc): Lose.
	Lose all old unwinder support code.

	* decl2.c (finish_file): Lose call to expand_builtin_throw.
	* except.c (expand_builtin_throw): Remove.
	* cp-tree.h: Remove ptr_ptr_type_node.
	* decl.c: Likewise.

From-SVN: r17054
1997-12-12 00:15:30 -05:00
Teemu Torma
c404fea226 Thread-safe EH support for pthreads, DCE threads and Solaris threads.
Thu Dec 11 20:42:18 1997  Teemu Torma  <tot@trema.com>

	Thread-safe EH support for pthreads, DCE threads and Solaris threads.

	* integrate.c (expand_inline_function): If the inline fn uses eh
	context, make sure that the current fn has one.
	* toplev.c (rest_of_compilation): Call emit_eh_context.
	* except.c (use_eh_context): New fn.
	(get_eh_context_once): New fn.
	(call_get_eh_context): New fn.
	(emit_eh_context): New fn.
	(get_eh_context): Call either get_eh_context_once or
	call_get_eh_context, depending on what we have.
	(get_dynamic_handler_chain): Call get_eh_context_once.
	* except.h: Prototypes for fns above.
	* optabs.c (get_eh_context_libfunc): Removed.
	(init_optabs): Don't initialize it.
	* expr.h (get_eh_context_libfunc): Removed.
	* rtl.h, rtl.c: New reg_note REG_EH_CONTEXT.
	* config/pa/pa.h (CPP_SPEC): Support for -threads.
	* config/pa/pa-hpux10.h (LIB_SPEC): Ditto.
	* config/pa/t-pa (MULTILIB_OPTIONS, MULTILIB_DIRNAMES):
	New multilib for -threads.
	* config/sparc/t-sol2: Added multilibs for -threads and
	made -pthreads alias to it.
	* config/sparc/sol2.h (CPP_SPEC, LIB_SPEC):
	Added -threads and -pthreads options.
	* libgcc-thr.h: New file.
	* libgcc2.c: (__get_cpp_eh_context): Removed.
	(struct cpp_eh_context): Removed.
	(struct eh_context): Replaced cpp_eh_context with generic language
	specific pointer.
	(__get_eh_info): New function.
	(__throw): Check eh_context::info.
	(__sjthrow): Ditto.
	* libgcc2.c: Include libgcc-thr.h.
	(new_eh_context, __get_eh_context,
	eh_pthread_initialize, eh_context_initialize, eh_context_static,
	eh_context_specific, eh_context_free): New functions.
	(get_eh_context, eh_context_key): New variables.
	(__sjthrow, __sjpopnthrow, __eh_pcnthrow, __throw): Use
	get_eh_context to get the context.
	(longjmp): Move the declaration inside
	#ifdef DONT_USE_BUILTIN_SETJMP.
	* frame.c: Include libgcc-thr.h.
	(object_mutex): Mutex to protect the object list.
	(find_fde, __register_frame, __register_frame_table,
	__deregister_frame): Hold the lock while accessing objects.
	* except.h (get_eh_context): Declare.
	* except.c (current_function_ehc): Define.
	(current_function_dhc, current_function_dcc): Removed.
	(get_eh_context): New function.
	(get_dynamic_handler_chain): Use get_eh_context.
	(get_saved_pc_ref): Ditto.
	(get_dynamic_cleanup_chain): Removed references to
	current_function_dcc.
	(save_eh_status, restore_eh_status): Save and restore
	current_function_ehc instead.
	* optabs.c (get_eh_context_libfunc): New variable.
	(init_optabs): Initialize it.
	* expr.h: Declare get_eh_context_libfunc.
	* function.h (struct function): Replaced dhc and dcc with ehc.
	* except.c (get_saved_pc_ref): New functions.
	(eh_saved_pc_rtx, eh_saved_pc): Deleted.
	(expand_internal_throw_indirect): Use get_saved_pc_ref() instead
	of eh_saved_pc.
	(end_eh_unwinder): Likewise.
	(init_eh): Remove initialization of eh_saved_pc.
	* optabs.c (get_saved_pc_libfunc): New variable.
	(init_optabs): Initialize it.
	* expr.h: Declare get_saved_pc_libfunc.
	* except.h (eh_saved_pc_rtx): Deleted.
	(get_saved_pc_ref): Declared.

	From Scott Snyder <snyder@d0sgif.fnal.gov>:
	* libgcc2.c (__get_saved_pc): New.
	(__eh_type, __eh_pc): Deleted.
	(__eh_pcnthrow): Use __get_saved_pc() instead of __eh_pc.
	(__get_dynamic_handler_chain): Move __dynamic_handler_chain inside
	this fcn.

From-SVN: r17053
1997-12-11 23:54:37 -05:00
Teemu Torma
154bba13a4 [multiple changes]
Thu Dec 11 20:42:18 1997  Teemu Torma  <tot@trema.com>

	Thread-safe EH support for pthreads, DCE threads and Solaris threads.

	* integrate.c (expand_inline_function): If the inline fn uses eh
	context, make sure that the current fn has one.
	* toplev.c (rest_of_compilation): Call emit_eh_context.
	* except.c (use_eh_context): New fn.
	(get_eh_context_once): New fn.
	(call_get_eh_context): New fn.
	(emit_eh_context): New fn.
	(get_eh_context): Call either get_eh_context_once or
	call_get_eh_context, depending on what we have.
	(get_dynamic_handler_chain): Call get_eh_context_once.
	* except.h: Prototypes for fns above.
	* optabs.c (get_eh_context_libfunc): Removed.
	(init_optabs): Don't initialize it.
	* expr.h (get_eh_context_libfunc): Removed.
	* rtl.h, rtl.c: New reg_note REG_EH_CONTEXT.
	* config/pa/pa.h (CPP_SPEC): Support for -threads.
	* config/pa/pa-hpux10.h (LIB_SPEC): Ditto.
	* config/pa/t-pa (MULTILIB_OPTIONS, MULTILIB_DIRNAMES):
	New multilib for -threads.
	* config/sparc/t-sol2: Added multilibs for -threads and
	made -pthreads alias to it.
	* config/sparc/sol2.h (CPP_SPEC, LIB_SPEC):
	Added -threads and -pthreads options.
	* libgcc-thr.h: New file.
	* libgcc2.c: (__get_cpp_eh_context): Removed.
	(struct cpp_eh_context): Removed.
	(struct eh_context): Replaced cpp_eh_context with generic language
	specific pointer.
	(__get_eh_info): New function.
	(__throw): Check eh_context::info.
	(__sjthrow): Ditto.
	* libgcc2.c: Include libgcc-thr.h.
	(new_eh_context, __get_eh_context,
	eh_pthread_initialize, eh_context_initialize, eh_context_static,
	eh_context_specific, eh_context_free): New functions.
	(get_eh_context, eh_context_key): New variables.
	(__sjthrow, __sjpopnthrow, __eh_pcnthrow, __throw): Use
	get_eh_context to get the context.
	(longjmp): Move the declaration inside
	#ifdef DONT_USE_BUILTIN_SETJMP.
	* frame.c: Include libgcc-thr.h.
	(object_mutex): Mutex to protect the object list.
	(find_fde, __register_frame, __register_frame_table,
	__deregister_frame): Hold the lock while accessing objects.
	* except.h (get_eh_context): Declare.
	* except.c (current_function_ehc): Define.
	(current_function_dhc, current_function_dcc): Removed.
	(get_eh_context): New function.
	(get_dynamic_handler_chain): Use get_eh_context.
	(get_saved_pc_ref): Ditto.
	(get_dynamic_cleanup_chain): Removed references to
	current_function_dcc.
	(save_eh_status, restore_eh_status): Save and restore
	current_function_ehc instead.
	* optabs.c (get_eh_context_libfunc): New variable.
	(init_optabs): Initialize it.
	* expr.h: Declare get_eh_context_libfunc.
	* function.h (struct function): Replaced dhc and dcc with ehc.
	* except.c (get_saved_pc_ref): New functions.
	(eh_saved_pc_rtx, eh_saved_pc): Deleted.
	(expand_internal_throw_indirect): Use get_saved_pc_ref() instead
	of eh_saved_pc.
	(end_eh_unwinder): Likewise.
	(init_eh): Remove initialization of eh_saved_pc.
	* optabs.c (get_saved_pc_libfunc): New variable.
	(init_optabs): Initialize it.
	* expr.h: Declare get_saved_pc_libfunc.
	* except.h (eh_saved_pc_rtx): Deleted.
	(get_saved_pc_ref): Declared.

	From Scott Snyder <snyder@d0sgif.fnal.gov>:
	* libgcc2.c (__get_saved_pc): New.
	(__eh_type, __eh_pc): Deleted.
	(__eh_pcnthrow): Use __get_saved_pc() instead of __eh_pc.
	(__get_dynamic_handler_chain): Move __dynamic_handler_chain inside
	this fcn.

cp/:
Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>

	* decl.c (ptr_ptr_type_node): Define.
	(init_decl_processing): Initialize it.
	* cp-tree.h: Declare it.
	* exception.cc (__cp_exception_info): Use __get_eh_info.
	(__cp_push_exception): Ditto.
	(__cp_pop_exception): Ditto.

	From Scott Snyder <snyder@d0sgif.fnal.gov>:
        * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
	saved_pc.
	(init_exception_processing): Removed saved_pc initialization.

From-SVN: r17052
1997-12-11 23:53:20 -05:00
Jeff Law
24a184c9e7 Rebuild after recent changes.
From-SVN: r17051
1997-12-11 20:49:00 -07:00
John F. Carr
b16d8734bc sol2.h: Use 64 bit multiply and divide functions in Solaris libc.
* sparc/sol2.h: Use 64 bit multiply and divide functions in
        Solaris libc.  Define TARGET_LIVE_G0 and TARGET_BROKEN_SAVERESTORE
        as 0.

From-SVN: r17050
1997-12-11 17:39:47 -07:00
John F. Carr
68d753125e rtl.h (global_rtl): New variable, replacing separate variables for commonly used rtl.
* rtl.h (global_rtl): New variable, replacing separate variables for
        commonly used rtl.
        (const_int_rtx): Now array of rtx_def, not rtx.
        * emit-rtl.c: Update for new rtl data structures.
        * genattrtab.c: Define global_rtl.

From-SVN: r17049
1997-12-11 17:27:40 -07:00
David Edelsohn
44517326d6 configure.in ({rs6000,powerpc}-*-*): Enable Haifa scheduler by default.
* configure.in ({rs6000,powerpc}-*-*): Enable Haifa scheduler by
        default.

From-SVN: r17046
1997-12-11 15:51:34 -07:00
Brendan Kehoe
07526eaed5 Bring over from changes from devo.
From-SVN: r17045
1997-12-11 11:46:55 -07:00
Brendan Kehoe
dd6f85cd5e tFile.cc (t4): Cast TMPFILE to char* in the call to unlink...
* tFile.cc (t4): Cast TMPFILE to char* in the call to unlink, to
        solve warning problems with vxworks headers that leave const off
        their declarations.
Brought over from devo.

From-SVN: r17044
1997-12-11 11:44:36 -07:00
Brendan Kehoe
6564e475c6 libio.h (__P): Name its arg p' instead of params'.
* libio.h (__P): Name its arg `p' instead of `params'.
        Avoids problems with an unchanged Solaris math.h header.
Bring over from devo.

From-SVN: r17043
1997-12-11 11:41:22 -07:00
Michael Meissner
fc50a8b9f2 stdiostream.cc (sys_read): Declare ch with int type, rather than without a type.
* stdiostream.cc (sys_read): Declare ch with int type, rather than
        without a type.

Bring over from devo.

From-SVN: r17042
1997-12-11 11:31:56 -07:00
H.J. Lu
f49b1654d3 * configure.in (target frags): Add *-linux-gnu.
From-SVN: r17041
1997-12-11 11:19:38 -07:00
Jeff Law
b472527b0f Another handful of gcc-2.8 changes (will it ever go out the door?).
See ChangeLog.11 for details.

From-SVN: r17040
1997-12-11 09:26:05 -07:00
Jason Merrill
c4ae3f91a2 * pt.c (instantiate_decl): Defer all templates but inline functions.
From-SVN: r17039
1997-12-11 00:15:37 -05:00
Jeff Law
f40421ce8c * combine.c (simplify_rtx, case ABS): Do nothing for ASM_OPERANDS.
From-SVN: r17038
1997-12-10 18:13:57 -07:00
Anthony Green
8587487b11 Fixed typo.
From-SVN: r17036
1997-12-10 20:36:00 +00:00
Jeff Law
c6c00ce60b Fix thinko.
From-SVN: r17032
1997-12-09 12:20:43 -07:00
Jason Merrill
eb291d0511 init.c (expand_vec_init): Don't fold a list of parameters.
* init.c (expand_vec_init): Don't fold a list of parameters.

Fixes kde.

From-SVN: r17031
1997-12-09 13:59:59 -05:00
Manfred Hollstein
08ce327637 toplev.c (main): Check HAVE_GETRLIMIT and HAVE_SETRLIMIT in addition to RLIMIT_STACK to see if...
* toplev.c (main): Check HAVE_GETRLIMIT and HAVE_SETRLIMIT in addition
        to RLIMIT_STACK to see if we can call getrlimit and setrlimit.

From-SVN: r17030
1997-12-09 09:41:12 -07:00
David Edelsohn
c229cba913 rs6000.h (FUNCTION_ARG_PADDING): Define.
* rs6000.h (FUNCTION_ARG_PADDING): Define.
        * rs6000.c (function_arg_padding): New function.

From-SVN: r17029
1997-12-09 09:35:56 -07:00
Manfred Hollstein
b2c59d0b27 * m68k.c: Include tree.h only once.
From-SVN: r17028
1997-12-09 09:33:10 -07:00
Richard Kenner
c1132c273c integrate.c (save_for_inline_copying): Make a new reg_parm_stack_loc.
* integrate.c (save_for_inline_copying): Make a new reg_parm_stack_loc.
From Kenner, fixes more ADDRESSOF problems.

From-SVN: r17027
1997-12-09 09:29:43 -07:00
Jeffrey A Law
a1d061a151 * Partially cleaned up prototyping code from HJ.
* tree.h: Add many prototypes.

From-SVN: r17025
1997-12-09 02:03:51 -07:00
Jeffrey A Law
ac957f1381 * Partially cleaned up prototyping code from HJ.
* haifa-sched.c (haifa_classify_insn): Renamed from classify_insn.
        All references changed.
        * rtl.h: Protect from multiple inclusions.  Add many prototypes.

        * libgcc2.c (string.h): Hoist inclusion to occur before first use of
        string functions like strlen.
More pending patches.

From-SVN: r17024
1997-12-09 01:20:07 -07:00
Manfred Hollstein
0a232106fc configure.in: Check for functions getrlimit and setrlimit.
* configure.in: Check for functions getrlimit and setrlimit.
        * cccp.c (main): Check HAVE_GETRLIMIT and HAVE_SETRLIMIT in addition
        to RLIMIT_STACK to see if we can call getrlimit and setrlimit.

From-SVN: r17023
1997-12-09 00:55:17 -07:00
Jason Merrill
67437d5b5d decl.c (copy_args_p): Handle copy elision for types with virtual bases.
* decl.c (copy_args_p): Handle copy elision for types with virtual
 	bases.
  	* call.c (build_over_call): Likewise.

From-SVN: r17022
1997-12-09 02:26:26 -05:00
Jay Sachs
25b76cc193 * Makefile.in (compare*): Handle losing behavior from 4.4bsd make.
From-SVN: r17021
1997-12-08 23:53:10 -07:00
Richard Henderson
2625008199 alpha.c (REG_RA, [...]): Fix merge problems.
* alpha.c (REG_RA, alpha_return_addr, output_epilog):
Fix merge problems.

* alpha.c (override_options): Don't know about scheduling for EV6.
* alpha.md (ev5 function units): Don't overload as ev6.

* alpha.c (alpha_adjust_cost): Simplify.  Fix typo in ev5 mult case.
* alpha.md (define_attr type): Add mvi.
(ev5_e0): Define sceduling parameters for it.
(TARGET_MAX insns): Type is mvi not shift.

From-SVN: r17020
1997-12-08 21:11:34 -08:00
Richard Henderson
7120f213ca * alpha/win-nt.h (TRAMPOLINE_TEMPLATE): Fix backported gcc-2.8 bug.
From-SVN: r17019
1997-12-08 18:17:09 -08:00
Joern Rennecke
ef13259145 Remove suprious file.
From-SVN: r17015
1997-12-09 00:11:26 +00:00
J"orn Rennecke
de51aecbeb noncompile.exp (921102-1.c): Fixed comment.
* noncompile/noncompile.exp (921102-1.c): Fixed comment.
	(940510-1.c): Removed duplicate.
	(971104-1.c): New test.

From-SVN: r17013
1997-12-09 00:05:54 +00:00
J"orn Rennecke
afa80947b5 * cstamp-h, auto-config.h: Delete non-source files.
From-SVN: r17012
1997-12-08 21:20:49 +00:00
Jeff Law
e212985565 Delete bogus file from gcc-2.8 tarball.
From-SVN: r17011
1997-12-08 13:45:05 -07:00
Joern Rennecke
d38fbd282d Amend Copyright notice.
From-SVN: r17010
1997-12-08 20:31:19 +00:00
Jeff Law
efeb5d4f96 Fix typo.
From-SVN: r17008
1997-12-08 12:39:42 -07:00
Mark Mitchell
4de02abdfd pt.c (lookup_template_function): Copy the template arguments...
* pt.c (lookup_template_function): Copy the template arguments,
	not just the list containing them, to the permanent obstack.

From-SVN: r17006
1997-12-08 01:41:17 -05:00
Jeffrey A Law
51ca169b6e * version.c: Bump for snapshot.
From-SVN: r17004
1997-12-07 19:36:13 -07:00
Jason Merrill
2b8b44d804 except.c (expand_start_catch_block): suspend_momentary for the terminate handler.
* except.c (expand_start_catch_block): suspend_momentary for the
	terminate handler.

From-SVN: r17003
1997-12-07 21:25:36 -05:00
Jeff Law
14cd4d23c8 Updates from gcc-2.8 test tarball to current gcc-2.8 tarball.
From-SVN: r17002
1997-12-07 18:42:52 -07:00
Jason Merrill
0fb9f1c39b error.c (dump_decl): Handle LOOKUP_EXPR.
* error.c (dump_decl): Handle LOOKUP_EXPR.

Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>

	* rtti.c (build_dynamic_cast): Copy the cast-to type to the
	permanent obstack if we are processing a template decl.
	* typeck.c (build_static_cast): Likewise.
	(build_const_cast): Likewise.
	(build_reinterpret_cast): Likewise.

	* pt.c (coerce_template_parms): Coerce some expressions, even
	when processing_template_decl.

From-SVN: r17001
1997-12-07 19:33:08 -05:00
Jeff Law
0fe09481b0 Note point where we merged in changes from gcc-2.8.
From-SVN: r16999
1997-12-07 09:58:32 -07:00
Jody Goldberg
4ef0de1177 bastring.h: Move closer to the draft standard implementation of basic_string by adding 3...
Sun Dec  7 02:34:40 1997  Jody Goldberg	<jodyg@idt.net>

	* libstdc++/std/bastring.h : Move closer to the draft standard
	implementation of basic_string by adding 3 paramter 'Allocator'.
	NOTE: this still differs from the standard in not offering per
	instance allocators.
	* libstdc++/std/bastring.cc : Likewise.
	* libstdc++/stlinst.cc : Handle thread safe allocators if they are the
	default.

From-SVN: r16993
1997-12-07 05:41:01 -05:00
Jason Merrill
179b008f3e iosfwd: New header.
* iosfwd: New header.
	* Makefile.in (HEADERS): Add it.

Sun Dec  7 02:32:20 1997  Gregory L. Galloway (gregg@eoeml.gtri.gatech.edu)

	* Makefile.in (HEADERS): Modified list of headers to
	install to include all of SGI STL headers especially hash_set and
	hash_map, and added ANSI C++ style wrappers for fstream, iomanip,
	iostream, and strstream.

	* fstream, iomanip, iostream, strstream: New forwarding headers
	added.

From-SVN: r16991
1997-12-07 05:33:36 -05:00
Jason Merrill
79a7c7faab [multiple changes]
Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>

	* typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
	handling of pointer difference expressions.

	* typeck.c (comp_target_types): Comparison of function/method types
	is independent of nptrs.

Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>

	* pt.c (tsubst): Avoid creating pointer to reference and
	reference to reference types.

From-SVN: r16990
1997-12-07 05:01:16 -05:00
Jeffrey A Law
1616936627 * cccp.c: Fix typo brought over in merge.
From-SVN: r16989
1997-12-06 22:21:05 -07:00
Jeff Law
956d69504d Merge from gcc-2.8
From-SVN: r16987
1997-12-06 17:31:01 -07:00
Jeff Law
27b6b158c2 This commit was generated by cvs2svn to compensate for changes in r16983,
which included commits to RCS files with non-trunk default branches.

From-SVN: r16984
1997-12-06 10:30:09 -07:00
Jeff Law
db2a8c5b6d Initial revision
From-SVN: r16981
1997-12-06 10:29:33 -07:00
Jeff Law
d62541ec15 Initial revision
From-SVN: r16980
1997-12-06 10:18:39 -07:00
Jeff Law
da932f04bf m68k.c: Include tree.h for dwarf2out_cfi_label.
* m68k.c: Include tree.h for dwarf2out_cfi_label.

        * gcc.c (process_command): Do not take address of function fatal when
        calling lang_specific_driver.

        * config/i386/cygwin32.h (DWARF2_UNWIND): Exception handling
        doesn't work with it yet, so set it to 0.
        * config/i386/xm-cygwin32.h (NO_SYS_SIGLIST): Define.

        * cse.c (cse_insn): Check for invalid entries when taking references.
More assorted pending patches.

From-SVN: r16978
1997-12-06 08:48:29 -07:00
Jeff Law
aa2fbe8d1f Fix bug in test
From-SVN: r16977
1997-12-06 08:45:59 -07:00
Jason Merrill
46422d6c5f parse.y (do_id): New nonterminal.
* parse.y (do_id): New nonterminal.
	(template_id): Use it.

From-SVN: r16974
1997-12-06 04:34:46 -05:00
Jeff Law
81797aba4d loop.c (invariant_p): Don't test flag_rerun_loop_opt.
* loop.c (invariant_p): Don't test flag_rerun_loop_opt.
        (loop_optimize, scan_loop, strength_reduce): New argument unroll_p.
        * toplev.c (rest_of_compilation): Pass it.  Remove code to
        save / clear / restore flag_unroll_{,all_}loops.

        * i386.c (notice_update_cc): Remove bogus pentium GCC code.

        * stmt.c (warn_if_unused_value): Don't warn for TRY_CATCH_EXPR.
Various pending patches.

From-SVN: r16973
1997-12-06 00:38:01 -07:00
H.J. Lu
a58248fa8a streambuf.cc (streambuf::~streambuf): Don't delete _lock for _IO_stdin/_IO_stdout/_IO_stderr.
* streambuf.cc (streambuf::~streambuf): Don't delete _lock
        for _IO_stdin/_IO_stdout/_IO_stderr.

From-SVN: r16972
1997-12-06 00:32:08 -07:00
Jason Merrill
7211716df4 parse.y (template_id): do_identifier for PFUNCNAMEs, too.
* parse.y (template_id): do_identifier for PFUNCNAMEs, too.
	* spew.c (yylex): Don't do_identifier here.
	* decl2.c (build_expr_from_tree): Revert last change.

	* decl2.c (build_expr_from_tree): Expand the name for a method call.
	* parse.y (object_template_id): Don't try to take the DECL_NAME.

From-SVN: r16971
1997-12-05 22:43:05 -05:00
Jeff Law
f2d765451e release branch changes from 11-27 snapshot to egcs-1.0.
From-SVN: r16970
1997-12-05 15:13:17 -07:00
Jeff Law
435bba3a39 typo in last delta.
From-SVN: r16956
1997-12-04 22:55:31 -07:00
Jason Merrill
d07daca1e5 except.c (get_dynamic_handler_chain): Only make the call once per function.
* except.c (get_dynamic_handler_chain): Only make the call once per
 	function.

From-SVN: r16955
1997-12-04 22:06:17 -05:00
Jim Wilson
0609f0216f Add patch from release branch accidentally left off the mainline.
* mips.md (fix_truncdfsi2, fix_truncsfsi2, fix_truncdfdi2,
	fix_truncsfdi2): Change *X to ?*X.

From-SVN: r16954
1997-12-04 17:10:51 -08:00
Benjamin Kosnik
249555b0af missing part of Sept 22 change brought over:
* decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
	set,don't clear TREE_USED wholesale.

From-SVN: r16953
1997-12-04 19:48:46 -05:00
Jeffrey A Law
e7757d6919 * strsignal.c (sys_nsig): Try NSIG and _NSIG.
From-SVN: r16952
1997-12-04 17:22:32 -07:00
Joern Rennecke
01d34110af Moved to noncompile.
From-SVN: r16951
1997-12-04 21:17:39 +00:00
Jason Merrill
5dfa752018 * except.c (expand_end_all_catch): Fix for sjlj exceptions.
From-SVN: r16950
1997-12-04 14:52:49 -05:00
J"orn Rennecke
4d7b7169c5 sh.c (final_prescan_insn): Use local label prefix when emitting .uses pseudo-ops.
* sh.c (final_prescan_insn): Use local label prefix
        when emitting .uses pseudo-ops.

From-SVN: r16949
1997-12-04 17:45:10 +00:00
Jason Merrill
2face51965 init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for alloc_expr.
* init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
 	alloc_expr.
  	* call.c (build_op_delete_call): Adjust.

From-SVN: r16939
1997-12-04 05:03:02 -05:00
Jason Merrill
11f39cf45f oops
From-SVN: r16938
1997-12-04 04:41:53 -05:00
Jason Merrill
e701eb4de0 ./: * libgcc2.c (__throw): Use __builtin_return_addr instead of __eh_pc.
* except.c: Lose outer_context_label_stack.
 	(expand_eh_region_end): Rethrow from outer_context here.
	(expand_fixup_region_end): Let expand_eh_region_end do the rethrow.
	(expand_internal_throw): Take no args.
	(expand_internal_throw_indirect): Lose.
	(expand_leftover_cleanups, expand_start_all_catch): Use expand_rethrow.
	(expand_start_all_catch): Start a rethrow region.
	(expand_end_all_catch): End it.
	(expand_rethrow): New fn.
	* except.h: Reflect above changes.

cp/:	* except.c (expand_end_catch_block): Lose rethrow region.
	(expand_start_catch_block): Likewise.
	(expand_end_catch_block): Don't expand_leftover_cleanups.

From-SVN: r16937
1997-12-04 04:41:38 -05:00
Jason Merrill
a1e343dd7a tweak
From-SVN: r16936
1997-12-04 04:16:21 -05:00
Jeffrey A Law
6a242b6a41 * i386/t-sol2 (CRTSTUFF_T_CFLAGS): Turn on the optimizer.
From-SVN: r16935
1997-12-04 00:26:05 -07:00
Jason Merrill
3cd08147fd update
From-SVN: r16934
1997-12-04 02:22:02 -05:00
Joern Rennecke
a6765b81fa Added some words on FLOAT_WORDS_BIG_ENDIAN.
From-SVN: r16932
1997-12-03 23:37:38 +00:00
Benjamin Kosnik
53d4d75f4b pt.c (tsubst): Remove tree_cons call (places redundant info into DECL_TEMPLATE_INSTANTIATION).
* pt.c (tsubst): Remove tree_cons call (places redundant info into
 	DECL_TEMPLATE_INSTANTIATION).

From-SVN: r16931
1997-12-03 21:25:10 +00:00
Jason Merrill
ca6d8cae45 new
From-SVN: r16930
1997-12-03 15:29:19 -05:00
Jason Merrill
9762d48da5 except.c (expand_fixup_region_end): New fn.
* except.c (expand_fixup_region_end): New fn.
	(expand_fixup_region_start): Likewise.
	(expand_eh_region_start_tree): Store cleanup into finalization here.
	* stmt.c (expand_cleanups): Use them to protect fixups.

From-SVN: r16929
1997-12-03 15:04:31 -05:00
Jason Merrill
aa36c0813a tree.c (is_overloaded_fn): Handle getting a fn template.
* tree.c (is_overloaded_fn): Handle getting a fn template.
	(really_overloaded_fn): Likewise.
	* error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
	* pt.c (check_explicit_specialization): Tweak.
	(determine_explicit_specialization): Tweak.

	* tree.c, cp-tree.h (get_target_expr): New fn.

1997-12-02  Mark Mitchell  <mmitchell@usa.net>

	* pt.c (determine_explicit_specialization): Avoid an internal
	error for bad specializations.

	* method.c (build_overload_value): Handle SCOPE_REF.

From-SVN: r16928
1997-12-03 14:46:56 -05:00
Gavin Koch
868e82ab1f mips.md (muldi3_r4000): Broaden the output template and attribute assignments to handle three operand...
* mips/mips.md (muldi3_r4000): Broaden the output template
	and attribute assignments to handle three operand dmult;
	rename to muldi3_internal2.
	(muldi3): Call the new muldi3_internal2 for R4000, and
	any GENERATE_MULT3 chip.

From-SVN: r16927
1997-12-03 16:47:25 +00:00
Jason Merrill
716cc7f778 * stmt.c (expand_decl_cleanup): Update thisblock after eh_region_start.
From-SVN: r16896
1997-12-02 22:42:32 -05:00
Jason Merrill
de35891e21 [multiple changes]
Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>

	* class.c (prepare_fresh_vtable): Enable even more complex MI
	vtable names.

Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* exception.cc (__check_eh_spec): Optimize a bit.

	* exception.cc (__cp_pop_exception): Lose handler arg.
	* except.c (do_pop_exception): Likewise.
	(push_eh_cleanup): Let the cleanup mechanism supply the handler.
	(expand_end_catch_block): Likewise.

From-SVN: r16895
1997-12-02 22:37:17 -05:00
Jim Wilson
9fb82071ff Better fix for loop unrolling problem.
* unroll.c (find_splittable_givs):  Remove last change.  Handle givs
	with a dest_reg that was created by loop.

From-SVN: r16893
1997-12-02 12:57:41 -08:00
Jeff Law
898f531b0b More doc junk.
From-SVN: r16891
1997-12-02 13:16:00 -07:00
Jeffrey A Law
205cba5349 Makefile.in (INSTALL_TARGET_CROSS): Define.
* Makefile.in (INSTALL_TARGET_CROSS): Define.
        (install-cross, install-gcc-cross): New targets.

From-SVN: r16888
1997-12-02 10:53:36 -07:00
Jeff Law
dc994f8461 C9X draft.
From-SVN: r16885
1997-12-02 10:01:35 -07:00
Jeffrey A Law
561b3c6ad5 * Make-lang.in (f77.clean): Remove g77.c.
From-SVN: r16883
1997-12-02 09:54:03 -07:00
Jeff Law
fbdd9d76bf From egcs release branch
From-SVN: r16867
1997-12-01 11:18:10 -07:00
Jeff Law
f45ebe4754 O Bring in changes from release branch (egcs_ss_971127).
From-SVN: r16866
1997-12-01 10:53:12 -07:00
Jeffrey A Law
7dfef6ed40 Bring in changes from release branch (egcs_ss_971127).
From-SVN: r16865
1997-12-01 10:45:00 -07:00
Jeffrey A Law
b4dfb70720 * configure.in: Fix NCR entries.
From-SVN: r16821
1997-11-28 10:04:14 -07:00
Jason Merrill
74cd8397f8 pt.c (check_explicit_specialization): Complain about using a template-id for a non-specialization.
* pt.c (check_explicit_specialization): Complain about using a
	template-id for a non-specialization.

Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>

        * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.

From-SVN: r16818
1997-11-28 05:30:44 -05:00
Jason Merrill
6a0d3671ed fix
From-SVN: r16817
1997-11-28 05:28:34 -05:00
Jeff Law
2d2e705431 Grr. Used the wrong patchfile last time.
From-SVN: r16816
1997-11-27 21:42:28 -07:00
Jeffrey A Law
586a5f993a flow.c (find_basic_blocks): Handle cfg issues for rethrows and nested exceptions correctly.
* flow.c (find_basic_blocks): Handle cfg issues for rethrows and
        nested exceptions correctly.

From-SVN: r16812
1997-11-27 20:10:10 -07:00
Jason Merrill
c2840dfb8a typeck.c (build_const_cast): Handle references here instead of handing off to convert_to_reference.
* typeck.c (build_const_cast): Handle references here instead of
	handing off to convert_to_reference.

From-SVN: r16810
1997-11-27 17:18:28 -05:00
Jason Merrill
fb98cff689 except.c: Lose Unexpected, SetTerminate, SetUnexpected, TerminateFunctionCall.
* except.c: Lose Unexpected, SetTerminate, SetUnexpected,
 	TerminateFunctionCall.
	(init_exception_processing): Likewise.  Terminate et al are now
 	the fns, not ADDR_EXPRs.
	(various): Lose redundant assemble_external calls.
	(do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.

From-SVN: r16805
1997-11-27 15:55:44 -05:00
Jason Merrill
77be6f8209 cp-tree.h (struct lang_decl_flags): Add comdat.
* cp-tree.h (struct lang_decl_flags): Add comdat.
	(DECL_COMDAT): New macro.
	* decl.c (duplicate_decls): Propagate it.
	(cp_finish_decl): Handle it.
	* decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.

From-SVN: r16804
1997-11-27 14:26:15 -05:00
Jeffrey A Law
80c2681c0a unroll.c (find_splittable_givs): Don't split givs with a dest_reg that was created by loop.
* unroll.c (find_splittable_givs): Don't split givs with a dest_reg
        that was created by loop.

From-SVN: r16803
1997-11-27 12:24:06 -07:00
Jason Merrill
aa59881828 class.c: Remove static pending_hard_virtuals.
* class.c: Remove static pending_hard_virtuals.
 	(add_virtual_function): Take pointers to pending_virtuals
	and pending_hard_virtuals.
	(finish_struct_1): Pass them.  Declare pending_hard_virtuals.

From-SVN: r16787
1997-11-27 04:45:25 -05:00
Jeffrey A Law
0632562c8a Makefile.in (insatll): Change gxx_includedir to gcc_include_dir.
* Makefile.in (insatll): Change gxx_includedir to gcc_include_dir.
        * config.shared (gxx_includedir): Remove default definition.
        * config/linux.mt: Change gxx_includedir to gxx_include_dir.
        * config/linuxaxp1.mt: Likewise.

From-SVN: r16786
1997-11-27 01:39:12 -07:00
Jeffrey A Law
c30555846b * Makefile.in (install): Change gxx_includedir to gxx_include_dir.
From-SVN: r16785
1997-11-27 01:37:59 -07:00
Jeffrey A Law
96b0f1fc03 Makefile.in (INSTALL_TARGET): Do install-gcc first.
* Makefile.in (INSTALL_TARGET): Do install-gcc first.
        * configure (gxx_include_dir): Provide a definition for subdirs
        which do not use autoconf.

From-SVN: r16784
1997-11-27 01:37:03 -07:00
Jeff Law
93adf99417 New entry.
From-SVN: r16780
1997-11-27 00:31:04 -07:00
Jason Merrill
eb773359de decl2.c (import_export_vtable): If we support one_only but not weak symbols...
* decl2.c (import_export_vtable): If we support one_only but not
	weak symbols, mark instantiated template vtables one_only.
	(import_export_decl): Likewise for tinfo functions.
	(finish_vtable_vardecl): Also write out vtables from explicitly
	instantiated template classes.
	* pt.c (mark_class_instantiated): Revert last change.

From-SVN: r16779
1997-11-27 02:31:02 -05:00
Jason Merrill
e872bb7a78 except.c (expand_throw): Call mark_used on the destructor.
* except.c (expand_throw): Call mark_used on the destructor.

Fixes operator new on the PA.

From-SVN: r16773
1997-11-26 23:31:58 -05:00
Mark Mitchell
5ad5a5263d pt.c (unify): Handle `void' template parameters in specializations.
* pt.c (unify): Handle `void' template parameters in
	specializations.

From-SVN: r16772
1997-11-26 22:49:23 -05:00
Jeff Law
5f1a18f649 config.guess (alpha stuff): Merge with FSF to avoid incorrect guesses.
* config.guess (alpha stuff): Merge with FSF to avoid incorrect
        guesses.

From-SVN: r16770
1997-11-26 16:54:57 -07:00
Richard Henderson
20a2fbe20e configure.in (target frags): Add powerpc*-linux-gnulibc1.
* configure.in (target frags): Add powerpc*-linux-gnulibc1.
        (stdio-lock): Similarly.

        * configure.in (target frags): Add alpha*-linux-gnulibc1.
        (pic frags): Its alpha*- not alpha-.
        (stdio-lock): Kill everything.  Add alpha*-linux-gnulibc1.
        * libio.h: Check __GLIBC_MINOR__ to find stdio-lock.h.  If not
        _IO_MTSAFE_IO & GLIBC, make sure the lock pointer is still there.
        * libioP.h: Check __GLIBC_MINOR__ to find libc-lock.h.

        * config/linuxaxp1-libc-lock.h: New file.
        * config/linuxaxp1-stdio-lock.h: New file.
        * config/linuxaxp1.mt: New file.

        * gen-params (va_list): Check for and use __gnuc_va_list.
        (NULL): Work around some linux kernel headers and redefine NULL.

From-SVN: r16769
1997-11-26 16:54:30 -07:00
Michael Meissner
8fbd2dc7cb Fix -msdata=sysv and pass -dynamic-linker if not already passed
From-SVN: r16768
1997-11-26 23:16:39 +00:00
Michael Meissner
a226df4686 Use @local for local calls under System V
From-SVN: r16765
1997-11-26 22:59:52 +00:00
Michael Meissner
034e84c4a5 Fix System V profiling.
From-SVN: r16756
1997-11-26 21:04:33 +00:00
Michael Meissner
92dcf4c851 Pass 9th fp argument correctly on System V/eabi; Add @plt for -fPIC/-mrelocatable
From-SVN: r16746
1997-11-26 19:29:38 +00:00
Jason Merrill
33e5c8c3ae * toplev.c (main): Complain about -gdwarfn.
From-SVN: r16742
1997-11-26 14:13:02 -05:00
Jason Merrill
328d03d794 rtti.c (build_dynamic_cast): Handle template case here.
* rtti.c (build_dynamic_cast): Handle template case here.
	(build_dynamic_cast_1): Not here.

From-SVN: r16729
1997-11-26 05:14:51 -05:00
Jason Merrill
19754d4cf6 typeck2.c (digest_init): Make copies where appropriate.
* typeck2.c (digest_init): Make copies where appropriate.

	* decl2.c (delete_sanity): resolve_offset_ref.

From-SVN: r16727
1997-11-26 04:56:56 -05:00
Jason Merrill
92f5c1350c except.c (expand_start_catch_block): Fix catching a reference to pointer.
* except.c (expand_start_catch_block): Fix catching a reference
	to pointer.

	* init.c (build_new): Copy size to the saveable obstack.

	* init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
 	TRY_CATCH_EXPR for now.

From-SVN: r16726
1997-11-26 04:15:09 -05:00
Jason Merrill
f47448072a integrate.c (output_inline_function): Just unset DECL_INLINE.
* integrate.c (output_inline_function): Just unset DECL_INLINE.

Tue Nov 25 23:33:29 1997  scott snyder  <snyder@d0sgif.fnal.gov>

	* dwarf2out.c (outout_call_frame_info): Ensure that the info has
	proper alignment.

	* libgcc2.c (__throw): Initialize HANDLER.

From-SVN: r16724
1997-11-26 02:38:08 -05:00
Jason Merrill
f4f3e8fdf7 London changes to string:
* std/bastring.cc (check_realloc): Don't be selfish anymore.
	* std/bastring.h (non-const operator[]): Be selfish.
	(iterator forms of insert and erase): Stay selfish.

From-SVN: r16722
1997-11-26 02:19:11 -05:00
Jeff Law
11df6ae767 Fix typo.
From-SVN: r16720
1997-11-25 22:13:31 -07:00
Jeff Law
ba7d807a72 Fix goof.
From-SVN: r16718
1997-11-25 20:37:34 -07:00
Jeff Law
887c886b51 Fix from HJ.
From-SVN: r16716
1997-11-25 16:34:33 -07:00
Jeffrey A Law
6ba2ab5ff0 Make-lang.in (f77.all.build): Add $(exeext) to binary files.
* Make-lang.in (f77.all.build): Add $(exeext) to binary files.
        (f77.all.cross, f77.start.encap): Simliarly.

From-SVN: r16714
1997-11-25 16:32:19 -07:00
Jeff Law
18237274ca New entry.
From-SVN: r16712
1997-11-25 16:29:09 -07:00
Kate Hedstrom
10de6d35ba * lib/f-torture.exp: Improve error and loop detection.
From-SVN: r16711
1997-11-25 16:17:56 -07:00
Jeff Law
d674953288 xfail a couple tests for the release.
[[Split portion of a mixed commit.]]

From-SVN: r16709.2
1997-11-25 15:31:27 -07:00
H.J. Lu
6ec3cb8413 Makefile.in (stmp-complex, [...]): Changed to xxxx-complx.
* Makefile.in (stmp-complex, bigstmp-complex): Changed to
        xxxx-complx.

From-SVN: r16705
1997-11-25 14:02:19 -07:00
Richard Henderson
c905c10870 * alpha.h (CONST_OK_FOR_LETTER): Fix 'L' handling.
From-SVN: r16703
1997-11-25 13:54:43 -07:00
Jeffrey A Law
5041a61cfc * crtstuff.c (do_global_dtors_aux): Handle multiple calls better.
From-SVN: r16698
1997-11-25 11:55:32 -07:00
Jason Merrill
bb727b5ae3 [multiple changes]
Tue Nov 25 01:26:55 1997  Bruno Haible <haible@ilog.fr>:

	* dwarf2out.c (ASM_OUTPUT_DWARF_DELTA1): Implement.

Mon Nov 24 22:41:55 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* except.c (get_dynamic_handler_chain): Build up a FUNCTION_DECL.
	* optabs.c (init_optabs): Lose get_dynamic_handler_chain_libfunc.
	* expr.h: Likewise.

From-SVN: r16696
1997-11-25 04:30:38 -05:00
Jason Merrill
9b49329391 typeck.c (mark_addressable): Don't assume a FUNCTION_DECL has DECL_LANG_SPECIFIC.
* typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
	has DECL_LANG_SPECIFIC.

From-SVN: r16695
1997-11-25 02:00:30 -05:00
Jason Merrill
20b9016983 exception.cc (struct cp_eh_info): Add handlers field.
* exception.cc (struct cp_eh_info): Add handlers field.
	(__cp_push_exception): Initialize it.
	(__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
	(__throw_bad_exception): Remove.
	* except.c (call_eh_info): Add handlers field.
	(get_eh_handlers): New fn.
	(push_eh_cleanup): Increment handlers.

Fixes P15031.C, rethrow[45].C

From-SVN: r16694
1997-11-25 01:14:48 -05:00
Jeffrey A Law
c77289885d * Makefile.in: Use ln -f -s, not ln -s -f.
From-SVN: r16693
1997-11-24 14:41:29 -07:00
Jeff Law
a9f3e1a459 Doc fixes from stan.
From-SVN: r16691
1997-11-24 13:53:15 -07:00
Jeffrey A Law
ef85603ebd Makefile.in (program_transform_cross_name): Clean up "-e" confusion.
* Makefile.in (program_transform_cross_name): Clean up "-e" confusion.
        (GCC_INSTALL_NAME, GCC_CROSS_NAME): Likewise.

From-SVN: r16667
1997-11-22 00:55:18 -07:00
Manfred Hollstein
6aec4adf46 Makefile.in: Add --no-split argument to avoid creating files with names longer than 14...
* Makefile.in: Add --no-split argument to avoid creating files
	with names longer than 14 characters.

From-SVN: r16665
1997-11-21 20:36:36 -07:00
Manfred Hollstein
7b2f827617 Makefile.in (bigstmp-complex): Name changed to bigstmp-complx to cope with filesystem not capable to handle...
* Makefile.in (bigstmp-complex): Name changed to bigstmp-complx to
	cope with filesystem not capable to handle names longer than
	14 characters.

From-SVN: r16664
1997-11-21 20:36:10 -07:00
Andrew Cagney
6cc1f5cbf4 patch from andrew cagney
* config/mips/elf64.h (MULTILIB_DEFAULTS): Test for
 	TARGET_ENDIAN_DEFAULT == zero instead of testing for macro
 	definition.

From-SVN: r16660
1997-11-21 14:23:26 -08:00
Bruno Haible
72eb10386d * stmt.c (expand_end_bindings): Allow jump into block with cleanups.
From-SVN: r16654
1997-11-21 15:51:30 -05:00
Jason Merrill
6c20b7e97e except.c (expand_start_eh_spec): Use the try/catch code.
* except.c (expand_start_eh_spec): Use the try/catch code.
	(expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
	doing everything inline.
	(init_exception_processing): throw_type_match now takes
 	const void pointers.
	* exception.cc (__check_eh_spec): New fn.
	* inc/exception: Neither terminate nor unexpected return.
	* decl.c: Make const_ptr_type_node public.
	* tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.

From-SVN: r16651
1997-11-21 15:29:06 -05:00
Jeff Law
d32ecec207 Fix typo.
From-SVN: r16649
1997-11-21 13:24:56 -07:00
Jason Merrill
25d5eb3f31 except.c (expand_start_catch_block): We only need the rethrow region for non-sjlj exceptions.
* except.c (expand_start_catch_block): We only need the rethrow
 	region for non-sjlj exceptions.
	(expand_end_catch_block): Likewise.  Use outer_context_label_stack.

From-SVN: r16648
1997-11-21 15:23:57 -05:00
Jason Merrill
1418bb67a3 except.h: Add outer_context_label_stack.
* except.h: Add outer_context_label_stack.
	* except.c: Likewise.
	(expand_start_all_catch): Push the outer_context for the try block
 	onto outer_context_label_stack.
	(expand_end_all_catch): Use it and pop it.

From-SVN: r16645
1997-11-21 15:20:41 -05:00
Fred Fish
e9295d5321 Make-lang.in (stmp-f2c.h): Move inclusion of F77_FLAGS_TO_PASS to before override of CC so that the...
* Make-lang.in (stmp-f2c.h): Move inclusion of F77_FLAGS_TO_PASS
        to before override of CC so that the override works.

From-SVN: r16642
1997-11-21 10:21:34 -07:00
Robert Lipe
9dab78331a * i386/sco5.h (HAVE_ATEXIT): Revert last change.
From-SVN: r16641
1997-11-21 10:14:43 -07:00
Jeffrey A Law
83cfe7c011 config.guess (alpha stuff): Merge with FSF to avoid incorrect guesses.
* config.guess (alpha stuff): Merge with FSF to avoid incorrect
        guesses.

From-SVN: r16639
1997-11-21 10:07:04 -07:00
Jeff Law
ca20257b8d Initial revision
From-SVN: r16634
1997-11-21 04:46:43 -07:00
Jason Merrill
e03a602a7d tests
From-SVN: r16629
1997-11-20 23:05:13 -05:00
Richard Henderson
858e4e8cfd * alpha.c (alpha_emit_set_const_1): Handle narrow hosts better.
From-SVN: r16627
1997-11-20 19:08:30 -07:00
Klaus Kaempf
a21d14e991 vms.h (ASM_OUTPUT_ADDR_VEC_ELT): Add an L for the local label to correspond with the change to...
* alpha/vms.h (ASM_OUTPUT_ADDR_VEC_ELT): Add an L for the local label
        to correspond with the change to ASM_GENERATE_INTERNAL_LABEL.

From-SVN: r16622
1997-11-20 16:36:55 -07:00
Jeffrey A Law
1b8b89f158 pa.md (pre_stwm, [...]): Base register is an in/out operand.
* pa.md (pre_stwm, post_stwm, pre_ldwm, post_ldwm): Base register
        is an in/out operand.
        (zero extended variants of stwm/stwm patterns): Similarly.

From-SVN: r16620
1997-11-20 16:21:45 -07:00
Jason Merrill
ced78d8b0c Makefile.in (LIB2FUNCS): Remove C++ memory management support.
./:	* Makefile.in (LIB2FUNCS): Remove C++ memory management support.
	* libgcc2.c: Remove __builtin_new, __builtin_vec_new, set_new_handler,
	__builtin_delete, and __builtin_vec_delete.

	* except.c (output_exception_table): Don't bother with
 	__EXCEPTION_END__.

cp/:
	* Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
	(various.o): Likewise.
	* inc/new: Add placement deletes.  Add throw specs for default new.
	* new.cc (set_new_handler): Move here from libgcc2.
	* new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
	(new): Move from libgcc2.  Throw bad_alloc.
	* new2.cc: Move the rest of the op news and op deletes from libgcc2.
	* decl.c (init_decl_processing): Update exception specs on new and
	delete.

From-SVN: r16617
1997-11-20 18:17:48 -05:00
Jeffrey A Law
a09ff88bb3 * mips/x-iris (FIXPROTO_DEFINES): Add -D_SGI_SOURCE.
From-SVN: r16616
1997-11-20 16:12:38 -07:00
Jason Merrill
047f64a30c method.c (build_decl_overload_real): Don't mess with global placement delete.
* method.c (build_decl_overload_real): Don't mess with global
	placement delete.

	* init.c (build_new): Check for null throw spec, not nothrow_t.

	* decl.c (duplicate_decls): Don't complain about different exceptions
	from an internal declaration.

	* call.c (build_op_delete_call): Fix check for member fns again.

	* decl2.c (import_export_decl): Interface hackery affects
	virtual synthesized methods.

From-SVN: r16612
1997-11-20 17:43:54 -05:00
Jason Merrill
7bb9fb0edf dwarf2out.c (ASM_OUTPUT_DWARF_OFFSET4): Rename from VALUE4.
* dwarf2out.c (ASM_OUTPUT_DWARF_OFFSET4): Rename from VALUE4.
	Use assemble_name.
	(ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Use assemble_name.
	(output_call_frame_info): Emit a \n after using it.

From-SVN: r16609
1997-11-20 16:39:11 -05:00
Michael Meissner
72938a4c3a Add missing @item
From-SVN: r16597
1997-11-20 13:53:42 +00:00
H.J. Lu
dd5e269d22 * Make-lang.in (f77.install-info): Depend on f77.info.
From-SVN: r16595
1997-11-20 00:56:28 -07:00
Dave Love
9101297d83 * configure.in: Add AC_ARG_ENABLE for Haifa as documentation.
From-SVN: r16593
1997-11-20 00:39:57 -07:00
Jason Merrill
f2d773a2fd decl.c (start_decl): Don't just complain about a mismatched scope, fix it.
* decl.c (start_decl): Don't just complain about a mismatched
	scope, fix it.

From-SVN: r16591
1997-11-19 23:43:53 -05:00
Jason Merrill
5951f637bc decl.c (make_implicit_typename): Handle case where t is not actually from context.
* decl.c (make_implicit_typename): Handle case where t is not
 	actually from context.
	* tree.c (get_type_decl): Lose identifier case.
	* spew.c (yylex): Lose useless call to identifer_typedecl_value.
	* parse.y (nonnested_type): Just use lookup_name.
	(complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.

Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>

	* error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
	T was built in C language context (for example, by
	output_func_start_profiler).

From-SVN: r16589
1997-11-19 23:07:26 -05:00
Michael Meissner
77643ab814 Add doc about SHORT_IMMEDIATES_SIGN_EXTEND
From-SVN: r16586
1997-11-19 22:20:01 +00:00
Philippe De Muyter
2ed2af28e4 dwarf2out.c (CIE_LENGTH_LABEL, [...]): New macros.
Wed Nov 19 12:03:04 1997  Philippe De Muyter  <phdm@macqel.be>

	* dwarf2out.c (CIE_LENGTH_LABEL, FDE_LENGTH_LABEL): New macros.
	(ASM_OUTPUT_DWARF_VALUE4): New macro.
	(ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Define if SET_ASM_OP is
	defined.
	(output_call_frame_info): Do not output forward label differences
	if ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL is defined.
	* m68k/mot3300.h (SET_ASM_OP): Define when not using gas.

From-SVN: r16584
1997-11-19 14:53:32 -05:00
Michael Meissner
f422e9a0f6 Size filler array smaller if STACK_SIZE is defined.
From-SVN: r16582
1997-11-19 19:36:18 +00:00
Jason Merrill
bd2a82a625 decl.c (make_implicit_typename): New fn.
* decl.c (make_implicit_typename): New fn.
	(lookup_name_real): Use it.  Use current_class_type as the context.

From-SVN: r16581
1997-11-19 13:42:13 -05:00
Jeff Law
8d31729fce New test.
From-SVN: r16578
1997-11-19 09:20:12 -07:00
J"orn Rennecke
4dff12bfa2 sh.md (attribute "type"): Add nil.
* sh.md (attribute "type"): Add nil.
        (movsi_ie): y/y alternative is type nil.
        (movsf_ie): Replace ry/yr/X alternative by r/y/X , y/r/X and y/y/X
        alternatives.
        (movsf_ie+1): Delete.

From-SVN: r16575
1997-11-19 00:36:12 +00:00
Jim Wilson
218c2cdbed Fix gcc2 irix5 c-torture failures, EH/large frame errors
Fix gcc2 irix5 c-torture failures, EH/large frame errors
	* mips/mips.c (save_restore_insns): If gp_offset or fp_offset are
	large_int, emit two insns instead of one splitable insn.
	* dwarf2out.c (dwarf2out_frame_debug): When set cfa_store_offset
	from cfa_temp_value, use cfa_offset.  Add assert checking that
	cfa_reg is SP.

From-SVN: r16573
1997-11-18 15:42:00 -08:00
Jeff Law
15ec072935 Various changes from devo.
From-SVN: r16568
1997-11-18 12:36:21 -07:00
H.J. Lu
8677f9876b * stdstrbufs.cc (DEF_STDFILE): Use STD_VTABLE.
From-SVN: r16567
1997-11-18 09:53:45 -07:00
Mumit Khan
68660571fc close.c (f_exit): Reset f__init so that f_clos does not (incorrectly) think there is an I/O...
* libI77/close.c (f_exit): Reset f__init so that f_clos does not
        (incorrectly) think there is an I/O recursion when program is
        interrupted.

From-SVN: r16565
1997-11-18 09:48:12 -07:00
Bruno Haible
8baa713c4f pt.c (do_poplevel): Don't prohibit jumps into this contour.
Mon Nov 17 23:42:03 1997  Bruno Haible <haible@ilog.fr>

	* pt.c (do_poplevel): Don't prohibit jumps into this contour.

From-SVN: r16558
1997-11-18 03:07:55 -05:00
Tom Tromey
d5b7936247 From Tom Tromey
* cccp.c (deps_output): Properly quote file names for make.

From-SVN: r16555
1997-11-17 15:41:05 -08:00
Jeffrey A Law
de1ea87ac2 * t-h8300 (MULTILIB_EXCEPTIONS): Define.
From-SVN: r16553
1997-11-17 13:20:59 -07:00
Jason Merrill
37130ac372 search.c (dfs_record_inheritance): Ignore template type parms.
* search.c (dfs_record_inheritance): Ignore template type parms.

Fixes 13688.

	* friend.c (do_friend): Warn about non-template friends in templates.

	* call.c (build_op_delete_call): Fix handling of inherited delete.

From-SVN: r16551
1997-11-17 14:36:41 -05:00
Robert Lipe
cb0112a7f3 * i386/sco5.h (HAVE_ATEXIT): Delete definition.
From-SVN: r16536
1997-11-16 23:54:20 -07:00
Jeffrey A Law
85c3ba60dd cse.c (cse_insn): Don't look at JUMP_LABEL field of a conditionl return.
* cse.c (cse_insn): Don't look at JUMP_LABEL field of a conditionl
        return.
        (cse_end_of_basic_block): Similarly.

From-SVN: r16534
1997-11-16 23:51:20 -07:00
J. Kean Johnston
9155d500fb sco5.h (ASM_OUTPUT_ALIGNED_BSS): Define.
* i386/sco5.h (ASM_OUTPUT_ALIGNED_BSS): Define.
        (SELECT_RTX_SECTION): Define.
        (LIBGCC_SPEC, LIB_SPEC): Do the right thing for PIC.

From-SVN: r16532
1997-11-16 23:01:57 -07:00
Manfred Hollstein
4931312c08 Makefile.in (compare, [...]): Define $stage for each shell command.
* Makefile.in (compare, compare-lean): Define $stage for each
        shell command.
        (gnucompare, gnucompare-lean): Likewise.

From-SVN: r16530
1997-11-16 22:46:29 -07:00
Jeffrey A Law
9671be8f8a * Makefile.in (SHLIB): Build with CC instead of CXX.
From-SVN: r16528
1997-11-16 22:41:36 -07:00
Richard Henderson
8dfe3c6245 win-nt.h (TRAMPOLINE_TEMPLATE): Fix offsets.
* alpha/win-nt.h (TRAMPOLINE_TEMPLATE): Fix offsets.

        * alpha.h (ASM_OUTPUT_ADDR_DIFF_ELT): Add an L for the local label
        to correspond with the change to ASM_GENERATE_INTERNAL_LABEL.

From-SVN: r16526
1997-11-16 22:04:23 -07:00
Jason Merrill
da4768fe2e call.c (build_new_op): Fix copy error.
* call.c (build_new_op): Fix copy error.
	(build_op_new_call): New fn.
	(build_op_delete_call): New fn.
	* cp-tree.h: Declare them.
	* init.c (build_new): Use them.  Support placement delete.
	(build_x_delete): Use build_op_delete_call.
	(build_delete): Likewise.
	* decl2.c (delete_sanity): Likewise.
	(coerce_delete_type): Don't complain about placement delete.

Support placement delete.

From-SVN: r16501
1997-11-15 03:36:38 -05:00
Jeff Law
df4791b95d add missing comment from devo.
From-SVN: r16499
1997-11-14 10:59:57 -07:00
Fred Fish
874a8709bf dwarfout.c (byte_size_attribute): Add local var upper_bound and add case to handle STRING_TYPE.
* dwarfout.c (byte_size_attribute):  Add local var upper_bound
        and add case to handle STRING_TYPE.
        * dwarfout.c (output_string_type_die):  Fix code to generate
        correct string length attribute for fixed length strings.
        Still needs support for varying length strings.

From-SVN: r16498
1997-11-14 09:07:17 -07:00
Jeffrey A Law
ea46619609 * toplev.c (get_run_time): Do something sensible for cygwin32.
From-SVN: r16497
1997-11-14 08:44:56 -07:00
Dave Love
79cf8f5e2c intrin.def: Supply gfrt for CPU_TIME.
1997-11-14  Dave Love  <d.love@dl.ac.uk>

	* intrin.def: Supply gfrt for CPU_TIME.  Generalize arg types of
	INT2, INT8, per doc.

From-SVN: r16496
1997-11-14 08:13:42 -07:00
Richard Henderson
f35bcbc5d0 expr.c (expand_builtin_setjmp): Set current_function_has_nonlocal_label.
* expr.c (expand_builtin_setjmp): Set
        current_function_has_nonlocal_label.
        * stupid.c (stupid_life_analysis): If has_nonlocal_label, kill
        call-saved registers across calls.

        * alpha.md (exception_receiver): Remove.
        (nonlocal_goto_receiver_osf): New
        (nonlocal_goto_receiver_vms): Renamed from nonlocal_goto_receiver.
        (nonlocal_goto_receiver): New, select _osf or _vms.

From-SVN: r16492
1997-11-14 07:51:00 -07:00
Richard Henderson
531ea24eef alpha.c (output_prolog [*]): Prefix entry labels with '$' to keep them from being propogated to the object file.
* alpha.c (output_prolog [*]): Prefix entry labels with '$' to
        keep them from being propogated to the object file.
        (alpha_write_linkage): Likewise.
        * alpha.md (call_vms): Likewise.
        (call_value_vms): Likewise.
        (unnamed osf call insns): Likewise.

        * alpha.h (ASM_OUTPUT_INTERNAL_LABEL): Don't omit L from local label.
        (ASM_GENERATE_INTERNAL_LABEL): Likewise.

From-SVN: r16490
1997-11-14 07:43:14 -07:00
Richard Henderson
202f590eca alpha.c (call_operand): Any reg is valid for WinNT.
* alpha.c (call_operand): Any reg is valid for WinNT.
        * alpha.md (call_nt, call_value_nt): Don't force address into $27.
        (anon nt calls): Add 'R' alternative.
        * alpha/win-nt.h (TRAMPOLINE_TEMPLATE, TRAMPOLINE_SIZE,
        INITIALIZE_TRAMPOLINE): Handle lack of original $27 and 32-bit ptrs.

From-SVN: r16487
1997-11-14 07:23:25 -07:00
Jeffrey A Law
f78b5ca112 * calls.c (expand_call): Handle pcc_struct_value correctly for C++.
From-SVN: r16485
1997-11-14 07:06:07 -07:00
Jeffrey A Law
238ad62b9f xm-cygwin32.h (HAVE_FILE_H, [...]): Delete defines.
* i386/xm-cygwin32.h (HAVE_FILE_H, HAVE_RUSAGE): Delete defines.
        * i386/xm-mingw32.h (HAVE_FILE_H, HAVE_RUSAGE): Likewise.
        * rs6000/xm-cygwin32.h (HAVE_FILE_H, HAVE_RUSAGE): Likewise.

From-SVN: r16484
1997-11-14 06:59:51 -07:00
Michael Meissner
da27534458 reload1.c (new_spill_reg): Improve fixed or forbidden register spill error message.
* reload1.c (new_spill_reg): Improve fixed or forbidden register
        spill error message.

From-SVN: r16483
1997-11-13 20:36:47 -07:00
Kaveh R. Ghazi
1f1e15454f prefix.c: Use stdarg.h only ifdef __STDC__.
* prefix.c: Use stdarg.h only ifdef __STDC__.  Otherwise,
        use varargs.h.  Wrap header with <>, not "".

From-SVN: r16482
1997-11-13 20:27:55 -07:00
Jeffrey A Law
daa4b71743 integrate.c (save_for_inline_copying): Add return value from savealloc.
* integrate.c (save_for_inline_copying): Add return value from
        savealloc.

From-SVN: r16481
1997-11-13 20:20:11 -07:00
Brendan Kehoe
9bb5394eca fixincludes: Be a little more restrictive on what we will substitute to replace definitions...
* fixincludes: Be a little more restrictive on what we will
        substitute to replace definitions of MAXINT for HPUX.

From-SVN: r16480
1997-11-13 19:13:03 -07:00
Jeff Law
d863830b53 Add -frepo docs.
From-SVN: r16478
1997-11-13 18:56:51 -07:00
Jeff Law
966f5dffab Minor spacing nit.
From-SVN: r16477
1997-11-13 18:42:45 -07:00
Jeff Law
c39de8184c Comment change.
From-SVN: r16476
1997-11-13 18:41:19 -07:00
Michael Meissner
9571f69bfd dbxout.c (dbxout_symbol_location): Don't assume that variables whose address is the stack or argument pointers are...
* dbxout.c (dbxout_symbol_location): Don't assume that variables
        whose address is the stack or argument pointers are indirect
        pointers.

From-SVN: r16475
1997-11-13 18:39:43 -07:00
Paul Eggert
e7cbb6b66e cccp.c, cpplib.c (compare_defs): Don't complain about arg name respellings unless pedantic.
* cccp.c, cpplib.c (compare_defs):
        Don't complain about arg name respellings unless pedantic.
        * cpplib.c (compare_defs): Accept pfile as new arg.
        All callers changed.
Bring over from the FSF.

From-SVN: r16474
1997-11-13 18:33:27 -07:00
J"orn Rennecke
9f29ca789b * fold-const.c (fold_truthop): Fix bug in last change.
From-SVN: r16473
1997-11-14 00:38:08 +00:00
Paul Eggert
41c9120baf patch from paul eggert to fix -0.0/0.0 confusion that breaks glibc
* real.h (REAL_VALUES_IDENTICAL): New macro.
	* expr.c (is_zeros_p): Don't consider -0.0 to be all zeros.
	* fold-const.c (operand_equal_p): Don't consider -0.0 to be
	identical to 0.0.
	* tree.c (simple_cst_equal): Don't consider -0.0 to have the
	same tree structure as 0.0.
	* varasm.c (immed_real_const_1): Use new REAL_VALUES_IDENTICAL
	macro instead of doing it by hand.

From-SVN: r16472
1997-11-13 16:07:27 -08:00
Jeffrey A Law
323d8e7b66 lib1funcs.asm: Minor whitespace changes.
* v850/lib1funcs.asm: Minor whitespace changes.
        * v850.c: Fix minor formatting problems in many places.
        (construct_restore_jr, construct_save_jarl): Remove unwanted aborts.

From-SVN: r16471
1997-11-13 16:55:08 -07:00
Jeff Law
5a75af6284 Whitespace changes.
From-SVN: r16470
1997-11-13 16:49:41 -07:00
Jeffrey A Law
8930b06354 flow.c (find_basic_blocks): During marking phase...
* flow.c (find_basic_blocks): During marking phase, if we encounter
        an insn with a REG_LABEL note, make the target block live and
        create an edge from the insn to the target block.  Do not make
        edges from all blocks to the target block.

From-SVN: r16469
1997-11-13 16:09:27 -07:00
Jim Wilson
13529ea4fe mips.h (GO_IF_LEGITIMATE_ADDRESS): Delete code swapping xplus0 and xplus1 when xplus0 is not a register.
* mips.h (GO_IF_LEGITIMATE_ADDRESS): Delete code swapping xplus0 and
	xplus1 when xplus0 is not a register.

From-SVN: r16467
1997-11-13 14:09:05 -07:00
Jason Merrill
9babbf20ae removed unused parm to build_new_function_call
From-SVN: r16464
1997-11-13 15:01:21 -05:00
Jason Merrill
fac138ead1 tweak
From-SVN: r16463
1997-11-13 14:17:55 -05:00
Jeffrey A Law
0be28489d3 * m68k/x-next (OTHER_FIXINCLUDES_DIRS): Include /NextDeveloper/Headers.
From-SVN: r16462
1997-11-13 11:53:09 -07:00
Jeffrey A Law
759c135e3b confiugre.in: Tweak NCR entries.
* confiugre.in: Tweak NCR entries.
        * configure: Rebuilt.

From-SVN: r16458
1997-11-13 11:43:00 -07:00
Michael Meissner
47ad8c6118 Fix problems in splitting DF constants on big endian hosts & Davids patch for power shifts.
From-SVN: r16454
1997-11-13 16:59:07 +00:00
Jason Merrill
2bb14213a3 init.c (build_new): Make the cleanup last longer.
* init.c (build_new): Make the cleanup last longer.
	(expand_vec_init): Call do_pending_stack_adjust.

From-SVN: r16451
1997-11-13 05:11:23 -05:00
Jason Merrill
4699894f5b lose implicit int
From-SVN: r16449
1997-11-13 04:36:16 -05:00
J"orn Rennecke
5a6b336594 fold-const.c (fold_truthop): When changing a one-bit comparison against zero into a comparison against mask...
* fold-const.c (fold_truthop): When changing a one-bit comparison
	against zero into a comparison against mask, do a proper sign
	extension.

From-SVN: r16448
1997-11-13 00:09:37 +00:00
Jason Merrill
2bd3bc6f5c thinko
From-SVN: r16446
1997-11-12 15:15:09 -05:00
Jason Merrill
a7d87521b2 pt.c (do_type_instantiation): Fix typo.
* pt.c (do_type_instantiation): Fix typo.
	(mark_class_instantiated): If we support one_only but not weak
	symbols, don't mark this as known.

	* init.c (build_new): Handle cookies in EH cleanup.

From-SVN: r16444
1997-11-12 14:50:15 -05:00
Jeff Law
31d525285d Fix typo.
From-SVN: r16443
1997-11-12 11:21:36 -07:00
Jeffrey A Law
3a88cbd106 except.c: Do not include "assert.h".
* except.c: Do not include "assert.h".
        (save_eh_status): Turn asserts into conditional aborts.
        (restore_eh_status, scan_region): Likewise.
        * dwarfout.c: Do not include "assert.h".
        (bit_offset_attribute): Turn asserts into conditional aborts.
        (bit_size_attribute, output_inlined_enumeration_type_die): Likewise.
        (output_inlined_structure_type_die): Likewise.
        (output_inlined_union_type_die): Likewise
        (output_tagged_type_instantiation): Likewise.
        (dwarfout_file_scope_decl): Likewise.
        * dwarf2out.c: Do not include "assert.h"
        (expand_builtin_dwarf_reg_size): Turn asserts into conditional aborts.
        (reg_save, initial_return_save, dwarf2out_frame_debug): Likewise.
        (add_child_die, modified_type_die, add_bit_offset_attribute): Likewise.
        (add_bit_size_attribute, scope_die_for): Likewise.
        (output_pending_types_for_scope): Likewise.
        (get_inlined_enumeration_type_die): Likewise.
        (get_inlined_structure_type_die): Likewise.
        (get_inlined_union_type_die, gen_subprogram_die): Likewise.
        (gen_tagged_type_instantiation_die): Likewise.

From-SVN: r16442
1997-11-12 10:07:46 -07:00
Jeffrey A Law
2ec1535d97 flow.c (find_basic_blocks): Refine further to get a more correct cfg...
* flow.c (find_basic_blocks): Refine further to get a more correct
        cfg, especially in the presense of exception handling, computed
        gotos, and other non-trivial cases.  Call abort if an inaccuracy
        is detected in the cfg.

From-SVN: r16440
1997-11-12 09:36:43 -07:00
Benjamin Kosnik
6d2b1beeac call.c (build_method_call): Call complete_type before checking for destructor.
* call.c (build_method_call): Call complete_type before checking
 	for destructor.
g++/13098 fix!!

From-SVN: r16438
1997-11-12 16:18:52 +00:00
Jason Merrill
1f109f0fdb init.c (build_new): Handle freeing allocated memory when the constructor throws.
* init.c (build_new): Handle freeing allocated memory when the
	constructor throws.

	* call.c (build_new_method_call): Fix flags arg.

	* pt.c (do_type_instantiation): Don't try to instantiate
	member templates.
	(mark_decl_instantiated): If we support one_only but not
	weak symbols, mark this one_only.
	* decl2.c (import_export_vtable): Don't defer handling of vtables
	if MULTIPLE_SYMBOL_SPACES.

From-SVN: r16436
1997-11-12 04:18:40 -05:00
Jason Merrill
0b3ca5ee97 except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
* except.c (expand_end_catch_block): Lose call to __sjpopnthrow.

Fixes sjlj failures.

From-SVN: r16435
1997-11-11 22:55:00 -05:00
J"orn Rennecke
a6124a42bc glimits.h (SHRT_MIN): Define in a way suitable for 16 bit hosts.
* glimits.h (SHRT_MIN): Define in a way suitable for 16 bit hosts.

        * c-lex.c (whitespace_cr, skip_white_space_on_line): New functions.
        (skip_white_space): Use whitespace_cr.
        (check_newline): Handle whitespace more consistently.

From-SVN: r16433
1997-11-12 03:17:41 +00:00
Jim Wilson
8f3189a48b cygwin32 patch for Noer
cygwin32 patch for Noer
	* i386/cygwin32.h (CPP_PREDEFINES): Delete -DPOSIX.
	* i386/xm-cygwin32.h (POSIX): Define.

From-SVN: r16432
1997-11-11 16:26:40 -08:00
Jason Merrill
c0700ea5ea except.c (do_pop_exception): Return a value.
* except.c (do_pop_exception): Return a value.

Oops.

From-SVN: r16431
1997-11-11 05:59:47 -05:00
Oleg Krivosheev
a0e07e85ee iomanip.h: Fix guiding decls.
Tue Nov 11 01:40:17 1997  Oleg Krivosheev <kriol@fnal.gov>

	* iomanip.h: Fix guiding decls.

From-SVN: r16428
1997-11-11 04:43:06 -05:00
Jason Merrill
00d3396fdb call.c (build_new_method_call): Handle getting a TEMPLATE_ID_EXPR around a TEMPLATE_DECL.
* call.c (build_new_method_call): Handle getting a
 	TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
 	if we got template parms.
	* typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
 	not just the args.
	* decl2.c (build_expr_from_tree): Tweak last change.
	* pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
	(maybe_fold_nontype_arg): Split out from tsubst_copy.
	* tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.

Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>

	* pt.c (tsubst_copy): Handle explicit template arguments in
	function calls.
	* typeck.c (build_x_function_call): Likewise.
	* decl2.c (build_expr_from_tree): Lookup function name if it
	hasn't been done.

	* pt.c (tsubst): Instantiate template functions properly when
	template parameter does not appear in function arguments and return
	type.
	(comp_template_args): Handle member templates required by tsubst.

From-SVN: r16427
1997-11-11 02:09:58 -05:00
Jason Merrill
1afc355025 new tests
From-SVN: r16426
1997-11-11 01:38:34 -05:00
Jason Merrill
343fdf03d4 decl.c (grokdeclarator): Tweak conditions for pedwarn in previous change.
* decl.c (grokdeclarator): Tweak conditions for pedwarn in
 	previous change.

Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>

	* pt.c (coerce_template_parms): Tweak error message.

	* decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
	return type defaults to `int', even if there are storage-class
	specifiers.

From-SVN: r16425
1997-11-10 23:10:30 -05:00
Gavin Koch
6d1350cdde mips.h (MASK_DEBUG_H): Set to zero, so this bit is available elsewhere.
* config/mips/mips.h (MASK_DEBUG_H): Set to zero, so this bit
is available elsewhere.

From-SVN: r16423
1997-11-11 02:04:11 +00:00
Doug Evans
d1f4474e5e sparc.md (mov[sdt]f_const_insn): Fix condition to match what the instruction can handle.
* sparc/sparc.md (mov[sdt]f_const_insn): Fix condition to match
	what the instruction can handle.

From-SVN: r16422
1997-11-11 00:39:39 +00:00
Jason Merrill
c7ae64f2cc stmt.c (expand_decl_cleanup_no_eh): New fn.
* stmt.c (expand_decl_cleanup_no_eh): New fn.

	* except.c (expand_leftover_cleanups): do_pending_stack_adjust.

	Complete nested exception support.
	* except.c (do_pop_exception): Split out...
	(push_eh_cleanup): From here.  Handle the EH region by hand.
	(expand_start_catch_block): Add a new level for the catch parm.
	Move the rethrow region outside the two cleanup regions.
	Protect the initializer for the catch parm with terminate.
	(expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
	* exception.cc (__cp_pop_exception): Now takes two parms.  Handle
	popping off the middle of the stack.
	* tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
	WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
	(build_cplus_new): Only wrap CALL_EXPRs.
	* init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
	the constructor call.

From-SVN: r16419
1997-11-10 15:03:49 -05:00
Joern Rennecke
26f578a228 Remove ENABLE_REGMOVE_PASS.
From-SVN: r16418
1997-11-10 18:57:39 +00:00
Jeffrey A Law
ea64ef271d alias.c (MAX_ALIAS_LOOP_PASSES): Define.
* alias.c (MAX_ALIAS_LOOP_PASSES): Define.
        (init_alias_analysis): Break out of loops after MAX_ALIAS_LOOP_PASSES.

From-SVN: r16415
1997-11-10 00:12:10 -07:00
Jeffrey A Law
0ff27f584b * fixinc.svr4 (__STDC__): Add another case.
From-SVN: r16396
1997-11-09 02:06:14 -07:00
J"orn Rennecke
7091039c68 a29k.h (ELIGIBLE_FOR_EPILOGUE_DELAY): Avoid loads from varying addresses in the epilogue delay slot.
* a29k.h (ELIGIBLE_FOR_EPILOGUE_DELAY): Avoid loads from varying
        addresses in the epilogue delay slot.

From-SVN: r16394
1997-11-09 01:59:55 -07:00
Manfred Hollstein
553914ad8b dgux.h (ASM_CPU_SPEC): Reformatted to suppress wrong whitespace in generated `specs' file.
* m88k/dgux.h (ASM_CPU_SPEC): Reformatted to suppress wrong whitespace
        in generated `specs' file.

From-SVN: r16391
1997-11-09 01:39:38 -07:00
Jim Wilson
64fde7010b flags.h (flag_rerun_loop_opt): Declare.
* flags.h (flag_rerun_loop_opt): Declare.
        * loop.c (invariant_p, case LABEL_REF): Check flag_rerun_loop_opt.
        * toplev.c (flag_rerum_loop_opt): Delete static.

From-SVN: r16389
1997-11-09 01:35:46 -07:00
Jim Wilson
69f9c1f69e decl.c (add_block_current_level): Delete.
* decl.c (add_block_current_level): Delete.
        * init.c (build_vec_delete_1): Delete build_block and
        add_block_current_level calls.

From-SVN: r16388
1997-11-09 01:30:34 -07:00
Jeff Law
1f8a9befe3 New entry.
From-SVN: r16385
1997-11-08 22:11:18 -07:00
J"orn Rennecke
1245df60c1 Sync SH port with FSF; enable regmove for SH.
From-SVN: r16371
1997-11-08 19:54:57 +00:00
Jason Merrill
c64e3181fe fix typo
From-SVN: r16364
1997-11-08 03:51:15 -05:00
Jason Merrill
bd871063c5 * decl2.c (finish_file): Put back some code.
From-SVN: r16361
1997-11-07 14:58:26 -05:00
Jason Merrill
9799193348 frame.c (add_fdes, count_fdes): Go back to checking pc_begin for linked once FDEs.
* frame.c (add_fdes, count_fdes): Go back to checking pc_begin for
 	linked once FDEs.

From-SVN: r16359
1997-11-07 13:57:39 -05:00
Jason Merrill
29088d20b7 fix typo
From-SVN: r16357
1997-11-07 13:29:13 -05:00
Jason Merrill
4d6efa25ac decl2.c (finish_file): Remove redundant code.
* decl2.c (finish_file): Remove redundant code.
	* method.c (emit_thunk): Don't let the backend defer generic thunks.

From-SVN: r16353
1997-11-06 22:37:39 -05:00
Brendan Kehoe
55e0182bdb tweak to be in sync with devo
From-SVN: r16352
1997-11-06 15:21:18 -05:00
Jason Merrill
0cdff4f223 stl_algo.h, [...]: Update to October 28 SGI release.
* stl_algo.h, stl_algobase.h, stl_bvector.h,
 	stl_deque.h: Update to October 28 SGI release.

From-SVN: r16351
1997-11-06 14:21:38 -05:00
Jason Merrill
95e8dcbaa0 except.c (call_eh_info): Split out...
* except.c (call_eh_info): Split out...
	(push_eh_info): From here.
	(expand_builtin_throw): Use it.
	(expand_start_catch_block): Move region start back.

From-SVN: r16349
1997-11-06 03:02:08 -05:00
Jeffrey A Law
eaf407a54e alias.c (find_base_value): Only return the known base value for pseudo registers.
* alias.c (find_base_value): Only return the known base value for
        pseudo registers.

From-SVN: r16345
1997-11-05 14:24:45 -07:00
Jim Wilson
4f9ca067a1 Fix i386-linux build failure.
* i386.c (load_pic_register): Call prologue_get_pc_and_set_got.
	* i386.md (prologue_set_got, prologue_get_pc): Add UNSPEC_VOLATILE
	to pattern.
	(prologue_get_pc_and_set_got): New pattern.

From-SVN: r16342
1997-11-05 11:29:37 -08:00
Jeff Law
5b8f8eeb20 New test.
From-SVN: r16340
1997-11-05 01:37:43 -07:00
Richard Henderson
f4e31cf56f alpha.c (summarize_insn): Handle ASM_OPERANDS.
* alpha.c (summarize_insn): Handle ASM_OPERANDS.  Don't recurse
        for SUBREG, just fall through.

        * alpha.c (alpha_handle_trap_shadows): Init sum.defd to zero.

        * alpha.md (attr trap): Make TRAP_YES non-zero for sanity's sake.

From-SVN: r16339
1997-11-04 20:36:53 -07:00
Jeffrey A Law
3ed18aebe9 * fixincludes: Fix "hypot" prototype in NeXT math.h.
From-SVN: r16338
1997-11-04 20:09:18 -07:00
Jeffrey A Law
3fe40e055a Makefile.in (USE_ALLOCA): Always include alloca.o.
* Makefile.in (USE_ALLOCA): Always include alloca.o.
        (USE_HOST_ALLOCA): Likewise.

From-SVN: r16336
1997-11-04 19:25:26 -07:00
Jim Wilson
ff3467a9eb Fix alpha-linux GNU libc build failures.
* combine.c (try_combine): When setting elim_i2, check whether newi2pat
	sets i2dest.  When calling distribute_notes for i3dest_killed, pass
	elim_i2 and elim_i1.  When setting elim_i1, check if newi2pat
	sets i1dest.

From-SVN: r16334
1997-11-04 18:08:25 -08:00
Jeffrey A Law
f754c4a10a rtl.def (CODE_LABEL): Use separate fields for LABEL_NUSES and LABEL_REFS fields.
* rtl.def (CODE_LABEL): Use separate fields for LABEL_NUSES
        and LABEL_REFS fields.
        * rtl.h (LABEL_REFS): Update.

From-SVN: r16333
1997-11-04 18:56:33 -07:00
Jim Wilson
4911814e8e Fix bitfield insert/extract aliasing problem found by GNAT.
* mips.md (insv, extzv, extv): Add change_address call.
	(movsi_ulw, movsi_usw): Change QImode to BLKmode in pattern.

From-SVN: r16331
1997-11-04 17:49:52 -08:00
Jim Wilson
474eff8855 Fix c++ problem resulting from ADDRESSOF support.
* integrate.c (save_for_inline_copying): Copy parm_reg_stack_loc.

From-SVN: r16330
1997-11-04 17:15:04 -08:00
Jim Wilson
3feffdfe8e Bug fix for v850 port.
* reload.c (find_reloads, case 'm' and 'o'): Reject HIGH constants.

From-SVN: r16329
1997-11-04 17:08:08 -08:00
Jim Wilson
ab00eb0aa3 Fix shared library problem found by GNAT users.
* mips.c (mips_expand_epilogue): Emit blockage insn before call to
	save_restore_insns if no FP and GP will be restored.

From-SVN: r16327
1997-11-04 16:55:50 -08:00
Jim Wilson
31c8581d25 Fix nightly testing mips64-elf build failure.
* dwarf2out.c (expand_builtin_dwarf_reg_size): New variable mode.
	Convert CCmode to word_mode before calling GET_MODE_SIZE.

From-SVN: r16326
1997-11-04 16:50:18 -08:00
Jim Wilson
7636d56743 Fix irix5 build problem resulting from FSF merge.
* acconfig.h (HAVE_INTTYPES_H): Undef.
	* configure.in (inttypes.h): Check for conflicts between sys/types.h
	and inttypes.h, and verify that intmax_t is defined.
	* config/mips/x-iris (CC, OPT, OLDCC): Comment out.
	* config/mips/x-iris3: Likewise.

From-SVN: r16325
1997-11-04 16:30:37 -08:00
Jeff Law
52be7f110c Move test from execute to compile.
From-SVN: r16321
1997-11-04 16:21:27 -07:00
Jeffrey A Law
73774bc7c0 alias.c (find_base_value): When copying arguments, return the tenative value for a hard register.
* alias.c (find_base_value): When copying arguments, return the
        tenative value for a hard register.

From-SVN: r16319
1997-11-04 16:09:21 -07:00
Doug Evans
30c317f5da lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
* lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
	(real_yylex): Record wide strings using target endianness, not host.

From-SVN: r16316
1997-11-04 21:57:40 +00:00
Doug Evans
645ebf3767 c-lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
* c-lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
	(yylex): Record wide strings using target endianness, not host.

From-SVN: r16315
1997-11-04 21:56:24 +00:00
Jeffrey A Law
f762058716 mn10200.h (ASM_OUTPUT_BSS): Delete.
* mn10200.h (ASM_OUTPUT_BSS): Delete.
        (ASM_OUTPUT_ALIGNED_BSS): New macro
        * mn10300.h (ASM_OUTPUT_BSS): Delete.
        (ASM_OUTPUT_ALIGNED_BSS): New macro.
        * v850.h (ASM_OUTPUT_BSS): Delete.
        (ASM_OUTPUT_ALIGNED_BSS): New macro.

From-SVN: r16312
1997-11-04 13:38:45 -07:00
J"orn Rennecke
1686f1a2ae * profile.c (branch_prob): Insert an insn after a NOTE_INSN_SETJMP.
From-SVN: r16309
1997-11-04 02:11:45 +00:00
Brendan Kehoe
a8a63732c4 repo.c (rindex): Add decl unconditionally.
* repo.c (rindex): Add decl unconditionally.
	(get_base_filename, open_repo_file): Don't cast rindex.
	* xref.c (rindex): Add decl unconditionally.
	(index): Remove unused decl.
	(open_xref_file): Don't cast rindex.

fix potential problems with 64-bit compilers and casting an int up to a char*

From-SVN: r16306
1997-11-03 18:20:24 -05:00
Jeff Law
08bb4b3b2c Remove last combine patch. rth & jim are working on a new one.
From-SVN: r16304
1997-11-03 14:55:49 -07:00
Jeffrey A Law
f6857708b8 * configure.in (sco5): Use cpio to install header files.
From-SVN: r16303
1997-11-03 14:40:15 -07:00
Manfred Hollstein
58d0cbe742 configure.in: Use delta.mt for m68k-motorola-sysv.
* configure.in: Use delta.mt for m68k-motorola-sysv.
        * config/delta.mt: New makefile fragment.

From-SVN: r16299
1997-11-02 23:33:01 -07:00
Manfred Hollstein
e566af0431 aclocal.m4 (conftestdata_from, [...]): Names shortened to 14 char length.
* aclocal.m4 (conftestdata_from, conftestdata_to): Names shortened to
        14 char length.
        * configure: Rebuild.

From-SVN: r16298
1997-11-02 23:30:09 -07:00
Richard Henderson
be2053f3dd combine.c (try_combine): Don't elim_i1 when it is used in i2src.
* combine.c (try_combine): Don't elim_i1 when it is used in i2src.

        * combine.c (try_combine): When setting elim_i2, check whether newi2pat
        sets i2dest.  When calling distribute_notes for i3dest_killed, pass
        elim_i2 and elim_i1.

Co-Authored-By: Jim Wilson <wilson@cygnus.com>

From-SVN: r16296
1997-11-02 23:24:36 -07:00
Jeff Law
0ae231b228 Initialize I.
From-SVN: r16293
1997-11-02 23:11:33 -07:00
Jeff Law
afb6fb7665 New test.
From-SVN: r16292
1997-11-02 23:07:39 -07:00
Craig Burley
a2977d2db3 Important patch from Burley.
From-SVN: r16291
1997-11-02 23:07:04 -07:00
Richard Henderson
af75269882 com.c (ffecom_expr_): Only use TREE_TYPE argument for simple arithmetic...
* com.c (ffecom_expr_): Only use TREE_TYPE argument for simple
        arithmetic; convert types as necessary; recurse with target tree type.

CVS _----------------------------------------------------------------------

From-SVN: r16287
1997-11-02 19:49:29 -07:00
Robert Lipe
cbd44549e6 * i386/sco5.h: enable -gstabs once again.
From-SVN: r16284
1997-11-02 19:42:31 -07:00
Jeffrey A Law
5663681816 * arm.c (output_move_double): Allocate 3 entries in otherops array.
From-SVN: r16281
1997-11-02 19:26:49 -07:00
Jason Merrill
b9ddcfac31 * class.c (build_vbase_path): Propagate the result type properly.
From-SVN: r16279
1997-11-02 18:07:03 -05:00
Jeff Law
e9a25f70a0 Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
1997-11-02 14:19:36 -07:00
Jason Merrill
bb84e66919 Makefile.in (install): Some of HEADERS come from the stl dir now.
* Makefile.in (install): Some of HEADERS come from the stl dir now.
	* algorithm, deque, functional, iterator, list, map, memory, numeric,
 	queue, set, stack, utility, vector: Now in stl dir.

stl/:
	* algo.h, algobase.h, alloc.h, bvector.h, defalloc.h, deque.h,
 	function.h, hash_map.h, hash_set.h, hashtable.h, heap.h, iterator.h,
 	list.h, map.h, multimap.h, multiset.h, pair.h, pthread_alloc.h,
 	rope.h, ropeimpl.h, set.h, slist.h, stack.h, stl_config.h, tempbuf.h,
 	tree.h, type_traits.h, vector.h: Update to October 27 SGI snapshot.
	* algorithm, deque, functional, hash_map, hash_set, iterator, list,
 	map, memory, numeric, pthread_alloc, queue, rope, set, slist, stack,
 	stl_algo.h, stl_algobase.h, stl_alloc.h, stl_bvector.h,
 	stl_construct.h, stl_deque.h, stl_function.h, stl_hash_fun.h,
 	stl_hash_map.h, stl_hash_set.h, stl_hashtable.h, stl_heap.h,
 	stl_iterator.h, stl_list.h, stl_map.h, stl_multimap.h, stl_multiset.h,
 	stl_numeric.h, stl_pair.h, stl_queue.h, stl_raw_storage_iter.h,
 	stl_relops.h, stl_rope.h, stl_set.h, stl_slist.h, stl_stack.h,
 	stl_tempbuf.h, stl_tree.h, stl_uninitialized.h, stl_vector.h,
 	utility, vector: New files in October 27 SGI snapshot.

From-SVN: r16277
1997-11-02 15:28:22 -05:00
Jeff Law
c3bcf315fa This commit was generated by cvs2svn to compensate for changes in r16274,
which included commits to RCS files with non-trunk default branches.

From-SVN: r16275
1997-11-02 01:46:26 -07:00
Jeff Law
336b436af5 Initial revision
From-SVN: r16272
1997-11-02 01:39:28 -07:00
Jeffrey A Law
8072f69c31 alias.c (init_alias_analysis): Handle -fno-alias-check when optimizing correctly.
* alias.c (init_alias_analysis): Handle -fno-alias-check when
        optimizing correctly.

From-SVN: r16268
1997-11-01 23:28:31 -07:00
Jeffrey A Law
6cad9e3280 expr.c (expand_builtin_setjmp): Don't emit a SETJMP note or set current_function_calls_setjmp anymore.
* expr.c (expand_builtin_setjmp): Don't emit a SETJMP note
        or set current_function_calls_setjmp anymore.

From-SVN: r16267
1997-11-01 22:15:13 -07:00
Mike Stump
9ad8a5f011 except.c (expand_ex_region_start_for_decl): Emit EH_REGION_BEG notes for sjlj exceptions too.
* except.c (expand_ex_region_start_for_decl): Emit EH_REGION_BEG
        notes for sjlj exceptions too.
        (expand_eh_region_end): Similarly for EH_REGION_END notes.
        (exception_optimize): Optimize EH regions for sjlj exceptions too.
        * final.c (final_scan_insn): Don't output labels for EH REGION
        notes if doing sjlj exceptions.

From-SVN: r16266
1997-11-01 21:43:34 -07:00
Jeffrey A Law
f8671389c5 flow.c (find_basic_blocks): If we delete the label for an exception handler...
* flow.c (find_basic_blocks): If we delete the label for an
        exception handler, remove it from the EH label list and remove
        the EH_BEGIN/EH_END notes for that EH region.

From-SVN: r16265
1997-11-01 19:15:01 -07:00
Jeffrey A Law
e67edc156e * libF77/signal_.c: Undo last change until we can fix it right.
From-SVN: r16264
1997-11-01 18:02:05 -07:00
Jason Merrill
a886ae747e flow.c (find_basic_blocks): Generate correct flow control information when exception handling notes are present.
* flow.c (find_basic_blocks): Generate correct flow control
        information when exception handling notes are present.

From-SVN: r16263
1997-11-01 16:45:10 -07:00
Jeffrey A Law
c2c85462f3 dwarf2out.c (output_call_frame_info): Fix length argument to ASM_OUTPUT_ASCII.
* dwarf2out.c (output_call_frame_info): Fix length argument
        to ASM_OUTPUT_ASCII.
        (output_die, output_pubnames, output_line_info): Likewise.

From-SVN: r16262
1997-11-01 13:43:02 -07:00
Brendan Kehoe
b2bb2710f3 lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
* lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
        (file_name_nondirectory): New function, doing the same as the macro.
        (set_typedecl_interface_info): Use it instead of the macro.
        (check_newline): Likewise.
        (handle_cp_pragma): Likewise.

        * repo.c (get_base_filename): Cast result of rindex to char*.
        (open_repo_file): Likewise.
        * xref.c (open_xref_file): Likewise.
        * error.c (dump_char): Make its arg int, not char.

bring over the changes that went in yesterday to fix irix6 native cc
build problems

From-SVN: r16261
1997-11-01 14:50:18 -05:00
Brendan Kehoe
5a0fa1de62 except.c (expand_builtin_throw): Replace remaining use of saved_throw_type with a call to get_eh_type.
* except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
        remaining use of saved_throw_type with a call to get_eh_type.

From-SVN: r16260
1997-11-01 13:38:16 -05:00
Brendan Kehoe
cf9d67e3e8 except.c (push_eh_info): Pass the number of fields - 1 down, not the exact number of fields.
* except.c (push_eh_info): Pass the number of fields - 1 down, not
        the exact number of fields.

cuz in finish_builtin_type, its comment sez

   LEN is the number of elements
   in FIELDS minus one, or put another way, it is the maximum subscript
   used in FIELDS.

and its code does

  for (i = 0; i < len; i++)
    {
      layout_type (TREE_TYPE (fields[i]));
      DECL_FIELD_CONTEXT (fields[i]) = type;
      TREE_CHAIN (fields[i]) = fields[i+1];
    }
  DECL_FIELD_CONTEXT (fields[i]) = type;
  DECL_CLASS_CONTEXT (fields[i]) = type;

thus expecting the final ones to be fields[4], not fields[5] (which is
the actual size from 0, not the last field member)

From-SVN: r16257
1997-10-31 18:17:35 -05:00
Jeffrey A Law
27ca375af6 * version.c: Bump for snapshot.
From-SVN: r16255
1997-10-31 09:47:28 -07:00
Jeff Law
468c74c3f9 Fix typo.
From-SVN: r16253
1997-10-31 09:41:19 -07:00
Jeffrey A Law
53ca5d4fb4 Makefile.in (install targets): Add a dummy target for sunos make.
* Makefile.in (install targets): Add a dummy target for sunos make.
        (SUBDIR): Remove 'info'.  It's unneeded.

From-SVN: r16252
1997-10-31 09:38:44 -07:00
Jeffrey A Law
8d4e65a635 dwarf2out.c (output_call_frame_info): Use ASM_OUTPUT_ASCII to output ASCII by default.
* dwarf2out.c (output_call_frame_info): Use ASM_OUTPUT_ASCII to
        output ASCII by default.  Only use ASM_OUTPUT_DWARF_STRING if
        flag_debug_asm is on.
        (output_die, output_pubnames, output_line_info): Likewise.

From-SVN: r16251
1997-10-31 09:30:48 -07:00
Jeffrey A Law
ec907dd81e alias.c (init_alias_analysis): Add struct_value_incoming_rtx and static_chain_rtx into the potential base...
* alias.c (init_alias_analysis): Add struct_value_incoming_rtx
        and static_chain_rtx into the potential base values array if
        they are registers.
Fixes bugs exposed by improved alias propagation code.

        * alias.c (new_reg_base_value): New array of potential base values.
        (unique_id): Now file scoped static.
        (find_base_value, case REG): Return the value in reg_base_value
        array for the REG if it exists.  Else, return the value from
        new_reg_base_value if copying args and REG is a hard register.
        (find_base_value, case PLUS): If either operand of the PLUS is
        a REG, try to get its base value.  Handle base + index and
        index + base.
        (record_set): Use new_reg_base_value instead of reg_base_value.
        (init_alias_analysis): Allocate space for new_reg_base_value too.
        Rework code to iterate over the insns propagating base value
        information until nothing changes.
Improve alias propagation significantly.

From-SVN: r16250
1997-10-31 08:35:31 -07:00
Jeffrey A Law
8c316ae21c global.c (global_alloc): Free the conflict matrix after reload has finished.
* global.c (global_alloc): Free the conflict matrix after
        reload has finished.

From-SVN: r16249
1997-10-31 07:08:40 -07:00
Jason Merrill
6874c2647b [multiple changes]
Fri Oct 31 01:45:31 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* libgcc2.c (L_eh): Define __eh_pc.
	Replace __eh_type with generic pointer __eh_info.

Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>

	Support for nested exceptions.
	* tinfo2.cc (__is_pointer): New fn.
	* exception.cc (struct cp_eh_info): Define.
	(__cp_exception_info, __uncatch_exception): New fns.
	(__cp_push_exception, __cp_pop_exception): New fns.
	* except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
 	Lose empty_fndecl.
	(init_exception_processing): Likewise.  __eh_pc is now external.
	(push_eh_info): New fn.
	(get_eh_{info,value,type,caught}): New fns.
	(push_eh_cleanup): Just call __cp_pop_exception.
	(expand_start_catch_block): Use push_eh_info.  Start the eh region
	sooner.
	(expand_end_eh_spec): Use push_eh_info.
	(expand_throw): Call __cp_push_exception to set up the exception info.
	Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
	when we rethrow.
	(expand_builtin_throw): Don't refer to empty_fndecl.

From-SVN: r16248
1997-10-31 04:52:55 -05:00
J"orn Rennecke
59fe8c2c20 expr.c (expand_increment): When enqueing a postincrement for a MEM...
* expr.c (expand_increment): When enqueing a postincrement for a MEM,
	use copy_to_reg if address is not a general_operand.

From-SVN: r16247
1997-10-31 00:40:46 +00:00
J"orn Rennecke
d1271dedce profile.c (output_func_start_profiler): Clear flag_inline_functions for the duration of the call to rest_of_compilation.
* profile.c (output_func_start_profiler): Clear flag_inline_functions
	for the duration of the call to rest_of_compilation.

From-SVN: r16246
1997-10-31 00:23:07 +00:00
Doug Evans
c0498f4395 Clean up pass over sparc -m{cpu,tune} docs.
From-SVN: r16245
1997-10-30 23:01:26 +00:00
Doug Evans
ac52b80b6d configure.in (sparc-*-elf*): Use sparc/elf.h, sparc/t-elf.
* configure.in (sparc-*-elf*): Use sparc/elf.h, sparc/t-elf.
	Set extra_parts.
	(sparc*-*-*): Recognize --with-cpu=v9.
	* sparc/elf.h: New file.
	* sparc/t-elf: New file.

From-SVN: r16243
1997-10-30 22:52:41 +00:00
Doug Evans
5a36007ac0 New files for embedded sparc/elf support.
From-SVN: r16240
1997-10-30 22:38:32 +00:00
Doug Evans
70f62f4b17 New files for embedded sparc/elf support.
From-SVN: r16239
1997-10-30 22:38:04 +00:00
Jeffrey A Law
f891229781 mn10300.c (const_8bit_operand): New function.
* mn10300.c (const_8bit_operand): New function.
        (mask_ok_for_mem_btst): New funtion.
        * mn10300.md (btst patterns with mem operands): Use new functions
        to avoid creating btst instructions with invalid operands.

From-SVN: r16236
1997-10-30 13:34:59 -07:00
Jason Merrill
5da07ba3ac * gen-params: Override NULL.
From-SVN: r16232
1997-10-29 23:00:21 -07:00
Robert Lipe
70f89f0d1d termdep.h: If POSIX...
* info/termdep.h: If POSIX, #undef TIOCGETC for benefit of systems
        that provide TIOCETC but not struct tchars.

From-SVN: r16231
1997-10-29 22:55:14 -07:00
Michael Meissner
05ef204d6d Fix duplicate SIG_SYSLIST warnings on PowerPC Linux
From-SVN: r16230
1997-10-29 22:00:14 +00:00
Gavin Koch
feecabdf83 elf64.h (PREFERRED_DEBUGGING_TYPE): Only define if not previously defined.
* config/mips/elf64.h (PREFERRED_DEBUGGING_TYPE): Only define
	if not previously defined.

From-SVN: r16229
1997-10-29 18:21:18 +00:00
Doug Evans
de95730392 function.c (assign_parms): Correct mode of stack_parm if entry_parm underwent a mode conversion.
* function.c (assign_parms): Correct mode of stack_parm if
        entry_parm underwent a mode conversion.

From-SVN: r16228
1997-10-28 23:54:49 -07:00
Jeff Law
074c2cffc8 Expect this test to fail.
Don't even bother trying to even compile the testcase.

From-SVN: r16227
1997-10-28 23:41:58 -07:00
Jody Goldberg
0c23b0b21f * Makefile.in (CFILES): Add pexecute.c.
From-SVN: r16226
1997-10-28 23:39:04 -07:00
Brendan Kehoe
ba3b38784c global.c (global_alloc): Use xmalloc instead of alloca for CONFLICTS...
* global.c (global_alloc): Use xmalloc instead of alloca for
	CONFLICTS, since max_allocno * allocno_row_words alone can be more
	than 2.5Mb sometimes.

From-SVN: r16223
1997-10-28 18:39:28 -05:00
Richard Henderson
d540ae2cd8 reload1.c (eliminate_regs [SET]): If [SUBREG] widened the mode of DEST for the spill...
* reload1.c (eliminate_regs [SET]): If [SUBREG] widened the mode of
DEST for the spill, adjust mode of SRC to compensate.

From-SVN: r16222
1997-10-28 15:29:44 -08:00
Michael Meissner
d24661605f update doc for CONST_{,DOUBLE_}OK_FOR_LETTER_P, EXTRA_CONTSTRAINT
From-SVN: r16221
1997-10-28 22:56:06 +00:00
Michael Meissner
e119b68c3e update doc for CONST_{,DOUBLE_}OK_FOR_LETTER_P, EXTRA_CONTSTRAINT
From-SVN: r16220
1997-10-28 22:52:51 +00:00
Richard Henderson
42f4929d5a alpha.md (reload_inqi): Check for MEM before strict_memory_address_p...
* alpha.md (reload_inqi): Check for MEM before strict_memory_address_p,
since any_memory_operand() allows pseudos during reload.
(reload_inhi, reload_outqi, reload_outhi): Likewise.

From-SVN: r16219
1997-10-28 14:40:01 -08:00
Jim Wilson
0841747819 Fix coldfire/btst problems.
* m68k.md (btst patterns): Add 5200 support.

From-SVN: r16217
1997-10-28 11:56:50 -08:00
Toon Moene
750e83485a fold-const.c (fold): For ((a * C1) / C3) or (((a * C1) + C2) / C3) optimizations...
* fold-const.c (fold): For ((a * C1) / C3) or (((a * C1) + C2) / C3)
        optimizations, look inside dividend to determine if the expression
        can be simplified by using EXACT_DIV_EXPR.

From-SVN: r16216
1997-10-28 12:02:23 -07:00
Jason Merrill
ede1993290 * dwarf2out.c (output_call_frame_info): Use l1 instead of ".".
From-SVN: r16215
1997-10-28 13:23:50 -05:00
Richard Henderson
66d91cb9ea * alpha.c (summarize_insn [SUBREG]): Propogate SET.
From-SVN: r16213
1997-10-28 00:34:06 -08:00
Richard Henderson
4f3f5e9fcb alpha.c (alpha_handle_trap_shadows): Don't call get_attr_trap on a CLOBBER.
* alpha.c (alpha_handle_trap_shadows): Don't call get_attr_trap
on a CLOBBER.

From-SVN: r16212
1997-10-28 00:04:16 -08:00
Richard Henderson
f3352b9e9f alpha.md (movqi, movhi): Make sure new insns created during reload won't need reloading themselves.
* alpha.md (movqi, movhi): Make sure new insns created during reload
won't need reloading themselves.
(reload_inqi, reload_inhi, reload_outqi, reload_outhi): Likewise.

From-SVN: r16211
1997-10-27 21:28:29 -08:00
Jeffrey A Law
0cecc1904d * mn10300.h (GO_IF_LEGITIMATE_ADDRESS): Disable reg+reg.
From-SVN: r16209
1997-10-27 16:07:37 -07:00
Jason Merrill
c9670e62b9 * Makefile.in: check-target-libio depends on all-target-libstdc++.
From-SVN: r16206
1997-10-27 15:04:45 -05:00
Richard Henderson
a09ba5a2b5 alpha.c (alpha_sa_mask [VMS]): Don't include $26 in the mask.
* alpha.c (alpha_sa_mask [VMS]): Don't include $26 in the mask.
Patch from Klaus Kaempf <kkaempf@progis.de>.

From-SVN: r16196
1997-10-26 13:47:50 -08:00
Jim Wilson
7581a30fe2 expr.c (expand_expr, [...]): Optimize a reference to an element in a constant string.
* expr.c (expand_expr, case INDIRECT_REF): Optimize a reference
        to an element in a constant string.

From-SVN: r16195
1997-10-26 13:33:27 -07:00
Jeff Law
edaa4ee062 Fix typo in last change.
From-SVN: r16194
1997-10-26 13:25:38 -07:00
Jason Merrill
16540e1b03 rebuild
From-SVN: r16193
1997-10-26 15:01:11 -05:00
Jason Merrill
d84e64d416 dwarf2out.c (output_call_frame_info): The CIE pointer is now a 32 bit PC-relative offset.
* dwarf2out.c (output_call_frame_info): The CIE pointer is now a 32
 	bit PC-relative offset.  The exception range table pointer is now in
 	the CIE.
	* frame.c (dwarf_cie, dwarf_fde): Rename CIE_pointer to CIE_delta.
	(count_fdes, add_fdes, get_cie): Adjust.
	(cie_info, extract_cie_info, __frame_state_for): Adjust eh_ptr uses.

	From H.J. Lu:
	* frame.c (count_fdes, add_fdes): Skip linked once FDE entries.

From-SVN: r16192
1997-10-26 14:54:42 -05:00
Jeff Law
bd123dc9f2 Opps. Checked in some development patches by accident.
From-SVN: r16189
1997-10-26 11:55:13 -07:00
Richard Henderson
962867229a alias.c (memrefs_conflict_p): Treat arg_pointer_rtx just like stack_pointer_rtx.
* alias.c (memrefs_conflict_p): Treat arg_pointer_rtx just
        like stack_pointer_rtx.

From-SVN: r16188
1997-10-26 11:48:31 -07:00
Manfred Hollstein
361e618f25 Makefile.in (bootstrap-lean): Combined with `normal' bootstrap targets using "$@" to provide support for...
* Makefile.in (bootstrap-lean): Combined with `normal' bootstrap
        targets using "$@" to provide support for similar but not identical
        targets without having to duplicate code.
        (bootstrap4): New goal.

From-SVN: r16187
1997-10-26 11:45:07 -07:00
Manfred Hollstein
cc71c0ca1f Makefile.in (bootstrap-lean): Combined with `normal' bootstrap targets using "$@" to provide support for...
* Makefile.in (bootstrap-lean): Combined with `normal' bootstrap
        targets using "$@" to provide support for similar but not identical
        targets without having to duplicate code.

From-SVN: r16186
1997-10-26 11:44:33 -07:00
Jeffrey A Law
adb9effb26 Take out find_base_value change -- not needed, only the find_base_term
change was needed.

From-SVN: r16185
1997-10-26 11:39:57 -07:00
Manfred Hollstein
e85988b5d5 Makefile.in (compare, [...]): Combined to one ruleset determining actions to be performed via $@.
* Makefile.in (compare, compare-lean, compare3): Combined to one
        ruleset determining actions to be performed via $@.
        (compare4, compare4-lean): New targets.
        (gnucompare, gnucompare3): Combined to one ruleset determining
        actions to be performed via $@. Also, note which files failed
        the comparison test in .bad_compare.
        (gnucompare-lean, gnucompare3-lean, gnucompare4-lean): New targets.

From-SVN: r16184
1997-10-26 11:28:57 -07:00
Jeffrey A Law
7337c67fcd * Makefile.in (LIBGCC2_CFLAGS): Add -fexceptions.
From-SVN: r16183
1997-10-26 11:21:28 -07:00
Jeffrey A Law
6d849a2abd alias.c (find_base_value): Handle PRE_INC, PRE_DEC, POST_INC, and POS_DEC.
* alias.c (find_base_value): Handle PRE_INC, PRE_DEC, POST_INC,
        and POS_DEC.
        (find_base_term): Likewise.

        * alias.c (true_dependence): Fix typo.

From-SVN: r16182
1997-10-26 10:38:13 -07:00
Toon Moene
91585c63e4 fold-const (fold): Also simplify FLOOR_DIV_EXPR to EXACT_DIV_EXPR if...
* fold-const (fold): Also simplify FLOOR_DIV_EXPR to EXACT_DIV_EXPR
        if the dividend is a multiple of the divisor.

From-SVN: r16181
1997-10-26 10:05:24 -07:00
Jeffrey A Law
6d6d0fa07e toplev.c (flag_rerun_loop_opt): New variable.
* toplev.c (flag_rerun_loop_opt): New variable.
        (f_options): Handle -frerun-loop-opt.
        (rest_of_compilation): If -frerun-loop-opt, then run the loop
        optimizer twice.
        (main): Enable -frerun-loop-opt by default for -O2 or greater.

From-SVN: r16180
1997-10-26 09:56:15 -07:00
Jeffrey A Law
da0af5a56f loop.c (simplify_giv_expr): Adding two invariants results in an invariant.
* loop.c (simplify_giv_expr): Adding two invariants results
        in an invariant.

From-SVN: r16179
1997-10-26 09:20:07 -07:00
Richard Henderson
ca0f22208f expr.c (get_inner_reference): Remove the array bias after converting the index to Pmode.
* expr.c (get_inner_reference): Remove the array bias after
        converting the index to Pmode.

From-SVN: r16178
1997-10-26 09:13:10 -07:00
Jeffrey A Law
a6f7ba1798 mn10300.h (TARGET_SWITCHES): Add -mmult-bug and -mno-mult-bug.
* mn10300.h (TARGET_SWITCHES): Add -mmult-bug and -mno-mult-bug.
        (TARGET_MULT_BUG): Define.
        (TARGET_DEFAULT): Default to TARGET_MULT_BUG.
        * mn10300.md (mulsi3): Handle TARGET_MULT_BUG.

From-SVN: r16173
1997-10-25 12:16:50 -06:00
Brendan Kehoe
fc55478797 Reverse this, bad call on my part:
1,4d0
< Fri Oct 24 17:49:10 1997  Jim Wilson  <wilson@cygnus.com>
<
< 	* integrate.c (save_for_inline_copying): Copy parm_reg_stack_loc.
<

From-SVN: r16172
1997-10-25 12:23:10 -04:00
Jim Wilson
f15e65f1fe integrate.c (save_for_inline_copying): Copy parm_reg_stack_loc.
* integrate.c (save_for_inline_copying): Copy parm_reg_stack_loc.

fixes many of the inlining problems causing various suite++ and perennial
test failures, among others

From-SVN: r16171
1997-10-24 20:50:35 -04:00
Jeffrey A Law
17ad8a3bb9 mn10200.c (indirect_memory_operand): Delete unused function.
* mn10200.c (indirect_memory_operand): Delete unused function.
        * mn10200.h (EXTRA_CONSTRAINT): Handle 'R'.
        * mn10200.md (bset, bclr insns): Handle output in a reg too.

From-SVN: r16169
1997-10-24 17:36:42 -06:00
Richard Henderson
e16b49d379 alpha.md (call patterns): Revert Oct 16 change...
* alpha.md (call patterns): Revert Oct 16 change; if we are to elide
the callee's ldgp, we must do it ourselves, and we use the jsr tag
for more than scheduling.

From-SVN: r16168
1997-10-24 15:57:54 -07:00
Jeff Law
bf4219f03f Another goof in last change.
From-SVN: r16165
1997-10-24 13:56:45 -06:00
Doug Evans
27f654110e * sparc/sparc.h (ASM_SPEC): Delete asm_arch.
From-SVN: r16164
1997-10-24 19:39:08 +00:00
Doug Evans
e632a26c1d (ASM_SPEC): Delete asm_arch.
From-SVN: r16163
1997-10-24 19:36:54 +00:00
Jeff Law
371036e032 Fxi typo in last change.
From-SVN: r16162
1997-10-24 13:34:58 -06:00
Jeffrey A Law
e9ad457396 mn10300.c (symbolic_operand, [...]): New functions.
* mn10300.c (symbolic_operand, legitimize_address): New functions.
        * mn10300.h (LEGITIMIZE_ADDRESS): Call legitimize_address.
        (GO_IF_LEGITIMATE_ADDRESS): Don't allow base + symbolic.

From-SVN: r16158
1997-10-24 13:18:29 -06:00
Jeffrey A Law
66724f0abd * version.c: Bump for snapshot.
From-SVN: r16156
1997-10-23 09:34:36 -06:00
J"orn Rennecke
c401498bbf dbxout.c (dbxout_start_new_source_file): Use output_quoted_string for FILENAME.
* dbxout.c (dbxout_start_new_source_file): Use output_quoted_string
	for FILENAME.

From-SVN: r16155
1997-10-23 13:11:19 +01:00
Jason Merrill
7b4f18a381 pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
* pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.

Fixes libstdc++ failure.

From-SVN: r16153
1997-10-23 05:55:55 -04:00
Jeffrey A Law
56bf1fd97a toplev.c (flag_exceptions): Default value is 2.
* toplev.c (flag_exceptions): Default value is 2.
        (compile_file): If flag_exceptions still has the value 2, then
        set it to 0.

        * lex.c (lang_init): Enable flag_exceptions by default if no
        command line switch was specified.
Gross hacks to allow front-ends to override -fexceptions.

From-SVN: r16152
1997-10-22 19:29:14 -06:00
H.J. Lu
1181d2d553 libio.h (_IO_LOCK_T): Handle glibc 2 when _IO_MTSAFE_IO is not defined.
* libio.h (_IO_LOCK_T): Handle glibc 2 when _IO_MTSAFE_IO is
        not defined.

        * iovsscanf.c (vsscanf): Make it weak alias of _IO_vsscanf if
        __linux__ is defined instead of __ELF__

        * config/linuxlibc1.mt (USER_INCLUDES): Add libio.h.
OK'd by Ulrich.

From-SVN: r16151
1997-10-22 19:17:58 -06:00
Brendan Kehoe
4966381af5 method.c (build_template_parm_names, [...]): Add static to definitions.
* method.c (build_template_parm_names, build_decl_overload_real):
        Add static to definitions.
        * pt.c (add_to_template_args, note_template_header,
        processing_explicit_specialization, type_unification_real): Likewise.
        ({determine,check}_explicit_specialization): Use a single string for
        error messages.

fixes problems building with sunos4 system cc

From-SVN: r16150
1997-10-22 20:00:20 -04:00
Jeffrey A Law
a04232e5ff rs6000.c (struct machine_function): Add pic_offset_table_rtx.
* rs6000.c (struct machine_function): Add pic_offset_table_rtx.
        (rs6000_save_machine_status): Save pic_offset_table_rtx.
        (rs6000_restore_machine_status: Restore pic_offset_table_rtx.

From-SVN: r16149
1997-10-22 15:10:49 -06:00
Richard Henderson
83ffecd201 com.c (ffecom_expr_): Take an new arg TREE_TYPE that if non-null specifies the type in which to do...
* com.c (ffecom_expr_): Take an new arg TREE_TYPE that if non-null
        specifies the type in which to do the calculation.  Change all callers.
        [FFEBLD_opARRAYREF]: Force the index expr to use sizetype.

From-SVN: r16148
1997-10-22 11:38:47 -07:00
Jeffrey A Law
0bd83abd44 local-alloc.c (block_alloc): Don't lose if two SCRATCH expressions are shared.
* local-alloc.c (block_alloc): Don't lose if two SCRATCH expressions
        are shared.

From-SVN: r16147
1997-10-22 09:58:33 -06:00
Jeffrey A Law
b22b9b3ef2 rs6000.md (*movsi_got_internal_mem): New pattern.
* rs6000.md (*movsi_got_internal_mem): New pattern.
        (*movsi_got_internal_mem splitter): New define_split.
Fixes some egcs bugs.

From-SVN: r16146
1997-10-22 00:31:00 -06:00
Michael Meissner
70cfa7adbd Add documentation for Haifa ISSUE_RATE
From-SVN: r16145
1997-10-22 02:06:18 +00:00
Jim Wilson
c1e385dbd1 Fix typo in last obstack.h change.
* obstack.h (obstack_empty_p): Fix spurious space after backslash.

From-SVN: r16144
1997-10-21 18:16:10 -07:00
Jeffrey A Law
c6ee9150da mn10300.md (movqi, movhi): Avoid using address registers as destinations unless absolutely necessary.
* mn10300.md (movqi, movhi): Avoid using address registers as
        destinations unless absolutely necessary.

From-SVN: r16141
1997-10-21 18:41:31 -06:00
Geoff Keating
1a98615242 rs6000.c: Avoid creating a stack frame under SYSV ABI if we only need to save LR.
* rs6000.c: Avoid creating a stack frame under SYSV ABI if we
        only need to save LR.

From-SVN: r16140
1997-10-21 18:31:13 -06:00
Jeffrey A Law
d5255ba2cb * mn10200.c (expand_prologue): Fix typo.
From-SVN: r16139
1997-10-21 14:58:16 -06:00
Jeff Law
9d2128b88e mn10200.h (GO_IF_LEGITIMATE_ADDRESS): Do not allow indexed addresses.
* mn10200.h (GO_IF_LEGITIMATE_ADDRESS): Do not allow indexed
        addresses.
        * mn10200.md (neghi2): Provide an alternative which works if
        the input and output register are the same.

[[Split portion of a mixed commit.]]

From-SVN: r16137.2
1997-10-21 13:55:51 -06:00
Jeff Law
e92f9bcf4d mn10200.h (GO_IF_LEGITIMATE_ADDRESS): Do not allow indexed addresses.
* mn10200.h (GO_IF_LEGITIMATE_ADDRESS): Do not allow indexed
        addresses.
        * mn10200.md (neghi2): Provide an alternative which works if
        the input and output register are the same.

From-SVN: r16136
1997-10-21 13:52:12 -06:00
Jeffrey A Law
576e5accbd mn10300.c (print_operand): Handle 'S'.
* mn10300.c (print_operand): Handle 'S'.
        * mn10300.md (ashlsi3, lshrsi3, ashrsi3): Use %S for
        shift amount in last alternative

From-SVN: r16134
1997-10-21 13:10:24 -06:00
Jeffrey A Law
5d29a95f92 mn10300.c (expand_epilogue): Rework to handle register restores in "ret" and "retf" instructions correctly.
* mn10300.c (expand_epilogue): Rework to handle register restores
        in "ret" and "retf" instructions correctly.

From-SVN: r16132
1997-10-21 10:04:57 -06:00
Jim Wilson
3bf1b08254 Patches to fix minor optimizer bugs
Patches to fix minor optimizer bugs
	* expmed.c (extract_bit_field): Don't make flag_force_mem disable
	extzv for memory operands.
	* cse.c (simplify_ternary_operation, case IF_THEN_ELSE): Collapse
	redundant conditional moves to single operand.

From-SVN: r16129
1997-10-20 16:49:48 -07:00
Doug Evans
ded17aad24 Update sparc docs.
From-SVN: r16127
1997-10-20 22:06:10 +00:00
Nick Clifton
ddbd8d3619 v850.h: Move define of __v850__ from CPP_PREDEFINES to CPP_SPEC.
* v850.h: Move define of __v850__ from CPP_PREDEFINES
        to CPP_SPEC.

        * xm-v850.h: Use __v850 rather than __v850__ to
        identify v850 port.

From-SVN: r16126
1997-10-20 15:33:53 -06:00
Doug Evans
617b50b641 Expect SPARC_DEFAULT_CMODEL to be overridden in cover file.
From-SVN: r16125
1997-10-20 21:29:01 +00:00
Doug Evans
202fd1d57e Update copyright year.
From-SVN: r16124
1997-10-20 21:28:27 +00:00
Jim Wilson
a944a4ebfd Fix O32 -p bug reported by Ralf Baechle.
* mips/mips.c (compute_frame_size): Not a leaf function if
	profile_flag set.

From-SVN: r16110
1997-10-20 14:16:21 -07:00
Doug Evans
f0a9fa6c6a Lotsa sparc stuff.
From-SVN: r16109
1997-10-20 20:50:34 +00:00
Doug Evans
a0a301fc97 sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
* sparc/sparc.h (SPARC_V9,SPARC_ARCH64): Delete.
	(DEFAULT_ARCH32_P): New macro.
	(TARGET_ARCH{32,64}): Allow compile time or runtime selection.
	(enum cmodel): Declare.
	(sparc_cmodel_string,sparc_cmodel): Declare.
	(SPARC_DEFAULT_CMODEL): Provide default.
	(TARGET_{MEDLOW,MEDANY}): Renamed to TARGET_CM_{MEDLOW,MEDANY}.
	(TARGET_FULLANY): Deleted.
	(TARGET_CM_MEDMID): New macro.
	(CPP_CPU_DEFAULT_SPEC): Renamed from CPP_DEFAULT_SPEC.
	(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
	(CPP_PREDEFINES): Take out stuff now handled by %(cpp_arch).
	(CPP_SPEC): Rewrite.
	(CPP_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
	(CPP_{ENDIAN,SUBTARGET}_SPEC): New macros.
	(ASM_ARCH{,32,64,_DEFAULT}_SPEC): New macros.
	(ASM_SPEC): Add %(asm_arch).
	(EXTRA_SPECS): Rename cpp_default to cpp_cpu_default.
	Rename asm_default to asm_cpu_default.
	Add cpp_arch32, cpp_arch64, cpp_arch_default, cpp_arch, cpp_endian,
	cpp_subtarget, asm_arch32, asm_arch64, asm_arch_default, asm_arch.
	(NO_BUILTIN_{PTRDIFF,SIZE}_TYPE): Define ifdef SPARC_BI_ARCH.
	({PTRDIFF,SIZE}_TYPE): Provide 32 and 64 bit values.
	(MASK_INT64,MASK_LONG64): Delete.
	(MASK_ARCH64): Renamed to MASK_64BIT.
	(MASK_{MEDLOW,MEDANY,FULLANY,CODE_MODEL}): Delete.
	(EMBMEDANY_BASE_REG): Renamed from MEDANY_BASE_REG.
	(TARGET_SWITCHES): Always provide 64 bit options.
	(ARCH64_SWITCHES): Delete.
	(TARGET_OPTIONS): New option -mcmodel=.
	(INT_TYPE_SIZE): Always 32.
	(MAX_LONG_TYPE_SIZE): Define ifdef SPARC_BI_ARCH.
	(INIT_EXPANDERS): sparc64_init_expanders renamed to sparc_init_....
	(FUNCTION_{,BLOCK_}PROFILER): Delete TARGET_EMBMEDANY support.
	(PRINT_OPERAND_PUNCT_VALID_P): Add '_'.
	* sparc/linux-aout.h (CPP_PREDEFINES): Take out stuff handled by
	CPP_SPEC.
	(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
	* sparc/linux.h: Likewise.
	* sparc/linux64.h (SPARC_V9,SPARC_ARCH64): Delete.
	(ASM_CPU_DEFAULT_SPEC): Renamed from ASM_DEFAULT_SPEC.
	(TARGET_DEFAULT): Delete MASK_LONG64, MASK_MEDANY, add MASK_64BIT.
	(SPARC_DEFAULT_CMODEL): Define.
	(CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
	(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
	(LONG_DOUBLE_TYPE_SIZE): Define.
	(ASM_SPEC): Add %(asm_arch).
	* sparc/sol2.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
	(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
	(TARGET_CPU_DEFAULT): Add ultrasparc case.
	* sparc/sp64-aout.h (SPARC_V9,SPARC_ARCH64): Delete.
	(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.
	(SPARC_DEFAULT_CMODEL): Define.
	* sparc/sp64-elf.h (SPARC_V9,SPARC_ARCH64): Delete.
	(TARGET_DEFAULT): MASK_ARCH64 renamed to MASK_64BIT.  Delete
	MASK_LONG64, MASK_MEDANY.
	(SPARC_DEFAULT_CMODEL): Define.
	(CPP_PREDEFINES): Delete.
	(CPP_SUBTARGET_SPEC): Renamed from CPP_SPEC.
	(ASM_SPEC): Add %(asm_arch).
	(LONG_DOUBLE_TYPE_SIZE): Define.
	(DWARF2_DEBUGGING_INFO): Define.
	* sparc/splet.h (CPP_SPEC): Delete.
	* sparc/sysv4.h (CPP_PREDEFINES): Take out stuff handled by CPP_SPEC.
	(FUNCTION_BLOCK_PROFILER): Delete TARGET_EMBMEDANY support.
	(BLOCK_PROFILER): Likewise.
	* sparc/sparc.c (sparc_cmodel_string,sparc_cmodel): New globals.
	(sparc_override_options): Handle code model selection.
	(sparc_init_expanders): Renamed from sparc64_init_expanders.
	* sparc/sparc.md: TARGET_<code_model> renamed to TARGET_CM_....
	TARGET_MEDANY renamed to TARGET_CM_EMBMEDANY.
	(sethi_di_embmedany_{data,text}): Renamed from sethi_di_medany_....
	(sethi_di_fullany): Delete.

From-SVN: r16108
1997-10-20 20:49:22 +00:00
Geoff Keating
2d5b6dea25 t-ppccomm: Use -msdata=none for crtstuff.
* rs6000/t-ppccomm: Use -msdata=none for crtstuff.
Should fix ctor/dtor problems on ppc-linux.

From-SVN: r16107
1997-10-20 14:13:24 -06:00
Jason Merrill
92b968383e except.c (expand_exception_blocks): Call do_pending_stack_adust.
* except.c (expand_exception_blocks): Call do_pending_stack_adust.
	(expand_end_catch_block): Likewise.
	(expand_end_eh_spec): Likewise.

From-SVN: r16106
1997-10-20 15:14:09 -04:00
Mark Mitchell
92eca6404c decl.c (duplicate_decls): Handle template specializations correctly.
Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>

	* decl.c (duplicate_decls): Handle template specializations
	correctly.
	* error.c (dump_function_name): Fix printing of specializations of
	member functions that are not member templates.
	* cp-tree.h (processing_specialization): Make global.
	* pt.c (processing_specialization): Likewise.
	* lex.c (cons_up_default_function): Save and restore
	processing_specialization to avoid confusion.

From-SVN: r16101
1997-10-20 14:46:24 -04:00
Jason Merrill
a6967cc077 decl.c (init_decl_processing): Give null_node unknown* type.
* decl.c (init_decl_processing): Give null_node unknown* type.
	* typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
	(common_type): Likewise.
	* error.c (args_as_string): Recognize null_node.

From-SVN: r16100
1997-10-20 14:09:06 -04:00
Klaus Kaempf
3a133c72de vms.h (DIVSI3_LIBCALL): OTS$ functions are upper case.
* alpha/vms.h (DIVSI3_LIBCALL): OTS$ functions are upper case.
        (DIVDI3_LIBCALL, UDIVSI3_LIBCALL, UDIVDI3_LIBVALL): Likewise.
        (MODSI3_LIBCALL, MODDI3_LIBCALL): Likewise.
        (UMODSI3_LIBCALL, UMODDI3_LIBCALL): Likewise.
        * alpha/alpha.md (arg_home): Likewise.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>
Co-Authored-By: Richard Kenner <kenner@vlsi1.ultra.nyu.edu>

From-SVN: r16099
1997-10-20 09:50:29 -06:00
Klaus Kaempf
a3b0df2d4a alpha.c (output_prolog, VMS): Use alloca for entry_label and don't truncate to 64 characters.
* alpha.c (output_prolog, VMS): Use alloca for entry_label and don't
        truncate to 64 characters.

vmskrunch changes need this.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>
Co-Authored-By: Richard Kenner <kenner@vlsi1.ultra.nyu.edu>

From-SVN: r16098
1997-10-20 02:29:55 -06:00
Jeff Law
c12894e1c3 alpha.c (vmskrunch): Delete
* alpha/alpha.c (vmskrunch): Delete
        * alpha/vms.h (ENCODE_SECTION_INFO, ASM_DECLARE_FUNCTION_NAME): Delete.

        * make-l2.com: Support openVMS/Alpha.

        * vmsconfig.com: Fix to work on openVMS/Alpha and openVMS/VAX.

Some patches from Klaus.

From-SVN: r16097
1997-10-20 02:11:49 -06:00
J"orn Rennecke
7d4f2e6c2a * longlong.h (count_leading_zeros): Add missing casts to USItype.
From-SVN: r16096
1997-10-19 18:56:45 -06:00
Jeffrey A Law
decd44aced * i386/bsd386.h (ASM_COMMENT_START): Define.
From-SVN: r16095
1997-10-19 18:40:44 -06:00
Doug Evans
200d7a3251 Undo cvs entry 1.4 "Reorg sethi_{hi,si} patterns." and add comment why.
From-SVN: r16080
1997-10-19 16:46:47 +00:00
Jeff Law
4a5121b59a Initial revision
From-SVN: r16070
1997-10-19 10:29:32 -06:00
Jason Merrill
d1485032c8 tree.c (restore_tree_status): Also free up temporary storage when we finish a toplevel function.
* tree.c (restore_tree_status): Also free up temporary storage
	when we finish a toplevel function.
	(dump_tree_statistics): Print stats for backend obstacks.

	* libgcc2.c (__throw): Don't copy the return address.
	* dwarf2out.c (expand_builtin_dwarf_reg_size): Ignore return address.

	* except.c (exceptions_via_longjmp): Initialize to 2 (uninitialized).
	* toplev.c (main): Initialize exceptions_via_longjmp.

	* tree.c: Add extra_inline_obstacks.
	(save_tree_status): Use it.
	(restore_tree_status): If this is a toplevel inline obstack and we
	didn't want to save anything on it, recycle it.
	(print_inline_obstack_statistics): New fn.
	* function.c (pop_function_context_from): Pass context to
	restore_tree_status.
	* obstack.h (obstack_empty_p): New macro.

From-SVN: r16050
1997-10-18 17:10:32 -04:00
Doug Evans
6bd35f8671 * expr.c (use_group_regs): Don't call use_reg for MEMs.
From-SVN: r16046
1997-10-18 19:48:25 +00:00
Jeffrey A Law
6981eacffd * i386/freebsd.h (ASM_COMMENT_START): Fix.
From-SVN: r15993
1997-10-18 00:52:58 -06:00
Jim Wilson
1933ec7e4e v850.c (ep_memory_offset): New function.
* v850.c (ep_memory_offset): New function.
        (ep_memory_operand, substitute_ep_register, v850_reorg): Call it.

        * v850.h (CONST_OK_FOR_*): Add and correct comments.
        (CONSTANT_ADDRESS_P): Add comment.
        (EXTRA_CONSTRAINT): Define 'U'.
        * v850.md: Add comments on bit field instructions.
        (addsi3): Delete &r/r/r alternative.  Add r/r/U alternative.
        (lshrsi3): Use N not J constraint.

        * v850.md (v850_tst1+1): New define_split for tst1 instruction.

        * v850.c (reg_or_0_operand): Call register_operand.
        (reg_or_int5_operand): Likewise.
        * v850.h (MASK_BIG_SWITCH, TARGET_BIG_SWITCH): New macros.
        (TARGET_SWITCHES): Add "big-switch".
        (ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT, CASE_VECTOR_MODE,
        ASM_OUTPUT_BEFORE_BASE_LABEL): Add support for TARGET_BIG_SWITCH.
        (CASE_DROPS_THROUGH): Comment out.
        (CASE_VECTOR_PC_RELATIVE, JUMP_TABLES_IN_TEXT_SECTION): Define.
        * v850.md (cmpsi): Delete compare mode.
        (casesi): New pattern.

        * v850.h (CONST_OK_FOR_N): Delete redundant compare against zero.
        * v850.md (ashlsi3): Use SImode not QImode for shift count.
        (lshrsi3): Likewise.

        * v850.c (print_operand): Add 'c', 'C', and 'z' support.  Delete
        unreachable switch statement after 'b' support.  Remove "b" from
        strings for 'b' support.
        * v850.md (branch_normal, branch_invert): Change %b to b%b.

v850 patches from Jim.

From-SVN: r15992
1997-10-17 23:46:19 -06:00
Jeffrey A Law
13c2de98de Makefile.in (LIBGCC2_CFLAGS): Avoid a backslash then an empty line if @inhibit_libc@ is empty.
* Makefile.in (LIBGCC2_CFLAGS): Avoid a backslash then an
        empty line if @inhibit_libc@ is empty.

From-SVN: r15991
1997-10-17 23:31:26 -06:00
Robert Lipe
b2167beef2 sco5.h: Let ELF use dwarf2 unwinding.
* i386/sco5.h: Let ELF use dwarf2 unwinding.  COFF uses sjlj.
        (EH_FRAME_SECTION_ASM_OP, EH_FRAME_SECTION_ASM_OP_ELF): Defined.
        (EH_FRAME_SECTION_ASM_OP_COFF): Likewise.
        (DWARF2_UNWIND_INFO): Let this track object file format.
        (EXTRA_SECTIONS): Add in_eh.
        (EH_FRAME_SECTION_ASM_OP, EH_FRAME_SECTION_ASM_OP_ELF): Define.
        (EH_FRAME_SECTION_ASM_OP_COFF): Likewise.

From-SVN: r15990
1997-10-17 23:21:23 -06:00
Jason Merrill
8070c78887 * tree.h, vector.h: Fix accidental divergence from SGI release.
From-SVN: r15989
1997-10-17 22:09:13 -04:00
Doug Evans
c12158208e * ginclude/va-sparc.h: Rewrite v9 support.
From-SVN: r15987
1997-10-17 23:26:02 +00:00
Doug Evans
2191290cb9 Rewrite v9 support.
From-SVN: r15986
1997-10-17 23:25:26 +00:00
Doug Evans
bf65b159ec (output_fp_move_quad): If TARGET_V9 and not TARGET_HARD_QUAD, use
fmovd so it works if a quad float ends up in one of the upper 32
	float regs.

From-SVN: r15985
1997-10-17 23:21:12 +00:00
Doug Evans
9d162eb296 sparc.c (output_fp_move_quad): If TARGET_V9 and not TARGET_HARD_QUAD...
* sparc.c (output_fp_move_quad): If TARGET_V9 and not TARGET_HARD_QUAD, use
fmovd so it works if a quad float ends up in one of the upper 32
float regs.

From-SVN: r15984
1997-10-17 23:20:03 +00:00
David S. Miller
7e37212eeb sparc.md (pic_{lo_sum,sethi}_di): New patterns necessary for PIC support on sparc64.
* sparc/sparc.md (pic_{lo_sum,sethi}_di): New patterns
	necessary for PIC support on sparc64.

From-SVN: r15982
1997-10-17 23:01:29 +00:00
Doug Evans
bd6c666f80 Reorg sethi_{hi,si} patterns.
From-SVN: r15979
1997-10-17 22:45:15 +00:00
Jeff Law
67c5b7ada6 Add some stuff.
From-SVN: r15978
1997-10-17 16:16:29 -06:00
Doug Evans
f4f8e3703a sparc.c (output_double_int): Output DI mode values correctly when HOST_BITS_PER_WIDE_INT is 64.
* sparc/sparc.c (output_double_int): Output DI mode values
	correctly when HOST_BITS_PER_WIDE_INT is 64.

From-SVN: r15977
1997-10-17 21:59:06 +00:00
David S. Miller
da2a90f71a sparc.h (FUNCTION_PROFILER): Fix format string when TARGET_MEDANY.
* sparc/sparc.h (FUNCTION_PROFILER): Fix format string when
	TARGET_MEDANY.

From-SVN: r15974
1997-10-17 21:35:20 +00:00
David S. Miller
64562cc84e * sparc/sparc.c (dwarf2out_cfi_label): Extern no longer needed.
From-SVN: r15972
1997-10-17 21:21:12 +00:00
David S. Miller
bf2a2c6b9f * sparc/linux64.h (LINK_SPEC): Dynamic linker is ld-linux64.so.2.
From-SVN: r15971
1997-10-17 21:16:36 +00:00
Doug Evans
9ff84e679a First pass at updating to current sparc v9 abi.
From-SVN: r15969
1997-10-17 20:41:17 +00:00
Doug Evans
4fb4e4b8be sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
* sparc/sp64-elf.h (TARGET_DEFAULT): Delete MASK_STACK_BIAS.
	* sparc/sparc.h (PROMOTE_MODE): Promote small ints if arch64.
	(PROMOTE_FUNCTION_ARGS,PROMOTE_FUNCTION_RETURN): Define.
	(SPARC_FIRST_FP_REG, SPARC_FP_REG_P): New macros.
	(SPARC_{OUTGOING,INCOMING}_INT_ARG_FIRST): New macros.
	(SPARC_FP_ARG_FIRST): New macro.
	(CONDITIONAL_REGISTER_USAGE): All v9 fp regs are volatile now.
	(REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER): Reorganize fp regs.
	(NPARM_REGS): There are 32 fp argument registers now.
	(FUNCTION_ARG_REGNO_P): Likewise.
	(FIRST_PARM_OFFSET): Update to new v9 abi.
	(REG_PARM_STACK_SPACE): Define for arch64.
	(enum sparc_arg_class): Delete.
	(sparc_arg_count,sparc_n_named_args): Delete.
	(struct sparc_args): Redefine and use for arch32 as well as arch64.
	(GET_SPARC_ARG_CLASS,ROUND_REG,ROUND_ADVANCE): Delete.
	(FUNCTION_ARG_ADVANCE): Rewrite.
	(FUNCTION_ARG,FUNCTION_INCOMING_ARG): Rewrite.
	(FUNCTION_ARG_{PARTIAL_NREGS,PASS_BY_REFERENCE}): Rewrite.
	(FUNCTION_ARG_CALLEE_COPIES): Delete.
	(FUNCTION_ARG_{PADDING,BOUNDARY}): Define.
	(STRICT_ARGUMENT_NAMING): Define.
	(doublemove_string): Declare.
	* sparc/sparc.c (sparc_arg_count,sparc_n_named_args): Delete.
	(single_move_string): Use GEN_INT, and HOST_WIDE_INT.
	(doublemove_string): New function.
	(output_move_quad): Clean up some of the arch64 support.
	(compute_frame_size): Add REG_PARM_STACK_SPACE if arch64.
	Don't add 8 bytes of reserved space if arch64.
	(sparc_builtin_saveregs): Combine arch32/arch64 versions.
	(init_cumulative_args): New function.
	(function_arg_slotno): New static function.
	(function_arg,function_arg_partial_nregs): New functions.
	(function_arg_{pass_by_reference,advance}): New functions.
	(function_arg_padding): New function.
First pass at updating to current v9 abi.

From-SVN: r15968
1997-10-17 20:39:37 +00:00
Jeff Law
941b1165c2 Fix from Joern.
From-SVN: r15955
1997-10-17 09:54:01 -06:00
Christian Iseli
f22376c716 regclass.c (record_address_regs): Look at REG_OK_FOR_{BASE,INDEX}_P for hard regs to determine base and index...
* regclass.c (record_address_regs): Look at REG_OK_FOR_{BASE,INDEX}_P
        for hard regs to determine base and index registers.

From-SVN: r15954
1997-10-17 09:46:57 -06:00
Christian Iseli
b8fb2d721d reload.c (debug_reload_to_stream): New function.
* reload.c (debug_reload_to_stream): New function.  Specify stream
        into which to write debug info.
        (debug_reload): Modify to call debug_reload_to_stream with stderr.
Thanks.  Installed.

From-SVN: r15953
1997-10-17 09:40:52 -06:00
Richard Henderson
b79ee7eb70 combine.c (can_combine_p): Don't combine with an asm whose output is a hard register.
* combine.c (can_combine_p): Don't combine with an asm whose
        output is a hard register.

From-SVN: r15940
1997-10-16 15:06:43 -07:00
Mike Stump
5c19a35643 c-decl.c (start_struct): Ensure that structs with forward declarations are in fact packed when...
* c-decl.c (start_struct): Ensure that structs with forward
        declarations are in fact packed when -fpack-struct is given.

        * stor-layout.c (layout_record): Ignore STRUCTURE_SIZE_BOUNDARY if
        we are packing a structure.  This allows a structure with only
        bytes to be aligned on a byte boundary and have no padding on a
        m68k.

From-SVN: r15939
1997-10-16 15:45:24 -06:00
Judy Goldberg
bdd7e652f4 pt.c (determine_explicit_specialization): Initialize "dummy" to keep Purify quiet.
* pt.c (determine_explicit_specialization): Initialize "dummy"
        to keep Purify quiet.

From-SVN: r15938
1997-10-16 15:33:36 -06:00
Richard Kenner
02bef6da38 rs6000.h (ROUND_TYPE_ALIGN): Don't blow up if no fields in record.
* rs6000.h (ROUND_TYPE_ALIGN): Don't blow up if no fields in record.
Bring over from gcc2.

From-SVN: r15937
1997-10-16 15:16:09 -06:00
Richard Henderson
9ecc37f0e2 alpha.c (alpha_return_addr_rtx): New variable.
* alpha.c (alpha_return_addr_rtx): New variable.
        (alpha_save_machine_status): New; save it.
        (alpha_restore_machine_status): New; restore it.
        (alpha_init_expanders): New; clear it.
        (alpha_return_addr): New; set it.
        (alpha_ra_ever_killed): New; if alpha_return_addr_rtx, regs_ever_live
        is overly conservative, so search the insns explicitly.
        (alpha_sa_mask [VMS]): Check alpha_ra_ever_killed.
        (alpha_sa_size [VMS && !VMS]): Likewise.
        * alpha.h (RETURN_ADDR_RTX): Call alpha_return_addr.
        (INIT_EXPANDERS): New definition.

        * alpha.c: Move REG_PV, REG_RA somewhere more visible in the file.
        (output_prolog [!VMS]): Use them.

        * alpha.c (output_prolog [!VMS]): Move gp detection to ...
        (alpha_does_function_need_gp): ... a new function.  Refine the
        CALL_INSN test to just TYPE_JSR.
        * alpha.md (most call insns): Fix some jsr/ibr type transpositions.

From-SVN: r15936
1997-10-16 11:37:59 -07:00
Jeffrey A Law
bda2ffefc8 * version.c: Bump for snapshot.
From-SVN: r15932
1997-10-16 09:39:00 -06:00
Jeff Law
1510f52e3e configure.in: Create compatibility code in bits/libc-lock.h file.
* configure.in: Create compatibility code in bits/libc-lock.h file.


        * libio.h (_IO_LOCK_T): Handle glibc 2 when _IO_MTSAFE_IO is
        not defined.

        * filedoalloc.c (_IO_file_doallocate): Don't call
        _IO_cleanup_registration_needed if __linux__ is defined.

        * iofclose.c (fclose): Make it weak alias of _IO_fclose if
        __ELF__ is defined.

        * iovsprintf.c (vsprintf): Make it weak alias of _IO_vsprintf
        if __ELF__ is defined.

        * iovsscanf.c (vsscanf): Make it weak alias of _IO_vsscanf if
        __ELF__ is defined.

        * config/linuxlibc1.mt (MT_CFLAGS): Defined as -D_G_HAVE_MMAP.
        (IO_OBJECTS): Add filedoalloc.o fileops.o genops.o iofclose.o
        iovsprintf.o iovsscanf.o strops.o.

From-SVN: r15931
1997-10-16 09:30:26 -06:00
Paul Koning
022abf9081 Make-lang.in (stmp-f2c.h): Don't configure the runtime directory if LANGUAGES does not include f77.
* Make-lang.in (stmp-f2c.h): Don't configure the runtime
        directory if LANGUAGES does not include f77.

From-SVN: r15930
1997-10-16 02:02:09 -06:00
Ian Lance Taylor
a6e74b833c asprintf.c: Consistently use either stdarg or varargs.
* asprintf.c: Consistently use either stdarg or varargs.

Bring over from devo.

From-SVN: r15929
1997-10-16 01:39:03 -06:00
Jason Merrill
2636fde4ba method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
* method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
	(build_overload_int): Not here.

Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>

	* class.c (build_type_pathname): Remove.
	(prepare_fresh_vtable): Fix problem with complex MI vtable names.

From-SVN: r15928
1997-10-16 03:20:46 -04:00
Richard Kenner
96b63cd7a2 pa.c (move_operand): Respect -mdisable-indexing.
* pa.c (move_operand): Respect -mdisable-indexing.
        * pa.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
Bring over from gcc2.  Fixes ada -O2 bootstrap.

From-SVN: r15927
1997-10-15 21:37:28 -06:00
David Edelsohn
f192bf8b22 Add patch from Edelsohn
From-SVN: r15918
1997-10-16 01:37:11 +00:00
Richard Henderson
2ea844d394 alpha.c (final_prescan_insn): Gut, remove and transform to ...
* alpha.c (final_prescan_insn): Gut, remove and transform to ...
        (alpha_handle_trap_shadows): ... a new function.  Handle the entire
        function in one go.  Emit RTL for trapb, instead of printf directly.
        (alpha_reorg): New function.  Call alpha_handle_trap_shadows.
        (trap_pending): Kill global variable.
        (output_epilog): Don't call final_prescan_insn.
        (struct shadow_summary): Elide $31 and $f31; now it fits in a word.
        * alpha.h (FINAL_PRESCAN_INSN): Remove.
        (MACHINE_DEPENENT_REORG): Define.
        * alpha.md (jsr patterns with trapb): Stupid and useless.  Kill.
        (trapb): New insn.

From-SVN: r15917
1997-10-15 18:23:23 -07:00
Richard Henderson
74835ed802 alpha.h (ISSUE_RATE): Define.
* alpha.h (ISSUE_RATE): Define.
        * alpha.c (alpha_adjust_cost): Handle EV5 mult delay; don't apply
        EV4 adjustments to EV5.
        * alpha.md: Remove all scaling from function unit delays.  Rework
        EV5 function units to match the CPU.
        (umuldi3_highpart): EV5 added the IMULH insn class.

From-SVN: r15916
1997-10-15 18:16:42 -07:00
Richard Henderson
ee80685a3b Forgot to commit last night.
From-SVN: r15915
1997-10-15 17:47:47 -06:00
Jeffrey A Law
cdc0de30d8 pa.c (following_call): Fail if the CALL_INSN is an indirect call.
* pa.c (following_call): Fail if the CALL_INSN is an indirect
        call.
Brought over from devo.

From-SVN: r15914
1997-10-15 17:41:10 -06:00
Jason Merrill
af4142d50b restore dwarf2 prototypes
From-SVN: r15912
1997-10-15 13:19:40 -04:00
Richard Henderson
0e52c1777d signal_.c (G77_signal_0): Make return type sig_pf as well.
* libF77/signal_.c (G77_signal_0): Make return type sig_pf as well.
        * libI77/fio.h: Include <string.h> if STDC_HEADERS.
        * libU77/chmod_.c: Likewise.

From-SVN: r15911
1997-10-15 10:02:53 -06:00
Richard Henderson
38bf38c1bc man.c (find_man_formatter): Don't cast getenv(), but provide a minimal declaration at top level.
* info/man.c (find_man_formatter): Don't cast getenv(), but provide
        a minimal declaration at top level.

        * makeinfo/makeinfo.c: Don't redefine alloca if it is already defined.

From-SVN: r15910
1997-10-15 09:49:40 -06:00
Jeff Law
87a0d1ac69 Remove code accidentally added twice.
From-SVN: r15909
1997-10-15 09:44:05 -06:00
Jeff Law
434fc96fca No .Sanitize files in egcs.
From-SVN: r15908
1997-10-14 22:26:58 -06:00
Brendan Kehoe
32066e1ae2 parse.y (unary_expr): Give a pedwarn if someone tries to use the &&label GNU extension.
* parse.y (unary_expr): Give a pedwarn if someone tries to use the
	&&label GNU extension.

From-SVN: r15907
1997-10-14 21:26:06 -04:00
Brendan Kehoe
6640eba99b fix two typos
From-SVN: r15906
1997-10-14 16:45:22 -04:00
Jason Merrill
1f479842ab regen
From-SVN: r15905
1997-10-14 15:19:35 -04:00
Mark Mitchell
1f06b26767 decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it, so as to avoid incorrect manglings.
Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>

	* decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
	so as to avoid incorrect manglings.
	* method.c (build_decl_overload_real): Don't mangle return types
	for constructors.

From-SVN: r15904
1997-10-14 15:12:56 -04:00
Mark Mitchell
041c97f2fb cplus-dem.c (demangle_signature): Don't look for return types on constructors.
* cplus-dem.c (demangle_signature): Don't look for return types on
	constructors.  Handle member template constructors.

From-SVN: r15903
1997-10-14 15:12:27 -04:00
Jason Merrill
438998a93d and these
From-SVN: r15902
1997-10-14 15:11:36 -04:00
Jason Merrill
19ddc834bc cplus-dem.c (demangle_signature): Don't look for return types on constructors.
Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>

	* cplus-dem.c (demangle_signature): Don't look for return types on
	constructors.  Handle member template constructors.

and update from devo.

From-SVN: r15901
1997-10-14 15:10:45 -04:00
Jason Merrill
e66d884e7b cp-tree.h (scratchalloc, [...]): Define as macros for now.
* cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
	scratch_tree_cons): Define as macros for now.
	* call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
	lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
	typeck2.c: Use them and the expression_obstack variants.

From-SVN: r15900
1997-10-14 14:59:03 -04:00
Jason Merrill
22ef8a131a tree.h: Declare them.
* tree.h: Declare them.

Oop.

From-SVN: r15899
1997-10-14 14:52:33 -04:00
Jason Merrill
f06327624c * tree.c (expr_tree_cons, build_expr_list, expralloc): New fns.
From-SVN: r15898
1997-10-14 14:43:16 -04:00
Benjamin Kosnik
378ec56d93 Bring over test cases
From-SVN: r15897
1997-10-14 18:41:30 +00:00
Benjamin Kosnik
dae1d6f685 decl.c (store_return_init): Allow classes with explicit ctors to be used with the named return values extension.
* decl.c (store_return_init): Allow classes with explicit ctors to
  be used with the named return values extension.

From-SVN: r15896
1997-10-14 18:36:34 +00:00
Jeff Law
31c0e01bc5 new test from egcs-bug archives.
From-SVN: r15895
1997-10-14 11:35:26 -06:00
Richard Henderson
9abbaac7c2 Make-lang.in (g77*): Copied from cp/Make-lang.in g++*.
* Make-lang.in (g77*): Copied from cp/Make-lang.in g++*.
        * g77spec.c: New file, mostly copied from g++spec.c
        * g77.c: Removed.

From-SVN: r15893
1997-10-13 12:09:13 -06:00
Jeff Law
8c0a849156 Bring over from devo.
From-SVN: r15892
1997-10-13 10:03:04 -06:00
Doug Evans
d60bee3a82 (INCOMING_RETURN_ADDR_RTX,INCOMING_FRAME_SP_OFFSET): Move definitions
to a more sane place.

From-SVN: r15891
1997-10-10 22:33:24 +00:00
Doug Evans
992b2778ce * sparc/t-sp64 (LIBGCC2_CFLAGS): Delete.
From-SVN: r15890
1997-10-10 20:49:12 +00:00
Doug Evans
dec883836b configure.in: Handle --with-newlib.
* configure.in: Handle --with-newlib.
	* Makefile.in (LIBGCC2_CFLAGS): Add @inhibit_libc@.

	* sparc/t-sp64 (LIBGCC2_CFLAGS): Delete.

From-SVN: r15889
1997-10-10 20:48:55 +00:00
Jason Merrill
7ac63bcadb * pt.c (instantiate_decl): Fix previous change.
From-SVN: r15888
1997-10-10 15:22:04 -04:00
Jason Merrill
9cd60aa99b bastring.h: Use ibegin internally.
* std/bastring.h: Use ibegin internally.  Return passed iterator
	instead of recalculating it were appropriate.
	* std/bastring.cc: Adjust for erase.

	From Yotam Medini:
	* std/bastring.h: Replace remove with erase.

From-SVN: r15887
1997-10-10 03:44:56 -04:00
Jason Merrill
38bab5d4c6 * tstring.cc (identitytest): s/remove/erase/.
From-SVN: r15886
1997-10-10 03:43:28 -04:00
Jason Merrill
da8c445d07 stdexcepti.cc (__out_of_range): New fn.
* stdexcepti.cc (__out_of_range): New fn.
	(__length_error): New fn.

	* std/bastring.h (OUTOFRANGE): Fix logic.  Use throwing functions.
	(LENGTHERROR): Likewise.
	Revert Oct 2 changes.
	* string: Revert Oct 2 changes.

	* std/{f,d,ld}complex.h: Replace guiding fns if not -ansi.

From-SVN: r15885
1997-10-10 02:56:56 -04:00
Brendan Kehoe
5b76d03baa add GPL comment at the top
From-SVN: r15884
1997-10-09 21:18:29 -04:00
Brendan Kehoe
e050253aa5 add an initial very rough description of how `explicit' is handled
From-SVN: r15883
1997-10-09 20:05:55 -04:00
Jason Merrill
fee23f5442 pt.c (tsubst): Fix thinko.
* pt.c (tsubst): Fix thinko.
	(instantiate_decl): Really use the original template.

	* call.c (build_new_method_call): Use simple constructor_name for
	error messages.

From-SVN: r15882
1997-10-09 15:13:22 -04:00
Jeffrey A Law
c89078531b method.c (build_underscore_int): Don't use ANSI specific features.
* method.c (build_underscore_int): Don't use ANSI specific
        features.

From-SVN: r15881
1997-10-08 22:45:14 -06:00
Jeffrey A Law
0e1f3f5eb4 Fix typo.
From-SVN: r15880
1997-10-08 14:37:08 -06:00
Jeffrey A Law
12504ae0b9 * version.c: Bump for snapshot.
From-SVN: r15878
1997-10-08 08:55:00 -06:00
Jason Merrill
3bd1e206cb decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN for our key method; it might have been inlined by -O3.
* decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
	for our key method; it might have been inlined by -O3.

From-SVN: r15877
1997-10-08 03:19:53 -04:00
Jason Merrill
ffb690bd08 [multiple changes]
Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>

	* decl.c (make_typename_type): Do not try to call lookup_field for
	non-aggregate types.

Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* typeck.c (build_reinterpret_cast): Tweak.

Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>

	* typeck.c (build_reinterpret_cast): converting a void pointer
	to function pointer with a reinterpret_cast produces a warning
	if -pedantic is issued

Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>

	* typeck.c (c_expand_return): Don't warn about returning a
	reference-type variable as a reference.

From-SVN: r15876
1997-10-08 02:04:28 -04:00
Jeff Law
51cbea761b One more thinko.
From-SVN: r15875
1997-10-07 23:23:19 -06:00
Jeff Law
253a01b4a6 Fix thinko in last change.
From-SVN: r15874
1997-10-07 23:18:17 -06:00
Jason Merrill
a6f025879b method.c (build_static_name): Fix typo.
* method.c (build_static_name): Fix typo.

1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
	OLDDECL before we try to do DECL_USE_TEMPLATE.

From-SVN: r15873
1997-10-08 00:26:17 -04:00
Richard Henderson
7e9e3823c7 Makefile.in (CGFLAGS): Don't force -g0.
* Makefile.in (CGFLAGS): Don't force -g0.
        * libF77/Makefile.in, libI77/Makefile.in, libU77/Makefile.in: Likewise.

From-SVN: r15872
1997-10-07 18:20:24 -06:00
Jeff Law
d1c32bc7ac Undo last incorrect change.
From-SVN: r15871
1997-10-07 17:21:42 -06:00
Jeff Law
5d52c1c3c8 Remove include of <std>
From-SVN: r15870
1997-10-07 16:41:18 -06:00
Manfred Hollstein
e1feece83e cp-tree.h (JOINER): Define to '_' if no '$' or '.' characters are allowed.
* cp-tree.h (JOINER): Define to '_' if no '$' or '.' characters
	are allowed.

From-SVN: r15869
1997-10-07 16:38:40 -06:00
Manfred Hollstein
5643c767f4 aclocal.m4: Substitute INSTALL.
* aclocal.m4: Substitute INSTALL.
        * configure: Re-built.

From-SVN: r15868
1997-10-07 16:26:56 -06:00
Jeff Law
c986829edf Handle std.h -> std rename.
From-SVN: r15867
1997-10-07 16:20:35 -06:00
Jeffrey A Law
f644bd1425 integrate.c (save_for_inline_copying): Avoid undefined pointer operations.
* integrate.c (save_for_inline_copying): Avoid undefined pointer
        operations.
        (expand_inline_function): Likewise.

From-SVN: r15866
1997-10-07 15:43:02 -06:00
Jeffrey A Law
aa0c140117 dwarf2out.c (output_call_frame_info): Reinstate last change using flag_debug_asm check instead of flag_verbose_asm.
* dwarf2out.c (output_call_frame_info): Reinstate last change
        using flag_debug_asm check instead of flag_verbose_asm.

From-SVN: r15865
1997-10-07 15:35:54 -06:00
Jim Wilson
6c2df6c96e Remove incorrect change from Manfred Hollstein.
* dwarf2out.c (output_call_frame_info): Remove last change.

From-SVN: r15864
1997-10-07 12:58:36 -07:00
Andreas Schwab
13ab2b8367 frame.c (__frame_state_for): Execute the FDE insns until the current pc value is strictly bigger than the...
* frame.c (__frame_state_for): Execute the FDE insns until the
        current pc value is strictly bigger than the target pc value.

From-SVN: r15863
1997-10-07 14:42:54 -04:00
Jason Merrill
066c2fea8d regclass.c (init_reg_modes): If we can't find a mode for the register, use the previous one.
* regclass.c (init_reg_modes): If we can't find a mode for the
	register, use the previous one.

From-SVN: r15862
1997-10-07 14:36:48 -04:00
Jason Merrill
c0da11c40a * toplev.c (rest_of_compilation): Defer all non-nested inlines.
From-SVN: r15861
1997-10-07 14:04:33 -04:00
Jeff Law
6714c1ae69 REG_BR_PRED docs.
From-SVN: r15860
1997-10-07 11:15:27 -06:00
Richard Henderson
2f308fec0e haifa-sched.c (print_block_visualization): Call fprintf directly, don't sprintf through an alloca'ed buffer.
* haifa-sched.c (print_block_visualization): Call fprintf directly,
        don't sprintf through an alloca'ed buffer.

From-SVN: r15859
1997-10-07 10:53:16 -06:00
Thomas Koenig
43984e2969 * reload.c (decompose): Always initialize val.base.
From-SVN: r15858
1997-10-07 10:50:13 -06:00
Manfred Hollstein
d4dae59c22 man.c (SIGCHLD): Define to SIGCLD if <sys/signal.h> fails to provide it.
* info/man.c (SIGCHLD): Define to SIGCLD if <sys/signal.h>
        fails to provide it.

From-SVN: r15857
1997-10-07 10:22:48 -06:00
Manfred Hollstein
e9e3025300 mot3300.h (ASM_OUTPUT_ALIGN): Accept any alignment instead of aborting.
* m68k/mot3300.h (ASM_OUTPUT_ALIGN): Accept any alignment
        instead of aborting.
        * dwarf2out.c (output_call_frame_info): Call app_enable and
        app_disable to let GNU as accept the generated comments.

From-SVN: r15856
1997-10-07 10:20:44 -06:00
Michael Meissner
496651db26 Declare get_file_function_name
From-SVN: r15855
1997-10-07 16:07:46 +00:00
Chip Salzenberg
e634745692 Makefile.in (program_transform_name): Let autoconf substitute the correct value.
* Makefile.in (program_transform_name): Let autoconf substitute
        the correct value.

From-SVN: r15854
1997-10-07 09:59:26 -06:00
Jeffrey A Law
1447b516d2 haifa-sched.c (schedule_block): If the first real insn in a block has any special notes attached to it, remove them.
* haifa-sched.c (schedule_block): If the first real insn in a
        block has any special notes attached to it, remove them.
Fixes bug reported by Weiwen Liu.

From-SVN: r15853
1997-10-07 09:52:32 -06:00
Richard Henderson
1a42ead7f3 * alpha.h (FLOAT_STORE_FLAG_VALUE): It's 2.0 not 0.5.
From-SVN: r15852
1997-10-07 09:45:43 -06:00
Jason Merrill
c32381b187 decl.c (duplicate_decls): Don't warn about template instances.
* decl.c (duplicate_decls): Don't warn about template instances.

	* typeck.c (mark_addressable): Lose ancient code that unsets
	DECL_EXTERNAL.

	* pt.c (do_decl_instantiation): Lose support for instantiating
	non-templates.

	* call.c (build_new_function_call): Fix handling of null explicit
 	template args.
	(build_new_method_call): Likewise.

Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>

	* method.c (build_underscore_int): Fix typo.

From-SVN: r15851
1997-10-07 03:50:21 -04:00
Brendan Kehoe
45f22fa255 add missing tests, put in various test adjustments from devo
From-SVN: r15850
1997-10-06 20:08:46 -04:00
Brendan Kehoe
3f2270ec44 tree.c (print_lang_statistics): #if 0 call to print_inline_obstack_statistics until its definition is checked in.
* tree.c (print_lang_statistics): #if 0 call to
        print_inline_obstack_statistics until its definition is checked in.

the definition of the fn's not checked in yet by jason

From-SVN: r15849
1997-10-06 17:09:49 -04:00
Brendan Kehoe
bfcbf73e1d tree.c (print_lang_statistics): #if 0 call to print_inline_obstack_statistics until its definition is checked in.
* tree.c (print_lang_statistics): #if 0 call to
	print_inline_obstack_statistics until its definition is checked in.

the definition of the fn's not checked in yet by jason

From-SVN: r15848
1997-10-06 17:09:23 -04:00
Jeffrey A Law
ba0cfe5bd1 * Makefile.in (distclean): Do a better job at cleaning up.
From-SVN: r15847
1997-10-06 14:14:47 -06:00
Jeffrey A Law
bac2a45427 Make-lang.in (f77.mostlyclean): Clean up stuff in the object tree too.
* Make-lang.in (f77.mostlyclean): Clean up stuff in the
        object tree too.
        (f77.clean, f77.distclean, f77.maintainer-clean): Likewise.

From-SVN: r15846
1997-10-06 14:13:30 -06:00
Manfred Hollstein
4b6140f1c1 * m88k.c (m88k_begin_prologue): Remove superfluous backslash.
From-SVN: r15845
1997-10-06 12:45:32 -06:00
Jeff Law
6cb68ff4c1 Initial revision
From-SVN: r15841
1997-10-06 12:08:35 -06:00
Jeffrey A Law
dc84d7bca1 Makefile.in (check-g77): New test target.
* Makefile.in (check-g77): New test target.
        (CHECK-TARGETS): Add check-g77.

From-SVN: r15840
1997-10-06 12:02:25 -06:00
Jeffrey A Law
335043a81b * lib/g77.exp, lib/f-torture.exp: New files.
From-SVN: r15839
1997-10-06 12:00:04 -06:00
Jason Merrill
27bb83393c pt.c (instantiate_decl): Look for the original template.
Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* pt.c (instantiate_decl): Look for the original template.
	(tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
	of member templates.

Fixes tstring.

From-SVN: r15838
1997-10-06 12:37:44 -04:00
Michael Meissner
d8d64559de Cast alloca return value for char *
From-SVN: r15837
1997-10-03 19:51:50 +00:00
Jason Merrill
c44e099f65 iostream.cc, libio.h: Convert other uses of #ifdef _G_HAVE_PRINTF_FP to #if.
* iostream.cc, libio.h: Convert other uses of #ifdef
	_G_HAVE_PRINTF_FP to #if.

From-SVN: r15836
1997-10-03 13:14:05 -04:00
Richard Henderson
e414ab2935 Patch from Richard Henderson to make __builtin_return_address(0) work.
* i386.h (RETURN_ADDR_RTX): New definition that works for
	__builtin_return_address(0) and -fomit-frame-pointer.

From-SVN: r15835
1997-10-02 21:15:56 -07:00
Brendan Kehoe
808d0b1063 iostream.cc (operator<<): Use `#if _G_HAVE_PRINTF_FP', not ifdef.
* iostream.cc (operator<<): Use `#if _G_HAVE_PRINTF_FP', not ifdef.

... since it comes in defined, either 0 or 1

From-SVN: r15834
1997-10-02 18:52:19 -04:00
Jason Merrill
5a3a2567e9 [multiple changes]
Thu Oct  2 10:36:49 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* gen-params: Fix __printf_fp test.
	* config/linuxlibc1.mt (gxx_includedir): Don't define.

Thu Oct  2 10:36:26 1997  Ulrich Drepper  <drepper@rtl.cygnus.com>

	* config/linuxlibc1.mt (_G_CONFIG_H): Don't define.
	* gen-params: Add test for __printf_fp.

Getting closer...

From-SVN: r15833
1997-10-02 13:39:40 -04:00
Jason Merrill
b6aa195e20 bastring.h: Move exception stuff after definition of string.
* std/bastring.h: Move exception stuff after definition of string.
	Move typedef of string here.
	* string: From here.

From-SVN: r15832
1997-10-02 13:26:16 -04:00
Jim Wilson
15039abedc Fix 961223-1.c irix6 c-torture failure.
* mips.c (function_arg): Handle passing a struct
	containing a double in a DFmode register without the PARALLEL.

From-SVN: r15830
1997-10-01 13:49:25 -07:00
Jason Merrill
236bdb77b5 tweak
From-SVN: r15828
1997-10-01 13:56:23 -04:00
Jason Merrill
5408ce7864 Makefile.in (g++FAQ.*): New rules.
* Makefile.in (g++FAQ.*): New rules.
	(CONFLICTS): Update.
	* g++FAQ.texi: Moved from libg++.

	* parse.y (PFUNCNAME): Only specify the type once.

From-SVN: r15827
1997-10-01 13:50:03 -04:00
Brendan Kehoe
a3f44a1337 lex.c (real_yylex): Clean up the code to fully behave the way the c-lex.c parser does for complex...
* lex.c (real_yylex): Clean up the code to fully behave the way
	the c-lex.c parser does for complex and real numbers.

From-SVN: r15826
1997-10-01 12:56:13 -04:00
Ian Lance Taylor
281de624e3 pexecute.c: Use spawn if __CYGWIN32__.
* pexecute.c: Use spawn if __CYGWIN32__.

        * pexecute.c: Include "config.h" first, as per autoconf manual
	(from Paul Eggert  <eggert@twinsun.com>).

From-SVN: r15825
1997-10-01 15:15:06 +00:00
Jeff Law
0d9011fd81 Fix typo.
From-SVN: r15824
1997-10-01 07:52:31 -06:00
Philippe De Muyter
56f21d6ffd sys_clock_.c: File renamed from system_clock_.c.
* libU77/sys_clock_.c: File renamed from system_clock_.c.
        libU77/Makefile.in, Makefile.in : Reference sys_clock_.*, not
        system_clock_.*.
        * libU77/dtime_.c (clk_tck): Try also HZ macro.
        * libU77/access.c (G77_access_0): Check malloc return value against 0,
        not NULL.
        libU77/getlog_.c, libU77/ttynam_.c, libU77/chdir_.c: Ditto.
        libU77/chmod_.c, libU77/rename_.c: Ditto.

From-SVN: r15821
1997-10-01 01:43:22 -06:00
Philippe De Muyter
3c8f617e2f * g77.c (pexecute, main): Use unlink, not remove.
From-SVN: r15820
1997-10-01 01:42:36 -06:00
Philippe De Muyter
3cbdd5fc16 x-mot3300 (XCFLAGS): Disable as's long/short jump optimisation for f/expr.o and f/stb.o.
* config/m68k/x-mot3300 (XCFLAGS): Disable as's long/short jump
        optimisation for f/expr.o and f/stb.o.

From-SVN: r15819
1997-10-01 01:41:57 -06:00
Jeff Law
82d109f263 Update to 0.5.22-19970929.
From-SVN: r15818
1997-10-01 01:28:03 -06:00
Thomas Koenig
d3878e4948 * cccp.c (expand_to_temp_buffer): Initialize all members of obuf.
From-SVN: r15817
1997-10-01 00:22:46 -06:00
Jeffrey A Law
135d84b899 * cse.c (this_insn_cc0_mode): Initialize.
From-SVN: r15816
1997-09-30 23:46:27 -06:00
Thomas Koenig
55d8971965 * haifa-sched.c: (get_block_head_tail) Remove unneeded initialization.
From-SVN: r15815
1997-09-30 23:08:31 -06:00
Richard Henderson
e9d0757e5c alpha.md (beq): For registers and ints 0-255...
* alpha.md (beq): For registers and ints 0-255, use cmpeq+bne, since
        that pair will dual-issue on the 21164 and plus+beq won't.
        (bne): Likewise for cmpeq+beq.

From-SVN: r15814
1997-09-30 23:04:30 -06:00
Jim Wilson
3f34faec1a Fix error in immediately preceeding patch.
* except.c (find_exception_handler_labels): Correct argument to free.

From-SVN: r15812
1997-09-30 16:15:58 -07:00
Brendan Kehoe
3226dac5e0 adjust date to be the old form, instead of the emacs 20.x shortened style,
for now.

From-SVN: r15811
1997-09-30 15:15:20 -04:00
Brendan Kehoe
988cea7dd5 except.c (find_exception_handler_labels): Free LABELS when we're done.
* except.c (find_exception_handler_labels): Free LABELS when we're
	done.

fixes memory leak

From-SVN: r15808
1997-09-30 14:25:09 -04:00
Jason Merrill
d770d3b33c add -Wold-style-cast
From-SVN: r15807
1997-09-30 13:49:34 -04:00
Jason Merrill
8c81598dba revert gratuitous whitespace changes
From-SVN: r15806
1997-09-30 13:47:48 -04:00
Jason Merrill
5a45bc3e5b * method.c (build_decl_overload_real): Reformat.
From-SVN: r15804
1997-09-30 11:53:04 -04:00
Jason Merrill
b7067a12bf * method.c (synthesize_method): If at_eof, determine our linkage.
From-SVN: r15803
1997-09-30 03:20:00 -04:00
Paul Eggert
4f6140be61 lex.c (real_yylex): Treat $' just like _'...
1997-09-29  Paul Eggert  <eggert@twinsun.com>

	* lex.c (real_yylex): Treat `$' just like `_', except issue a
	diagnostic if !dollars_in_ident or if pedantic.

	* lang-specs.h (@c++): -ansi no longer implies -$.

	* decl2.c (lang_decode_option):
	-traditional and -ansi now do not mess with
	dollars_in_ident.

From-SVN: r15802
1997-09-30 01:32:19 -04:00
H.J. Lu
9f6177175d Makefile.in (parse.o, decl.o): Also depend on $(srcdir)/../except.h $(srcdir)/../output.h.
Mon Sep 29 19:57:51 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* Makefile.in (parse.o, decl.o): Also depend on
	$(srcdir)/../except.h $(srcdir)/../output.h.
	(decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
	$(srcdir)/../except.h $(srcdir)/../output.h.
	(typeck.o, init.o): Also depend on $(srcdir)/../expr.h
	../insn-codes.h.

	* call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.

	* expr.c (cplus_expand_expr): Make it static.

	* decl2.c, init.c, typeck.c: Include "expr.h".
	(expand_expr): Use proper values when calling the function.

From-SVN: r15801
1997-09-29 23:36:39 -04:00
Jeffrey A Law
3a6eabfad6 * version.c: Bump for snapshot.
From-SVN: r15795
1997-09-29 14:02:27 -06:00
Jason Merrill
0c4b14c4d3 [multiple changes]
Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>

	* lang-options.h: new -Wold-style-cast flag.
	* cp-tree.h (warn_old_style_cast): new variable.
	* decl2.c (warn_old_style_cast): ditto.
	(lang_decode_option): support -Wold-style-cast.
	(reparse_absdcl_as_casts): produce old-style-cast warning.

Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>

	* decl.c (cp_finish_decl): Allow expand_aggr_init to set
 	TREE_USED, reset value based on already_used.

	* init.c (expand_member_init): Revert change.

From-SVN: r15793
1997-09-29 15:05:04 -04:00
Jason Merrill
974c50f907 flow.c (find_basic_blocks): Mark calls as potentially jumping to the EH labels.
* flow.c (find_basic_blocks): Mark calls as potentially jumping
        to the EH labels.

From-SVN: r15792
1997-09-29 10:49:57 -06:00
Jeffrey A Law
2b67aa29e5 * intdoc.c (main): Remove unused attribute for main's arguments.
From-SVN: r15791
1997-09-29 10:35:19 -06:00
Jason Merrill
893de33c13 cp-tree.h, [...]: Lose DECL_C_STATIC and DECL_PUBLIC.
* cp-tree.h, decl.c, decl2.c, pt.c:
 	Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.

	* decl2.c (lang_decode_option): Add missing ;.

From-SVN: r15789
1997-09-29 12:08:34 -04:00
Jeffrey A Law
9b16d2c4ef configure.in: Substitute for "install" too.
* configure.in: Substitute for "install" too.
        * configure: Rebuilt.

From-SVN: r15788
1997-09-29 10:00:50 -06:00
Aaron Jackson
b1e3ddfd29 Makefile.in (bootstrap-lean): New target.
* Makefile.in (bootstrap-lean): New target.
        * gcc/Makefile.in (bootstrap-lean, compare-lean): New targets.

From-SVN: r15786
1997-09-29 00:37:11 -06:00
Richard Henderson
c02f035f40 alias.c (base_alias_check): Two symbols can conflict if they are accessed via AND.
* alias.c (base_alias_check): Two symbols can conflict if they
        are accessed via AND.
        (memrefs_conflict_p): Likewise.

From-SVN: r15785
1997-09-29 00:21:18 -06:00
Richard Henderson
7a14fdc538 alpha.h (SETUP_INCOMING_VARARGS): Emit a blockage insn after flushing argument registers to the stack.
* alpha.h (SETUP_INCOMING_VARARGS): Emit a blockage insn
        after flushing argument registers to the stack.

From-SVN: r15784
1997-09-29 00:18:28 -06:00
Richard Henderson
6662a38d28 * Makefile.in (mostlyclean): Remove .regmove files.
From-SVN: r15783
1997-09-29 00:16:21 -06:00
Jason Merrill
f34471094c * libgcc2.c (__throw): Fix thinko.
From-SVN: r15781
1997-09-28 22:02:26 -04:00
Mark Mitchell
37f6b6bfd2 cplus-dem.c (demangle_template): Add new parameter.
Sun Sep 28 12:00:52 1997  Mark Mitchell  <mmitchell@usa.net>

        * cplus-dem.c (demangle_template): Add new parameter.  Handle new
        template-function mangling.
        (consume_count_with_underscores): New function.
        (demangle_signature): Handle new name-mangling scheme.

From-SVN: r15780
1997-09-28 15:59:54 -04:00
Mark Mitchell
a3a5b5b7bf cplus-dem.c (demangle_template): Add new parameter.
Sun Sep 28 12:00:52 1997  Mark Mitchell  <mmitchell@usa.net>

        * cplus-dem.c (demangle_template): Add new parameter.  Handle new
        template-function mangling.
        (consume_count_with_underscores): New function.
        (demangle_signature): Handle new name-mangling scheme.

From-SVN: r15778
1997-09-28 15:37:05 -04:00
Jason Merrill
a98d45ff1f new tests and adjustments for explicit function template qualification
From-SVN: r15777
1997-09-28 15:26:50 -04:00
Jason Merrill
905a881f36 [multiple changes]
Sat Sep 27 16:48:00 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* std/complext.h: Lose injection decls.
	* std/fcomplex.h: Likewise.
	* std/dcomplex.h: Likewise.
	* std/ldcomplex.h: Likewise.

Sat Sep 27 16:47:35 1997  Mark Mitchell  <mmitchell@usa.net>

	* std/complext.h: Declare templates before making them
	friends.  Use new friend <> syntax.
	* std/complext.cc: Don't rely on guiding declarations.
	* std/fcomplex.h: Use new friend <> syntax.
	* std/dcomplex.h: Likewise.
	* std/ldcomplex.h: Likewise.

From-SVN: r15776
1997-09-28 15:21:52 -04:00
Mark Mitchell
920253a3bc iomanip.h: Use new friend <> syntax.
Sun Sep 28 12:09:04 1997  Mark Mitchell  <mmitchell@usa.net>

        * iomanip.h: Use new friend <> syntax.

From-SVN: r15775
1997-09-28 15:18:16 -04:00
Jason Merrill
386b8a85a6 [multiple changes]
Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* friend.c (do_friend): Disable injection for all template-derived
 	decls.
	* decl2.c (lang_decode_option): Handle -fguiding-decls.
	* parse.y (notype_template_declarator): New nonterminal.
	(direct_notype_declarator): Use it.
	(complex_direct_notype_declarator): Likewise.
	(object_template_id): Accept any kind of identifier after TEMPLATE.
	(notype_qualified_id): Don't add template declarators here.

Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>

        * call.c (add_template_candidate): Add explicit_targs parameter.
        (build_scoped_method_call): Use it.
        (build_overload_call_real): Likewise.
        (build_user_type_conversion_1): Likewise.
        (build_new_function_call): Likewise.
        (build_object_call): Likewise.
        (build_new_op): Likewise.
        (build_new_method_call): Likewise.
        (build_new_function_call): Handle TEMPLATE_ID_EXPR.
        (build_new_method_call): Likewise.

        * class.c (finish_struct_methods): Add specialization pass to
        determine which methods were specializing which other methods.
        (instantiate_type): Handle TEMPLATE_ID_EXPR.

        * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.

        * cp-tree.h (name_mangling_version): New variable.
	(flag_guiding_decls): Likewise.
        (build_template_decl_overload): New function.
        (begin_specialization): Likewise.
        (reset_specialization): Likewise.
        (end_specialization): Likewise.
        (determine_explicit_specialization): Likewise.
        (check_explicit_specialization): Likewise.
        (lookup_template_function): Likewise.
        (fn_type_unification): Add explicit_targs parameter.
        (type_unification): Likewise.

        * decl.c (duplicate_decls): Add smarts for explicit
        specializations.
        (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
        specializations.
        (grokfndecl): Call check_explicit_specialization.

        * decl2.c (lang_decode_option): Handle -fname-mangling-version.
        (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
        (check_classfn): Handle specializations.

        * error.c (dump_function_name): Print specialization arguments.

	* friend.c (do_friend): Don't call pushdecl for template
        instantiations.

        * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.

        * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
	and -fno-guiding-decls.

        * lex.c (identifier_type): Return PFUNCNAME for template function
        names.

        * method.c (build_decl_overload_real): New function.
        (build_template_parm_names): New function.
        (build_overload_identifier): Use it.
        (build_underscore_int): New function.
        (build_overload_int): Use it.  Add levels for template
        parameters.
        (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
        (build_overload_nested_names): Handle template type parameters.
        (build_template_decl_overload): New function.

        * parse.y (YYSTYPE): New ntype member.
        (nested_name_specifier): Use it.
        (nested_name_specifier_1): Likewise.
        (PFUNCNAME): New token.
        (template_id, object_template_id): New non-terminals.
        (template_parm_list): Note specializations.
        (template_def): Likewise.
        (structsp): Likewise.
        (fn.def2): Handle member template specializations.
        (component_decl_1): Likewise.
        (direct_notype_declarator): Handle template-ids.
        (component_decl_1): Likewise.
        (direct_notype_declarator): Handle template-ids.
        (primary): Handle TEMPLATE_ID_EXPR, and template-ids.

        * pt.c (processing_specializations): New variable.
        (template_header_count): Likewise.
        (type_unification_real): New function.
        (processing_explicit_specialization): Likewise.
        (note_template_header): Likewise.
        (is_member_template): Handle specializations.
        (end_template_decl): Call reset_specialization.
        (push_template_decl): Handle member template specializations.
        (tsubst): Likewise.
        (tsubst_copy): Handle TEMPLATE_ID_EXPR.
        (instantiate_template): Handle specializations.
        (instantiate_decl): Likewise.
        (fn_type_unification): Handle explicit_targs.
        (type_unification): Likewise.  Allow incomplete unification
        without an error message, if allow_incomplete.
        (get_bindings): Use new calling sequence for fn_type_unification.

        * spew.c (yylex): Handle PFUNCNAME.

        * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
        (really_overloaded_fn): Likewise.
        (get_first_fn): Handle function templates.

        * typeck.c (build_x_function_call): Use really_overloaded_fn.
        Handle TEMPLATE_ID_EXPR.
        (build_x_unary_op): Likewise.
        (build_unary_op): Likewise.
        (mark_addressable): Templates whose address is taken are marked
        as used.

From-SVN: r15774
1997-09-28 15:16:59 -04:00
Jason Merrill
e741306e3c * libio.h: Don't use _IO_LOCK_T if it's not defined.
From-SVN: r15773
1997-09-28 15:08:43 -04:00
Jason Merrill
72b0b53ec1 update
From-SVN: r15772
1997-09-28 15:02:46 -04:00
Philippe De Muyter
adfc539e94 flow.c (print_rtl_with_bb): Cast alloca return values for variables start and end.
* flow.c (print_rtl_with_bb): Cast alloca return values for variables
        start and end.

From-SVN: r15753
1997-09-28 01:52:39 -06:00
Jeffrey A Law
771c2d1bb7 Make-lang.in (G77_FLAGS_TO_PASS): Pass down RANLIB, RANLIB_TEST and AR instead of the _FOR_TARGET versions.
* Make-lang.in (G77_FLAGS_TO_PASS): Pass down RANLIB, RANLIB_TEST
        and AR instead of the _FOR_TARGET versions.

From-SVN: r15752
1997-09-28 01:44:42 -06:00
Jeffrey A Law
92cbe4d261 frame.c: Remove last change.
* frame.c: Remove last change.
        * dwarf2.h: Remove last change.
        * tree.h: Add declarations of DWARF2 unwind info support
        functions.
As requested by Jason.

From-SVN: r15751
1997-09-28 01:03:02 -06:00
Jason Merrill
2f3ca9e7f4 c-decl.c (init_decl_processing): Add __builtin_dwarf_reg_size.
* c-decl.c (init_decl_processing): Add __builtin_dwarf_reg_size.
	* tree.h (built_in_function): Likewise.
	* expr.c (expand_builtin): Likewise.
	* except.h: Likewise.
	* dwarf2out.c (expand_builtin_dwarf_reg_size): New fn.
	* libgcc2.c (copy_reg): New fn.
	(__throw): Use it.

From-SVN: r15750
1997-09-27 14:16:15 -04:00
Jason Merrill
faf199a621 regen
From-SVN: r15749
1997-09-27 14:15:16 -04:00
Jeff Law
dc09d4f07b New file from Ulrich.
From-SVN: r15742
1997-09-26 22:07:24 -06:00
Ulrich Drepper
d604f4c6a3 libio changes from Ulrich to help "old linux" systems.
libio changes from Ulrich to help "old linux" systems.  See ChangeLog
for details.

From-SVN: r15741
1997-09-26 22:07:00 -06:00
Andreas Schwab
a7cc7f29f4 frame.c: Include gansidecl.h for PROTO.
* frame.c: Include gansidecl.h for PROTO.
        * dwarf2out.c: Move inclusion of dwarf2.h down so that PROTO is
        defined.  Don't declare dwarf2out_cfi_label here.
        * dwarf2.h: Add declarations of DWARF2 unwind info support
        functions.
        * m68k.c: Include dwarf2.h.
        (output_function_prologue): Add dwarf2 support.
        * m68k.h (INCOMING_RETURN_ADDR_RTX, DWARF_FRAME_REGNUM): New macros.
        (INCOMING_FRAME_SP_OFFSET): Likewise.
Update m68k patch from Andreas.

From-SVN: r15740
1997-09-26 21:58:57 -06:00
Paul Eggert
407cb092e3 c-typeck.c (build_binary_op): Warn about comparing signed vs unsigned if...
* c-typeck.c (build_binary_op): Warn about comparing signed vs
        unsigned if -W is specified and -Wno-sign-compare is not.
        * c-decl.c (warn_sign_compare): Initialize to -1.
        (c_decode_option): -Wall no longer implies -Wsign-compare.

From-SVN: r15739
1997-09-26 21:46:35 -06:00
Andreas Schwab
3ba104945b integrate.c (expand_inline_function): Make sure there is at least one insn that can be used as an insertion point.
* integrate.c (expand_inline_function): Make sure there is at
        least one insn that can be used as an insertion point.

From-SVN: r15738
1997-09-26 21:42:59 -06:00
Andreas Schwab
b9620d0e58 decl.c (init_decl_processing): Declare __builtin_constant_p as accepting any kind of type, not only int.
1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* decl.c (init_decl_processing): Declare __builtin_constant_p as
	accepting any kind of type, not only int.

From-SVN: r15734
1997-09-26 11:59:35 -04:00
Jason Merrill
cc1c702f8c update
From-SVN: r15733
1997-09-26 11:50:51 -04:00
Jason Merrill
1052cd6573 search.c (get_matching_virtual): Notice virtual bases when sorrying about covariant returns.
* search.c (get_matching_virtual): Notice virtual bases when sorrying
	about covariant returns.

From-SVN: r15732
1997-09-26 11:42:46 -04:00
Jason Merrill
c2b9a5c49d never mind
From-SVN: r15731
1997-09-26 11:39:41 -04:00
Jason Merrill
318e85cf8d add
From-SVN: r15721
1997-09-26 03:40:44 -04:00
Jason Merrill
405a745b2e parse.y (member_init): Also imply typename here.
* parse.y (member_init): Also imply typename here.  Remove ancient
	extension for initializing base members.

From-SVN: r15720
1997-09-26 03:24:48 -04:00
Jason Merrill
1e60a96e07 fix thinko
From-SVN: r15719
1997-09-26 03:03:44 -04:00
Jason Merrill
3055528c86 add
From-SVN: r15718
1997-09-25 23:13:35 -04:00
Jason Merrill
5a4a879c40 bastring.h: Enable exceptions.
* std/bastring.h: Enable exceptions.
 	(assign, append, insert, replace): Implement member template versions.

	* tstring.cc: Add some tests for the member templates.

From-SVN: r15717
1997-09-25 23:01:01 -04:00
Jason Merrill
896470e737 update
From-SVN: r15716
1997-09-25 21:38:04 -04:00
Jason Merrill
653cc74afc Handle multi-level typenames and implicit typename in base list.
* parse.y (typename_sub{,[0-2]}): New rules.
	(structsp, rule TYPENAME_KEYWORD): Use typename_sub.
	(nonnested_type): New rule.
	(complete_type_name): Use it.
	(base_class.1): Use typename_sub and nonnested_type.
	(nested_name_specifier): Don't elide std:: here.
	* decl.c (make_typename_type): Handle getting a type for NAME.
	(lookup_name_real): Turn std:: into :: here.

	Rvalue conversions were removed in London.
	* call.c (is_subseq): Don't consider lvalue transformations.
	(build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
	(joust): Reenable ?: kludge.

From-SVN: r15715
1997-09-25 14:56:40 -04:00
Doug Evans
6d4312ddbf Add docs for sparc -malign-{jumps,loops,functions}.
Fix typo in i386 -malign-functions docs.
Brought over from FSF.

From-SVN: r15714
1997-09-25 15:57:01 +00:00
Jason Merrill
c5cec899dd dwarf2out.c: s/flag_verbose_asm/flag_debug_asm/
* dwarf2out.c: s/flag_verbose_asm/flag_debug_asm/

	* final.c (final_end_function): Also do dwarf2 thing if
	DWARF2_DEBUGGING_INFO.
	(final_start_function): Likewise.

From-SVN: r15713
1997-09-25 00:57:50 -04:00
Jeffrey A Law
e166cb188a Bump for snapshot.
From-SVN: r15710
1997-09-24 22:10:25 -06:00
Doug Evans
01a94cba00 sparc stuff brought over from fsf.
From-SVN: r15709
1997-09-25 01:15:30 +00:00
Doug Evans
1ccfa253c9 sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc.
* sparc/sparc.h (ASM_CPU_SPEC): Pass -Av9a for v8plus, ultrasparc.
	(TARGET_OPTIONS): Add -malign-loops=, -malign-jumps=,
	-malign-functions=.
	(sparc_align_{loops,jumps,funcs}_string): Declare.
	(sparc_align_{loops,jumps,funcs}): Declare.
	(DEFAULT_SPARC_ALIGN_FUNCS): New macro.
	(FUNCTION_BOUNDARY): Use sparc_align_funcs.
	(STACK_BIAS): Define.
	(SPARC_SIMM*_P): Cast to unsigned HOST_WIDE_INT first, then perform
	test.
	(SPARC_SETHI_P): New macro.
	(CONST_OK_FOR_LETTER_P): Use it.
	(ASM_OUTPUT_ALIGN_CODE): Define.
	(ASM_OUTPUT_LOOP_ALIGN): Define.

	* sparc.h (ASM_COMMENT_START): Define.

	* sparc/sparc.h (ASM_OUTPUT_{FLOAT,DOUBLE,LONG_DOUBLE}): Print
	ascii form as well.

From-SVN: r15708
1997-09-25 01:14:03 +00:00
Doug Evans
96987e9648 sparc.c (dwarf2out_cfi_label): Add declaration.
* sparc.c (dwarf2out_cfi_label): Add declaration.
	(save_regs, output_function_prologue): Remove cast for it.
	(sparc_flat_{save_restore,output_function_prologue): Likewise.
	({save,restore}_regs): No longer inline.

From-SVN: r15707
1997-09-25 01:10:47 +00:00
Doug Evans
bf62bbf1bc sparc.c (finalize_pic): Update call to gen_get_pc_via_call.
* sparc/sparc.c (finalize_pic): Update call to gen_get_pc_via_call.

	* sparc/sparc.c (sparc_align_{loops,jumps,funcs}_string): New globals.
	(sparc_align_{loops,jumps,funcs}): New globals.
	(sparc_override_options): Handle -malign-loops=, -malign-jumps=,
	-malign-functions=.
	(move_operand): Use SPARC_SETHI_P.
	(arith_double_operand): Cast to unsigned HOST_WIDE_INT first, then
	perform test.
	(arith11_double_operand): Likewise.
	(arith10_double_operand): Likewise.
	(finalize_pic): Finish sparc64 support.
	(emit_move_sequence): Use SPARC_SETHI_P.  Simplify low part of
	64 bit constants if able.
	(output_fp_move_quad): Don't use fmovq unless TARGET_HARD_QUAD.
	(sparc_builtin_saveregs, sparc64 case): Don't save fp regs if
	! TARGET_FPU.

	* sparc.h (ASM_COMMENT_START): Define.
	* sparc.c (output_function_prologue): Use it.
	(sparc_flat_output_function_{epi,pro}logue): Likewise.

From-SVN: r15706
1997-09-25 01:09:41 +00:00
Doug Evans
5d4f5e8767 sparc.md (*): Use GEN_INT instead of gen_rtx.
* sparc/sparc.md (*): Use GEN_INT instead of gen_rtx.
	(get_pc_sp32): Use for sparc64 as well.
	(lo_sum_di_sp{32,64}): Fix handling on 64 bit hosts.
	(sethi_di_sp64_const): Likewise.
	(movtf_cc_sp64): Check TARGET_HARD_QUAD.
	(cmp_zero_extract_sp64): Use unsigned HOST_WIDE_INT in cast.
	(ashlsi3, ashldi3, ashrsi3, ashrdi3, lshrsi3, lshrdi3): Likewise.

From-SVN: r15705
1997-09-25 01:03:13 +00:00
Doug Evans
26b551afd8 Regenerate.
From-SVN: r15704
1997-09-25 00:59:12 +00:00
Doug Evans
2334126e71 configure.in (sparc64-*-linux*): Recognize.
* configure.in (sparc64-*-linux*): Recognize.  Add sparc/xm-sparc.h
	to xm_file list on 32-bit sparc-linux.

From-SVN: r15703
1997-09-25 00:55:32 +00:00
Doug Evans
6f7423f547 * glimits.h (LONG_MAX): Handle sparc64.
From-SVN: r15702
1997-09-25 00:50:38 +00:00
Doug Evans
d98cda2239 * config/xm-linux.h (HAVE_PUTENV, HAVE_ATEXIT): Define.
From-SVN: r15701
1997-09-25 00:49:27 +00:00
Doug Evans
bbfbedb141 xm-linux.h: Include some standard headers if not inhibit_libc.
* sparc/xm-linux.h: Include some standard headers if not inhibit_libc.
	Don't include xm-sparc.h.

From-SVN: r15700
1997-09-25 00:44:26 +00:00
Doug Evans
18b14bd816 Sync with fsf version.
From-SVN: r15699
1997-09-25 00:41:02 +00:00
Doug Evans
a120a9eaa7 sysv4.h (ASM_COMMENT_START): Delete.
* sparc/sysv4.h (ASM_COMMENT_START): Delete.
	* sparc/sysv4.h (ASM_OUTPUT_{FLOAT,DOUBLE,LONG_DOUBLE}): Delete,
	use sparc.h's copies.

From-SVN: r15698
1997-09-25 00:38:04 +00:00
Doug Evans
0286bd98f3 linux-aout.h (COMMENT_BEGIN): Delete.
* sparc/linux-aout.h (COMMENT_BEGIN): Delete.
	* sparc/linux.h (COMMENT_BEGIN): Likewise.
Bring over from FSF.

From-SVN: r15697
1997-09-25 00:33:48 +00:00
Jim Wilson
5a5e9503b2 Fix typo in hjl ChangeLog entry.
From-SVN: r15689
1997-09-24 15:31:10 -07:00
Jason Merrill
3041f77a20 update
From-SVN: r15687
1997-09-24 00:51:57 -04:00
Jeff Law
5dceb6d28e new test (already in c-torture)
From-SVN: r15685
1997-09-23 15:20:32 -06:00
Doug Evans
bfe8701346 New files for sparc64-linux port.
From-SVN: r15679
1997-09-23 18:41:47 +00:00
Jeff Law
ce2157a1a9 fold-const.c (make_range): Correctly handle cases of converting from unsigned to signed type.
* fold-const.c (make_range): Correctly handle cases of converting
        from unsigned to signed type.

        * fold-const.c (merge_ranges): Make sure that if one range is subset
        of another, it will always be the second range.  Correct (+,-) case to
        account for this.

Brought over from gcc2; fixes sparc bug.

From-SVN: r15678
1997-09-23 12:35:51 -06:00
Doug Evans
4bc8c3c116 New files for sparc64-linux port.
From-SVN: r15675
1997-09-23 18:33:32 +00:00
David S. Miller
e13a25d5a3 expmed.c (expand_divmod): If compute_mode is not the same as mode...
* expmed.c (expand_divmod): If compute_mode is not the same as
        mode, handle the case where convert_modes() causes op1 to no
        longer be a CONST_INT.

From-SVN: r15672
1997-09-23 01:25:25 -06:00
Alexandre Oliva
4fd10464e7 Forgot to commit.
From-SVN: r15671
1997-09-23 01:19:31 -06:00
David S. Miller
c107334d5c reorg.c (dbr_schedule): At end of this pass...
* reorg.c (dbr_schedule): At end of this pass, add REG_BR_PRED
        note holding get_jump_flags() calculation to all JUMP_INSNs.
        * rtl.h (enum reg_note): New note types REG_BR_PRED and REG_SAVE_AREA.
        * rtl.c (reg_note_name): Add new note types.

From-SVN: r15670
1997-09-23 01:14:07 -06:00
Dave Love
5cd278f399 dtime_.c (G77_dtime_0): Fix types in HAVE_GETRUSAGE case so as not to truncate results to integer values.
* libU77/dtime_.c (G77_dtime_0): Fix types in HAVE_GETRUSAGE case
        so as not to truncate results to integer values.
        * libU77/Version.c: Bump.

From-SVN: r15669
1997-09-23 01:06:54 -06:00
Jeff Law
0774afd709 Fix typo.
From-SVN: r15668
1997-09-23 01:01:34 -06:00
Jeffrey A Law
8d7532d94f rtlanal.c (jmp_uses_reg_or_mem): Fix typo in last change.
* rtlanal.c (jmp_uses_reg_or_mem): Fix typo in last change.
Fixes various bootstrap problems (hopefully).

From-SVN: r15667
1997-09-23 00:58:12 -06:00
H.J. Lu
7019d00e09 loop.c (indirect_jump_in_function_p): Return 0 by default.
* loop.c (indirect_jump_in_function_p): Return 0
        by default.

From-SVN: r15666
1997-09-23 00:40:37 -06:00
Alexandre Oliva
4d935b402f Make-lang.in: install.texi was renamed to g77install.texi
* Make-lang.in: install.texi was renamed to g77install.texi
        * install0.texi: Likewise.

From-SVN: r15665
1997-09-23 00:38:19 -06:00
Jeffrey A Law
b9dfb357c8 xm-rs6000.h: Fix thinko in last change.
* rs6000/xm-rs6000.h: Fix thinko in last change.
        * rs6000/xm-sysv4.h: Likewise.

From-SVN: r15664
1997-09-23 00:31:44 -06:00
Jim Wilson
4b7e467be2 Fix irix5/irix6 dwarf2out assertion failures
Fix irix5/irix6 dwarf2out assertion failures
	* mips.c (save_restore_insns): Only set RTX_FRAME_RELATED_P if store_p.

From-SVN: r15661
1997-09-22 21:48:36 -07:00
Brendan Kehoe
59f1f2c4c4 decl.c (start_function): Up warning of no return type to be a pedwarn.
* decl.c (start_function): Up warning of no return type to be a
	pedwarn.

From-SVN: r15660
1997-09-22 22:13:04 -04:00
Jeffrey A Law
8c8e6faa0d * reg-stack.c (find_blocks): Fix thinko in last change.
From-SVN: r15655
1997-09-22 14:38:35 -06:00
Andreas Schwab
078e983e51 m68k.c (output_function_prologue): Add dwarf2 support.
* m68k.c (output_function_prologue): Add dwarf2 support.

        * m68k.h (INCOMING_RETURN_ADDR_RTX, DWARF_FRAME_REGNUM,
        INCOMING_FRAME_SP_OFFSET): New definitions.

From-SVN: r15631
1997-09-22 11:46:38 -06:00
David S. Miller
9524f769a7 combine.c (try_combine): Use NULL_RTX instead of '0' where appropriate in calls to gen_rtx().
* combine.c (try_combine): Use NULL_RTX instead of '0' where
        appropriate in calls to gen_rtx().
        * cse.c (cse_main): Likewise.
        * emit-rtl.c (gen_label_rtx): Likewise.
        * expr.c (init_expr_once): Likewise.
        * haifa-sched.c (flush_pending_lists, sched_analyze_insn,
        sched_analyze, init_rgn_data_dependences,
        compute_block_backward_dependences): Likewise.
        * sched.c (schedule_insns): Likewise.
        * varasm.c (immed_double_const): Likewise.

From-SVN: r15630
1997-09-22 11:41:48 -06:00
David S. Miller
d70276675c sparc.h (INCOMING_FRAME_SP_OFFSET): Define to SPARC_STACK_BIAS for sake of dwarf2 on sparc64.
* sparc.h (INCOMING_FRAME_SP_OFFSET): Define to
        SPARC_STACK_BIAS for sake of dwarf2 on sparc64.

From-SVN: r15628
1997-09-22 11:34:49 -06:00
J. Kean Johnston
fbf8b71c36 sco5.h: Make ELF default file format and add -mcoff/-melf..
* i386/sco5.h: Make ELF default file format and add -mcoff/-melf..
        (MULTILIB_DEFAULTS): Define.
        (ASM_SPEC, CPP_SPEC): Handle -mcoff.
        (STARTFILE_SPEC, ENDFILE_SPEC, LINK_SPEC): Likewise.
        (LIBGCC_SPEC): Likewise.
        (MASK_COFF, TARGET_COFF, TARGET_ELF): Define.
        (SUBTARGET_SWITCHES): Add -mcoff and -melf.
        * i386/t-sco5 (CRTSTUFF_T_CFLAGS): Add -fPIC.
        (CRTSTUFF_T_CFLAGS_S): Tweak for COFF.
        (EXTRA_PARTS, TAROUTOPTS): Delete.
        (libgcc1-elf, libgcc2-elf, libgcc-elf targets): Delete.
        (MULTILIB_OPTIONS): Define.
        (MULTILIB_DIRNAMES, MULTILIB_EXCEPTIONS): Likewise.
        (MULTILIB_MATCHE, MULTILIB_EXTRA_OPTS): Likewise.
SCO Open Server patches.

From-SVN: r15627
1997-09-22 11:31:47 -06:00
Jeffrey A Law
c14a951f31 * version.c: Bump for snapshot.
From-SVN: r15624
1997-09-22 02:08:15 -06:00
Jeffrey A Law
37aa45a21d loop.c (loop_number): Delete function.
* loop.c (loop_number): Delete function.  Change all references
        to use uid_loop_num array.
        * loop.h (loop_number): Delete declaration.
        * unroll.c (unroll_loop): Change "loop_number" references to
        use uid_loop_num instead.
Still cleaning up haifa.

From-SVN: r15623
1997-09-21 21:04:36 -06:00
Jeff Law
b47404d137 loop.c (loop_unroll_factor): Move outside #ifdef HAIFA conditional.
* loop.c (loop_unroll_factor): Move outside #ifdef HAIFA
        conditional.
        (loop_unroll_iter): Remove unused variable and all references.
        (loop_optimize): Always allocate and clear space for loop_unroll_factor.
        (insert_bct): Fix minor formatting problems.
        * loop.h (loop_unroll_factor): Move decl outside #ifdef HAIFA.
        (loop_unroll_iter): Removed unused decl.
        * unroll.c (unroll_loop): Remove code to set loop_unroll_iter.
        Always record the unrolling factor.

From-SVN: r15622
1997-09-21 19:50:04 -06:00
Jeff Law
237a9795cb loop.c (loop_unroll_factor): Move outside #ifdef HAIFA conditional.
* loop.c (loop_unroll_factor): Move outside #ifdef HAIFA
        conditional.
        (loop_unroll_iter): Remove unused variable and all references.
        (loop_optimize): Always allocate and clear space for loop_unroll_factor.
        (insert_bct): Fix minor formatting problems.
        * loop.h (loop_unroll_factor): Move decl outside #ifdef HAIFA.
        (loop_unroll_iter): Removed unused decl.
        * unroll.c (unroll_loop): Remove code to set loop_unroll_iter.
        Always record the unrolling factor.
More haifa cleanup

From-SVN: r15621
1997-09-21 19:49:19 -06:00
Jeff Law
813f674a97 Forgot to check in last time.
From-SVN: r15620
1997-09-21 19:44:35 -06:00
Jeff Law
d5ff3a2ec5 Fix typo.
From-SVN: r15619
1997-09-21 19:33:52 -06:00
Jeffrey A Law
cb3bb2a765 cse.c (simplify_relational_operation): Set h0u just like h0s.
* cse.c (simplify_relational_operation): Set h0u just like h0s.
        Similarly for h1u and h1s.

From-SVN: r15616
1997-09-21 19:28:22 -06:00
Jeffrey A Law
2a1777af22 jump.c (jmp_uses_reg_or_mem): Deleted unused function.
* jump.c (jmp_uses_reg_or_mem): Deleted unused function.
        (find_basic_blocks): Use computed_jump_p to determine if a
        particular JUMP_INSN is a computed jump.
        * reg-stack.c (find_blocks): Use computed_jump_p to determine
        if a particular JUMP_INSN is a computed jump.
        * rtlanal.c (jmp_uses_reg_or_mem): New function.
        (computed_jump_p): Likewise.
        * rtl.h (computed_jump_p): Declare.
        * genattrtab.c (pc_rtx): Define and initialize.
        * loop.c (loop_optimize): Always determine if the current
        function has a computed jump.
        (indirect_jump_in_function_p): Use computed_jump_p to determine
        if a particular JUMP_INSN is a computed jump.
General (and haifa) cleanups.

From-SVN: r15615
1997-09-21 18:49:32 -06:00
Jeff Law
37842442c3 Finish last change.
From-SVN: r15614
1997-09-21 17:46:54 -06:00
Jeffrey A Law
7014927a4e loop.c (fix_bct_param): Delete unused function.
* loop.c (fix_bct_param): Delete unused function.
        (check_bct_param): Likewise.

From-SVN: r15613
1997-09-21 17:43:38 -06:00
Jason Merrill
6d53d7c252 * frame.c (__deregister_frame): Check properly for initialized object.
From-SVN: r15601
1997-09-20 19:46:43 -04:00
Jason Merrill
b82b76c6ba call.c (build_over_call): Do require_complete_type before build_cplus_new.
* call.c (build_over_call): Do require_complete_type before
	build_cplus_new.

Fixes t20.C mode problem.

From-SVN: r15598
1997-09-20 18:38:48 -04:00
H.J. Lu
71e4fbe6df * alpha/linux.h (HANDLE_SYSV_PRAGMA): Defined.
From-SVN: r15594
1997-09-19 20:48:37 -06:00
Jim Wilson
f1ee40b618 Makefile.in (LIBIO_OBJECTS): Depend on _G_CONFIG_H.
* Makefile.in (LIBIO_OBJECTS): Depend on _G_CONFIG_H.

Brought over from devo.

From-SVN: r15593
1997-09-19 20:43:51 -06:00
J"orn Rennecke
cc5e164240 jump.c (thread_jumps): check can_reverse_comparison_p before threading a reversed-condition jump.
* jump.c (thread_jumps): check can_reverse_comparison_p before
        threading a reversed-condition jump.

From-SVN: r15590
1997-09-19 19:05:16 -06:00
J"orn Rennecke
272299b9ca sched.c (update_flow_info): Don't pass SCRATCH to dead_or_set_p.
* sched.c (update_flow_info): Don't pass SCRATCH to dead_or_set_p.
        * haifa-sched.c (update_flow_info): Likewise.

From-SVN: r15589
1997-09-19 18:52:52 -06:00
Jeffrey A Law
09f97c1e6c * Makefile.in (cross): New target.
From-SVN: r15564
1997-09-18 23:56:16 -06:00
Alexandre Oliva
339c9b006c Makefile.in (bootstrap2, bootstrap3): New targets.
* Makefile.in (bootstrap2, bootstrap3): New targets.
        (all-bootstrap): Remove outdated and confusing target.
        (bootstrap, bootstrap2, bootstrap3): Don't pass BOOT_CFLAGS down.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r15563
1997-09-18 23:23:00 -06:00
Jeffrey A Law
e649372777 * Makefile.in (BOOT_CFLAGS): Use -O2.
From-SVN: r15562
1997-09-18 23:21:34 -06:00
Jeffrey A Law
a79177f5a1 proj.h (FFEPROJ_BSEARCH): Delete all references.
* proj.h (FFEPROJ_BSEARCH): Delete all references.
        (FFEPROJ_STRTOUL): Likewise.
        * proj.c (bsearch): Compile this if no bsearch is provided by the
        host system.
        (strtoul): Similarly.

From-SVN: r15561
1997-09-18 23:16:54 -06:00
Jeffrey A Law
1e467e19b0 configure.in (strtoul, bsearch): Have autoconf check for these functions.
* configure.in (strtoul, bsearch): Have autoconf check for these
        functions.
        * configure, config.in: Rebuilt.
So Fortran front end can use HAVE_STRTOUL and HAVE_BSEARCH.

From-SVN: r15560
1997-09-18 23:14:32 -06:00
Alexandre Oliva
335d0ab208 Makefile.in (bootstrap2, bootstrap3): New targets.
* Makefile.in (bootstrap2, bootstrap3): New targets.
        (all-bootstrap): Remove outdated and confusing target.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r15559
1997-09-18 21:42:14 -06:00
Jeff Law
c52c47b4cd Forgot to commit in last change.
From-SVN: r15558
1997-09-18 21:30:32 -06:00
Jeffrey A Law
185110146b xm-mot3300.h (alloca): Properly declare if __STDC__.
* m68k/xm-mot3300.h (alloca): Properly declare if __STDC__.
        * mips/mips.h (alloca): Likewise.
        * rs6000/xm-rs6000.h (alloca): Likewise.
        * rs6000/xm-sysv4.h: Likewise.
Fixes build problem when using an ANSI compiler that isn't gcc.

From-SVN: r15557
1997-09-18 21:12:55 -06:00
Jeffrey A Law
4ac480d605 g77install.texi: Renamed from install.texi
* g77install.texi: Renamed from install.texi
        * g77.texi: Corresponding changes.

Fixes problem with g77.texi getting gcc/install.texi instead of
gcc/f/install.texi when building in the source tree.

From-SVN: r15556
1997-09-18 19:28:39 -06:00
Jason Merrill
238109cd66 search.c (lookup_field): Call complete_type in all cases.
* search.c (lookup_field): Call complete_type in all cases.

Fixes CLN problems.

	* decl.c (finish_function): Just warn about flowing off the end.

From-SVN: r15555
1997-09-18 19:52:48 -04:00
Jason Merrill
6020d3605c final.c (final_scan_insn): Hand BARRIERs off to the dwarf2 code.
* final.c (final_scan_insn): Hand BARRIERs off to the dwarf2 code.
	* dwarf2out.c (dwarf2out_frame_debug): Pass the whole insn along.
	(dwarf2out_stack_adjust): A BARRIER resets the args space to 0.

	* except.c (end_eh_unwinder): Subtract 1 from return address.
	* libgcc2.c (__throw): Likewise.
	(find_exception_handler): Don't change PC here.  Compare end with >.

From-SVN: r15554
1997-09-18 19:33:56 -04:00
Jeffrey A Law
feb5876a0b * fini.c (main): Return type is int.
From-SVN: r15553
1997-09-18 17:33:06 -06:00
Jeffrey A Law
b92f5cc093 com.c (lang_printable_name): Use verbosity argument.
* com.c (lang_printable_name): Use verbosity argument.
Just to keep the compiler quiet.

From-SVN: r15552
1997-09-18 17:30:08 -06:00
Nick Clifton
b24bcfb3e6 v850.c (compute_register_save_size): Correct register number.
* v850.c (compute_register_save_size): Correct register
        number.
        * v850.md (save_interrupt, return_interrupt): Correct
        register number.
        * v850/lib1funcs.asm (save_interrupt): Correct register number.
        (return_interrupt): Use stack pointer, not element pointer.

From-SVN: r15550
1997-09-18 17:19:55 -06:00
Jeffrey A Law
9ee29ed7fd Makefile.in (stamp-lib): Don't use '$?'...
* Makefile.in (stamp-lib): Don't use '$?', explicitly
        list the variables containing the object files to include
        in libf2c.a

From-SVN: r15545
1997-09-18 16:56:25 -06:00
Jeffrey A Law
d6420b5b31 * Make-lang.in: Fix merge problems.
From-SVN: r15544
1997-09-18 16:06:05 -06:00
Brendan Kehoe
93cf819dee configure.in, configure: Make sure to create the stage* and include symbolic links in each subdirectory.
* configure.in, configure: Make sure to create the stage* and include
	symbolic links in each subdirectory.

copy that's also now in at the FSF; only does it if $symbolic_link is
defined to `ln -s'

From-SVN: r15543
1997-09-18 15:50:51 -04:00
Jeffrey A Law
f05011492b pa.md (reload_peepholes): Don't allow addresses with side effects for the memory operand.
* pa.md (reload_peepholes): Don't allow addresses with side
        effects for the memory operand.
Geez, how long have we been screwing this up...

From-SVN: r15536
1997-09-18 01:45:15 -06:00
Jeffrey A Law
5aa0f40f6a install-info.c: Only provide an external decl for strrchr if HAVE_STRCHR is not defined.
* util/install-info.c: Only provide an external decl for strrchr
        if HAVE_STRCHR is not defined.
Fixes aix build problem.

From-SVN: r15535
1997-09-17 23:54:18 -06:00
Jason Merrill
4f870c0425 libgcc2.c (find_exception_handler): Subtract one from our PC when looking for a handler...
* libgcc2.c (find_exception_handler): Subtract one from our PC when
 	looking for a handler, to avoid hitting the beginning of the next
 	region.

	* except.c (expand_builtin_set_return_addr_reg): Use force_operand.

From-SVN: r15534
1997-09-17 21:23:34 -04:00
Jeffrey A Law
4eb66248bf abi64.h (LONG_MAX_SPEC): Define.
* mips/abi64.h (LONG_MAX_SPEC): Define.
        * mips.h (LONG_MAX_SPEC): Define.
        (CPP_SPEC): Include long_max_spec.
        (EXTRA_SPECS): Include long_max_spec.

Brought over from devo.

From-SVN: r15531
1997-09-17 18:31:51 -06:00
Brendan Kehoe
f996e5138b configure.in, configure: Make sure to create the stage* and include symbolic links in each subdirectory...
* configure.in, configure: Make sure to create the stage* and include
	symbolic links in each subdirectory, as we do in configure.lang for
	non-autoconf configurations.

From-SVN: r15529
1997-09-17 19:55:30 -04:00
Brendan Kehoe
4e8a434e98 configure.in, configure: Make sure to create the stage* and include symbolic links in each subdirectory...
* configure.in, configure: Make sure to create the stage* and include
	symbolic links in each subdirectory, as we do in configure.lang for
	non-autoconf configurations.

fixes cp 3stage problem

From-SVN: r15528
1997-09-17 19:55:13 -04:00
Jeffrey A Law
4415850727 * v850.c (construct_save_jarl): Fix thinko in last change.
From-SVN: r15518
1997-09-17 14:09:41 -06:00
Jason Merrill
66f2e88dd6 decl.c (grokparms): Don't bash a permanent list node if we're in a function.
* decl.c (grokparms): Don't bash a permanent list node if we're
	in a function.

From-SVN: r15516
1997-09-17 14:18:09 -04:00
Brendan Kehoe
8552680f15 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
From-SVN: r15514
1997-09-17 14:05:58 -04:00
Jeff Law
bf520cd90b Bump for snapshot (really, we will make a snapshot this time :-)
From-SVN: r15507
1997-09-17 09:51:45 -06:00
Jason Merrill
d5467e204a call.c (build_new_op): Give better error for syntactically correct...
* call.c (build_new_op): Give better error for syntactically
 	correct, but semantically invalid, use of undeclared template.

From-SVN: r15506
1997-09-16 22:23:05 -04:00
Ulrich Drepper
6c1d570678 Fix all problems reported by the test suite.
From-SVN: r15505
1997-09-17 02:10:30 +00:00
Jason Merrill
c0727e2a06 * libgcc2.c (find_exception_handler): Not found is -1.
From-SVN: r15504
1997-09-16 21:55:49 -04:00
Ulrich Drepper
5ae9a80ae1 Handle __set_errno correctly.
From-SVN: r15502
1997-09-17 00:54:03 +00:00
Jason Merrill
11dbec6686 revert accidental change
From-SVN: r15501
1997-09-16 19:59:15 -04:00
Jason Merrill
549121cd61 * call.c (compare_qual): Handle pmfs.
From-SVN: r15500
1997-09-16 18:44:13 -04:00
Jason Merrill
255fe733b3 integrate.c (expand_inline_function): Move expand_start_bindings after expanding the arguments.
* integrate.c (expand_inline_function): Move expand_start_bindings
	after expanding the arguments.

From-SVN: r15499
1997-09-16 17:23:59 -04:00
Jason Merrill
5c825fc20b decl.c (store_parm_decls): last_parm_cleanup_insn is the insn after the exception spec.
* decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
 	after the exception spec.

From-SVN: r15497
1997-09-16 17:08:30 -04:00
Jim Wilson
21002281e5 Fix H.J. Lu's alpha-linux bug with TImode constructors.
* expr.c (expand_expr): Remove previous incorrect change.
	If target and slot has no DECL_RTL, then call mark_addressable
	again for the slot after we give it RTL.

From-SVN: r15496
1997-09-16 13:59:22 -07:00
Jeff Law
7d9e0d333c Initial revision
From-SVN: r15492
1997-09-16 14:39:44 -06:00
Jim Wilson
518be9a392 Remove ChangeLog entry for non-existant change.
From-SVN: r15491
1997-09-16 10:36:28 -07:00
Jeff Law
dfd35b2066 Minor tweaks before snapshot.
From-SVN: r15488
1997-09-16 10:12:41 -06:00
Jeff Law
382738969d More stuff from Uli.
From-SVN: r15487
1997-09-16 10:11:13 -06:00
Ulrich Drepper
e693cc28bb Uli's libio/libstdc++ patches.
From-SVN: r15486
1997-09-16 10:01:55 -06:00
Jason Merrill
610ce97e65 expr.c (expand_expr, [...]): Call mark_addressable again for the slot after we give it RTL.
* expr.c (expand_expr, case TARGET_EXPR): Call mark_addressable
 	again for the slot after we give it RTL.

From-SVN: r15482
1997-09-16 03:53:56 -04:00
Jeffrey A Law
f633220ce2 * version.c: Bump for snapshot.
From-SVN: r15480
1997-09-16 00:39:02 -06:00
Jeff Law
84e750688b Tweak v850 ChangeLog entries.
From-SVN: r15478
1997-09-16 00:16:57 -06:00
Nick Clifton
145870b56f v850.c (register_is_ok_for_epilogue, [...]): New functions.
* config/v850/v850.c (register_is_ok_for_epilogue,
        pattern_is_ok_for_epilogue, construct_restore_jr,
        pattern_is_ok_for_prologue, construct_save_jarl): New functions.

        * config/v850/v850.h (pattern_is_ok_for_prologue,
        pattern_is_ok_for_epilogue, register_is_ok_for_epilogue): New
        predicates.

        * config/v850/v850.md: Replace prologue and epilogue patterns with a
        match_parallel pattern.

        * config/v850/v850.c (output_move_single_unsigned): Cope with zero
        extending and moving between registers at the same time.

Brought over from devo.

From-SVN: r15477
1997-09-16 00:13:27 -06:00
Jeff Law
9302e6e54c More formatting fixes.
From-SVN: r15476
1997-09-16 00:03:16 -06:00
Jeff Law
07f7a41acc Remove more CYGNUS LOCAL markers.
From-SVN: r15475
1997-09-15 23:52:35 -06:00
Jeff Law
5bfa6cfa3d Remove CYGNUS LOCAL markers.
From-SVN: r15474
1997-09-15 23:23:38 -06:00
Jeff Law
7b9eb580d5 Forgot to check in.
From-SVN: r15473
1997-09-15 23:19:29 -06:00
Jeffrey A Law
999087f678 aclocal.m4: Add replacement for AC_PROG_INSTALL.
* aclocal.m4: Add replacement for AC_PROG_INSTALL.
        * configure.in: Use EGCS_PROG_INSTALL.

From-SVN: r15472
1997-09-15 23:01:43 -06:00
Jeffrey A Law
76143254dc aclocal.m4: New file with replacement for AC_PROG_INSTALL.
* aclocal.m4: New file with replacement for AC_PROG_INSTALL.
        * configure.in: Use EGCS_PROG_INSTALL.

From-SVN: r15471
1997-09-15 22:55:29 -06:00
Jeff Law
4401bf245c dwarf2out.c (gen_subprogram_die): Handle redefinition of an extern inline function.
* dwarf2out.c (gen_subprogram_die): Handle redefinition of an
        extern inline function.

        * dwarf2out.c (reg_loc_descriptor): Fix prototype.
        (concat_loc_descriptor): New function.
        (loc_descriptor): Call it.
        (add_AT_location_description): Also elide the descriptor if both
        halves of a CONCAT are pseudos.
        (add_location_or_const_value_attribute): Recognize CONCAT too.
Bring over from devo/fsf.

From-SVN: r15470
1997-09-15 22:39:46 -06:00
Jeff Law
33687242dc Use @code instead of @uref until we upgrade texinfo.
From-SVN: r15469
1997-09-15 22:35:37 -06:00
Manfred Hollstein
e8ee97bf2b Renamed fixinc.math to fixinc.wrap
From-SVN: r15465
1997-09-16 03:59:48 +00:00
Jason Merrill
ca55abaee7 dwarf2 EH support
From-SVN: r15464
1997-09-15 22:07:50 -04:00
Jason Merrill
5168dcfc44 * call.c (null_ptr_cst_p): Integer type, not integral type.
From-SVN: r15463
1997-09-15 19:35:18 -04:00
Richard Henderson
4bb437245c Patch from Richard Henderson for alpha-linux ld.so bug.
* alpha.md (movdi): Handle CONST_DOUBLE for TARGET_BUILD_CONSTANTS.

From-SVN: r15459
1997-09-15 15:36:34 -07:00
Richard Henderson
0d24ff5d24 Patch from Richard Henderson for large frames.
* alpha/alpha.c (output_prolog): New variable sa_reg.  Use it for
	out-or-range reg_offset.
	(output_epilog): Likewise.

From-SVN: r15458
1997-09-15 15:28:34 -07:00
Jason Merrill
4da0677ba7 dwarf2 EH support
From-SVN: r15455
1997-09-15 18:25:30 -04:00
Jeffrey A Law
05ef889761 cse.c (simplify_relational_operation): If MODE specifies a mode wider than HOST_WIDE_INT...
* cse.c (simplify_relational_operation): If MODE specifies a
        mode wider than HOST_WIDE_INT, then the high word of a CONST_INT
        is derived from the sign bit of the low word.

Brought over from r5900 branch.

From-SVN: r15454
1997-09-15 15:37:39 -06:00
Jeff Law
dcb9d1f061 Document -ms for the H8/S.
From-SVN: r15453
1997-09-15 13:15:35 -06:00
Brendan Kehoe
1d77fa5397 except.c (find_exception_handler_labels): Use xmalloc instead of alloca...
* except.c (find_exception_handler_labels): Use xmalloc instead of
	alloca, since MAX_LABELNO - MIN_LABELNO can be more than 1 million
	in some cases.

From-SVN: r15452
1997-09-15 15:07:05 -04:00
Jason Merrill
18a7cd243d call.c (joust): Disable warnings until they can be moved to the right place.
* call.c (joust): Disable warnings until they can be moved to the
	right place.

From-SVN: r15450
1997-09-15 14:53:28 -04:00
Jeffrey A Law
01d8acec7a * lib/g++.exp (g++_init): Look for xgcc in $basedir too.
From-SVN: r15449
1997-09-15 00:38:11 -06:00
Jeffrey A Law
8be52aaa68 Makefile.in: Various changes to build info files in the object tree rather than the source tree.
* Makefile.in: Various changes to build info files
        in the object tree rather than the source tree.

From-SVN: r15448
1997-09-14 21:04:48 -06:00
Jeffrey A Law
f0e6e32439 Make-lang.in: Various changes to build info files in the object tree rather than the source tree.
* Make-lang.in: Various changes to build info files
        in the object tree rather than the source tree.

        * proj.h: Include ctype.h.

From-SVN: r15447
1997-09-14 21:02:41 -06:00
Jeff Law
f2d19dd24a We're moving away from distributing generated files.
From-SVN: r15446
1997-09-14 20:55:47 -06:00
Jeff Law
a3ee32467c Forgot to commit.
From-SVN: r15445
1997-09-14 14:09:02 -06:00
Jeff Law
24d28e0549 Update.
From-SVN: r15444
1997-09-14 14:04:54 -06:00
Jeff Law
34b8e4280d Update to official g77-0.5.21.
From-SVN: r15443
1997-09-14 14:04:23 -06:00
Jeff Law
ddd28aec2d This commit was generated by cvs2svn to compensate for changes in r15440,
which included commits to RCS files with non-trunk default branches.

From-SVN: r15441
1997-09-14 13:36:32 -06:00
Jeff Law
981c1e246f Initial revision
From-SVN: r15438
1997-09-14 13:34:57 -06:00
Fred Fish
a9aaedc9f7 * proj.h (isascii): Provide a default definition if none is available.
From-SVN: r15437
1997-09-14 12:36:19 -06:00
Jeff Law
be1ed94f89 fixinc.math: New file to fix math.h on some systems.
* fixinc.math: New file to fix math.h on some systems.
        * configure.in (freebsd, netbsd): Use fixinc.math on these
        systems.
        * configure: Rebuilt.
Should fix struct exception problems for freebsd, netbsd.  Can be used
for others.

From-SVN: r15436
1997-09-14 12:29:43 -06:00
Jeffrey A Law
124da27518 regmove.c (regmove_optimize): If we end up moving the original insn due to lifetime overlaps...
* regmove.c (regmove_optimize): If we end up moving the
	original insn due to lifetime overlaps, make sure to move
	REG_NOTES too.
Fixes x86 (and maybe h8) failure.

From-SVN: r15435
1997-09-14 11:11:52 -06:00
Manfred Hollstein
fca9d4b0d4 Patch from Manfred Hollstein, don't set execute bits when installing data files
* Makefile.in (INSTALL_{PROGRAM,DATA}): Use value found by configure.

From-SVN: r15431
1997-09-13 15:52:49 -07:00
Jeffrey A Law
326ee7a3fe haifa-sched.c (add_branch_dependences): Make each insn in a SCHED_GROUP_P block explicitly depend on the previous insn.
* haifa-sched.c (add_branch_dependences): Make each insn in
        a SCHED_GROUP_P block explicitly depend on the previous insn.
Fixes x86 abort.

From-SVN: r15430
1997-09-13 13:00:22 -06:00
Per Bothner
0520f6c01a * Makefile.in, config-lang.in: Convert to autoconf.
From-SVN: r15429
1997-09-12 16:25:29 -07:00
Dave Love
3c5b8fa6b4 Patch from Dave Love
* config-lang.in: Remove the messages about possible build problems.

From-SVN: r15425
1997-09-11 19:27:51 -07:00
Jason Merrill
810b9f2c0e * Makefile.in (iostream.list): Remove STDIO_WRAP_OBJECTS.
From-SVN: r15424
1997-09-11 22:16:24 -04:00
Jason Merrill
2a32969dd4 bastring.h (class basic_string): Add global scope to use of reverse_iterator.
* std/bastring.h (class basic_string): Add global scope to
	use of reverse_iterator.

From-SVN: r15423
1997-09-11 21:56:59 -04:00
Jason Merrill
85b71cf211 [multiple changes]
Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* decl.c (lookup_name_real): Add implicit 'typename' to types from
	base classes.

	* pt.c (most_specialized_class): Fix typo.
	(tsubst): Move constant folding to TREE_VEC case.

Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>

	* pt.c (do_poplevel): Don't warn about unused local variables
	while processing_template_decl since we don't always know whether
	or not they will need constructing/destructing.

	* pt.c (uses_template_parms): Check the values of an enumeration
	type to make sure they don't depend on template parms.

	* decl.c (make_typename_type): Don't lookup the field if the
	context uses template parms, even if we're not
	processing_template_decl at the moment.

	* pt.c (coerce_template_parms): Avoid looking at the
	TYPE_LANG_DECL portion of a typename type, since there won't be
	one.
	(tsubst): Do constant folding as necessary to make sure that
	arguments passed to lookup_template_class really are constants.

From-SVN: r15422
1997-09-11 21:53:33 -04:00
Jim Wilson
5188d2b2fa Never set prefix=/usr by default.
* configure.in (native_prefix): Delete.
	(mips-dec-netbsd): Don't set prefix.
	(*linux*): Don't set prefix.

From-SVN: r15421
1997-09-11 17:51:01 -07:00
Fred Fish
70988851ef Patches from Fred Fish for systems with sys/varargs.h but not varargs.h.
* protoize.c: Include <varargs.h> only if HAVE_VARARGS_H is
	defined.  If not defined, include <sys/varargs.h> if
	HAVE_SYS_VARARGS_H is defined.
	* configure.in: Test for varargs.h and sys/varargs.h.
	* configure: Regenerate with autoconf.
	* config.in: Regenerate with autoheader.

From-SVN: r15420
1997-09-11 17:39:10 -07:00
Jim Wilson
f401679ee1 Patches from H.J. Lu for alpha-linux -fPIC --enable-shared problem.
* Makefile.in (local-distclean): Also remove mh-frag mt-frag.
	* configure.in (skipdirs): Add target-librx for Linux.
	(alpha-*-linux*): Use config/mh-elfalphapic and config/mt-elfalphapic.
	* mh-elfalphapic, mt-elfalphapic: New files.

From-SVN: r15419
1997-09-11 16:44:33 -07:00
Fred Fish
2e384318d3 From Fred Fish, fix BeOS (I assume) related problem with mixing char pointers.
* cpplib.c (quote_string): Cast first arg of sprintf call
	from "unsigned char *" to "char *".
	(output_line_command): Ditto.
	(macroexpand): Ditto.
	(do_line): Cast atoi arg from "unsigned char *" to "char *".

From-SVN: r15418
1997-09-11 15:51:33 -07:00
Jim Wilson
ac64120eeb Add Fred Fish's LN/LN_S patch.
From-SVN: r15415
1997-09-11 13:39:08 -07:00
Jeffrey A Law
7f69978172 scope4.C: No longer expected to fail.
* g++.old-deja/g++.brendan/scope4.C: No longer expected to fail.
        * g++.old-deja/g++.mike/p7325.C: Likewise.
        * g++.old-deja/g++.mike/eh51.C: No longer expected to fail on the PA.

From-SVN: r15413
1997-09-11 13:53:52 -06:00
Jeffrey A Law
432438724e * loop.c (strength_reduce): Fix typo.
From-SVN: r15408
1997-09-11 11:08:01 -06:00
Alexandre Oliva
45591aaf4d crash20.C: Rework to avoid libg++.
* g++.old-deja/g++.brendan/crash20.C: Rework to avoid libg++.
        * g++.old-deja/g++.brendan/crash30.C: Likewise.
        * g++.old-deja/g++.brendan/crash39.C: Likewise.
        * g++.old-deja/g++.law/operators4.C: Likewise.

From-SVN: r15407
1997-09-11 10:00:02 -06:00
Joe Buck
9687fea5e0 p658.C: eliminate <bool.h> use.
* g++.old-deja/g++.mike/p658.C: eliminate <bool.h> use.
        * g++.old-deja/g++.mike/p784.C: Ditto.
        * g++.old-deja/g++.mike/p785.C: Ditto.
Avoid libg++ specific stuff.

From-SVN: r15406
1997-09-11 09:52:11 -06:00
Jeff Law
0326887985 Back out Kenner's Makefile.in patch.
From-SVN: r15403
1997-09-10 22:18:16 -06:00
Jeffrey A Law
f2e4e16f79 Bump for snapshot.
From-SVN: r15402
1997-09-10 22:11:01 -06:00
Michael Meissner
3b33f637d9 fix typo
From-SVN: r15401
1997-09-11 03:52:26 +00:00
Jeffrey A Law
3fb2f40127 Makefile (compare): Exit with nonzero status if there are comparison failures.
* Makefile (compare): Exit with nonzero status if there
        are comparison failures.  Note which files failed the
        comparison test in .bad_compare.
For toplevel "make bootstrap".

From-SVN: r15400
1997-09-10 21:36:41 -06:00
Jeffrey A Law
ec20b1b98c * Makefile.in (bootstrap): New target.
From-SVN: r15399
1997-09-10 21:32:08 -06:00
Michael Meissner
1791f8e236 make change to spacing for Kenner
From-SVN: r15398
1997-09-11 03:27:50 +00:00
Jeff Law
22cbb540d0 Remove last change. Not needed for egcs yet.
From-SVN: r15397
1997-09-10 21:01:15 -06:00
H.J. Lu
d26cb66831 Patch from H.J. Lu for alpha-linux.
* config/alpha/elf.h (CPP_PREDEFINES): Remove -D__PIC__ -D__pic__.

From-SVN: r15394
1997-09-10 17:07:06 -07:00
Jim Wilson
db87ec0b58 Clean up patches for delta88 nested function support.
* m88k/m88k.c (struct option): Rename to struct options.
	* m88k/dolph.h (INITIALIZE_TRAMPOLINE): Delete here.
	* m88k/sysv3.h (INITIALIZE_TRAMPOLINE): Delete ifdef and comments.
	* libgcc2.c (__enable_execute_stack): Check for __sysV88__ not
	__DOLPHIN__ or sysV88.

From-SVN: r15393
1997-09-10 16:34:58 -07:00
Richard Kenner
dc3fce9020 Makefile.in (LN): Add new symbol.
* Makefile.in (LN): Add new symbol.
        (FLAGS_TO_PASS): Pass it down.
        (stage[1-4]-start): Use $(LN), not "ln -s".
Bring over from gcc2.

From-SVN: r15392
1997-09-10 16:14:29 -06:00
Jim Wilson
04395f964f Fix problem reported by chris@lslsun.epfl.ch (Christian Iseli)
Fix problem reported by chris@lslsun.epfl.ch (Christian Iseli)
	* emit-rtl.c (gen_lowpart_common): For a SUBREG, add in word when
	create new subreg.

From-SVN: r15391
1997-09-10 15:04:24 -07:00
Jeffrey A Law
becdcf6da0 * config.sub: Accept 'amigados' for backward compatability.
From-SVN: r15389
1997-09-10 15:18:25 -06:00
Jim Wilson
3979dfb8b6 Install patch from H.J. Lu to make parallel make check work.
* Makefile.in (testsuite/site.exp): New target.
	(check-gcc, check-g++): Depend on testsuite/site.exp.
	Don't stop for failure.

From-SVN: r15269
1997-09-10 14:06:59 -07:00
Jason Merrill
81e98a98dc missing entry
From-SVN: r15268
1997-09-10 16:15:23 -04:00
Jim Wilson
0c65e50c07 Rebuild from source files.
From-SVN: r15264
1997-09-10 12:33:33 -07:00
H.J. Lu
1d11dd74fa Patch to fix parallel makes from H.J. Lu.
* Makefile (all): Remove sub-all.
	(stmp-sub-all): New target. Renamed from sub-all.
	(info, texinfo): Also depend on stmp-sub-all.
	(clean): Also remove stmp*.
	(maintainer-clean): New target. Same as realclean.

From-SVN: r15263
1997-09-10 11:54:55 -07:00
Jeff Law
2c3c65d745 Opps. Forgot part of the patch for $(srcdir)/INSTALL change.
From-SVN: r15262
1997-09-10 12:16:50 -06:00
Jason Merrill
4877a06fa4 dwarf2 EH support
From-SVN: r15257
1997-09-10 14:02:36 -04:00
Manfred Hollstein
9dfc6eba89 * m88k/sysv3.h (INITIALIZE_TRAMPOLINE) Define.
* libgcc2.c (__enable_execute_stack): Provide for sysV88 too.

From-SVN: r15256
1997-09-10 12:02:16 -06:00
Jason Merrill
0021b564f4 dwarf2 EH support
From-SVN: r15255
1997-09-10 14:00:28 -04:00
Jeffrey A Law
0680d17043 * expr.c (emit_block_move): Always return a value.
From-SVN: r15252
1997-09-10 10:52:45 -06:00
Jeff Law
8eb30e12b6 Arc changes I forgot in last commit.
From-SVN: r15221
1997-09-10 01:53:17 -06:00
Jeff Law
b4d940a26d Add port done awhile ago for the ARC cpu.
* arc/arc.h: New file.
        * arc/arc.c: New file.
        * arc/arc.md: New file.
        * arc/initfini.c: New file.
        * arc/lib1funcs.asm: New file.
        * arc/t-arc: New file.
        * arc/xm-arc.h: New file.
        * ginclude/va-arc.h: New file.
        * ginclude/stdarg.h: Include va-arc.h ifdef __arc__.
        * ginclude/varargs.h: Likewise.
        * Makefile.in (USER_H): Add va-arc.h.
        * configure.in (arc-*-elf*): Recognize.
        * longlong.h: Add ARC support.
Mostly so I can test changes in snapshot scripts.

        * expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
        when clearing non-BLKmode data.
Fixes sparc problem.

From-SVN: r15220
1997-09-10 01:50:16 -06:00
Jeff Law
003455d9aa Forgot to commit..
From-SVN: r15219
1997-09-10 00:42:02 -06:00
Manfred Hollstein
552592195e * xm-m88k.h (USG): Only define if it hasn't already been defined.
From-SVN: r15218
1997-09-10 00:37:46 -06:00
Manfred Hollstein
ee2910692e * Makefile.in (clean): Delete libgcc1-test.
From-SVN: r15217
1997-09-10 00:32:10 -06:00
Jeff Law
102115816c Makefile.in (INSTALL): cd to $(srcdir) before running texinfo.
* Makefile.in (INSTALL): cd to $(srcdir) before running texinfo.
(Until we start building all this gunk in objdir...)

From-SVN: r15216
1997-09-10 00:29:35 -06:00
Stan Cox
48f0be1b36 m88k.c (m88k_expand_prologue): Set MEM_IN_STRUCT_P of va_list template.
* m88k.c (m88k_expand_prologue): Set MEM_IN_STRUCT_P of va_list
        template.

Also invoke.texi tweaks for v850.

From-SVN: r15215
1997-09-09 21:57:12 -06:00
Jason Merrill
1dec6c7b3d new testcases
From-SVN: r15214
1997-09-09 23:34:51 -04:00
Jason Merrill
2ca340aed3 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
From-SVN: r15213
1997-09-09 22:53:42 -04:00
Jason Merrill
f12bc7b53d * std/bastring.h: Adjust use of reverse_iterator template.
From-SVN: r15212
1997-09-09 22:51:35 -04:00
Jason Merrill
ff893307d0 algo.h, [...]: Update To September 8 SGI release.
* algo.h, algobase.h, alloc.h, bvector.h, deque.h, hashtable.h,
	iterator.h, list.h, rope.h, ropeimpl.h, slist.h, stl_config.h,
	tree.h, vector.h: Update To September 8 SGI release.

From-SVN: r15211
1997-09-09 22:49:45 -04:00
Jim Wilson
c6b50f1082 Patch from Alexandre Oliva to fix SunOS4 install problem.
* Makefile.in (install_to_libdir, install_to_tooldir): Add MULTISUBDIR
	to all filenames in libdir and tooldir.

From-SVN: r15210
1997-09-09 19:46:16 -07:00
Mark Mitchell
113952ef50 stl_config.h (__STL_MEMBER_TEMPLATES): Enable.
Tue Sep  9 17:38:47 1997  Mark Mitchell  <mmitchell@usa.net>

	* stl_config.h (__STL_MEMBER_TEMPLATES): Enable.

From-SVN: r15209
1997-09-09 22:29:42 -04:00
Mark Mitchell
0355541399 error.c (dump_decl): Avoid crashing when presented with a uninitialized constant...
Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>

	* error.c (dump_decl): Avoid crashing when presented with a
	uninitialized constant, as can occur with a template parameter.

From-SVN: r15208
1997-09-09 22:28:20 -04:00
Jason Merrill
a2676865a6 except.c (expand_throw): Call build_delete for all exception types, not just objects with destructors.
* except.c (expand_throw): Call build_delete for all
	exception types, not just objects with destructors.

From-SVN: r15207
1997-09-09 20:59:16 -04:00
Jeff Law
c82af01654 Add libgcc2 exception to copyright notice.
From-SVN: r15205
1997-09-09 17:33:35 -06:00
Jeff Law
66ed068304 Add port done awhile ago for the ARC cpu.
* arc/arc.h: New file.
        * arc/arc.c: New file.
        * arc/arc.md: New file.
        * arc/initfini.c: New file.
        * arc/lib1funcs.asm: New file.
        * arc/t-arc: New file.
        * arc/xm-arc.h: New file.
        * ginclude/va-arc.h: New file.
        * ginclude/stdarg.h: Include va-arc.h ifdef __arc__.
        * ginclude/varargs.h: Likewise.
        * Makefile.in (USER_H): Add va-arc.h.
        * configure.in (arc-*-elf*): Recognize.
        * longlong.h: Add ARC support.
Mostly so I can test changes in snapshot scripts.

        * expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
        when clearing non-BLKmode data.
Fixes sparc problem.

From-SVN: r15198
1997-09-09 16:21:04 -06:00
Brendan Kehoe
b0d75c1eca typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to c-typeck.c.
* typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
        c-typeck.c.

From-SVN: r15197
1997-09-09 18:20:47 -04:00
Jeff Law
ee89446f5b Add port done awhile ago for the ARC cpu.
* arc/arc.h: New file.
        * arc/arc.c: New file.
        * arc/arc.md: New file.
        * arc/initfini.c: New file.
        * arc/lib1funcs.asm: New file.
        * arc/t-arc: New file.
        * arc/xm-arc.h: New file.
        * ginclude/va-arc.h: New file.
        * ginclude/stdarg.h: Include va-arc.h ifdef __arc__.
        * ginclude/varargs.h: Likewise.
        * Makefile.in (USER_H): Add va-arc.h.
        * configure.in (arc-*-elf*): Recognize.
        * longlong.h: Add ARC support.
Mostly so I can test changes in snapshot scripts.

        * expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
        when clearing non-BLKmode data.
Fixes sparc problem.

From-SVN: r15190
1997-09-09 15:58:23 -06:00
Jeff Law
6eb70e69c4 Add port done awhile ago for the ARC cpu.
* arc/arc.h: New file.
        * arc/arc.c: New file.
        * arc/arc.md: New file.
        * arc/initfini.c: New file.
        * arc/lib1funcs.asm: New file.
        * arc/t-arc: New file.
        * arc/xm-arc.h: New file.
        * ginclude/va-arc.h: New file.
        * ginclude/stdarg.h: Include va-arc.h ifdef __arc__.
        * ginclude/varargs.h: Likewise.
        * Makefile.in (USER_H): Add va-arc.h.
        * configure.in (arc-*-elf*): Recognize.
        * longlong.h: Add ARC support.
Mostly so I can test changes in snapshot scripts.

        * expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
        when clearing non-BLKmode data.
Fixes sparc problem.

From-SVN: r15189
1997-09-09 15:57:17 -06:00
Jeff Law
81049807ba Add port done awhile ago for the ARC cpu.
* arc/arc.h: New file.
        * arc/arc.c: New file.
        * arc/arc.md: New file.
        * arc/initfini.c: New file.
        * arc/lib1funcs.asm: New file.
        * arc/t-arc: New file.
        * arc/xm-arc.h: New file.
        * ginclude/va-arc.h: New file.
        * ginclude/stdarg.h: Include va-arc.h ifdef __arc__.
        * ginclude/varargs.h: Likewise.
        * Makefile.in (USER_H): Add va-arc.h.
        * configure.in (arc-*-elf*): Recognize.
        * longlong.h: Add ARC support.
Mostly so I can test changes in snapshot scripts.

        * expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
        when clearing non-BLKmode data.
Fixes sparc problem.

From-SVN: r15188
1997-09-09 15:56:06 -06:00
Jeff Law
5680076c75 Add port done awhile ago for the ARC cpu.
* arc/arc.h: New file.
        * arc/arc.c: New file.
        * arc/arc.md: New file.
        * arc/initfini.c: New file.
        * arc/lib1funcs.asm: New file.
        * arc/t-arc: New file.
        * arc/xm-arc.h: New file.
        * ginclude/va-arc.h: New file.
        * ginclude/stdarg.h: Include va-arc.h ifdef __arc__.
        * ginclude/varargs.h: Likewise.
        * Makefile.in (USER_H): Add va-arc.h.
        * configure.in (arc-*-elf*): Recognize.
        * longlong.h: Add ARC support.
Mostly so I can test changes in snapshot scripts.

        * expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
        when clearing non-BLKmode data.
Fixes sparc problem.

From-SVN: r15187
1997-09-09 15:51:41 -06:00
Jeff Law
e90d5e5777 Add port done awhile ago for the ARC cpu.
* arc/arc.h: New file.
        * arc/arc.c: New file.
        * arc/arc.md: New file.
        * arc/initfini.c: New file.
        * arc/lib1funcs.asm: New file.
        * arc/t-arc: New file.
        * arc/xm-arc.h: New file.
        * ginclude/va-arc.h: New file.
        * ginclude/stdarg.h: Include va-arc.h ifdef __arc__.
        * ginclude/varargs.h: Likewise.
        * Makefile.in (USER_H): Add va-arc.h.
        * configure.in (arc-*-elf*): Recognize.
        * longlong.h: Add ARC support.
Mostly so I can test changes in snapshot scripts.

        * expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
        when clearing non-BLKmode data.
Fixes sparc problem.

From-SVN: r15186
1997-09-09 15:51:14 -06:00
Jeff Law
0143027a1f Add port done awhile ago for the ARC cpu.
* arc/arc.h: New file.
        * arc/arc.c: New file.
        * arc/arc.md: New file.
        * arc/initfini.c: New file.
        * arc/lib1funcs.asm: New file.
        * arc/t-arc: New file.
        * arc/xm-arc.h: New file.
        * ginclude/va-arc.h: New file.
        * ginclude/stdarg.h: Include va-arc.h ifdef __arc__.
        * ginclude/varargs.h: Likewise.
        * Makefile.in (USER_H): Add va-arc.h.
        * configure.in (arc-*-elf*): Recognize.
        * longlong.h: Add ARC support.
Mostly so I can test changes in snapshot scripts.

        * expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
        when clearing non-BLKmode data.
Fixes sparc problem.

From-SVN: r15185
1997-09-09 15:50:29 -06:00
Jeff Law
d7ad6040df Add port done awhile ago for the ARC cpu.
* arc/arc.h: New file.
        * arc/arc.c: New file.
        * arc/arc.md: New file.
        * arc/initfini.c: New file.
        * arc/lib1funcs.asm: New file.
        * arc/t-arc: New file.
        * arc/xm-arc.h: New file.
        * ginclude/va-arc.h: New file.
        * ginclude/stdarg.h: Include va-arc.h ifdef __arc__.
        * ginclude/varargs.h: Likewise.
        * Makefile.in (USER_H): Add va-arc.h.
        * configure.in (arc-*-elf*): Recognize.
        * longlong.h: Add ARC support.
Mostly so I can test changes in snapshot scripts.

        * expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
        when clearing non-BLKmode data.
Fixes sparc problem.

From-SVN: r15184
1997-09-09 15:50:26 -06:00
Jim Wilson
233bd86d2e Add CYGWIN32 support.
* g77.c (pexecute, doit): Add checks for __CYGWIN32__.

From-SVN: r15183
1997-09-09 13:21:58 -07:00
Jeffrey A Law
8f3d79e05f * haifa-sched.c (print_value): Fix last change.
From-SVN: r15181
1997-09-09 09:12:06 -06:00
Nick Clifton
74aca74bc3 v850.h (ASM_SPEC): Pass on target processor.
* v850.h (ASM_SPEC): Pass on target processor.
        (CPP_PREDEFINES): Only define if not already specified.
        (TARGET_VERSION): Only define if not already specified.
        (MASK_CPU, MASK_V850, MASK_DEFAULT): Bits to specify target
        processor.
        (EXTRA_SWITCHES): Extra entries in the switches array.
        (TARGET_DEFAULT): Set default target processor.

From-SVN: r15180
1997-09-09 09:06:54 -06:00
Jim Wilson
c0b041480e Fix m68k-hp-hpux8 problem for Manfred Holstein.
* m68k.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): In MOTOROLA
	cases, add %# and %/, and add : to make them into extended asms.

From-SVN: r15174
1997-09-08 18:34:17 -07:00
Weiwen Liu
2ce72aa0a8 * libio.h: Fix typo.
From-SVN: r15170
1997-09-08 10:12:05 -06:00
Weiwen Liu
52b7724b84 alias.c (init_alias_analysis): Clean up incompatible pointer type warning in bzero.
* alias.c (init_alias_analysis): Clean up incompatible pointer
        type warning in bzero.
        * regmove.c (regmove_optimize): Ditto.
        * haifa-sched.c (find_rgns): Ditto.

        * haifa-sched.c (print_value): Clean up ptr->int cast
        warnings.

From-SVN: r15169
1997-09-08 10:06:18 -06:00
Jeff Law
1a5de45f37 Fix thinko.
From-SVN: r15168
1997-09-08 08:53:44 -06:00
Jody Goldberg
b3d5a58b51 decl.c (current_local_enum): Remove static.
Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>

	* decl.c (current_local_enum): Remove static.
	* pt.c (tsubst_enum): Save and restore value of current_local_enum
	in case template is expanded in enum decl.
	(instantiate_class_template) : Use new tsubst_enum signature.
	(tsubst_expr): Likewise.

From-SVN: r15156
1997-09-08 05:37:29 -04:00
Mark Mitchell
786b524596 pt.c (begin_member_template_processing): Take a function as argument, not a set of template arguments.
Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>

	* pt.c (begin_member_template_processing): Take a function as
	argument, not a set of template arguments.  Use the template
	parameters, rather than the arguments.  Handle non-type parameters
	correctly.  Push a binding level for the parameters so that multiple
	member templates using the same parameter names can be declared.
	(end_member_template_processing): Pop the binding level.
	(push_template_decl): Mark member templates as static when
	appropriate.

	* lex.c (do_pending_inlines): Pass the function, not its template
	arguments, to begin_member_template_processing.
	(process_next_inline): Likewise.
	(do_pending_defargs): Likewise.

	* error.c (dump_expr): Obtain the correct declaration for a
	TEMPLATE_CONST_PARM.

	* call.c (add_template_conv_candidate): New function.
	(build_object_call): Handle member templates, as done in the other
	build_ functions.

From-SVN: r15155
1997-09-08 05:28:51 -04:00
Jason Merrill
267c09ab53 dwarf2out.c (dwarf2out_frame_debug): Assume that in a PARALLEL prologue insn, only the first elt is significant.
* dwarf2out.c (dwarf2out_frame_debug): Assume that in a PARALLEL
 	prologue insn, only the first elt is significant.
	(output_call_frame_info): For exception handling, always use 4-byte
 	fields as specified by the dwarf2 spec.
	Don't skip trivial FDEs.

From-SVN: r15154
1997-09-08 04:53:21 -04:00
Fred Fish
0c82f6bfae INSTALL: Change 'amigados' to 'amigaos' to match current usage.
* INSTALL: Change 'amigados' to 'amigaos' to match current usage.
	* install.texi (Configurations): Ditto.
	* config.sub: Ditto.

From-SVN: r15143
1997-09-07 23:17:48 -06:00
Jim Wilson
44010f9161 linux.mt (LIBIOSTREAM_DEP): Change stdio.list to stmp-stdio.
* linux.mt (LIBIOSTREAM_DEP): Change stdio.list to stmp-stdio.
Should fix linux build problem.

From-SVN: r15142
1997-09-07 22:58:57 -06:00
Weiwen Liu
1fed1f518f * Makefile.in (sdbout.o): Depend on insn-config.h.
From-SVN: r15141
1997-09-07 22:55:20 -06:00
Jim Wilson
624cc15e30 Fix typo in last patch.
From-SVN: r15139
1997-09-07 19:06:55 -07:00
Jim Wilson
239e68f69d Fix m68k-motorola-sysv (aka delta) build failure for Manfred Hollstein.
* m68k/m68k.h (TARGET_SWITCHES): For 68000, 68302, subtract MASK_68881.
	For 68303, 68332, cpu32, subtract MASK_68040_ONLY.

From-SVN: r15138
1997-09-07 18:51:02 -07:00
Jeff Law
db7cafb0ad version.c: Bump for snapshot.
* version.c: Bump for snapshot.

        * expmed.c (expand_divmod): Make op1_is_pow2 depend on unsignedp
        for negative constants.  Promote EXACT_DIV_EXPR to TRUNC_DIV_EXPR
        when op1_is_pow2.

        * final.c (shorten_branches): During first pass, assume worst
        possible alignment for ADDR_VEC and ADDR_VEC_DIFF insns.

        * Makefile.in (distclean): Remove various things left around
        by running the testsuite.

From-SVN: r15136
1997-09-07 16:10:34 -06:00
Jeff Law
a051ad3aea Makefile.in (distclean): Remove various things left around by running the testsuite.
* Makefile.in (distclean): Remove various things left around
        by running the testsuite.

From-SVN: r15135
1997-09-07 13:45:33 -06:00
Manfred Hollstein
7ed4611117 configure.in (out_file): Emit definition to config.status in order to have a defined value for...
* configure.in (out_file): Emit definition to config.status in order
        to have a defined value for configure.lang.
        * configure: Re-built.

From-SVN: r15134
1997-09-07 13:17:02 -06:00
Jan-Jaap van der Heijden
e41cea70d8 configure.in: Make symlink to as-new rather than as.new.
* configure.in: Make symlink to as-new rather than as.new.  Similarly
        for ld-new.
        * configure: Rebuilt.

From-SVN: r15133
1997-09-07 10:00:47 -06:00
Mark Mitchell
aa5f3bad3a decl.c (replace_defag): Undo previous change.
Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>

	* decl.c (replace_defag): Undo previous change.
	* lex.c (do_pending_defargs): Deal with member templates.

	* pt.c (is_member_template): Avoid crashing when passed a
	non-function argument.

From-SVN: r15131
1997-09-06 16:10:05 -04:00
Jason Merrill
98c1c66880 class.c (grow_method): Remove check for redeclaration.
* class.c (grow_method): Remove check for redeclaration.

Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>

	* cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
	(DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
	(PRIMARY_TEMPLATE_P): Use it.
	* call.c (build_overload_call_real): Use it.
	* class.c (instantiate_type): Likewise.
	* decl.c (decls_match): Likewise.
	* method.c (build_overload_identifier): Likewise.
	* pt.c (push_template_decl): Likewise.
	(classtype_mangled_name): Likewise.
	(lookup_template_class): Likewise.

	* cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
	DECL_NTPARMS to conform to usage elsewhere.
	* call.c (add_template_candidate): Likewise.
	* class.c (instantiate_type): Likewise.
	* pt.c (instantiate_template): Likewise.
	(get_bindings): Likewise.

	* class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
	is_member_template.

	* pt.c (unify): Undo changes to allow multiple levels of template
	parameters.
	(type_unification): Likewise.
	(fn_type_unification): Likewise.
	(get_class_bindings): Likewise.
	* cp-tree.h (Likewise).

	* decl.c (replace_defarg): Check that the type of the default
	parameter does not invlove a template type before complaining
	about the initialization.

	* error.c (dump_expr): Deal with template constant parameters in
	member templates correctly.

	* pt.c (is_member_template): Deal with class specializations
	correctly.
	(tsubst): Handle "partial instantiation" of member templates
	correctly.

Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>

	* pt.c (type_unification): Change calling squence to allow for
	multiple levels of template parameters.
	(tsubst_expr): Likewise.
	(tsubst): Likewise.
	(tsubst_copy): Likewise.
	(instantiate_template): Likewise.
	(unify): Likewise.
	* call.c (build_overload_call_real): Use it.
	(add_builtin_candidate): Use it.
	(build_new_method_call): Use it.
	* class.c (instantiate_type): Use it.
	* decl.c (grokdeclarator): Use it.
	* decl2.c (finish_file): Use it.
	* method.c (build_overload_identifier): Use it.

	* call.c (add_template_candidate):  Add additional parameter for
	the function return type.  Call fn_type_unification istead of
	type_unification.
	(build_user_type_conversion_1): Handle member templates.
	(build_new_function_call): Likewise.
	(build_new_op): Likewise.
	(build_new_method_call): Likewise.

	* class.c (grow_method): Don't give an error message indicating
 	that two member templates with the same name are ambiguous.
	(finish_struct): Treat member template functions just like member
 	functions.

	* cp-tree.h (check_member_template): Add declaration.
	(begin_member_template_processing): Likewise.
	(end_member_template_processing): Likewise.
	(fn_type_unification): Likewise.
	(is_member_template): Likewise.
	(tsubst): Change prototype.
	(tsubst_expr): Likewise.
	(tsubst_copy): Likewise.
	(instantiate_template): Likewise.
	(get_bindings): Likewise.

	* decl.c (decls_match): Handle multiple levels of template
	parameters.
	(pushdecl): Handle template type params just like other type
	declarations.
	(push_class_level_binding): Return immediately if the
	class_binding_level is NULL.
	(grokfndecl): If check_classfn() returns a member_template, use
	the result of the template, not the template itself.

	* decl2.c (check_member_template): New function.  Check to see
	that the entity declared to be a member template can be one.
	(check_classfn): Allow redeclaration of member template functions
	with different types; the new functions can be specializations or
	explicit instantiations.

	* error.c (dump_decl): Handle multiple levels of template
	parameters.
	(dump_function_decl): Update to handle function	templates.

	* lex.c (do_pending_inlines): Set up template parameter context
	for member templates.
	(process_next_inline): Likewise.

	* method. (build_overload_identifier): Adjust for multiple levels
	of template parameters.

	* parse.y (fn.def2): Add member templates.
	(component_decl_1): Likewise.

	* pt.c (begin_member_template_processing): New function.
	(end_member_template_processing): Likewise.
	(is_member_template): Likewise.
	(fn_type_unification): Likewise.
	(current_template_parms): Return a vector of all the template
	parms, not just the innermost level of parms.
	(push_template_decl): Deal with the possibility of member
	templates.
	(lookup_template_class): Likewise.
	(uses_template_parms): Likewise.
	(tsubst): Modify processing to TEMPLATE_TYPE_PARM and
	TEMPLATE_CONST_PARM to deal with multiple levels of template
	arguments.   Add processing of TEMPLATE_DECL to produce new
	TEMPLATE_DECLs from old ones.
	(do_decl_instantiation): Handle member templates.

	* search.c (lookup_fnfields_1): Handle member template conversion
	operators.

	* tree.c (cp_tree_equal): Check the levels, as well as the
	indices, of TEMPLATE_CONST_PARMs.

	* typeck.c (comptypes): Check the levels, as well as the indices,
	fo TEMPLATE_TYPE_PARMs.
	(build_x_function_call): Treat member templates like member
	functions.

Member templates.

From-SVN: r15130
1997-09-06 04:10:07 -04:00
Brendan Kehoe
dbfcb4beac Insert libio rewrite and its various changes from devo.
From-SVN: r15129
1997-09-06 03:44:38 -04:00
Jim Wilson
1496c1bb0b Fix `make distclean' failure.
* Makefile.in (distclean): Do MULTICLEAN before deleting Makefile.

From-SVN: r15128
1997-09-05 17:29:47 -07:00
Jim Wilson
1aeb1f6f0b Fix undefined reference to constructor with -O3 -fprofile-arcs.
* profile.c (output_func_start_profiler): Set DECL_EXTERNAL to zero.

From-SVN: r15127
1997-09-05 16:59:43 -07:00
Christian Kuehnke
770a0113e6 sparc.md: Add ultrasparc scheduling support.
* sparc/sparc.md: Add ultrasparc scheduling support.
	* sparc/sparc.h (RTX_COSTS): For MULT give v9 a cost of 25 insns.

From-SVN: r15126
1997-09-05 23:17:19 +00:00
Joel Sherrill
3fbc0b7094 * configure.in (*-*-rtems*): Do not build libgloss for rtems.
From-SVN: r15125
1997-09-05 23:15:09 +00:00
Jeffrey A Law
50bb736a7c libio.exp (test_libio): Use libstdc++_{include,link}_flags instead of g++_{include,link}_flags.
* lib/libio.exp  (test_libio): Use libstdc++_{include,link}_flags
        instead of g++_{include,link}_flags.

From-SVN: r15123
1997-09-05 15:37:51 -06:00
Jim Wilson
04940ba5b4 sdbout.c (plain_type_1, [...]): Verify that TYPE_DOMAIN has integer TYPE_{MAX,MIN}_VALUE before using them.
* sdbout.c (plain_type_1, case ARRAY_TYPE): Verify that TYPE_DOMAIN
        has integer TYPE_{MAX,MIN}_VALUE before using them.
Bring over from the FSF.

From-SVN: r15117
1997-09-05 14:06:11 -06:00
Philippe De Muyter
f5ffa99918 integrate.c (save_for_inline_copying): Use 0, not NULL_PTR, as initial value for real_label_map.
* integrate.c (save_for_inline_copying): Use 0, not NULL_PTR,
        as initial value for real_label_map.
        (copy_for_inline): Likewise.
Brought over from the FSF.

From-SVN: r15116
1997-09-05 14:03:37 -06:00
J"orn Rennecke
acceac1aea * sched.c (update_flow_info) When looking if to set found_split_dest
or found_orig_dest, look at all parts of a PARALLEL.
        * haifa-sched.c (update_flow_info): Likewise.

From-SVN: r15115
1997-09-05 13:36:35 -06:00
Jeffrey A Law
e20d4801db * config.sub: Handle v850-elf.
From-SVN: r15114
1997-09-05 12:25:50 -06:00
Jeffrey A Law
f84271d99d v850: New directory for v850 port.
* v850: New directory for v850 port.
        * v850/lib1funcs.asm: New file.
        * t-v850, v850.c, v850.h, v850.md, xm-v850.h: New files.
        * ginclude/va-v850.h: New file.
        * varargs.h, stdarg.h: Include va-mn10200.h.
        * configure.in (mn10200-*-*): New target.
        * Makefile.in (USER_H): Add va-mn10200.h.

From-SVN: r15104
1997-09-05 11:43:51 -06:00
Jeff Law
ae180d84fc v850: New directory for v850 port.
Fri Sep  5 10:08:44 1997  Jeffrey A Law  (law@cygnus.com)

        * v850: New directory for v850 port.
        * v850/lib1funcs.asm: New file.
        * t-v850, v850.c, v850.h, v850.md, xm-v850.h: New files.
        * ginclude/va-v850.h: New file.
        * varargs.h, stdarg.h: Include va-mn10200.h.
        * configure.in (mn10200-*-*): New target.
        * Makefile.in (USER_H): Add va-mn10200.h.

From-SVN: r15103
1997-09-05 11:41:24 -06:00
Jim Wilson
89cc6098e6 m68k.h (MACHINE_STATE_SAVE, [...]): Add __HPUX_ASM__ versions.
* m68k/m68k.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Add
        __HPUX_ASM__ versions.
Fixes build problems for m68k-hp-hpux*

From-SVN: r15102
1997-09-05 09:36:39 -06:00
Jeff Law
e7fd975751 Add new pointer.
From-SVN: r15101
1997-09-05 09:18:14 -06:00
Jeffrey A Law
c74f7db87d * install.sh: Delete duplicate install script.
From-SVN: r15100
1997-09-05 09:06:54 -06:00
Jeffrey A Law
fa8adee65f * install-sh: Delete duplicate install script.
From-SVN: r15099
1997-09-05 09:05:56 -06:00
Richard Henderson
18c6629a2b * cbrt.c: Tweak to work on more targets.
From-SVN: r15098
1997-09-05 00:19:00 -06:00
Jeffrey A Law
af818dc87c Makefile.in (clean): Don't remove config.cache.
* Makefile.in (clean): Don't remove config.cache.
        (distclean): Do it here instead.

From-SVN: r15097
1997-09-05 00:16:30 -06:00
Stan Cox
914ec131d6 reg-stack.c (subst_stack_regs): Pop the stack register for a computed goto which sets the same stack register.
* reg-stack.c (subst_stack_regs): Pop the stack register for a
        computed goto which sets the same stack register.

        * reg-stack.c (compare_for_stack_reg): Swap only if the source and
        destination are both on the regstack.
        (subst_stack_regs_pat): Put the destination at the top of the regstack.
Bring over regstack bugfixes from the FSF.

From-SVN: r15096
1997-09-04 23:14:46 -06:00
Jim Wilson
d5d1738a3a Fix mips-sgi-irix5.2 eh25 g++ testsuite failure.
* mips.md (nonlocal_goto_receiver): Define.

From-SVN: r15091
1997-09-04 19:36:53 -07:00
Jim Wilson
f4da78811e Fix another -fprofile-arcs bug from Joseph Myers <jsm28@cam.ac.uk>.
* profile.c (output_arc_profiler): Check next_insert_after for non
	NULL before deferencing it.

From-SVN: r15090
1997-09-04 19:17:56 -07:00
Jim Wilson
c1090daa15 * i386/t-sol2 (TARGET_LIBGCC2_CFLAGS): Define to -fPIC.
From-SVN: r15088
1997-09-04 17:54:04 -06:00
Jason Merrill
71e10e8788 tweak
From-SVN: r15086
1997-09-04 19:10:35 -04:00
Jeff Law
fe181f78b3 Test commit.
From-SVN: r15085
1997-09-04 16:20:21 -06:00
Jeffrey A Law
da594c9448 * i386.h (CPP_CPU_DEFAULT): Avoid using #elif.
From-SVN: r15083
1997-09-04 14:50:19 -06:00
Michael Meissner
3e28fe4442 For phases starting with flow, print basic block information when doing dumps
From-SVN: r15082
1997-09-04 19:15:50 +00:00
Jim Wilson
417b0fa211 Fix minor bug reported by Jan Hubicka.
* toplev.c (main): Change #elif to #else/#ifdef

From-SVN: r15081
1997-09-04 12:06:02 -07:00
Jim Wilson
7053ca7275 Fix minor bugs found by riscos build attempt.
* tlink.c: Include ctype.h.
	* ginclude/va-mips.h: Add _VA_MIPS_H_ENUM ifdef/define/endif.

From-SVN: r15080
1997-09-04 11:54:16 -07:00
Michael Meissner
f05a8b2501 ChangeLog entry for last bitmap change.
From-SVN: r15079
1997-09-04 11:17:09 -06:00
Michael Meissner
1cfabc1344 Add free declaration
From-SVN: r15078
1997-09-04 17:06:34 +00:00
Joel Sherrill
02d7a56981 * i960/i960.h: Added default for SUBTARGET_SWITCHES macro.
From-SVN: r15077
1997-09-04 09:59:54 -06:00
Jim Wilson
6030b6afe7 profile.c (output_arc_profiler): Verify next_insert_after is an INSN before and after skipping a stack pop.
* profile.c (output_arc_profiler): Verify next_insert_after is an
        INSN before and after skipping a stack pop.

From-SVN: r15076
1997-09-04 09:54:24 -06:00
Fred Fish
d30e0541de * .cvsignore (*-install): Remove.
From-SVN: r15075
1997-09-04 09:49:02 -06:00
J"orn Rennecke
04da53bd68 final.c (shorten_branches): Don't count the lengths of deleted instructions.
* final.c (shorten_branches): Don't count the lengths of deleted
        instructions.

From-SVN: r15074
1997-09-04 09:47:40 -06:00
Jeffrey A Law
780532a4c6 * version.c: Bump for snapshot.
From-SVN: r15072
1997-09-04 09:41:38 -06:00
Michael Meissner
22fa5b8add Add EXECUTE_IF_AND_IN_{BITMAP,REG_SET}, and bitmap_print
From-SVN: r15071
1997-09-04 15:12:20 +00:00
Jim Wilson
9b2c548ca6 Fix srcdir==objdir build failure with multilibbed libiberty.
* Makefile.in (stamp-needed, stamp-config): Add MULTISRCTOP to
	pathname for move-if-change.

From-SVN: r15067
1997-09-03 15:53:56 -07:00
Jason Merrill
c1bc6829b4 typeck.c (c_expand_return): Always convert_for_initialization before checking for returning a pointer to local.
* typeck.c (c_expand_return): Always convert_for_initialization
 	before checking for returning a pointer to local.

From-SVN: r15064
1997-09-03 16:01:18 -04:00
Jim Wilson
fa8b602464 Fix H.J. Lu's alpha-linux aliasing bug.
* alias.c (true_dependence): Address with AND can alias scalars.
	(anti_dependence, output_dependence): Likewise.

From-SVN: r15063
1997-09-03 12:28:49 -07:00
Jason Merrill
03e7070558 pt.c (type_unification): If strict and the function parm doesn't use template parms, just compare types.
* pt.c (type_unification): If strict and the function parm doesn't
	use template parms, just compare types.

From-SVN: r15062
1997-09-03 14:41:11 -04:00
Jim Wilson
57163df067 Fix minor alias typo found while working on H.J. Lu's alpha-linux alias bug.
* alias.c (true_dependence): Test x for BLKmode, in addition to mem.

From-SVN: r15061
1997-09-03 10:42:21 -07:00
Klaus Espenlaub
3d015f466d method.c (build_overloaded_value): Replace direct call to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
* method.c (build_overloaded_value): Replace direct call
        to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.

From-SVN: r15059
1997-09-03 09:54:14 -06:00
Joel Sherrill
8aa4e786fb go32-rtems.h, [...] (subtarget_switches): Removed SUBTARGET_SWITCHES definitions.
* i386/go32-rtems.h, i386/rtems.h, i960/rtems.h, m68k/rtems.h,
          mips/rtems64.h, pa/rtems.h, rs6000/rtems.h, sh/rtems.h,
          sparc/rtems.h (subtarget_switches): Removed SUBTARGET_SWITCHES
          definitions.  Use -qrtems instead of -mrtems.

From-SVN: r15058
1997-09-03 09:42:45 -06:00
Jeffrey A Law
57f260dfbd * lib/libstdc++.exp: Remove libg++_link_flags.
From-SVN: r15057
1997-09-03 09:38:21 -06:00
Robert Lipe
feb211221a xm-sco5.h (sys_siglist): Define.
* xm-sco5.h (sys_siglist): Define.
        (SYS_SIGLIST_DECLARED): Likewise.
From Robert Lipe.

From-SVN: r15056
1997-09-03 09:04:27 -06:00
Jason Merrill
056c014d34 typeck.c (convert_arguments): Don't arbitrarily choose the first of a set of overloaded functions.
* typeck.c (convert_arguments): Don't arbitrarily choose the first
        of a set of overloaded functions.

        * lex.c (real_yylex): Don't elide __FUNCTION__.

From-SVN: r15055
1997-09-03 04:26:52 -04:00
Jeffrey A Law
704af6a15f expr.c (convert_move): Handle truncation from TQFmode to QFmode.
* expr.c (convert_move): Handle truncation from TQFmode to QFmode.
From Christian Iseli.

From-SVN: r15054
1997-09-02 23:33:06 -06:00
Jeff Law
f04e7122c8 Tweak.
From-SVN: r15053
1997-09-02 23:02:58 -06:00
Jeffrey A Law
068f1cb8d7 xm-svr4.h (SYS_SIGLIST_DECLARED): Define.
* xm-svr4.h (SYS_SIGLIST_DECLARED): Define.
        * xm-news.h (SYS_SIGLIST_DECLARED): Likewise.
        * gcc.texi: Note that if you define sys_siglist that you should
        also define SYS_SIGLIST_DECLARED.
autoconf doesn't handle finding sys_siglist under different names.

From-SVN: r15052
1997-09-02 22:39:26 -06:00
Jeff Law
25faccf928 Makefile.in (install, [...]): Make these phony targets.
* Makefile.in (install, install-info, installdirs, uninstall): Make
        these phony targets.
So we don't overwrite a newer version of texinfo that might already be
installed on the system.

        * makeinfo/makeinfo.c: Maybe include <stdlib.h> for malloc et al.
        * util/install-info.c: Include <string*.h>.
        (my_strerror): Use strerror if available.
Avoids alpha bug and redecl of sys_errlist problems.

From-SVN: r15051
1997-09-02 22:25:26 -06:00
Torbjorn Granlund
127cd4056c except.c (eh_outer_context): Expand masking operation using expand_binop.
* except.c (eh_outer_context): Expand masking operation using
        expand_binop.
From tege.

From-SVN: r15046
1997-09-02 20:08:35 -06:00
Jim Wilson
8cf02b4799 Fix alpha-linux -mieee bug reported by H.J. Lu.
* alpha.md (floatdisf2-1): New pattern.

From-SVN: r15045
1997-09-02 18:27:01 -07:00
Jeffrey A Law
49dad301f0 mn10200.h (INITIALIZE_TRAMPOLINE): PC relative instructions are relative to the next instruction...
* mn10200.h (INITIALIZE_TRAMPOLINE): PC relative instructions
        are relative to the next instruction, not the current instruction.

From-SVN: r15043
1997-09-02 18:46:39 -06:00
Doug Evans
b245293e3b * lib/gcc-dg.exp (gcc-dg-test): Fix typos setting compile_type.
From-SVN: r15042
1997-09-02 23:37:40 +00:00
Jim Wilson
a172951945 Fix i386 code generation error reported by Mumit Khan.
* local-alloc.c (contains_replace_regs): New function.
	(update_equiv_regs): When adding a REG_EQUIV note for a set of a MEM,
	verify that there is no existing REG_EQUIV note, and add a call to
	contains_place_regs.

From-SVN: r15041
1997-09-02 14:40:31 -07:00
Jason Merrill
37dac03995 method.c (build_overload_value): Add in_template parm.
* method.c (build_overload_value): Add in_template parm.
	(build_overload_int): Likewise.
	(build_overload_identifier): Pass it.

	* decl.c (duplicate_decls): Don't bash a previous template
 	definition with a redeclaration.

From-SVN: r15040
1997-09-02 17:33:28 -04:00
Jason Merrill
ca79f85d9d pt.c (unify): float doesn't match double.
* pt.c (unify): float doesn't match double.

	* pt.c (do_type_instantiation): Handle getting a _TYPE or a
 	TYPE_DECL.  Handle getting non-template types.
	* parse.y (explicit_instantiation): Use typespec instead of
	aggr template_type.

Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>

	* typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.

From-SVN: r15037
1997-09-02 16:27:13 -04:00
H.J. Lu
290c8b1fb1 Patch from H.J. Lu for alpha-linux port.
* config/alpha/elf.h (CPP_PREDEFINES): Add -D__PIC__ -D__pic__.
	(STARTFILE_SPEC): Always use crtbegin.o%s
	(ENDFILE_SPEC): Always use crtend.o%s.

From-SVN: r15036
1997-09-02 12:53:50 -07:00
Jim Wilson
a6a503ed40 Fix alpha-linux core dump reported by H.J. Lu.
* alpha/alpha.h (PREFERRED_RELOAD_CLASS): Return NO_REGS if NO_REGS
	is passed in.
	* emit-rtl.c (gen_lowpart_common): Add code to convert CONST_INT to
	SFmode for 64 bit hosts.

From-SVN: r15035
1997-09-02 12:37:05 -07:00
Paul N. Hilfinger
a94729bc72 fixincludes: Permits spaces between # and define.
* fixincludes: Permits spaces between # and define.  Discard C++
        comments in sys/pci.h on HP/UX 10.20.

From-SVN: r15034
1997-09-02 12:38:30 -06:00
Jeffrey A Law
2eddfed1f2 pa.c (restore_unscaled_index_insn_codes): New function.
* pa.c (restore_unscaled_index_insn_codes): New function.
        (record_unscaled_index_insn_codes): Likewise.
        (output_function_prologue): Call restore_unscaled_index_insn_codes.
        (output_function_epilogue): Free memory for unscaled_index_insn_codes.
        (pa_reorg): Call record_unscaled_index_insn_codes.

From-SVN: r15028
1997-09-01 23:33:19 -06:00
Jeffrey A Law
c9e03727e0 version.c: Bump for snapshot.
* version.c: Bump for snapshot.
Preparing for next snapshot.

        * haifa-sched.c (move_insn): Handle notes correctly for insns
        with SCHED_GROUP_P set.
Should fix some x86 failures with haifa enabled.

From-SVN: r15027
1997-09-01 22:12:45 -06:00
H.J. Lu
a5d6a95b99 Patch from H.J. Lu for minor alpha-linux problem.
* alpha/xm-linux.h (USE_BFD): Undef before define.

From-SVN: r15026
1997-09-01 17:00:55 -07:00
Jim Wilson
558a1e7cb3 Fix sunos4/rs6000/powerpc/etc build problems with multilibbed libraries.
* configure.in (target_subdir): Set to libraries if enable_multilib.

From-SVN: r15025
1997-09-01 16:55:29 -07:00
Jim Wilson
bc4ddc77a0 Fix irix6 execute/921117-1.c c-torture failure.
* cse.c (cse_insn): Don't record BLKmode values.

From-SVN: r15024
1997-09-01 16:43:03 -07:00
Jason Merrill
7e3af3746e call.c (build_new_op): Strip leading REF_BIND from first operand to builtin operator.
* call.c (build_new_op): Strip leading REF_BIND from first operand
	to builtin operator.

	* decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
	use its RTL.

From-SVN: r15023
1997-09-01 17:01:30 -04:00
Jason Merrill
8e69329a82 * call.c (null_ptr_cst_p): Remove support for (void*)0.
From-SVN: r15022
1997-09-01 16:07:22 -04:00
Stephen Williams
f3e0ca6c2d * i960.h (LINK_SPEC): Handle "-mjX" and "-mrp" switches.
From-SVN: r15013
1997-09-01 11:27:19 -06:00
Jeffrey A Law
a63d08e606 cccp.c (sys_errlist): Remove special 4.4bsd declaration.
* cccp.c (sys_errlist): Remove special 4.4bsd declaration.
        * collect2.c (sys_errlist): Likewise.
        * cpplib.c (sys_errlist): Likewise.
        * gcc.c (sys_errlist): Likewise.
        * protoize (sys_errlist): Likewise.
        * configure.in: Check for strerror.
        * xm-freebsd.h (HAVE_STRERROR): Remove definition.
        * xm-gnu.h (HAVE_STRERROR): Likewise.
        * xm-linux.h (HAVE_STRERROR): Likewise.
        * xm-netbsd.h (HAVE_STRERROR): Likewise.
        * xm-bsd386.h (HAVE_STRERROR): Likewise.
        * xm-cygwin32.h (HAVE_STRERROR): Likewise.
        * xm-dos.h (HAVE_STRERROR): Likewise.
        * xm-mingw32.h (HAVE_STRERROR): Likewise.
        * xm-pa.h (HAVE_STRERROR): Likewise.
        * xm-papro.h (HAVE_STRERROR): Likewise.
        * xm-sysv4.h (HAVE_STRERROR): Likewise.
        * configure, config.in: Rebuilt.
Remove the need to define HAVE_STRERROR for each host port.

From-SVN: r15011
1997-09-01 11:02:53 -06:00
Jeffrey A Law
db814993ae Makefile.in: Add several missing "else true" clauses.
* Makefile.in: Add several missing "else true" clauses.
Cater to broken "make" programs.

From-SVN: r15010
1997-09-01 10:08:40 -06:00
Jeffrey A Law
e3512ac291 collect2.c: Change DONT_DECLARE_SYS_SIGLIST to SYS_SIGLIST_DECLARED.
* collect2.c: Change DONT_DECLARE_SYS_SIGLIST to SYS_SIGLIST_DECLARED.
        * mips-tfile.c: Likewise.
        * gcc.texi: DONT_DECLARE_SYS_SIGLIST: Remove docs.
        * xm-linux.h (DONT_DECLARE_SYS_SIGLIST): Delete definition.
        * xm-freebsd.h, xm-bsd386.h, xm-sysv4.h, xm-sol2.h: Likewise.
        * configure.in: Check for sys_siglist declaration.
        * configure, config.in: Rebuilt.

Fix conflicting sys_siglist decls once and for all.

From-SVN: r15007
1997-09-01 08:57:29 -06:00
Joel Sherrill
5d84b57e6f go32-rtems.h, [...] (subtarget_switches): Added -mrtems as a switch.
* i386/go32-rtems.h, i386/rtems.h, i960/rtems.h,
        m68k/rtems.h, mips/rtems64.h, pa/rtems.h, rs6000/rtems.h,
        sparc/rtems.h (subtarget_switches): Added -mrtems as a switch.
        * i960/i960.h: Added SUBTARGET_SWITCHES macro.
        * rs6000/sysv4.h (extra_subtarget_switches): Added new
        macro EXTRA_SUBTARGET_SWITCHES.
        * configure.in (sh*-*-rtems*): New target.
        * sh/rtems.h: New file.
        * sh/sh.h: Added SUBTARGET_SWITCHES macro.
        * configure: Rebuilt.

From-SVN: r15006
1997-09-01 08:14:30 -06:00
Jim Wilson
2599dcc74a Fix alpha loop unrolling abort.
* unroll.c (calculate_giv_inc): Handle increment with code PLUS.

From-SVN: r15004
1997-08-30 22:57:40 -07:00
Karl Berry
4f122a21ab Fix Freedbsd build problem with patch from more recent texinfo sources.
* info/terminal.c (terminal_prep_terminal): Only use OCRNL and
		ONLCR if they are defined.  Reported by many people.

From-SVN: r15003
1997-08-30 18:48:33 -07:00
David Edelsohn
3b7e5ef4c7 Pay DF fused add ops pay attention to -mno-fused-add
From-SVN: r15002
1997-08-30 14:55:17 +00:00
Jim Wilson
5cd5f4a7b2 Fix i386-pc-solaris2.5.1 _sys_siglistp redeclaration error.
* i386/xm-sysv4.h (DONT_DECLARE_SYS_SIGLIST): Define.

From-SVN: r15001
1997-08-29 19:21:34 -07:00
Jeffrey A Law
63e7fe9ba4 pa.md (reload_peepholes): Make sure operand is a REG before examining REGNO.
* pa.md (reload_peepholes): Make sure operand is a REG before
        examining REGNO.  Allow general registers too.
Fixes sporatic c-torture failure.

Remove last change to fold-const.c and c-decl.c

From-SVN: r15000
1997-08-29 16:14:07 -06:00
Jim Wilson
eb7b11fd07 Fix C++ template instantiation back end core dump.
* varasm.c (mark_constants): Don't look inside CONST_DOUBLEs.

From-SVN: r14999
1997-08-29 11:52:51 -07:00
Jeffrey A Law
9aef2966e9 * execute/921007-1.c: Make strcmp static.
From-SVN: r14998
1997-08-29 12:47:40 -06:00
Philipp Thomas
c760091a0c dwarfout2.c (build_abbrev_table): Use xrealloc, not xmalloc to reallocate abbrev_die_table.
* dwarfout2.c (build_abbrev_table): Use xrealloc, not xmalloc
        to reallocate abbrev_die_table.

From-SVN: r14997
1997-08-29 09:33:54 -06:00
Jim Wilson
575833386f m68k.md (iorsi_zexthi_ashl16): Disable.
* m68k/m68k.md (iorsi_zexthi_ashl16): Disable.
Fixes m68k codegen problem.

From-SVN: r14996
1997-08-29 09:19:58 -06:00
Andreas Schwab
4f91a0f87a * Makefile.in (config.status): Depend on version.c
From-SVN: r14995
1997-08-29 09:10:18 -06:00
Andreas Schwab
eae4b97034 expr.h (insn_gen_function): Reenable prototype.
* expr.h (insn_gen_function): Reenable prototype.

	* expr.c (move_by_pieces_1, clear_by_pieces_1): Fix prototype of
	first parameter.

From-SVN: r14994
1997-08-29 09:02:03 -06:00
Jeff Law
ec83e9d31f Fix typo.
From-SVN: r14993
1997-08-29 01:03:53 -06:00
Jim Wilson
00fc09e149 Fix x86 libio -O2 miscompilation problem.
* i386.c (ix86_expand_epilogue): Emit blockage instruction when pic.

From-SVN: r14992
1997-08-28 13:04:19 -07:00
Jeffrey A Law
2601ebca41 version.c: Bump for latest snapshot.
* version.c: Bump for latest snapshot.

        * bc-optab.c: Conditionally include stdlib.h.
        (free): Provide a declaration if NEED_DECLARATION_FREE.
        * tree.c (free): Provide a declaration if NEED_DECLARATION_FREE.
        * rtl.h (free): Remove declaration.
        * tree.h (free): Remvoe declaration.

        * configure: Rebuilt.

From-SVN: r14989
1997-08-28 07:08:54 -06:00
Jeff Law
d5d23425d0 Filename change in latest g77 update.
From-SVN: r14988
1997-08-28 06:59:07 -06:00
Jeffrey A Law
e5eb27e51f flags.h (flag_move_all_movables): Declare.
* flags.h (flag_move_all_movables): Declare.
        (flag_reduce_all_givs): Likewise.
        * loop.c (move_movables): Handle flag_move_all_movables.
        (strength_reduce): Handle flag_reduce_all_givs.
        * toplev.c (flag_move_all_movables): Define.
        (flag_reduce_all_givs): Likewise.
        (f_options): Add -fmove-all-movables and -freduce-all-givs.
        * invoke.texi: Document new options, including alias stuff that
        wasn't included last time.
Two of the "Tooning" options :-)

From-SVN: r14987
1997-08-27 21:35:22 -06:00
Jeff Law
73624c403d New file in g77 front end.
From-SVN: r14986
1997-08-27 21:21:33 -06:00
Jeff Law
795232f720 Update to Aug 26 g77 front end and runtime.
From-SVN: r14985
1997-08-27 21:21:05 -06:00
Bob Manson
d995a6dc49 t-h8300: Use TARGET_LIBGCC2_CFLAGS instead of LIBGCC2_CFLAGS.
* t-h8300: Use TARGET_LIBGCC2_CFLAGS instead of LIBGCC2_CFLAGS.
        * t-mn10200: Ditto.
        * t-vxsparc: Ditto.
        * t-vxworks68: Ditto.
        * t-vxworks960: Ditto.
        * t-vx29k: Ditto.

From-SVN: r14984
1997-08-27 18:18:03 -06:00
Richard Henderson
ba64ca335a Patch from Richard Henderson to fix alpha-linux alloca redefinition problems.
* alpha/xm-alpha.h (alloca): Define alloca to builtin_alloca for GNUC
	if not already defined, and USE_C_ALLOCA not defined.

From-SVN: r14977
1997-08-27 16:50:04 -07:00
Jim Wilson
7818d6fcb2 Make the gcc config.guess exec the toplevel config.guess.
Make the gcc config.guess exec the toplevel config.guess.  Update the toplevel
config.guess from the gcc config.guess.

From-SVN: r14976
1997-08-27 16:20:52 -07:00
Jim Wilson
ca20876d33 alpha linux glibc2 patch from H.J. Lu
alpha linux glibc2 patch from H.J. Lu
	* config/alpha/elf.h (DEFAULT_VTABLE_THUNKS): New. Defined as 1
	if USE_GNULIBC_1 is not defined.

From-SVN: r14975
1997-08-27 16:09:53 -07:00
Richard Henderson
704a63062f Patch from Richard Henderson to fix alpha-linux support.
* alpha/elf.h (LINK_SPEC): Conditionalize on USE_GNULIBC_1.
	* config.guess: Recognize alpha-linux-gnulibc1.
	* configure.in (alpha-*-linux-gnulibc1): New target.
	(alpha-*-linux-gnu*): Don't build crtbegin/end.

From-SVN: r14974
1997-08-27 16:02:19 -07:00
Jeffrey A Law
f345de42fc reorg.c (dbr_schedule): Allow current_function_return_rtx to be something other than a REG.
* reorg.c (dbr_schedule): Allow current_function_return_rtx
        to be something other than a REG.
        * function.c (expand_function_end): Fix current_function_return_rtx
        if it was a pseudo.
Brought over from the fsf/devo.

From-SVN: r14972
1997-08-27 13:59:51 -06:00
Jim Wilson
67f68fd265 Fix newlib coldfire build failure.
* m68k.md (iorsi3_internal): Readd ! TARGET_5200 check lost in
	last change.

From-SVN: r14969
1997-08-27 11:54:11 -07:00
Doug Evans
3dedc65a1f c-decl.c (grokdeclarator): If array index or size calculations overflow, issue an error.
* c-decl.c (grokdeclarator): If array index or size calculations
        overflow, issue an error.
        * fold-const.c (int_const_binop): New static function.
        (const_binop, size_binop): Call it.
Brought over from the fsf.

From-SVN: r14967
1997-08-27 10:58:02 -06:00
Doug Evans
88016fb7ef loop.c (combine_movables): Earlier insns don't match later ones.
* loop.c (combine_movables): Earlier insns don't match later ones.
Brought over from the fsf.

From-SVN: r14966
1997-08-27 10:43:23 -06:00
H.J. Lu
33d2808ba7 Remove last change to alpha/linux.
Remove last change to alpha/linux.  It was incorrect according to Richard
Henderson.

From-SVN: r14964
1997-08-27 09:24:31 -06:00
Jeffrey A Law
bdcaf7735e * typeck.c (expand_target_expr): Make definition match declaration.
From-SVN: r14962
1997-08-27 02:07:16 -06:00
Jeffrey A Law
5ddc28a51f class.c (get_basefndecls): Make definition match declaration.
* class.c (get_basefndecls): Make definition match declaration.
Something caught by the sunos compiler.

From-SVN: r14961
1997-08-27 02:03:41 -06:00
H.J. Lu
bba17b29e1 linux.h (CC1_SPEC): Define it only if not defined.
* config/linux.h (CC1_SPEC): Define it only if not defined.

        * config/m68k/linux.h (CC1_SPEC): Undefine it before include
        <linux.h>

        * config/linux.h (DEFAULT_VTABLE_THUNKS): New. Defined as 1 if
        USE_GNULIBC_1 is not defined.

        * config/alpha/linux.h (DEFAULT_VTABLE_THUNKS): New. Defined
        as 1.
        * config/rs6000/linux.h (DEFAULT_VTABLE_THUNKS): Ditto.

        * config/sparc/linux.h (DEFAULT_VTABLE_THUNKS): New. Defined
        as 1 if USE_GNULIBC_1 is not defined.
Linux patches from HJ.

From-SVN: r14960
1997-08-27 01:26:22 -06:00
Jeffrey A Law
ed4044e070 t-freebsd (USER_H): Include EXTRA_HEADERS and LANG_EXTRA_HEADERS.
* t-freebsd (USER_H): Include EXTRA_HEADERS and LANG_EXTRA_HEADERS.
        * x-netbsd: Likewise
        * x-dgux (USER_H): Include EXTRA_HEADERS and LANG_EXTRA_HEADERS
        (INSTALL_HEADERS): Delete.
        * x-dguxbcs: Likewise.
        * x-hp3bsd44: Likewise
        * x-pa: Likewise.

From-SVN: r14959
1997-08-27 00:51:37 -06:00
Bernd Schmidt
47d3640028 i386.md (pop): pop increments the stack pointer.
* i386.md (pop): pop increments the stack pointer.
        (prologue_set_stack_ptr): New pattern.
        * i386.c (ix86_expand_prologue): Use prologue_set_stack_ptr
        instead of subsi3.
Fixes problem with scheduling on the x86.

From-SVN: r14956
1997-08-27 00:29:59 -06:00
Alexandre Oliva
b9e6eb36ff Makefile.in: create correct multiple links to shared libstdc++.
* Makefile.in: create correct multiple links to
        shared libstdc++.

From-SVN: r14953
1997-08-27 00:04:41 -06:00
Robert Lipe
d7ce9ac718 * hostnm_.c: Include errno.h
From-SVN: r14949
1997-08-26 20:13:32 -06:00
Jim Wilson
fc79eafee8 reload.c (find_reloads, case '0'): Reject matching a non-offsettable address where an offsettable address is required.
* reload.c (find_reloads, case '0'): Reject matching a non-offsettable
        address where an offsettable address is required.
Fixes 68k bootstrap problem.

From-SVN: r14948
1997-08-26 18:49:59 -06:00
Michael P. Hayes
c5da853fcd loop.c (check_final_value): Don't miss a biv increment in a parallel.
* loop.c (check_final_value): Don't miss a biv increment in a
        parallel.

From-SVN: r14947
1997-08-26 18:44:25 -06:00
H.J. Lu
cf7c222f5d Makefile.in (check): Don't depend on site.exp.
* testsuite/Makefile.in (check): Don't depend on site.exp.
        (just-check): Depend on site.exp.
Fixes problems with SMP "make check".

From-SVN: r14945
1997-08-26 12:28:26 -06:00
Jim Wilson
d4ef15f2ca dwarfout.c (dwarfout_file_scope_decl, [...]): Check TYPE_DECL_IS_STUB instead of DECL_NAME.
* dwarfout.c (dwarfout_file_scope_decl, case TYPE_DECL): Check
        TYPE_DECL_IS_STUB instead of DECL_NAME.

From-SVN: r14944
1997-08-26 12:05:23 -06:00
Jeff Law
d40431299d Fix stupid typo in last change.
From-SVN: r14943
1997-08-26 12:04:44 -06:00
Jeffrey A Law
823a059627 * libtxi/Makefile.in: Add dependencies for memcpy, memmove and strdup.
From-SVN: r14939
1997-08-26 11:18:19 -06:00
Jim Wilson
10549cbd85 H.J. Lu's SMP patch.
From-SVN: r14924
1997-08-25 23:36:27 -07:00
Jason Merrill
818045b6d8 input.c (sub_getch): Eventually give up and release the input file.
* input.c (sub_getch): Eventually give up and release the input file.

	* decl.c (cp_finish_decl): If #p i/i, put inline statics in the
	right place.

From-SVN: r14923
1997-08-25 21:34:48 -04:00
Jason Merrill
3e68fa8311 [multiple changes]
Mon Aug 25 14:26:45 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* Makefile.in (CXXFLAGS): Add -Weffc++.

Sat Aug 23 21:25:37 1997  Mark Mitchell  <mmitchell@usa.net>

	* bastring.h: Enable reverse_iterator and its ilk.

	* bastring.h: Provide specializations of member function templates
	for const_iterator.

From-SVN: r14922
1997-08-25 20:27:06 -04:00
Jason Merrill
922ddba49f call.c (joust): Tweak message.
* call.c (joust): Tweak message.

Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>

	* error.c (type_as_string): Put const/volatile on template type
	parameters where appropriate.

From-SVN: r14919
1997-08-25 17:30:44 -04:00
Jeffrey A Law
484df98895 haifa-sched.c (find_pre_sched_live): Remove #if 0 code.
* haifa-sched.c (find_pre_sched_live): Remove #if 0 code.
        (find_post_sched_live): Likewise.
Just cleaning up.

        * haifa-sched.c (schedule_block): Remove old code to get arguments
        from hard regs into pseudos early.
Avoids problems with bogus REG_LOOP_BEGIN notes causing aborts during
and after register allocation.

From-SVN: r14918
1997-08-25 13:15:01 -06:00
Jeff Law
39dfb55a01 version.c: Bump for new snapshot.
* version.c: Bump for new snapshot.

        * local-alloc.c (update_equiv_regs): All the target to reject
        promotion of some REG_EQUAL to REG_EQUIV notes.
        * pa.h (DONT_RECORD_EQUIVALENCE): Define.
Fixes some c-torture failures, also improves generated code.

        * pa.c (secondary_reload_class): (mem (mem ... )) does not need
        secondary reloads.
Fixes 094.fpppp/twldrv.f abort.

        * pa.c (hppa_builtin_saveregs): Emit a blockage insn after the
        store of the argument registers.
Fixes c-torture failure.

        * fold-const.c (multiple_of_p): New function.
        (fold): Turn some cases of *_DIV_EXPR into EXACT_DIV_EXPR.
One of the performance patches from the g77 folks.

From-SVN: r14915
1997-08-25 09:00:44 -06:00
Jeffrey A Law
d78778ebf9 expr.h (insn_gen_function): Temporarily remove prototype.
* expr.h (insn_gen_function): Temporarily remove prototype.
This one has to wait until more prototyped stuff is done.

From-SVN: r14914
1997-08-25 01:48:35 -06:00
Jim Wilson
8ba0f41e9b configure.in: Always make sure RANLIB_TEST is set.
* configure.in: Always make sure RANLIB_TEST is set.
        * configure: Rebuilt.

From-SVN: r14913
1997-08-25 01:44:59 -06:00
Jim Wilson
ebf92f1c90 missed ChangeLog entry for last checkin
From-SVN: r14911
1997-08-24 17:26:31 -07:00
Jim Wilson
feb9ea1a1f Fix solaris2 (without GNU install installed) install failure.
* Makefile.in (install-info): Don't cd into srcdir.  Add srcdir to
	filenames.  Use sed to extract base filename for install.

From-SVN: r14910
1997-08-24 17:25:22 -07:00
Jeffrey A Law
4c9e597b51 call.c (strictly_better): Make arguments unsigned ints.
* call.c (strictly_better): Make arguments unsigned ints.
Fixes bug reported by Peter Seebach.

From-SVN: r14909
1997-08-23 17:47:00 -06:00
John F. Carr
b6ffe60242 unroll.c (find_splittable_givs): Only share if two givs have the same add and multiply values.
* unroll.c (find_splittable_givs): Only share if two givs have the
        same add and multiply values.
Fixes some testsuite failures on the x86.

From-SVN: r14908
1997-08-23 17:25:05 -06:00
Jim Wilson
2ebfd23067 Fix typos in m68k configuration files.
* m68k/next.h (GO_IF_INDEXABLE_BASE): Fix typo in undef.
	* m68k/m68kemb.h (LIB_SPEC): Add missing comment end before it.

From-SVN: r14902
1997-08-23 14:41:33 -07:00
Jeffrey A Law
251ffdee0e pa.c (pa_reorg): Always put begin_brtab and end_brtab insns around branch tables.
* pa.c (pa_reorg): Always put begin_brtab and end_brtab insns
        around branch tables.
        * pa.md (begin_brtab, end_brtab): Only emit the .begin_brtab
        and .end_brtab directives if TARGET_GAS.
Should fix bootstrap problem with PA port when not using gas.

From-SVN: r14899
1997-08-23 00:19:56 -06:00
Jim Wilson
2731427487 Fix m68k-next-nextstep3 stage2 enquire compilation hang reported by Moene.
* alias.c (true_dependence): Pass x_addr not x to varies.

From-SVN: r14898
1997-08-22 21:39:31 -07:00
Jim Wilson
19372aa112 Fix AIX build problem when IBM cc is used.
* acconfig.h (NEED_DECLARATION_CALLOC): Add.
	* configure.in: Add GCC_NEED_DECLARATION call for calloc.
	* rs6000/xm-rs6000.h (malloc, realloc, calloc, free): Delete
	declarations.
	* config.in, configure: Regenerate.

From-SVN: r14896
1997-08-22 14:39:10 -07:00
Jeffrey A Law
ea16770fb1 * Makefile.in (UOBJ): Include symlnk.
From-SVN: r14894
1997-08-22 08:54:27 -06:00
John F. Carr
2a2c8203b6 alias.c (find_base_value): Improve handling of PLUS, MINUS, and LO_SUM.
* alias.c (find_base_value): Improve handling of PLUS, MINUS, and
        LO_SUM.
        (record_set): Handle LO_SUM like PLUS.
        (init_alias_analysis): When following chains of base addresses,
        do not stop on reaching a hard register.
Updates from jfc.

From-SVN: r14888
1997-08-22 00:39:29 -06:00
Jeff Law
d80357b704 Tweak.
From-SVN: r14886
1997-08-21 20:16:20 -06:00
Jason Merrill
8eeda2ecd5 lex.c (real_yylex): Refer to __complex instead of complex.
* lex.c (real_yylex): Refer to __complex instead of complex.

-Wed Jul 16 15:57:42 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
-
-       * parse.y (empty_parms): Only use VOID_LIST_NODE for the PARMS if
-       we're in a C++ struct/class, not if we're doing xtern "C"'.
-

and regenerate parse.c.

From-SVN: r14885
1997-08-21 21:52:56 -04:00
Jim Wilson
b4f32d7b12 Fix alpha OSF 1.x/2.x/3.x build problems.
* alpha.h (ARCH_ASM_FILE_START): Define.
	(ASM_FILE_START): Use ARCH_ASM_FILE_START.
	* osf12.h, osf2or3.h (ARCH_ASM_FILE_START): Redefine to null string.

From-SVN: r14884
1997-08-21 17:47:59 -07:00
Jason Merrill
fb52f6de35 release notes
From-SVN: r14883
1997-08-21 20:30:16 -04:00
Jason Merrill
51e3ba163a ignored by import
From-SVN: r14882
1997-08-21 19:14:36 -04:00
Jason Merrill
6599da043e Initial revision
From-SVN: r14877
1997-08-21 18:57:35 -04:00
J"orn Rennecke
8975416cfb lex.c (real_yylex): Don't use getc directly.
Thu Aug 21 22:25:46 1997  J"orn Rennecke <amylaar@cygnus.co.uk>

	* lex.c (real_yylex): Don't use getc directly.

From-SVN: r14876
1997-08-21 18:34:19 -04:00
Jeffrey A Law
f1e182826e Bump version # for new snapshot.
From-SVN: r14874
1997-08-21 14:46:15 -06:00
Jim Wilson
7d11fb7f0c Eliminate circular dependence on f77-runtime that caused build failures.
* Make-lang.in (f77): Delete f77-runtime.
	(f77.all.build, f77.all.cross, f77.rest.encap): Add f77-runtime.

From-SVN: r14873
1997-08-21 13:17:25 -07:00
Jeffrey A Law
ca363bb6c1 * Makefile.in (install-common): Put gcov comment at start of line.
From-SVN: r14871
1997-08-21 10:23:22 -06:00
Mumit Khan
adb0d78cc9 Makefile.in (UOBJ): Include mclock.
* Makefile.in (UOBJ): Include mclock.
From Mumit Khan.

From-SVN: r14870
1997-08-20 23:20:15 -06:00
Jeffrey A Law
7557aa9871 alias.c (init_alias_analysis): When simplifying the reg_base_value array, simplify entries for hard registers too.
* alias.c (init_alias_analysis): When simplifying the reg_base_value
        array, simplify entries for hard registers too.
From jfc.  Fixes c-torture failure on the PA.

From-SVN: r14869
1997-08-20 22:48:46 -06:00
Jason Merrill
49c249e1c8 [multiple changes]
Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* call.c (is_subseq): Don't try to be clever.

Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* parse.y, pt.c: Include "except.h".
	* call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
 	error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
 	lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
 	sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
 	prototyping.

Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* decl2.c (mark_vtable_entries): Instead of replacing pure
	virtuals with a reference to __pure_virtual, copy the decl and
	change the RTL.

From-SVN: r14868
1997-08-20 20:50:39 -04:00
Jim Wilson
177873a521 Fix irix6 `make install' problem.
* intdoc.texi: Readd generated file.

From-SVN: r14867
1997-08-20 16:39:40 -07:00
Jim Wilson
2dcfcb5604 Change gcc3 to egcs.
From-SVN: r14866
1997-08-20 16:17:46 -07:00
Jim Wilson
63d0810bae Change gcc3 reference to egcs.
From-SVN: r14865
1997-08-20 15:14:18 -07:00
Jim Wilson
145856168e Expunge reference to gcc3.
From-SVN: r14864
1997-08-20 14:53:38 -07:00
Dave Love
c34e3ae410 Patch from Dave Love.
* dwarf2.h (enum dwarf_call_frame_info): Remove trailing comma from
	list.

From-SVN: r14862
1997-08-20 12:37:49 -07:00
Jim Wilson
e3eef942f2 stmt.c (start_cleanup_deferal, [...]): Test block_stack before dereferencing it.
* stmt.c (start_cleanup_deferal, end_cleanup_deferal): Test
	block_stack before dereferencing it.

From-SVN: r14861
1997-08-20 12:30:36 -07:00
Michael Meissner
246853b927 Work with haifa renaming get_issue_rate -> ISSUE_RATE
From-SVN: r14858
1997-08-20 19:08:56 +00:00
Jason Merrill
f017f649b4 pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
* pt.c (lookup_nested_type_by_name): Handle typedef wierdness.

	* typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.

From-SVN: r14857
1997-08-19 21:07:33 -04:00
Jason Merrill
04f4195145 * cplus-dem.c: Add 'extern' to prepends_underscore.
From-SVN: r14856
1997-08-19 20:12:54 -04:00
Jason Merrill
fe4e8851ae pt.c (instantiate_class_template): Call repo_template_used before finish_prevtable_vardecl.
* pt.c (instantiate_class_template): Call repo_template_used
	before finish_prevtable_vardecl.

	* call.c: fix typo.

	* ChangeLog: Remove everything from 2.7.2 back.

From-SVN: r14854
1997-08-19 19:31:19 -04:00
Jason Merrill
f62dbf031d merge
From-SVN: r14853
1997-08-19 18:49:24 -04:00
Jason Merrill
da20811c09 merge
From-SVN: r14852
1997-08-19 18:37:19 -04:00
Jeffrey A Law
62d65906d6 haifa-sched.c (ISSUE_RATE): Renamed from MACHINE_issue_rate.
* haifa-sched.c (ISSUE_RATE): Renamed from MACHINE_issue_rate.
        (get_issue_rate): Delete.
        * pa.h (ISSUE_RATE): Define.

From-SVN: r14851
1997-08-19 15:22:04 -06:00
Jeffrey A Law
2da05a5bb8 configure.in: Turn on haifa by default for the PA.
* configure.in: Turn on haifa by default for the PA.
        * configure: Rebuilt.
        * pa.c (override_options): Accept -mschedule=7200 option.
        (pa_adjust_cost): No longer need to scale costs for newer
        processors.
        * pa.h (enum processor_type): Add PROCESSOR_7200.
        * pa.md: Revamp scheduling parameters to work better with
        haifa.  Add scheduling parameters for the 7200.

From-SVN: r14850
1997-08-19 15:09:22 -06:00
Jeffrey A Law
4f64eacaee haifa-sched.c (move_insn): Reemit notes for SCHED_GROUP_P insns too.
* haifa-sched.c (move_insn): Reemit notes for SCHED_GROUP_P
        insns too.
        (schedule_block): When adjusting basic_block_{head,end}, account
        for movement of SCHED_GROUP_P insns too.

        * haifa-sched.c (debug_dependencies): Fix thinko.

From-SVN: r14849
1997-08-19 12:02:21 -06:00
Jeff Law
6182283505 haifa-sched.c: Make lots of variable static.
* haifa-sched.c: Make lots of variable static.
Just cleaning stuff up.

From-SVN: r14848
1997-08-19 10:15:54 -06:00
Jim Wilson
a94ce33311 reload.c (find_reloads): Add code to convert RELOAD_FOR_OPADDR_ADDR reloads to...
* reload.c (find_reloads): Add code to convert RELOAD_FOR_OPADDR_ADDR
        reloads to RELOAD_FOR_OPERAND_ADDRESS reloads.
        * reload1.c: Undo bugfix from Aug 11.
Back out "simple" patch for PA reload bug and install the one accepted
by the FSF.

From-SVN: r14847
1997-08-19 10:04:22 -06:00
H.J. Lu
e9576d2c22 expr.h, real.h: Finish prototyping.
* expr.h, real.h: Finish prototyping.
Some of hj's prototyping stuff after minor formatting fixes.

From-SVN: r14846
1997-08-19 09:51:10 -06:00
Jeffrey A Law
e933cbe007 Makefile.in (EXPECT, [...]): Define.
* Makefile.in (EXPECT, RUNTEST, RUNTESTFLAGS): Define.
        (site.exp, check, check-g++, check-gcc): New targets.
For dejagnu.

From-SVN: r14845
1997-08-19 09:36:20 -06:00
Jeff Law
921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00
Jeff Law
45832e2182 Take out __EGCS__ and __EGCS_MINOR__.
From-SVN: r14839
1997-08-18 21:42:44 -06:00
Mike Meissner
f24b370adf Fix --with-cpu=xxx
From-SVN: r14837
1997-08-18 22:03:38 +00:00
Jim Wilson
1c4c585118 * Makefile.in (stmp-multilib-sub): Fix typo in last change.
From-SVN: r14834
1997-08-18 13:51:37 -07:00
Jeff Law
fcb103abe5 Initial revision
From-SVN: r14831
1997-08-18 11:13:00 -06:00
Jeffrey A Law
c8857babb1 Makefile.in (F77_SRCS): Re-alphabetize.
* Makefile.in (F77_SRCS): Re-alphabetize.
        * Make-lang.in (F77_OBJS): Likewise.
Minor nit from Craig Burley.

From-SVN: r14829
1997-08-18 09:01:55 -06:00
Jeff Law
1404ad5cbc Another haifa typo.
From-SVN: r14828
1997-08-17 20:08:55 -06:00
Jeff Law
4e9633f00b Fix typos in last haifa change.
From-SVN: r14827
1997-08-17 20:06:48 -06:00
Jeff Law
9c0416e03f Remove another reference to expected object file comparison failures.
From-SVN: r14826
1997-08-17 18:21:05 -06:00
Manfred Hollstein
71abb5679c Makefile.in (sub-makes): Pass the current value of LANGUAGES down to sub-makes to avoid building more...
* Makefile.in (sub-makes): Pass the current value of LANGUAGES down
        to sub-makes to avoid building more passes than the user might have
        requested on the command line.
From Manfred Hollstein.

From-SVN: r14825
1997-08-17 17:48:47 -06:00
Jeffrey A Law
ff752ff6c9 INSTALL: Rebuilt.
* INSTALL: Rebuilt.
        * install.texi: Remove "Object File Differences" section.  Remove
        all references to zzz.o failing comparison tests.
        * version.c, version.h: Renamed from zzz.c and zzz.h.  Remove
        date and time stamps so a 3 stage build reports no differences.
        * Make-lang.in: Corresponding changes.
        * Makefile.in: Likewise.
        * g77.c, parse.c: Likewise.
So 3-stage build compares OK.  Rename zzz.[ch] files to version.[ch].

From-SVN: r14824
1997-08-17 17:33:04 -06:00
Dave Love
6042434abc configure.in: Expurgate `broken_install' (install is autoconfed).
* configure.in: Expurgate `broken_install' (install is
        autoconfed).

        * configure.lang: Substitute autoconfed ${INSTALL} (not currently
        relevant).
From Dave love.

From-SVN: r14823
1997-08-17 15:41:59 -06:00
Jeffrey A Law
094420edc0 gcc.c (default_compilers): Add __EGCS__ and __EGCS_MINOR__ predefines.
* gcc.c (default_compilers): Add __EGCS__ and __EGCS_MINOR__
        predefines.

From-SVN: r14822
1997-08-17 15:15:15 -06:00
Jeff Law
e56cc9073b Opps.
From-SVN: r14820
1997-08-17 08:35:06 -06:00
Jeff Law
692214467a * intdoc.texi: Remove generated file from distribution.
From-SVN: r14819
1997-08-17 08:34:23 -06:00
Jeffrey A Law
38ea060fa7 loop.c (is_power_of_2, [...]): Delete unused functions and declarations.
* loop.c (is_power_of_2, is_conditional_branch): Delete unused
        functions and declarations.
        (analyze_loop_iterations): Use condjump_p.
        (insert_bct): Likewise.  Use exact_log2.
Just cleanup up some haifa code.

From-SVN: r14818
1997-08-16 01:09:42 -06:00
Jeffrey A Law
f187056f8a haifa-sched.c (find_post_sched_live): Call FREE_REG_SET as needed.
* haifa-sched.c (find_post_sched_live): Call FREE_REG_SET as needed.
        (schedule_region): Likewise.
        (schedule_insns): Likewise.
To avoid leaking memory.

        * PROJECTS: Update with Haifa stuff.

From-SVN: r14817
1997-08-15 23:49:38 -06:00
Jeffrey A Law
0945e93725 loop.c (is_conditional_branch): Make definition match declaration.
* loop.c (is_conditional_branch): Make definition match declaration.
Found by the sunos compiler

From-SVN: r14815
1997-08-15 14:50:04 -06:00
Jeffrey A Law
11c21791a4 Tweak again.
From-SVN: r14814
1997-08-15 14:38:11 -06:00
Jeffrey A Law
96e87e3e2a Make version # egcs-3.0.0 since we need to make sure the version#s
in the built-in defines are > 2.7.

From-SVN: r14813
1997-08-15 14:26:03 -06:00
Jeffrey A Law
566cfa8175 Makefile.in, [...]: Remove "^L" at the beginning of lines.
* Makefile.in, Make-lang.in: Remove "^L" at the beginning
        of lines.
Some makes don't like them.

From-SVN: r14812
1997-08-15 13:45:17 -06:00
Jeffrey A Law
9af0625405 version.c: Change the version string to look like...
* version.c: Change the version string to look like:
        egcs-1.0.0 970814 (gcc2-970802 experimental).

        * gcc.c: Take out experimental snapshot warning message.

From-SVN: r14811
1997-08-15 12:50:36 -06:00
Michael Meissner
ebc25a17d4 Use rtl macros for names of NOTEs.
From-SVN: r14810
1997-08-15 17:48:56 +00:00
Jeff Law
62603f9e83 Opps. Forgot to commit this.
From-SVN: r14803
1997-08-14 23:40:31 -06:00
Jeff Law
881d7cb9d4 c-lex.c (check_newline): Pass finput again to HANDLE_PRAGMA.
* c-lex.c (check_newline): Pass finput again to HANDLE_PRAGMA.
Bring over from the FSF.

From-SVN: r14802
1997-08-14 23:32:53 -06:00
Jeff Law
5d38efae92 toplev.c (main): In -g handling code, add code to set len.
* toplev.c (main): In -g handling code, add code to set len.

        * alpha.md (extendqihi2): Use HImode not QImode in force_reg call.

Brought over from gcc2.

From-SVN: r14801
1997-08-14 23:29:33 -06:00
Jeff Law
b3261d1fd3 Basically a duplicate of COPYING.
From-SVN: r14800
1997-08-14 23:17:24 -06:00
Jeff Law
37a70e5727 Remove old (pre gcc-2.7.2) ChangeLog files.
Remove pre-built into files.

From-SVN: r14799
1997-08-14 23:15:07 -06:00
Jeff Law
5f0445a70c New file with pointers to compiler relates web sites.
From-SVN: r14784
1997-08-13 10:10:39 -06:00
Doug Evans
992d1248f5 configure.in (haifa configury): Fix typo.
* configure.in (haifa configury): Fix typo.
	* configure: Regenerate.

From-SVN: r14783
1997-08-13 08:04:44 +00:00
Jeffrey A Law
7bb6fbd1c6 version.c: Bump version to "gcc-3.0.0 970802 experimental".
* version.c: Bump version to "gcc-3.0.0 970802 experimental".

        * gcc.info*: Rebuilt.

        * COPYING.g77, README.g77: New files.
        * real.c (ereal_unto_float, ereal_unto_double): New functions.
        * real.h (ereal_unto_float, ereal_unto_double): Declare them.
        (REAL_VALUE_UNTO_TARGET_DOUBLE, REAL_VALUE_UNTO_TARGET_SINGLE): Define.
Get g77 to work with gcc3.

From-SVN: r14776
1997-08-12 11:13:25 -06:00
Jeffrey A Law
8f87a56384 g77.info*: Rebuilt.
* g77.info*: Rebuilt.

        * config-lang.in: Don't demand the backend patch.
        * com.c (lang_printable_name): Second argument is now an int.  Don't
        store into the value of the second argument.
        * top.c (ffe_decode_option): Temporarily disable setting
        of "Toon" loop options until we figure out how to address
        them.

Make g77 work with gcc3.

From-SVN: r14775
1997-08-12 11:12:21 -06:00
Jeff Law
5ff904cd27 Initial revision
From-SVN: r14772
1997-08-12 01:47:32 -06:00
Jeff Law
9f31cf0d42 Remove gratuitous changes from the alias analysis patches.
From-SVN: r14771
1997-08-11 22:12:04 -06:00
Jeffrey A Law
8c660648ca * Integrate Haifa instruction scheduler.
* Integrate regmove pass.
See ChangeLog for deatils.

From-SVN: r14770
1997-08-11 22:07:19 -06:00
Jeffrey A Law
aa32d84158 * Integrate tlink patch from jason@cygnus.com
* gcc.c (SWITCH_TAKES_ARG): Add 'V', 'B' and 'b'.
        (process_command): Increment n_switches for them.  Don't discard
        their args.  Validate them.
        (main): Escape " marks when creating COLLECT_GCC_OPTIONS.
        From Rohan Lenard.
        (process_command): Set include_prefixes from COMPILER_PATH.
        (main): Set COLLECT_GCC_OPTIONS sooner.
        * confiugre.in: Link ../ld/ld.new to collect-ld rather than real-ld.
        * tlink.c, hash.c, hash.h: New files.
        * Makefile.in (USE_COLLECT2): Always use collect2.
        (collect2): Depend on and link in hash.o and tlink.o.
        (tlink.o, hash.o): Add dependencies.

tlink patches from Jason.

From-SVN: r14769
1997-08-11 14:23:53 -06:00
Jeffrey A Law
9ae8ffe751 * Integrate alias analysis changes from jfc@mit.edu
* Makefile.in (OBJS): Add alias.o
        (alias.o): Add dependencies.
        * alias.c: New file.
        * sched.c: Remove alias analysis code.  It lives in alias.c now.
        (reg_last_uses_size): Declare.
        (sched_analyze_2): Add new arguments to true_dependence.
        (sched_analyze_insn): Use reg_last_uses_size instead of max_reg.
        (schedule_block): Initialize reg_last_uses_size.
        (schedule_insns): Always call init_alias_analysis.
        * calls.c (expand_call): Note calls to malloc, calloc, and realloc;
        mark return value from such functions as a pointer and keep track of
        them for alias analysis.  If a return value from a function is a
        pointer, mark it as such.
        * combine.c (distribute_notes): Handle REG_NOALIAS.
        * cse.c (struct write_data): Delete.  No longer needed.
        (invalidate): Don't call set_nonvarying_address_components anymore.
        Use true_dependence to decide if an entry should be removed from
        the hash table.
        (invalidate_memory): Remove WRITES argument, simplify appropriately.
        Fix all callers.
        (note_mem_written): Similarly for WRITE_PTR argument.
        (invalidate_from_clobbers): Similarly for W argument.
        (invalidate_for_call): Remove memory elements from the hash table.
        (refers_to_mem_p, cse_rtx_addr_varies_p): Deleted.
        (cse_rtx_varies_p): New function.  Derived from old
        cse_rtx_addr_varies_p.
        (cse_insn): Remove WRITES_MEMORY and INIT variables and all references.
        Don't call note_mem_written anymore.  Stack pushes invalidate the stack
        pointer if PUSH_ROUNDING is defined.  No longer need to call
        cse_rtx_addr_varies_p to decide if a MEM should be invalidated.
        (skipped_writes_memory): Remove variable.
        (invalidate_skipped_set): Simplify and wewrite to use invalidate_memory.
        (invalidate_skipped_block): Simplify for new alias analysis code.
        (cse_set_around_loop): Likewise.
        (cse_main): Call init_alias_analysis.
        * flags.h (flag_alias_check, flag_argument_noalias): Declare.
        * toplev.c (flag_alias_check, flag_argument_noalias): Define.
        (f_options): Add new alias checking arguments.
        (main): Set flag_alias_check when optimizing.
        * local_alloc (validate_equiv_mem_from_store): Add new arguments
        to true_dependence.
        (memref_referenced_p): Likewise.
        * loop.c (NUM_STORES): Increase to 30.
        (prescan_loop): Only non-constant calls set unknown_address_altered.
        (invariant_p): Add new arguments to true_dependence.
        (record_giv): Initialize unrolled and shared fields.
        (emit_iv_add_mult): Call record_base_value as needed.
        * loop.h (struct induction): Add unrolled and shared fields.
        * unroll.c  (unroll_loop): Call record_base_value as needed.
        (copy_loop_body): Likewise.
        (final_biv_value): Likewise.
        (final_giv_value): Likewise.
        (find_splittable_regs): Likewise.  Only create one new pseudo
        if we have multiple address GIVs that were combined with the same
        dst_reg GIV.  Note when a new register is created due to unrolling.
        * rtl.c (reg_note_name): Add REG_NOALIAS.
        * rtl.h (enum reg_note): Similarly.
        (rtx_varies_p, may_trap_p, side_effects_p): Declare.
        (volatile_refs_p, volatile_insn_p, remove_note): Likewise.
        (note_stores, refers_to_regno_p, reg_overlap_mentioned_p): Likewise.
        (true_dependence, read_dependence, anti_dependence): Likewise.
        (output_dependence, init_alias_analysis, end_alias_analysis): Likewise.
        (mark_user_reg, mark_reg_pointer): Likewise.
jfc's alias analysis code.

From-SVN: r14768
1997-08-11 14:07:24 -06:00
Jeff Law
5fa39bfeb7 * Integrate reload bugfix from Wilson which enables the PA port
to bootstrap again.
        * reload1.c (reload): Sum needs for both OPADDR_ADDR and and
        OPERAND_ADDRESS when computing how many registers an insn needs.
        (reload_reg_free_p): OPADDR_ADDR and OPERAND_ADDRESS reloads do
        conflict.
        (reload_reg_free_before_p): Treat OPERAND_ADDRESS reloads just like
        OPADDR_ADDR reload.
        (reload_reg_reaches_end_p): For RELOAD_FOR_OPADDR_ADDR insns, registers
        in reload_reg_use_in_op_addr do not reach the end.
        do not reach the end.
        (reloads_conflict): RELOAD_FOR_OPADDR_ADDR conflicts with
        RELOAD_FOR_OPERAND_ADDRESS.



Start a new ChangeLog for gcc3.

From-SVN: r14767
1997-08-11 13:31:10 -06:00
1410 changed files with 23137 additions and 929775 deletions

View File

@@ -1,95 +0,0 @@
define pr
set debug_rtx ($)
end
document pr
Print the full structure of the rtx that is $.
Works only when an inferior is executing.
end
define prl
set debug_rtx_list ($, debug_rtx_count)
end
document prl
Print the full structure of all rtx insns beginning at $.
Works only when an inferior is executing.
Uses variable debug_rtx_count to control number of insns printed:
debug_rtx_count > 0: print from $ on.
debug_rtx_count < 0: print a window around $.
There is also debug_rtx_find (rtx, uid) that will scan a list for UID and print
it using debug_rtx_list. Usage example: set $foo=debug_rtx_find(first, 42)
end
define pt
set debug_tree ($)
end
document pt
Print the full structure of the tree that is $.
Works only when an inferior is executing.
end
define ptc
output (enum tree_code) $.common.code
echo \n
end
document ptc
Print the tree-code of the tree node that is $.
end
define pdn
output $.decl.name->identifier.pointer
echo \n
end
document pdn
Print the name of the decl-node that is $.
end
define ptn
output $.type.name->decl.name->identifier.pointer
echo \n
end
document ptn
Print the name of the type-node that is $.
end
define prc
output (enum rtx_code) $.code
echo \ (
output $.mode
echo )\n
end
document prc
Print the rtx-code and machine mode of the rtx that is $.
end
define pi
print $.fld[0].rtx@7
end
document pi
Print the fields of an instruction that is $.
end
define pbs
set print_binding_stack ()
end
document pbs
In cc1plus, print the current binding stack, frame by frame, up to and
including the global binding level.
end
# Don't let abort actually run, as it will make
# stdio stop working and therefore the `pr' command below as well.
b abort
# Make gdb complain about symbol reading errors. This is so that gcc
# developers can see and fix bugs in gcc debug output.
set complaints 20

View File

@@ -1,23 +0,0 @@
If you think you may have found a bug in GNU CC, please
read the Bugs section of the GCC manual for advice on
(1) how to tell when to report a bug,
(2) where to send your bug report, and
(2) how to write a useful bug report and what information
it needs to have.
There are three ways to read the Bugs section.
(1) In a printed copy of the GCC manual. You can order one from the
Free Software Foundation; see the file ORDERS. But if you don't have
a copy on hand and you think you have found a bug, you shouldn't wait
to get a printed manual; you should read the section right away as
described below.
(2) With Info. Start Emacs, do C-h i to enter Info,
then m gcc RET to get to the GCC manual, then m Bugs RET
to get to the section on bugs. Or use standalone Info in
a like manner. (Standalone Info is part of the Texinfo distribution.)
(3) By hand. Search for the chapter "Reporting Bugs" in gcc.texi, or
cat /usr/local/info/gcc* | more "+/^File: emacs, Node: Bugs,"

View File

@@ -1,340 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

819
gcc/NEWS
View File

@@ -1,819 +0,0 @@
Noteworthy changes in GCC version 2.8.0:
The -specs=file switch allows you to override default specs used in invoking
programs like cc1, as, etc.
Options -Wall and -Wimplicit now cause GCC to warn about implicit int
in declarations (e.g. `register i;'), since the C Standard committee
has decided to disallow this in the next revision of the standard.
The following new targets are supported:
Solaris 2.5 running on UltraSPARC's.
The sparclet cpu (a.out file format).
Solaris 2.51 running on PowerPC's.
Linux running on PowerPC's.
Embedded target m32r-elf.
New features for the Hitachi H8/300(H).
-malign-300
-ms
The -ms switch generates code for the Hitachi H8/S processor.
New features for SPARC-based systems:
-mcpu=xxx
-mtune=xxx
-mimpure-text and -mno-impure-text
New features for all rs6000 and PowerPC systems:
-mcpu=604e
-mcpu=801
-mcpu=823
-mtune=xxx
-mupdate
-mno-update
-mfused-madd
-mno-fused-madd
New features for PowerPC-based systems running either System V, Linux, Solaris,
or embedded systems:
-mregnames
-meabi
-mcall-linux
-mcall-solaris
-mcall-sysv-eabi
-mcall-sysv-noeabi
-msdata
-msdata=none
-msdata=default
-msdata=sysv
-msdata=eabi
-memb
-msim
-mmvme
wchar_t is now of type long, not unsigned short as per ABI.
-p/-pg support
-mcpu=403 now implies -mstrict-align.
Options -mno-v8 and -mno-sparclite are no longer supported on SPARC
targets. Options -mcypress, -mv8, -msupersparc, -msparclite, -mf930,
and -mf934 are deprecated and will be deleted in GCC 2.9.
Use -mcpu=xxx instead.
GCC on the PA requires either gas-2.7 or the HP assembler; for best
results using GAS is highly recommended. GAS is required for -g
and exception handling support.
Aix 4.1 GCC targets now default to -mcpu=common so that programs compiled can
be moved between rs6000 and powerpc based systems. A consequence of this is
that -static won't work, and that some programs may be slightly slower.
You can select the default value to use for -mcpu=xxx on rs6000 and powerpc
targets by using the --with-cpu=xxx option when confiuring the compiler. In
addition, a new options, -mtune=xxx was added that selects the machine to
schedule for but does not select the architecture level.
Directory names used for storing the multilib libraries on System V and
embedded PowerPC systems have been shortened to work with commands like tar
that have fixed limits on pathname size.
Noteworthy changes in GCC version 2.7.2:
A few bugs have been fixed (most notably the generation of an
invalid assembler opcode on some RS/6000 systems).
Noteworthy changes in GCC version 2.7.1:
This release fixes numerous bugs (mostly minor) in GCC 2.7.0, but
also contains a few new features, mostly related to specific targets.
Major changes have been made in code to support Windows NT.
The following new targets are supported:
2.9 BSD on PDP-11
Linux on m68k
HP/UX version 10 on HP PA RISC (treated like version 9)
DEC Alpha running Windows NT
When parsing C, GCC now recognizes C++ style `//' comments unless you
specify `-ansi' or `-traditional'.
The PowerPC System V targets (powerpc-*-sysv, powerpc-*-eabi) now use the
calling sequence specified in the System V Application Binary Interface
Processor Supplement (PowerPC Processor ABI Supplement) rather than the calling
sequence used in GCC version 2.7.0. That calling sequence was based on the AIX
calling sequence without function descriptors. To compile code for that older
calling sequence, either configure the compiler for powerpc-*-eabiaix or use
the -mcall-aix switch when compiling and linking.
Noteworthy changes in GCC version 2.7.0:
GCC now works better on systems that use ".obj" and ".exe" instead of
".o" and no extension. This involved changes to the driver program,
gcc.c, to convert ".o" names to ".obj" and to GCC's Makefile to use
".obj" and ".exe" in filenames that are not targets. In order to
build GCC on such systems, you may need versions of GNU make and/or
compatible shells. At this point, this support is preliminary.
Object file extensions of ".obj" and executable file extensions of
".exe" are allowed when using appropriate version of GNU Make.
Numerous enhancements were made to the __attribute__ facility including
more attributes and more places that support it. We now support the
"packed", "nocommon", "noreturn", "volatile", "const", "unused",
"transparent_union", "constructor", "destructor", "mode", "section",
"align", "format", "weak", and "alias" attributes. Each of these
names may also be specified with added underscores, e.g., "__packed__".
__attribute__ may now be applied to parameter definitions, function
definitions, and structure, enum, and union definitions.
GCC now supports returning more structures in registers, as specified by
many calling sequences (ABIs), such as on the HP PA RISC.
A new option '-fpack-struct' was added to automatically pack all structure
members together without holes.
There is a new library (cpplib) and program (cppmain) that at some
point will replace cpp (aka cccp). To use cppmain as cpp now, pass
the option CCCP=cppmain to make. The library is already used by the
fix-header program, which should speed up the fixproto script.
New options for supported targets:
GNU on many targets.
NetBSD on MIPS, m68k, VAX, and x86.
LynxOS on x86, m68k, Sparc, and RS/6000.
VxWorks on many targets.
Windows/NT on x86 architecture. Initial support for Windows/NT on Alpha
(not fully working).
Many embedded targets, specifically UDI on a29k, aout, coff, elf,
and vsta "operating systems" on m68k, m88k, mips, sparc, and x86.
Additional support for x86 (i386, i486, and Pentium):
Work with old and new linkers for Linux-based GNU systems,
supporting both a.out and ELF.
FreeBSD on x86.
Stdcall convention.
-malign-double, -mregparm=, -malign-loops= and -malign-jumps= switches.
On ISC systems, support -Xp like -posix.
Additions for RS/6000:
Instruction scheduling information for PowerPC 403.
AIX 4.1 on PowerPC.
-mstring and -mno-string.
-msoft-float and floating-point emulation included.
Preliminary support for PowerPC System V.4 with or without the GNU as.
Preliminary support for EABI.
Preliminary support for 64-bit systems.
Both big and little endian systems.
New features for MIPS-based systems:
r4650.
mips4 and R8000.
Irix 6.0.
64-bit ABI.
Allow dollar signs in labels on SGI/Irix 5.x.
New support for HP PA RISC:
Generation of PIC (requires binutils-2.5.2.u6 or later).
HP-UX version 9 on HP PA RISC (dynamically links even with -g).
Processor variants for HP PA RISC: 700, 7100, and 7100LC.
Automatic generation of long calls when needed.
-mfast-indirect-calls for kernels and static binaries.
The called routine now copies arguments passed by invisible reference,
as required by the calling standard.
Other new miscellaneous target-specific support:
-mno-multm on a29k.
-mold-align for i960.
Configuration for "semi-hosted" ARM.
-momit-leaf-frame-pointer for M88k.
SH3 variant of Hitachi Super-H and support both big and little endian.
Changes to Objective-C:
Bare-bones implementation of NXConstantString has been added,
which is invoked by the @"string" directive.
Class * has been changed to Class to conform to the NextSTEP and
OpenStep runtime.
Enhancements to make dynamic loading easier.
The module version number has been updated to Version 7, thus existing
code will need to be recompiled to use the current run-time library.
GCC now supports the ISO Normative Addendum 1 to the C Standard.
As a result:
The header <iso646.h> defines macros for C programs written
in national variants of ISO 646.
The following digraph tokens are supported:
<: :> <% %> %: %:%:
These behave like the following, respectively:
[ ] { } # ##
Digraph tokens are supported unless you specify the `-traditional'
option; you do not need to specify `-ansi' or `-trigraphs'. Except
for contrived and unlikely examples involving preprocessor
stringizing, digraph interpretation doesn't change the meaning of
programs; this is unlike trigraph interpretation, which changes the
meanings of relatively common strings.
The macro __STDC_VERSION__ has the value 199409L.
As usual, for full conformance to the standard, you also need a
C library that conforms.
The following lists changes that have been made to g++. If some
features mentioned below sound unfamiliar, you will probably want to
look at the recently-released public review copy of the C++ Working
Paper. For PostScript and PDF (Adobe Acrobat) versions, see the
archive at ftp://research.att.com/dist/stdc++/WP. For HTML and ASCII
versions, see ftp://ftp.cygnus.com/pub/g++. On the web, see
http://www.cygnus.com/~mrs/wp-draft.
The scope of variables declared in the for-init-statement has been changed
to conform to http://www.cygnus.com/~mrs/wp-draft/stmt.html#stmt.for; as a
result, packages such as groff 1.09 will not compile unless you specify the
-fno-for-scope flag. PLEASE DO NOT REPORT THIS AS A BUG; this is a change
mandated by the C++ standardization committee.
Binary incompatibilities:
The builtin 'bool' type is now the size of a machine word on RISC targets,
for code efficiency; it remains one byte long on CISC targets.
Code that does not use #pragma interface/implementation will most
likely shrink dramatically, as g++ now only emits the vtable for a
class in the translation unit where its first non-inline, non-abstract
virtual function is defined.
Classes that do not define the copy constructor will sometimes be
passed and returned in registers. This may illuminate latent bugs in
your code.
Support for automatic template instantiation has *NOT* been added, due
to a disagreement over design philosophies.
Support for exception handling has been improved; more targets are now
supported, and throws will use the RTTI mechanism to match against the
catch parameter type. Optimization is NOT SUPPORTED with
-fhandle-exceptions; no need to report this as a bug.
Support for Run-Time Type Identification has been added with -frtti.
This support is still in alpha; one major restriction is that any file
compiled with -frtti must include <typeinfo.h>.
Preliminary support for namespaces has been added. This support is far
from complete, and probably not useful.
Synthesis of compiler-generated constructors, destructors and
assignment operators is now deferred until the functions are used.
The parsing of expressions such as `a ? b : c = 1' has changed from
`(a ? b : c) = 1' to `a : b ? (c = 1)'.
The code generated for testing conditions, especially those using ||
and &&, is now more efficient.
The operator keywords and, and_eq, bitand, bitor, compl, not, not_eq,
or, or_eq, xor and xor_eq are now supported. Use -ansi or
-foperator-names to enable them.
The 'explicit' keyword is now supported. 'explicit' is used to mark
constructors and type conversion operators that should not be used
implicitly.
g++ now accepts the typename keyword, though it currently has no
semantics; it can be a no-op in the current template implementation.
You may want to start using it in your code, however, since the
pending rewrite of the template implementation to compile STL properly
(perhaps for 2.8.0, perhaps not) will require you to use it as
indicated by the current draft.
Handling of user-defined type conversion has been overhauled so that
type conversion operators are now found and used properly in
expressions and function calls.
-fno-strict-prototype now only applies to function declarations with
"C" linkage.
g++ now warns about 'if (x=0)' with -Wparentheses or -Wall.
#pragma weak and #pragma pack are supported on System V R4 targets, as
are various other target-specific #pragmas supported by gcc.
new and delete of const types is now allowed (with no additional
semantics).
Explicit instantiation of template methods is now supported. Also,
'inline template class foo<int>;' can be used to emit only the vtable
for a template class.
With -fcheck-new, g++ will check the return value of all calls to
operator new, and not attempt to modify a returned null pointer.
The template instantiation code now handles more conversions when
passing to a parameter that does not depend on template arguments.
This means that code like 'string s; cout << s;' now works.
Invalid jumps in a switch statement past declarations that require
initializations are now caught.
Functions declared 'extern inline' now have the same linkage semantics
as inline member functions. On supported targets, where previously
these functions (and vtables, and template instantiations) would have
been defined statically, they will now be defined as weak symbols so
that only one out-of-line definition is used.
collect2 now demangles linker output, and c++filt has become part of
the gcc distribution.
Noteworthy changes in GCC version 2.6.3:
A few more bugs have been fixed.
Noteworthy changes in GCC version 2.6.2:
A few bugs have been fixed.
Names of attributes can now be preceded and followed by double underscores.
Noteworthy changes in GCC version 2.6.1:
Numerous (mostly minor) bugs have been fixed.
The following new configurations are supported:
GNU on x86 (instead of treating it like MACH)
NetBSD on Sparc and Motorola 68k
AIX 4.1 on RS/6000 and PowerPC systems
Sequent DYNUX/ptx 1.x and 2.x.
Both COFF and ELF configurations on AViiON without using /bin/gcc
Windows/NT on x86 architecture; preliminary
AT&T DSP1610 digital signal processor chips
i960 systems on bare boards using COFF
PDP11; target only and not extensively tested
The -pg option is now supported for Alpha under OSF/1 V3.0 or later.
Files with an extension of ".c++" are treated as C++ code.
The -Xlinker and -Wl arguments are now passed to the linker in the
position they were specified on the command line. This makes it
possible, for example, to pass flags to the linker about specific
object files.
The use of positional arguments to the configure script is no longer
recommended. Use --target= to specify the target; see the GCC manual.
The 386 now supports two new switches: -mreg-alloc=<string> changes
the default register allocation order used by the compiler, and
-mno-wide-multiply disables the use of the mul/imul instructions that
produce 64 bit results in EAX:EDX from 32 bit operands to do long long
multiplies and 32-bit division by constants.
Noteworthy changes in GCC version 2.6.0:
Numerous bugs have been fixed, in the C and C++ front-ends, as
well as in the common compiler code.
This release includes the C, Objective-C, and C++ compilers. However,
we have moved the files for the C++ compiler (G++) files to a
subdirectory, cp. Subsequent releases of GCC will split these files
to a separate TAR file.
The G++ team has been tracking the development of the ANSI standard for C++.
Here are some new features added from the latest working paper:
* built-in boolean type 'bool', with constants 'true' and 'false'.
* array new and delete (operator new [] and delete []).
* WP-conforming lifetime of temporaries.
* explicit instantiation of templates (template class A<int>;),
along with an option (-fno-implicit-templates) to disable emission
of implicitly instantiated templates, obsoletes -fexternal-templates.
* static member constants (static const int foo = 4; within the
class declaration).
Many error messages have been improved to tell the user more about the
problem. Conformance checking with -pedantic-errors has been
improved. G++ now compiles Fresco.
There is now an experimental implementation of virtual functions using
thunks instead of Cfront-style vtables, enabled with -fvtable-thunks.
This option also enables a heuristic which causes the compiler to only
emit the vtable in the translation unit where its first non-inline
virtual function is defined; using this option and
-fno-implicit-templates, users should be able to avoid #pragma
interface/implementation altogether.
Signatures have been added as a GNU C++ extension. Using the option
-fhandle-signatures, users are able to turn on recognition of
signatures. A short introduction on signatures is in the section
`Extension to the C++ Language' in the manual.
The `g++' program is now a C program, rather than a shell script.
Lots and lots and lots of bugs fixes, in nested types, access control,
pointers to member functions, the parser, templates, overload
resolution, etc, etc.
There have been two major enhancements to the Objective-C compiler:
1) Added portability. It now runs on Alpha, and some problems with
message forwarding have been addressed on other platforms.
2) Selectors have been redefined to be pointers to structs like:
{ void *sel_id, char *sel_types }, where the sel_id is the unique
identifier, the selector itself is no longer unique.
Programmers should use the new function sel_eq to test selector
equivalence.
The following major changes have been made to the base compiler and
machine-specific files.
- The MIL-STD-1750A is a new port, but still preliminary.
- The h8/300h is now supported; both the h8/300 and h8/300h ports come
with 32 bit IEEE 754 software floating point support.
- The 64-bit Sparc (v9) and 64-bit MIPS chips are supported.
- NetBSD is supported on m68k, Intel x86, and pc523 systems and FreeBSD
on x86.
- COFF is supported on x86, m68k, and Sparc systems running LynxOS.
- 68K systems from Bull and Concurrent are supported and System V
Release 4 is supported on the Atari.
- GCC supports GAS on the Motorola 3300 (sysV68) and debugging
(assuming GAS) on the Plexus 68K system. (However, GAS does not yet
work on those systems).
- System V Release 4 is supported on MIPS (Tandem).
- For DG/UX, an ELF configuration is now supported, and both the ELF
and BCS configurations support ELF and COFF object file formats.
- OSF/1 V2.0 is supported on Alpha.
- Function profiling is also supported on Alpha.
- GAS and GDB is supported for Irix 5 (MIPS).
- "common mode" (code that will run on both POWER and PowerPC
architectures) is now supported for the RS/6000 family; the
compiler knows about more PPC chips.
- Both NeXTStep 2.1 and 3 are supported on 68k-based architectures.
- On the AMD 29k, the -msoft-float is now supported, as well as
-mno-sum-in-toc for RS/6000, -mapp-regs and -mflat for Sparc, and
-membedded-pic for MIPS.
- GCC can now convert division by integer constants into the equivalent
multiplication and shift operations when that is faster than the
division.
- Two new warning options, -Wbad-function-cast and
-Wmissing-declarations have been added.
- Configurations may now add machine-specific __attribute__ options on
type; many machines support the `section' attribute.
- The -ffast-math flag permits some optimization that violate strict
IEEE rules, such as converting X * 0.0 to 0.0.
Noteworthy changes in GCC version 2.5.8:
This release only fixes a few serious bugs. These include fixes for a
bug that prevented most programs from working on the RS/6000, a bug
that caused invalid assembler code for programs with a `switch'
statement on the NS32K, a G++ problem that caused undefined names in
some configurations, and several less serious problems, some of which
can affect most configuration.
Noteworthy change in GCC version 2.5.7:
This release only fixes a few bugs, one of which was causing bootstrap
compare errors on some systems.
Noteworthy change in GCC version 2.5.6:
A few backend bugs have been fixed, some of which only occur on one
machine.
The C++ compiler in 2.5.6 includes:
* fixes for some common crashes
* correct handling of nested types that are referenced as `foo::bar'
* spurious warnings about friends being declared static and never
defined should no longer appear
* enums that are local to a method in a class, or a class that's
local to a function, are now handled correctly. For example:
class foo { void bar () { enum { x, y } E; x; } };
void bar () { class foo { enum { x, y } E; E baz; }; }
Noteworthy change in GCC version 2.5.5:
A large number of C++ bugs have been fixed.
The fixproto script adds prototypes conditionally on __cplusplus.
Noteworthy change in GCC version 2.5.4:
A bug fix in passing of structure arguments for the HP-PA architecture
makes code compiled with GCC 2.5.4 incompatible with code compiled
with earlier versions (if it passes struct arguments of 33 to 64 bits,
interspersed with other types of arguments).
Noteworthy change in gcc version 2.5.3:
The method of "mangling" C++ function names has been changed. So you
must recompile all C++ programs completely when you start using GCC
2.5. Also, GCC 2.5 requires libg++ version 2.5. Earlier libg++
versions won't work with GCC 2.5. (This is generally true--GCC
version M.N requires libg++ version M.N.)
Noteworthy GCC changes in version 2.5:
* There is now support for the IBM 370 architecture as a target.
Currently the only operating system supported is MVS; GCC does not run
on MVS, so you must produce .s files using GCC as a cross compiler,
then transfer them to MVS to assemble them. This port is not reliable
yet.
* The Power PC is now supported.
* The i860-based Paragon machine is now supported.
* The Hitachi 3050 (an HP-PA machine) is now supported.
* The variable __GNUC_MINOR__ holds the minor version number of GCC, as
an integer. For version 2.5.X, the value is 5.
* In C, initializers for static and global variables are now processed
an element at a time, so that they don't need a lot of storage.
* The C syntax for specifying which structure field comes next in an
initializer is now `.FIELDNAME='. The corresponding syntax for
array initializers is now `[INDEX]='. For example,
char whitespace[256]
= { [' '] = 1, ['\t'] = 1, ['\n'] = 1 };
This was changed to accord with the syntax proposed by the Numerical
C Extensions Group (NCEG).
* Complex numbers are now supported in C. Use the keyword __complex__
to declare complex data types. See the manual for details.
* GCC now supports `long double' meaningfully on the Sparc (128-bit
floating point) and on the 386 (96-bit floating point). The Sparc
support is enabled on on Solaris 2.x because earlier system versions
(SunOS 4) have bugs in the emulation.
* All targets now have assertions for cpu, machine and system. So you
can now use assertions to distinguish among all supported targets.
* Nested functions in C may now be inline. Just declare them inline
in the usual way.
* Packed structure members are now supported fully; it should be possible
to access them on any supported target, no matter how little alignment
they have.
* To declare that a function does not return, you must now write
something like this (works only in 2.5):
void fatal () __attribute__ ((noreturn));
or like this (works in older versions too):
typedef void voidfn ();
volatile voidfn fatal;
It used to be possible to do so by writing this:
volatile void fatal ();
but it turns out that ANSI C requires that to mean something
else (which is useless).
Likewise, to declare that a function is side-effect-free
so that calls may be deleted or combined, write
something like this (works only in 2.5):
int computation () __attribute__ ((const));
or like this (works in older versions too):
typedef int intfn ();
const intfn computation;
* The new option -iwithprefixbefore specifies a directory to add to
the search path for include files in the same position where -I would
put it, but uses the specified prefix just like -iwithprefix.
* Basic block profiling has been enhanced to record the function the
basic block comes from, and if the module was compiled for debugging,
the line number and filename. A default version of the basic block
support module has been added to libgcc2 that appends the basic block
information to a text file 'bb.out'. Machine descriptions can now
override the basic block support module in the target macro file.
New features in g++:
* The new flag `-fansi-overloading' for C++. Use a newly implemented
scheme of argument matching for C++. It makes g++ more accurately
obey the rules set down in Chapter 13 of the Annotated C++ Reference
Manual (the ARM). This option will be turned on by default in a
future release.
* The -finline-debug flag is now gone (it was never really used by the
compiler).
* Recognizing the syntax for pointers to members, e.g., "foo::*bar", has been
dramatically improved. You should not get any syntax errors or incorrect
runtime results while using pointers to members correctly; if you do, it's
a definite bug.
* Forward declaration of an enum is now flagged as an error.
* Class-local typedefs are now working properly.
* Nested class support has been significantly improved. The compiler
will now (in theory) support up to 240 nested classes before hitting
other system limits (like memory size).
* There is a new C version of the `g++' driver, to replace the old
shell script. This should significantly improve the performance of
executing g++ on a system where a user's PATH environment variable
references many NFS-mounted filesystems. This driver also works
under MS-DOS and OS/2.
* The ANSI committee working on the C++ standard has adopted a new
keyword `mutable'. This will allow you to make a specific member be
modifiable in an otherwise const class.
Noteworthy GCC changes in version 2.4.4:
A crash building g++ on various hosts (including m68k) has been
fixed. Also the g++ compiler no longer reports incorrect
ambiguities in some situations where they do not exist, and
const template member functions are now being found properly.
Noteworthy GCC changes in version 2.4:
* On each target, the default is now to return short structures
compatibly with the "usual" compiler on that target.
For most targets, this means the default is to return all structures
in memory, like long structures, in whatever way is used on that
target. Use -freg-struct-return to enable returning short structures
(and unions) in registers.
This change means that newly compiled binaries are incompatible with
binaries compiled with previous versions of GCC.
On some targets, GCC is itself the usual compiler. On these targets,
the default way to return short structures is still in registers.
Use -fpcc-struct-return to tell GCC to return them in memory.
* There is now a floating point emulator which can imitate the way all
supported target machines do floating point arithmetic.
This makes it possible to have cross compilation to and from the VAX,
and between machines of different endianness. However, this works
only when the target machine description is updated to use the new
facilities, and not all have been updated.
This also makes possible support for longer floating point types.
GCC 2.4 supports extended format on the 68K if you use `long double',
for targets that have a 68881. (When we have run time library
routines for extended floating point, then `long double' will use
extended format on all 68K targets.)
We expect to support extended floating point on the i386 and Sparc in
future versions.
* Building GCC now automatically fixes the system's header files.
This should require no attention.
* GCC now installs an unsigned data type as size_t when it fixes the
header files (on all but a handful of old target machines).
Therefore, the bug that size_t failed to be unsigned is fixed.
* Building and installation are now completely separate.
All new files are constructed during the build process;
installation just copies them.
* New targets supported: Clipper, Hitachi SH, Hitachi 8300, and Sparc
Lite.
* A totally new and much better Objective C run time system is included.
* Objective C supports many new features. Alas, I can't describe them
since I don't use that language; however, they are the same ones
supported in recent versions of the NeXT operating system.
* The builtin functions __builtin_apply_args, __builtin_apply and
__builtin_return let you record the arguments and returned
value of a function without knowing their number or type.
* The builtin string variables __FUNCTION__ and __PRETTY_FUNCTION__
give the name of the function in the source, and a pretty-printed
version of the name. The two are the same in C, but differ in C++.
* Casts to union types do not yield lvalues.
* ## before an empty rest argument discards the preceding sequence
of non-whitespace characters from the macro definition.
(This feature is subject to change.)
New features specific to C++:
* The manual contains a new section ``Common Misunderstandings with
GNU C++'' that C++ users should read.
* #pragma interface and #pragma implementation let you use the same
C++ source file for both interface and implementation.
However, this mechanism is still in transition.
* Named returned values let you avoid an extra constructor call
when a function result has a class type.
* The C++ operators <? and >? yield min and max, respectively.
* C++ gotos can exit a block safely even if the block has
aggregates that require destructors.
* gcc defines the macro __GNUG__ when compiling C++ programs.
* GNU C++ now correctly distinguishes between the prefix and postfix
forms of overloaded operator ++ and --. To avoid breaking old
code, if a class defines only the prefix form, the compiler
accepts either ++obj or obj++, unless -pedantic is used.
* If you are using version 2.3 of libg++, you need to rebuild it with
`make CC=gcc' to avoid mismatches in the definition of `size_t'.
Newly documented compiler options:
-fnostartfiles
Omit the standard system startup files when linking.
-fvolatile-global
Consider memory references to extern and global data items to
be volatile.
-idirafter DIR
Add DIR to the second include path.
-iprefix PREFIX
Specify PREFIX for later -iwithprefix options.
-iwithprefix DIR
Add PREFIX/DIR to the second include path.
-mv8
Emit Sparc v8 code (with integer multiply and divide).
-msparclite
Emit Sparclite code (roughly v7.5).
-print-libgcc-file-name
Search for the libgcc.a file, print its absolute file name, and exit.
-Woverloaded-virtual
Warn when a derived class function declaration may be an error
in defining a C++ virtual function.
-Wtemplate-debugging
When using templates in a C++ program, warn if debugging is
not yet fully available.
+eN
Control how C++ virtual function definitions are used
(like cfront 1.x).

4003
gcc/ORDERS

File diff suppressed because it is too large Load Diff

View File

@@ -1,117 +0,0 @@
3. When find_reloads is used to count number of spills needed
it does not take into account the fact that a reload may
turn out to be a dummy.
I'm not sure this really happens any more. Doesn't it find
all the dummies on both passes?
10. movl a3@,a0
movl a3@(16),a1
clrb a0@(a1:l)
is generated and may be worse than
movl a3@,a0
addl a3@(16),a0
clrb a0@
If ordering of operands is improved, many more
such cases will be generated from typical array accesses.
38. Hack expand_mult so that if there is no same-modes multiply
it will use a widening multiply and then truncate rather than
calling the library.
39. Hack expanding of division to notice cases for
long -> short division.
40. Represent divide insns as (DIV:SI ...) followed by
a separate lowpart extract. Represent remainder insns as DIV:SI
followed by a separate highpart extract. Then cse can work on
the DIV:SI part. Problem is, this may not be desirable on machines
where computing the quotient alone does not necessarily give
a remainder--such as the 68020 for long operands.
52. Reloading can look at how reload_contents got set up.
If it was copied from a register, just reload from that register.
Otherwise, perhaps can change the previous insn to move the
data via the reload reg, thus avoiding one memory ref.
63. Potential problem in cc_status.value2, if it ever activates itself
after a two-address subtraction (which currently cannot happen).
It is supposed to compare the current value of the destination
but eliminating it would use the results of the subtraction, equivalent
to comparing the previous value of the destination.
65. Should loops that neither start nor end with a break
be rearranged to end with the last break?
69. Define the floating point converting arithmetic instructions
for the 68881.
74. Combine loop opt with cse opt in one pass. Do cse on each loop,
then loop opt on that loop, and go from innermost loops outward.
Make loop invariants available for cse at end of loop.
85. pea can force a value to be reloaded into an areg
which can make it worse than separate adding and pushing.
This can only happen for adding something within addql range
and it only loses if the qty becomes dead at that point
so it can be added to with no copying.
93. If a pseudo doesn't get a hard reg everywhere,
can it get one during a loop?
96. Can do SImode bitfield insns without reloading, but must
alter the operands in special ways.
99. final could check loop-entry branches to see if they
screw up deletion of a test instruction. If they do,
can put another test instruction before the branch and
make it conditional and redirect it.
106. Aliasing may be impossible if data types of refs differ
and data type of containing objects also differ.
(But check this wrt unions.)
108. Can speed up flow analysis by making a table saying which
register is set and which registers are used by each instruction that
only sets one register and only uses two. This way avoid the tree
walk for such instructions (most instructions).
109. It is desirable to avoid converting INDEX to SImode if a
narrower mode suffices, as HImode does on the 68000.
How can this be done?
110. Possible special combination pattern:
If the two operands to a comparison die there and both come from insns
that are identical except for replacing one operand with the other,
throw away those insns. Ok if insns being discarded are known 1 to 1.
An andl #1 after a seq is 1 to 1, but how should compiler know that?
112. Can convert float to unsigned int by subtracting a constant,
converting to signed int, and changing the sign bit.
117. Any number of slow zero-extensions in one loop, that have
their clr insns moved out of the loop, can share one register
if their original life spans are disjoint.
But it may be hard to be sure of this since
the life span data that regscan produces may be hard to interpret
validly or may be incorrect after cse.
118. In cse, when a bfext insn refers to a register, if the field
corresponds to a halfword or a byte and the register is equivalent
to a memory location, it would be possible to detect this and
replace it with a simple memory reference.
121. Insns that store two values cannot be moved out of loops.
The code in scan_loop doesn't even try to deal with them.
122. When insn-output.c turns a bit-test into a sign-test,
it should see whether the cc is already set up with that sign.
123. When a conditional expression is used as a function arg, it would
be faster (and in some cases shorter) to push each alternative rather
than compute in a register and push that. This would require
being able to specify "push this" as a target for expand_expr.
124. On the 386, bad code results from foo (bar ()) when bar
returns a double, because the pseudo used fails to get preferenced
into an fp reg because of the distinction between regs 8 and 9.

View File

@@ -1,448 +0,0 @@
0. Improved efficiency.
* Parse and output array initializers an element at a time, freeing
storage after each, instead of parsing the whole initializer first and
then outputting. This would reduce memory usage for large
initializers.
* See if the techniques describe in Oct 1991 SIGPLAN Notices
(Frazer and Hanson) are applicable to GCC.
1. Better optimization.
* Constants in unused inline functions
It would be nice to delay output of string constants so that string
constants mentioned in unused inline functions are never generated.
Perhaps this would also take care of string constants in dead code.
The difficulty is in finding a clean way for the RTL which refers
to the constant (currently, only by an assembler symbol name)
to point to the constant and cause it to be output.
* More cse
The techniques for doing full global cse are described in the red
dragon book, or (a different version) in Frederick Chow's thesis from
Stanford. It is likely to be slow and use a lot of memory, but it
might be worth offering as an additional option.
It is probably possible to extend cse to a few very frequent cases
without so much expense.
For example, it is not very hard to handle cse through if-then
statements with no else clauses. Here's how to do it. On reaching a
label, notice that the label's use-count is 1 and that the last
preceding jump jumps conditionally to this label. Now you know it
is a simple if-then statement. Remove from the hash table
all the expressions that were entered since that jump insn
and you can continue with cse.
It is probably not hard to handle cse from the end of a loop
around to the beginning, and a few loops would be greatly sped
up by this.
* Optimize a sequence of if statements whose conditions are exclusive.
It is possible to optimize
if (x == 1) ...;
if (x == 2) ...;
if (x == 3) ...;
into
if (x == 1) ...;
else if (x == 2) ...;
else if (x == 3) ...;
provided that x is not altered by the contents of the if statements.
It's not certain whether this is worth doing. Perhaps programmers
nearly always write the else's themselves, leaving few opportunities
to improve anything.
* Un-cse.
Perhaps we should have an un-cse step right after cse, which tries to
replace a reg with its value if the value can be substituted for the
reg everywhere, if that looks like an improvement. Which is if the
reg is used only a few times. Use rtx_cost to determine if the
change is really an improvement.
* Clean up how cse works.
The scheme is that each value has just one hash entry. The
first_same_value and next_same_value chains are no longer needed.
For arithmetic, each hash table elt has the following slots:
* Operation. This is an rtx code.
* Mode.
* Operands 0, 1 and 2. These point to other hash table elements.
So, if we want to enter (PLUS:SI (REG:SI 30) (CONST_INT 104)), we
first enter (CONST_INT 104) and find the entry that (REG:SI 30) now
points to. Then we put these elts into operands 0 and 1 of a new elt.
We put PLUS and SI into the new elt.
Registers and mem refs would never be entered into the table as such.
However, the values they contain would be entered. There would be a
table indexed by regno which points at the hash entry for the value in
that reg.
The hash entry index now plays the role of a qty number.
We still need qty_first_reg, reg_next_eqv, etc. to record which regs
share a particular qty.
When a reg is used whose contents are unknown, we need to create a
hash table entry whose contents say "unknown", as a place holder for
whatever the reg contains. If that reg is added to something, then
the hash entry for the sum will refer to the "unknown" entry. Use
UNKNOWN for the rtx code in this entry. This replaces make_new_qty.
For a constant, a unique hash entry would be made based on the
value of the constant.
What about MEM? Each time a memory address is referenced, we need a
qty (a hash table elt) to represent what is in it. (Just as for a
register.) If this isn't known, create one, just as for a reg whose
contents are unknown.
We need a way to find all mem refs that still contain a certain value.
Do this with a chain of hash elts (for memory addresses) that point to
locations that hold the value. The hash elt for the value itself should
point to the start of the chain. It would be good for the hash elt
for an address to point to the hash elt for the contents of that address
(but this ptr can be null if the contents have never been entered).
With this data structure, nothing need ever be invalidated except
the lists of which regs or mems hold a particular value. It is easy
to see if there is a reg or mem that is equiv to a particular value.
If the value is constant, it is always explicitly constant.
* Support more general tail-recursion among different functions.
This might be possible under certain circumstances, such as when
the argument lists of the functions have the same lengths.
Perhaps it could be done with a special declaration.
You would need to verify in the calling function that it does not
use the addresses of any local variables and does not use setjmp.
* Put short statics vars at low addresses and use short addressing mode?
Useful on the 68000/68020 and perhaps on the 32000 series,
provided one has a linker that works with the feature.
This is said to make a 15% speedup on the 68000.
* Keep global variables in registers.
Here is a scheme for doing this. A global variable, or a local variable
whose address is taken, can be kept in a register for an entire function
if it does not use non-constant memory addresses and (for globals only)
does not call other functions. If the entire function does not meet
this criterion, a loop may.
The VAR_DECL for such a variable would have to have two RTL expressions:
the true home in memory, and the pseudo-register used temporarily.
It is necessary to emit insns to copy the memory location into the
pseudo-register at the beginning of the function or loop, and perhaps
back out at the end. These insns should have REG_EQUIV notes so that,
if the pseudo-register does not get a hard register, it is spilled into
the memory location which exists in any case.
The easiest way to set up these insns is to modify the routine
put_var_into_stack so that it does not apply to the entire function
(sparing any loops which contain nothing dangerous) and to call it at
the end of the function regardless of where in the function the
address of a local variable is taken. It would be called
unconditionally at the end of the function for all relevant global
variables.
For debugger output, the thing to do is to invent a new binding level
around the appropriate loop and define the variable name as a register
variable with that scope.
* Live-range splitting.
Currently a variable is allocated a hard register either for the full
extent of its use or not at all. Sometimes it would be good to
allocate a variable a hard register for just part of a function; for
example, through a particular loop where the variable is mostly used,
or outside of a particular loop where the variable is not used. (The
latter is nice because it might let the variable be in a register most
of the time even though the loop needs all the registers.)
It might not be very hard to do this in global.c when a variable
fails to get a hard register for its entire life span.
The first step is to find a loop in which the variable is live, but
which is not the whole life span or nearly so. It's probably best to
use a loop in which the variable is heavily used.
Then create a new pseudo-register to represent the variable in that loop.
Substitute this for the old pseudo-register there, and insert move insns
to copy between the two at the loop entry and all exits. (When several
such moves are inserted at the same place, some new feature should be
added to say that none of those registers conflict merely because of
overlap between the new moves. And the reload pass should reorder them
so that a store precedes a load, for any given hard register.)
After doing this for all the reasonable candidates, run global-alloc
over again. With luck, one of the two pseudo-registers will be fit
somewhere. It may even have a much higher priority due to its reduced
life span.
There will be no room in general for the new pseudo-registers in
basic_block_live_at_start, so there will need to be a second such
matrix exclusively for the new ones. Various other vectors indexed by
register number will have to be made bigger, or there will have to be
secondary extender vectors just for global-alloc.
A simple new feature could arrange that both pseudo-registers get the
same stack slot if they both fail to get hard registers.
Other compilers split live ranges when they are not connected, or
try to split off pieces `at the edge'. I think splitting around loops
will provide more speedup.
Creating a fake binding block and a new like-named variable with
shorter life span and different address might succeed in describing
this technique for the debugger.
* Detect dead stores into memory?
A store into memory is dead if it is followed by another store into
the same location; and, in between, there is no reference to anything
that might be that location (including no reference to a variable
address).
* Loop optimization.
Strength reduction and iteration variable elimination could be
smarter. They should know how to decide which iteration variables are
not worth making explicit because they can be computed as part of an
address calculation. Based on this information, they should decide
when it is desirable to eliminate one iteration variable and create
another in its place.
It should be possible to compute what the value of an iteration
variable will be at the end of the loop, and eliminate the variable
within the loop by computing that value at the loop end.
When a loop has a simple increment that adds 1,
instead of jumping in after the increment,
decrement the loop count and jump to the increment.
This allows aob insns to be used.
* Using constraints on values.
Many operations could be simplified based on knowledge of the
minimum and maximum possible values of a register at any particular time.
These limits could come from the data types in the tree, via rtl generation,
or they can be deduced from operations that are performed. For example,
the result of an `and' operation one of whose operands is 7 must be in
the range 0 to 7. Compare instructions also tell something about the
possible values of the operand, in the code beyond the test.
Value constraints can be used to determine the results of a further
comparison. They can also indicate that certain `and' operations are
redundant. Constraints might permit a decrement and branch
instruction that checks zeroness to be used when the user has
specified to exit if negative.
* Smarter reload pass.
The reload pass as currently written can reload values only into registers
that are reserved for reloading. This means that in order to use a
register for reloading it must spill everything out of that register.
It would be straightforward, though complicated, for reload1.c to keep
track, during its scan, of which hard registers were available at each
point in the function, and use for reloading even registers that were
free only at the point they were needed. This would avoid much spilling
and make better code.
* Change the type of a variable.
Sometimes a variable is declared as `int', it is assigned only once
from a value of type `char', and then it is used only by comparison
against constants. On many machines, better code would result if
the variable had type `char'. If the compiler could detect this
case, it could change the declaration of the variable and change
all the places that use it.
* Better handling for very sparse switches.
There may be cases where it would be better to compile a switch
statement to use a fixed hash table rather than the current
combination of jump tables and binary search.
* Order of subexpressions.
It might be possible to make better code by paying attention
to the order in which to generate code for subexpressions of an expression.
* More code motion.
Consider hoisting common code up past conditional branches or
tablejumps.
* Trace scheduling.
This technique is said to be able to figure out which way a jump
will usually go, and rearrange the code to make that path the
faster one.
* Distributive law.
The C expression *(X + 4 * (Y + C)) compiles better on certain
machines if rewritten as *(X + 4*C + 4*Y) because of known addressing
modes. It may be tricky to determine when, and for which machines, to
use each alternative.
Some work has been done on this, in combine.c.
* Can optimize by changing if (x) y; else z; into z; if (x) y;
if z and x do not interfere and z has no effects not undone by y.
This is desirable if z is faster than jumping.
* For a two-insn loop on the 68020, such as
foo: movb a2@+,a3@+
jne foo
it is better to insert dbeq d0,foo before the jne.
d0 can be a junk register. The challenge is to fit this into
a portable framework: when can you detect this situation and
still be able to allocate a junk register?
2. Simpler porting.
Right now, describing the target machine's instructions is done
cleanly, but describing its addressing mode is done with several
ad-hoc macro definitions. Porting would be much easier if there were
an RTL description for addressing modes like that for instructions.
Tools analogous to genflags and genrecog would generate macros from
this description.
There would be one pattern in the address-description file for each
kind of addressing, and this pattern would have:
* the RTL expression for the address
* C code to verify its validity (since that may depend on
the exact data).
* C code to print the address in assembler language.
* C code to convert the address into a valid one, if it is not valid.
(This would replace LEGITIMIZE_ADDRESS).
* Register constraints for all indeterminates that appear
in the RTL expression.
3. Other languages.
Front ends for Pascal, Fortran, Algol, Cobol, Modula-2 and Ada are
desirable.
Pascal, Modula-2 and Ada require the implementation of functions
within functions. Some of the mechanisms for this already exist.
4. More extensions.
* Generated unique labels. Have some way of generating distinct labels
for use in extended asm statements. I don't know what a good syntax would
be.
* A way of defining a structure containing a union, in which the choice of
union alternative is controlled by a previous structure component.
Here is a possible syntax for this.
struct foo {
enum { INT, DOUBLE } code;
auto union { case INT: int i; case DOUBLE: double d;} value : code;
};
* Allow constructor expressions as lvalues, like this:
(struct foo) {a, b, c} = foo();
This would call foo, which returns a structure, and then store the
several components of the structure into the variables a, b, and c.
5. Generalize the machine model.
* Some new compiler features may be needed to do a good job on machines
where static data needs to be addressed using base registers.
* Some machines have two stacks in different areas of memory, one used
for scalars and another for large objects. The compiler does not
now have a way to understand this.
6. Useful warnings.
* Warn about statements that are undefined because the order of
evaluation of increment operators makes a big difference. Here is an
example:
*foo++ = hack (*foo);
7. Better documentation of how GCC works and how to port it.
Here is an outline proposed by Allan Adler.
I. Overview of this document
II. The machines on which GCC is implemented
A. Prose description of those characteristics of target machines and
their operating systems which are pertinent to the implementation
of GCC.
i. target machine characteristics
ii. comparison of this system of machine characteristics with
other systems of machine specification currently in use
B. Tables of the characteristics of the target machines on which
GCC is implemented.
C. A priori restrictions on the values of characteristics of target
machines, with special reference to those parts of the source code
which entail those restrictions
i. restrictions on individual characteristics
ii. restrictions involving relations between various characteristics
D. The use of GCC as a cross-compiler
i. cross-compilation to existing machines
ii. cross-compilation to non-existent machines
E. Assumptions which are made regarding the target machine
i. assumptions regarding the architecture of the target machine
ii. assumptions regarding the operating system of the target machine
iii. assumptions regarding software resident on the target machine
iv. where in the source code these assumptions are in effect made
III. A systematic approach to writing the files tm.h and xm.h
A. Macros which require special care or skill
B. Examples, with special reference to the underlying reasoning
IV. A systematic approach to writing the machine description file md
A. Minimal viable sets of insn descriptions
B. Examples, with special reference to the underlying reasoning
V. Uses of the file aux-output.c
VI. Specification of what constitutes correct performance of an
implementation of GCC
A. The components of GCC
B. The itinerary of a C program through GCC
C. A system of benchmark programs
D. What your RTL and assembler should look like with these benchmarks
E. Fine tuning for speed and size of compiled code
VII. A systematic procedure for debugging an implementation of GCC
A. Use of GDB
i. the macros in the file .gdbinit for GCC
ii. obstacles to the use of GDB
a. functions implemented as macros can't be called in GDB
B. Debugging without GDB
i. How to turn off the normal operation of GCC and access specific
parts of GCC
C. Debugging tools
D. Debugging the parser
i. how machine macros and insn definitions affect the parser
E. Debugging the recognizer
i. how machine macros and insn definitions affect the recognizer
ditto for other components
VIII. Data types used by GCC, with special reference to restrictions not
specified in the formal definition of the data type
IX. References to the literature for the algorithms used in GCC

View File

@@ -1,26 +0,0 @@
This directory contains the version 2.7.2 release of the GNU C
compiler. It includes all of the support for compiling C++ and
Objective C, including a run-time library for Objective C.
The GNU C compiler is free software. See the file COPYING for copying
permission.
See the file gcc.texi (together with other files that it includes) for
installation and porting information. The file INSTALL contains a
copy of the installation information, as plain ASCII.
Installing this package will create various files in subdirectories of
/usr/local/lib, which are passes used by the compiler and a library
named libgcc.a. It will also create /usr/local/bin/gcc, which is
the user-level command to do a compilation.
See the Bugs chapter of the GCC Manual for how to report bugs
usefully. An online readable version of the manual is in the files
gcc.info*.
The files pself.c and pself1.c are not part of GCC.
They are programs that print themselves on standard output.
They were written by Dario Dariol and Giovanni Cozzi, and are
included for your hacking pleasure. Likewise pself2.c
(Who is the author of that?) and pself3.c (by Vlad Taeerov and Rashit
Fakhreyev).

View File

@@ -1,144 +0,0 @@
The purpose of GCC pretesting is to verify that the new GCC
distribution, about to be released, works properly on your system *with
no change whatever*, when installed following the precise
recommendations that come with the distribution.
Here are some guidelines on how to do pretesting so as to make it
helpful. All of them follow from common sense together with the
nature of the purpose and the situation.
* It is absolutely vital that you mention even the smallest change or
departure from the standard sources and installation procedure.
Otherwise, you are not testing the same program that I wrote. Testing
a different program is usually of no use whatever. It can even cause
trouble if you fail to tell me that you tested some other program
instead of what I know as GCC. I might think that GCC works, when in
fact it has not been properly tried, and might have a glaring fault.
* Even changing the compilation options counts as a change in the
program. The GCC sources specify which compilation options to use.
Some of them are specified in makefiles, and some in machine-specific
configuration files.
You have ways to override this--but if you do, then you are not
testing what ordinary users will do. Therefore, when pretesting, it
is vital to test with the default compilation options.
(It is okay to test with nonstandard options as well as testing with
the standard ones.)
* The machine and system configuration files of GCC are parts of
GCC. So when you test GCC, you need to do it with the
configuration files that come with GCC.
If GCC does not come with configuration files for a certain machine,
and you test it with configuration files that don't come with GCC,
this is effectively changing GCC. Because the crucial fact about
the planned release is that, without changes, it doesn't work on that
machine.
To make GCC work on that machine, I would need to install new
configuration files. That is not out of the question, since it is
safe--it certainly won't break any other machines that already work.
But you will have to rush me the legal papers to give the FSF
permission to use a large piece of text.
* Look for recommendations for your system.
You can find these recommendations in the Installation node of the
manual, and in the file INSTALL. (These two files have the same text.)
These files say which configuration name to use for your machine, so
use the ones that are recommended. If you guess, you might guess
wrong and encounter spurious difficulties. What's more, if you don't
follow the recommendations then you aren't helping to test that its
recommendations are valid.
These files may describe other things that you need to do to make GCC
work on your machine. If so, you should follow these recommendations
also, for the same reason.
Also look at the Trouble chapter of the manual for items that
pertain to your machine.
* Don't delay sending information.
When you find a problem, please double check it if you can do so
quickly. But don't spend a long time double-checking. A good rule is
always to tell me about every problem on the same day you encounter
it, even if that means you can't find a solution before you report the
problem.
I'd much rather hear about a problem today and a solution tomorrow
than get both of them tomorrow at the same time.
* Make each bug report self-contained.
If you refer back to another message, whether from you or from someone
else, then it will be necessary for anyone who wants to investigate
the bug to find the other message. This may be difficult, it is
probably time-consuming.
To help me save time, simply copy the relevant parts of any previous
messages into your own bug report.
In particular, if I ask you for more information because a bug report
was incomplete, it is best to send me the *entire* collection of
relevant information, all together. If you send just the additional
information, that makes me do extra work. There is even a risk that
I won't remember what question you are sending me the answer to.
* Always be precise when talking about changes you have made. Show
things rather than describing them. Use exact filenames (relative to
the main directory of the distribution), not partial ones. For
example, say "I changed Makefile" rather than "I changed the
makefile". Instead of saying "I defined the MUMBLE macro", send a
diff that shows your change.
* Always use `diff -c' to make diffs. If you don't include context,
it may be hard for me to figure out where you propose to make the
changes. I might have to ignore your patch because I can't tell what
it means.
* When you write a fix, keep in mind that I can't install a change
that would break other systems.
People often suggest fixing a problem by changing machine-independent
files such as toplev.c to do something special that a particular
system needs. Sometimes it is totally obvious that such changes would
break GCC for almost all users. I can't possibly make a change like
that. All I can do is send it back to you and ask you to find a fix
that is safe to install.
Sometimes people send fixes that *might* be an improvement in
general--but it is hard to be sure of this. I can install such
changes some of the time, but not during pretest, when I am trying to
get a new version to work reliably as quickly as possible.
The safest changes for me to install are changes to the configuration
files for a particular machine. At least I know those can't create
bugs on other machines.
* Don't try changing GCC unless it fails to work if you don't change it.
* Don't even suggest changes that would only make GCC cleaner.
Every change I install could introduce a bug, so I won't install
a change unless I see it is necessary.
* If you would like to suggest changes for purposes other than fixing
serious bugs, don't wait till pretest time. Instead, send them just
after I make a release. That's the best time for me to install them.
* In some cases, if you don't follow these guidelines, your
information might still be useful, but I might have to do more work to
make use of it. Unfortunately, I am so far behind in my work that I
just can't get the job done unless you help me to do it efficiently.
Thank you
rms
Local Variables:
mode: text
End:

View File

@@ -1,9 +0,0 @@
This README file is copied into the directory for GCC-only header files
when fixincludes is run by the makefile for GCC.
Many of the files in this directory were made from the standard system
header files of this system by the shell script `fixincludes'.
They are system-specific, and will not work on any other kind of system.
They are also not part of GCC. The reason for making the files here
is to fix the places in the header files which use constructs
that are incompatible with ANSI C.

View File

@@ -1,18 +0,0 @@
Specifying the -g flag to GCC on a RISC iX machine requires upgrading the
standard assembler distributed with both RISC iX 1.1 and RISC iX 1.2 with a
replacement that is available from Acorn. This version of the assembler is
also an order of magnitude faster when assembling to an NFS mounted
file-system.
Users of RISC iX 1.2 and above can obtain a copy of the assembler from the
following places:
1) Via ftp from acorn.acorn.co.uk, directory pub/riscix.
2) From Acorn Customer Services.
3) From Granada Microcare.
Users of versions of RISC iX prior 1.2 should contact Acorn Customer Services;
the assembler available on the net will not work with these versions due to
changes in the shared libraries and system call numbers.

View File

@@ -1,55 +0,0 @@
Since COFF-encapsulation is obsolete, this may not be needed anymore.
Return-Path: <jkp@sauna.hut.fi>
Date: Mon, 10 Apr 89 10:13:45 +0300
From: Jyrki Kuoppala <jkp@sauna.hut.fi>
Sender: jkp@sauna.hut.fi
To: info-gcc@prep.ai.mit.edu
Subject: Kernel fix needed for Altos 3068 to get coff-encapsulation working right
Organization: Helsinki University of Technology, Finland.
Here's a description how to fix a kernel bug in Altos 3068 and get
gcc-compiled programs working.
Author: Jyrki Kuoppala (jkp@cs.hut.fi)
Last modified: Mon Apr 10 09:28:40 1989
There's a bug in the Altos 3068 kernel that causes gcc-compiled
programs to fail in certain situations when the machine has a heavy
load and also in some other situations. The bug exists at least in
SVR 2.2 1.0gT1 and SVR 2.2 1.0e.
If you have source code to your system, apply the following change to
os/exec.c (function gethead):
Change the lines containing
u.u_exdata.ux_tstart = sizeof(struct naout) +
sizeof(struct filhd) + (ep->ef.nscns * sizeof(struct scnhdr));
to
u.u_exdata.ux_tstart = u.u_exdata.ux_txtorg;
If you only have binary, use sdb to find out the address of the
previous lines (on our system it's gethead+0x140) and use your
favourite binary editor to change the bytes '3036 0162 fffc 0002 0280
0000' to '23f9 01fb f4ca 01fb f4c2 6016'. This may or may not work in
your case, depending on the version of the operating system and the
phase of the moon.
Here's what is just before gethead+0x140 to ease finding out the right place:
0x9224 (gethead+0x122): 23f9 01fb f4ca 01fb f4ce mov.l &0x1fbf4ca.L,&0
x1fbf4ce.L []
0x922e (gethead+0x12c): 23f9 01fb f4c6 01fb f4ca mov.l &0x1fbf4c6.L,&0
x1fbf4ca.L []
0x9238 (gethead+0x136): 23f9 01fb f4c2 01fb f4c6 mov.l &0x1fbf4c2.L,&0
x1fbf4c6.L []
Good luck !
//Jyrki
jkp@cs.hut.fi

View File

@@ -1,112 +0,0 @@
README.apollo
Building GCC 2.0 for 680x0 based Apollo systems requires the GNU
assembler (GAS) version 1.38.1, with John Vasta's patches applied.
If you haven't done so yet, get `gas-1.38.1.tar.Z' from your favourite
GNU distribution site. Furthermore, get `apollo-gas-1.38.1.diffs'
from `labrea.stanford.edu:/pub/gnu', apply the patches, compile and
install gas (under the name as). This should go through without any
problems.
After switching into the BSD environment, you can configure GCC 2.0
with the command
% ./configure m68k-apollo-bsd
The Apollo's `/usr/include/setjmp.h' uses a nonstandard `#options()'
construct. You should create a local copy of this file and remove
these constructs from the declarations of SIGSETJMP and SIGLONGJMP.
The Apollo's `/usr/include/sys/types.h' (BSD Version) doesn't allow
to test for the definition of `size_t'. This should be fixed by
#ifndef _SIZE_T
#define _SIZE_T
typedef long size_t;
#endif
The script `patch-apollo-includes' fixes these two problems, but does
_not_ pretend to be a full fledged `fixincludes' for this system.
If you now follow the standard GCC installation instructions, building
GCC 2.0 (including G++ 2.0) should proceed without any problems.
NB: Debugging is not yet supported for the Apollo. If someone wants
to do a _big_ favour to the Apollo users, he/she should consider
porting the Binary File Description library (BFD) to the Apollo.
This library can be found in the gdb-4.x distributions or in the
binutils-1.9x distributions.
#!/bin/sh
# patch-apollo-includes -- fix some (but not all!) Apollo brain damage.
FILES_TO_PATCH='sys/types.h setjmp.h'
mkdir sys
for i in $FILES_TO_PATCH;
do
cp /bsd4.3/usr/include/$i ./$i
done
patch -b -apollo <<'EOP'
*** /bsd4.3/usr/include/sys/types.h Fri Apr 8 20:29:06 1988
--- sys/types.h Wed Feb 26 21:17:57 1992
***************
*** 38,44 ****
--- 38,47 ----
typedef char * caddr_t;
typedef u_long ino_t;
typedef long swblk_t;
+ #ifndef _SIZE_T
+ #define _SIZE_T
typedef long size_t;
+ #endif
typedef long time_t;
typedef long dev_t;
typedef long off_t;
*** /bsd4.3/usr/include/setjmp.h Fri Feb 3 21:40:21 1989
--- setjmp.h Sun Feb 23 19:06:55 1992
***************
*** 24,30 ****
--- 24,39 ----
#endif
+ #ifdef __GNUC__
#ifdef _PROTOTYPES
+ extern int sigsetjmp (sigjmp_buf env, int savemask);
+ extern void siglongjmp (sigjmp_buf env, int val);
+ #else
+ extern int sigsetjmp();
+ extern void siglongjmp();
+ #endif /* _PROTOTYPES */
+ #else /* not __GNUC__ */
+ #ifdef _PROTOTYPES
extern int sigsetjmp(
sigjmp_buf env,
int savemask
***************
*** 37,43 ****
extern int sigsetjmp() #options(abnormal);
extern void siglongjmp() #options(noreturn);
#endif /* _PROTOTYPES */
!
#undef _PROTOTYPES
#ifdef __cplusplus
--- 46,52 ----
extern int sigsetjmp() #options(abnormal);
extern void siglongjmp() #options(noreturn);
#endif /* _PROTOTYPES */
! #endif /* not __GNUC__ */
#undef _PROTOTYPES
#ifdef __cplusplus
EOP
exit 0

View File

@@ -1,574 +0,0 @@
Notes on the GNU Implementation of DWARF Debugging Information
--------------------------------------------------------------
Last Updated: Sun Jul 17 08:17:42 PDT 1994 by rfg@segfault.us.com
------------------------------------------------------------
This file describes special and unique aspects of the GNU implementation
of the DWARF debugging information language, as provided in the GNU version
2.x compiler(s).
For general information about the DWARF debugging information language,
you should obtain the DWARF version 1 specification document (and perhaps
also the DWARF version 2 draft specification document) developed by the
UNIX International Programming Languages Special Interest Group. A copy
of the the DWARF version 1 specification (in PostScript form) may be
obtained either from me <rfg@netcom.com> or from the main Data General
FTP server. (See below.) The file you are looking at now only describes
known deviations from the DWARF version 1 specification, together with
those things which are allowed by the DWARF version 1 specification but
which are known to cause interoperability problems (e.g. with SVR4 SDB).
To obtain a copy of the DWARF Version 1 and/or DWARF Version 2 specification
from Data General's FTP server, use the following procedure:
---------------------------------------------------------------------------
ftp to machine: "dg-rtp.dg.com" (128.222.1.2).
Log in as "ftp".
cd to "plsig"
get any of the following file you are interested in:
dwarf.1.0.3.ps
dwarf.2.0.0.index.ps
dwarf.2.0.0.ps
---------------------------------------------------------------------------
The generation of DWARF debugging information by the GNU version 2.x C
compiler has now been tested rather extensively for m88k, i386, i860, and
Sparc targets. The DWARF output of the GNU C compiler appears to inter-
operate well with the standard SVR4 SDB debugger on these kinds of target
systems (but of course, there are no guarantees).
DWARF generation for the GNU g++ compiler is still not operable. This is
due primarily to the many remaining cases where the g++ front end does not
conform to the conventions used in the GNU C front end for representing
various kinds of declarations in the TREE data structure. It is not clear
at this time how these problems will be addressed.
Future plans for the dwarfout.c module of the GNU compiler(s) includes the
addition of full support for GNU FORTRAN. (This should, in theory, be a
lot simpler to add than adding support for g++... but we'll see.)
Many features of the DWARF version 2 specification have been adapted to
(and used in) the GNU implementation of DWARF (version 1). In most of
these cases, a DWARF version 2 approach is used in place of (or in addition
to) DWARF version 1 stuff simply because it is apparent that DWARF version
1 is not sufficiently expressive to provide the kinds of information which
may be necessary to support really robust debugging. In all of these cases
however, the use of DWARF version 2 features should not interfere in any
way with the interoperability (of GNU compilers) with generally available
"classic" (pre version 1) DWARF consumer tools (e.g. SVR4 SDB).
The DWARF generation enhancement for the GNU compiler(s) was initially
donated to the Free Software Foundation by Network Computing Devices.
(Thanks NCD!) Additional development and maintenance of dwarfout.c has
been largely supported (i.e. funded) by Intel Corporation. (Thanks Intel!)
If you have questions or comments about the DWARF generation feature, please
send mail to me <rfg@netcom.com>. I will be happy to investigate any bugs
reported and I may even provide fixes (but of course, I can make no promises).
The DWARF debugging information produced by GCC may deviate in a few minor
(but perhaps significant) respects from the DWARF debugging information
currently produced by other C compilers. A serious attempt has been made
however to conform to the published specifications, to existing practice,
and to generally accepted norms in the GNU implementation of DWARF.
** IMPORTANT NOTE ** ** IMPORTANT NOTE ** ** IMPORTANT NOTE **
Under normal circumstances, the DWARF information generated by the GNU
compilers (in an assembly language file) is essentially impossible for
a human being to read. This fact can make it very difficult to debug
certain DWARF-related problems. In order to overcome this difficulty,
a feature has been added to dwarfout.c (enabled by the -fverbose-asm
option) which causes additional comments to be placed into the assembly
language output file, out to the right-hand side of most bits of DWARF
material. The comments indicate (far more clearly that the obscure
DWARF hex codes do) what is actually being encoded in DWARF. Thus, the
-fverbose-asm option can be highly useful for those who must study the
DWARF output from the GNU compilers in detail.
---------
(Footnote: Within this file, the term `Debugging Information Entry' will
be abbreviated as `DIE'.)
Release Notes (aka known bugs)
-------------------------------
In one very obscure case involving dynamically sized arrays, the DWARF
"location information" for such an array may make it appear that the
array has been totally optimized out of existence, when in fact it
*must* actually exist. (This only happens when you are using *both* -g
*and* -O.) This is due to aggressive dead store elimination in the
compiler, and to the fact that the DECL_RTL expressions associated with
variables are not always updated to correctly reflect the effects of
GCC's aggressive dead store elimination.
-------------------------------
When attempting to set a breakpoint at the "start" of a function compiled
with -g1, the debugger currently has no way of knowing exactly where the
end of the prologue code for the function is. Thus, for most targets,
all the debugger can do is to set the breakpoint at the AT_low_pc address
for the function. But if you stop there and then try to look at one or
more of the formal parameter values, they may not have been "homed" yet,
so you may get inaccurate answers (or perhaps even addressing errors).
Some people may consider this simply a non-feature, but I consider it a
bug, and I hope to provide some some GNU-specific attributes (on function
DIEs) which will specify the address of the end of the prologue and the
address of the beginning of the epilogue in a future release.
-------------------------------
It is believed at this time that old bugs relating to the AT_bit_offset
values for bit-fields have been fixed.
There may still be some very obscure bugs relating to the DWARF description
of type `long long' bit-fields for target machines (e.g. 80x86 machines)
where the alignment of type `long long' data objects is different from
(and less than) the size of a type `long long' data object.
Please report any problems with the DWARF description of bit-fields as you
would any other GCC bug. (Procedures for bug reporting are given in the
GNU C compiler manual.)
--------------------------------
At this time, GCC does not know how to handle the GNU C "nested functions"
extension. (See the GCC manual for more info on this extension to ANSI C.)
--------------------------------
The GNU compilers now represent inline functions (and inlined instances
thereof) in exactly the manner described by the current DWARF version 2
(draft) specification. The version 1 specification for handling inline
functions (and inlined instances) was known to be brain-damaged (by the
PLSIG) when the version 1 spec was finalized, but it was simply too late
in the cycle to get it removed before the version 1 spec was formally
released to the public (by UI).
--------------------------------
At this time, GCC does not generate the kind of really precise information
about the exact declared types of entities with signed integral types which
is required by the current DWARF draft specification.
Specifically, the current DWARF draft specification seems to require that
the type of an non-unsigned integral bit-field member of a struct or union
type be represented as either a "signed" type or as a "plain" type,
depending upon the the exact set of keywords that were used in the
type specification for the given bit-field member. It was felt (by the
UI/PLSIG) that this distinction between "plain" and "signed" integral types
could have some significance (in the case of bit-fields) because ANSI C
does not constrain the signedness of a plain bit-field, whereas it does
constrain the signedness of an explicitly "signed" bit-field. For this
reason, the current DWARF specification calls for compilers to produce
type information (for *all* integral typed entities... not just bit-fields)
which explicitly indicates the signedness of the relevant type to be
"signed" or "plain" or "unsigned".
Unfortunately, the GNU DWARF implementation is currently incapable of making
such distinctions.
--------------------------------
Known Interoperability Problems
-------------------------------
Although the GNU implementation of DWARF conforms (for the most part) with
the current UI/PLSIG DWARF version 1 specification (with many compatible
version 2 features added in as "vendor specific extensions" just for good
measure) there are a few known cases where GCC's DWARF output can cause
some confusion for "classic" (pre version 1) DWARF consumers such as the
System V Release 4 SDB debugger. These cases are described in this section.
--------------------------------
The DWARF version 1 specification includes the fundamental type codes
FT_ext_prec_float, FT_complex, FT_dbl_prec_complex, and FT_ext_prec_complex.
Since GNU C is only a C compiler (and since C doesn't provide any "complex"
data types) the only one of these fundamental type codes which GCC ever
generates is FT_ext_prec_float. This fundamental type code is generated
by GCC for the `long double' data type. Unfortunately, due to an apparent
bug in the SVR4 SDB debugger, SDB can become very confused wherever any
attempt is made to print a variable, parameter, or field whose type was
given in terms of FT_ext_prec_float.
(Actually, SVR4 SDB fails to understand *any* of the four fundamental type
codes mentioned here. This will fact will cause additional problems when
there is a GNU FORTRAN front-end.)
--------------------------------
In general, it appears that SVR4 SDB is not able to effectively ignore
fundamental type codes in the "implementation defined" range. This can
cause problems when a program being debugged uses the `long long' data
type (or the signed or unsigned varieties thereof) because these types
are not defined by ANSI C, and thus, GCC must use its own private fundamental
type codes (from the implementation-defined range) to represent these types.
--------------------------------
General GNU DWARF extensions
----------------------------
In the current DWARF version 1 specification, no mechanism is specified by
which accurate information about executable code from include files can be
properly (and fully) described. (The DWARF version 2 specification *does*
specify such a mechanism, but it is about 10 times more complicated than
it needs to be so I'm not terribly anxious to try to implement it right
away.)
In the GNU implementation of DWARF version 1, a fully downward-compatible
extension has been implemented which permits the GNU compilers to specify
which executable lines come from which files. This extension places
additional information (about source file names) in GNU-specific sections
(which should be totally ignored by all non-GNU DWARF consumers) so that
this extended information can be provided (to GNU DWARF consumers) in a way
which is totally transparent (and invisible) to non-GNU DWARF consumers
(e.g. the SVR4 SDB debugger). The additional information is placed *only*
in specialized GNU-specific sections, where it should never even be seen
by non-GNU DWARF consumers.
To understand this GNU DWARF extension, imagine that the sequence of entries
in the .lines section is broken up into several subsections. Each contiguous
sequence of .line entries which relates to a sequence of lines (or statements)
from one particular file (either a `base' file or an `include' file) could
be called a `line entries chunk' (LEC).
For each LEC there is one entry in the .debug_srcinfo section.
Each normal entry in the .debug_srcinfo section consists of two 4-byte
words of data as follows:
(1) The starting address (relative to the entire .line section)
of the first .line entry in the relevant LEC.
(2) The starting address (relative to the entire .debug_sfnames
section) of a NUL terminated string representing the
relevant filename. (This filename name be either a
relative or an absolute filename, depending upon how the
given source file was located during compilation.)
Obviously, each .debug_srcinfo entry allows you to find the relevant filename,
and it also points you to the first .line entry that was generated as a result
of having compiled a given source line from the given source file.
Each subsequent .line entry should also be assumed to have been produced
as a result of compiling yet more lines from the same file. The end of
any given LEC is easily found by looking at the first 4-byte pointer in
the *next* .debug_srcinfo entry. That next .debug_srcinfo entry points
to a new and different LEC, so the preceding LEC (implicitly) must have
ended with the last .line section entry which occurs at the 2 1/2 words
just before the address given in the first pointer of the new .debug_srcinfo
entry.
The following picture may help to clarify this feature. Let's assume that
`LE' stands for `.line entry'. Also, assume that `* 'stands for a pointer.
.line section .debug_srcinfo section .debug_sfnames section
----------------------------------------------------------------
LE <---------------------- *
LE * -----------------> "foobar.c" <---
LE |
LE |
LE <---------------------- * |
LE * -----------------> "foobar.h" <| |
LE | |
LE | |
LE <---------------------- * | |
LE * -----------------> "inner.h" | |
LE | |
LE <---------------------- * | |
LE * ------------------------------- |
LE |
LE |
LE |
LE |
LE <---------------------- * |
LE * -----------------------------------
LE
LE
LE
In effect, each entry in the .debug_srcinfo section points to *both* a
filename (in the .debug_sfnames section) and to the start of a block of
consecutive LEs (in the .line section).
Note that just like in the .line section, there are specialized first and
last entries in the .debug_srcinfo section for each object file. These
special first and last entries for the .debug_srcinfo section are very
different from the normal .debug_srcinfo section entries. They provide
additional information which may be helpful to a debugger when it is
interpreting the data in the .debug_srcinfo, .debug_sfnames, and .line
sections.
The first entry in the .debug_srcinfo section for each compilation unit
consists of five 4-byte words of data. The contents of these five words
should be interpreted (by debuggers) as follows:
(1) The starting address (relative to the entire .line section)
of the .line section for this compilation unit.
(2) The starting address (relative to the entire .debug_sfnames
section) of the .debug_sfnames section for this compilation
unit.
(3) The starting address (in the execution virtual address space)
of the .text section for this compilation unit.
(4) The ending address plus one (in the execution virtual address
space) of the .text section for this compilation unit.
(5) The date/time (in seconds since midnight 1/1/70) at which the
compilation of this compilation unit occurred. This value
should be interpreted as an unsigned quantity because gcc
might be configured to generate a default value of 0xffffffff
in this field (in cases where it is desired to have object
files created at different times from identical source files
be byte-for-byte identical). By default, these timestamps
are *not* generated by dwarfout.c (so that object files
compiled at different times will be byte-for-byte identical).
If you wish to enable this "timestamp" feature however, you
can simply place a #define for the symbol `DWARF_TIMESTAMPS'
in your target configuration file and then rebuild the GNU
compiler(s).
Note that the first string placed into the .debug_sfnames section for each
compilation unit is the name of the directory in which compilation occurred.
This string ends with a `/' (to help indicate that it is the pathname of a
directory). Thus, the second word of each specialized initial .debug_srcinfo
entry for each compilation unit may be used as a pointer to the (string)
name of the compilation directory, and that string may in turn be used to
"absolutize" any relative pathnames which may appear later on in the
.debug_sfnames section entries for the same compilation unit.
The fifth and last word of each specialized starting entry for a compilation
unit in the .debug_srcinfo section may (depending upon your configuration)
indicate the date/time of compilation, and this may be used (by a debugger)
to determine if any of the source files which contributed code to this
compilation unit are newer than the object code for the compilation unit
itself. If so, the debugger may wish to print an "out-of-date" warning
about the compilation unit.
The .debug_srcinfo section associated with each compilation will also have
a specialized terminating entry. This terminating .debug_srcinfo section
entry will consist of the following two 4-byte words of data:
(1) The offset, measured from the start of the .line section to
the beginning of the terminating entry for the .line section.
(2) A word containing the value 0xffffffff.
--------------------------------
In the current DWARF version 1 specification, no mechanism is specified by
which information about macro definitions and un-definitions may be provided
to the DWARF consumer.
The DWARF version 2 (draft) specification does specify such a mechanism.
That specification was based on the GNU ("vendor specific extension")
which provided some support for macro definitions and un-definitions,
but the "official" DWARF version 2 (draft) specification mechanism for
handling macros and the GNU implementation have diverged somewhat. I
plan to update the GNU implementation to conform to the "official"
DWARF version 2 (draft) specification as soon as I get time to do that.
Note that in the GNU implementation, additional information about macro
definitions and un-definitions is *only* provided when the -g3 level of
debug-info production is selected. (The default level is -g2 and the
plain old -g option is considered to be identical to -g2.)
GCC records information about macro definitions and undefinitions primarily
in a section called the .debug_macinfo section. Normal entries in the
.debug_macinfo section consist of the following three parts:
(1) A special "type" byte.
(2) A 3-byte line-number/filename-offset field.
(3) A NUL terminated string.
The interpretation of the second and third parts is dependent upon the
value of the leading (type) byte.
The type byte may have one of four values depending upon the type of the
.debug_macinfo entry which follows. The 1-byte MACINFO type codes presently
used, and their meanings are as follows:
MACINFO_start A base file or an include file starts here.
MACINFO_resume The current base or include file ends here.
MACINFO_define A #define directive occurs here.
MACINFO_undef A #undef directive occur here.
(Note that the MACINFO_... codes mentioned here are simply symbolic names
for constants which are defined in the GNU dwarf.h file.)
For MACINFO_define and MACINFO_undef entries, the second (3-byte) field
contains the number of the source line (relative to the start of the current
base source file or the current include files) when the #define or #undef
directive appears. For a MACINFO_define entry, the following string field
contains the name of the macro which is defined, followed by its definition.
Note that the definition is always separated from the name of the macro
by at least one whitespace character. For a MACINFO_undef entry, the
string which follows the 3-byte line number field contains just the name
of the macro which is being undef'ed.
For a MACINFO_start entry, the 3-byte field following the type byte contains
the offset, relative to the start of the .debug_sfnames section for the
current compilation unit, of a string which names the new source file which
is beginning its inclusion at this point. Following that 3-byte field,
each MACINFO_start entry always contains a zero length NUL terminated
string.
For a MACINFO_resume entry, the 3-byte field following the type byte contains
the line number WITHIN THE INCLUDING FILE at which the inclusion of the
current file (whose inclusion ends here) was initiated. Following that
3-byte field, each MACINFO_resume entry always contains a zero length NUL
terminated string.
Each set of .debug_macinfo entries for each compilation unit is terminated
by a special .debug_macinfo entry consisting of a 4-byte zero value followed
by a single NUL byte.
--------------------------------
In the current DWARF draft specification, no provision is made for providing
a separate level of (limited) debugging information necessary to support
tracebacks (only) through fully-debugged code (e.g. code in system libraries).
A proposal to define such a level was submitted (by me) to the UI/PLSIG.
This proposal was rejected by the UI/PLSIG for inclusion into the DWARF
version 1 specification for two reasons. First, it was felt (by the PLSIG)
that the issues involved in supporting a "traceback only" subset of DWARF
were not well understood. Second, and perhaps more importantly, the PLSIG
is already having enough trouble agreeing on what it means to be "conforming"
to the DWARF specification, and it was felt that trying to specify multiple
different *levels* of conformance would only complicate our discussions of
this already divisive issue. Nonetheless, the GNU implementation of DWARF
provides an abbreviated "traceback only" level of debug-info production for
use with fully-debugged "system library" code. This level should only be
used for fully debugged system library code, and even then, it should only
be used where there is a very strong need to conserve disk space. This
abbreviated level of debug-info production can be used by specifying the
-g1 option on the compilation command line.
--------------------------------
As mentioned above, the GNU implementation of DWARF currently uses the DWARF
version 2 (draft) approach for inline functions (and inlined instances
thereof). This is used in preference to the version 1 approach because
(quite simply) the version 1 approach is highly brain-damaged and probably
unworkable.
--------------------------------
GNU DWARF Representation of GNU C Extensions to ANSI C
------------------------------------------------------
The file dwarfout.c has been designed and implemented so as to provide
some reasonable DWARF representation for each and every declarative
construct which is accepted by the GNU C compiler. Since the GNU C
compiler accepts a superset of ANSI C, this means that there are some
cases in which the DWARF information produced by GCC must take some
liberties in improvising DWARF representations for declarations which
are only valid in (extended) GNU C.
In particular, GNU C provides at least three significant extensions to
ANSI C when it comes to declarations. These are (1) inline functions,
and (2) dynamic arrays, and (3) incomplete enum types. (See the GCC
manual for more information on these GNU extensions to ANSI C.) When
used, these GNU C extensions are represented (in the generated DWARF
output of GCC) in the most natural and intuitively obvious ways.
In the case of inline functions, the DWARF representation is exactly as
called for in the DWARF version 2 (draft) specification for an identical
function written in C++; i.e. we "reuse" the representation of inline
functions which has been defined for C++ to support this GNU C extension.
In the case of dynamic arrays, we use the most obvious representational
mechanism available; i.e. an array type in which the upper bound of
some dimension (usually the first and only dimension) is a variable
rather than a constant. (See the DWARF version 1 specification for more
details.)
In the case of incomplete enum types, such types are represented simply
as TAG_enumeration_type DIEs which DO NOT contain either AT_byte_size
attributes or AT_element_list attributes.
--------------------------------
Future Directions
-----------------
The codes, formats, and other paraphernalia necessary to provide proper
support for symbolic debugging for the C++ language are still being worked
on by the UI/PLSIG. The vast majority of the additions to DWARF which will
be needed to completely support C++ have already been hashed out and agreed
upon, but a few small issues (e.g. anonymous unions, access declarations)
are still being discussed. Also, we in the PLSIG are still discussing
whether or not we need to do anything special for C++ templates. (At this
time it is not yet clear whether we even need to do anything special for
these.)
Unfortunately, as mentioned above, there are quite a few problems in the
g++ front end itself, and these are currently responsible for severely
restricting the progress which can be made on adding DWARF support
specifically for the g++ front-end. Furthermore, Richard Stallman has
expressed the view that C++ friendships might not be important enough to
describe (in DWARF). This view directly conflicts with both the DWARF
version 1 and version 2 (draft) specifications, so until this small
misunderstanding is cleared up, DWARF support for g++ is unlikely.
With regard to FORTRAN, the UI/PLSIG has defined what is believed to be a
complete and sufficient set of codes and rules for adequately representing
all of FORTRAN 77, and most of Fortran 90 in DWARF. While some support for
this has been implemented in dwarfout.c, further implementation and testing
will have to await the arrival of the GNU Fortran front-end (which is
currently in early alpha test as of this writing).
GNU DWARF support for other languages (i.e. Pascal and Modula) is a moot
issue until there are GNU front-ends for these other languages.
GNU DWARF support for DWARF version 2 will probably not be attempted until
such time as the version 2 specification is finalized. (More work needs
to be done on the version 2 specification to make the new "abbreviations"
feature of version 2 more easily implementable. Until then, it will be
a royal pain the ass to implement version 2 "abbreviations".) For the
time being, version 2 features will be added (in a version 1 compatible
manner) when and where these features seem necessary or extremely desirable.
As currently defined, DWARF only describes a (binary) language which can
be used to communicate symbolic debugging information from a compiler
through an assembler and a linker, to a debugger. There is no clear
specification of what processing should be (or must be) done by the
assembler and/or the linker. Fortunately, the role of the assembler
is easily inferred (by anyone knowledgeable about assemblers) just by
looking at examples of assembly-level DWARF code. Sadly though, the
allowable (or required) processing steps performed by a linker are
harder to infer and (perhaps) even harder to agree upon. There are
several forms of very useful `post-processing' steps which intelligent
linkers *could* (in theory) perform on object files containing DWARF,
but any and all such link-time transformations are currently both disallowed
and unspecified.
In particular, possible link-time transformations of DWARF code which could
provide significant benefits include (but are not limited to):
Commonization of duplicate DIEs obtained from multiple input
(object) files.
Cross-compilation type checking based upon DWARF type information
for objects and functions.
Other possible `compacting' transformations designed to save disk
space and to reduce linker & debugger I/O activity.

View File

@@ -1,17 +0,0 @@
Compiling Fresco with g++
-----------------------------
Fresco is an evolving interface and toolkit for object-oriented
graphics. A preliminary version (written in C++) was released
with x11r6.
Previous versions of Fresco have not compiled using g++,
partly because of the use of true and false as identifiers.
(They are now reserved words in g++, as required by the
ANSI/ISO draft standard for C++.)
If you get x11r6 with public patch #5 or a later version
of Fresco, these problems should now be fixed.
See http://www.faslab.com/fresco/HomePage.html for information
on Fresco, including how to get the latest version.

View File

@@ -1,130 +0,0 @@
This file describes the implementation notes of the GNU C Compiler for
the National Semiconductor 32032 chip (and 32000 family).
The 32032 machine description and configuration file for this compiler
is, for NS32000 family machine, primarily machine independent.
However, since this release still depends on vendor-supplied
assemblers and linkers, the compiler must obey the existing
conventions of the actual machine to which this compiler is targeted.
In this case, the actual machine which this compiler was targeted to
is a Sequent Balance 8000, running DYNIX 2.1.
The assembler for DYNIX 2.1 (and DYNIX 3.0, alas) does not cope with
the full generality of the addressing mode REGISTER RELATIVE.
Specifically, it generates incorrect code for operands of the
following form:
sym(rn)
Where `rn' is one of the general registers. Correct code is generated
for operands of the form
sym(pn)
where `pn' is one of the special processor registers (sb, fp, or sp).
An equivalent operand can be generated by the form
sym[rn:b]
although this addressing mode is about twice as slow on the 32032.
The more efficient addressing mode is controlled by defining the
constant SEQUENT_ADDRESS_BUG to 0. It is currently defined to be 1.
Another bug in the assembler makes it impossible to compute with
explicit addresses. In order to compute with a symbolic address, it
is necessary to load that address into a register using the "addr"
instruction. For example, it is not possible to say
cmpd _p,@_x
Rather one must say
addr _x,rn
cmpd _p,rn
The ns32032 chip has a number of known bugs. Any attempt to make the
compiler unaware of these deficiencies will surely bring disaster.
The current list of know bugs are as follows (list provided by Richard
Stallman):
1) instructions with two overlapping operands in memory
(unlikely in C code, perhaps impossible).
2) floating point conversion instructions with constant
operands (these may never happen, but I'm not certain).
3) operands crossing a page boundary. These can be prevented
by setting the flag in tm.h that requires strict alignment.
4) Scaled indexing in an insn following an insn that has a read-write
operand in memory. This can be prevented by placing a no-op in
between. I, Michael Tiemann, do not understand what exactly is meant
by `read-write operand in memory'. If this is referring to the special
TOS mode, for example "addd 5,tos" then one need not fear, since this
will never be generated. However, is this includes "addd 5,-4(fp)"
then there is room for disaster. The Sequent compiler does not insert
a no-op for code involving the latter, and I have been informed that
Sequent is aware of this list of bugs, so I must assume that it is not
a problem.
5) The 32032 cannot shift by 32 bits. It shifts modulo the word size
of the operand. Therefore, for 32-bit operations, 32-bit shifts are
interpreted as zero bit shifts. 32-bit shifts have been removed from
the compiler, but future hackers must be careful not to reintroduce
them.
6) The ns32032 is a very slow chip; however, some instructions are
still very much slower than one might expect. For example, it is
almost always faster to double a quantity by adding it to itself than
by shifting it by one, even if that quantity is deep in memory. The
MOVM instruction has a 20-cycle setup time, after which it moves data
at about the speed that normal moves would. It is also faster to use
address generation instructions than shift instructions for left
shifts less than 4. I do not claim that I generate optimal code for all
given patterns, but where I did escape from National's "clean
architecture", I did so because the timing specification from the data
book says that I will win if I do. I suppose this is called the
"performance gap".
Signed bitfield extraction has not been implemented. It is not
provided by the NS32032, and while it is most certainly possible to do
better than the standard shift-left/shift-right sequence, it is also
quite hairy. Also, since signed bitfields do not yet exist in C, this
omission seems relatively harmless.
Zero extractions could be better implemented if it were possible in
GCC to provide sized zero extractions: i.e. a byte zero extraction
would be allowed to yield a byte result. The current implementation
of GCC manifests 68000-ist thinking, where bitfields are extracted
into a register, and automatically sign/zero extended to fill the
register. See comments in ns32k.md around the "extzv" insn for more
details.
It should be noted that while the NS32000 family was designed to
provide odd-aligned addressing capability for multi-byte data (also
provided by the 68020, but not by the 68000 or 68010), many machines
do not opt to take advantage of this. For example, on the sequent,
although there is no advantage to long-word aligning word data, shorts
must be int-aligned in structs. This is an example of another
machine-specific machine dependency.
Because the ns32032 is has a coherent byte-order/bit-order
architecture, many instructions which would be different for
68000-style machines, fold into the same instruction for the 32032.
The classic case is push effective address, where it does not matter
whether one is pushing a long, word, or byte address. They all will
push the same address.
The macro FUNCTION_VALUE_REGNO_P is probably not sufficient, what is
needed is FUNCTION_VALUE_P, which also takes a MODE parameter. In
this way it will be possible to determine more exactly whether a
register is really a function value register, or just one that happens
to look right.

View File

@@ -1,111 +0,0 @@
AIX 3.1 and 3.2 assembler problems
Specifying the -g flag to GCC on the RS/6000 requires upgrading the
standard AIX assembler distributed with AIX 3.1 and versions of AIX
3.2 earlier than 3.2.4 with a replacement that is available from IBM.
Note that Makefile.in specifies the -g when compiling libgcc2.c.
You can test for the presence of a fixed assembler by entering the following:
% as -u < /dev/null
If the command exits normally, the assembler fix already is installed.
If the assembler complains that "-u" is an unknown flag, you need to order
the fix.
If you are running AIX 3.1 (lslpp -h bos.obj output reports
03.01.0005.XXXX where the 0005 can be any higher number and the XXXX
can be any value), call IBM Support at 800-237-5511 and ask for
shipment of AIX/6000 fix PTF U403044 for APAR IX22829 (.extern foo
conflicts with defining foo).
If you are running AIX 3.2 but not 3.2.4 or later (lslpp -h bos.obj
output reports 03.02.0000.0000), a newer update to the assembler fix
is available. Ask for shipment of AIX/6000 fix PTF U416277 for
IX32992 (.global prevents detection of duplicate symbol).
If you are running AIX 3.2.4 or later, you already have the new
assembler.
Any customer can order and get the replacement assembler, and install it on
one or more machines. It is available on diskette from IBM Customer Support
and from the IBM Internet fix anonymous ftp server (FixDist) at
aix.boulder.ibm.com (198.17.57.66).
If you contact IBM Customer Support, they may also ask you for your customer
number. If you do not know it, you will still be able to get the fix, but
you will have to be persistent. IBM has corresponding support organizations
outside of North America. Call your IBM branch office and ask them to put
you in touch with the department that handles fixes for AIX/6000. If that
doesn't work, ask for the department that handles software defect support
for AIX/6000 and ask for the APAR fix.
If you use the GNU assembler instead of the system supplied assembler, you need
an assembler modified after October 16th, 1995 in order to build the GNU C
compiler. This is because the GNU C compiler wants to build a variant of its
library, libgcc.a with the -mcpu=common switch to support building programs
that can run on either the Power or PowerPC machines.
AIX NLS problems
AIX on the RS/6000 provides support (NLS) for environments outside of
the United States. Compilers and assemblers use NLS to support
locale-specific representations of various objects including
floating-point numbers ("." vs "," for separating decimal fractions).
There have been problems reported where the library linked with GCC does
not produce the same floating-point formats that the assembler accepts.
If you have this problem, set the LANG environment variable to "C" or
"En_US".
AIX 3.2.5 XLC-1.3 problems
XLC version 1.3.0.0 distributed with AIX 3.2.5 will miscompile jump.c when
building the stage1 compiler during the bootstrap process. This will cause
GCC to crash and the bootstrap to fail later while compiling libgcc2.c. XLC
version 1.3.0.1 or later fixes this problem. XLC-1.3.0.19 also cannot
bootstrap GCC so please avoid that release as well. You can obtain
XLC-1.3.0.24 by requesting PTF 432238 from IBM, or just ask for the latest
release of XLC-1.3.
There also have been reports of problems bootstrapping GCC with some older
releases of xlc-1.2.1, including xlc-1.2.1.8. Newer releases of xlc-1.2.1
do not exhibit this problem: xlc-1.2.1.28 is known to bootstrap properly.
AIX 3.2 common-mode support
AIX common-mode providing transparent support of both the POWER and PowerPC
architectures is usable in AIX 3.2.3 and above but an export file and
support for hidden export via libc.a will not exist until AIX 4.1. libgcc.a
also must be compiled in common-mode. Note that executables generated for
the POWER (RIOS1 and RSC) architecture will run directly on systems using
the MPC601 chip. Common-mode only improves the performance of a single
executable run on both POWER and PowerPC architecture platforms by not using
POWER- or PowerPC-specific instructions and eliminating the need to trap to
emulation (for POWER instructions run on PowerPC).
To link a common-mode application prior to AIX 4.1 and run it on a system at
AIX level 3.2.3 or above, use the text between the "<>" as an export file
(e.g. milli.exp)
<><><><><><><><><><><>
#!
__mulh 0x3100
__mull 0x3180
__divss 0x3200
__divus 0x3280
__quoss 0x3300
__quous 0x3380
<><><><><><><><><><><>
and then link with -Wl,-bI:milli.exp.
AIX 4.1 binder
Due to changes in the way that GCC invokes the binder (linker) for AIX 4.1,
the link step now may produce warnings of duplicate symbols which were not
reported before. The assembly files generated by GCC for AIX always have
included multiple symbol definitions for certain global variable and
function declarations in the original program. The warnings should not
prevent the linker from producing a correct library or runnable executable.

View File

@@ -1,55 +0,0 @@
This is a partial list of how `gcc -traditional' disagrees with
traditional C compilers (perhaps only some of them). Most of these
differences are not bugs.
---------------------------------------------------------------------------
K&R-1 (2.4.3) says:
"If the character following a backslash is not one of those
specified {in the table above}, the backslash is ignored."
Up until recently, `gcc -traditional' complained about \x \a and \v
appearing in a character or string literal. I believe however that
this non-feature has been eliminated (recently).
---------------------------------------------------------------------------
When in -traditional mode, gcc allows the following erroneous pair of
declarations to appear together in a given scope:
typedef int foo;
typedef foo foo;
---------------------------------------------------------------------------
K&R-1 (8.5) says:
"No field may be wider than a word."
Gcc however allows:
struct S { int i:33; };
---------------------------------------------------------------------------
In K&R-1 there is no restriction against comments crossing include file
boundaries. Gcc however doesn't allow this, even when in -traditional mode.
---------------------------------------------------------------------------
Regarding the length of identifiers, K&R-1 (2.2) says:
"No more than the first eight characters are significant,
although more may be used."
Gcc treats all characters of identifiers as significant, even when in
-traditional mode.
---------------------------------------------------------------------------
K&R-1 (2.2) says:
"An identifier is a sequence of letters and digits; the first
character must be a letter. The underscore _ counts as a letter."
Gcc also allows dollar signs in identifiers. (This may also be an issue
for the -pedantic option.)
---------------------------------------------------------------------------

View File

@@ -1,447 +0,0 @@
[This file contains two alternative recipes for compiling X11 with GCC.
The first alternative puts libgcc.a into the shared X library; the second
does not. Neither alternative works on all kinds of systems.
It may be that when using GCC 2.4, both alternatives work okay on
relatively recent Sparc systems. The first alternative is likely
not to work on a Sun 3 without hardware floating point.]
How to compile X11R5 (patch level 11) with GCC version 2:
The patches include support for building the shared libraries with GCC
2 on the Sparc and 68k machines. This version includes the necessary
parts of libgcc.a in the shared library for X, in case functions in
that library need it. Thus the default behavior is now to build
everything, including the libraries, with gcc.
If you build the shared library this way, it may not work with
executables made with older versions of GCC (2.3.3 and earlier).
If that happens, relink those executables with the latest GCC.
IF YOU THINK YOU MIGHT COMPILE X FOR SOLARIS 2, then you really don't
need this patch: get /contrib/R5.SunOS5.patch.tar.Z from
export.lcs.mit.edu instead. It has everything you need to do the
build for Solaris 2, sets you up to everything with GCC, and is
backward compatible with Sunos 4.*. Get the the README
(/contrib/R5.SunOS5.patch.README at export) for more info.
If you see undefined symbols _dlopen, _dlsym, or _dlclose when linking
with -lX11, compile and link against the file mit/util/misc/dlsym.c in
the MIT X11R5 distribution. Alternatively, do dynamic linking
by using a non-GNU ld.
mit/config/Imake.tmpl -- Do not set -fstrength-reduce if we have GCC 2.
If -fstrength-reduce (or any other -f option) is a major win, then it
will most likely be turned on by -O2 optimization.
mit/config/sunLib.rules -- If HasGcc and GccVersion > 1 are true, then
use gcc -fpic to generate PIC code. Make sure that gcc does not use
gas (the GNU assembler) when compiling PIC code; gas does not assemble
it correctly.
***If you have gas installed where gcc uses it by default, you might have
to add -B/bin/ to the PositionIndependentCFlags.***
mit/config/site.def -- Define GccVersion to be 2.
mit/config/sun.cf -- When compiling with GCC 2, use -O2 optimization.
mit/config/sunLib.rules -- When compiling with GCC 2, use -fpic for
position independent code generation.
mit/rgb/Imakefile -- No longer need to compile some modules with
cc on the Sparc since GCC 2 produces proper -fpcc-struct-return code.
mit/server/os/Imakefile -- Likewise.
mit/server/ddx/sun/Imakefile -- When compiling with GCC 2, some modules
should be compiled with -fvolatile.
mit/clients/twm/Imakefile -- Fix bad decls of malloc, realloc in gram.c.
mit/lib/X/Imakefile -- Make libgcc.a a required lib for libX11.so
*** mit/clients/twm/Imakefile Mon May 17 22:05:22 1993
--- new/clients/twm/Imakefile Mon May 17 22:28:46 1993
***************
*** 32,41 ****
--- 32,48 ----
ComplexProgramTarget(twm)
InstallNonExecFile(system.twmrc,$(TWMDIR))
+ #if HasGcc && GccVersion > 1 && defined (SunArchitecture)
gram.h gram.c: gram.y
yacc $(YFLAGS) gram.y
+ sed -e 's/^extern char \*malloc(), \*realloc();//g' y.tab.c >gram.c
+ $(MV) y.tab.h gram.h
+ #else
+ gram.h gram.c: gram.y
+ yacc $(YFLAGS) gram.y
$(MV) y.tab.c gram.c
$(MV) y.tab.h gram.h
+ #endif
clean::
$(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c deftwmrc.c
*** mit/config/Imake.tmpl Mon May 17 22:02:57 1993
--- new/config/Imake.tmpl Mon May 17 22:15:06 1993
***************
*** 500,506 ****
--- 500,510 ----
#endif
#ifndef CcCmd
#if HasGcc
+ #if GccVersion > 1
+ #define CcCmd gcc -fpcc-struct-return
+ #else
#define CcCmd gcc -fstrength-reduce -fpcc-struct-return
+ #endif
#else
#define CcCmd cc
#endif
*** mit/config/site.def Mon May 17 22:02:44 1993
--- new/config/site.def Mon May 17 22:22:28 1993
***************
*** 25,31 ****
#ifdef BeforeVendorCF
! /* #define HasGcc YES */
#endif /* BeforeVendorCF */
--- 25,33 ----
#ifdef BeforeVendorCF
! #define HasGcc YES
! /* GccVersion > 1 implies building shared libraries with gcc */
! #define GccVersion 2
#endif /* BeforeVendorCF */
*** mit/config/sun.cf Mon May 17 22:03:02 1993
--- new/config/sun.cf Mon May 17 22:24:55 1993
***************
*** 41,49 ****
--- 41,55 ----
#if HasGcc
+ #if GccVersion > 1
+ #define OptimizedCDebugFlags -O2
+ #else
+ #define OptimizedCDebugFlags -O
#define SharedLibraryCcCmd cc
#define ExtraLoadFlags -B/usr/bin/
#define AllocateLocalDefines /**/
+ #endif
+
.c.o:
$(CC) -c $(CFLAGS) $*.c
*** mit/config/sunLib.rules Mon May 17 22:02:46 1993
--- new/config/sunLib.rules Mon May 17 22:19:06 1993
***************
*** 23,29 ****
--- 23,33 ----
#define SharedLibraryLoadFlags -assert pure-text
#endif
#ifndef PositionIndependentCFlags
+ #if defined(HasGcc) && GccVersion > 1
+ #define PositionIndependentCFlags -fpic
+ #else
#define PositionIndependentCFlags -pic
+ #endif
#endif
/*
*** mit/lib/X/Imakefile Mon May 17 22:05:03 1993
--- new/lib/X/Imakefile Mon May 17 22:32:26 1993
***************
*** 9,14 ****
--- 9,31 ----
#define MotifBC NO
#endif
+ #if defined(SunArchitecture)
+ #if SystemV4
+ #if HasGcc
+ REQUIREDLIBS= -lgcc -lc
+ #else
+ REQUIREDLIBS= -lc
+ #endif
+ #else
+ #if HasGcc && GccVersion > 1
+ XCOMM Hack to fix gcc 2 ``-nostdlib'' deficiency on SunOS 4.x
+ REQUIREDLIBS= `gcc -v 2>&1 | awk '{print $$4}' | sed -e 's/specs$$/libgcc.a/'`
+ #else
+ REQUIREDLIBS=
+ #endif
+ #endif
+ #endif
+
#ifndef BuildXimp
#define BuildXimp NO
#endif
*** mit/rgb/Imakefile Mon May 17 22:05:31 1993
--- new/rgb/Imakefile Mon May 17 22:25:30 1993
***************
*** 17,23 ****
#if !(defined(SGIArchitecture) || SystemV4)
DBMLIB = -ldbm
#endif
! #if defined(SparcArchitecture) && HasGcc
CC = cc
CCOPTIONS = /**/
EXTRA_LOAD_FLAGS = /**/
--- 17,23 ----
#if !(defined(SGIArchitecture) || SystemV4)
DBMLIB = -ldbm
#endif
! #if defined(SparcArchitecture) && HasGcc && GccVersion <= 1
CC = cc
CCOPTIONS = /**/
EXTRA_LOAD_FLAGS = /**/
*** mit/server/ddx/sun/Imakefile Mon May 17 22:05:57 1993
--- new/server/ddx/sun/Imakefile Mon May 17 22:27:23 1993
***************
*** 43,48 ****
--- 43,53 ----
LinkFile(sunGX.o,sunGX.o.dist)
#endif
+ #if HasGcc && GccVersion > 1
+ SpecialObjectRule(sunCG2C.o,sunCG2C.c,-fvolatile)
+ SpecialObjectRule(sunCG2M.o,sunCG2M.c,-fvolatile)
+ #endif
+
sunInitExtMono.o: $(ICONFIGFILES)
ObjectFromSpecialSource(sunInitExtMono,../mi/miinitext,-UPEXEXT)
ObjectFromSpecialSource(sunInitMono,sunInit,-DMONO_ONLY)
*** mit/server/os/Imakefile Mon May 17 22:05:46 1993
--- new/server/os/Imakefile Mon May 17 22:26:02 1993
***************
*** 132,138 ****
SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES))
SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES))
SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES))
! #if defined(SparcArchitecture) && HasGcc
oscolor.o: $(ICONFIGFILES)
$(RM) $@
cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c
--- 132,138 ----
SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES))
SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES))
SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES))
! #if defined(SparcArchitecture) && HasGcc && GccVersion <= 1
oscolor.o: $(ICONFIGFILES)
$(RM) $@
cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c
[This is the older version]
How to compile X11R5 (patch level 11) with GCC version 2:
The patches include support for building the shared libraries with GCC 2 on
the Sparc and 68k machines.
NOTE: Such shared libraries built with GCC version 2.3 DID NOT WORK
with executables previously linked using Sun CC! This is because
neither those executables nor the gcc-compiled shared libraries contain
libgcc.a. The shared libraries did work with executables linked using
GCC (running the Sun linker, of course) because GCC tells the linker to
link in libgcc.a. Because of these limitations the default behavior is
to NOT build the shared libraries with gcc.
Changes in GCC 2.4 seem to have eliminated the problem, and such a
shared library now seems work with all executables. If you want the
gcc-compiled shared libraries turn on "Gcc2BuildLibs" in site.def. If
you try this, please tell bug-gcc@prep.ai.mit.edu whether it works.
Sun forgot to include a static version of libdl.a with some versions
of SunOS (4.1 mainly). If you see undefined symbols _dlopen, _dlsym,
or _dlclose when linking with -lX11, compile and link against the file
mit/util/misc/dlsym.c in the MIT X11R5 distribution.
mit/config/Imake.tmpl -- Do not set -fstrength-reduce if we have GCC 2. If
-fstrength-reduce (or any other -f option) is a major win, then it will
most likely be turned on by -O2 optimization.
mit/config/sunLib.rules -- If HasGcc2 and Gcc2BuildLibs are defined, then
use gcc -fpic to generate PIC code. Make sure that gcc does not use gas (the
GNU assembler) when compiling PIC code; gas does not assemble it correctly.
If you have gas installed where gcc uses it by default, you might have to add
-B/bin/ to the PositionIndependentCFlags.
mit/config/site.def -- Define HasGcc2 to be YES.
mit/config/sun.cf -- When compiling with GCC 2, use -O2 optimization.
mit/rgb/Imakefile -- No longer need to compile some modules with
cc on the Sparc since GCC 2 produces proper -fpcc-struct-return code.
mit/server/os/Imakefile -- Likewise.
mit/clients/twm/Imakefile -- fix bad decls of malloc, realloc in gram.c.
*** mit/config/Imake.tmpl.ORIG Tue Dec 31 11:07:56 1991
--- mit/config/Imake.tmpl Tue Dec 31 12:30:47 1991
***************
*** 499,508 ****
--- 499,512 ----
#define HasGcc NO
#endif
#ifndef CcCmd
+ #if HasGcc2
+ #define CcCmd gcc -fpcc-struct-return
+ #else
#if HasGcc
#define CcCmd gcc -fstrength-reduce -fpcc-struct-return
#else
#define CcCmd cc
+ #endif
#endif
#endif
#if HasFortran
*** mit/config/sunLib.rules.ORIG Tue Dec 31 11:11:24 1991
--- mit/config/sunLib.rules Tue May 5 12:26:12 1992
***************
*** 23,30 ****
--- 23,34 ----
#define SharedLibraryLoadFlags -assert pure-text
#endif
#ifndef PositionIndependentCFlags
+ #if defined(HasGcc2) && defined (Gcc2BuildLibs)
+ #define PositionIndependentCFlags -fpic
+ #else
#define PositionIndependentCFlags -pic
#endif
+ #endif
/*
* InstallSharedLibrary - generate rules to install the shared library.
*** mit/config/site.def.ORIG Tue Dec 31 11:13:49 1991
--- mit/config/site.def Tue Dec 31 12:02:59 1991
***************
*** 25,31 ****
#ifdef BeforeVendorCF
! /* #define HasGcc YES */
#endif /* BeforeVendorCF */
--- 25,33 ----
#ifdef BeforeVendorCF
! #define HasGcc YES
! #define HasGcc2 YES
! /* #define Gcc2BuildLibs YES */
#endif /* BeforeVendorCF */
*** mit/config/sun.cf.ORIG Tue Dec 31 11:13:57 1991
--- mit/config/sun.cf Tue May 5 12:29:50 1992
***************
*** 34,42 ****
--- 41,61 ----
#if HasGcc
+ #if defined(HasGcc2)
+ #define OptimizedCDebugFlags -O2
+ /* Leave Alone XXX */
+ #else
+ #define OptimizedCDebugFlags -O
#define SharedLibraryCcCmd cc
#define ExtraLoadFlags -B/usr/bin/
#define AllocateLocalDefines /**/
+ #endif
+
+ #if !defined(Gcc2BuildLibs)
+ #define SharedLibraryCcCmd cc
+ #define ExtraLoadFlags -B/usr/bin/
+ #define AllocateLocalDefines /**/
+ #endif
.c.o:
$(CC) -c $(CFLAGS) $*.c
*** mit/rgb/Imakefile.ORIG Wed Jan 15 16:43:18 1992
--- mit/rgb/Imakefile Thu Jan 2 13:34:09 1992
***************
*** 17,23 ****
#if !(defined(SGIArchitecture) || SystemV4)
DBMLIB = -ldbm
#endif
! #if defined(SparcArchitecture) && HasGcc
CC = cc
CCOPTIONS = /**/
EXTRA_LOAD_FLAGS = /**/
--- 17,23 ----
#if !(defined(SGIArchitecture) || SystemV4)
DBMLIB = -ldbm
#endif
! #if defined(SparcArchitecture) && HasGcc && !defined(HasGcc2)
CC = cc
CCOPTIONS = /**/
EXTRA_LOAD_FLAGS = /**/
*** mit/server/os/Imakefile.ORIG Wed Jan 15 16:46:23 1992
--- mit/server/os/Imakefile Wed Jan 15 16:46:48 1992
***************
*** 132,138 ****
SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES))
SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES))
SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES))
! #if defined(SparcArchitecture) && HasGcc
oscolor.o: $(ICONFIGFILES)
$(RM) $@
cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c
--- 132,138 ----
SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES))
SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES))
SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES))
! #if defined(SparcArchitecture) && HasGcc && !defined(HasGcc2)
oscolor.o: $(ICONFIGFILES)
$(RM) $@
cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c
*** 1.1 1992/09/08 19:52:07
--- mit/server/ddx/sun/Imakefile 1992/09/08 21:10:22
***************
*** 43,48 ****
--- 43,53 ----
LinkFile(sunGX.o,sunGX.o.dist)
#endif
+ #if HasGcc2
+ SpecialObjectRule(sunCG2C.o,sunCG2C.c,-fvolatile)
+ SpecialObjectRule(sunCG2M.o,sunCG2M.c,-fvolatile)
+ #endif
+
sunInitExtMono.o: $(ICONFIGFILES)
ObjectFromSpecialSource(sunInitExtMono,../mi/miinitext,-UPEXEXT)
ObjectFromSpecialSource(sunInitMono,sunInit,-DMONO_ONLY)
*** /tmp/RCSAa24446 Tue Sep 15 12:23:32 1992
--- mit/clients/twm/Imakefile Thu Aug 13 18:18:07 1992
***************
*** 32,41 ****
--- 32,48 ----
ComplexProgramTarget(twm)
InstallNonExecFile(system.twmrc,$(TWMDIR))
+ #if HasGcc2 && defined (SunArchitecture)
gram.h gram.c: gram.y
yacc $(YFLAGS) gram.y
+ sed -e 's/^extern char \*malloc(), \*realloc();//g' y.tab.c >gram.c
+ $(MV) y.tab.h gram.h
+ #else
+ gram.h gram.c: gram.y
+ yacc $(YFLAGS) gram.y
$(MV) y.tab.c gram.c
$(MV) y.tab.h gram.h
+ #endif
clean::
$(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c deftwmrc.c

File diff suppressed because it is too large Load Diff

View File

@@ -1,39 +0,0 @@
This is a collection of things that test suites have
said were "wrong" with GCC--but that I don't agree with.
First, test suites sometimes test for compatibility with
traditional C. GCC with -traditional is not completely
compatible with traditional C, and in some ways I think it
should not be.
* K&R C allowed \x to appear in a string literal (or character
literal?) even in cases where it is *not* followed by a sequence of
hex digits. I'm not convinced this is desirable.
* K&R compilers allow comments to cross over an inclusion boundary (i.e.
started in an include file and ended in the including file).
I think this would be quite ugly and can't imagine it could
be needed.
Sometimes tests disagree with GCC's interpretation of the ANSI standard.
* One test claims that this function should return 1.
enum {A, B} foo;
func (enum {B, A} arg)
{
return B;
}
I think it should return 0, because the definition of B that
applies is the one in func.
* Some tests report failure when the compiler does not produce
an error message for a certain program.
ANSI C requires a "diagnostic" message for certain kinds of invalid
programs, but a warning counts as a diagnostic. If GCC produces
a warning but not an error, that is correct ANSI support.
When test suites call this "failure", the tests are broken.

View File

@@ -1,14 +0,0 @@
/* Include the old config.h as config2.h to simplify the transition
to autoconf. */
#include "config2.h"
/* Whether malloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_MALLOC
/* Whether realloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_REALLOC
/* Whether free must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_FREE
@TOP@

27
gcc/aclocal.m4 vendored
View File

@@ -1,27 +0,0 @@
dnl See whether we need a declaration for a function.
AC_DEFUN(GCC_NEED_DECLARATION,
[AC_MSG_CHECKING([whether $1 must be declared])
AC_CACHE_VAL(gcc_cv_decl_needed_$1,
[AC_TRY_COMPILE([
#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#else
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif],
[char *(*pfn) = (char *(*)) $1],
gcc_cv_decl_needed_$1=no, gcc_cv_decl_needed_$1=yes)])
AC_MSG_RESULT($gcc_cv_decl_needed_$1)
if test $gcc_cv_decl_needed_$1 = yes; then
gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
AC_DEFINE_UNQUOTED($gcc_tr_decl)
fi
])dnl

View File

@@ -1,504 +0,0 @@
/* alloca.c -- allocate automatically reclaimed memory
(Mostly) portable public-domain implementation -- D A Gwyn
This implementation of the PWB library alloca function,
which is used to allocate space off the run-time stack so
that it is automatically reclaimed upon procedure exit,
was inspired by discussions with J. Q. Johnson of Cornell.
J.Otto Tennant <jot@cray.com> contributed the Cray support.
There are some preprocessor constants that can
be defined when compiling for your specific system, for
improved efficiency; however, the defaults should be okay.
The general concept of this implementation is to keep
track of all alloca-allocated blocks, and reclaim any
that are found to be deeper in the stack than the current
invocation. This heuristic does not reclaim storage as
soon as it becomes invalid, but it will do so eventually.
As a special case, alloca(0) reclaims storage without
allocating any. It is a good idea to use alloca(0) in
your main control loop, etc. to force garbage collection. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef emacs
#include "blockinput.h"
#endif
/* If compiling with GCC 2, this file's not needed. */
#if !defined (__GNUC__) || __GNUC__ < 2
/* If someone has defined alloca as a macro,
there must be some other way alloca is supposed to work. */
#ifndef alloca
#ifdef emacs
#ifdef static
/* actually, only want this if static is defined as ""
-- this is for usg, in which emacs must undefine static
in order to make unexec workable
*/
#ifndef STACK_DIRECTION
you
lose
-- must know STACK_DIRECTION at compile-time
#endif /* STACK_DIRECTION undefined */
#endif /* static */
#endif /* emacs */
/* If your stack is a linked list of frames, you have to
provide an "address metric" ADDRESS_FUNCTION macro. */
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
long i00afunc ();
#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
#else
#define ADDRESS_FUNCTION(arg) &(arg)
#endif
#if __STDC__
typedef void *pointer;
#else
typedef char *pointer;
#endif
#ifndef NULL
#define NULL 0
#endif
/* Different portions of Emacs need to call different versions of
malloc. The Emacs executable needs alloca to call xmalloc, because
ordinary malloc isn't protected from input signals. On the other
hand, the utilities in lib-src need alloca to call malloc; some of
them are very simple, and don't have an xmalloc routine.
Non-Emacs programs expect this to call use xmalloc.
Callers below should use malloc. */
#ifndef emacs
#define malloc xmalloc
#endif
extern pointer malloc ();
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#ifndef STACK_DIRECTION
#define STACK_DIRECTION 0 /* Direction unknown. */
#endif
#if STACK_DIRECTION != 0
#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
#else /* STACK_DIRECTION == 0; need run-time code. */
static int stack_dir; /* 1 or -1 once known. */
#define STACK_DIR stack_dir
static void
find_stack_direction ()
{
static char *addr = NULL; /* Address of first `dummy', once known. */
auto char dummy; /* To get stack address. */
if (addr == NULL)
{ /* Initial entry. */
addr = ADDRESS_FUNCTION (dummy);
find_stack_direction (); /* Recurse once. */
}
else
{
/* Second entry. */
if (ADDRESS_FUNCTION (dummy) > addr)
stack_dir = 1; /* Stack grew upward. */
else
stack_dir = -1; /* Stack grew downward. */
}
}
#endif /* STACK_DIRECTION == 0 */
/* An "alloca header" is used to:
(a) chain together all alloca'ed blocks;
(b) keep track of stack depth.
It is very important that sizeof(header) agree with malloc
alignment chunk size. The following default should work okay. */
#ifndef ALIGN_SIZE
#define ALIGN_SIZE sizeof(double)
#endif
typedef union hdr
{
char align[ALIGN_SIZE]; /* To force sizeof(header). */
struct
{
union hdr *next; /* For chaining headers. */
char *deep; /* For stack depth measure. */
} h;
} header;
static header *last_alloca_header = NULL; /* -> last alloca header. */
/* Return a pointer to at least SIZE bytes of storage,
which will be automatically reclaimed upon exit from
the procedure that called alloca. Originally, this space
was supposed to be taken from the current stack frame of the
caller, but that method cannot be made to work for some
implementations of C, for example under Gould's UTX/32. */
pointer
alloca (size)
unsigned size;
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
#if STACK_DIRECTION == 0
if (STACK_DIR == 0) /* Unknown growth direction. */
find_stack_direction ();
#endif
/* Reclaim garbage, defined as all alloca'd storage that
was allocated from deeper in the stack than currently. */
{
register header *hp; /* Traverses linked list. */
#ifdef emacs
BLOCK_INPUT;
#endif
for (hp = last_alloca_header; hp != NULL;)
if ((STACK_DIR > 0 && hp->h.deep > depth)
|| (STACK_DIR < 0 && hp->h.deep < depth))
{
register header *np = hp->h.next;
free ((pointer) hp); /* Collect garbage. */
hp = np; /* -> next header. */
}
else
break; /* Rest are not deeper. */
last_alloca_header = hp; /* -> last valid storage. */
#ifdef emacs
UNBLOCK_INPUT;
#endif
}
if (size == 0)
return NULL; /* No allocation required. */
/* Allocate combined header + user data storage. */
{
register pointer new = malloc (sizeof (header) + size);
/* Address of header. */
if (new == 0)
abort();
((header *) new)->h.next = last_alloca_header;
((header *) new)->h.deep = depth;
last_alloca_header = (header *) new;
/* User storage begins just after header. */
return (pointer) ((char *) new + sizeof (header));
}
}
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
#ifdef DEBUG_I00AFUNC
#include <stdio.h>
#endif
#ifndef CRAY_STACK
#define CRAY_STACK
#ifndef CRAY2
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
struct stack_control_header
{
long shgrow:32; /* Number of times stack has grown. */
long shaseg:32; /* Size of increments to stack. */
long shhwm:32; /* High water mark of stack. */
long shsize:32; /* Current size of stack (all segments). */
};
/* The stack segment linkage control information occurs at
the high-address end of a stack segment. (The stack
grows from low addresses to high addresses.) The initial
part of the stack segment linkage control information is
0200 (octal) words. This provides for register storage
for the routine which overflows the stack. */
struct stack_segment_linkage
{
long ss[0200]; /* 0200 overflow words. */
long sssize:32; /* Number of words in this segment. */
long ssbase:32; /* Offset to stack base. */
long:32;
long sspseg:32; /* Offset to linkage control of previous
segment of stack. */
long:32;
long sstcpt:32; /* Pointer to task common address block. */
long sscsnm; /* Private control structure number for
microtasking. */
long ssusr1; /* Reserved for user. */
long ssusr2; /* Reserved for user. */
long sstpid; /* Process ID for pid based multi-tasking. */
long ssgvup; /* Pointer to multitasking thread giveup. */
long sscray[7]; /* Reserved for Cray Research. */
long ssa0;
long ssa1;
long ssa2;
long ssa3;
long ssa4;
long ssa5;
long ssa6;
long ssa7;
long sss0;
long sss1;
long sss2;
long sss3;
long sss4;
long sss5;
long sss6;
long sss7;
};
#else /* CRAY2 */
/* The following structure defines the vector of words
returned by the STKSTAT library routine. */
struct stk_stat
{
long now; /* Current total stack size. */
long maxc; /* Amount of contiguous space which would
be required to satisfy the maximum
stack demand to date. */
long high_water; /* Stack high-water mark. */
long overflows; /* Number of stack overflow ($STKOFEN) calls. */
long hits; /* Number of internal buffer hits. */
long extends; /* Number of block extensions. */
long stko_mallocs; /* Block allocations by $STKOFEN. */
long underflows; /* Number of stack underflow calls ($STKRETN). */
long stko_free; /* Number of deallocations by $STKRETN. */
long stkm_free; /* Number of deallocations by $STKMRET. */
long segments; /* Current number of stack segments. */
long maxs; /* Maximum number of stack segments so far. */
long pad_size; /* Stack pad size. */
long current_address; /* Current stack segment address. */
long current_size; /* Current stack segment size. This
number is actually corrupted by STKSTAT to
include the fifteen word trailer area. */
long initial_address; /* Address of initial segment. */
long initial_size; /* Size of initial segment. */
};
/* The following structure describes the data structure which trails
any stack segment. I think that the description in 'asdef' is
out of date. I only describe the parts that I am sure about. */
struct stk_trailer
{
long this_address; /* Address of this block. */
long this_size; /* Size of this block (does not include
this trailer). */
long unknown2;
long unknown3;
long link; /* Address of trailer block of previous
segment. */
long unknown5;
long unknown6;
long unknown7;
long unknown8;
long unknown9;
long unknown10;
long unknown11;
long unknown12;
long unknown13;
long unknown14;
};
#endif /* CRAY2 */
#endif /* not CRAY_STACK */
#ifdef CRAY2
/* Determine a "stack measure" for an arbitrary ADDRESS.
I doubt that "lint" will like this much. */
static long
i00afunc (long *address)
{
struct stk_stat status;
struct stk_trailer *trailer;
long *block, size;
long result = 0;
/* We want to iterate through all of the segments. The first
step is to get the stack status structure. We could do this
more quickly and more directly, perhaps, by referencing the
$LM00 common block, but I know that this works. */
STKSTAT (&status);
/* Set up the iteration. */
trailer = (struct stk_trailer *) (status.current_address
+ status.current_size
- 15);
/* There must be at least one stack segment. Therefore it is
a fatal error if "trailer" is null. */
if (trailer == 0)
abort ();
/* Discard segments that do not contain our argument address. */
while (trailer != 0)
{
block = (long *) trailer->this_address;
size = trailer->this_size;
if (block == 0 || size == 0)
abort ();
trailer = (struct stk_trailer *) trailer->link;
if ((block <= address) && (address < (block + size)))
break;
}
/* Set the result to the offset in this segment and add the sizes
of all predecessor segments. */
result = address - block;
if (trailer == 0)
{
return result;
}
do
{
if (trailer->this_size <= 0)
abort ();
result += trailer->this_size;
trailer = (struct stk_trailer *) trailer->link;
}
while (trailer != 0);
/* We are done. Note that if you present a bogus address (one
not in any segment), you will get a different number back, formed
from subtracting the address of the first block. This is probably
not what you want. */
return (result);
}
#else /* not CRAY2 */
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
Determine the number of the cell within the stack,
given the address of the cell. The purpose of this
routine is to linearize, in some sense, stack addresses
for alloca. */
static long
i00afunc (long address)
{
long stkl = 0;
long size, pseg, this_segment, stack;
long result = 0;
struct stack_segment_linkage *ssptr;
/* Register B67 contains the address of the end of the
current stack segment. If you (as a subprogram) store
your registers on the stack and find that you are past
the contents of B67, you have overflowed the segment.
B67 also points to the stack segment linkage control
area, which is what we are really interested in. */
stkl = CRAY_STACKSEG_END ();
ssptr = (struct stack_segment_linkage *) stkl;
/* If one subtracts 'size' from the end of the segment,
one has the address of the first word of the segment.
If this is not the first segment, 'pseg' will be
nonzero. */
pseg = ssptr->sspseg;
size = ssptr->sssize;
this_segment = stkl - size;
/* It is possible that calling this routine itself caused
a stack overflow. Discard stack segments which do not
contain the target address. */
while (!(this_segment <= address && address <= stkl))
{
#ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
#endif
if (pseg == 0)
break;
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
pseg = ssptr->sspseg;
this_segment = stkl - size;
}
result = address - this_segment;
/* If you subtract pseg from the current end of the stack,
you get the address of the previous stack segment's end.
This seems a little convoluted to me, but I'll bet you save
a cycle somewhere. */
while (pseg != 0)
{
#ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o\n", pseg, size);
#endif
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
pseg = ssptr->sspseg;
result += size;
}
return (result);
}
#endif /* not CRAY2 */
#endif /* CRAY */
#endif /* no alloca */
#endif /* not GCC version 2 */

View File

@@ -1,54 +0,0 @@
/* Allow this file to be included multiple times
with different settings of NDEBUG. */
#undef assert
#undef __assert
#ifdef NDEBUG
#define assert(ignore) ((void) 0)
#else
#ifndef __GNUC__
#define assert(expression) \
((void) ((expression) ? 0 : __assert (expression, __FILE__, __LINE__)))
#define __assert(expression, file, lineno) \
(printf ("%s:%u: failed assertion\n", file, lineno), \
abort (), 0)
#else
#if defined(__STDC__) || defined (__cplusplus)
/* Defined in libgcc.a */
#ifdef __cplusplus
extern "C" {
extern void __eprintf (const char *, const char *, unsigned, const char *)
__attribute__ ((noreturn));
}
#else
extern void __eprintf (const char *, const char *, unsigned, const char *)
__attribute__ ((noreturn));
#endif
#define assert(expression) \
((void) ((expression) ? 0 : __assert (#expression, __FILE__, __LINE__)))
#define __assert(expression, file, line) \
(__eprintf ("%s:%u: failed assertion `%s'\n", \
file, line, expression), 0)
#else /* no __STDC__ and not C++; i.e. -traditional. */
extern void __eprintf () __attribute__ ((noreturn)); /* Defined in libgcc.a */
#define assert(expression) \
((void) ((expression) ? 0 : __assert (expression, __FILE__, __LINE__)))
#define __assert(expression, file, lineno) \
(__eprintf ("%s:%u: failed assertion `%s'\n", \
file, lineno, "expression"), 0)
#endif /* no __STDC__ and not C++; i.e. -traditional. */
#endif /* no __GNU__; i.e., /bin/cc. */
#endif

View File

@@ -1,124 +0,0 @@
/* Define control and data flow tables, and regsets.
Copyright (C) 1987, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "bitmap.h"
typedef bitmap regset; /* Head of register set linked list. */
/* Clear a register set by freeing up the linked list. */
#define CLEAR_REG_SET(HEAD) bitmap_clear (HEAD)
/* Copy a register set to another register set. */
#define COPY_REG_SET(TO, FROM) bitmap_copy (TO, FROM)
/* `and' a register set with a second register set. */
#define AND_REG_SET(TO, FROM) bitmap_operation (TO, TO, FROM, BITMAP_AND)
/* `and' the complement of a register set with a register set. */
#define AND_COMPL_REG_SET(TO, FROM) \
bitmap_operation (TO, TO, FROM, BITMAP_AND_COMPL)
/* Inclusive or a register set with a second register set. */
#define IOR_REG_SET(TO, FROM) bitmap_operation (TO, TO, FROM, BITMAP_IOR)
/* Or into TO the register set FROM1 `and'ed with the complement of FROM2. */
#define IOR_AND_COMPL_REG_SET(TO, FROM1, FROM2) \
bitmap_ior_and_compl (TO, FROM1, FROM2)
/* Clear a single register in a register set. */
#define CLEAR_REGNO_REG_SET(HEAD, REG) bitmap_clear_bit (HEAD, REG)
/* Set a single register in a register set. */
#define SET_REGNO_REG_SET(HEAD, REG) bitmap_set_bit (HEAD, REG)
/* Return true if a register is set in a register set. */
#define REGNO_REG_SET_P(TO, REG) bitmap_bit_p (TO, REG)
/* Copy the hard registers in a register set to the hard register set. */
#define REG_SET_TO_HARD_REG_SET(TO, FROM) \
do { \
int i_; \
CLEAR_HARD_REG_SET (TO); \
for (i_ = 0; i_ < FIRST_PSEUDO_REGISTER; i_++) \
if (REGNO_REG_SET_P (FROM, i_)) \
SET_HARD_REG_BIT (TO, i_); \
} while (0)
/* Loop over all registers in REGSET, starting with MIN, setting REGNUM to the
register number and executing CODE for all registers that are set. */
#define EXECUTE_IF_SET_IN_REG_SET(REGSET, MIN, REGNUM, CODE) \
EXECUTE_IF_SET_IN_BITMAP (REGSET, MIN, REGNUM, CODE)
/* Loop over all registers in REGSET1 and REGSET2, starting with MIN, setting
REGNUM to the register number and executing CODE for all registers that are
set in the first regset and not set in the second. */
#define EXECUTE_IF_AND_COMPL_IN_REG_SET(REGSET1, REGSET2, MIN, REGNUM, CODE) \
EXECUTE_IF_AND_COMPL_IN_BITMAP (REGSET1, REGSET2, MIN, REGNUM, CODE)
/* Allocate a register set with oballoc. */
#define OBSTACK_ALLOC_REG_SET(OBSTACK) BITMAP_OBSTACK_ALLOC (OBSTACK)
/* Allocate a register set with alloca. */
#define ALLOCA_REG_SET() BITMAP_ALLOCA ()
/* Do any cleanup needed on a regset when it is no longer used. */
#define FREE_REG_SET(REGSET) BITMAP_FREE(REGSET)
/* Do any one-time initializations needed for regsets. */
#define INIT_ONCE_REG_SET() BITMAP_INIT_ONCE ()
/* Grow any tables needed when the number of registers is calculated
or extended. For the linked list allocation, nothing needs to
be done, other than zero the statistics on the first allocation. */
#define MAX_REGNO_REG_SET(NUM_REGS, NEW_P, RENUMBER_P)
/* Number of basic blocks in the current function. */
extern int n_basic_blocks;
/* Index by basic block number, get first insn in the block. */
extern rtx *basic_block_head;
/* Index by basic block number, get last insn in the block. */
extern rtx *basic_block_end;
/* Index by basic block number, get address of regset
describing the registers live at the start of that block. */
extern regset *basic_block_live_at_start;
/* What registers are live at the setjmp call. */
extern regset regs_live_at_setjmp;
/* Indexed by n, gives number of basic block that (REG n) is used in.
If the value is REG_BLOCK_GLOBAL (-2),
it means (REG n) is used in more than one basic block.
REG_BLOCK_UNKNOWN (-1) means it hasn't been seen yet so we don't know.
This information remains valid for the rest of the compilation
of the current function; it is used to control register allocation. */
#define REG_BLOCK_UNKNOWN -1
#define REG_BLOCK_GLOBAL -2
#define REG_BASIC_BLOCK(N) (reg_n_info[(N)].basic_block)

File diff suppressed because it is too large Load Diff

View File

@@ -1,133 +0,0 @@
/* bc-emit.h - declare entry points for producing object files of bytecodes. */
/* Internal format of symbol table for the object file. */
struct bc_sym
{
/* Private copy separately malloc'd. */
char *name;
/* Symbol has a defined value. */
unsigned int defined:1;
/* Symbol has been globalized. */
unsigned int global:1;
/* Symbol is common. */
unsigned int common:1;
/* Value if defined. */
unsigned long int val;
/* Used in internal symbol table structure. */
struct bc_sym *next;
};
/* List of symbols defined in a particular segment. */
struct bc_segsym
{
struct bc_sym *sym;
struct bc_segsym *next;
};
/* List of relocations needed in a particular segment. */
struct bc_segreloc
{
/* Offset of datum to be relocated. */
unsigned int offset;
/* Symbol to be relocated by. */
struct bc_sym *sym;
struct bc_segreloc *next;
};
/* Segment of an object file. */
struct bc_seg
{
/* Size allocated to contents. */
unsigned int alloc;
/* Pointer to base of contents. */
char *data;
/* Actual size of contents. */
unsigned int size;
/* List of symbols defined in this segment. */
struct bc_segsym *syms;
/* List of relocations for this segment. */
struct bc_segreloc *relocs;
};
/* Anonymous bytecode label within a single function. */
struct bc_label
{
/* Offset of label from start of segment. */
unsigned int offset;
/* True when offset is valid. */
unsigned int defined:1;
/* Unique bytecode ID, used to determine innermost
block containment */
int uid;
/* Next node in list */
struct bc_label *next;
};
/* Reference to a bc_label; a list of all such references is kept for
the function, then when it is finished they are backpatched to
contain the correct values. */
struct bc_labelref
{
/* Label referenced. */
struct bc_label *label;
/* Code offset of reference. */
unsigned int offset;
/* Next labelref in list */
struct bc_labelref *next;
};
extern void bc_initialize();
extern int bc_begin_function();
extern char *bc_emit_trampoline();
extern void bc_emit_bytecode();
extern void bc_emit_bytecode_const();
extern struct bc_label *bc_get_bytecode_label();
extern int bc_emit_bytecode_labeldef();
extern void bc_emit_bytecode_labelref();
extern void bc_emit_code_labelref();
extern char *bc_end_function();
extern void bc_align_const();
extern void bc_emit_const();
extern void bc_emit_const_skip();
extern int bc_emit_const_labeldef();
extern void bc_emit_const_labelref();
extern void bc_align_data();
extern void bc_emit_data();
extern void bc_emit_data_skip();
extern int bc_emit_data_labeldef();
extern void bc_emit_data_labelref();
extern int bc_define_pointer ();
extern int bc_emit_common();
extern void bc_globalize_label();
extern void bc_text();
extern void bc_data();
extern void bc_align();
extern void bc_emit();
extern void bc_emit_skip();
extern int bc_emit_labeldef();
extern void bc_emit_labelref();
extern void bc_write_file();

View File

@@ -1,798 +0,0 @@
/* Bytecode conversion definitions for GNU C-compiler.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "tree.h"
#include "rtl.h"
#include "machmode.h"
#include "obstack.h"
#include "bytecode.h"
#include "bc-typecd.h"
#include "bc-opcode.h"
#include "bc-optab.h"
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
extern char *xmalloc ();
/* Table relating interpreter typecodes to machine modes. */
#define GET_TYPECODE_MODE(CODE) (typecode_mode[((int) CODE)])
enum machine_mode typecode_mode[] = {
#define DEFTYPECODE(CODE, NAME, MODE, TYPE) MODE,
#include "bc-typecd.def"
#undef DEFTYPECODE
};
/* Machine mode to type code map */
static enum typecode signed_mode_to_code_map[MAX_MACHINE_MODE+1];
static enum typecode unsigned_mode_to_code_map[MAX_MACHINE_MODE+1];
#define GET_TYPECODE_SIZE(CODE) GET_MODE_SIZE (GET_TYPECODE_MODE (CODE))
#define BIG_ARBITRARY_NUMBER 100000
/* Table of recipes for conversions among scalar types, to be filled
in as needed at run time. */
static struct conversion_recipe
{
unsigned char *opcodes; /* Bytecodes to emit in order. */
int nopcodes; /* Count of bytecodes. */
int cost; /* A rather arbitrary cost function. */
} conversion_recipe[NUM_TYPECODES][NUM_TYPECODES];
/* Binary operator tables. */
struct binary_operator optab_plus_expr[] = {
{ addSI, SIcode, SIcode, SIcode },
{ addDI, DIcode, DIcode, DIcode },
{ addSF, SFcode, SFcode, SFcode },
{ addDF, DFcode, DFcode, DFcode },
{ addXF, XFcode, XFcode, XFcode },
{ addPSI, Pcode, Pcode, SIcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_minus_expr[] = {
{ subSI, SIcode, SIcode, SIcode },
{ subDI, DIcode, DIcode, DIcode },
{ subSF, SFcode, SFcode, SFcode },
{ subDF, DFcode, DFcode, DFcode },
{ subXF, XFcode, XFcode, XFcode },
{ subPP, SIcode, Pcode, Pcode },
{ -1, -1, -1, -1 },
};
/* The ordering of the tables for multiplicative operators
is such that unsigned operations will be preferred to signed
operations when one argument is unsigned. */
struct binary_operator optab_mult_expr[] = {
{ mulSU, SUcode, SUcode, SUcode },
{ mulDU, DUcode, DUcode, DUcode },
{ mulSI, SIcode, SIcode, SIcode },
{ mulDI, DIcode, DIcode, DIcode },
{ mulSF, SFcode, SFcode, SFcode },
{ mulDF, DFcode, DFcode, DFcode },
{ mulXF, XFcode, XFcode, XFcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_trunc_div_expr[] = {
{ divSU, SUcode, SUcode, SUcode },
{ divDU, DUcode, DUcode, DUcode },
{ divSI, SIcode, SIcode, SIcode },
{ divDI, DIcode, DIcode, DIcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_trunc_mod_expr[] = {
{ modSU, SUcode, SUcode, SUcode },
{ modDU, DUcode, DUcode, DUcode },
{ modSI, SIcode, SIcode, SIcode },
{ modDI, DIcode, DIcode, DIcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_rdiv_expr[] = {
{ divSF, SFcode, SFcode, SFcode },
{ divDF, DFcode, DFcode, DFcode },
{ divXF, XFcode, XFcode, XFcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_bit_and_expr[] = {
{ andSI, SIcode, SIcode, SIcode },
{ andDI, DIcode, DIcode, DIcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_bit_ior_expr[] = {
{ iorSI, SIcode, SIcode, SIcode },
{ iorDI, DIcode, DIcode, DIcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_bit_xor_expr[] = {
{ xorSI, SIcode, SIcode, SIcode },
{ xorDI, DIcode, DIcode, DIcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_lshift_expr[] = {
{ lshiftSI, SIcode, SIcode, SIcode },
{ lshiftSU, SUcode, SUcode, SIcode },
{ lshiftDI, DIcode, DIcode, SIcode },
{ lshiftDU, DUcode, DUcode, SIcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_rshift_expr[] = {
{ rshiftSI, SIcode, SIcode, SIcode },
{ rshiftSU, SUcode, SUcode, SIcode },
{ rshiftDI, DIcode, DIcode, SIcode },
{ rshiftDU, DUcode, DUcode, SIcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_truth_and_expr[] = {
{ andSI, SIcode, Tcode, Tcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_truth_or_expr[] = {
{ iorSI, SIcode, Tcode, Tcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_lt_expr[] = {
{ ltSI, Tcode, SIcode, SIcode },
{ ltSU, Tcode, SUcode, SUcode },
{ ltDI, Tcode, DIcode, DIcode },
{ ltDU, Tcode, DUcode, DUcode },
{ ltSF, Tcode, SFcode, SFcode },
{ ltDF, Tcode, DFcode, DFcode },
{ ltXF, Tcode, XFcode, XFcode },
{ ltP, Tcode, Pcode, Pcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_le_expr[] = {
{ leSI, Tcode, SIcode, SIcode },
{ leSU, Tcode, SUcode, SUcode },
{ leDI, Tcode, DIcode, DIcode },
{ leDU, Tcode, DUcode, DUcode },
{ leSF, Tcode, SFcode, SFcode },
{ leDF, Tcode, DFcode, DFcode },
{ leXF, Tcode, XFcode, XFcode },
{ leP, Tcode, Pcode, Pcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_ge_expr[] = {
{ geSI, Tcode, SIcode, SIcode },
{ geSU, Tcode, SUcode, SUcode },
{ geDI, Tcode, DIcode, DIcode },
{ geDU, Tcode, DUcode, DUcode },
{ geSF, Tcode, SFcode, SFcode },
{ geDF, Tcode, DFcode, DFcode },
{ geXF, Tcode, XFcode, XFcode },
{ geP, Tcode, Pcode, Pcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_gt_expr[] = {
{ gtSI, Tcode, SIcode, SIcode },
{ gtSU, Tcode, SUcode, SUcode },
{ gtDI, Tcode, DIcode, DIcode },
{ gtDU, Tcode, DUcode, DUcode },
{ gtSF, Tcode, SFcode, SFcode },
{ gtDF, Tcode, DFcode, DFcode },
{ gtXF, Tcode, XFcode, XFcode },
{ gtP, Tcode, Pcode, Pcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_eq_expr[] = {
{ eqSI, Tcode, SIcode, SIcode },
{ eqDI, Tcode, DIcode, DIcode },
{ eqSF, Tcode, SFcode, SFcode },
{ eqDF, Tcode, DFcode, DFcode },
{ eqXF, Tcode, XFcode, XFcode },
{ eqP, Tcode, Pcode, Pcode },
{ -1, -1, -1, -1 },
};
struct binary_operator optab_ne_expr[] = {
{ neSI, Tcode, SIcode, SIcode },
{ neDI, Tcode, DIcode, DIcode },
{ neSF, Tcode, SFcode, SFcode },
{ neDF, Tcode, DFcode, DFcode },
{ neXF, Tcode, XFcode, XFcode },
{ neP, Tcode, Pcode, Pcode },
{ -1, -1, -1, -1 },
};
/* Unary operator tables. */
struct unary_operator optab_negate_expr[] = {
{ negSI, SIcode, SIcode },
{ negDI, DIcode, DIcode },
{ negSF, SFcode, SFcode },
{ negDF, DFcode, DFcode },
{ negXF, XFcode, XFcode },
{ -1, -1, -1 },
};
struct unary_operator optab_bit_not_expr[] = {
{ notSI, SIcode, SIcode },
{ notDI, DIcode, DIcode },
{ -1, -1, -1 },
};
struct unary_operator optab_truth_not_expr[] = {
{ notT, SIcode, SIcode },
{ -1, -1, -1 },
};
/* Increment operator tables. */
struct increment_operator optab_predecrement_expr[] = {
{ predecQI, QIcode },
{ predecQI, QUcode },
{ predecHI, HIcode },
{ predecHI, HUcode },
{ predecSI, SIcode },
{ predecSI, SUcode },
{ predecDI, DIcode },
{ predecDI, DUcode },
{ predecP, Pcode },
{ predecSF, SFcode },
{ predecDF, DFcode },
{ predecXF, XFcode },
{ -1, -1 },
};
struct increment_operator optab_preincrement_expr[] = {
{ preincQI, QIcode },
{ preincQI, QUcode },
{ preincHI, HIcode },
{ preincHI, HUcode },
{ preincSI, SIcode },
{ preincSI, SUcode },
{ preincDI, DIcode },
{ preincDI, DUcode },
{ preincP, Pcode },
{ preincSF, SFcode },
{ preincDF, DFcode },
{ preincXF, XFcode },
{ -1, -1 },
};
struct increment_operator optab_postdecrement_expr[] = {
{ postdecQI, QIcode },
{ postdecQI, QUcode },
{ postdecHI, HIcode },
{ postdecHI, HUcode },
{ postdecSI, SIcode },
{ postdecSI, SUcode },
{ postdecDI, DIcode },
{ postdecDI, DUcode },
{ postdecP, Pcode },
{ postdecSF, SFcode },
{ postdecDF, DFcode },
{ postdecXF, XFcode },
{ -1, -1 },
};
struct increment_operator optab_postincrement_expr[] = {
{ postincQI, QIcode },
{ postincQI, QUcode },
{ postincHI, HIcode },
{ postincHI, HUcode },
{ postincSI, SIcode },
{ postincSI, SUcode },
{ postincDI, DIcode },
{ postincDI, DUcode },
{ postincP, Pcode },
{ postincSF, SFcode },
{ postincDF, DFcode },
{ postincXF, XFcode },
{ -1, -1 },
};
/* Table of conversions supported by the interpreter. */
static struct conversion_info
{
enum bytecode_opcode opcode; /* here indicates the conversion needs no opcode. */
enum typecode from;
enum typecode to;
int cost; /* 1 for no-op conversions, 2 for widening conversions,
4 for int/float conversions, 8 for narrowing conversions. */
} conversion_info[] = {
{ -1, QIcode, QUcode, 1 },
{ -1, HIcode, HUcode, 1 },
{ -1, SIcode, SUcode, 1 },
{ -1, DIcode, DUcode, 1 },
{ -1, QUcode, QIcode, 1 },
{ -1, HUcode, HIcode, 1 },
{ -1, SUcode, SIcode, 1 },
{ -1, DUcode, DIcode, 1 },
{ -1, Tcode, SIcode, 1 },
{ convertQIHI, QIcode, HIcode, 2 },
{ convertQUHU, QUcode, HUcode, 2 },
{ convertQUSU, QUcode, SUcode, 2 },
{ convertHISI, HIcode, SIcode, 2 },
{ convertHUSU, HUcode, SUcode, 2 },
{ convertSIDI, SIcode, DIcode, 2 },
{ convertSUDU, SUcode, DUcode, 2 },
{ convertSFDF, SFcode, DFcode, 2 },
{ convertDFXF, DFcode, XFcode, 2 },
{ convertHIQI, HIcode, QIcode, 8 },
{ convertSIQI, SIcode, QIcode, 8 },
{ convertSIHI, SIcode, HIcode, 8 },
{ convertSUQU, SUcode, QUcode, 8 },
{ convertDISI, DIcode, SIcode, 8 },
{ convertDFSF, DFcode, SFcode, 8 },
{ convertXFDF, XFcode, DFcode, 8 },
{ convertPSI, Pcode, SIcode, 2 },
{ convertSIP, SIcode, Pcode, 2 },
{ convertSIT, SIcode, Tcode, 2 },
{ convertDIT, DIcode, Tcode, 2 },
{ convertSFT, SFcode, Tcode, 2 },
{ convertDFT, DFcode, Tcode, 2 },
{ convertXFT, XFcode, Tcode, 2 },
{ convertQISI, QIcode, SIcode, 2 },
{ convertPT, Pcode, Tcode, 2 },
{ convertSISF, SIcode, SFcode, 4 },
{ convertSIDF, SIcode, DFcode, 4 },
{ convertSIXF, SIcode, XFcode, 4 },
{ convertSUSF, SUcode, SFcode, 4 },
{ convertSUDF, SUcode, DFcode, 4 },
{ convertSUXF, SUcode, XFcode, 4 },
{ convertDISF, DIcode, SFcode, 4 },
{ convertDIDF, DIcode, DFcode, 4 },
{ convertDIXF, DIcode, XFcode, 4 },
{ convertDUSF, DUcode, SFcode, 4 },
{ convertDUDF, DUcode, DFcode, 4 },
{ convertDUXF, DUcode, XFcode, 4 },
{ convertSFSI, SFcode, SIcode, 4 },
{ convertDFSI, DFcode, SIcode, 4 },
{ convertXFSI, XFcode, SIcode, 4 },
{ convertSFSU, SFcode, SUcode, 4 },
{ convertDFSU, DFcode, SUcode, 4 },
{ convertXFSU, XFcode, SUcode, 4 },
{ convertSFDI, SFcode, DIcode, 4 },
{ convertDFDI, DFcode, DIcode, 4 },
{ convertXFDI, XFcode, DIcode, 4 },
{ convertSFDU, SFcode, DUcode, 4 },
{ convertDFDU, DFcode, DUcode, 4 },
{ convertXFDU, XFcode, DUcode, 4 },
{ convertSIQI, SIcode, QIcode, 8 },
};
#define NUM_CONVERSIONS (sizeof conversion_info / sizeof (struct conversion_info))
/* List form of a conversion recipe. */
struct conversion_list
{
enum bytecode_opcode opcode;
enum typecode to;
int cost;
struct conversion_list *prev;
};
/* Determine if it is "reasonable" to add a given conversion to
a given list of conversions. The following criteria define
"reasonable" conversion lists:
* No typecode appears more than once in the sequence (no loops).
* At most one conversion from integer to float or vice versa is present.
* Either sign extensions or zero extensions may be present, but not both.
* No widening conversions occur after a signed/unsigned conversion.
* The sequence of sizes must be strict nonincreasing or nondecreasing. */
static int
conversion_reasonable_p (conversion, list)
struct conversion_info *conversion;
struct conversion_list *list;
{
struct conversion_list *curr;
int curr_size, prev_size;
int has_int_float, has_float_int;
int has_sign_extend, has_zero_extend;
int has_signed_unsigned, has_unsigned_signed;
has_int_float = 0;
has_float_int = 0;
has_sign_extend = 0;
has_zero_extend = 0;
has_signed_unsigned = 0;
has_unsigned_signed = 0;
/* Make sure the destination typecode doesn't already appear in
the list. */
for (curr = list; curr; curr = curr->prev)
if (conversion->to == curr->to)
return 0;
/* Check for certain kinds of conversions. */
if (TYPECODE_INTEGER_P (conversion->from)
&& TYPECODE_FLOAT_P (conversion->to))
has_int_float = 1;
if (TYPECODE_FLOAT_P (conversion->from)
&& TYPECODE_INTEGER_P (conversion->to))
has_float_int = 1;
if (TYPECODE_SIGNED_P (conversion->from)
&& TYPECODE_SIGNED_P (conversion->to)
&& GET_TYPECODE_SIZE (conversion->from)
< GET_TYPECODE_SIZE (conversion->to))
has_sign_extend = 1;
if (TYPECODE_UNSIGNED_P (conversion->from)
&& TYPECODE_UNSIGNED_P (conversion->to)
&& GET_TYPECODE_SIZE (conversion->from)
< GET_TYPECODE_SIZE (conversion->to))
has_zero_extend = 1;
for (curr = list; curr && curr->prev; curr = curr->prev)
{
if (TYPECODE_INTEGER_P (curr->prev->to)
&& TYPECODE_FLOAT_P (curr->to))
has_int_float = 1;
if (TYPECODE_FLOAT_P (curr->prev->to)
&& TYPECODE_INTEGER_P (curr->to))
has_float_int = 1;
if (TYPECODE_SIGNED_P (curr->prev->to)
&& TYPECODE_SIGNED_P (curr->to)
&& GET_TYPECODE_SIZE (curr->prev->to)
< GET_TYPECODE_SIZE (curr->to))
has_sign_extend = 1;
if (TYPECODE_UNSIGNED_P (curr->prev->to)
&& TYPECODE_UNSIGNED_P (curr->to)
&& GET_TYPECODE_SIZE (curr->prev->to)
< GET_TYPECODE_SIZE (curr->to))
has_zero_extend = 1;
if (TYPECODE_SIGNED_P (curr->prev->to)
&& TYPECODE_UNSIGNED_P (curr->to))
has_signed_unsigned = 1;
if (TYPECODE_UNSIGNED_P (curr->prev->to)
&& TYPECODE_SIGNED_P (curr->to))
has_unsigned_signed = 1;
}
if (TYPECODE_INTEGER_P (conversion->from)
&& TYPECODE_INTEGER_P (conversion->to)
&& GET_TYPECODE_SIZE (conversion->to)
> GET_TYPECODE_SIZE (conversion->from)
&& (has_signed_unsigned || has_unsigned_signed))
return 0;
if (has_float_int && has_int_float || has_sign_extend && has_zero_extend)
return 0;
/* Make sure the sequence of destination typecode sizes is
strictly nondecreasing or strictly nonincreasing. */
prev_size = GET_TYPECODE_SIZE (conversion->to);
for (curr = list; curr; curr = curr->prev)
{
curr_size = GET_TYPECODE_SIZE (curr->to);
if (curr_size != prev_size)
break;
}
if (!curr)
return 1;
if (curr_size < prev_size)
for (prev_size = curr_size; curr; curr = curr->prev)
{
curr_size = GET_TYPECODE_SIZE (curr->to);
if (curr_size > prev_size)
return 0;
prev_size = curr_size;
}
else
for (prev_size = curr_size; curr; curr = curr->prev)
{
curr_size = GET_TYPECODE_SIZE (curr->to);
if (curr_size < prev_size)
return 0;
prev_size = curr_size;
}
return 1;
}
/* Exhaustively search all reasonable conversions to find one to
convert the given types. */
static struct conversion_recipe
deduce_conversion (from, to)
enum typecode from, to;
{
struct rl
{
struct conversion_list *list;
struct rl *next;
} *prev, curr, *good, *temp;
struct conversion_list *conv, *best;
int i, cost, bestcost;
struct conversion_recipe result;
struct obstack recipe_obstack;
obstack_init (&recipe_obstack);
curr.next = (struct rl *) obstack_alloc (&recipe_obstack, sizeof (struct rl));
curr.next->list
= (struct conversion_list *) obstack_alloc (&recipe_obstack,
sizeof (struct conversion_list));
curr.next->list->opcode = -1;
curr.next->list->to = from;
curr.next->list->cost = 0;
curr.next->list->prev = 0;
curr.next->next = 0;
good = 0;
while (curr.next)
{
/* Remove successful conversions from further consideration. */
for (prev = &curr; prev; prev = prev->next)
if (prev->next && prev->next->list->to == to)
{
temp = prev->next->next;
prev->next->next = good;
good = prev->next;
prev->next = temp;
}
/* Go through each of the pending conversion chains, trying
all possible candidate conversions on them. */
for (prev = curr.next, curr.next = 0; prev; prev = prev->next)
for (i = 0; i < NUM_CONVERSIONS; ++i)
if (conversion_info[i].from == prev->list->to
&& conversion_reasonable_p (&conversion_info[i], prev->list))
{
temp = (struct rl *) obstack_alloc (&recipe_obstack,
sizeof (struct rl));
temp->list = (struct conversion_list *)
obstack_alloc (&recipe_obstack,
sizeof (struct conversion_list));
temp->list->opcode = conversion_info[i].opcode;
temp->list->to = conversion_info[i].to;
temp->list->cost = conversion_info[i].cost;
temp->list->prev = prev->list;
temp->next = curr.next;
curr.next = temp;
}
}
bestcost = BIG_ARBITRARY_NUMBER;
best = 0;
for (temp = good; temp; temp = temp->next)
{
for (conv = temp->list, cost = 0; conv; conv = conv->prev)
cost += conv->cost;
if (cost < bestcost)
{
bestcost = cost;
best = temp->list;
}
}
if (!best)
abort ();
for (i = 0, conv = best; conv; conv = conv->prev)
if (conv->opcode != -1)
++i;
result.opcodes = (unsigned char *) xmalloc (i);
result.nopcodes = i;
for (conv = best; conv; conv = conv->prev)
if (conv->opcode != -1)
result.opcodes[--i] = conv->opcode;
result.cost = bestcost;
obstack_free (&recipe_obstack, 0);
return result;
}
#define DEDUCE_CONVERSION(FROM, TO) \
(conversion_recipe[(int) FROM][(int) TO].opcodes ? 0 \
: (conversion_recipe[(int) FROM][(int) TO] \
= deduce_conversion (FROM, TO), 0))
/* Emit a conversion between the given scalar types. */
void
emit_typecode_conversion (from, to)
enum typecode from, to;
{
int i;
DEDUCE_CONVERSION (from, to);
for (i = 0; i < conversion_recipe[(int) from][(int) to].nopcodes; ++i)
bc_emit_instruction (conversion_recipe[(int) from][(int) to].opcodes[i]);
}
/* Initialize mode_to_code_map[] */
void
bc_init_mode_to_code_map ()
{
int mode;
for (mode = 0; mode < MAX_MACHINE_MODE + 1; mode++)
{
signed_mode_to_code_map[mode]
= unsigned_mode_to_code_map[mode]
= LAST_AND_UNUSED_TYPECODE;
}
#define DEF_MODEMAP(SYM, CODE, UCODE, CONST, LOAD, STORE) \
{ signed_mode_to_code_map[(int) SYM] = CODE; \
unsigned_mode_to_code_map[(int) SYM] = UCODE; }
#include "modemap.def"
#undef DEF_MODEMAP
/* Initialize opcode maps for const, load, and store */
bc_init_mode_to_opcode_maps ();
}
/* Given a machine mode return the preferred typecode. */
enum typecode
preferred_typecode (mode, unsignedp)
enum machine_mode mode;
int unsignedp;
{
enum typecode code = (unsignedp
? unsigned_mode_to_code_map
: signed_mode_to_code_map) [MIN ((int) mode,
(int) MAX_MACHINE_MODE)];
if (code == LAST_AND_UNUSED_TYPECODE)
abort ();
return code;
}
/* Expand a conversion between the given types. */
void
bc_expand_conversion (from, to)
tree from, to;
{
enum typecode fcode, tcode;
fcode = preferred_typecode (TYPE_MODE (from), TREE_UNSIGNED (from));
tcode = preferred_typecode (TYPE_MODE (to), TREE_UNSIGNED (to));
emit_typecode_conversion (fcode, tcode);
}
/* Expand a conversion of the given type to a truth value. */
void
bc_expand_truth_conversion (from)
tree from;
{
enum typecode fcode;
fcode = preferred_typecode (TYPE_MODE (from), TREE_UNSIGNED (from));
emit_typecode_conversion (fcode, Tcode);
}
/* Emit an appropriate binary operation. */
void
bc_expand_binary_operation (optab, resulttype, arg0, arg1)
struct binary_operator optab[];
tree resulttype, arg0, arg1;
{
int i, besti, cost, bestcost;
enum typecode resultcode, arg0code, arg1code;
resultcode = preferred_typecode (TYPE_MODE (resulttype), TREE_UNSIGNED (resulttype));
arg0code = preferred_typecode (TYPE_MODE (TREE_TYPE (arg0)), TREE_UNSIGNED (resulttype));
arg1code = preferred_typecode (TYPE_MODE (TREE_TYPE (arg1)), TREE_UNSIGNED (resulttype));
besti = -1;
bestcost = BIG_ARBITRARY_NUMBER;
for (i = 0; optab[i].opcode != -1; ++i)
{
cost = 0;
DEDUCE_CONVERSION (arg0code, optab[i].arg0);
cost += conversion_recipe[(int) arg0code][(int) optab[i].arg0].cost;
DEDUCE_CONVERSION (arg1code, optab[i].arg1);
cost += conversion_recipe[(int) arg1code][(int) optab[i].arg1].cost;
if (cost < bestcost)
{
besti = i;
bestcost = cost;
}
}
if (besti == -1)
abort ();
expand_expr (arg1, 0, VOIDmode, 0);
emit_typecode_conversion (arg1code, optab[besti].arg1);
expand_expr (arg0, 0, VOIDmode, 0);
emit_typecode_conversion (arg0code, optab[besti].arg0);
bc_emit_instruction (optab[besti].opcode);
emit_typecode_conversion (optab[besti].result, resultcode);
}
/* Emit an appropriate unary operation. */
void
bc_expand_unary_operation (optab, resulttype, arg0)
struct unary_operator optab[];
tree resulttype, arg0;
{
int i, besti, cost, bestcost;
enum typecode resultcode, arg0code;
resultcode = preferred_typecode (TYPE_MODE (resulttype), TREE_UNSIGNED (resulttype));
arg0code = preferred_typecode (TYPE_MODE (TREE_TYPE (arg0)), TREE_UNSIGNED (TREE_TYPE (arg0)));
besti = -1;
bestcost = BIG_ARBITRARY_NUMBER;
for (i = 0; optab[i].opcode != -1; ++i)
{
DEDUCE_CONVERSION (arg0code, optab[i].arg0);
cost = conversion_recipe[(int) arg0code][(int) optab[i].arg0].cost;
if (cost < bestcost)
{
besti = i;
bestcost = cost;
}
}
if (besti == -1)
abort ();
expand_expr (arg0, 0, VOIDmode, 0);
emit_typecode_conversion (arg0code, optab[besti].arg0);
bc_emit_instruction (optab[besti].opcode);
emit_typecode_conversion (optab[besti].result, resultcode);
}
/* Emit an appropriate increment. */
void
bc_expand_increment (optab, type)
struct increment_operator optab[];
tree type;
{
enum typecode code;
int i;
code = preferred_typecode (TYPE_MODE (type), TREE_UNSIGNED (type));
for (i = 0; (int) optab[i].opcode >= 0; ++i)
if (code == optab[i].arg)
{
bc_emit_instruction (optab[i].opcode);
return;
}
abort ();
}

View File

@@ -1,75 +0,0 @@
/* Bytecode token definitions for GNU C-compiler.
Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
extern void bc_expand_conversion ();
extern void bc_expand_truth_conversion ();
extern void bc_expand_binary_operation ();
extern void bc_expand_unary_operation ();
struct binary_operator
{
enum bytecode_opcode opcode;
enum typecode result;
enum typecode arg0;
enum typecode arg1;
};
extern struct binary_operator optab_plus_expr[];
extern struct binary_operator optab_minus_expr[];
extern struct binary_operator optab_mult_expr[];
extern struct binary_operator optab_trunc_div_expr[];
extern struct binary_operator optab_trunc_mod_expr[];
extern struct binary_operator optab_rdiv_expr[];
extern struct binary_operator optab_bit_and_expr[];
extern struct binary_operator optab_bit_ior_expr[];
extern struct binary_operator optab_bit_xor_expr[];
extern struct binary_operator optab_lshift_expr[];
extern struct binary_operator optab_rshift_expr[];
extern struct binary_operator optab_truth_and_expr[];
extern struct binary_operator optab_truth_or_expr[];
extern struct binary_operator optab_lt_expr[];
extern struct binary_operator optab_le_expr[];
extern struct binary_operator optab_ge_expr[];
extern struct binary_operator optab_gt_expr[];
extern struct binary_operator optab_eq_expr[];
extern struct binary_operator optab_ne_expr[];
struct unary_operator
{
enum bytecode_opcode opcode;
enum typecode result;
enum typecode arg0;
};
extern struct unary_operator optab_negate_expr[];
extern struct unary_operator optab_bit_not_expr[];
extern struct unary_operator optab_truth_not_expr[];
struct increment_operator
{
enum bytecode_opcode opcode;
enum typecode arg;
};
extern struct increment_operator optab_predecrement_expr[];
extern struct increment_operator optab_preincrement_expr[];
extern struct increment_operator optab_postdecrement_expr[];
extern struct increment_operator optab_postincrement_expr[];

View File

@@ -1,21 +0,0 @@
/* Typecodes used by the interpreter and their related
machine modes and types.
The last argument is used for retrieving the given
type from a varargs list. Due to a bug in varargs,
the type has to be the generic machine type of
larger. */
DEFTYPECODE (QIcode, "QI", QImode, SItype)
DEFTYPECODE (QUcode, "QU", QImode, SUtype)
DEFTYPECODE (HIcode, "HI", HImode, SItype)
DEFTYPECODE (HUcode, "HU", HImode, SUtype)
DEFTYPECODE (SIcode, "SI", SImode, SItype)
DEFTYPECODE (SUcode, "SU", SImode, SUtype)
DEFTYPECODE (DIcode, "DI", DImode, DItype)
DEFTYPECODE (DUcode, "DU", DImode, DUtype)
DEFTYPECODE (SFcode, "SF", SFmode, SFtype)
DEFTYPECODE (DFcode, "DF", DFmode, DFtype)
DEFTYPECODE (XFcode, "XF", XFmode, XFtype)
DEFTYPECODE (Pcode, "P", PSImode, Ptype)
DEFTYPECODE (Tcode, "T", SImode, SItype)

View File

@@ -1,54 +0,0 @@
/* Typecode definitions for Bytecode Interpreter.
Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef TYPECODE_H
#define TYPECODE_H
enum typecode
{
#define DEFTYPECODE(CODE, NAME, MACHMODE, TYPE) CODE,
#include "bc-typecd.def"
#undef DEFTYPECODE
LAST_AND_UNUSED_TYPECODE
};
/* Determine if a given type is integer. */
#define TYPECODE_INTEGER_P(TYPECODE) ((int) (TYPECODE) < (int) SFcode)
/* Determine if a given type is unsigned. */
#define TYPECODE_UNSIGNED_P(TYPECODE) \
(TYPECODE_INTEGER_P(TYPECODE) && (int) (TYPECODE) & 1)
/* Determine if a given type is signed. */
#define TYPECODE_SIGNED_P(TYPECODE) \
(TYPECODE_INTEGER_P(TYPECODE) && !((int) (TYPECODE) & 1))
/* Determine if a given type is floating. */
#define TYPECODE_FLOAT_P(TYPECODE) \
((int) (TYPECODE) < (int) Pcode && !TYPECODE_INTEGER_P(TYPECODE))
/* Determine if the given type is arithmetic. */
#define TYPECODE_ARITH_P(TYPECODE) \
(TYPECODE_INTEGER_P(TYPECODE) || TYPECODE_FLOAT_P(TYPECODE))
#define NUM_TYPECODES ((int) LAST_AND_UNUSED_TYPECODE)
#endif

View File

@@ -1,91 +0,0 @@
/* Bytecode Interpreter utility to generate arity table.
Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "hconfig.h"
#include "bi-defs.h"
int
length (n)
struct node *n;
{
int k;
for (k = 0; n; n = n->next)
++k;
return k;
}
int
main ()
{
struct def *d;
struct variation *v;
struct node *n;
yyparse ();
reverse ();
for (d = defs; d; d = d->next)
for (v = d->variations; v; v = v->next)
{
printf ("{ %d, %d, %d, {", length (v->inputs),
length (v->outputs), length (v->literals));
for (n = v->literals; n; n = n->next)
printf ("(char) %scode, ", n->text);
if (v->literals == 0)
printf ("0");
printf ("}},\n");
}
fflush (stdout);
exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
/* NOTREACHED */
return 0;
}
/* Safely allocate NBYTES bytes of memory. Returns pointer to block of
memory. */
char *
xmalloc (nbytes)
int nbytes;
{
char *tmp = (char *) malloc (nbytes);
if (!tmp)
{
fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n", nbytes);
exit (FATAL_EXIT_CODE);
}
return tmp;
}
/* More 'friendly' abort that prints the line and file.
config.h can #define abort fancy_abort if you like that sort of thing. */
void
fancy_abort ()
{
fprintf (stderr, "Internal gcc abort.\n");
exit (FATAL_EXIT_CODE);
}

View File

@@ -1,48 +0,0 @@
/* Definitions for Bytecode Interpreter.
Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
struct node
{
char *text;
struct node *next;
};
struct variation
{
char *name;
int code;
struct node *inputs;
struct node *outputs;
struct node *literals;
struct variation *next;
};
struct def
{
char *basename;
char *template;
struct variation *variations;
struct def *next;
};
extern struct def *defs;
extern int ndefs;
extern void reverse();

View File

@@ -1,167 +0,0 @@
/* Lexer for scanner of bytecode definition file.
Copyright (C) 1993, 1995 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "hconfig.h"
#include "bi-parser.h"
/* Safely allocate NBYTES bytes of memory. Returns pointer to block of
memory. */
static char *
xmalloc (nbytes)
int nbytes;
{
char *tmp = (char *) malloc (nbytes);
if (!tmp)
{
fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n", nbytes);
exit (FATAL_EXIT_CODE);
}
return tmp;
}
/* Safely reallocate BLOCK so its size becomes NBYTES.
The block returned may be different from the one supplied. */
static char *
xrealloc (block, nbytes)
char *block;
int nbytes;
{
char *tmp = (block
? (char *) realloc (block, nbytes)
: (char *) malloc (nbytes));
if (!tmp)
{
fprintf (stderr, "can't reallocate %d bytes (out of virtual memory)\n", nbytes);
exit (FATAL_EXIT_CODE);
}
return tmp;
}
/* Scan for string token on standard input. A string is, for our
purposes here, a sequence of characters that starts with the regexp
``[^ #\t\n(),]'' and is then followed by the regexp ``[^#(),]*''. Any
character is accepted if preceded by a backslash, "\\". It is assumed
that the first character has already been checked by the main loop. */
static char *
scan_string ()
{
char *buffer = NULL;
char *point = NULL;
int buffer_size = 0;
int c;
while ((c = getc (stdin)) != EOF
&& c != '#' && c != '(' && c != ')' && c != ',')
{
/* Extend buffer, if necessary (minus two so there's room for the NUL
trailer as well as another character if this one is a backslash). */
if (!buffer_size || (point - buffer >= buffer_size-2))
{
int previous_point_index = point - buffer;
buffer_size = (!buffer_size ? 32 : buffer_size * 2);
if (!buffer)
buffer = xmalloc (buffer_size);
else
buffer = xrealloc (buffer, buffer_size);
point = buffer + previous_point_index;
}
*point++ = c & 0xff;
if (c == '\\')
{
c = getc (stdin);
/* Catch special case: backslash at end of file */
if (c == EOF)
break;
*point++ = c;
}
}
*point = 0;
if (c != EOF)
ungetc (c, stdin);
return buffer;
}
int
yylex ()
{
int c;
char *token;
/* First char determines what token we're looking at */
for (;;)
{
c = getc (stdin);
switch (c)
{
case EOF:
return 0;
case ' ':
case '\t':
case '\n':
/* Ignore whitespace */
continue;
case '#':
/* Comments advance to next line */
while ((c = getc (stdin)) != '\n' && c != EOF);
continue;
default:
if (c != '(' && c != ')' && c != '\\' && c != ',')
{
ungetc (c, stdin);
yylval.string = scan_string ();
/* Check if string is "define_operator"; if so, return
a DEFOP token instead. */
if (!strcmp (yylval.string, "define_operator"))
{
free (yylval.string);
yylval.string = 0;
return DEFOP;
}
return STRING;
}
return c & 0xff;
}
}
}

View File

@@ -1,89 +0,0 @@
/* Utility to generate opcode list from bytecode definition.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "hconfig.h"
#include "bi-defs.h"
int
main(argc, argv)
int argc;
char **argv;
{
struct def *d;
struct variation *v;
int i;
yyparse();
reverse();
printf ("/* This file is automatically generated from bytecode.def,\n");
printf ("do not make any changes here. Instead edit bytecode.def. */\n\n");
printf ("enum bytecode_opcode\n{");
i = 0;
for (d = defs; d; d = d->next)
for (v = d->variations; v; v = v->next)
{
printf (" %s%s,\n", d->basename, v->name);
++i;
}
puts (" LAST_AND_UNUSED_OPCODE\n};");
if (i > 256)
fprintf (stderr, "%s: warning, number of opcodes is %d\n", *argv, i);
else
fprintf (stderr, "(Number of opcodes is %d)\n", i);
fflush (stdout);
exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
/* NOTREACHED */
return 0;
}
/* Safely allocate NBYTES bytes of memory. Returns pointer to block of
memory. */
char *
xmalloc (nbytes)
int nbytes;
{
char *tmp = (char *) malloc (nbytes);
if (!tmp)
{
fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n", nbytes);
exit (FATAL_EXIT_CODE);
}
return tmp;
}
/* More 'friendly' abort that prints the line and file.
config.h can #define abort fancy_abort if you like that sort of thing. */
void
fancy_abort ()
{
fprintf (stderr, "Internal gcc abort.\n");
exit (FATAL_EXIT_CODE);
}

View File

@@ -1,70 +0,0 @@
/* Utility to generate opcode name list from bytecode definition file.
Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "hconfig.h"
#include "bi-defs.h"
int
main()
{
struct def *d;
struct variation *v;
yyparse();
reverse();
for (d = defs; d; d = d->next)
for (v = d->variations; v; v = v->next)
printf("\"%s%s\",\n", d->basename, v->name);
fflush (stdout);
exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
/* NOTREACHED */
return 0;
}
/* Safely allocate NBYTES bytes of memory. Returns pointer to block of
memory. */
char *
xmalloc (nbytes)
int nbytes;
{
char *tmp = (char *) malloc (nbytes);
if (!tmp)
{
fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n", nbytes);
exit (FATAL_EXIT_CODE);
}
return tmp;
}
/* More 'friendly' abort that prints the line and file.
config.h can #define abort fancy_abort if you like that sort of thing. */
void
fancy_abort ()
{
fprintf (stderr, "Internal gcc abort.\n");
exit (FATAL_EXIT_CODE);
}

View File

@@ -1,980 +0,0 @@
/* A Bison parser, made from bi-parser.y with Bison version GNU Bison version 1.24
*/
#define YYBISON 1 /* Identify Bison output. */
#define DEFOP 258
#define STRING 259
#line 22 "bi-parser.y"
#include <stdio.h>
#include "hconfig.h"
#include "bi-defs.h"
extern char yytext[];
extern int yyleng;
/* Chain of all defs built by the parser. */
struct def *defs;
int ndefs;
static struct node *makenode ();
static struct variation *makevar ();
static struct def *makedef ();
void yyerror ();
#line 44 "bi-parser.y"
typedef union
{
char *string;
struct def *def;
struct variation *variation;
struct node *node;
} YYSTYPE;
#ifndef YYLTYPE
typedef
struct yyltype
{
int timestamp;
int first_line;
int first_column;
int last_line;
int last_column;
char *text;
}
yyltype;
#define YYLTYPE yyltype
#endif
#include <stdio.h>
#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif
#define YYFINAL 39
#define YYFLAG -32768
#define YYNTBASE 8
#define YYTRANSLATE(x) ((unsigned)(x) <= 259 ? yytranslate[x] : 17)
static const char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 5,
7, 2, 2, 6, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 1, 2, 3, 4
};
#if YYDEBUG != 0
static const short yyprhs[] = { 0,
0, 2, 4, 7, 18, 20, 24, 28, 34, 42,
52, 53, 55, 59, 60, 62, 66
};
static const short yyrhs[] = { 9,
0, 10, 0, 9, 10, 0, 3, 5, 4, 6,
13, 6, 5, 11, 7, 7, 0, 12, 0, 11,
6, 12, 0, 5, 13, 7, 0, 5, 13, 6,
14, 7, 0, 5, 13, 6, 14, 6, 14, 7,
0, 5, 13, 6, 14, 6, 14, 6, 14, 7,
0, 0, 4, 0, 5, 15, 7, 0, 0, 16,
0, 16, 6, 15, 0, 4, 0
};
#endif
#if YYDEBUG != 0
static const short yyrline[] = { 0,
60, 65, 67, 71, 76, 78, 82, 85, 87, 89,
93, 95, 98, 101, 105, 108, 112
};
static const char * const yytname[] = { "$","error","$undefined.","DEFOP",
"STRING","'('","','","')'","top","defs","def","variations","variation","opt_string",
"list","items","item",""
};
#endif
static const short yyr1[] = { 0,
8, 9, 9, 10, 11, 11, 12, 12, 12, 12,
13, 13, 14, 14, 15, 15, 16
};
static const short yyr2[] = { 0,
1, 1, 2, 10, 1, 3, 3, 5, 7, 9,
0, 1, 3, 0, 1, 3, 1
};
static const short yydefact[] = { 0,
0, 1, 2, 0, 3, 0, 11, 12, 0, 0,
0, 11, 0, 5, 0, 0, 0, 14, 7, 6,
4, 0, 0, 17, 0, 15, 14, 8, 13, 0,
0, 16, 14, 9, 0, 10, 0, 0, 0
};
static const short yydefgoto[] = { 37,
2, 3, 13, 14, 9, 23, 25, 26
};
static const short yypact[] = { 2,
6, 2,-32768, 8,-32768, 7, 10,-32768, 9, 11,
12, 10, -5,-32768, -3, 12, 13, 14,-32768,-32768,
-32768, 17, 1,-32768, 15, 18, 14,-32768,-32768, 17,
3,-32768, 14,-32768, 16,-32768, 25, 26,-32768
};
static const short yypgoto[] = {-32768,
-32768, 27,-32768, 19, 20, -27, -12,-32768
};
#define YYLAST 35
static const short yytable[] = { 31,
16, 17, 18, 19, 1, 35, 27, 28, 33, 34,
4, 6, 7, 8, 10, 11, 12, 32, 22, 21,
24, 29, 36, 30, 38, 39, 0, 0, 5, 0,
0, 15, 0, 0, 20
};
static const short yycheck[] = { 27,
6, 7, 6, 7, 3, 33, 6, 7, 6, 7,
5, 4, 6, 4, 6, 5, 5, 30, 5, 7,
4, 7, 7, 6, 0, 0, -1, -1, 2, -1,
-1, 12, -1, -1, 16
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/local/share/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
#pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc. */
#endif /* not GNU C. */
#endif /* alloca not defined. */
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
as one case of the switch. */
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT return(0)
#define YYABORT return(1)
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror.
This remains here temporarily to ease the
transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(token, value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ yychar = (token), yylval = (value); \
yychar1 = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
{ yyerror ("syntax error: cannot back up"); YYERROR; } \
while (0)
#define YYTERROR 1
#define YYERRCODE 256
#ifndef YYPURE
#define YYLEX yylex()
#endif
#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#endif
/* If nonreentrant, generate the variables here */
#ifndef YYPURE
int yychar; /* the lookahead symbol */
YYSTYPE yylval; /* the semantic value of the */
/* lookahead symbol */
#ifdef YYLSP_NEEDED
YYLTYPE yylloc; /* location data for the lookahead */
/* symbol */
#endif
int yynerrs; /* number of parse errors so far */
#endif /* not YYPURE */
#if YYDEBUG != 0
int yydebug; /* nonzero means print parse trace */
/* Since this is uninitialized, it does not stop multiple parsers
from coexisting. */
#endif
/* YYINITDEPTH indicates the initial size of the parser's stacks */
#ifndef YYINITDEPTH
#define YYINITDEPTH 200
#endif
/* YYMAXDEPTH is the maximum size the stacks can grow to
(effective only if the built-in stack extension method is used). */
#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
int yyparse (void);
#endif
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
#ifndef __cplusplus
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__yy_memcpy (from, to, count)
char *from;
char *to;
int count;
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#else /* __cplusplus */
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__yy_memcpy (char *from, char *to, int count)
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
#endif
#endif
#line 192 "/usr/local/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
It should actually point to an object.
Grammar actions can access the variable by casting it
to the proper pointer type. */
#ifdef YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#else
#define YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#endif
int
yyparse(YYPARSE_PARAM)
YYPARSE_PARAM_DECL
{
register int yystate;
register int yyn;
register short *yyssp;
register YYSTYPE *yyvsp;
int yyerrstatus; /* number of tokens to shift before error messages enabled */
int yychar1 = 0; /* lookahead token as an internal (translated) token number */
short yyssa[YYINITDEPTH]; /* the state stack */
YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
short *yyss = yyssa; /* refer to the stacks thru separate pointers */
YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
#ifdef YYLSP_NEEDED
YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp;
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK (yyvsp--, yyssp--)
#endif
int yystacksize = YYINITDEPTH;
#ifdef YYPURE
int yychar;
YYSTYPE yylval;
int yynerrs;
#ifdef YYLSP_NEEDED
YYLTYPE yylloc;
#endif
#endif
YYSTYPE yyval; /* the variable used to return */
/* semantic values from the action */
/* routines */
int yylen;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Starting parse\n");
#endif
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss - 1;
yyvsp = yyvs;
#ifdef YYLSP_NEEDED
yylsp = yyls;
#endif
/* Push a new state, which is found in yystate . */
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks. */
yynewstate:
*++yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1)
{
/* Give user a chance to reallocate the stack */
/* Use copies of these so that the &'s don't force the real ones into memory. */
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
YYLTYPE *yyls1 = yyls;
#endif
/* Get the current used size of the three stacks, in elements. */
int size = yyssp - yyss + 1;
#ifdef yyoverflow
/* Each stack pointer address is followed by the size of
the data in use in that stack, in bytes. */
#ifdef YYLSP_NEEDED
/* This used to be a conditional around just the two extra args,
but that might be undefined if yyoverflow is a macro. */
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yyls1, size * sizeof (*yylsp),
&yystacksize);
#else
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
&yystacksize);
#endif
yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
yyls = yyls1;
#endif
#else /* no yyoverflow */
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
{
yyerror("parser stack overflow");
return 2;
}
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
__yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
__yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
__yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */
yyssp = yyss + size - 1;
yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
yylsp = yyls + size - 1;
#endif
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Entering state %d\n", yystate);
#endif
goto yybackup;
yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* yyresume: */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* yychar is either YYEMPTY or YYEOF
or a valid token in external form. */
if (yychar == YYEMPTY)
{
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Reading a token: ");
#endif
yychar = YYLEX;
}
/* Convert token to internal form (in yychar1) for indexing tables with */
if (yychar <= 0) /* This means end of input. */
{
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Now at end of input.\n");
#endif
}
else
{
yychar1 = YYTRANSLATE(yychar);
#if YYDEBUG != 0
if (yydebug)
{
fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise meaning
of a token, for further debugging info. */
#ifdef YYPRINT
YYPRINT (stderr, yychar, yylval);
#endif
fprintf (stderr, ")\n");
}
#endif
}
yyn += yychar1;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
goto yydefault;
yyn = yytable[yyn];
/* yyn is what to do for this token type in this state.
Negative => reduce, -yyn is rule number.
Positive => shift, yyn is new state.
New state is final state => don't bother to shift,
just return success.
0, or most negative number => error. */
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
/* count tokens shifted since error; after three, turn off error status. */
if (yyerrstatus) yyerrstatus--;
yystate = yyn;
goto yynewstate;
/* Do the default action for the current state. */
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
/* Do a reduction. yyn is the number of a rule to reduce with. */
yyreduce:
yylen = yyr2[yyn];
if (yylen > 0)
yyval = yyvsp[1-yylen]; /* implement default value of the action */
#if YYDEBUG != 0
if (yydebug)
{
int i;
fprintf (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
fprintf (stderr, "%s ", yytname[yyrhs[i]]);
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
switch (yyn) {
case 1:
#line 62 "bi-parser.y"
{ defs = yyvsp[0].def; ;
break;}
case 3:
#line 68 "bi-parser.y"
{ yyvsp[0].def->next = yyvsp[-1].def; yyval.def = yyvsp[0].def; ;
break;}
case 4:
#line 73 "bi-parser.y"
{ yyval.def = makedef (yyvsp[-7].string, yyvsp[-5].string, yyvsp[-2].variation); ;
break;}
case 6:
#line 79 "bi-parser.y"
{ yyvsp[0].variation->next = yyvsp[-2].variation; yyval.variation = yyvsp[0].variation; ;
break;}
case 7:
#line 84 "bi-parser.y"
{ yyval.variation = makevar (yyvsp[-1].string, (struct node *) NULL, (struct node *) NULL, (struct node *) NULL); ;
break;}
case 8:
#line 86 "bi-parser.y"
{ yyval.variation = makevar (yyvsp[-3].string, yyvsp[-1].node, (struct node *) NULL, (struct node *) NULL); ;
break;}
case 9:
#line 88 "bi-parser.y"
{ yyval.variation = makevar (yyvsp[-5].string, yyvsp[-3].node, yyvsp[-1].node, (struct node *) NULL); ;
break;}
case 10:
#line 90 "bi-parser.y"
{ yyval.variation = makevar (yyvsp[-7].string, yyvsp[-5].node, yyvsp[-3].node, yyvsp[-1].node); ;
break;}
case 11:
#line 94 "bi-parser.y"
{ yyval.string = ""; ;
break;}
case 12:
#line 95 "bi-parser.y"
{ yyval.string = yyvsp[0].string; ;
break;}
case 13:
#line 100 "bi-parser.y"
{ yyval.node = yyvsp[-1].node; ;
break;}
case 14:
#line 102 "bi-parser.y"
{ yyval.node = NULL; ;
break;}
case 16:
#line 109 "bi-parser.y"
{ yyvsp[-2].node->next = yyvsp[0].node; yyval.node = yyvsp[-2].node; ;
break;}
case 17:
#line 114 "bi-parser.y"
{ yyval.node = makenode (yyvsp[0].string); ;
break;}
}
/* the action file gets copied in in place of this dollarsign */
#line 487 "/usr/local/share/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
#ifdef YYLSP_NEEDED
yylsp -= yylen;
#endif
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
*++yyvsp = yyval;
#ifdef YYLSP_NEEDED
yylsp++;
if (yylen == 0)
{
yylsp->first_line = yylloc.first_line;
yylsp->first_column = yylloc.first_column;
yylsp->last_line = (yylsp-1)->last_line;
yylsp->last_column = (yylsp-1)->last_column;
yylsp->text = 0;
}
else
{
yylsp->last_line = (yylsp+yylen-1)->last_line;
yylsp->last_column = (yylsp+yylen-1)->last_column;
}
#endif
/* Now "shift" the result of the reduction.
Determine what state that goes to,
based on the state we popped back to
and the rule number reduced by. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
goto yynewstate;
yyerrlab: /* here on detecting error */
if (! yyerrstatus)
/* If not already recovering from an error, report this error. */
{
++yynerrs;
#ifdef YYERROR_VERBOSE
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
{
int size = 0;
char *msg;
int x, count;
count = 0;
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */
for (x = (yyn < 0 ? -yyn : 0);
x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
size += strlen(yytname[x]) + 15, count++;
msg = (char *) malloc(size + 15);
if (msg != 0)
{
strcpy(msg, "parse error");
if (count < 5)
{
count = 0;
for (x = (yyn < 0 ? -yyn : 0);
x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
{
strcat(msg, count == 0 ? ", expecting `" : " or `");
strcat(msg, yytname[x]);
strcat(msg, "'");
count++;
}
}
yyerror(msg);
free(msg);
}
else
yyerror ("parse error; also virtual memory exceeded");
}
else
#endif /* YYERROR_VERBOSE */
yyerror("parse error");
}
goto yyerrlab1;
yyerrlab1: /* here on error raised explicitly by an action */
if (yyerrstatus == 3)
{
/* if just tried and failed to reuse lookahead token after an error, discard it. */
/* return failure if at end of input */
if (yychar == YYEOF)
YYABORT;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif
yychar = YYEMPTY;
}
/* Else will try to reuse lookahead token
after shifting the error token. */
yyerrstatus = 3; /* Each real token shifted decrements this */
goto yyerrhandle;
yyerrdefault: /* current state does not do anything special for the error token. */
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
if (yyn) goto yydefault;
#endif
yyerrpop: /* pop the current state because it cannot handle the error token */
if (yyssp == yyss) YYABORT;
yyvsp--;
yystate = *--yyssp;
#ifdef YYLSP_NEEDED
yylsp--;
#endif
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "Error: state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
yyerrhandle:
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yyerrdefault;
yyn += YYTERROR;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
goto yyerrdefault;
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrpop;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting error token, ");
#endif
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
yystate = yyn;
goto yynewstate;
}
#line 117 "bi-parser.y"
static struct node *
makenode (s)
char *s;
{
struct node *n;
n = (struct node *) malloc (sizeof (struct node));
n->text = s;
n->next = NULL;
return n;
}
static struct variation *
makevar (name, inputs, outputs, literals)
char *name;
struct node *inputs, *outputs, *literals;
{
struct variation *v;
v = (struct variation *) malloc (sizeof (struct variation));
v->name = name;
v->code = ndefs++;
v->inputs = inputs;
v->outputs = outputs;
v->literals = literals;
v->next = NULL;
return v;
}
static struct def *
makedef (name, template, vars)
char *name, *template;
struct variation *vars;
{
struct def *d;
d = (struct def *) malloc (sizeof (struct def));
d->basename = name;
d->template = template;
d->variations = vars;
d->next = NULL;
return d;
}
void
yyerror (s)
char *s;
{
fprintf (stderr, "syntax error in input\n");
exit (FATAL_EXIT_CODE);
}

View File

@@ -1,12 +0,0 @@
typedef union
{
char *string;
struct def *def;
struct variation *variation;
struct node *node;
} YYSTYPE;
#define DEFOP 258
#define STRING 259
extern YYSTYPE yylval;

View File

@@ -1,169 +0,0 @@
/* Bytecode definition file parser.
Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
%{
#include <stdio.h>
#include "hconfig.h"
#include "bi-defs.h"
extern char yytext[];
extern int yyleng;
/* Chain of all defs built by the parser. */
struct def *defs;
int ndefs;
static struct node *makenode ();
static struct variation *makevar ();
static struct def *makedef ();
void yyerror ();
%}
%union
{
char *string;
struct def *def;
struct variation *variation;
struct node *node;
}
%token <string> DEFOP STRING
%type <string> opt_string
%type <def> defs def
%type <variation> variations variation
%type <node> list items item
%%
top:
defs
{ defs = $1; }
;
defs:
def
| defs def
{ $2->next = $1; $$ = $2; }
;
def:
DEFOP '(' STRING ',' opt_string ',' '(' variations ')' ')'
{ $$ = makedef ($3, $5, $8); }
;
variations:
variation
| variations ',' variation
{ $3->next = $1; $$ = $3; }
;
variation:
'(' opt_string ')'
{ $$ = makevar ($2, (struct node *) NULL, (struct node *) NULL, (struct node *) NULL); }
| '(' opt_string ',' list ')'
{ $$ = makevar ($2, $4, (struct node *) NULL, (struct node *) NULL); }
| '(' opt_string ',' list ',' list ')'
{ $$ = makevar ($2, $4, $6, (struct node *) NULL); }
| '(' opt_string ',' list ',' list ',' list ')'
{ $$ = makevar ($2, $4, $6, $8); }
;
opt_string:
/* empty */ { $$ = ""; }
| STRING { $$ = $1; }
;
list:
'(' items ')'
{ $$ = $2; }
| /* empty */
{ $$ = NULL; }
;
items:
item
/* Note right recursion. */
| item ',' items
{ $1->next = $3; $$ = $1; }
;
item:
STRING
{ $$ = makenode ($1); }
;
%%
static struct node *
makenode (s)
char *s;
{
struct node *n;
n = (struct node *) malloc (sizeof (struct node));
n->text = s;
n->next = NULL;
return n;
}
static struct variation *
makevar (name, inputs, outputs, literals)
char *name;
struct node *inputs, *outputs, *literals;
{
struct variation *v;
v = (struct variation *) malloc (sizeof (struct variation));
v->name = name;
v->code = ndefs++;
v->inputs = inputs;
v->outputs = outputs;
v->literals = literals;
v->next = NULL;
return v;
}
static struct def *
makedef (name, template, vars)
char *name, *template;
struct variation *vars;
{
struct def *d;
d = (struct def *) malloc (sizeof (struct def));
d->basename = name;
d->template = template;
d->variations = vars;
d->next = NULL;
return d;
}
void
yyerror (s)
char *s;
{
fprintf (stderr, "syntax error in input\n");
exit (FATAL_EXIT_CODE);
}

View File

@@ -1,61 +0,0 @@
/* Reverse order of definitions obtained from bytecode definition file.
Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "hconfig.h"
#include "bi-defs.h"
void
reverse()
{
struct def *dp, *d, *dn;
struct variation *vp, *v, *vn;
dp = defs;
if (dp)
{
vp = dp->variations;
if (vp)
{
for (v = vp->next, vp->next = 0; v; vp = v, v = vn)
{
vn = v->next;
v->next = vp;
}
dp->variations = vp;
}
for (d = dp->next, dp->next = 0; d; dp = d, d = dn)
{
vp = d->variations;
if (vp)
{
for (v = vp->next, vp->next = 0; v; vp = v, v = vn)
{
vn = v->next;
v->next = vp;
}
d->variations = vp;
}
dn = d->next;
d->next = dp;
}
defs = dp;
}
}

View File

@@ -1,159 +0,0 @@
/* Definitions for Bytecode Interpreter.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define MAXLITERALS 5
struct arityvec
{
char ninputs;
char noutputs;
char nliterals;
char literals[MAXLITERALS];
};
struct argtype
{
int modealign; /* Argument mode:alignment */
int size; /* Argument size, in bytes */
};
struct callinfo
{
int nargs; /* Number of arguments in call */
struct argtype retvaltype; /* Type of return value */
struct argtype argtypes[1]; /* Argument types */
};
/* Structure describing a bytecode function. If this changes, we also
need to change expand_function_end () in bc-trans.c */
struct bytecode
{
int stacksize; /* Depth required of evaluation stack. */
int localsize; /* Size in bytes of local variables. */
unsigned char *pc0; /* Initial program counter. */
void **ptrlit; /* Vector of (relocatable) pointer literals. */
struct callinfo *callinfo; /* Vector of procedure call type info. */
};
#define INTERP_BPC 8 /* Bits per char */
#define INTERP_BPI \
(sizeof (int) * INTERP_BPC) /* Bits per int */
#ifndef min
#define min(L, R) ((L) < (R) ? (L) : (R))
#endif
/* bit field operations. */
/* Low (high) mask: int with low (high) N bits set */
#define LM(N) ((1 << (N)) - 1)
#define HM(N) ((~LM (INTERP_BPI - (N))))
/* Sign-extend SIZE low bits of VALUE to integer (typeof VALUE)
Signed bitfields are loaded from memory by the sxloadBI instruction,
which first retrieves the bitfield with XFIELD and then sign extends
it to an SItype. */
#define EXTEND(SIZE, VALUE) \
({ SUtype value = (SUtype) (VALUE); \
(value & (1 << ((SIZE) - 1)) ? value | ~LM (SIZE) : value); })
/* Given OFFSET:SIZE for a bitfield, calculate:
[1] BYTE_OFFSET = the byte offset of the bit field.
[2] BIT_OFFSET = the bit offset of the bit field (less than INTERP_BPC).
[3] NBYTES = the number of integral bytes in the bit field.
[4] TRAILING_BITS= the number of trailing bits (less than INTERP_BPC).
, , , , , (memory bytes)
---------------- (bitfield)
| | || | | (divisions)
^ ^ ^ ^
| | | |__ [4] (bits)
| | |_________ [3] (bytes)
| |_________________ [2] (bits)
|___________________________ [1] (bytes)
The above applies to BYTE_LOW_ENDIAN machines. In BYTE_BIG_ENDIAN machines, the
bit numbering is reversed (i.e. bit 0 is the sign bit).
(All right, so I drew this to keep my tongue in cheek while writing the code below,
not because I'm into ASCII art.) */
#define BI_PARAMS(OFFSET, SIZE, BYTE_OFFSET, BIT_OFFSET, NBYTES, TRAILING_BITS) \
{ BYTE_OFFSET = (OFFSET) / (INTERP_BPC); \
BIT_OFFSET = (OFFSET) % (INTERP_BPC); \
NBYTES = ((SIZE) - (INTERP_BPC - (BIT_OFFSET))) / INTERP_BPC; \
if ((NBYTES) < 0 || ((NBYTES) > 64)) \
NBYTES = 0; \
if ((SIZE) + (BIT_OFFSET) <= INTERP_BPC) \
TRAILING_BITS = 0; \
else \
TRAILING_BITS = ((SIZE) - (INTERP_BPC - (BIT_OFFSET))) % INTERP_BPC; }
/* SHIFT_IN_BITS retrieves NBITS bits from SOURCE and shifts into
DEST. The bit field starts OFFSET bits into SOURCE.
OR_IN_BITS copies the NBITS low bits from VALUE into a the bitfield in
DEST offset by OFFSET bits. */
#define SHIFT_IN_BITS(DEST, SOURCE, OFFSET, NBITS) \
(DEST = ((DEST) << (NBITS)) \
| (LM ((NBITS)) \
& ((SOURCE) \
>> (BYTES_BIG_ENDIAN \
? (INTERP_BPC - (OFFSET) - (NBITS)) \
: (OFFSET)))))
#define OR_IN_BITS(DEST, VALUE, OFFSET, NBITS) \
(DEST = ((DEST) & ~(LM ((NBITS)) \
<< (BIG_ENDIAN \
? (INTERP_BPC - (OFFSET) - (NBITS)) \
: (OFFSET))) \
| (((VALUE) & LM ((NBITS))) \
<< (BIG_ENDIAN \
? (INTERP_BPC - (OFFSET) - (NBITS)) \
: (OFFSET)))))
/* Procedure call; arguments are a pointer to the function to be called,
a pointer to a place to store the return value, a pointer to a vector
describing the type of procedure call, and the interpreter's stack pointer,
which will point to the first of the arguments at this point. */
#define CALL(FUNC, CALLDESC, RETVAL, SP) __call(FUNC, CALLDESC, RETVAL, SP)
/* Procedure return; arguments are a pointer to the calldesc for this
function, and a pointer to the place where the value to be returned
may be found. Generally the MACHARGS above contain a machine dependent
cookie that is used to determine where to jump to. */
#define PROCRET(CALLDESC, RETVAL) return

View File

@@ -1,583 +0,0 @@
/* Functions to support general ended bitmaps.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "config.h"
#include "rtl.h"
#include "flags.h"
#include "obstack.h"
#include "regs.h"
#include "basic-block.h"
/* The contents of the current function definition are allocated
in this obstack, and all are freed at the end of the function.
For top-level functions, this is temporary_obstack.
Separate obstacks are made for nested functions. */
extern struct obstack *function_obstack;
#ifndef INLINE
#ifndef __GNUC__
#define INLINE
#else
#define INLINE __inline__
#endif
#endif
/* Global data */
bitmap_element bitmap_zero; /* An element of all zero bits. */
bitmap_element *bitmap_free; /* Freelist of bitmap elements. */
static void bitmap_element_free PROTO((bitmap, bitmap_element *));
static bitmap_element *bitmap_element_allocate PROTO((bitmap));
static int bitmap_element_zerop PROTO((bitmap_element *));
static void bitmap_element_link PROTO((bitmap, bitmap_element *));
static bitmap_element *bitmap_find_bit PROTO((bitmap, unsigned int));
/* Free a bitmap element */
static INLINE void
bitmap_element_free (head, elt)
bitmap head;
bitmap_element *elt;
{
bitmap_element *next = elt->next;
bitmap_element *prev = elt->prev;
if (prev)
prev->next = next;
if (next)
next->prev = prev;
if (head->first == elt)
head->first = next;
/* Since the first thing we try is to insert before current,
make current the next entry in preference to the previous. */
if (head->current == elt)
head->current = next != 0 ? next : prev;
elt->next = bitmap_free;
bitmap_free = elt;
}
/* Allocate a bitmap element. The bits are cleared, but nothing else is. */
static INLINE bitmap_element *
bitmap_element_allocate (head)
bitmap head;
{
bitmap_element *element;
int i;
if (bitmap_free != 0)
{
element = bitmap_free;
bitmap_free = element->next;
}
else
element = (bitmap_element *) obstack_alloc (function_obstack,
sizeof (bitmap_element));
#if BITMAP_ELEMENT_WORDS == 2
element->bits[0] = element->bits[1] = 0;
#else
for (i = 0; i < BITMAP_ELEMENT_WORDS; i++)
element->bits[i] = 0;
#endif
return element;
}
/* Return nonzero if all bits in an element are zero. */
static INLINE int
bitmap_element_zerop (element)
bitmap_element *element;
{
#if BITMAP_ELEMENT_WORDS == 2
return (element->bits[0] | element->bits[1]) == 0;
#else
int i;
for (i = 0; i < BITMAP_ELEMENT_WORDS; i++)
if (element->bits[i] != 0)
return 0;
return 1;
#endif
}
/* Link the bitmap element into the current bitmap linked list. */
static INLINE void
bitmap_element_link (head, element)
bitmap head;
bitmap_element *element;
{
unsigned int indx = element->indx;
bitmap_element *ptr;
/* If this is the first and only element, set it in. */
if (head->first == 0)
{
element->next = element->prev = 0;
head->first = element;
}
/* If this index is less than that of the current element, it goes someplace
before the current element. */
else if (indx < head->indx)
{
for (ptr = head->current;
ptr->prev != 0 && ptr->prev->indx > indx;
ptr = ptr->prev)
;
if (ptr->prev)
ptr->prev->next = element;
else
head->first = element;
element->prev = ptr->prev;
element->next = ptr;
ptr->prev = element;
}
/* Otherwise, it must go someplace after the current element. */
else
{
for (ptr = head->current;
ptr->next != 0 && ptr->next->indx < indx;
ptr = ptr->next)
;
if (ptr->next)
ptr->next->prev = element;
element->next = ptr->next;
element->prev = ptr;
ptr->next = element;
}
/* Set up so this is the first element searched. */
head->current = element;
head->indx = indx;
}
/* Clear a bitmap by freeing the linked list. */
void INLINE
bitmap_clear (head)
bitmap head;
{
bitmap_element *element, *next;
for (element = head->first; element != 0; element = next)
{
next = element->next;
element->next = bitmap_free;
bitmap_free = element;
}
head->first = head->current = 0;
}
/* Copy a bitmap to another bitmap */
void
bitmap_copy (to, from)
bitmap to;
bitmap from;
{
bitmap_element *from_ptr, *to_ptr = 0;
int i;
bitmap_clear (to);
/* Copy elements in forward direction one at a time */
for (from_ptr = from->first; from_ptr; from_ptr = from_ptr->next)
{
bitmap_element *to_elt = bitmap_element_allocate (to);
to_elt->indx = from_ptr->indx;
#if BITMAP_ELEMENT_WORDS == 2
to_elt->bits[0] = from_ptr->bits[0];
to_elt->bits[1] = from_ptr->bits[1];
#else
for (i = 0; i < BITMAP_ELEMENT_WORDS; i++)
to_elt->bits[i] = from_ptr->bits[i];
#endif
/* Here we have a special case of bitmap_element_link, for the case
where we know the links are being entered in sequence. */
if (to_ptr == 0)
{
to->first = to->current = to_elt;
to->indx = from_ptr->indx;
to_elt->next = to_elt->prev = 0;
}
else
{
to_elt->prev = to_ptr;
to_elt->next = 0;
to_ptr->next = to_elt;
}
to_ptr = to_elt;
}
}
/* Find a bitmap element that would hold a bitmap's bit.
Update the `current' field even if we can't find an element that
would hold the bitmap's bit to make eventual allocation
faster. */
static INLINE bitmap_element *
bitmap_find_bit (head, bit)
bitmap head;
unsigned int bit;
{
bitmap_element *element;
unsigned HOST_WIDE_INT indx = bit / BITMAP_ELEMENT_ALL_BITS;
if (head->current == 0)
return 0;
if (head->indx > indx)
for (element = head->current;
element->prev != 0 && element->indx > indx;
element = element->prev)
;
else
for (element = head->current;
element->next != 0 && element->indx < indx;
element = element->next)
;
/* `element' is the nearest to the one we want. If it's not the one we
want, the one we want doesn't exist. */
head->current = element;
head->indx = element->indx;
if (element != 0 && element->indx != indx)
element = 0;
return element;
}
/* Clear a single bit in a bitmap. */
void
bitmap_clear_bit (head, bit)
bitmap head;
int bit;
{
bitmap_element *ptr = bitmap_find_bit (head, bit);
if (ptr != 0)
{
unsigned bit_num = bit % (unsigned) HOST_BITS_PER_WIDE_INT;
unsigned word_num = ((bit / (unsigned) HOST_BITS_PER_WIDE_INT)
% BITMAP_ELEMENT_WORDS);
ptr->bits[word_num] &= ~ (((unsigned HOST_WIDE_INT) 1) << bit_num);
/* If we cleared the entire word, free up the element */
if (bitmap_element_zerop (ptr))
bitmap_element_free (head, ptr);
}
}
/* Set a single bit in a bitmap. */
void
bitmap_set_bit (head, bit)
bitmap head;
int bit;
{
bitmap_element *ptr = bitmap_find_bit (head, bit);
unsigned word_num
= ((bit / (unsigned) HOST_BITS_PER_WIDE_INT) % BITMAP_ELEMENT_WORDS);
unsigned bit_num = bit % (unsigned) HOST_BITS_PER_WIDE_INT;
unsigned HOST_WIDE_INT bit_val = ((unsigned HOST_WIDE_INT) 1) << bit_num;
if (ptr == 0)
{
ptr = bitmap_element_allocate (head);
ptr->indx = bit / BITMAP_ELEMENT_ALL_BITS;
ptr->bits[word_num] = bit_val;
bitmap_element_link (head, ptr);
}
else
ptr->bits[word_num] |= bit_val;
}
/* Return whether a bit is set within a bitmap. */
int
bitmap_bit_p (head, bit)
bitmap head;
int bit;
{
bitmap_element *ptr;
unsigned bit_num;
unsigned word_num;
ptr = bitmap_find_bit (head, bit);
if (ptr == 0)
return 0;
bit_num = bit % (unsigned) HOST_BITS_PER_WIDE_INT;
word_num
= ((bit / (unsigned) HOST_BITS_PER_WIDE_INT) % BITMAP_ELEMENT_WORDS);
return
(ptr->bits[word_num] & (((unsigned HOST_WIDE_INT) 1) << bit_num)) != 0;
}
/* Store in bitmap TO the result of combining bitmap FROM1 and
FROM2 using a specific bit manipulation. */
void
bitmap_operation (to, from1, from2, operation)
bitmap to;
bitmap from1;
bitmap from2;
enum bitmap_bits operation;
{
bitmap_element *delete_list = 0;
bitmap_element *from1_ptr = from1->first;
bitmap_element *from2_ptr = from2->first;
unsigned int indx1
= (from1_ptr) ? from1_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0;
unsigned int indx2
= (from2_ptr) ? from2_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0;
bitmap_element *to_ptr = 0;
bitmap_element *from1_tmp;
bitmap_element *from2_tmp;
unsigned int indx;
int i;
/* To simplify things, always create a new list. If the old list was one
of the inputs, free it later. Otherwise, free it now. */
if (to == from1 || to == from2)
{
delete_list = to->first;
to->first = to->current = 0;
}
else
bitmap_clear (to);
while (from1_ptr != 0 || from2_ptr != 0)
{
/* Figure out whether we need to substitute zero elements for
missing links. */
if (indx1 == indx2)
{
indx = indx1;
from1_tmp = from1_ptr;
from2_tmp = from2_ptr;
from1_ptr = from1_ptr->next;
indx1 = (from1_ptr) ? from1_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0;
from2_ptr = from2_ptr->next;
indx2 = (from2_ptr) ? from2_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0;
}
else if (indx1 < indx2)
{
indx = indx1;
from1_tmp = from1_ptr;
from2_tmp = &bitmap_zero;
from1_ptr = from1_ptr->next;
indx1 = (from1_ptr) ? from1_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0;
}
else
{
indx = indx2;
from1_tmp = &bitmap_zero;
from2_tmp = from2_ptr;
from2_ptr = from2_ptr->next;
indx2 = (from2_ptr) ? from2_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0;
}
if (to_ptr == 0)
to_ptr = bitmap_element_allocate (to);
/* Do the operation, and if any bits are set, link it into the
linked list. */
switch (operation)
{
default:
abort ();
case BITMAP_AND:
#if BITMAP_ELEMENT_WORDS == 2
to_ptr->bits[0] = from1_tmp->bits[0] & from2_tmp->bits[0];
to_ptr->bits[1] = from1_tmp->bits[1] & from2_tmp->bits[1];
#else
for (i = BITMAP_ELEMENT_WORDS - 1; i >= 0; i--)
to_ptr->bits[i] = from1_tmp->bits[i] & from2_tmp->bits[i];
#endif
break;
case BITMAP_AND_COMPL:
#if BITMAP_ELEMENT_WORDS == 2
to_ptr->bits[0] = from1_tmp->bits[0] & ~ from2_tmp->bits[0];
to_ptr->bits[1] = from1_tmp->bits[1] & ~ from2_tmp->bits[1];
#else
for (i = BITMAP_ELEMENT_WORDS - 1; i >= 0; i--)
to_ptr->bits[i] = from1_tmp->bits[i] & ~ from2_tmp->bits[i];
#endif
break;
case BITMAP_IOR:
#if BITMAP_ELEMENT_WORDS == 2
to_ptr->bits[0] = from1_tmp->bits[0] | from2_tmp->bits[0];
to_ptr->bits[1] = from1_tmp->bits[1] | from2_tmp->bits[1];
#else
for (i = BITMAP_ELEMENT_WORDS - 1; i >= 0; i--)
to_ptr->bits[i] = from1_tmp->bits[i] | from2_tmp->bits[i];
#endif
break;
}
if (! bitmap_element_zerop (to_ptr))
{
to_ptr->indx = indx;
bitmap_element_link (to, to_ptr);
to_ptr = 0;
}
}
/* If we have an unallocated element due to the last element being 0,
release it back to the free pool. Don't bother calling
bitmap_element_free since it was never linked into a bitmap. */
if (to_ptr != 0)
{
to_ptr->next = bitmap_free;
bitmap_free = to_ptr;
}
/* If the output bitmap was one of the inputs, free up its
elements now that we're done. */
for (; delete_list != 0; delete_list = to_ptr)
{
to_ptr = delete_list->next;
delete_list->next = bitmap_free;
bitmap_free = delete_list;
}
}
/* Or into bitmap TO bitmap FROM1 and'ed with the complement of
bitmap FROM2. */
void
bitmap_ior_and_compl (to, from1, from2)
bitmap to;
bitmap from1;
bitmap from2;
{
bitmap_head tmp;
tmp.first = tmp.current = 0;
bitmap_operation (&tmp, from1, from2, BITMAP_AND_COMPL);
bitmap_operation (to, to, &tmp, BITMAP_IOR);
bitmap_clear (&tmp);
}
/* Initialize a bitmap header. */
bitmap
bitmap_initialize (head)
bitmap head;
{
head->first = head->current = 0;
return head;
}
/* Debugging function to print out the contents of a bitmap. */
void
bitmap_debug_file (file, head)
FILE *file;
bitmap head;
{
bitmap_element *ptr;
fprintf (file, "\nfirst = ");
fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) head->first);
fprintf (file, " current = ");
fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) head->current);
fprintf (file, " indx = %u\n", head->indx);
for (ptr = head->first; ptr; ptr = ptr->next)
{
int i, j, col = 26;
fprintf (file, "\t");
fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) ptr);
fprintf (file, " next = ");
fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) ptr->next);
fprintf (file, " prev = ");
fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) ptr->prev);
fprintf (file, " indx = %u\n\t\tbits = {", ptr->indx);
for (i = 0; i < BITMAP_ELEMENT_WORDS; i++)
for (j = 0; j < HOST_BITS_PER_WIDE_INT; j++)
if ((ptr->bits[i] & (((unsigned HOST_WIDE_INT) 1) << j)) != 0)
{
if (col > 70)
{
fprintf (file, "\n\t\t\t");
col = 24;
}
fprintf (file, " %u", (ptr->indx * BITMAP_ELEMENT_ALL_BITS
+ i * HOST_BITS_PER_WIDE_INT + j));
col += 4;
}
fprintf (file, " }\n");
}
}
/* Function to be called from the debugger to print the contents
of a bitmap. */
void
debug_bitmap (head)
bitmap head;
{
bitmap_debug_file (stdout, head);
}
/* Release any memory allocated by bitmaps. Since we allocate off of the
function_obstack, just zap the free list. */
void
bitmap_release_memory ()
{
bitmap_free = 0;
}

View File

@@ -1,239 +0,0 @@
/* Functions to support general ended bitmaps.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Number of words to use for each element in the linked list. */
#ifndef BITMAP_ELEMENT_WORDS
#define BITMAP_ELEMENT_WORDS 2
#endif
/* Number of bits in each actual element of a bitmap. We get slightly better
code for bit % BITMAP_ELEMENT_ALL_BITS and bit / BITMAP_ELEMENT_ALL_BITS if
bits is unsigned, assuming it is a power of 2. */
#define BITMAP_ELEMENT_ALL_BITS \
((unsigned) (BITMAP_ELEMENT_WORDS * HOST_BITS_PER_WIDE_INT))
/* Bitmap set element. We use a linked list to hold only the bits that
are set. This allows for use to grow the bitset dynamically without
having to realloc and copy a giant bit array. The `prev' field is
undefined for an element on the free list. */
typedef struct bitmap_element_def
{
struct bitmap_element_def *next; /* Next element. */
struct bitmap_element_def *prev; /* Previous element. */
unsigned int indx; /* regno/BITMAP_ELEMENT_ALL_BITS. */
unsigned HOST_WIDE_INT bits[BITMAP_ELEMENT_WORDS]; /* Bits that are set. */
} bitmap_element;
/* Head of bitmap linked list. */
typedef struct bitmap_head_def {
bitmap_element *first; /* First element in linked list. */
bitmap_element *current; /* Last element looked at. */
int indx; /* Index of last element looked at. */
} bitmap_head, *bitmap;
/* Enumeration giving the various operations we support. */
enum bitmap_bits {
BITMAP_AND, /* TO = FROM1 & FROM2 */
BITMAP_AND_COMPL, /* TO = FROM1 & ~ FROM2 */
BITMAP_IOR /* TO = FROM1 | FROM2 */
};
/* Global data */
extern bitmap_element *bitmap_free; /* Freelist of bitmap elements */
extern bitmap_element bitmap_zero; /* Zero bitmap element */
/* Clear a bitmap by freeing up the linked list. */
extern void bitmap_clear PROTO((bitmap));
/* Copy a bitmap to another bitmap. */
extern void bitmap_copy PROTO((bitmap, bitmap));
/* Perform an operation on two bitmaps, yielding a third. */
extern void bitmap_operation PROTO((bitmap, bitmap, bitmap, enum bitmap_bits));
/* `or' into one bitmap the `and' of a second bitmap witih the complement
of a third. */
extern void bitmap_ior_and_compl PROTO((bitmap, bitmap, bitmap));
/* Clear a single register in a register set. */
extern void bitmap_clear_bit PROTO((bitmap, int));
/* Set a single register in a register set. */
extern void bitmap_set_bit PROTO((bitmap, int));
/* Return true if a register is set in a register set. */
extern int bitmap_bit_p PROTO((bitmap, int));
/* Debug functions to print a bitmap linked list. */
extern void bitmap_debug PROTO((bitmap));
extern void bitmap_debug_file STDIO_PROTO((FILE *, bitmap));
/* Initialize a bitmap header. */
extern bitmap bitmap_initialize PROTO((bitmap));
/* Release all memory held by bitmaps. */
extern void bitmap_release_memory PROTO((void));
/* Allocate a bitmap with oballoc. */
#define BITMAP_OBSTACK_ALLOC(OBSTACK) \
bitmap_initialize ((bitmap) obstack_alloc (OBSTACK, sizeof (bitmap_head)))
/* Allocate a bitmap with alloca. */
#define BITMAP_ALLOCA() \
bitmap_initialize ((bitmap) alloca (sizeof (bitmap_head)))
/* Do any cleanup needed on a bitmap when it is no longer used. */
#define BITMAP_FREE(BITMAP) \
do { \
if (BITMAP) \
{ \
bitmap_clear (BITMAP); \
(BITMAP) = 0; \
} \
} while (0)
/* Do any one-time initializations needed for bitmaps. */
#define BITMAP_INIT_ONCE()
/* Loop over all bits in BITMAP, starting with MIN, setting BITNUM to the
bit number and executing CODE for all bits that are set. */
#define EXECUTE_IF_SET_IN_BITMAP(BITMAP, MIN, BITNUM, CODE) \
do { \
bitmap_element *ptr_ = (BITMAP)->first; \
unsigned int indx_ = (MIN) / BITMAP_ELEMENT_ALL_BITS; \
unsigned bit_num_ = (MIN) % ((unsigned) HOST_BITS_PER_WIDE_INT); \
unsigned word_num_ = (((MIN) / ((unsigned) HOST_BITS_PER_WIDE_INT)) \
% BITMAP_ELEMENT_WORDS); \
\
\
/* Find the block the minimum bit is in. */ \
while (ptr_ != 0 && ptr_->indx < indx_) \
ptr_ = ptr_->next; \
\
if (ptr_ != 0 && ptr_->indx != indx_) \
{ \
bit_num_ = 0; \
word_num_ = 0; \
} \
\
for (; ptr_ != 0; ptr_ = ptr_->next) \
{ \
for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \
{ \
unsigned HOST_WIDE_INT word_ = ptr_->bits[word_num_]; \
\
if (word_ != 0) \
{ \
for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \
{ \
unsigned HOST_WIDE_INT mask_ \
= ((unsigned HOST_WIDE_INT) 1) << bit_num_; \
\
if ((word_ & mask_) != 0) \
{ \
word_ &= ~ mask_; \
(BITNUM) = (ptr_->indx * BITMAP_ELEMENT_ALL_BITS \
+ word_num_ * HOST_BITS_PER_WIDE_INT \
+ bit_num_); \
CODE; \
\
if (word_ == 0) \
break; \
} \
} \
} \
\
bit_num_ = 0; \
} \
\
word_num_ = 0; \
} \
} while (0)
/* Loop over all bits in BITMAP1 and BITMAP2, starting with MIN, setting
BITNUM to the bit number and executing CODE for all bits that are set in
the first bitmap and not set in the second. */
#define EXECUTE_IF_AND_COMPL_IN_BITMAP(BITMAP1, BITMAP2, MIN, BITNUM, CODE) \
do { \
bitmap_element *ptr1_ = (BITMAP1)->first; \
bitmap_element *ptr2_ = (BITMAP2)->first; \
unsigned int indx_ = (MIN) / BITMAP_ELEMENT_ALL_BITS; \
unsigned bit_num_ = (MIN) % ((unsigned) HOST_BITS_PER_WIDE_INT); \
unsigned word_num_ = (((MIN) / ((unsigned) HOST_BITS_PER_WIDE_INT)) \
% BITMAP_ELEMENT_WORDS); \
\
/* Find the block the minimum bit is in in the first bitmap. */ \
while (ptr1_ != 0 && ptr1_->indx < indx_) \
ptr1_ = ptr1_->next; \
\
if (ptr1_ != 0 && ptr1_->indx != indx_) \
{ \
bit_num_ = 0; \
word_num_ = 0; \
} \
\
for (; ptr1_ != 0 ; ptr1_ = ptr1_->next) \
{ \
/* Advance BITMAP2 to the equivalent link, using an all \
zero element if an equavialent link doesn't exist. */ \
bitmap_element *tmp2_; \
\
while (ptr2_ != 0 && ptr2_->indx < ptr1_->indx) \
ptr2_ = ptr2_->next; \
\
tmp2_ = ((ptr2_ != 0 && ptr2_->indx == ptr1_->indx) \
? ptr2_ : &bitmap_zero); \
\
for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \
{ \
unsigned HOST_WIDE_INT word_ = (ptr1_->bits[word_num_] \
& ~ tmp2_->bits[word_num_]); \
if (word_ != 0) \
{ \
for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \
{ \
unsigned HOST_WIDE_INT mask_ \
= ((unsigned HOST_WIDE_INT)1) << bit_num_; \
\
if ((word_ & mask_) != 0) \
{ \
word_ &= ~ mask_; \
(BITNUM) = (ptr1_->indx * BITMAP_ELEMENT_ALL_BITS \
+ word_num_ * HOST_BITS_PER_WIDE_INT \
+ bit_num_); \
\
CODE; \
if (word_ == 0) \
break; \
} \
} \
} \
\
bit_num_ = 0; \
} \
\
word_num_ = 0; \
} \
} while (0)

View File

@@ -1,35 +0,0 @@
# We have to use the cross-compiler we just built to compile it.
CC = gcc -b $(host)
# Need those to compile binaries running on host machine.
# It is configured by
#
# configure --host=target_cpu-target_os \
# --target=host=target_cpu-target_os --build=host_cpu-host_os
#
# That HOST stuff has to be taken care of very carefully.
HOST_PREFIX=l-
HOST_PREFIX_1=$(HOST_PREFIX)
HOST_CC=$(CC) -b $(build)
HOST_CFLAGS=$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
HOST_CLIB=
HOST_LDFLAGS=$(LDFLAGS)
HOST_CPPFLAGS=$(ALL_CPPFLAGS)
HOST_ALLOCA=$(ALLOCA)
HOST_MALLOC=$(MALLOC)
HOST_OBSTACK=$(OBSTACK)
# To build the native compiler with the cross compiler, the headers
# for the target are already fixed. And /usr/include is for host, not
# target.
FIXINCLUDES=Makefile.in
# Don't run fixproto either
STMP_FIXPROTO =
# Cause installation using install-build. We do nothing here.
INSTALL_TARGET = install-build
# Don't try to compile the things we can't compile or we have made
# while making gcc with the cross-compiler.
ALL = all.build

View File

@@ -1,322 +0,0 @@
# -*- C -*-
# bytecode.def - definitions of bytecodes for the stack machine.
# The production of the bytecode interpreter and compiler is
# heavily automated by using this file creatively.
# Various elementary data types are understood by the bytecode interpreter.
# Q[IU] - quarter word (byte) signed and unsigned integers (char).
# H[IU] - half word signed and unsigned integers (short int, maybe int).
# S[IU] - single word signed and unsigned integers (maybe int, long int).
# D[IU] - double word signed and unsigned integers (long long int).
# SF - single precision floating point (float).
# DF - double precision floating point (double).
# XF - extended precision floating point (long double).
# P - pointer type for address arithmetic and other purposes.
# The bytecode specification consists of a series of define_operator
# forms, that are parsed by preprocessors to automatically build
# various switch statements.
# define_operator(name,
# <C prototype code for implementing the operator>,
# <list of variations>)
# The <C prototype> is self explanatory.
# The <list of variations> consists of a (parenthesized list) of
# variation items, each of which is in itself a list. A variation
# item consists of a name suffix, the types of the input arguments
# expected on the stack (shallowest item first) and (optionally) the
# types of the output arguments (similarly ordered). Finally, the
# types of the literal arguments (if any) may appear.
# Substitution in the C prototype code is as follows:
# Substitution happens only after a dollar sign. To get a literal
# dollar sign (why would you ever want one anyway?) use $$.
# $R1 means "result 1" $TR1 means "type name of result one"
# $S1 means "source 1" and similarly with $TS1.
# $L1 means "literal (inline) argument 1" and $TL1 means type thereof.
#
# Notice that the number following $R doesn't affect the push order;
# it's used only for clarity and orthogonality, although it's checked
# to make sure it doesn't exceed the number of outputs. A $R reference
# results in a push, and represents the result lvalue. E.g.
# $R1 = 2\, $R2 = 17
# will expand to:
# INTERP_PUSH($TR1) = 2, INTERP_PUSH($TR2) = 17
#
# Opcode 0 should never happen.
define_operator(neverneverland, abort\(\), (()))
# Stack manipulations.
define_operator(drop, 0, ((, (SI))))
define_operator(duplicate, 0, ((, (SI), (SI, SI))))
define_operator(over, 0, ((, (SI), (SI, SI))))
# Adjust stack pointer
define_operator(setstack, 0, ((SI,,,(SI))))
define_operator(adjstack, 0, ((SI,,,(SI))))
# Constants, loads, and stores.
define_operator(const,
$R1 = $L1,
((QI,, (QI), (QI)), (HI,, (HI), (HI)),
(SI,, (SI), (SI)), (DI,, (DI), (DI)),
(SF,, (SF), (SF)), (DF,, (DF), (DF)),
(XF,, (XF), (XF)), (P,, (P), (P))))
define_operator(load,
$R1 = *\($TR1 *\) $S1,
((QI, (P), (QI)), (HI, (P), (HI)),
(SI, (P), (SI)), (DI, (P), (DI)),
(SF, (P), (SF)), (DF, (P), (DF)),
(XF, (P), (XF)), (P, (P), (P))))
define_operator(store,
*\($TS2 *\) $S1 = $S2,
((QI, (P, QI)), (HI, (P, HI)),
(SI, (P, SI)), (DI, (P, DI)),
(SF, (P, SF)), (DF, (P, DF)),
(XF, (P, XF)), (P, (P, P)),
(BLK, (SI, BLK, BLK))))
# Clear memory block
define_operator(clear, $S1 + $S2, ((BLK, (SI, BLK))))
# Advance pointer by SI constant
define_operator(addconst, $R1 = $S1, ((PSI, (P), (P), (SI))))
# newlocalSI is used for creating variable-sized storage during function
# initialization.
# Create local space, return pointer to block
define_operator(newlocal, $R1 = $S1, ((SI, (SI), (P))))
# Push the address of a local variable.
define_operator(local, $R1 = locals + $L1, ((P,, (P), (SI))))
# Push the address of an argument variable.
define_operator(arg, $R1 = args + $L1, ((P,, (P), (SI))))
# Arithmetic conversions.
define_operator(convert,
$R1 = \($TR1\) $S1,
(# Signed integral promotions (sign extensions).
(QIHI, (QI), (HI)), (HISI, (HI), (SI)), (SIDI, (SI), (DI)),
(QISI, (QI), (SI)),
# Unsigned integral promotions (zero extensions).
(QUHU, (QU), (HU)), (HUSU, (HU), (SU)), (SUDU, (SU), (DU)),
(QUSU, (QU), (SU)),
# Floating promotions.
(SFDF, (SF), (DF)), (DFXF, (DF), (XF)),
# Integral truncation.
(HIQI, (HI), (QI)), (SIHI, (SI), (HI)), (DISI, (DI), (SI)),
(SIQI, (SI), (QI)),
# Unsigned truncation.
(SUQU, (SU), (QU)),
# Floating truncation.
(DFSF, (DF), (SF)), (XFDF, (XF), (DF)),
# Integral conversions to floating types.
(SISF, (SI), (SF)), (SIDF, (SI), (DF)), (SIXF, (SI), (XF)),
(SUSF, (SU), (SF)), (SUDF, (SU), (DF)), (SUXF, (SU), (XF)),
(DISF, (DI), (SF)), (DIDF, (DI), (DF)), (DIXF, (DI), (XF)),
(DUSF, (DU), (SF)), (DUDF, (DU), (DF)), (DUXF, (DU), (XF)),
# Floating conversions to integral types.
(SFSI, (SF), (SI)), (DFSI, (DF), (SI)), (XFSI, (XF), (SI)),
(SFSU, (SF), (SU)), (DFSU, (DF), (SU)), (XFSU, (XF), (SU)),
(SFDI, (SF), (DI)), (DFDI, (DF), (DI)), (XFDI, (XF), (DI)),
(SFDU, (SF), (DU)), (DFDU, (DF), (DU)), (XFDU, (XF), (DU)),
# Pointer/integer conversions.
(PSI, (P), (SI)), (SIP, (SI), (P))))
# Truth value conversion. These are necessary because conversions of, e.g.,
# floating types to integers may not function correctly for large values.
define_operator(convert,
$R1 = !!$S1,
((SIT, (SI), (T)), (DIT, (DI), (T)),
(SFT, (SF), (T)), (DFT, (DF), (T)),
(XFT, (XF), (T)), (PT, (P), (T))))
# Bit field load/store.
# Load and zero-extend bitfield
define_operator(zxload, $R1 = $S1, ((BI, (SU, SU, P), (SU))))
# Load and sign-extend bitfield
define_operator(sxload, $R1 = $S1, ((BI, (SU, SU, P), (SI))))
# Store integer in bitfield
define_operator(sstore, $R1 = $S1, ((BI, (SU, SU, P, SI))))
# Binary operations.
define_operator(add,
$R1 = $S1 + $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI)),
(SF, (SF, SF), (SF)), (DF, (DF, DF), (DF)),
(XF, (XF, XF), (XF)),
(PSI, (P, SI), (P))))
define_operator(sub,
$R1 = $S1 - $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI)),
(SF, (SF, SF), (SF)), (DF, (DF, DF), (DF)),
(XF, (XF, XF), (XF)),
(PP, (P, P), (SI))))
define_operator(mul,
$R1 = $S1 * $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI)),
(SU, (SU, SU), (SU)), (DU, (DU, DU), (DU)),
(SF, (SF, SF), (SF)), (DF, (DF, DF), (DF)),
(XF, (XF, XF), (XF))))
define_operator(div,
$R1 = $S1 / $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI)),
(SU, (SU, SU), (SU)), (DU, (DU, DU), (DU)),
(SF, (SF, SF), (SF)), (DF, (DF, DF), (DF)),
(XF, (XF, XF), (XF))))
define_operator(mod,
$R1 = $S1 % $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI)),
(SU, (SU, SU), (SU)), (DU, (DU, DU), (DU))))
define_operator(and,
$R1 = $S1 & $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI))))
define_operator(ior,
$R1 = $S1 | $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI))))
define_operator(xor,
$R1 = $S1 ^ $S2,
((SI, (SI, SI), (SI)), (DI, (DI, DI), (DI))))
define_operator(lshift,
$R1 = $S1 << $S2,
((SI, (SI, SI), (SI)), (SU, (SU, SI), (SU)),
(DI, (DI, SI), (DI)), (DU, (DU, SI), (DU))))
define_operator(rshift,
$R1 = $S1 >> $S2,
((SI, (SI, SI), (SI)), (SU, (SU, SI), (SU)),
(DI, (DI, SI), (DI)), (DU, (DU, SI), (DU))))
define_operator(lt,
$R1 = $S1 < $S2,
((SI, (SI, SI), (T)), (SU, (SU, SU), (T)),
(DI, (DI, DI), (T)), (DU, (DU, DU), (T)),
(SF, (SF, SF), (T)), (DF, (DF, DF), (T)),
(XF, (XF, XF), (T)), (P, (P, P), (T))))
define_operator(le,
$R1 = $S1 <= $S2,
((SI, (SI, SI), (T)), (SU, (SU, SU), (T)),
(DI, (DI, DI), (T)), (DU, (DU, DU), (T)),
(SF, (SF, SF), (T)), (DF, (DF, DF), (T)),
(XF, (XF, XF), (T)), (P, (P, P), (T))))
define_operator(ge,
$R1 = $S1 >= $S2,
((SI, (SI, SI), (T)), (SU, (SU, SU), (T)),
(DI, (DI, DI), (T)), (DU, (DU, DU), (T)),
(SF, (SF, SF), (T)), (DF, (DF, DF), (T)),
(XF, (XF, XF), (T)), (P, (P, P), (T))))
define_operator(gt,
$R1 = $S1 > $S2,
((SI, (SI, SI), (T)), (SU, (SU, SU), (T)),
(DI, (DI, DI), (T)), (DU, (DU, DU), (T)),
(SF, (SF, SF), (T)), (DF, (DF, DF), (T)),
(XF, (XF, XF), (T)), (P, (P, P), (T))))
define_operator(eq,
$R1 = $S1 == $S2,
((SI, (SI, SI), (T)), (DI, (DI, DI), (T)),
(SF, (SF, SF), (T)), (DF, (DF, DF), (T)),
(XF, (XF, XF), (T)), (P, (P, P), (T))))
define_operator(ne,
$R1 = $S1 != $S2,
((SI, (SI, SI), (T)), (DI, (DI, DI), (T)),
(SF, (SF, SF), (T)), (DF, (DF, DF), (T)),
(XF, (XF, XF), (T)), (P, (P, P), (T))))
# Unary operations.
define_operator(neg,
$R1 = -$S1,
((SI, (SI), (SI)), (DI, (DI), (DI)),
(SF, (SF), (SF)), (DF, (DF), (DF)),
(XF, (XF), (XF))))
define_operator(not,
$R1 = ~$S1,
((SI, (SI), (SI)), (DI, (DI), (DI))))
define_operator(not,
$R1 = !$S1,
((T, (SI), (SI))))
# Increment operations.
define_operator(predec,
$R1 = *\($TR1 *\) $S1 -= $S2,
((QI, (P, QI), (QI)), (HI, (P, HI), (HI)),
(SI, (P, SI), (SI)), (DI, (P, DI), (DI)),
(P, (P, SI), (P)), (SF, (P, SF), (SF)),
(DF, (P, DF), (DF)), (XF, (P, XF), (XF)),
(BI, (SU, SU, P, SI), (SI))))
define_operator(preinc,
$R1 = *\($TR1 *\) $S1 += $S2,
((QI, (P, QI), (QI)), (HI, (P, HI), (HI)),
(SI, (P, SI), (SI)), (DI, (P, DI), (DI)),
(P, (P, SI), (P)), (SF, (P, SF), (SF)),
(DF, (P, DF), (DF)), (XF, (P, XF), (XF)),
(BI, (SU, SU, P, SI), (SI))))
define_operator(postdec,
$R1 = *\($TR1 *\) $S1\, *\($TR1 *\) $S1 -= $S2,
((QI, (P, QI), (QI)), (HI, (P, HI), (HI)),
(SI, (P, SI), (SI)), (DI, (P, DI), (DI)),
(P, (P, SI), (P)), (SF, (P, SF), (SF)),
(DF, (P, DF), (DF)), (XF, (P, XF), (XF)),
(BI, (SU, SU, P, SI), (SI))))
define_operator(postinc,
$R1 = *\($TR1 *\) $S1\, *\($TR1 *\) $S1 += $S2,
((QI, (P, QI), (QI)), (HI, (P, HI), (HI)),
(SI, (P, SI), (SI)), (DI, (P, DI), (DI)),
(P, (P, SI), (P)), (SF, (P, SF), (SF)),
(DF, (P, DF), (DF)), (XF, (P, XF), (XF)),
(BI, (SU, SU, P, SI), (SI))))
# Jumps.
define_operator(xjumpif, if \($S1\) pc = code->pc0 + $L1, ((, (T),, (SI))))
define_operator(xjumpifnot, if \(! $S1\) pc = code->pc0 + $L1, ((, (T),, (SI))))
define_operator(jump, pc = code->pc0 + $L1, ((,,,(SI))))
# This is for GCC2. It jumps to the address on the stack.
define_operator(jump, pc = \(void *\) $S1, ((P,,)))
# Switches. In order to (eventually) support ranges we provide four different
# varieties of switches. Arguments are the switch index from the stack, the
# bytecode offset of the switch table, the size of the switch table, and
# the default label.
define_operator(caseSI, CASESI\($S1\, $L1\, $L2\, $L3\), ((, (SI),, (SI, SI, SI))))
define_operator(caseSU, CASESU\($S1\, $L1\, $L2\, $L3\), ((, (SU),, (SI, SI, SI))))
define_operator(caseDI, CASEDI\($S1\, $L1\, $L2\, $L3\), ((, (DI),, (SI, SI, SI))))
define_operator(caseDU, CASEDU\($S1\, $L1\, $L2\, $L3\), ((, (DU),, (SI, SI, SI))))
# Procedure call.
# Stack arguments are (deepest first):
# procedure arguments in reverse order.
# pointer to the place to hold the return value.
# address of the call description vector.
# pointer to the procedure to be called.
define_operator(call, CALL\($S1\, $S2\, $S3\, sp\), ((, (P, P, P))))
# Procedure return.
# Pushes on interpreter stack:
# value of retptr (pointer to return value storage slot)
define_operator(return, $R1 = retptr, ((P,,(P))))
# Really return.
define_operator(ret, return, (()))
# Print an obnoxious line number.
define_operator(linenote, fprintf\(stderr\, "%d\\n"\, $L1\), ((,,,(SI))))

View File

@@ -1,82 +0,0 @@
/* Bytecode definitions for GNU C-compiler.
Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
extern int output_bytecode;
extern int stack_depth;
extern int max_stack_depth;
/* Emit DI constant according to target machine word ordering */
#define bc_emit_bytecode_DI_const(CST) \
{ int opcode; \
opcode = (WORDS_BIG_ENDIAN \
? TREE_INT_CST_HIGH (CST) \
: TREE_INT_CST_LOW (CST)); \
bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \
opcode = (WORDS_BIG_ENDIAN \
? TREE_INT_CST_LOW (CST) \
: TREE_INT_CST_HIGH (CST)); \
bc_emit_bytecode_const ((char *) &opcode, sizeof opcode); \
}
extern void bc_expand_expr ();
extern void bc_output_data_constructor ();
extern void bc_store_field ();
extern void bc_load_bit_field ();
extern void bc_store_bit_field ();
extern void bc_push_offset_and_size ();
extern void bc_init_mode_to_code_map ();
/* These are just stubs, so the compiler will compile for targets
that aren't yet supported by the bytecode generator. */
#ifndef TARGET_SUPPORTS_BYTECODE
#define MACHINE_SEG_ALIGN 1
#define INT_ALIGN 1
#define PTR_ALIGN 1
#define NAMES_HAVE_UNDERSCORES
#define BC_NOP (0)
#define BC_GLOBALIZE_LABEL(FP, NAME) BC_NOP
#define BC_OUTPUT_COMMON(FP, NAME, SIZE, ROUNDED) BC_NOP
#define BC_OUTPUT_BSS(FP, NAME, SIZE, ROUNDED) BC_NOP
#define BC_OUTPUT_LOCAL(FP, NAME, SIZE, ROUNDED) BC_NOP
#define BC_OUTPUT_ALIGN(FP, ALIGN) BC_NOP
#define BC_OUTPUT_LABEL(FP, NAME) BC_NOP
#define BC_OUTPUT_SKIP(FP, SIZE) BC_NOP
#define BC_OUTPUT_LABELREF(FP, NAME) BC_NOP
#define BC_OUTPUT_FLOAT(FP, VAL) BC_NOP
#define BC_OUTPUT_DOUBLE(FP, VAL) BC_NOP
#define BC_OUTPUT_BYTE(FP, VAL) BC_NOP
#define BC_OUTPUT_FILE ASM_OUTPUT_FILE
#define BC_OUTPUT_ASCII ASM_OUTPUT_ASCII
#define BC_OUTPUT_IDENT ASM_OUTPUT_IDENT
#define BCXSTR(RTX) ((RTX)->bc_label)
#define BC_WRITE_FILE(FP) BC_NOP
#define BC_WRITE_SEGSYM(SEGSYM, FP) BC_NOP
#define BC_WRITE_RELOC_ENTRY(SEGRELOC, FP, OFFSET) BC_NOP
#define BC_START_BYTECODE_LINE(FP) BC_NOP
#define BC_WRITE_BYTECODE(SEP, VAL, FP) BC_NOP
#define BC_WRITE_RTL(R, FP) BC_NOP
#define BC_EMIT_TRAMPOLINE(TRAMPSEG, CALLINFO) BC_NOP
#define VALIDATE_STACK BC_NOP
#endif /* !TARGET_SUPPORTS_BYTECODE */

View File

@@ -1,35 +0,0 @@
/* These should come from genemit */
/* Use __signed__ in case compiling with -traditional. */
typedef __signed__ char QItype;
typedef unsigned char QUtype;
typedef __signed__ short int HItype;
typedef unsigned short int HUtype;
typedef __signed__ long int SItype;
typedef unsigned long int SUtype;
typedef __signed__ long long int DItype;
typedef unsigned long long int DUtype;
typedef float SFtype;
typedef double DFtype;
typedef long double XFtype;
typedef char *Ptype;
typedef int Ttype;
typedef union stacktype
{
QItype QIval;
QUtype QUval;
HItype HIval;
HUtype HUval;
SItype SIval;
SUtype SUval;
DItype DIval;
DUtype DUval;
SFtype SFval;
DFtype DFval;
XFtype XFval;
Ptype Pval;
Ttype Tval;
} stacktype;

View File

@@ -1,644 +0,0 @@
/* Generate information regarding function declarations and definitions based
on information stored in GCC's tree structure. This code implements the
-aux-info option.
Copyright (C) 1989, 1991, 1994, 1995 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@segfault.us.com).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "config.h"
#include "flags.h"
#include "tree.h"
#include "c-tree.h"
extern char *xmalloc ();
enum formals_style_enum {
ansi,
k_and_r_names,
k_and_r_decls
};
typedef enum formals_style_enum formals_style;
static char *data_type;
static char *concat ();
static char *concat3 ();
static char *gen_formal_list_for_type ();
static int deserves_ellipsis ();
static char *gen_formal_list_for_func_def ();
static char *gen_type ();
static char *gen_decl ();
void gen_aux_info_record ();
/* Take two strings and mash them together into a newly allocated area. */
static char *
concat (s1, s2)
char *s1;
char *s2;
{
int size1, size2;
char *ret_val;
if (!s1)
s1 = "";
if (!s2)
s2 = "";
size1 = strlen (s1);
size2 = strlen (s2);
ret_val = xmalloc (size1 + size2 + 1);
strcpy (ret_val, s1);
strcpy (&ret_val[size1], s2);
return ret_val;
}
/* Take three strings and mash them together into a newly allocated area. */
static char *
concat3 (s1, s2, s3)
char *s1;
char *s2;
char *s3;
{
int size1, size2, size3;
char *ret_val;
if (!s1)
s1 = "";
if (!s2)
s2 = "";
if (!s3)
s3 = "";
size1 = strlen (s1);
size2 = strlen (s2);
size3 = strlen (s3);
ret_val = xmalloc (size1 + size2 + size3 + 1);
strcpy (ret_val, s1);
strcpy (&ret_val[size1], s2);
strcpy (&ret_val[size1+size2], s3);
return ret_val;
}
/* Given a string representing an entire type or an entire declaration
which only lacks the actual "data-type" specifier (at its left end),
affix the data-type specifier to the left end of the given type
specification or object declaration.
Because of C language weirdness, the data-type specifier (which normally
goes in at the very left end) may have to be slipped in just to the
right of any leading "const" or "volatile" qualifiers (there may be more
than one). Actually this may not be strictly necessary because it seems
that GCC (at least) accepts `<data-type> const foo;' and treats it the
same as `const <data-type> foo;' but people are accustomed to seeing
`const char *foo;' and *not* `char const *foo;' so we try to create types
that look as expected. */
static char *
affix_data_type (type_or_decl)
char *type_or_decl;
{
char *p = type_or_decl;
char *qualifiers_then_data_type;
char saved;
/* Skip as many leading const's or volatile's as there are. */
for (;;)
{
if (!strncmp (p, "volatile ", 9))
{
p += 9;
continue;
}
if (!strncmp (p, "const ", 6))
{
p += 6;
continue;
}
break;
}
/* p now points to the place where we can insert the data type. We have to
add a blank after the data-type of course. */
if (p == type_or_decl)
return concat3 (data_type, " ", type_or_decl);
saved = *p;
*p = '\0';
qualifiers_then_data_type = concat (type_or_decl, data_type);
*p = saved;
return concat3 (qualifiers_then_data_type, " ", p);
}
/* Given a tree node which represents some "function type", generate the
source code version of a formal parameter list (of some given style) for
this function type. Return the whole formal parameter list (including
a pair of surrounding parens) as a string. Note that if the style
we are currently aiming for is non-ansi, then we just return a pair
of empty parens here. */
static char *
gen_formal_list_for_type (fntype, style)
tree fntype;
formals_style style;
{
char *formal_list = "";
tree formal_type;
if (style != ansi)
return "()";
formal_type = TYPE_ARG_TYPES (fntype);
while (formal_type && TREE_VALUE (formal_type) != void_type_node)
{
char *this_type;
if (*formal_list)
formal_list = concat (formal_list, ", ");
this_type = gen_type ("", TREE_VALUE (formal_type), ansi);
formal_list
= ((strlen (this_type))
? concat (formal_list, affix_data_type (this_type))
: concat (formal_list, data_type));
formal_type = TREE_CHAIN (formal_type);
}
/* If we got to here, then we are trying to generate an ANSI style formal
parameters list.
New style prototyped ANSI formal parameter lists should in theory always
contain some stuff between the opening and closing parens, even if it is
only "void".
The brutal truth though is that there is lots of old K&R code out there
which contains declarations of "pointer-to-function" parameters and
these almost never have fully specified formal parameter lists associated
with them. That is, the pointer-to-function parameters are declared
with just empty parameter lists.
In cases such as these, protoize should really insert *something* into
the vacant parameter lists, but what? It has no basis on which to insert
anything in particular.
Here, we make life easy for protoize by trying to distinguish between
K&R empty parameter lists and new-style prototyped parameter lists
that actually contain "void". In the latter case we (obviously) want
to output the "void" verbatim, and that what we do. In the former case,
we do our best to give protoize something nice to insert.
This "something nice" should be something that is still valid (when
re-compiled) but something that can clearly indicate to the user that
more typing information (for the parameter list) should be added (by
hand) at some convenient moment.
The string chosen here is a comment with question marks in it. */
if (!*formal_list)
{
if (TYPE_ARG_TYPES (fntype))
/* assert (TREE_VALUE (TYPE_ARG_TYPES (fntype)) == void_type_node); */
formal_list = "void";
else
formal_list = "/* ??? */";
}
else
{
/* If there were at least some parameters, and if the formals-types-list
petered out to a NULL (i.e. without being terminated by a
void_type_node) then we need to tack on an ellipsis. */
if (!formal_type)
formal_list = concat (formal_list, ", ...");
}
return concat3 (" (", formal_list, ")");
}
/* For the generation of an ANSI prototype for a function definition, we have
to look at the formal parameter list of the function's own "type" to
determine if the function's formal parameter list should end with an
ellipsis. Given a tree node, the following function will return non-zero
if the "function type" parameter list should end with an ellipsis. */
static int
deserves_ellipsis (fntype)
tree fntype;
{
tree formal_type;
formal_type = TYPE_ARG_TYPES (fntype);
while (formal_type && TREE_VALUE (formal_type) != void_type_node)
formal_type = TREE_CHAIN (formal_type);
/* If there were at least some parameters, and if the formals-types-list
petered out to a NULL (i.e. without being terminated by a void_type_node)
then we need to tack on an ellipsis. */
return (!formal_type && TYPE_ARG_TYPES (fntype));
}
/* Generate a parameter list for a function definition (in some given style).
Note that this routine has to be separate (and different) from the code that
generates the prototype parameter lists for function declarations, because
in the case of a function declaration, all we have to go on is a tree node
representing the function's own "function type". This can tell us the types
of all of the formal parameters for the function, but it cannot tell us the
actual *names* of each of the formal parameters. We need to output those
parameter names for each function definition.
This routine gets a pointer to a tree node which represents the actual
declaration of the given function, and this DECL node has a list of formal
parameter (variable) declarations attached to it. These formal parameter
(variable) declaration nodes give us the actual names of the formal
parameters for the given function definition.
This routine returns a string which is the source form for the entire
function formal parameter list. */
static char *
gen_formal_list_for_func_def (fndecl, style)
tree fndecl;
formals_style style;
{
char *formal_list = "";
tree formal_decl;
formal_decl = DECL_ARGUMENTS (fndecl);
while (formal_decl)
{
char *this_formal;
if (*formal_list && ((style == ansi) || (style == k_and_r_names)))
formal_list = concat (formal_list, ", ");
this_formal = gen_decl (formal_decl, 0, style);
if (style == k_and_r_decls)
formal_list = concat3 (formal_list, this_formal, "; ");
else
formal_list = concat (formal_list, this_formal);
formal_decl = TREE_CHAIN (formal_decl);
}
if (style == ansi)
{
if (!DECL_ARGUMENTS (fndecl))
formal_list = concat (formal_list, "void");
if (deserves_ellipsis (TREE_TYPE (fndecl)))
formal_list = concat (formal_list, ", ...");
}
if ((style == ansi) || (style == k_and_r_names))
formal_list = concat3 (" (", formal_list, ")");
return formal_list;
}
/* Generate a string which is the source code form for a given type (t). This
routine is ugly and complex because the C syntax for declarations is ugly
and complex. This routine is straightforward so long as *no* pointer types,
array types, or function types are involved.
In the simple cases, this routine will return the (string) value which was
passed in as the "ret_val" argument. Usually, this starts out either as an
empty string, or as the name of the declared item (i.e. the formal function
parameter variable).
This routine will also return with the global variable "data_type" set to
some string value which is the "basic" data-type of the given complete type.
This "data_type" string can be concatenated onto the front of the returned
string after this routine returns to its caller.
In complicated cases involving pointer types, array types, or function
types, the C declaration syntax requires an "inside out" approach, i.e. if
you have a type which is a "pointer-to-function" type, you need to handle
the "pointer" part first, but it also has to be "innermost" (relative to
the declaration stuff for the "function" type). Thus, is this case, you
must prepend a "(*" and append a ")" to the name of the item (i.e. formal
variable). Then you must append and prepend the other info for the
"function type" part of the overall type.
To handle the "innermost precedence" rules of complicated C declarators, we
do the following (in this routine). The input parameter called "ret_val"
is treated as a "seed". Each time gen_type is called (perhaps recursively)
some additional strings may be appended or prepended (or both) to the "seed"
string. If yet another (lower) level of the GCC tree exists for the given
type (as in the case of a pointer type, an array type, or a function type)
then the (wrapped) seed is passed to a (recursive) invocation of gen_type()
this recursive invocation may again "wrap" the (new) seed with yet more
declarator stuff, by appending, prepending (or both). By the time the
recursion bottoms out, the "seed value" at that point will have a value
which is (almost) the complete source version of the declarator (except
for the data_type info). Thus, this deepest "seed" value is simply passed
back up through all of the recursive calls until it is given (as the return
value) to the initial caller of the gen_type() routine. All that remains
to do at this point is for the initial caller to prepend the "data_type"
string onto the returned "seed". */
static char *
gen_type (ret_val, t, style)
char *ret_val;
tree t;
formals_style style;
{
tree chain_p;
if (TYPE_NAME (t) && DECL_NAME (TYPE_NAME (t)))
data_type = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (t)));
else
{
switch (TREE_CODE (t))
{
case POINTER_TYPE:
if (TYPE_READONLY (t))
ret_val = concat ("const ", ret_val);
if (TYPE_VOLATILE (t))
ret_val = concat ("volatile ", ret_val);
ret_val = concat ("*", ret_val);
if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE || TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE)
ret_val = concat3 ("(", ret_val, ")");
ret_val = gen_type (ret_val, TREE_TYPE (t), style);
return ret_val;
case ARRAY_TYPE:
if (TYPE_SIZE (t) == 0 || TREE_CODE (TYPE_SIZE (t)) != INTEGER_CST)
ret_val = gen_type (concat (ret_val, "[]"), TREE_TYPE (t), style);
else if (int_size_in_bytes (t) == 0)
ret_val = gen_type (concat (ret_val, "[0]"), TREE_TYPE (t), style);
else
{
int size = (int_size_in_bytes (t) / int_size_in_bytes (TREE_TYPE (t)));
char buff[10];
sprintf (buff, "[%d]", size);
ret_val = gen_type (concat (ret_val, buff),
TREE_TYPE (t), style);
}
break;
case FUNCTION_TYPE:
ret_val = gen_type (concat (ret_val, gen_formal_list_for_type (t, style)), TREE_TYPE (t), style);
break;
case IDENTIFIER_NODE:
data_type = IDENTIFIER_POINTER (t);
break;
/* The following three cases are complicated by the fact that a
user may do something really stupid, like creating a brand new
"anonymous" type specification in a formal argument list (or as
part of a function return type specification). For example:
int f (enum { red, green, blue } color);
In such cases, we have no name that we can put into the prototype
to represent the (anonymous) type. Thus, we have to generate the
whole darn type specification. Yuck! */
case RECORD_TYPE:
if (TYPE_NAME (t))
data_type = IDENTIFIER_POINTER (TYPE_NAME (t));
else
{
data_type = "";
chain_p = TYPE_FIELDS (t);
while (chain_p)
{
data_type = concat (data_type, gen_decl (chain_p, 0, ansi));
chain_p = TREE_CHAIN (chain_p);
data_type = concat (data_type, "; ");
}
data_type = concat3 ("{ ", data_type, "}");
}
data_type = concat ("struct ", data_type);
break;
case UNION_TYPE:
if (TYPE_NAME (t))
data_type = IDENTIFIER_POINTER (TYPE_NAME (t));
else
{
data_type = "";
chain_p = TYPE_FIELDS (t);
while (chain_p)
{
data_type = concat (data_type, gen_decl (chain_p, 0, ansi));
chain_p = TREE_CHAIN (chain_p);
data_type = concat (data_type, "; ");
}
data_type = concat3 ("{ ", data_type, "}");
}
data_type = concat ("union ", data_type);
break;
case ENUMERAL_TYPE:
if (TYPE_NAME (t))
data_type = IDENTIFIER_POINTER (TYPE_NAME (t));
else
{
data_type = "";
chain_p = TYPE_VALUES (t);
while (chain_p)
{
data_type = concat (data_type,
IDENTIFIER_POINTER (TREE_PURPOSE (chain_p)));
chain_p = TREE_CHAIN (chain_p);
if (chain_p)
data_type = concat (data_type, ", ");
}
data_type = concat3 ("{ ", data_type, " }");
}
data_type = concat ("enum ", data_type);
break;
case TYPE_DECL:
data_type = IDENTIFIER_POINTER (DECL_NAME (t));
break;
case INTEGER_TYPE:
data_type = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (t)));
/* Normally, `unsigned' is part of the deal. Not so if it comes
with `const' or `volatile'. */
if (TREE_UNSIGNED (t) && (TYPE_READONLY (t) || TYPE_VOLATILE (t)))
data_type = concat ("unsigned ", data_type);
break;
case REAL_TYPE:
data_type = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (t)));
break;
case VOID_TYPE:
data_type = "void";
break;
case ERROR_MARK:
data_type = "[ERROR]";
break;
default:
abort ();
}
}
if (TYPE_READONLY (t))
ret_val = concat ("const ", ret_val);
if (TYPE_VOLATILE (t))
ret_val = concat ("volatile ", ret_val);
return ret_val;
}
/* Generate a string (source) representation of an entire entity declaration
(using some particular style for function types).
The given entity may be either a variable or a function.
If the "is_func_definition" parameter is non-zero, assume that the thing
we are generating a declaration for is a FUNCTION_DECL node which is
associated with a function definition. In this case, we can assume that
an attached list of DECL nodes for function formal arguments is present. */
static char *
gen_decl (decl, is_func_definition, style)
tree decl;
int is_func_definition;
formals_style style;
{
char *ret_val;
if (DECL_NAME (decl))
ret_val = IDENTIFIER_POINTER (DECL_NAME (decl));
else
ret_val = "";
/* If we are just generating a list of names of formal parameters, we can
simply return the formal parameter name (with no typing information
attached to it) now. */
if (style == k_and_r_names)
return ret_val;
/* Note that for the declaration of some entity (either a function or a
data object, like for instance a parameter) if the entity itself was
declared as either const or volatile, then const and volatile properties
are associated with just the declaration of the entity, and *not* with
the `type' of the entity. Thus, for such declared entities, we have to
generate the qualifiers here. */
if (TREE_THIS_VOLATILE (decl))
ret_val = concat ("volatile ", ret_val);
if (TREE_READONLY (decl))
ret_val = concat ("const ", ret_val);
data_type = "";
/* For FUNCTION_DECL nodes, there are two possible cases here. First, if
this FUNCTION_DECL node was generated from a function "definition", then
we will have a list of DECL_NODE's, one for each of the function's formal
parameters. In this case, we can print out not only the types of each
formal, but also each formal's name. In the second case, this
FUNCTION_DECL node came from an actual function declaration (and *not*
a definition). In this case, we do nothing here because the formal
argument type-list will be output later, when the "type" of the function
is added to the string we are building. Note that the ANSI-style formal
parameter list is considered to be a (suffix) part of the "type" of the
function. */
if (TREE_CODE (decl) == FUNCTION_DECL && is_func_definition)
{
ret_val = concat (ret_val, gen_formal_list_for_func_def (decl, ansi));
/* Since we have already added in the formals list stuff, here we don't
add the whole "type" of the function we are considering (which
would include its parameter-list info), rather, we only add in
the "type" of the "type" of the function, which is really just
the return-type of the function (and does not include the parameter
list info). */
ret_val = gen_type (ret_val, TREE_TYPE (TREE_TYPE (decl)), style);
}
else
ret_val = gen_type (ret_val, TREE_TYPE (decl), style);
ret_val = affix_data_type (ret_val);
if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl))
ret_val = concat ("register ", ret_val);
if (TREE_PUBLIC (decl))
ret_val = concat ("extern ", ret_val);
if (TREE_CODE (decl) == FUNCTION_DECL && !TREE_PUBLIC (decl))
ret_val = concat ("static ", ret_val);
return ret_val;
}
extern FILE *aux_info_file;
/* Generate and write a new line of info to the aux-info (.X) file. This
routine is called once for each function declaration, and once for each
function definition (even the implicit ones). */
void
gen_aux_info_record (fndecl, is_definition, is_implicit, is_prototyped)
tree fndecl;
int is_definition;
int is_implicit;
int is_prototyped;
{
if (flag_gen_aux_info)
{
static int compiled_from_record = 0;
/* Each output .X file must have a header line. Write one now if we
have not yet done so. */
if (! compiled_from_record++)
{
/* The first line tells which directory file names are relative to.
Currently, -aux-info works only for files in the working
directory, so just use a `.' as a placeholder for now. */
fprintf (aux_info_file, "/* compiled from: . */\n");
}
/* Write the actual line of auxiliary info. */
fprintf (aux_info_file, "/* %s:%d:%c%c */ %s;",
DECL_SOURCE_FILE (fndecl),
DECL_SOURCE_LINE (fndecl),
(is_implicit) ? 'I' : (is_prototyped) ? 'N' : 'O',
(is_definition) ? 'F' : 'C',
gen_decl (fndecl, is_definition, ansi));
/* If this is an explicit function declaration, we need to also write
out an old-style (i.e. K&R) function header, just in case the user
wants to run unprotoize. */
if (is_definition)
{
fprintf (aux_info_file, " /*%s %s*/",
gen_formal_list_for_func_def (fndecl, k_and_r_names),
gen_formal_list_for_func_def (fndecl, k_and_r_decls));
}
fprintf (aux_info_file, "\n");
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,96 +0,0 @@
/* Language-level data type conversion for GNU C.
Copyright (C) 1987, 1988, 1991 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file contains the functions for converting C expressions
to different data types. The only entry point is `convert'.
Every language front end must have a `convert' function
but what kind of conversions it does will depend on the language. */
#include "config.h"
#include "tree.h"
#include "flags.h"
#include "convert.h"
/* Change of width--truncation and extension of integers or reals--
is represented with NOP_EXPR. Proper functioning of many things
assumes that no other conversions can be NOP_EXPRs.
Conversion between integer and pointer is represented with CONVERT_EXPR.
Converting integer to real uses FLOAT_EXPR
and real to integer uses FIX_TRUNC_EXPR.
Here is a list of all the functions that assume that widening and
narrowing is always done with a NOP_EXPR:
In convert.c, convert_to_integer.
In c-typeck.c, build_binary_op (boolean ops), and truthvalue_conversion.
In expr.c: expand_expr, for operands of a MULT_EXPR.
In fold-const.c: fold.
In tree.c: get_narrower and get_unwidened. */
/* Subroutines of `convert'. */
/* Create an expression whose value is that of EXPR,
converted to type TYPE. The TREE_TYPE of the value
is always TYPE. This function implements all reasonable
conversions; callers should filter out those that are
not permitted by the language being compiled. */
tree
convert (type, expr)
tree type, expr;
{
register tree e = expr;
register enum tree_code code = TREE_CODE (type);
if (type == TREE_TYPE (expr)
|| TREE_CODE (expr) == ERROR_MARK)
return expr;
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (expr)))
return fold (build1 (NOP_EXPR, type, expr));
if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK)
return error_mark_node;
if (TREE_CODE (TREE_TYPE (expr)) == VOID_TYPE)
{
error ("void value not ignored as it ought to be");
return error_mark_node;
}
if (code == VOID_TYPE)
return build1 (CONVERT_EXPR, type, e);
#if 0
/* This is incorrect. A truncation can't be stripped this way.
Extensions will be stripped by the use of get_unwidened. */
if (TREE_CODE (expr) == NOP_EXPR)
return convert (type, TREE_OPERAND (expr, 0));
#endif
if (code == INTEGER_TYPE || code == ENUMERAL_TYPE)
return fold (convert_to_integer (type, e));
if (code == POINTER_TYPE)
return fold (convert_to_pointer (type, e));
if (code == REAL_TYPE)
return fold (convert_to_real (type, e));
if (code == COMPLEX_TYPE)
return fold (convert_to_complex (type, e));
error ("conversion to non-scalar type requested");
return error_mark_node;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,186 +0,0 @@
/* C code produced by gperf version 2.5 (GNU C++ version) */
/* Command-line: gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$ ./c-parse.gperf */
/* Command-line: gperf -p -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */
struct resword { char *name; short token; enum rid rid; };
#define TOTAL_KEYWORDS 79
#define MIN_WORD_LENGTH 2
#define MAX_WORD_LENGTH 20
#define MIN_HASH_VALUE 10
#define MAX_HASH_VALUE 144
/* maximum key range = 135, duplicates = 0 */
#ifdef __GNUC__
inline
#endif
static unsigned int
hash (str, len)
register char *str;
register int unsigned len;
{
static unsigned char asso_values[] =
{
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 25, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 1, 145, 46, 8, 15,
61, 6, 36, 48, 3, 5, 145, 18, 63, 25,
29, 76, 1, 145, 13, 2, 1, 51, 37, 9,
9, 1, 3, 145, 145, 145, 145, 145,
};
register int hval = len;
switch (hval)
{
default:
case 3:
hval += asso_values[str[2]];
case 2:
case 1:
hval += asso_values[str[0]];
break;
}
return hval + asso_values[str[len - 1]];
}
static struct resword wordlist[] =
{
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"",},
{"int", TYPESPEC, RID_INT},
{"",}, {"",},
{"__typeof__", TYPEOF, NORID},
{"__signed__", TYPESPEC, RID_SIGNED},
{"__imag__", IMAGPART, NORID},
{"switch", SWITCH, NORID},
{"__inline__", SCSPEC, RID_INLINE},
{"else", ELSE, NORID},
{"__iterator__", SCSPEC, RID_ITERATOR},
{"__inline", SCSPEC, RID_INLINE},
{"__extension__", EXTENSION, NORID},
{"struct", STRUCT, NORID},
{"__real__", REALPART, NORID},
{"__const", TYPE_QUAL, RID_CONST},
{"while", WHILE, NORID},
{"__const__", TYPE_QUAL, RID_CONST},
{"case", CASE, NORID},
{"__complex__", TYPESPEC, RID_COMPLEX},
{"__iterator", SCSPEC, RID_ITERATOR},
{"bycopy", TYPE_QUAL, RID_BYCOPY},
{"",}, {"",}, {"",},
{"__complex", TYPESPEC, RID_COMPLEX},
{"",},
{"in", TYPE_QUAL, RID_IN},
{"break", BREAK, NORID},
{"@defs", DEFS, NORID},
{"",}, {"",}, {"",},
{"extern", SCSPEC, RID_EXTERN},
{"if", IF, NORID},
{"typeof", TYPEOF, NORID},
{"typedef", SCSPEC, RID_TYPEDEF},
{"__typeof", TYPEOF, NORID},
{"sizeof", SIZEOF, NORID},
{"",},
{"return", RETURN, NORID},
{"const", TYPE_QUAL, RID_CONST},
{"__volatile__", TYPE_QUAL, RID_VOLATILE},
{"@private", PRIVATE, NORID},
{"@selector", SELECTOR, NORID},
{"__volatile", TYPE_QUAL, RID_VOLATILE},
{"__asm__", ASM_KEYWORD, NORID},
{"",}, {"",},
{"continue", CONTINUE, NORID},
{"__alignof__", ALIGNOF, NORID},
{"__imag", IMAGPART, NORID},
{"__attribute__", ATTRIBUTE, NORID},
{"",}, {"",},
{"__attribute", ATTRIBUTE, NORID},
{"for", FOR, NORID},
{"",},
{"@encode", ENCODE, NORID},
{"id", OBJECTNAME, RID_ID},
{"static", SCSPEC, RID_STATIC},
{"@interface", INTERFACE, NORID},
{"",},
{"__signed", TYPESPEC, RID_SIGNED},
{"",},
{"__label__", LABEL, NORID},
{"",}, {"",},
{"__asm", ASM_KEYWORD, NORID},
{"char", TYPESPEC, RID_CHAR},
{"",},
{"inline", SCSPEC, RID_INLINE},
{"out", TYPE_QUAL, RID_OUT},
{"register", SCSPEC, RID_REGISTER},
{"__real", REALPART, NORID},
{"short", TYPESPEC, RID_SHORT},
{"",},
{"enum", ENUM, NORID},
{"inout", TYPE_QUAL, RID_INOUT},
{"",},
{"oneway", TYPE_QUAL, RID_ONEWAY},
{"union", UNION, NORID},
{"",},
{"__alignof", ALIGNOF, NORID},
{"",},
{"@implementation", IMPLEMENTATION, NORID},
{"",},
{"@class", CLASS, NORID},
{"",},
{"@public", PUBLIC, NORID},
{"asm", ASM_KEYWORD, NORID},
{"",}, {"",}, {"",}, {"",}, {"",},
{"default", DEFAULT, NORID},
{"",},
{"void", TYPESPEC, RID_VOID},
{"",},
{"@protected", PROTECTED, NORID},
{"@protocol", PROTOCOL, NORID},
{"",}, {"",}, {"",},
{"volatile", TYPE_QUAL, RID_VOLATILE},
{"",}, {"",},
{"signed", TYPESPEC, RID_SIGNED},
{"float", TYPESPEC, RID_FLOAT},
{"@end", END, NORID},
{"",}, {"",},
{"unsigned", TYPESPEC, RID_UNSIGNED},
{"@compatibility_alias", ALIAS, NORID},
{"double", TYPESPEC, RID_DOUBLE},
{"",}, {"",},
{"auto", SCSPEC, RID_AUTO},
{"",},
{"goto", GOTO, NORID},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"do", DO, NORID},
{"",}, {"",}, {"",}, {"",},
{"long", TYPESPEC, RID_LONG},
};
#ifdef __GNUC__
inline
#endif
struct resword *
is_reserved_word (str, len)
register char *str;
register unsigned int len;
{
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
register int key = hash (str, len);
if (key <= MAX_HASH_VALUE && key >= 0)
{
register char *s = wordlist[key].name;
if (*s == *str && !strcmp (str + 1, s + 1))
return &wordlist[key];
}
}
return 0;
}

View File

@@ -1,599 +0,0 @@
/* Build expressions with type checking for C compiler.
Copyright (C) 1987, 88, 89, 92, 93, 1996 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file is part of the C front end.
It is responsible for implementing iterators,
both their declarations and the expansion of statements using them. */
#include "config.h"
#include <stdio.h>
#include "tree.h"
#include "c-tree.h"
#include "flags.h"
#include "obstack.h"
#include "rtl.h"
/*
KEEPING TRACK OF EXPANSIONS
In order to clean out expansions corresponding to statements inside
"{(...)}" constructs we have to keep track of all expansions. The
cleanup is needed when an automatic, or implicit, expansion on
iterator, say X, happens to a statement which contains a {(...)}
form with a statement already expanded on X. In this case we have
to go back and cleanup the inner expansion. This can be further
complicated by the fact that {(...)} can be nested.
To make this cleanup possible, we keep lists of all expansions, and
to make it work for nested constructs, we keep a stack. The list at
the top of the stack (ITER_STACK.CURRENT_LEVEL) corresponds to the
currently parsed level. All expansions of the levels below the
current one are kept in one list whose head is pointed to by
ITER_STACK.SUBLEVEL_FIRST (SUBLEVEL_LAST is there for making merges
easy). The process works as follows:
-- On "({" a new node is added to the stack by PUSH_ITERATOR_STACK.
The sublevel list is not changed at this point.
-- On "})" the list for the current level is appended to the sublevel
list.
-- On ";" sublevel lists are appended to the current level lists.
The reason is this: if they have not been superseded by the
expansion at the current level, they still might be
superseded later by the expansion on the higher level.
The levels do not have to distinguish levels below, so we
can merge the lists together. */
struct ixpansion
{
tree ixdecl; /* Iterator decl */
rtx ixprologue_start; /* First insn of epilogue. NULL means */
/* explicit (FOR) expansion*/
rtx ixprologue_end;
rtx ixepilogue_start;
rtx ixepilogue_end;
struct ixpansion *next; /* Next in the list */
};
struct iter_stack_node
{
struct ixpansion *first; /* Head of list of ixpansions */
struct ixpansion *last; /* Last node in list of ixpansions */
struct iter_stack_node *next; /* Next level iterator stack node */
};
struct iter_stack_node *iter_stack;
struct iter_stack_node sublevel_ixpansions;
/* A special obstack, and a pointer to the start of
all the data in it (so we can free everything easily). */
static struct obstack ixp_obstack;
static char *ixp_firstobj;
/* During collect_iterators, a list of SAVE_EXPRs already scanned. */
static tree save_exprs;
static void expand_stmt_with_iterators_1 PROTO((tree, tree));
static tree collect_iterators PROTO((tree, tree));
static void iterator_loop_prologue PROTO((tree, rtx *, rtx *));
static void iterator_loop_epilogue PROTO((tree, rtx *, rtx *));
static int top_level_ixpansion_p PROTO((void));
static void isn_append PROTO((struct iter_stack_node *,
struct iter_stack_node *));
static void istack_sublevel_to_current PROTO((void));
static void add_ixpansion PROTO((tree, rtx, rtx, rtx, rtx));
static void delete_ixpansion PROTO((tree));
/* Initialize our obstack once per compilation. */
void
init_iterators ()
{
gcc_obstack_init (&ixp_obstack);
ixp_firstobj = (char *) obstack_alloc (&ixp_obstack, 0);
}
/* Handle the start of an explicit `for' loop for iterator IDECL. */
void
iterator_for_loop_start (idecl)
tree idecl;
{
ITERATOR_BOUND_P (idecl) = 1;
add_ixpansion (idecl, 0, 0, 0, 0);
iterator_loop_prologue (idecl, 0, 0);
}
/* Handle the end of an explicit `for' loop for iterator IDECL. */
void
iterator_for_loop_end (idecl)
tree idecl;
{
iterator_loop_epilogue (idecl, 0, 0);
ITERATOR_BOUND_P (idecl) = 0;
}
/*
ITERATOR RTL EXPANSIONS
Expanding simple statements with iterators is straightforward:
collect the list of all free iterators in the statement, and
generate a loop for each of them.
An iterator is "free" if it has not been "bound" by a FOR
operator. The DECL_RTL of the iterator is the loop counter. */
/* Expand a statement STMT, possibly containing iterator usage, into RTL. */
void
iterator_expand (stmt)
tree stmt;
{
tree iter_list;
save_exprs = NULL_TREE;
iter_list = collect_iterators (stmt, NULL_TREE);
expand_stmt_with_iterators_1 (stmt, iter_list);
istack_sublevel_to_current ();
}
static void
expand_stmt_with_iterators_1 (stmt, iter_list)
tree stmt, iter_list;
{
if (iter_list == 0)
expand_expr_stmt (stmt);
else
{
tree current_iterator = TREE_VALUE (iter_list);
tree iter_list_tail = TREE_CHAIN (iter_list);
rtx p_start, p_end, e_start, e_end;
iterator_loop_prologue (current_iterator, &p_start, &p_end);
expand_stmt_with_iterators_1 (stmt, iter_list_tail);
iterator_loop_epilogue (current_iterator, &e_start, &e_end);
/** Delete all inner expansions based on current_iterator **/
/** before adding the outer one. **/
delete_ixpansion (current_iterator);
add_ixpansion (current_iterator, p_start, p_end, e_start, e_end);
}
}
/* Return a list containing all the free (i.e. not bound by a
containing `for' statement) iterators mentioned in EXP, plus those
in LIST. Do not add duplicate entries to the list. */
static tree
collect_iterators (exp, list)
tree exp, list;
{
if (exp == 0) return list;
switch (TREE_CODE (exp))
{
case VAR_DECL:
if (! ITERATOR_P (exp) || ITERATOR_BOUND_P (exp))
return list;
if (value_member (exp, list))
return list;
return tree_cons (NULL_TREE, exp, list);
case TREE_LIST:
{
tree tail;
for (tail = exp; tail; tail = TREE_CHAIN (tail))
list = collect_iterators (TREE_VALUE (tail), list);
return list;
}
case SAVE_EXPR:
/* In each scan, scan a given save_expr only once. */
if (value_member (exp, save_exprs))
return list;
save_exprs = tree_cons (NULL_TREE, exp, save_exprs);
return collect_iterators (TREE_OPERAND (exp, 0), list);
/* we do not automatically iterate blocks -- one must */
/* use the FOR construct to do that */
case BLOCK:
return list;
default:
switch (TREE_CODE_CLASS (TREE_CODE (exp)))
{
case '1':
return collect_iterators (TREE_OPERAND (exp, 0), list);
case '2':
case '<':
return collect_iterators (TREE_OPERAND (exp, 0),
collect_iterators (TREE_OPERAND (exp, 1),
list));
case 'e':
case 'r':
{
int num_args = tree_code_length[(int) TREE_CODE (exp)];
int i;
/* Some tree codes have RTL, not trees, as operands. */
switch (TREE_CODE (exp))
{
case CALL_EXPR:
num_args = 2;
break;
case METHOD_CALL_EXPR:
num_args = 3;
break;
case WITH_CLEANUP_EXPR:
num_args = 1;
break;
case RTL_EXPR:
return list;
}
for (i = 0; i < num_args; i++)
list = collect_iterators (TREE_OPERAND (exp, i), list);
return list;
}
default:
return list;
}
}
}
/* Emit rtl for the start of a loop for iterator IDECL.
If necessary, create loop counter rtx and store it as DECL_RTL of IDECL.
The prologue normally starts and ends with notes, which are returned
by this function in *START_NOTE and *END_NODE.
If START_NOTE and END_NODE are 0, we don't make those notes. */
static void
iterator_loop_prologue (idecl, start_note, end_note)
tree idecl;
rtx *start_note, *end_note;
{
tree expr;
/* Force the save_expr in DECL_INITIAL to be calculated
if it hasn't been calculated yet. */
expand_expr (DECL_INITIAL (idecl), const0_rtx, VOIDmode, 0);
if (DECL_RTL (idecl) == 0)
expand_decl (idecl);
if (start_note)
*start_note = emit_note (0, NOTE_INSN_DELETED);
/* Initialize counter. */
expr = build (MODIFY_EXPR, TREE_TYPE (idecl), idecl, integer_zero_node);
TREE_SIDE_EFFECTS (expr) = 1;
expand_expr (expr, const0_rtx, VOIDmode, 0);
expand_start_loop_continue_elsewhere (1);
ITERATOR_BOUND_P (idecl) = 1;
if (end_note)
*end_note = emit_note (0, NOTE_INSN_DELETED);
}
/* Similar to the previous function, but for the end of the loop.
DECL_RTL is zeroed unless we are inside "({...})". The reason for that is
described below.
When we create two (or more) loops based on the same IDECL, and
both inside the same "({...})" construct, we must be prepared to
delete both of the loops and create a single one on the level
above, i.e. enclosing the "({...})". The new loop has to use the
same counter rtl because the references to the iterator decl
(IDECL) have already been expanded as references to the counter
rtl.
It is incorrect to use the same counter reg in different functions,
and it is desirable to use different counters in disjoint loops
when we know there's no need to combine them (because then they can
get allocated separately). */
static void
iterator_loop_epilogue (idecl, start_note, end_note)
tree idecl;
rtx *start_note, *end_note;
{
tree test, incr;
if (start_note)
*start_note = emit_note (0, NOTE_INSN_DELETED);
expand_loop_continue_here ();
incr = build_binary_op (PLUS_EXPR, idecl, integer_one_node, 0);
incr = build (MODIFY_EXPR, TREE_TYPE (idecl), idecl, incr);
TREE_SIDE_EFFECTS (incr) = 1;
expand_expr (incr, const0_rtx, VOIDmode, 0);
test = build_binary_op (LT_EXPR, idecl, DECL_INITIAL (idecl), 0);
expand_exit_loop_if_false (0, test);
expand_end_loop ();
ITERATOR_BOUND_P (idecl) = 0;
/* we can reset rtl since there is not chance that this expansion */
/* would be superseded by a higher level one */
/* but don't do this if the decl is static, since we need to share */
/* the same decl in that case. */
if (top_level_ixpansion_p () && ! TREE_STATIC (idecl))
DECL_RTL (idecl) = 0;
if (end_note)
*end_note = emit_note (0, NOTE_INSN_DELETED);
}
/* Return true if we are not currently inside a "({...})" construct. */
static int
top_level_ixpansion_p ()
{
return iter_stack == 0;
}
/* Given two chains of iter_stack_nodes,
append the nodes in X into Y. */
static void
isn_append (x, y)
struct iter_stack_node *x, *y;
{
if (x->first == 0)
return;
if (y->first == 0)
{
y->first = x->first;
y->last = x->last;
}
else
{
y->last->next = x->first;
y->last = x->last;
}
}
/** Make X empty **/
#define ISN_ZERO(X) (X).first=(X).last=0
/* Move the ixpansions in sublevel_ixpansions into the current
node on the iter_stack, or discard them if the iter_stack is empty.
We do this at the end of a statement. */
static void
istack_sublevel_to_current ()
{
/* At the top level we can throw away sublevel's expansions **/
/* because there is nobody above us to ask for a cleanup **/
if (iter_stack != 0)
/** Merging with empty sublevel list is a no-op **/
if (sublevel_ixpansions.last)
isn_append (&sublevel_ixpansions, iter_stack);
if (iter_stack == 0)
obstack_free (&ixp_obstack, ixp_firstobj);
ISN_ZERO (sublevel_ixpansions);
}
/* Push a new node on the iter_stack, when we enter a ({...}). */
void
push_iterator_stack ()
{
struct iter_stack_node *new_top
= (struct iter_stack_node *)
obstack_alloc (&ixp_obstack, sizeof (struct iter_stack_node));
new_top->first = 0;
new_top->last = 0;
new_top->next = iter_stack;
iter_stack = new_top;
}
/* Pop iter_stack, moving the ixpansions in the node being popped
into sublevel_ixpansions. */
void
pop_iterator_stack ()
{
if (iter_stack == 0)
abort ();
isn_append (iter_stack, &sublevel_ixpansions);
/** Pop current level node: */
iter_stack = iter_stack->next;
}
/* Record an iterator expansion ("ixpansion") for IDECL.
The remaining parameters are the notes in the loop entry
and exit rtl. */
static void
add_ixpansion (idecl, pro_start, pro_end, epi_start, epi_end)
tree idecl;
rtx pro_start, pro_end, epi_start, epi_end;
{
struct ixpansion *newix;
/* Do nothing if we are not inside "({...})",
as in that case this expansion can't need subsequent RTL modification. */
if (iter_stack == 0)
return;
newix = (struct ixpansion *) obstack_alloc (&ixp_obstack,
sizeof (struct ixpansion));
newix->ixdecl = idecl;
newix->ixprologue_start = pro_start;
newix->ixprologue_end = pro_end;
newix->ixepilogue_start = epi_start;
newix->ixepilogue_end = epi_end;
newix->next = iter_stack->first;
iter_stack->first = newix;
if (iter_stack->last == 0)
iter_stack->last = newix;
}
/* Delete the RTL for all ixpansions for iterator IDECL
in our sublevels. We do this when we make a larger
containing expansion for IDECL. */
static void
delete_ixpansion (idecl)
tree idecl;
{
struct ixpansion *previx = 0, *ix;
for (ix = sublevel_ixpansions.first; ix; ix = ix->next)
if (ix->ixdecl == idecl)
{
/** zero means that this is a mark for FOR -- **/
/** we do not delete anything, just issue an error. **/
if (ix->ixprologue_start == 0)
error_with_decl (idecl,
"`for (%s)' appears within implicit iteration");
else
{
rtx insn;
/* We delete all insns, including notes because leaving loop */
/* notes and barriers produced by iterator expansion would */
/* be misleading to other phases */
for (insn = NEXT_INSN (ix->ixprologue_start);
insn != ix->ixprologue_end;
insn = NEXT_INSN (insn))
delete_insn (insn);
for (insn = NEXT_INSN (ix->ixepilogue_start);
insn != ix->ixepilogue_end;
insn = NEXT_INSN (insn))
delete_insn (insn);
}
/* Delete this ixpansion from sublevel_ixpansions. */
if (previx)
previx->next = ix->next;
else
sublevel_ixpansions.first = ix->next;
if (sublevel_ixpansions.last == ix)
sublevel_ixpansions.last = previx;
}
else
previx = ix;
}
#ifdef DEBUG_ITERATORS
/* The functions below are for use from source level debugger.
They print short forms of iterator lists and the iterator stack. */
/* Print the name of the iterator D. */
void
prdecl (d)
tree d;
{
if (d)
{
if (TREE_CODE (d) == VAR_DECL)
{
tree tname = DECL_NAME (d);
char *dname = IDENTIFIER_POINTER (tname);
fprintf (stderr, dname);
}
else
fprintf (stderr, "<<Not a Decl!!!>>");
}
else
fprintf (stderr, "<<NULL!!>>");
}
/* Print Iterator List -- names only */
tree
pil (head)
tree head;
{
tree current, next;
for (current = head; current; current = next)
{
tree node = TREE_VALUE (current);
prdecl (node);
next = TREE_CHAIN (current);
if (next) fprintf (stderr, ",");
}
fprintf (stderr, "\n");
}
/* Print IXpansion List */
struct ixpansion *
pixl (head)
struct ixpansion *head;
{
struct ixpansion *current, *next;
fprintf (stderr, "> ");
if (head == 0)
fprintf (stderr, "(empty)");
for (current=head; current; current = next)
{
tree node = current->ixdecl;
prdecl (node);
next = current->next;
if (next)
fprintf (stderr, ",");
}
fprintf (stderr, "\n");
return head;
}
/* Print Iterator Stack. */
void
pis ()
{
struct iter_stack_node *stack_node;
fprintf (stderr, "--SubLevel: ");
pixl (sublevel_ixpansions.first);
fprintf (stderr, "--Stack:--\n");
for (stack_node = iter_stack;
stack_node;
stack_node = stack_node->next)
pixl (stack_node->first);
}
#endif /* DEBUG_ITERATORS */

View File

@@ -1,183 +0,0 @@
/* Language-specific hook definitions for C front end.
Copyright (C) 1991, 1995 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "tree.h"
#include <stdio.h>
#include "input.h"
/* Each of the functions defined here
is an alternative to a function in objc-actions.c. */
int
lang_decode_option (p)
char *p;
{
return c_decode_option (p);
}
void
lang_init ()
{
#if !USE_CPPLIB
/* the beginning of the file is a new line; check for # */
/* With luck, we discover the real source file's name from that
and put it in input_filename. */
ungetc (check_newline (), finput);
#endif
}
void
lang_finish ()
{
}
char *
lang_identify ()
{
return "c";
}
void
print_lang_statistics ()
{
}
/* Used by c-lex.c, but only for objc. */
tree
lookup_interface (arg)
tree arg;
{
return 0;
}
tree
is_class_name (arg)
tree arg;
{
return 0;
}
void
maybe_objc_check_decl (decl)
tree decl;
{
}
int
maybe_objc_comptypes (lhs, rhs, reflexive)
tree lhs, rhs;
int reflexive;
{
return -1;
}
tree
maybe_objc_method_name (decl)
tree decl;
{
return 0;
}
tree
maybe_building_objc_message_expr ()
{
return 0;
}
int
recognize_objc_keyword ()
{
return 0;
}
tree
build_objc_string (len, str)
int len;
char *str;
{
abort ();
return NULL_TREE;
}
void
GNU_xref_begin ()
{
fatal ("GCC does not yet support XREF");
}
void
GNU_xref_end ()
{
fatal ("GCC does not yet support XREF");
}
/* Called at end of parsing, but before end-of-file processing. */
void
finish_file ()
{
extern tree static_ctors, static_dtors;
extern tree get_file_function_name ();
extern tree build_function_call PROTO((tree, tree));
tree void_list_node = build_tree_list (NULL_TREE, void_type_node);
#ifndef ASM_OUTPUT_CONSTRUCTOR
if (static_ctors)
{
tree fnname = get_file_function_name ('I');
start_function (void_list_node,
build_parse_node (CALL_EXPR, fnname, void_list_node,
NULL_TREE),
NULL_TREE, NULL_TREE, 0);
fnname = DECL_ASSEMBLER_NAME (current_function_decl);
store_parm_decls ();
for (; static_ctors; static_ctors = TREE_CHAIN (static_ctors))
expand_expr_stmt (build_function_call (TREE_VALUE (static_ctors),
NULL_TREE));
finish_function (0);
assemble_constructor (IDENTIFIER_POINTER (fnname));
}
#endif
#ifndef ASM_OUTPUT_DESTRUCTOR
if (static_dtors)
{
tree fnname = get_file_function_name ('D');
start_function (void_list_node,
build_parse_node (CALL_EXPR, fnname, void_list_node,
NULL_TREE),
NULL_TREE, NULL_TREE, 0);
fnname = DECL_ASSEMBLER_NAME (current_function_decl);
store_parm_decls ();
for (; static_dtors; static_dtors = TREE_CHAIN (static_dtors))
expand_expr_stmt (build_function_call (TREE_VALUE (static_dtors),
NULL_TREE));
finish_function (0);
assemble_destructor (IDENTIFIER_POINTER (fnname));
}
#endif
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,80 +0,0 @@
/* Define constants for communication with c-parse.y.
Copyright (C) 1987, 1992 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
enum rid
{
RID_UNUSED,
RID_INT,
RID_CHAR,
RID_FLOAT,
RID_DOUBLE,
RID_VOID,
RID_UNUSED1,
RID_UNSIGNED,
RID_SHORT,
RID_LONG,
RID_AUTO,
RID_STATIC,
RID_EXTERN,
RID_REGISTER,
RID_TYPEDEF,
RID_SIGNED,
RID_CONST,
RID_VOLATILE,
RID_INLINE,
RID_NOALIAS,
RID_ITERATOR,
RID_COMPLEX,
RID_IN,
RID_OUT,
RID_INOUT,
RID_BYCOPY,
RID_ONEWAY,
RID_ID,
RID_MAX
};
#define NORID RID_UNUSED
#define RID_FIRST_MODIFIER RID_UNSIGNED
/* The elements of `ridpointers' are identifier nodes
for the reserved type names and storage classes.
It is indexed by a RID_... value. */
extern tree ridpointers[(int) RID_MAX];
/* the declaration found for the last IDENTIFIER token read in.
yylex must look this up to detect typedefs, which get token type TYPENAME,
so it is left around in case the identifier is not a typedef but is
used in a context which makes it a reference to a variable. */
extern tree lastiddecl;
extern char *token_buffer; /* Pointer to token buffer. */
extern tree make_pointer_declarator ();
extern void reinit_parse_for_function ();
extern int yylex ();
extern char *get_directive_line ();

File diff suppressed because it is too large Load Diff

View File

@@ -1,84 +0,0 @@
%{
/* Command-line: gperf -p -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */
%}
struct resword { char *name; short token; enum rid rid; };
%%
@class, CLASS, NORID
@compatibility_alias, ALIAS, NORID
@defs, DEFS, NORID
@encode, ENCODE, NORID
@end, END, NORID
@implementation, IMPLEMENTATION, NORID
@interface, INTERFACE, NORID
@private, PRIVATE, NORID
@protected, PROTECTED, NORID
@protocol, PROTOCOL, NORID
@public, PUBLIC, NORID
@selector, SELECTOR, NORID
__alignof, ALIGNOF, NORID
__alignof__, ALIGNOF, NORID
__asm, ASM_KEYWORD, NORID
__asm__, ASM_KEYWORD, NORID
__attribute, ATTRIBUTE, NORID
__attribute__, ATTRIBUTE, NORID
__complex, TYPESPEC, RID_COMPLEX
__complex__, TYPESPEC, RID_COMPLEX
__const, TYPE_QUAL, RID_CONST
__const__, TYPE_QUAL, RID_CONST
__extension__, EXTENSION, NORID
__imag, IMAGPART, NORID
__imag__, IMAGPART, NORID
__inline, SCSPEC, RID_INLINE
__inline__, SCSPEC, RID_INLINE
__iterator, SCSPEC, RID_ITERATOR
__iterator__, SCSPEC, RID_ITERATOR
__label__, LABEL, NORID
__real, REALPART, NORID
__real__, REALPART, NORID
__signed, TYPESPEC, RID_SIGNED
__signed__, TYPESPEC, RID_SIGNED
__typeof, TYPEOF, NORID
__typeof__, TYPEOF, NORID
__volatile, TYPE_QUAL, RID_VOLATILE
__volatile__, TYPE_QUAL, RID_VOLATILE
asm, ASM_KEYWORD, NORID
auto, SCSPEC, RID_AUTO
break, BREAK, NORID
bycopy, TYPE_QUAL, RID_BYCOPY
case, CASE, NORID
char, TYPESPEC, RID_CHAR
const, TYPE_QUAL, RID_CONST
continue, CONTINUE, NORID
default, DEFAULT, NORID
do, DO, NORID
double, TYPESPEC, RID_DOUBLE
else, ELSE, NORID
enum, ENUM, NORID
extern, SCSPEC, RID_EXTERN
float, TYPESPEC, RID_FLOAT
for, FOR, NORID
goto, GOTO, NORID
id, OBJECTNAME, RID_ID
if, IF, NORID
in, TYPE_QUAL, RID_IN
inout, TYPE_QUAL, RID_INOUT
inline, SCSPEC, RID_INLINE
int, TYPESPEC, RID_INT
long, TYPESPEC, RID_LONG
oneway, TYPE_QUAL, RID_ONEWAY
out, TYPE_QUAL, RID_OUT
register, SCSPEC, RID_REGISTER
return, RETURN, NORID
short, TYPESPEC, RID_SHORT
signed, TYPESPEC, RID_SIGNED
sizeof, SIZEOF, NORID
static, SCSPEC, RID_STATIC
struct, STRUCT, NORID
switch, SWITCH, NORID
typedef, SCSPEC, RID_TYPEDEF
typeof, TYPEOF, NORID
union, UNION, NORID
unsigned, TYPESPEC, RID_UNSIGNED
void, TYPESPEC, RID_VOID
volatile, TYPE_QUAL, RID_VOLATILE
while, WHILE, NORID

View File

@@ -1,64 +0,0 @@
typedef union {long itype; tree ttype; enum tree_code code;
char *filename; int lineno; int ends_in_label; } YYSTYPE;
#define IDENTIFIER 258
#define TYPENAME 259
#define SCSPEC 260
#define TYPESPEC 261
#define TYPE_QUAL 262
#define CONSTANT 263
#define STRING 264
#define ELLIPSIS 265
#define SIZEOF 266
#define ENUM 267
#define STRUCT 268
#define UNION 269
#define IF 270
#define ELSE 271
#define WHILE 272
#define DO 273
#define FOR 274
#define SWITCH 275
#define CASE 276
#define DEFAULT 277
#define BREAK 278
#define CONTINUE 279
#define RETURN 280
#define GOTO 281
#define ASM_KEYWORD 282
#define TYPEOF 283
#define ALIGNOF 284
#define ATTRIBUTE 285
#define EXTENSION 286
#define LABEL 287
#define REALPART 288
#define IMAGPART 289
#define ASSIGN 290
#define OROR 291
#define ANDAND 292
#define EQCOMPARE 293
#define ARITHCOMPARE 294
#define LSHIFT 295
#define RSHIFT 296
#define UNARY 297
#define PLUSPLUS 298
#define MINUSMINUS 299
#define HYPERUNARY 300
#define POINTSAT 301
#define INTERFACE 302
#define IMPLEMENTATION 303
#define END 304
#define SELECTOR 305
#define DEFS 306
#define ENCODE 307
#define CLASSNAME 308
#define PUBLIC 309
#define PRIVATE 310
#define PROTECTED 311
#define PROTOCOL 312
#define OBJECTNAME 313
#define CLASS 314
#define ALIAS 315
#define OBJC_STRING 316
extern YYSTYPE yylval;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,169 +0,0 @@
/* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma pack.
Copyright (C) 1992 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <stdio.h>
#include "config.h"
#include "tree.h"
#include "except.h"
#include "function.h"
#include "defaults.h"
#include "c-pragma.h"
#ifdef HANDLE_SYSV_PRAGMA
/* When structure field packing is in effect, this variable is the
number of bits to use as the maximum alignment. When packing is not
in effect, this is zero. */
extern int maximum_field_alignment;
/* File used for outputting assembler code. */
extern FILE *asm_out_file;
/* Handle one token of a pragma directive. TOKEN is the
current token, and STRING is its printable form. */
void
handle_pragma_token (string, token)
char *string;
tree token;
{
static enum pragma_state state = ps_start, type;
static char *name;
static char *value;
static int align;
if (string == 0)
{
if (type == ps_pack)
{
if (state == ps_right)
maximum_field_alignment = align * 8;
else
warning ("malformed `#pragma pack'");
}
else if (type == ps_weak)
{
#ifdef HANDLE_PRAGMA_WEAK
if (HANDLE_PRAGMA_WEAK)
handle_pragma_weak (state, name, value);
#endif /* HANDLE_PRAMA_WEAK */
}
type = state = ps_start;
return;
}
switch (state)
{
case ps_start:
if (token && TREE_CODE (token) == IDENTIFIER_NODE)
{
if (strcmp (IDENTIFIER_POINTER (token), "pack") == 0)
type = state = ps_pack;
else if (strcmp (IDENTIFIER_POINTER (token), "weak") == 0)
type = state = ps_weak;
else
type = state = ps_done;
}
else
type = state = ps_done;
break;
case ps_weak:
if (token && TREE_CODE (token) == IDENTIFIER_NODE)
{
name = IDENTIFIER_POINTER (token);
state = ps_name;
}
else
state = ps_bad;
break;
case ps_name:
state = (strcmp (string, "=") ? ps_bad : ps_equals);
break;
case ps_equals:
if (token && TREE_CODE (token) == IDENTIFIER_NODE)
{
value = IDENTIFIER_POINTER (token);
state = ps_value;
}
else
state = ps_bad;
break;
case ps_value:
state = ps_bad;
break;
case ps_pack:
if (strcmp (string, "(") == 0)
state = ps_left;
else
state = ps_bad;
break;
case ps_left:
if (token && TREE_CODE (token) == INTEGER_CST
&& TREE_INT_CST_HIGH (token) == 0)
switch (TREE_INT_CST_LOW (token))
{
case 1:
case 2:
case 4:
align = TREE_INT_CST_LOW (token);
state = ps_align;
break;
default:
state = ps_bad;
}
else if (! token && strcmp (string, ")") == 0)
{
align = 0;
state = ps_right;
}
else
state = ps_bad;
break;
case ps_align:
if (strcmp (string, ")") == 0)
state = ps_right;
else
state = ps_bad;
break;
case ps_right:
state = ps_bad;
break;
case ps_bad:
case ps_done:
break;
default:
abort ();
}
}
#endif /* HANDLE_SYSV_PRAGMA */

View File

@@ -1,46 +0,0 @@
/* Pragma related interfaces.
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Support #pragma weak iff ASM_WEAKEN_LABEL and ASM_OUTPUT_DEF are
defined. */
#if defined (ASM_WEAKEN_LABEL) && defined (ASM_OUTPUT_DEF)
#define HANDLE_PRAGMA_WEAK SUPPORTS_WEAK
#endif
enum pragma_state
{
ps_start,
ps_done,
ps_bad,
ps_weak,
ps_name,
ps_equals,
ps_value,
ps_pack,
ps_left,
ps_align,
ps_right
};
/* Output asm to handle ``#pragma weak'' */
extern void handle_pragma_weak PROTO((enum pragma_state, char *, char *));
/* Handle a C style pragma */
extern void handle_pragma_token PROTO((char *, tree));

View File

@@ -1,510 +0,0 @@
/* Definitions for C parsing and type checking.
Copyright (C) 1987, 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef _C_TREE_H
#define _C_TREE_H
/* Language-dependent contents of an identifier. */
/* The limbo_value is used for block level extern declarations, which need
to be type checked against subsequent extern declarations. They can't
be referenced after they fall out of scope, so they can't be global. */
struct lang_identifier
{
struct tree_identifier ignore;
tree global_value, local_value, label_value, implicit_decl;
tree error_locus, limbo_value;
};
/* Macros for access to language-specific slots in an identifier. */
/* Each of these slots contains a DECL node or null. */
/* This represents the value which the identifier has in the
file-scope namespace. */
#define IDENTIFIER_GLOBAL_VALUE(NODE) \
(((struct lang_identifier *) (NODE))->global_value)
/* This represents the value which the identifier has in the current
scope. */
#define IDENTIFIER_LOCAL_VALUE(NODE) \
(((struct lang_identifier *) (NODE))->local_value)
/* This represents the value which the identifier has as a label in
the current label scope. */
#define IDENTIFIER_LABEL_VALUE(NODE) \
(((struct lang_identifier *) (NODE))->label_value)
/* This records the extern decl of this identifier, if it has had one
at any point in this compilation. */
#define IDENTIFIER_LIMBO_VALUE(NODE) \
(((struct lang_identifier *) (NODE))->limbo_value)
/* This records the implicit function decl of this identifier, if it
has had one at any point in this compilation. */
#define IDENTIFIER_IMPLICIT_DECL(NODE) \
(((struct lang_identifier *) (NODE))->implicit_decl)
/* This is the last function in which we printed an "undefined variable"
message for this identifier. Value is a FUNCTION_DECL or null. */
#define IDENTIFIER_ERROR_LOCUS(NODE) \
(((struct lang_identifier *) (NODE))->error_locus)
/* In identifiers, C uses the following fields in a special way:
TREE_PUBLIC to record that there was a previous local extern decl.
TREE_USED to record that such a decl was used.
TREE_ADDRESSABLE to record that the address of such a decl was used. */
/* Nonzero means reject anything that ANSI standard C forbids. */
extern int pedantic;
/* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is read-only. */
#define C_TYPE_FIELDS_READONLY(type) TREE_LANG_FLAG_1 (type)
/* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is volatile. */
#define C_TYPE_FIELDS_VOLATILE(type) TREE_LANG_FLAG_2 (type)
/* In a RECORD_TYPE or UNION_TYPE or ENUMERAL_TYPE
nonzero if the definition of the type has already started. */
#define C_TYPE_BEING_DEFINED(type) TYPE_LANG_FLAG_0 (type)
/* In a RECORD_TYPE, a sorted array of the fields of the type. */
struct lang_type
{
int len;
tree elts[1];
};
/* Mark which labels are explicitly declared.
These may be shadowed, and may be referenced from nested functions. */
#define C_DECLARED_LABEL_FLAG(label) TREE_LANG_FLAG_1 (label)
/* Record whether a type or decl was written with nonconstant size.
Note that TYPE_SIZE may have simplified to a constant. */
#define C_TYPE_VARIABLE_SIZE(type) TYPE_LANG_FLAG_1 (type)
#define C_DECL_VARIABLE_SIZE(type) DECL_LANG_FLAG_0 (type)
/* Record in each node resulting from a binary operator
what operator was specified for it. */
#define C_EXP_ORIGINAL_CODE(exp) ((enum tree_code) TREE_COMPLEXITY (exp))
#if 0 /* Not used. */
/* Record whether a decl for a function or function pointer has
already been mentioned (in a warning) because it was called
but didn't have a prototype. */
#define C_MISSING_PROTOTYPE_WARNED(decl) DECL_LANG_FLAG_2(decl)
#endif
/* Store a value in that field. */
#define C_SET_EXP_ORIGINAL_CODE(exp, code) \
(TREE_COMPLEXITY (exp) = (int) (code))
/* Record whether a typedef for type `int' was actually `signed int'. */
#define C_TYPEDEF_EXPLICITLY_SIGNED(exp) DECL_LANG_FLAG_1 ((exp))
/* Nonzero for a declaration of a built in function if there has been no
occasion that would declare the function in ordinary C.
Using the function draws a pedantic warning in this case. */
#define C_DECL_ANTICIPATED(exp) DECL_LANG_FLAG_3 ((exp))
/* For FUNCTION_TYPE, a hidden list of types of arguments. The same as
TYPE_ARG_TYPES for functions with prototypes, but created for functions
without prototypes. */
#define TYPE_ACTUAL_ARG_TYPES(NODE) TYPE_NONCOPIED_PARTS (NODE)
/* In a FIELD_DECL, nonzero if the decl was originally a bitfield. */
#define DECL_C_BIT_FIELD(NODE) DECL_LANG_FLAG_4 (NODE)
/* Nonzero if the type T promotes to itself.
ANSI C states explicitly the list of types that promote;
in particular, short promotes to int even if they have the same width. */
#define C_PROMOTING_INTEGER_TYPE_P(t) \
(TREE_CODE ((t)) == INTEGER_TYPE \
&& (TYPE_MAIN_VARIANT (t) == char_type_node \
|| TYPE_MAIN_VARIANT (t) == signed_char_type_node \
|| TYPE_MAIN_VARIANT (t) == unsigned_char_type_node \
|| TYPE_MAIN_VARIANT (t) == short_integer_type_node \
|| TYPE_MAIN_VARIANT (t) == short_unsigned_type_node))
/* In a VAR_DECL, means the variable is really an iterator. */
#define ITERATOR_P(D) (DECL_LANG_FLAG_4(D))
/* In a VAR_DECL for an iterator, means we are within
an explicit loop over that iterator. */
#define ITERATOR_BOUND_P(NODE) ((NODE)->common.readonly_flag)
/* in c-lang.c and objc-act.c */
extern tree lookup_interface PROTO((tree));
extern tree is_class_name PROTO((tree));
extern void maybe_objc_check_decl PROTO((tree));
extern int maybe_objc_comptypes PROTO((tree, tree, int));
extern tree maybe_building_objc_message_expr PROTO((void));
extern tree maybe_objc_method_name PROTO((tree));
extern int recognize_objc_keyword PROTO((void));
extern tree build_objc_string PROTO((int, char *));
/* in c-aux-info.c */
extern void gen_aux_info_record PROTO((tree, int, int, int));
/* in c-common.c */
extern void declare_function_name PROTO((void));
extern void decl_attributes PROTO((tree, tree, tree));
extern void init_function_format_info PROTO((void));
extern void record_function_format PROTO((tree, tree, int, int, int));
extern void check_function_format PROTO((tree, tree, tree));
/* Print an error message for invalid operands to arith operation CODE.
NOP_EXPR is used as a special case (see truthvalue_conversion). */
extern void binary_op_error PROTO((enum tree_code));
extern void c_expand_expr_stmt PROTO((tree));
/* Validate the expression after `case' and apply default promotions. */
extern tree check_case_value PROTO((tree));
/* Concatenate a list of STRING_CST nodes into one STRING_CST. */
extern tree combine_strings PROTO((tree));
extern void constant_expression_warning PROTO((tree));
extern tree convert_and_check PROTO((tree, tree));
extern void overflow_warning PROTO((tree));
extern void unsigned_conversion_warning PROTO((tree, tree));
/* Read the rest of the current #-directive line. */
extern char *get_directive_line STDIO_PROTO((FILE *));
/* Subroutine of build_binary_op, used for comparison operations.
See if the operands have both been converted from subword integer types
and, if so, perhaps change them both back to their original type. */
extern tree shorten_compare PROTO((tree *, tree *, tree *, enum tree_code *));
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR,
or validate its data type for an `if' or `while' statement or ?..: exp. */
extern tree truthvalue_conversion PROTO((tree));
extern tree type_for_mode PROTO((enum machine_mode, int));
extern tree type_for_size PROTO((unsigned, int));
/* in c-convert.c */
extern tree convert PROTO((tree, tree));
/* in c-decl.c */
/* Standard named or nameless data types of the C compiler. */
extern tree char_array_type_node;
extern tree char_type_node;
extern tree const_ptr_type_node;
extern tree const_string_type_node;
extern tree default_function_type;
extern tree double_ftype_double;
extern tree double_ftype_double_double;
extern tree double_type_node;
extern tree float_type_node;
extern tree intDI_type_node;
extern tree intHI_type_node;
extern tree intQI_type_node;
extern tree intSI_type_node;
extern tree int_array_type_node;
extern tree int_ftype_cptr_cptr_sizet;
extern tree int_ftype_int;
extern tree int_ftype_ptr_ptr_int;
extern tree int_ftype_string_string;
extern tree integer_type_node;
extern tree long_double_type_node;
extern tree long_ftype_long;
extern tree long_integer_type_node;
extern tree long_long_integer_type_node;
extern tree long_long_unsigned_type_node;
extern tree long_unsigned_type_node;
extern tree complex_integer_type_node;
extern tree complex_float_type_node;
extern tree complex_double_type_node;
extern tree complex_long_double_type_node;
extern tree ptr_type_node;
extern tree ptrdiff_type_node;
extern tree short_integer_type_node;
extern tree short_unsigned_type_node;
extern tree signed_char_type_node;
extern tree signed_wchar_type_node;
extern tree string_ftype_ptr_ptr;
extern tree string_type_node;
extern tree unsigned_char_type_node;
extern tree unsigned_intDI_type_node;
extern tree unsigned_intHI_type_node;
extern tree unsigned_intQI_type_node;
extern tree unsigned_intSI_type_node;
extern tree unsigned_type_node;
extern tree unsigned_wchar_type_node;
extern tree void_ftype_ptr_int_int;
extern tree void_ftype_ptr_ptr_int;
extern tree void_type_node;
extern tree wchar_array_type_node;
extern tree wchar_type_node;
extern tree boolean_type_node;
extern tree boolean_true_node;
extern tree boolean_false_node;
extern tree build_enumerator PROTO((tree, tree));
/* Declare a predefined function. Return the declaration. */
extern tree builtin_function PROTO((char *, tree, enum built_in_function function_, char *));
/* Add qualifiers to a type, in the fashion for C. */
extern tree c_build_type_variant PROTO((tree, int, int));
extern int c_decode_option PROTO((char *));
extern void c_mark_varargs PROTO((void));
extern tree check_identifier PROTO((tree, tree));
extern void clear_parm_order PROTO((void));
extern tree combine_parm_decls PROTO((tree, tree, int));
extern int complete_array_type PROTO((tree, tree, int));
extern void declare_parm_level PROTO((int));
extern tree define_label PROTO((char *, int, tree));
extern void delete_block PROTO((tree));
extern void finish_decl PROTO((tree, tree, tree));
extern void finish_decl_top_level PROTO((tree, tree, tree));
extern tree finish_enum PROTO((tree, tree, tree));
extern void finish_function PROTO((int));
extern tree finish_struct PROTO((tree, tree, tree));
extern tree get_parm_info PROTO((int));
extern tree getdecls PROTO((void));
extern tree gettags PROTO((void));
extern int global_bindings_p PROTO((void));
extern tree grokfield PROTO((char *, int, tree, tree, tree));
extern tree groktypename PROTO((tree));
extern tree groktypename_in_parm_context PROTO((tree));
extern tree implicitly_declare PROTO((tree));
extern int in_parm_level_p PROTO((void));
extern void init_decl_processing PROTO((void));
extern void insert_block PROTO((tree));
extern void keep_next_level PROTO((void));
extern int kept_level_p PROTO((void));
extern tree lookup_label PROTO((tree));
extern tree lookup_name PROTO((tree));
extern tree lookup_name_current_level PROTO((tree));
extern tree lookup_name_current_level_global PROTO((tree));
extern tree maybe_build_cleanup PROTO((tree));
extern void parmlist_tags_warning PROTO((void));
extern void pending_xref_error PROTO((void));
extern void pop_c_function_context PROTO((void));
extern void pop_label_level PROTO((void));
extern tree poplevel PROTO((int, int, int));
extern void print_lang_decl STDIO_PROTO((FILE *, tree,
int));
extern void print_lang_identifier STDIO_PROTO((FILE *, tree,
int));
extern void print_lang_type STDIO_PROTO((FILE *, tree,
int));
extern void push_c_function_context PROTO((void));
extern void push_label_level PROTO((void));
extern void push_parm_decl PROTO((tree));
extern tree pushdecl PROTO((tree));
extern tree pushdecl_top_level PROTO((tree));
extern void pushlevel PROTO((int));
extern void pushtag PROTO((tree, tree));
extern void set_block PROTO((tree));
extern tree shadow_label PROTO((tree));
extern void shadow_record_fields PROTO((tree));
extern void shadow_tag PROTO((tree));
extern void shadow_tag_warned PROTO((tree, int));
extern tree start_enum PROTO((tree));
extern int start_function PROTO((tree, tree, tree,
tree, int));
extern tree start_decl PROTO((tree, tree, int,
tree, tree));
extern tree start_struct PROTO((enum tree_code, tree));
extern void store_parm_decls PROTO((void));
extern tree xref_tag PROTO((enum tree_code, tree));
/* in c-typeck.c */
extern tree require_complete_type PROTO((tree));
extern void incomplete_type_error PROTO((tree, tree));
/* Given two integer or real types, return the type for their sum.
Given two compatible ANSI C types, returns the merged type. */
extern tree common_type PROTO((tree, tree));
extern int comptypes PROTO((tree, tree));
extern int self_promoting_args_p PROTO((tree));
extern tree c_sizeof PROTO((tree));
extern tree c_sizeof_nowarn PROTO((tree));
extern tree c_size_in_bytes PROTO((tree));
extern tree c_alignof PROTO((tree));
extern tree c_alignof_expr PROTO((tree));
extern tree default_conversion PROTO((tree));
extern tree build_component_ref PROTO((tree, tree));
extern tree build_indirect_ref PROTO((tree, char *));
extern tree build_array_ref PROTO((tree, tree));
extern tree build_function_call PROTO((tree, tree));
extern tree parser_build_binary_op PROTO((enum tree_code,
tree, tree));
extern tree build_binary_op PROTO((enum tree_code,
tree, tree, int));
extern tree build_unary_op PROTO((enum tree_code,
tree, int));
extern int lvalue_p PROTO((tree));
extern int lvalue_or_else PROTO((tree, char *));
extern void readonly_warning PROTO((tree, char *));
extern int mark_addressable PROTO((tree));
extern tree build_conditional_expr PROTO((tree, tree, tree));
extern tree build_compound_expr PROTO((tree));
extern tree build_c_cast PROTO((tree, tree));
extern tree build_modify_expr PROTO((tree, enum tree_code,
tree));
extern tree initializer_constant_valid_p PROTO((tree, tree));
extern void store_init_value PROTO((tree, tree));
extern void error_init PROTO((char *, char *,
char *));
extern void pedwarn_init PROTO((char *, char *,
char *));
extern void start_init PROTO((tree, tree, int));
extern void finish_init PROTO((void));
extern void really_start_incremental_init PROTO((tree));
extern void push_init_level PROTO((int));
extern tree pop_init_level PROTO((int));
extern void set_init_index PROTO((tree, tree));
extern void set_init_label PROTO((tree));
extern void process_init_element PROTO((tree));
extern void c_expand_asm_operands PROTO((tree, tree, tree, tree,
int, char *, int));
extern void c_expand_return PROTO((tree));
extern tree c_expand_start_case PROTO((tree));
/* in c-iterate.c */
extern void iterator_expand PROTO((tree));
extern void iterator_for_loop_start PROTO((tree));
extern void iterator_for_loop_end PROTO((tree));
extern void iterator_for_loop_record PROTO((tree));
extern void push_iterator_stack PROTO((void));
extern void pop_iterator_stack PROTO((void));
/* Set to 0 at beginning of a function definition, set to 1 if
a return statement that specifies a return value is seen. */
extern int current_function_returns_value;
/* Set to 0 at beginning of a function definition, set to 1 if
a return statement with no argument is seen. */
extern int current_function_returns_null;
/* Nonzero means the expression being parsed will never be evaluated.
This is a count, since unevaluated expressions can nest. */
extern int skip_evaluation;
/* Nonzero means `$' can be in an identifier. */
extern int dollars_in_ident;
/* Nonzero means allow type mismatches in conditional expressions;
just make their values `void'. */
extern int flag_cond_mismatch;
/* Nonzero means don't recognize the keyword `asm'. */
extern int flag_no_asm;
/* Nonzero means environment is hosted (i.e., not freestanding) */
extern int flag_hosted;
/* Nonzero means ignore `#ident' directives. */
extern int flag_no_ident;
/* Nonzero means warn about implicit declarations. */
extern int warn_implicit;
/* Nonzero means give string constants the type `const char *'
to get extra warnings from them. These warnings will be too numerous
to be useful, except in thoroughly ANSIfied programs. */
extern int warn_write_strings;
/* Nonzero means warn about sizeof (function) or addition/subtraction
of function pointers. */
extern int warn_pointer_arith;
/* Nonzero means warn for all old-style non-prototype function decls. */
extern int warn_strict_prototypes;
/* Nonzero means warn about multiple (redundant) decls for the same single
variable or function. */
extern int warn_redundant_decls;
/* Nonzero means warn about extern declarations of objects not at
file-scope level and about *all* declarations of functions (whether
extern or static) not at file-scope level. Note that we exclude
implicit function declarations. To get warnings about those, use
-Wimplicit. */
extern int warn_nested_externs;
/* Nonzero means warn about pointer casts that can drop a type qualifier
from the pointer target type. */
extern int warn_cast_qual;
/* Nonzero means warn when casting a function call to a type that does
not match the return type (e.g. (float)sqrt() or (anything*)malloc()
when there is no previous declaration of sqrt or malloc. */
extern int warn_bad_function_cast;
/* Warn about traditional constructs whose meanings changed in ANSI C. */
extern int warn_traditional;
/* Warn about *printf or *scanf format/argument anomalies. */
extern int warn_format;
/* Warn about a subscript that has type char. */
extern int warn_char_subscripts;
/* Warn if a type conversion is done that might have confusing results. */
extern int warn_conversion;
/* Warn if main is suspicious. */
extern int warn_main;
/* Nonzero means do some things the same way PCC does. */
extern int flag_traditional;
/* Nonzero means to allow single precision math even if we're generally
being traditional. */
extern int flag_allow_single_precision;
/* Nonzero means warn about suggesting putting in ()'s. */
extern int warn_parentheses;
/* Warn if initializer is not completely bracketed. */
extern int warn_missing_braces;
/* Warn about comparison of signed and unsigned values. */
extern int warn_sign_compare;
/* Nonzero means this is a function to call to perform comptypes
on two record types. */
extern int (*comptypes_record_hook) ();
/* Nonzero means we are reading code that came from a system header file. */
extern int system_header_p;
/* Nonzero enables objc features. */
extern int doing_objc_thang;
#endif /* not _C_TREE_H */

File diff suppressed because it is too large Load Diff

View File

@@ -1,759 +0,0 @@
/* Save and restore call-clobbered registers which are live across a call.
Copyright (C) 1989, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "rtl.h"
#include "insn-config.h"
#include "flags.h"
#include "regs.h"
#include "hard-reg-set.h"
#include "recog.h"
#include "basic-block.h"
#include "reload.h"
#include "expr.h"
#ifndef MAX_MOVE_MAX
#define MAX_MOVE_MAX MOVE_MAX
#endif
#ifndef MIN_UNITS_PER_WORD
#define MIN_UNITS_PER_WORD UNITS_PER_WORD
#endif
/* Modes for each hard register that we can save. The smallest mode is wide
enough to save the entire contents of the register. When saving the
register because it is live we first try to save in multi-register modes.
If that is not possible the save is done one register at a time. */
static enum machine_mode
regno_save_mode[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MIN_UNITS_PER_WORD + 1];
/* For each hard register, a place on the stack where it can be saved,
if needed. */
static rtx
regno_save_mem[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MIN_UNITS_PER_WORD + 1];
/* We will only make a register eligible for caller-save if it can be
saved in its widest mode with a simple SET insn as long as the memory
address is valid. We record the INSN_CODE is those insns here since
when we emit them, the addresses might not be valid, so they might not
be recognized. */
static enum insn_code
reg_save_code[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MIN_UNITS_PER_WORD + 1];
static enum insn_code
reg_restore_code[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MIN_UNITS_PER_WORD + 1];
/* Set of hard regs currently live (during scan of all insns). */
static HARD_REG_SET hard_regs_live;
/* Set of hard regs currently residing in save area (during insn scan). */
static HARD_REG_SET hard_regs_saved;
/* Set of hard regs which need to be restored before referenced. */
static HARD_REG_SET hard_regs_need_restore;
/* Number of registers currently in hard_regs_saved. */
int n_regs_saved;
static void set_reg_live PROTO((rtx, rtx));
static void clear_reg_live PROTO((rtx));
static void restore_referenced_regs PROTO((rtx, rtx, enum machine_mode));
static int insert_save_restore PROTO((rtx, int, int,
enum machine_mode, int));
/* Initialize for caller-save.
Look at all the hard registers that are used by a call and for which
regclass.c has not already excluded from being used across a call.
Ensure that we can find a mode to save the register and that there is a
simple insn to save and restore the register. This latter check avoids
problems that would occur if we tried to save the MQ register of some
machines directly into memory. */
void
init_caller_save ()
{
char *first_obj = (char *) oballoc (0);
rtx addr_reg;
int offset;
rtx address;
int i, j;
/* First find all the registers that we need to deal with and all
the modes that they can have. If we can't find a mode to use,
we can't have the register live over calls. */
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
{
if (call_used_regs[i] && ! call_fixed_regs[i])
{
for (j = 1; j <= MOVE_MAX / UNITS_PER_WORD; j++)
{
regno_save_mode[i][j] = choose_hard_reg_mode (i, j);
if (regno_save_mode[i][j] == VOIDmode && j == 1)
{
call_fixed_regs[i] = 1;
SET_HARD_REG_BIT (call_fixed_reg_set, i);
}
}
}
else
regno_save_mode[i][1] = VOIDmode;
}
/* The following code tries to approximate the conditions under which
we can easily save and restore a register without scratch registers or
other complexities. It will usually work, except under conditions where
the validity of an insn operand is dependent on the address offset.
No such cases are currently known.
We first find a typical offset from some BASE_REG_CLASS register.
This address is chosen by finding the first register in the class
and by finding the smallest power of two that is a valid offset from
that register in every mode we will use to save registers. */
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (TEST_HARD_REG_BIT (reg_class_contents[(int) BASE_REG_CLASS], i))
break;
if (i == FIRST_PSEUDO_REGISTER)
abort ();
addr_reg = gen_rtx (REG, Pmode, i);
for (offset = 1 << (HOST_BITS_PER_INT / 2); offset; offset >>= 1)
{
address = gen_rtx (PLUS, Pmode, addr_reg, GEN_INT (offset));
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (regno_save_mode[i][1] != VOIDmode
&& ! strict_memory_address_p (regno_save_mode[i][1], address))
break;
if (i == FIRST_PSEUDO_REGISTER)
break;
}
/* If we didn't find a valid address, we must use register indirect. */
if (offset == 0)
address = addr_reg;
/* Next we try to form an insn to save and restore the register. We
see if such an insn is recognized and meets its constraints. */
start_sequence ();
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
for (j = 1; j <= MOVE_MAX / UNITS_PER_WORD; j++)
if (regno_save_mode[i][j] != VOIDmode)
{
rtx mem = gen_rtx (MEM, regno_save_mode[i][j], address);
rtx reg = gen_rtx (REG, regno_save_mode[i][j], i);
rtx savepat = gen_rtx (SET, VOIDmode, mem, reg);
rtx restpat = gen_rtx (SET, VOIDmode, reg, mem);
rtx saveinsn = emit_insn (savepat);
rtx restinsn = emit_insn (restpat);
int ok;
reg_save_code[i][j] = recog_memoized (saveinsn);
reg_restore_code[i][j] = recog_memoized (restinsn);
/* Now extract both insns and see if we can meet their
constraints. */
ok = (reg_save_code[i][j] != -1 && reg_restore_code[i][j] != -1);
if (ok)
{
insn_extract (saveinsn);
ok = constrain_operands (reg_save_code[i][j], 1);
insn_extract (restinsn);
ok &= constrain_operands (reg_restore_code[i][j], 1);
}
if (! ok)
{
regno_save_mode[i][j] = VOIDmode;
if (j == 1)
{
call_fixed_regs[i] = 1;
SET_HARD_REG_BIT (call_fixed_reg_set, i);
}
}
}
end_sequence ();
obfree (first_obj);
}
/* Initialize save areas by showing that we haven't allocated any yet. */
void
init_save_areas ()
{
int i, j;
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
for (j = 1; j <= MOVE_MAX / UNITS_PER_WORD; j++)
regno_save_mem[i][j] = 0;
}
/* Allocate save areas for any hard registers that might need saving.
We take a conservative approach here and look for call-clobbered hard
registers that are assigned to pseudos that cross calls. This may
overestimate slightly (especially if some of these registers are later
used as spill registers), but it should not be significant.
Then perform register elimination in the addresses of the save area
locations; return 1 if all eliminated addresses are strictly valid.
We assume that our caller has set up the elimination table to the
worst (largest) possible offsets.
Set *PCHANGED to 1 if we had to allocate some memory for the save area.
Future work:
In the fallback case we should iterate backwards across all possible
modes for the save, choosing the largest available one instead of
falling back to the smallest mode immediately. (eg TF -> DF -> SF).
We do not try to use "move multiple" instructions that exist
on some machines (such as the 68k moveml). It could be a win to try
and use them when possible. The hard part is doing it in a way that is
machine independent since they might be saving non-consecutive
registers. (imagine caller-saving d0,d1,a0,a1 on the 68k) */
int
setup_save_areas (pchanged)
int *pchanged;
{
int i, j, k;
HARD_REG_SET hard_regs_used;
int ok = 1;
/* Allocate space in the save area for the largest multi-register
pseudos first, then work backwards to single register
pseudos. */
/* Find and record all call-used hard-registers in this function. */
CLEAR_HARD_REG_SET (hard_regs_used);
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
if (reg_renumber[i] >= 0 && REG_N_CALLS_CROSSED (i) > 0)
{
int regno = reg_renumber[i];
int endregno
= regno + HARD_REGNO_NREGS (regno, GET_MODE (regno_reg_rtx[i]));
int nregs = endregno - regno;
for (j = 0; j < nregs; j++)
{
if (call_used_regs[regno+j])
SET_HARD_REG_BIT (hard_regs_used, regno+j);
}
}
/* Now run through all the call-used hard-registers and allocate
space for them in the caller-save area. Try to allocate space
in a manner which allows multi-register saves/restores to be done. */
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
for (j = MOVE_MAX / UNITS_PER_WORD; j > 0; j--)
{
int ok = 1;
int do_save;
/* If no mode exists for this size, try another. Also break out
if we have already saved this hard register. */
if (regno_save_mode[i][j] == VOIDmode || regno_save_mem[i][1] != 0)
continue;
/* See if any register in this group has been saved. */
do_save = 1;
for (k = 0; k < j; k++)
if (regno_save_mem[i + k][1])
{
do_save = 0;
break;
}
if (! do_save)
continue;
for (k = 0; k < j; k++)
{
int regno = i + k;
ok &= (TEST_HARD_REG_BIT (hard_regs_used, regno) != 0);
}
/* We have found an acceptable mode to store in. */
if (ok)
{
regno_save_mem[i][j]
= assign_stack_local (regno_save_mode[i][j],
GET_MODE_SIZE (regno_save_mode[i][j]), 0);
/* Setup single word save area just in case... */
for (k = 0; k < j; k++)
{
/* This should not depend on WORDS_BIG_ENDIAN.
The order of words in regs is the same as in memory. */
rtx temp = gen_rtx (MEM, regno_save_mode[i+k][1],
XEXP (regno_save_mem[i][j], 0));
regno_save_mem[i+k][1]
= adj_offsettable_operand (temp, k * UNITS_PER_WORD);
}
*pchanged = 1;
}
}
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
for (j = 1; j <= MOVE_MAX / UNITS_PER_WORD; j++)
if (regno_save_mem[i][j] != 0)
ok &= strict_memory_address_p (GET_MODE (regno_save_mem[i][j]),
XEXP (eliminate_regs (regno_save_mem[i][j], 0, NULL_RTX, 1), 0));
return ok;
}
/* Find the places where hard regs are live across calls and save them.
INSN_MODE is the mode to assign to any insns that we add. This is used
by reload to determine whether or not reloads or register eliminations
need be done on these insns. */
void
save_call_clobbered_regs (insn_mode)
enum machine_mode insn_mode;
{
rtx insn;
int b;
for (b = 0; b < n_basic_blocks; b++)
{
regset regs_live = basic_block_live_at_start[b];
rtx prev_block_last = PREV_INSN (basic_block_head[b]);
int i, j;
int regno;
/* Compute hard regs live at start of block -- this is the
real hard regs marked live, plus live pseudo regs that
have been renumbered to hard regs. No registers have yet been
saved because we restore all of them before the end of the basic
block. */
REG_SET_TO_HARD_REG_SET (hard_regs_live, regs_live);
CLEAR_HARD_REG_SET (hard_regs_saved);
CLEAR_HARD_REG_SET (hard_regs_need_restore);
n_regs_saved = 0;
EXECUTE_IF_SET_IN_REG_SET (regs_live, 0, i,
{
if ((regno = reg_renumber[i]) >= 0)
for (j = regno;
j < regno + HARD_REGNO_NREGS (regno,
PSEUDO_REGNO_MODE (i));
j++)
SET_HARD_REG_BIT (hard_regs_live, j);
});
/* Now scan the insns in the block, keeping track of what hard
regs are live as we go. When we see a call, save the live
call-clobbered hard regs. */
for (insn = basic_block_head[b]; ; insn = NEXT_INSN (insn))
{
RTX_CODE code = GET_CODE (insn);
if (GET_RTX_CLASS (code) == 'i')
{
rtx link;
/* If some registers have been saved, see if INSN references
any of them. We must restore them before the insn if so. */
if (n_regs_saved)
restore_referenced_regs (PATTERN (insn), insn, insn_mode);
/* NB: the normal procedure is to first enliven any
registers set by insn, then deaden any registers that
had their last use at insn. This is incorrect now,
since multiple pseudos may have been mapped to the
same hard reg, and the death notes are ambiguous. So
it must be done in the other, safe, order. */
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == REG_DEAD)
clear_reg_live (XEXP (link, 0));
/* When we reach a call, we need to save all registers that are
live, call-used, not fixed, and not already saved. We must
test at this point because registers that die in a CALL_INSN
are not live across the call and likewise for registers that
are born in the CALL_INSN.
If registers are filled with parameters for this function,
and some of these are also being set by this function, then
they will not appear to die (no REG_DEAD note for them),
to check if in fact they do, collect the set registers in
hard_regs_live first. */
if (code == CALL_INSN)
{
HARD_REG_SET this_call_sets;
{
HARD_REG_SET old_hard_regs_live;
/* Save the hard_regs_live information. */
COPY_HARD_REG_SET (old_hard_regs_live, hard_regs_live);
/* Now calculate hard_regs_live for this CALL_INSN
only. */
CLEAR_HARD_REG_SET (hard_regs_live);
note_stores (PATTERN (insn), set_reg_live);
COPY_HARD_REG_SET (this_call_sets, hard_regs_live);
/* Restore the hard_regs_live information. */
COPY_HARD_REG_SET (hard_regs_live, old_hard_regs_live);
}
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (call_used_regs[regno] && ! call_fixed_regs[regno]
&& TEST_HARD_REG_BIT (hard_regs_live, regno)
/* It must not be set by this instruction. */
&& ! TEST_HARD_REG_BIT (this_call_sets, regno)
&& ! TEST_HARD_REG_BIT (hard_regs_saved, regno))
regno += insert_save_restore (insn, 1, regno,
insn_mode, 0);
/* Put the information for this CALL_INSN on top of what
we already had. */
IOR_HARD_REG_SET (hard_regs_live, this_call_sets);
COPY_HARD_REG_SET (hard_regs_need_restore, hard_regs_saved);
/* Must recompute n_regs_saved. */
n_regs_saved = 0;
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (TEST_HARD_REG_BIT (hard_regs_saved, regno))
n_regs_saved++;
}
else
{
note_stores (PATTERN (insn), set_reg_live);
#ifdef AUTO_INC_DEC
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == REG_INC)
set_reg_live (XEXP (link, 0), NULL_RTX);
#endif
}
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == REG_UNUSED)
clear_reg_live (XEXP (link, 0));
}
if (insn == basic_block_end[b])
break;
}
/* At the end of the basic block, we must restore any registers that
remain saved. If the last insn in the block is a JUMP_INSN, put
the restore before the insn, otherwise, put it after the insn. */
if (n_regs_saved)
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
if (TEST_HARD_REG_BIT (hard_regs_need_restore, regno))
regno += insert_save_restore ((GET_CODE (insn) == JUMP_INSN
? insn : NEXT_INSN (insn)), 0,
regno, insn_mode, MOVE_MAX / UNITS_PER_WORD);
/* If we added any insns at the start of the block, update the start
of the block to point at those insns. */
basic_block_head[b] = NEXT_INSN (prev_block_last);
}
}
/* Here from note_stores when an insn stores a value in a register.
Set the proper bit or bits in hard_regs_live. All pseudos that have
been assigned hard regs have had their register number changed already,
so we can ignore pseudos. */
static void
set_reg_live (reg, setter)
rtx reg, setter;
{
register int regno, endregno, i;
enum machine_mode mode = GET_MODE (reg);
int word = 0;
if (GET_CODE (reg) == SUBREG)
{
word = SUBREG_WORD (reg);
reg = SUBREG_REG (reg);
}
if (GET_CODE (reg) != REG || REGNO (reg) >= FIRST_PSEUDO_REGISTER)
return;
regno = REGNO (reg) + word;
endregno = regno + HARD_REGNO_NREGS (regno, mode);
for (i = regno; i < endregno; i++)
{
SET_HARD_REG_BIT (hard_regs_live, i);
CLEAR_HARD_REG_BIT (hard_regs_saved, i);
CLEAR_HARD_REG_BIT (hard_regs_need_restore, i);
}
}
/* Here when a REG_DEAD note records the last use of a reg. Clear
the appropriate bit or bits in hard_regs_live. Again we can ignore
pseudos. */
static void
clear_reg_live (reg)
rtx reg;
{
register int regno, endregno, i;
if (GET_CODE (reg) != REG || REGNO (reg) >= FIRST_PSEUDO_REGISTER)
return;
regno = REGNO (reg);
endregno= regno + HARD_REGNO_NREGS (regno, GET_MODE (reg));
for (i = regno; i < endregno; i++)
{
CLEAR_HARD_REG_BIT (hard_regs_live, i);
CLEAR_HARD_REG_BIT (hard_regs_need_restore, i);
CLEAR_HARD_REG_BIT (hard_regs_saved, i);
}
}
/* If any register currently residing in the save area is referenced in X,
which is part of INSN, emit code to restore the register in front of INSN.
INSN_MODE is the mode to assign to any insns that we add. */
static void
restore_referenced_regs (x, insn, insn_mode)
rtx x;
rtx insn;
enum machine_mode insn_mode;
{
enum rtx_code code = GET_CODE (x);
char *fmt;
int i, j;
if (code == CLOBBER)
return;
if (code == REG)
{
int regno = REGNO (x);
/* If this is a pseudo, scan its memory location, since it might
involve the use of another register, which might be saved. */
if (regno >= FIRST_PSEUDO_REGISTER
&& reg_equiv_mem[regno] != 0)
restore_referenced_regs (XEXP (reg_equiv_mem[regno], 0),
insn, insn_mode);
else if (regno >= FIRST_PSEUDO_REGISTER
&& reg_equiv_address[regno] != 0)
restore_referenced_regs (reg_equiv_address[regno],
insn, insn_mode);
/* Otherwise if this is a hard register, restore any piece of it that
is currently saved. */
else if (regno < FIRST_PSEUDO_REGISTER)
{
int numregs = HARD_REGNO_NREGS (regno, GET_MODE (x));
/* Save at most SAVEREGS at a time. This can not be larger than
MOVE_MAX, because that causes insert_save_restore to fail. */
int saveregs = MIN (numregs, MOVE_MAX / UNITS_PER_WORD);
int endregno = regno + numregs;
for (i = regno; i < endregno; i++)
if (TEST_HARD_REG_BIT (hard_regs_need_restore, i))
i += insert_save_restore (insn, 0, i, insn_mode, saveregs);
}
return;
}
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
restore_referenced_regs (XEXP (x, i), insn, insn_mode);
else if (fmt[i] == 'E')
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
restore_referenced_regs (XVECEXP (x, i, j), insn, insn_mode);
}
}
/* Insert a sequence of insns to save or restore, SAVE_P says which,
REGNO. Place these insns in front of INSN. INSN_MODE is the mode
to assign to these insns. MAXRESTORE is the maximum number of registers
which should be restored during this call (when SAVE_P == 0). It should
never be less than 1 since we only work with entire registers.
Note that we have verified in init_caller_save that we can do this
with a simple SET, so use it. Set INSN_CODE to what we save there
since the address might not be valid so the insn might not be recognized.
These insns will be reloaded and have register elimination done by
find_reload, so we need not worry about that here.
Return the extra number of registers saved. */
static int
insert_save_restore (insn, save_p, regno, insn_mode, maxrestore)
rtx insn;
int save_p;
int regno;
enum machine_mode insn_mode;
int maxrestore;
{
rtx pat;
enum insn_code code;
int i, numregs;
/* A common failure mode if register status is not correct in the RTL
is for this routine to be called with a REGNO we didn't expect to
save. That will cause us to write an insn with a (nil) SET_DEST
or SET_SRC. Instead of doing so and causing a crash later, check
for this common case and abort here instead. This will remove one
step in debugging such problems. */
if (regno_save_mem[regno][1] == 0)
abort ();
#ifdef HAVE_cc0
/* If INSN references CC0, put our insns in front of the insn that sets
CC0. This is always safe, since the only way we could be passed an
insn that references CC0 is for a restore, and doing a restore earlier
isn't a problem. We do, however, assume here that CALL_INSNs don't
reference CC0. Guard against non-INSN's like CODE_LABEL. */
if ((GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN)
&& reg_referenced_p (cc0_rtx, PATTERN (insn)))
insn = prev_nonnote_insn (insn);
#endif
/* Get the pattern to emit and update our status. */
if (save_p)
{
int i, j, k;
int ok;
/* See if we can save several registers with a single instruction.
Work backwards to the single register case. */
for (i = MOVE_MAX / UNITS_PER_WORD; i > 0; i--)
{
ok = 1;
if (regno_save_mem[regno][i] != 0)
for (j = 0; j < i; j++)
{
if (! call_used_regs[regno + j] || call_fixed_regs[regno + j]
|| ! TEST_HARD_REG_BIT (hard_regs_live, regno + j)
|| TEST_HARD_REG_BIT (hard_regs_saved, regno + j))
ok = 0;
}
else
continue;
/* Must do this one save at a time */
if (! ok)
continue;
pat = gen_rtx (SET, VOIDmode, regno_save_mem[regno][i],
gen_rtx (REG, GET_MODE (regno_save_mem[regno][i]), regno));
code = reg_save_code[regno][i];
/* Set hard_regs_saved for all the registers we saved. */
for (k = 0; k < i; k++)
{
SET_HARD_REG_BIT (hard_regs_saved, regno + k);
SET_HARD_REG_BIT (hard_regs_need_restore, regno + k);
n_regs_saved++;
}
numregs = i;
break;
}
}
else
{
int i, j, k;
int ok;
/* See if we can restore `maxrestore' registers at once. Work
backwards to the single register case. */
for (i = maxrestore; i > 0; i--)
{
ok = 1;
if (regno_save_mem[regno][i])
for (j = 0; j < i; j++)
{
if (! TEST_HARD_REG_BIT (hard_regs_need_restore, regno + j))
ok = 0;
}
else
continue;
/* Must do this one restore at a time */
if (! ok)
continue;
pat = gen_rtx (SET, VOIDmode,
gen_rtx (REG, GET_MODE (regno_save_mem[regno][i]),
regno),
regno_save_mem[regno][i]);
code = reg_restore_code[regno][i];
/* Clear status for all registers we restored. */
for (k = 0; k < i; k++)
{
CLEAR_HARD_REG_BIT (hard_regs_need_restore, regno + k);
n_regs_saved--;
}
numregs = i;
break;
}
}
/* Emit the insn and set the code and mode. */
insn = emit_insn_before (pat, insn);
PUT_MODE (insn, insn_mode);
INSN_CODE (insn) = code;
/* Tell our callers how many extra registers we saved/restored */
return numregs - 1;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,674 +0,0 @@
.\" Copyright (c) 1991, 1992, 1993 Free Software Foundation \-*-Text-*-
.\" See section COPYING for conditions for redistribution
.TH cpp 1 "30apr1993" "GNU Tools" "GNU Tools"
.SH NAME
cccp, cpp \- The GNU C-Compatible Compiler Preprocessor.
.SH SYNOPSIS
.hy 0
.na
.TP
.B cccp
.RB "[\|" \-$ "\|]"
.RB "[\|" \-A \c
.I predicate\c
.RB [ (\c
.I value\c
.BR ) ]\|]
.RB "[\|" \-C "\|]"
.RB "[\|" \-D \c
.I name\c
.RB [ =\c
.I definition\c
\&]\|]
.RB "[\|" \-dD "\|]"
.RB "[\|" \-dM "\|]"
.RB "[\|" "\-I\ "\c
.I directory\c
\&\|]
.RB "[\|" \-H "\|]"
.RB "[\|" \-I\- "\|]"
.RB "[\|" "\-imacros\ "\c
.I file\c
\&\|]
.RB "[\|" "\-include\ "\c
.I file\c
\&\|]
.RB "[\|" "\-idirafter\ "\c
.I dir\c
\&\|]
.RB "[\|" "\-iprefix\ "\c
.I prefix\c
\&\|]
.RB "[\|" "\-iwithprefix\ "\c
.I dir\c
\&\|]
.RB "[\|" \-lang\-c "\|]"
.RB "[\|" \-lang\-c++ "\|]"
.RB "[\|" \-lang\-objc "\|]"
.RB "[\|" \-lang\-objc++ "\|]"
.RB "[\|" \-lint "\|]"
.RB "[\|" \-M\ [ \-MG "\|]]"
.RB "[\|" \-MM\ [ \-MG "\|]]"
.RB "[\|" \-MD\ \c
.I file\ \c
\&\|]
.RB "[\|" \-MMD\ \c
.I file\ \c
\&\|]
.RB "[\|" \-nostdinc "\|]"
.RB "[\|" \-nostdinc++ "\|]"
.RB "[\|" \-P "\|]"
.RB "[\|" \-pedantic "\|]"
.RB "[\|" \-pedantic\-errors "\|]"
.RB "[\|" \-traditional "\|]"
.RB "[\|" \-trigraphs "\|]"
.RB "[\|" \-U \c
.I name\c
\&\|]
.RB "[\|" \-undef "\|]"
.RB "[\|" \-Wtrigraphs "\|]"
.RB "[\|" \-Wcomment "\|]"
.RB "[\|" \-Wall "\|]"
.RB "[\|" \-Wtraditional "\|]"
.br
.RB "[\|" \c
.I infile\c
.RB | \- "\|]"
.RB "[\|" \c
.I outfile\c
.RB | \- "\|]"
.ad b
.hy 1
.SH DESCRIPTION
The C preprocessor is a \c
.I macro processor\c
\& that is used automatically by
the C compiler to transform your program before actual compilation. It is
called a macro processor because it allows you to define \c
.I macros\c
\&,
which are brief abbreviations for longer constructs.
The C preprocessor provides four separate facilities that you can use as
you see fit:
.TP
\(bu
Inclusion of header files. These are files of declarations that can be
substituted into your program.
.TP
\(bu
Macro expansion. You can define \c
.I macros\c
\&, which are abbreviations
for arbitrary fragments of C code, and then the C preprocessor will
replace the macros with their definitions throughout the program.
.TP
\(bu
Conditional compilation. Using special preprocessing directives, you
can include or exclude parts of the program according to various
conditions.
.TP
\(bu
Line control. If you use a program to combine or rearrange source files into
an intermediate file which is then compiled, you can use line control
to inform the compiler of where each source line originally came from.
.PP
C preprocessors vary in some details. For a full explanation of the
GNU C preprocessor, see the
.B info
file `\|\c
.B cpp.info\c
\&\|', or the manual
.I The C Preprocessor\c
\&. Both of these are built from the same documentation source file, `\|\c
.B cpp.texinfo\c
\&\|'. The GNU C
preprocessor provides a superset of the features of ANSI Standard C.
ANSI Standard C requires the rejection of many harmless constructs commonly
used by today's C programs. Such incompatibility would be inconvenient for
users, so the GNU C preprocessor is configured to accept these constructs
by default. Strictly speaking, to get ANSI Standard C, you must use the
options `\|\c
.B \-trigraphs\c
\&\|', `\|\c
.B \-undef\c
\&\|' and `\|\c
.B \-pedantic\c
\&\|', but in
practice the consequences of having strict ANSI Standard C make it
undesirable to do this.
Most often when you use the C preprocessor you will not have to invoke it
explicitly: the C compiler will do so automatically. However, the
preprocessor is sometimes useful individually.
When you call the preprocessor individually, either name
(\c
.B cpp\c
\& or \c
.B cccp\c
\&) will do\(em\&they are completely synonymous.
The C preprocessor expects two file names as arguments, \c
.I infile\c
\& and
\c
.I outfile\c
\&. The preprocessor reads \c
.I infile\c
\& together with any other
files it specifies with `\|\c
.B #include\c
\&\|'. All the output generated by the
combined input files is written in \c
.I outfile\c
\&.
Either \c
.I infile\c
\& or \c
.I outfile\c
\& may be `\|\c
.B \-\c
\&\|', which as \c
.I infile\c
\&
means to read from standard input and as \c
.I outfile\c
\& means to write to
standard output. Also, if \c
.I outfile\c
\& or both file names are omitted,
the standard output and standard input are used for the omitted file names.
.SH OPTIONS
Here is a table of command options accepted by the C preprocessor.
These options can also be given when compiling a C program; they are
passed along automatically to the preprocessor when it is invoked by
the compiler.
.TP
.B \-P
Inhibit generation of `\|\c
.B #\c
\&\|'-lines with line-number information in
the output from the preprocessor. This might be
useful when running the preprocessor on something that is not C code
and will be sent to a program which might be confused by the
`\|\c
.B #\c
\&\|'-lines.
.TP
.B \-C
Do not discard comments: pass them through to the output file.
Comments appearing in arguments of a macro call will be copied to the
output before the expansion of the macro call.
.TP
.B \-traditional
Try to imitate the behavior of old-fashioned C, as opposed to ANSI C.
.TP
.B \-trigraphs
Process ANSI standard trigraph sequences. These are three-character
sequences, all starting with `\|\c
.B ??\c
\&\|', that are defined by ANSI C to
stand for single characters. For example, `\|\c
.B ??/\c
\&\|' stands for
`\|\c
.BR "\e" "\|',"
so `\|\c
.B '??/n'\c
\&\|' is a character constant for a newline.
Strictly speaking, the GNU C preprocessor does not support all
programs in ANSI Standard C unless `\|\c
.B \-trigraphs\c
\&\|' is used, but if
you ever notice the difference it will be with relief.
You don't want to know any more about trigraphs.
.TP
.B \-pedantic
Issue warnings required by the ANSI C standard in certain cases such
as when text other than a comment follows `\|\c
.B #else\c
\&\|' or `\|\c
.B #endif\c
\&\|'.
.TP
.B \-pedantic\-errors
Like `\|\c
.B \-pedantic\c
\&\|', except that errors are produced rather than
warnings.
.TP
.B \-Wtrigraphs
Warn if any trigraphs are encountered (assuming they are enabled).
.TP
.B \-Wcomment
.TP
.B \-Wcomments
Warn whenever a comment-start sequence `\|\c
.B /*\c
\&\|' appears in a comment.
(Both forms have the same effect).
.TP
.B \-Wall
Requests both `\|\c
.B \-Wtrigraphs\c
\&\|' and `\|\c
.B \-Wcomment\c
\&\|' (but not
`\|\c
.B \-Wtraditional\c
\&\|').
.TP
.B \-Wtraditional
Warn about certain constructs that behave differently in traditional and
ANSI C.
.TP
.BI "\-I " directory\c
\&
Add the directory \c
.I directory\c
\& to the end of the list of
directories to be searched for header files.
This can be used to override a system header file, substituting your
own version, since these directories are searched before the system
header file directories. If you use more than one `\|\c
.B \-I\c
\&\|' option,
the directories are scanned in left-to-right order; the standard
system directories come after.
.TP
.B \-I\-
Any directories specified with `\|\c
.B \-I\c
\&\|' options before the `\|\c
.B \-I\-\c
\&\|'
option are searched only for the case of `\|\c
.B #include "\c
.I file\c
\&"\c
\&\|';
they are not searched for `\|\c
.B #include <\c
.I file\c
\&>\c
\&\|'.
If additional directories are specified with `\|\c
.B \-I\c
\&\|' options after
the `\|\c
.B \-I\-\c
\&\|', these directories are searched for all `\|\c
.B #include\c
\&\|'
directives.
In addition, the `\|\c
.B \-I\-\c
\&\|' option inhibits the use of the current
directory as the first search directory for `\|\c
.B #include "\c
.I file\c
\&"\c
\&\|'.
Therefore, the current directory is searched only if it is requested
explicitly with `\|\c
.B \-I.\c
\&\|'. Specifying both `\|\c
.B \-I\-\c
\&\|' and `\|\c
.B \-I.\c
\&\|'
allows you to control precisely which directories are searched before
the current one and which are searched after.
.TP
.B \-nostdinc
Do not search the standard system directories for header files.
Only the directories you have specified with `\|\c
.B \-I\c
\&\|' options
(and the current directory, if appropriate) are searched.
.TP
.B \-nostdinc++
Do not search for header files in the C++ specific standard
directories, but do still search the other standard directories.
(This option is used when building libg++.)
.TP
.BI "\-D " "name"\c
\&
Predefine \c
.I name\c
\& as a macro, with definition `\|\c
.B 1\c
\&\|'.
.TP
.BI "\-D " "name" = definition
\&
Predefine \c
.I name\c
\& as a macro, with definition \c
.I definition\c
\&.
There are no restrictions on the contents of \c
.I definition\c
\&, but if
you are invoking the preprocessor from a shell or shell-like program
you may need to use the shell's quoting syntax to protect characters
such as spaces that have a meaning in the shell syntax. If you use more than
one `\|\c
.B \-D\c
\&\|' for the same
.I name\c
\&, the rightmost definition takes effect.
.TP
.BI "\-U " "name"\c
\&
Do not predefine \c
.I name\c
\&. If both `\|\c
.B \-U\c
\&\|' and `\|\c
.B \-D\c
\&\|' are
specified for one name, the `\|\c
.B \-U\c
\&\|' beats the `\|\c
.B \-D\c
\&\|' and the name
is not predefined.
.TP
.B \-undef
Do not predefine any nonstandard macros.
.TP
.BI "\-A " "name(" value )
Assert (in the same way as the \c
.B #assert\c
\& directive)
the predicate \c
.I name\c
\& with tokenlist \c
.I value\c
\&. Remember to escape or quote the parentheses on
shell command lines.
You can use `\|\c
.B \-A-\c
\&\|' to disable all predefined assertions; it also
undefines all predefined macros.
.TP
.B \-dM
Instead of outputting the result of preprocessing, output a list of
`\|\c
.B #define\c
\&\|' directives for all the macros defined during the
execution of the preprocessor, including predefined macros. This gives
you a way of finding out what is predefined in your version of the
preprocessor; assuming you have no file `\|\c
.B foo.h\c
\&\|', the command
.sp
.br
touch\ foo.h;\ cpp\ \-dM\ foo.h
.br
.sp
will show the values of any predefined macros.
.TP
.B \-dD
Like `\|\c
.B \-dM\c
\&\|' except in two respects: it does \c
.I not\c
\& include the
predefined macros, and it outputs \c
.I both\c
\& the `\|\c
.B #define\c
\&\|'
directives and the result of preprocessing. Both kinds of output go to
the standard output file.
.PP
.TP
.BR \-M\ [ \-MG ]
Instead of outputting the result of preprocessing, output a rule
suitable for \c
.B make\c
\& describing the dependencies of the main
source file. The preprocessor outputs one \c
.B make\c
\& rule containing
the object file name for that source file, a colon, and the names of
all the included files. If there are many included files then the
rule is split into several lines using `\|\c
.B \\\\\c
\&\|'-newline.
`\|\c
.B \-MG\c
\&\|' says to treat missing header files as generated files and assume \c
they live in the same directory as the source file. It must be specified \c
in addition to `\|\c
.B \-M\c
\&\|'.
This feature is used in automatic updating of makefiles.
.TP
.BR \-MM\ [ \-MG ]
Like `\|\c
.B \-M\c
\&\|' but mention only the files included with `\|\c
.B #include
"\c
.I file\c
\&"\c
\&\|'. System header files included with `\|\c
.B #include
<\c
.I file\c
\&>\c
\&\|' are omitted.
.TP
.BI \-MD\ file
Like `\|\c
.B \-M\c
\&\|' but the dependency information is written to `\|\c
.I file\c
\&\|'. This is in addition to compiling the file as
specified\(em\&`\|\c
.B \-MD\c
\&\|' does not inhibit ordinary compilation the way
`\|\c
.B \-M\c
\&\|' does.
When invoking gcc, do not specify the `\|\c
.I file\c
\&\|' argument. Gcc will create file names made by replacing `\|\c
.B .c\c
\&\|' with `\|\c
.B .d\c
\&\|' at the end of the input file names.
In Mach, you can use the utility \c
.B md\c
\& to merge multiple files
into a single dependency file suitable for using with the `\|\c
.B make\c
\&\|'
command.
.TP
.BI \-MMD\ file
Like `\|\c
.B \-MD\c
\&\|' except mention only user header files, not system
header files.
.TP
.B \-H
Print the name of each header file used, in addition to other normal
activities.
.TP
.BI "\-imacros " "file"\c
\&
Process \c
.I file\c
\& as input, discarding the resulting output, before
processing the regular input file. Because the output generated from
\c
.I file\c
\& is discarded, the only effect of `\|\c
.B \-imacros \c
.I file\c
\&\c
\&\|' is to
make the macros defined in \c
.I file\c
\& available for use in the main
input. The preprocessor evaluates any `\|\c
.B \-D\c
\&\|' and `\|\c
.B \-U\c
\&\|' options
on the command line before processing `\|\c
.B \-imacros \c
.I file\c
\&\|' \c
\&.
.TP
.BI "\-include " "file"
Process
.I file
as input, and include all the resulting output,
before processing the regular input file.
.TP
.BI "-idirafter " "dir"\c
\&
Add the directory \c
.I dir\c
\& to the second include path. The directories
on the second include path are searched when a header file is not found
in any of the directories in the main include path (the one that
`\|\c
.B \-I\c
\&\|' adds to).
.TP
.BI "-iprefix " "prefix"\c
\&
Specify \c
.I prefix\c
\& as the prefix for subsequent `\|\c
.B \-iwithprefix\c
\&\|'
options.
.TP
.BI "-iwithprefix " "dir"\c
\&
Add a directory to the second include path. The directory's name is
made by concatenating \c
.I prefix\c
\& and \c
.I dir\c
\&, where \c
.I prefix\c
\&
was specified previously with `\|\c
.B \-iprefix\c
\&\|'.
.TP
.B \-lang-c
.TP
.B \-lang-c++
.TP
.B \-lang-objc
.TP
.B \-lang-objc++
Specify the source language. `\|\c
.B \-lang-c++\c
\&\|' makes the preprocessor
handle C++ comment syntax, and includes extra default include
directories for C++, and `\|\c
.B \-lang-objc\c
\&\|' enables the Objective C
`\|\c
.B #import\c
\&\|' directive. `\|\c
.B \-lang-c\c
\&\|' explicitly turns off both of
these extensions, and `\|\c
.B \-lang-objc++\c
\&\|' enables both.
These options are generated by the compiler driver \c
.B gcc\c
\&, but not
passed from the `\|\c
.B gcc\c
\&\|' command line.
.TP
.B \-lint
Look for commands to the program checker \c
.B lint\c
\& embedded in
comments, and emit them preceded by `\|\c
.B #pragma lint\c
\&\|'. For example,
the comment `\|\c
.B /* NOTREACHED */\c
\&\|' becomes `\|\c
.B #pragma lint
NOTREACHED\c
\&\|'.
This option is available only when you call \c
.B cpp\c
\& directly;
\c
.B gcc\c
\& will not pass it from its command line.
.TP
.B \-$
Forbid the use of `\|\c
.B $\c
\&\|' in identifiers. This was formerly required for strict conformance
to the C Standard before the standard was corrected. \c
This option is available only when you call \c
.B cpp\c
\& directly;
.B gcc\c
\& will not pass it from its command line.
.SH "SEE ALSO"
.RB "`\|" Cpp "\|'"
entry in
.B info\c
\&;
.I The C Preprocessor\c
, Richard M. Stallman.
.br
.BR gcc "(" 1 ");"
.RB "`\|" Gcc "\|'"
entry in
.B info\c
\&;
.I
Using and Porting GNU CC (for version 2.0)\c
, Richard M. Stallman.
.SH COPYING
Copyright (c) 1991, 1992, 1993 Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
.PP
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
.PP
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be included in
translations approved by the Free Software Foundation instead of in
the original English.

10319
gcc/cccp.c

File diff suppressed because it is too large Load Diff

2142
gcc/cexp.c

File diff suppressed because it is too large Load Diff

1219
gcc/cexp.y

File diff suppressed because it is too large Load Diff

View File

@@ -1,147 +0,0 @@
/* Utility to pick a temporary filename prefix.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
Libiberty is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with libiberty; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file exports one function: choose_temp_base. */
/* This file lives in at least two places: libiberty and gcc.
Don't change one without the other. */
#ifndef NO_SYS_FILE_H
#include <sys/types.h>
#include <sys/file.h> /* May get R_OK, etc. on some systems. */
#endif
#ifndef R_OK
#define R_OK 4
#define W_OK 2
#define X_OK 1
#endif
#include <stdio.h> /* May get P_tmpdir. */
#ifdef IN_GCC
#include "config.h"
#include "gansidecl.h"
extern char *xmalloc ();
#else
#include "ansidecl.h"
#include "libiberty.h"
#if defined (__MSDOS__) || defined (_WIN32)
#define DIR_SEPARATOR '\\'
#endif
#endif
#ifndef DIR_SEPARATOR
#define DIR_SEPARATOR '/'
#endif
/* On MSDOS, write temp files in current dir
because there's no place else we can expect to use. */
/* ??? Although the current directory is tried as a last resort,
this is left in so that on MSDOS it is prefered to /tmp on the
off chance that someone requires this, since that was the previous
behaviour. */
#ifdef __MSDOS__
#ifndef P_tmpdir
#define P_tmpdir "."
#endif
#endif
/* Name of temporary file.
mktemp requires 6 trailing X's. */
#define TEMP_FILE "ccXXXXXX"
/* Subroutine of choose_temp_base.
If BASE is non-NULL, returh it.
Otherwise it checks if DIR is a usable directory.
If success, DIR is returned.
Otherwise NULL is returned. */
static char *
try (dir, base)
char *dir, *base;
{
if (base != 0)
return base;
if (dir != 0
&& access (dir, R_OK | W_OK | X_OK) == 0)
return dir;
return 0;
}
/* Return a prefix for temporary file names or NULL if unable to find one.
The current directory is chosen if all else fails so the program is
exited if a temporary directory can't be found (mktemp fails).
The buffer for the result is obtained with xmalloc. */
char *
choose_temp_base ()
{
char *base = 0;
char *temp_filename;
int len;
static char tmp[] = { DIR_SEPARATOR, 't', 'm', 'p', 0 };
static char usrtmp[] = { DIR_SEPARATOR, 'u', 's', 'r', DIR_SEPARATOR, 't', 'm', 'p', 0 };
#ifndef MPW
base = try (getenv ("TMPDIR"), base);
base = try (getenv ("TMP"), base);
base = try (getenv ("TEMP"), base);
#ifdef P_tmpdir
base = try (P_tmpdir, base);
#endif
/* Try /usr/tmp, then /tmp. */
base = try (usrtmp, base);
base = try (tmp, base);
/* If all else fails, use the current directory! */
if (base == 0)
#ifdef VMS
base = "[";
#else
base = ".";
#endif
#else /* MPW */
base = ":";
#endif
len = strlen (base);
temp_filename = xmalloc (len + 1 /*DIR_SEPARATOR*/
+ strlen (TEMP_FILE) + 1);
strcpy (temp_filename, base);
#ifndef MPW
if (len != 0
&& temp_filename[len-1] != '/'
&& temp_filename[len-1] != DIR_SEPARATOR)
temp_filename[len++] = DIR_SEPARATOR;
#else /* MPW */
if (temp_filename[len-1] != ':')
temp_filename[len++] = ':';
#endif /* MPW */
strcpy (temp_filename + len, TEMP_FILE);
mktemp (temp_filename);
if (strlen (temp_filename) == 0)
abort ();
return temp_filename;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,118 +0,0 @@
/* Definitions for condition code handling in final.c and output routines.
Copyright (C) 1987 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* None of the things in the files exist if we don't use CC0. */
#ifdef HAVE_cc0
/* The variable cc_status says how to interpret the condition code.
It is set by output routines for an instruction that sets the cc's
and examined by output routines for jump instructions.
cc_status contains two components named `value1' and `value2'
that record two equivalent expressions for the values that the
condition codes were set from. (Either or both may be null if
there is no useful expression to record.) These fields are
used for eliminating redundant test and compare instructions
in the cases where the condition codes were already set by the
previous instruction.
cc_status.flags contains flags which say that the condition codes
were set in a nonstandard manner. The output of jump instructions
uses these flags to compensate and produce the standard result
with the nonstandard condition codes. Standard flags are defined here.
The tm.h file can also define other machine-dependent flags.
cc_status also contains a machine-dependent component `mdep'
whose type, `CC_STATUS_MDEP', may be defined as a macro in the
tm.h file. */
#ifndef CC_STATUS_MDEP
#define CC_STATUS_MDEP int
#endif
#ifndef CC_STATUS_MDEP_INIT
#define CC_STATUS_MDEP_INIT 0
#endif
typedef struct {int flags; rtx value1, value2; CC_STATUS_MDEP mdep;} CC_STATUS;
/* While outputting an insn as assembler code,
this is the status BEFORE that insn. */
extern CC_STATUS cc_prev_status;
/* While outputting an insn as assembler code,
this is being altered to the status AFTER that insn. */
extern CC_STATUS cc_status;
/* These are the machine-independent flags: */
/* Set if the sign of the cc value is inverted:
output a following jump-if-less as a jump-if-greater, etc. */
#define CC_REVERSED 1
/* This bit means that the current setting of the N bit is bogus
and conditional jumps should use the Z bit in its place.
This state obtains when an extraction of a signed single-bit field
or an arithmetic shift right of a byte by 7 bits
is turned into a btst, because btst does not set the N bit. */
#define CC_NOT_POSITIVE 2
/* This bit means that the current setting of the N bit is bogus
and conditional jumps should pretend that the N bit is clear.
Used after extraction of an unsigned bit
or logical shift right of a byte by 7 bits is turned into a btst.
The btst does not alter the N bit, but the result of that shift
or extract is never negative. */
#define CC_NOT_NEGATIVE 4
/* This bit means that the current setting of the overflow flag
is bogus and conditional jumps should pretend there is no overflow. */
/* ??? Note that for most targets this macro is misnamed as it applies
to the carry flag, not the overflow flag. */
#define CC_NO_OVERFLOW 010
/* This bit means that what ought to be in the Z bit
should be tested as the complement of the N bit. */
#define CC_Z_IN_NOT_N 020
/* This bit means that what ought to be in the Z bit
should be tested as the N bit. */
#define CC_Z_IN_N 040
/* Nonzero if we must invert the sense of the following branch, i.e.
change EQ to NE. This is not safe for IEEE floating point operations!
It is intended for use only when a combination of arithmetic
or logical insns can leave the condition codes set in a fortuitous
(though inverted) state. */
#define CC_INVERTED 0100
/* Nonzero if we must convert signed condition operators to unsigned.
This is only used by machine description files. */
#define CC_NOT_SIGNED 0200
/* This is how to initialize the variable cc_status.
final does this at appropriate moments. */
#define CC_STATUS_INIT \
(cc_status.flags = 0, cc_status.value1 = 0, cc_status.value2 = 0, \
CC_STATUS_MDEP_INIT)
#endif

845
gcc/config.guess vendored
View File

@@ -1,845 +0,0 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# The master version of this file is at the FSF in /home/gd/gnu/lib.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
# don't specify an explicit system type (host/target name).
#
# Only a few systems have been added to this list; please add others
# (but try to keep the structure clean).
#
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
alpha:OSF1:*:*)
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
cat <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d84
cmoveq \$4,0,\$3
addl \$3,\$31,\$0
ret \$31,(\$26),1
.end main
EOF
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
1)
UNAME_MACHINE="alphaev5"
;;
2)
UNAME_MACHINE="alphaev56"
;;
esac
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-cbm-sysv4
exit 0;;
amiga:NetBSD:*:*)
echo m68k-cbm-netbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc64:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hkmips:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
arm32:NetBSD:*:*)
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
fi
exit 0 ;;
NILE:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
exit 0 ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
;;
sun4)
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
exit 0 ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
atari*:NetBSD:*:*)
echo m68k-atari-netbsd${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:NetBSD:*:*)
echo m68k-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit 0 ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
2020:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
sed 's/^ //' << EOF >dummy.c
int main (argc, argv) int argc; char **argv; {
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
${CC-cc} dummy.c -o dummy \
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit 0 ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
exit 0 ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
exit 0 ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
exit 0 ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
echo m88k-dg-dgux${UNAME_RELEASE}
else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
else echo i586-dg-dgux${UNAME_RELEASE}
fi
exit 0 ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit 0 ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
exit 0 ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
exit 0 ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit 0 ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit 0 ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i?86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >dummy.c
#include <sys/systemcfg.h>
main()
{
if (!__power_pc())
exit(1);
puts("powerpc-ibm-aix3.2.5");
exit(0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
exit 0 ;;
*:AIX:*:4)
if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=4.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit 0 ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit 0 ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit 0 ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit 0 ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
exit 0 ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
exit 0 ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit 0 ;;
9000/[3478]??:HP-UX:*:*)
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
9000/8?? ) HP_ARCH=hppa1.0 ;;
esac
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
sed 's/^ //' << EOF >dummy.c
#include <unistd.h>
int
main ()
{
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
results, however. */
if (CPU_IS_PA_RISC (cpu))
{
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
default: puts ("hppa-hitachi-hiuxwe2"); break;
}
}
else if (CPU_IS_HP_MC68K (cpu))
puts ("m68k-hitachi-hiuxwe2");
else puts ("unknown-hitachi-hiuxwe2");
exit (0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
exit 0 ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit 0 ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit 0 ;;
i?86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
exit 0 ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit 0 ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit 0 ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit 0 ;;
CRAY*X-MP:*:*:*)
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
F300:UNIX_System_V:*:*)
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
F301:UNIX_System_V:*:*)
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
exit 0 ;;
hp3[0-9][05]:NetBSD:*:*)
echo m68k-hp-netbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
i?86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:NetBSD:*:*)
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo i386-pc-cygwin32
exit 0 ;;
i*:MINGW*:*)
echo i386-pc-mingw32
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin32
exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
ld_supported_emulations=`echo $ld_help_string \
| sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
s/.*supported emulations: *//
s/ .*//
p'`
case "$ld_supported_emulations" in
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
sed 's/^ //' <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d84
cmoveq \$4,0,\$3
addl \$3,\$31,\$0
ret \$31,(\$26),1
.end main
EOF
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
1)
UNAME_MACHINE="alphaev5"
;;
2)
UNAME_MACHINE="alphaev56"
;;
esac
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
cat >dummy.c <<EOF
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
#ifdef __MIPSEL__
printf ("%sel-unknown-linux-gnu\n", argv[1]);
#endif
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
else
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
# If ld does not provide *any* "supported emulations:"
# that means it is gnuoldld.
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
case "${UNAME_MACHINE}" in
i?86)
VENDOR=pc;
;;
*)
VENDOR=unknown;
;;
esac
# Determine whether the default compiler is a.out or elf
cat >dummy.c <<EOF
#include <features.h>
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
#else
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
fi ;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
i?86:DYNIX/ptx:4*:*)
echo i386-sequent-sysv4
exit 0 ;;
i?86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
exit 0 ;;
i?86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
pc:*:*:*)
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
exit 0 ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit 0 ;;
paragon:*:*:*)
echo i860-intel-osf1
exit 0 ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit 0 ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4.3${OS_REL} && exit 0
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4 && exit 0 ;;
m68*:LynxOS:2.*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i?86:LynxOS:2.*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
echo ${UNAME_MACHINE}-sni-sysv4
else
echo ns32k-sni-sysv
fi
exit 0 ;;
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit 0 ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
exit 0 ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
exit 0 ;;
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
cat >dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
I don't know.... */
printf ("mips-sony-bsd\n"); exit (0);
#else
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
#else
""
#endif
); exit (0);
#endif
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
printf ("arm-acorn-riscix"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
printf ("m68k-hp-bsd\n"); exit (0);
#endif
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
#if defined (MULTIMAX) || defined (n16)
#if defined (UMAXV)
printf ("ns32k-encore-sysv\n"); exit (0);
#else
#if defined (CMU)
printf ("ns32k-encore-mach\n"); exit (0);
#else
printf ("ns32k-encore-bsd\n"); exit (0);
#endif
#endif
#endif
#if defined (__386BSD__)
printf ("i386-pc-bsd\n"); exit (0);
#endif
#if defined (sequent)
#if defined (i386)
printf ("i386-sequent-dynix\n"); exit (0);
#endif
#if defined (ns32000)
printf ("ns32k-sequent-dynix\n"); exit (0);
#endif
#endif
#if defined (_SEQUENT_)
struct utsname un;
uname(&un);
if (strncmp(un.version, "V2", 2) == 0) {
printf ("i386-sequent-ptx2\n"); exit (0);
}
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
printf ("i386-sequent-ptx1\n"); exit (0);
}
printf ("i386-sequent-ptx\n"); exit (0);
#endif
#if defined (vax)
#if !defined (ultrix)
printf ("vax-dec-bsd\n"); exit (0);
#else
printf ("vax-dec-ultrix\n"); exit (0);
#endif
#endif
#if defined (alliant) && defined (i860)
printf ("i860-alliant-bsd\n"); exit (0);
#endif
exit (1);
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
# Apollos put the system type in the environment.
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
# Convex versions that predate uname can use getsysinfo(1)
if [ -x /usr/convex/getsysinfo ]
then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
exit 0 ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit 0 ;;
c34*)
echo c34-convex-bsd
exit 0 ;;
c38*)
echo c38-convex-bsd
exit 0 ;;
c4*)
echo c4-convex-bsd
exit 0 ;;
esac
fi
#echo '(Unable to guess system type)' 1>&2
exit 1

View File

@@ -1,32 +0,0 @@
/* config.in. Generated automatically from configure.in by autoheader. */
/* Include the old config.h as config2.h to simplify the transition
to autoconf. */
#include "config2.h"
/* Whether malloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_MALLOC
/* Whether realloc must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_REALLOC
/* Whether free must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_FREE
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define if you have the <time.h> header file. */
#undef HAVE_TIME_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

944
gcc/config.sub vendored
View File

@@ -1,944 +0,0 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
if [ x$1 = x ]
then
echo Configuration name missing. 1>&2
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
echo "or $0 ALIAS" 1>&2
echo where ALIAS is a recognized configuration type. 1>&2
exit 1
fi
# First pass through any local machine types.
case $1 in
*local*)
echo $1
exit 0
;;
*)
;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
linux-gnu*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple)
os=
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco5)
os=sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*)
os=-lynxos
;;
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arm \
| arme[lb] | pyramid | mn10200 | mn10300 \
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
| sparc | sparclet | sparclite | sparc64)
basic_machine=$basic_machine-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i[3456]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
am29k)
basic_machine=a29k-none
os=-bsd
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-cbm
;;
amigados)
basic_machine=m68k-cbm
os=-amigados
;;
amigaunix | amix)
basic_machine=m68k-cbm
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
aux)
basic_machine=m68k-apple
os=-aux
;;
balance)
basic_machine=ns32k-sequent
os=-dynix
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
;;
convex-c2)
basic_machine=c2-convex
os=-bsd
;;
convex-c32)
basic_machine=c32-convex
os=-bsd
;;
convex-c34)
basic_machine=c34-convex
os=-bsd
;;
convex-c38)
basic_machine=c38-convex
os=-bsd
;;
cray | ymp)
basic_machine=ymp-cray
os=-unicos
;;
cray2)
basic_machine=cray2-cray
os=-unicos
;;
[ctj]90-cray)
basic_machine=c90-cray
os=-unicos
;;
crds | unos)
basic_machine=m68k-crds
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
delta88)
basic_machine=m88k-motorola
os=-sysv3
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
;;
dpx2* | dpx2*-bull)
basic_machine=m68k-bull
os=-sysv3
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
;;
elxsi)
basic_machine=elxsi-elxsi
os=-bsd
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
fx2800)
basic_machine=i860-alliant
;;
genix)
basic_machine=ns32k-ns
;;
gmicro)
basic_machine=tron-gmicro
os=-sysv
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
h8300hms)
basic_machine=h8300-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
;;
hp300-*)
basic_machine=m68k-hp
;;
hp300bsd)
basic_machine=m68k-hp
os=-bsd
;;
hp300hpux)
basic_machine=m68k-hp
os=-hpux
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hppa-next)
os=-nextstep3
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[3456]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i[3456]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i[3456]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i[3456]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
-irix*)
;;
*)
os=-irix4
;;
esac
;;
isi68 | isi)
basic_machine=m68k-isi
os=-sysv
;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
;;
merlin)
basic_machine=ns32k-utek
os=-sysv
;;
miniframe)
basic_machine=m68000-convergent
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
;;
mips*-linux*)
basic_machine=mips-unknown
os=-linux-gnu
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
;;
news1000)
basic_machine=m68030-sony
os=-newsos
;;
news-3600 | risc-news)
basic_machine=mips-sony
os=-newsos
;;
next | m*-next )
basic_machine=m68k-next
case $os in
-nextstep* )
;;
-ns2*)
os=-nextstep2
;;
*)
os=-nextstep3
;;
esac
;;
nh3000)
basic_machine=m68k-harris
os=-cxux
;;
nh[45]000)
basic_machine=m88k-harris
os=-cxux
;;
nindy960)
basic_machine=i960-intel
os=-nindy
;;
np1)
basic_machine=np1-gould
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
paragon)
basic_machine=i860-intel
os=-osf
;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5)
basic_machine=i586-intel
;;
pentiumpro | p6)
basic_machine=i686-intel
;;
pentium-* | p5-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
k5)
# We don't have specific support for AMD's K5 yet, so just call it a Pentium
basic_machine=i586-amd
;;
nexen)
# We don't have specific support for Nexgen yet, so just call it a Pentium
basic_machine=i586-nexgen
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=rs6000-ibm
;;
ppc) basic_machine=powerpc-unknown
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
sequent)
basic_machine=i386-sequent
;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
;;
spur)
basic_machine=spur-unknown
;;
sun2)
basic_machine=m68000-sun
;;
sun2os3)
basic_machine=m68000-sun
os=-sunos3
;;
sun2os4)
basic_machine=m68000-sun
os=-sunos4
;;
sun3os3)
basic_machine=m68k-sun
os=-sunos3
;;
sun3os4)
basic_machine=m68k-sun
os=-sunos4
;;
sun4os3)
basic_machine=sparc-sun
os=-sunos3
;;
sun4os4)
basic_machine=sparc-sun
os=-sunos4
;;
sun4sol2)
basic_machine=sparc-sun
os=-solaris2
;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
sun4)
basic_machine=sparc-sun
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
udi29k)
basic_machine=a29k-amd
os=-udi
;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
;;
vaxv)
basic_machine=vax-dec
os=-sysv
;;
vms)
basic_machine=vax-dec
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
;;
vxworks68)
basic_machine=m68k-wrs
os=-vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
os=-vxworks
;;
xmp)
basic_machine=xmp-cray
os=-unicos
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
none)
basic_machine=none-none
os=-none
;;
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
else
basic_machine=mips-mips
fi
;;
romp)
basic_machine=romp-ibm
;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sparc)
basic_machine=sparc-sun
;;
cydra)
basic_machine=cydra-cydrome
;;
orion)
basic_machine=orion-highlevel
;;
orion105)
basic_machine=clipper-highlevel
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
;;
*-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
-svr4*)
os=-sysv4
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*)
os=-bsd
;;
-dynix*)
os=-bsd
;;
-acis*)
os=-aos
;;
-ctix* | -uts*)
os=-sysv
;;
-ns2 )
os=-nextstep2
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
-sinix*)
os=-sysv4
;;
-triton*)
os=-sysv3
;;
-oss*)
os=-sysv3
;;
-svr4)
os=-sysv4
;;
-svr3)
os=-sysv3
;;
-sysvr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
-xenix)
os=-xenix
;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $basic_machine in
*-acorn)
os=-riscix1.2
;;
arm*-semi)
os=-aout
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
m68*-apollo)
os=-domain
;;
i386-sun)
os=-sunos4.0.2
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
*-ibm)
os=-aix
;;
*-hp)
os=-hpux
;;
*-hitachi)
os=-hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=-sysv
;;
*-cbm)
os=-amigados
;;
*-dg)
os=-dgux
;;
*-dolphin)
os=-sysv3
;;
m68k-ccur)
os=-rtu
;;
m88k-omron*)
os=-luna
;;
*-next )
os=-nextstep
;;
*-sequent)
os=-ptx
;;
*-crds)
os=-unos
;;
*-ns)
os=-genix
;;
i370-*)
os=-mvs
;;
*-next)
os=-nextstep3
;;
*-gould)
os=-sysv
;;
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
os=-irix
;;
*-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
f301-fujitsu)
os=-uxpv
;;
*)
os=-none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
*-unknown)
case $os in
-riscix*)
vendor=acorn
;;
-sunos*)
vendor=sun
;;
-aix*)
vendor=ibm
;;
-hpux*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
-unos*)
vendor=crds
;;
-dgux*)
vendor=dg
;;
-luna*)
vendor=omron
;;
-genix*)
vendor=ns
;;
-mvs*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-vxsim* | -vxworks*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os

View File

@@ -1,737 +0,0 @@
/* Subroutines for insn-output.c for MIL-STD-1750.
Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
Contributed by O.M.Kellogg, DASA (kellogg@space.otn.dasa.de)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef FILE
#include <stdio.h>
#endif
#include <string.h>
#define __datalbl
#include "config.h"
#include "rtl.h"
#include "tree.h"
#include "expr.h"
#define HAVE_cc0
#include "conditions.h"
#include "real.h"
#include "regs.h"
struct datalabel_array datalbl[DATALBL_ARRSIZ];
int datalbl_ndx = -1;
struct jumplabel_array jmplbl[JMPLBL_ARRSIZ];
int jmplbl_ndx = -1;
int label_pending = 0, program_counter = 0;
enum section current_section = Normal;
char *sectname[4] =
{"Init", "Normal", "Konst", "Static"};
int
notice_update_cc (exp)
rtx exp;
{
if (GET_CODE (exp) == SET)
{
enum rtx_code src_code = GET_CODE (SET_SRC (exp));
/* Jumps do not alter the cc's. */
if (SET_DEST (exp) == pc_rtx)
return;
/* Moving a register or constant into memory doesn't alter the cc's. */
if (GET_CODE (SET_DEST (exp)) == MEM
&& (src_code == REG || src_code == CONST_INT))
return;
/* Function calls clobber the cc's. */
if (src_code == CALL)
{
CC_STATUS_INIT;
return;
}
/* Emulated longword bit-ops leave cc's incorrect */
if (GET_MODE (SET_DEST (exp)) == HImode ?
src_code == AND || src_code == IOR ||
src_code == XOR || src_code == NOT : 0)
{
CC_STATUS_INIT;
return;
}
/* Tests and compares set the cc's in predictable ways. */
if (SET_DEST (exp) == cc0_rtx)
{
CC_STATUS_INIT;
cc_status.value1 = SET_SRC (exp);
return;
}
/* Anything else will set cc_status. */
cc_status.flags = CC_NO_OVERFLOW;
cc_status.value1 = SET_SRC (exp);
cc_status.value2 = SET_DEST (exp);
return;
}
else if (GET_CODE (exp) == PARALLEL
&& GET_CODE (XVECEXP (exp, 0, 0)) == SET)
{
if (SET_DEST (XVECEXP (exp, 0, 0)) == pc_rtx)
return;
if (SET_DEST (XVECEXP (exp, 0, 0)) == cc0_rtx)
{
CC_STATUS_INIT;
cc_status.value1 = SET_SRC (XVECEXP (exp, 0, 0));
return;
}
CC_STATUS_INIT;
}
else
{
CC_STATUS_INIT;
}
}
rtx
function_arg (cum, mode, type, named)
int cum;
enum machine_mode mode;
tree type;
int named;
{
int size;
if (MUST_PASS_IN_STACK (mode, type))
return (rtx) 0;
if (mode == BLKmode)
size = int_size_in_bytes (type);
else
size = GET_MODE_SIZE (mode);
if (cum + size < 12)
return gen_rtx (REG, mode, cum);
else
return (rtx) 0;
}
double
get_double (x)
rtx x;
{
union
{
double d;
long i[2];
}
du;
du.i[0] = CONST_DOUBLE_LOW (x);
du.i[1] = CONST_DOUBLE_HIGH (x);
return du.d;
}
char *
float_label (code, value)
char code;
double value;
{
int i = 1;
static char label[32];
char *p;
label[0] = code;
p = label + 1;
sprintf (p, "%lf", value);
while (*p)
{
*p = (*p == '+') ? 'p' :
(*p == '-') ? 'm' : *p;
p++;
}
return xstrdup (label);
}
char *
movcnt_regno_adjust (op)
rtx *op;
{
static char outstr[80];
int op0r = REGNO (op[0]), op1r = REGNO (op[1]), op2r = REGNO (op[2]);
#define dstreg op0r
#define srcreg op1r
#define cntreg op2r
#define cntreg_1750 (op0r + 1)
if (cntreg == cntreg_1750)
sprintf (outstr, "mov r%d,r%d", op0r, op1r);
else if (dstreg + 1 == srcreg && cntreg > srcreg)
sprintf (outstr, "xwr r%d,r%d\n\tmov r%d,r%d", op2r, op1r, op0r, op2r);
else if (dstreg == cntreg + 1)
sprintf (outstr, "xwr r%d,r%d\n\tmov r%d,r%d", op0r, op2r, op2r, op1r);
else if (dstreg == srcreg + 1)
sprintf (outstr, "xwr r%d,r%d\n\txwr r%d,r%d\n\tmov r%d,r%d",
op0r, op1r, op0r, op2r, op1r, op2r);
else if (cntreg + 1 == srcreg)
sprintf (outstr, "xwr r%d,r%d\n\txwr r%d,r%d\n\tmov r%d,r%d",
op2r, op1r, op0r, op2r, op2r, op0r);
else if (cntreg == srcreg + 1)
sprintf (outstr, "xwr r%d,r%d\n\tmov r%d,r%d", op0r, op1r, op1r, op0r);
else
sprintf (outstr, "xwr r%d,r%d\n\tmov r%d,r%d\n\txwr r%d,r%d",
op2r, cntreg_1750, op0r, op1r, op2r, cntreg_1750);
return outstr;
}
char *
mod_regno_adjust (instr, op)
char *instr;
rtx *op;
{
static char outstr[40];
char *r = (!strncmp (instr, "dvr", 3) ? "r" : "");
int modregno_gcc = REGNO (op[3]), modregno_1750 = REGNO (op[0]) + 1;
if (modregno_gcc == modregno_1750
|| (reg_renumber != NULL
&& reg_renumber[modregno_gcc] >= 0
&& reg_renumber[modregno_gcc] == reg_renumber[modregno_1750]))
sprintf (outstr, "%s r%%0,%s%%2", instr, r);
else
sprintf (outstr, "lr r%d,r%d\n\t%s r%%0,%s%%2\n\txwr r%d,r%d",
modregno_gcc, modregno_1750, instr, r, modregno_1750,
modregno_gcc);
return outstr;
}
/* Check if op is a valid memory operand for 1750A Load/Store instructions
(memory indirection permitted.) */
int
memop_valid (op)
rtx op;
{
static int recurred = 0;
int valid;
if (GET_MODE (op) != Pmode && GET_MODE (op) != VOIDmode
&& GET_MODE (op) != QImode)
return 0;
switch (GET_CODE (op))
{
case MEM:
if (!recurred && GET_CODE (XEXP (op, 0)) == REG)
return 1;
case MINUS:
case MULT:
case DIV:
return 0;
case PLUS:
recurred = 1;
valid = memop_valid (XEXP (op, 0));
if (valid)
valid = memop_valid (XEXP (op, 1));
recurred = 0;
return valid;
case REG:
if (REGNO (op) > 0)
return 1;
return 0;
case CONST:
case CONST_INT:
case SYMBOL_REF:
case SUBREG:
return 1;
default:
printf ("memop_valid: code=%d\n", (int) GET_CODE (op));
return 1;
}
}
/* predicate for the MOV instruction: */
int
mov_memory_operand (op, mode)
rtx op;
enum machine_mode mode;
{
return (GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) == REG);
}
/* predicate for the STC instruction: */
int
small_nonneg_const (op, mode)
rtx op;
enum machine_mode mode;
{
if (GET_CODE (op) == CONST_INT && INTVAL (op) >= 0 && INTVAL (op) <= 15)
return 1;
return 0;
}
/* predicate for constant zero: */
int
zero_operand (op, mode)
rtx op;
enum machine_mode mode;
{
return op == CONST0_RTX (mode);
}
/* predicate for 1750 `B' addressing mode (Base Register with Offset)
memory operand */
int
b_mode_operand (op)
rtx op;
{
if (GET_CODE (op) == MEM)
{
rtx inner = XEXP (op, 0);
if (GET_CODE (inner) == REG && REG_OK_FOR_INDEX_P (inner))
return 1;
if (GET_CODE (inner) == PLUS)
{
rtx plus_op0 = XEXP (inner, 0);
if (GET_CODE (plus_op0) == REG && REG_OK_FOR_INDEX_P (plus_op0))
{
rtx plus_op1 = XEXP (inner, 1);
if (GET_CODE (plus_op1) == CONST_INT
&& INTVAL (plus_op1) >= 0
&& INTVAL (plus_op1) <= 255)
return 1;
}
}
}
return 0;
}
/* Decide whether to output a conditional jump as a "Jump Conditional"
or as a "Branch Conditional": */
int
find_jmplbl (labelnum)
int labelnum;
{
int i, found = 0;
for (i = 0; i <= jmplbl_ndx; i++)
if (labelnum == jmplbl[i].num)
{
found = 1;
break;
}
if (found)
return i;
return -1;
}
char *
branch_or_jump (condition, targetlabel_number)
char *condition;
int targetlabel_number;
{
static char buf[30];
int index;
if ((index = find_jmplbl (targetlabel_number)) >= 0)
if (program_counter - jmplbl[index].pc < 128)
{
sprintf (buf, "b%s %%l0", condition);
return buf;
}
sprintf (buf, "jc %s,%%l0", condition);
return buf;
}
int
unsigned_comparison_operator (insn)
rtx insn;
{
switch (GET_CODE (insn))
{
case GEU:
case GTU:
case LEU:
case LTU:
return 1;
default:
return 0;
}
}
int
next_cc_user_is_unsigned (insn)
rtx insn;
{
if ( !(insn = next_cc0_user (insn)))
abort ();
else if (GET_CODE (insn) == JUMP_INSN
&& GET_CODE (PATTERN (insn)) == SET
&& GET_CODE (SET_SRC (PATTERN (insn))) == IF_THEN_ELSE)
return unsigned_comparison_operator (XEXP (SET_SRC (PATTERN (insn)), 0));
else if (GET_CODE (insn) == INSN
&& GET_CODE (PATTERN (insn)) == SET)
return unsigned_comparison_operator (SET_SRC (PATTERN (insn)));
else
abort ();
}
static int addr_inc;
/* A C compound statement to output to stdio stream STREAM the
assembler syntax for an instruction operand X. X is an RTL
expression.
CODE is a value that can be used to specify one of several ways
of printing the operand. It is used when identical operands
must be printed differently depending on the context. CODE
comes from the `%' specification that was used to request
printing of the operand. If the specification was just `%DIGIT'
then CODE is 0; if the specification was `%LTR DIGIT' then CODE
is the ASCII code for LTR.
If X is a register, this macro should print the register's name.
The names can be found in an array `reg_names' whose type is
`char *[]'. `reg_names' is initialized from `REGISTER_NAMES'.
When the machine description has a specification `%PUNCT' (a `%'
followed by a punctuation character), this macro is called with
a null pointer for X and the punctuation character for CODE.
The 1750 specific codes are:
'J' for the negative of a constant
'Q' for printing addresses in B mode syntax
'd' for the second register in a pair
't' for the third register in a triple
'b' for the bit number (using 1750 test bit convention)
'B' for the bit number of the 1's complement (for bit clear)
'w' for int - 16
*/
print_operand (file, x, letter)
FILE *file;
rtx x;
int letter;
{
switch (GET_CODE (x))
{
case REG:
if (letter == 'd')
fprintf (file, "%d", REGNO (x) + 1);
else if (letter == 't')
fprintf (file, "%d", REGNO (x) + 2);
else
fprintf (file, "%d", REGNO (x));
break;
case SYMBOL_REF:
fprintf (file, "%s", XSTR (x, 0));
if (letter == 'A')
fprintf (file, "+1");
break;
case LABEL_REF:
case CONST:
case MEM:
if (letter == 'Q')
{
rtx inner = XEXP (x, 0);
switch (GET_CODE (inner))
{
case REG:
fprintf (file, "r%d,0", REGNO (inner));
break;
case PLUS:
fprintf (file, "r%d,%d", REGNO (XEXP (inner, 0)),
INTVAL (XEXP (inner, 1)));
break;
default:
fprintf (file, "[ill Q code=%d]", GET_CODE (inner));
}
}
else
{
addr_inc = (letter == 'A' ? 1 : 0);
output_address (XEXP (x, 0));
}
break;
case CONST_DOUBLE:
/* {
double value = get_double (x);
char fltstr[32];
sprintf (fltstr, "%lf", value);
if (letter == 'D' || letter == 'E')
{
int i, found = 0;
for (i = 0; i <= datalbl_ndx; i++)
if (strcmp (fltstr, datalbl[i].value) == 0)
{
found = 1;
break;
}
if (!found)
{
strcpy (datalbl[i = ++datalbl_ndx].value, fltstr);
datalbl[i].name = float_label (letter, value);
datalbl[i].size = (letter == 'E') ? 3 : 2;
check_section (Konst);
fprintf (file, "K%s \tdata%s %s ;p_o\n", datalbl[i].name,
(letter == 'E' ? "ef" : "f"), fltstr);
check_section (Normal);
}
}
else if (letter == 'F' || letter == 'G')
{
int i, found = 0;
for (i = 0; i <= datalbl_ndx; i++)
if (strcmp (fltstr, datalbl[i].value) == 0)
{
found = 1;
break;
}
if (!found)
{
fprintf (stderr,
"float value %lfnot found upon label reference\n", value);
strcpy (datalbl[i = ++datalbl_ndx].value, fltstr);
datalbl[i].name = float_label (letter, value);
datalbl[i].size = (letter == 'G') ? 3 : 2;
check_section (Konst);
fprintf (file, "K%s \tdata%s %s ;p_o\n", datalbl[i].name,
(letter == 'G' ? "ef" : "f"), fltstr);
check_section (Normal);
}
fprintf (file, "%s ;P_O 'F'", datalbl[i].name);
}
else
fprintf (file, " %s ;P_O cst_dbl ", fltstr);
}
*/
fprintf (file, "%lf", get_double (x));
break;
case CONST_INT:
if (letter == 'J')
fprintf (file, "%d", -INTVAL (x));
else if (letter == 'b')
fprintf (file, "%d", which_bit (INTVAL (x)));
else if (letter == 'B')
fprintf (file, "%d", which_bit (~INTVAL (x)));
else if (letter == 'w')
fprintf (file, "%d", INTVAL (x) - 16);
else
fprintf (file, "%d", INTVAL (x));
break;
case CODE_LABEL:
fprintf (file, "L%d", XINT (x, 3));
break;
case CALL:
fprintf (file, "CALL nargs=%d, func is either '%s' or '%s'",
XEXP (x, 1), XSTR (XEXP (XEXP (x, 0), 1), 0), XSTR (XEXP (x, 0), 1));
break;
case PLUS:
{
rtx op0 = XEXP (x, 0), op1 = XEXP (x, 1);
int op0code = GET_CODE (op0), op1code = GET_CODE (op1);
if (op1code == CONST_INT)
switch (op0code)
{
case REG:
fprintf (file, "%d,r%d ; p_o_PLUS for REG and CONST_INT",
INTVAL (op1), REGNO (op0));
break;
case SYMBOL_REF:
fprintf (file, "%d+%s", INTVAL (op1), XSTR (op0, 0));
break;
case MEM:
fprintf (file, "%d,[mem:", INTVAL (op1));
output_address (XEXP (op0, 0));
fprintf (file, "] ;P_O plus");
break;
default:
fprintf (file, "p_o_PLUS UFO, code=%d, with CONST=%d",
(int) op0code, INTVAL (op1));
}
else if (op1code == SYMBOL_REF && op0code == REG)
fprintf (file, "%s,r%d ; P_O: (plus reg sym)",
XSTR (op1, 0), REGNO (op0));
else
fprintf (file, "p_o_+: op0code=%d, op1code=%d", op0code, op1code);
}
break;
default:
fprintf (file, "p_o_UFO code=%d", GET_CODE (x));
}
addr_inc = 0;
}
print_operand_address (file, addr)
FILE *file;
rtx addr;
{
switch (GET_CODE (addr))
{
case REG:
fprintf (file, "%d,r%d ; P_O_A", addr_inc, REGNO (addr));
break;
case PLUS:
{
register rtx x = XEXP (addr, 0), y = XEXP (addr, 1);
switch (GET_CODE (x))
{
case REG:
switch (GET_CODE (y))
{
case CONST:
output_address (XEXP (y, 0));
fprintf (file, ",r%d ;P_O_A reg + const expr", REGNO (x));
break;
case CONST_INT:
fprintf (file, "%d,r%d", INTVAL (y) + addr_inc, REGNO (x));
break;
case SYMBOL_REF:
fprintf (file, "%s", XSTR (y, 0));
if (addr_inc)
fprintf (file, "+%d", addr_inc);
fprintf (file, ",r%d ; P_O_A reg + sym", REGNO (x));
break;
case LABEL_REF:
output_address (XEXP (y, 0));
fprintf (file, ",r%d ; P_O_A reg + label", REGNO (x));
break;
default:
fprintf (file, "[P_O_A reg%d+UFO code=%d]",
REGNO (x), GET_CODE (y));
}
break;
case LABEL_REF:
output_address (XEXP (x, 0));
break;
case SYMBOL_REF:
switch (GET_CODE (y))
{
case CONST_INT:
fprintf (file, "%d+%s", INTVAL (y) + addr_inc, XSTR (x, 0));
break;
case REG:
fprintf (file, "%s,r%d ;P_O_A sym + reg",
XSTR (x, 0), REGNO (y));
break;
default:
fprintf (file, "P_O_A sym/lab+UFO[sym=%s,code(y)=%d]",
XSTR (x, 0), GET_CODE (y));
}
break;
case CONST:
output_address (XEXP (x, 0));
if (GET_CODE (y) == REG)
fprintf (file, ",r%d ;P_O_A const + reg", REGNO (x));
else
fprintf (file, "P_O_A const+UFO code(y)=%d]", GET_CODE (y));
break;
case MEM:
output_address (y);
fprintf (file, ",[mem:");
output_address (XEXP (x, 0));
fprintf (file, "] ;P_O_A plus");
break;
default:
fprintf (file, "P_O_A plus op1_UFO[code1=%d,code2=%d]",
GET_CODE (x), GET_CODE (y));
}
}
break;
case CONST_INT:
if (INTVAL (addr) < 0x10000 && INTVAL (addr) >= -0x10000)
fprintf (file, "%d ; p_o_a const addr?!", INTVAL (addr));
else
{
fprintf (file, "[p_o_a=ILLEGAL_CONST]");
output_addr_const (file, addr);
}
break;
case LABEL_REF:
case SYMBOL_REF:
fprintf (file, "%s", XSTR (addr, 0));
if (addr_inc)
fprintf (file, "+%d", addr_inc);
break;
case MEM:
fprintf (file, "[memUFO:");
output_address (XEXP (addr, 0));
fprintf (file, "]");
break;
case CONST:
output_address (XEXP (addr, 0));
fprintf (file, " ;P_O_A const");
break;
case CODE_LABEL:
fprintf (file, "L%d", XINT (addr, 3));
break;
default:
fprintf (file, " p_o_a UFO, code=%d val=0x%x",
(int) GET_CODE (addr), INTVAL (addr));
break;
}
addr_inc = 0;
}
/*
* Return non zero if the LS 16 bits of the given value has just one bit set,
* otherwise return zero. Note this function may be used to detect one
* bit clear by inverting the param.
*/
int
one_bit_set_p (x)
int x;
{
x &= 0xffff;
return x && (x & (x - 1)) == 0;
}
/*
* Return the number of the least significant bit set, using the same
* convention for bit numbering as in the MIL-STD-1750 sb instruction.
*/
int
which_bit (x)
int x;
{
int b = 15;
while (b > 0 && (x & 1) == 0)
{
b--;
x >>= 1;
}
return b;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,158 +0,0 @@
;; GCC assembler includefile for AS1750
;;
;; Macros defined:
;; EFLR.M #d,#s Load the three regs starting at R#s to R#d following.
;; RET.M #fs Return from function (uses the framesize #fs)
UC SET 15
; Return from function ; parameter: framesize
MACRO RET.M
IF `1` > 0
IF `1` <= 16
AISP R14,`1`
ELSE
AIM R14,`1`
ENDIF
ENDIF
LR R15,R14
URS R15
ENDMACRO
; Useful instructions missing from the 1750A standard:
; Extended Float Load from Registers
MACRO EFLR.M ; args : #1=dest-regno, #2=source-regno
ONE SET `1` + 2
TWO SET `2` + 2
IF `1` >= `2` || `1`+2 < `2`
LR R`ONE`,R`TWO`
DLR R`1`,R`2`
ELSE
DLR R`1`,R`2`
LR R`ONE`,R`TWO`
DLR R`1`,R`1` ; Just to update condition codes
ENDIF
ENDMACRO
; The following leave the condition codes haywire. But that is
; accounted for (see notice_update_cc in config/1750a.c.)
; Double ANd Register with Register
MACRO DANR.M
ONE SET `1` + 1
TWO SET `2` + 1
ANDR R`1`,R`2`
ANDR R`ONE`,R`TWO`
ENDMACRO
; Double OR Register with Register
MACRO DORR.M
ONE SET `1` + 1
TWO SET `2` + 1
ORR R`1`,R`2`
ORR R`ONE`,R`TWO`
ENDMACRO
; Double eXoR Register with Register
MACRO DXRR.M
ONE SET `1` + 1
TWO SET `2` + 1
XORR R`1`,R`2`
XORR R`ONE`,R`TWO`
ENDMACRO
; Double Nand Register with register
MACRO DNR.M
ONE SET `1` + 1
TWO SET `2` + 1
NR R`1`,R`2`
NR R`ONE`,R`TWO`
ENDMACRO
; Unsigned Compare Immediate
MACRO UCIM.M
LAST SET `1` + 3
PSHM R`1`,R`LAST`
LO SET `1` + 1
LR R`LO`,R`1`
XORR R`1`,R`1`
HI SET `1` + 2
XORR R`HI`,R`HI`
LIM R`LAST`,`2`
DCR R`1`,R`HI`
POPM R`1`,R`LAST`
ENDMACRO
; Unsigned Compare Register with register
MACRO UCR.M
PSHM R10,R13 ; R12 and R13 are assumed not to be input parameters
LR R13,R`2`
LR R11,R`1`
XORR R12,R12
XORR R10,R10
DCR R10,R12
POPM R10,R13
ENDMACRO
; Unsigned Compare register with memory
MACRO UC.M
PSHM R10,R13
L R13,`2`
LR R11,R`1`
XORR R12,R12
XORR R10,R10
DCR R10,R12
POPM R10,R13
ENDMACRO
; Double Unsigned Compare Register with register
MACRO DUCR.M
PSHM R13,R14 ; R13 and R14 are assumed not to be input parameters
LOW1 SET `1` + 1
LOW2 SET `2` + 1
PSHM R`1`,R`LOW1`
PSHM R`2`,R`LOW2`
LR R13,R`LOW1`
LR R14,R`LOW2`
DSRL R`1`,1
DSRL R`2`,1
DCR R`1`,R`2`
BNE +6
ANDM R13,1
ANDM R14,1
CR R13,R14
POPM R`2`,R`LOW2`
POPM R`1`,R`LOW1`
POPM R13,R14
ENDMACRO
; Double Unsigned Compare register with memory
MACRO DUC.M
PSHM R13,R14 ; R13 and R14 are assumed not to be input parameters
LOW1 SET `1` + 1
PSHM R`1`,R`LOW1`
DL R13,`2`
DSRL R`1`,1
DSRL R13,1
DCR R`1`,R13
BNE +10 ; done, go pop the saved regs
DL R13,`2` ; interested in the *low* word (R14)
L R13,1,R15
ANDM R13,1
ANDM R14,1
CR R13,R14
POPM R`1`,R`LOW1`
POPM R13,R14
ENDMACRO

View File

@@ -1,23 +0,0 @@
/* Configuration for GNU C-compiler for MIL-STD-1750a.
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#error Gcc cannot run on a 1750a due to size problems!

View File

@@ -1,5 +0,0 @@
This directory contains machine-specific files for the GNU C compiler.
It has a subdirectory for each basic CPU type.
The only files in this directory itself
are some .h files that pertain to particular operating systems
and are used for more than one CPU type.

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More