Changes in GCC version 2.1, from version 2.0. These diffs do not include files that can be rebuilt using tex, makeinfo, etags or bison. Before installing these diffs, execute the following commands: mv ChangeLog ChangeLog.4 rm README-SCO rm SYSCALLS.c rm ecoff-cmp rm gcc.kys rm ns32k.bugs rm config/newpbb.h diff -rc2N gcc-2.0/COPYING gcc-2.1/COPYING *** gcc-2.0/COPYING Sat Jun 1 19:50:02 1991 --- gcc-2.1/COPYING Thu Feb 27 07:47:10 1992 *************** *** 16,20 **** Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by ! he GNU Library General Public License instead.) You can apply it to your programs, too. --- 16,20 ---- 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. diff -rc2N gcc-2.0/ChangeLog gcc-2.1/ChangeLog *** gcc-2.0/ChangeLog --- gcc-2.1/ChangeLog Tue Mar 24 22:26:47 1992 *************** *** 0 **** --- 1,4911 ---- + Tue Mar 24 04:00:00 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Version 2.1 released. + + * xcoffout.h: Renamed from xcoff.h. + * dbxout.c, final.c, toplev.c, varasm.c, xcoffout.c: Use new name. + * Makefile.in: Corresponding changes. + + * dbxout.c (dbxout_type): Don't check DECL_IGNORED_P. + + * t-rs6000: Complete replacement, to build collect2 properly. + + * Makefile.in (mostlyclean): Delete sorted indices that aren't used. + (extraclean): Delete patch outputs, *.d, *.Z, *.tar. + + * Makefile.dos (getpwd.o): New target. + (OBJS, protoize, unprotoize): Add getpwd.o. + (SYSCALLS.c, SYSCALLS.c.X): Copy from Makefile.in. + + * x-i386sco (CCLIBFLAGS): Define as empty. + + Tue Mar 24 06:26:26 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * cse.c (cse_insn): When deleting dead code after + making unconditional branch, check for end of chain. + + * sched.c (update_flow_info): Add code for REG_LABEL case. + + * function.c (instantiate_virtual_regs_1): Don't modify a MEM + without copying it unless the modified MEM is valid. + + * cse.c (rtx_cost): Assign ASM_OPERANDS a high cost. + + Tue Mar 24 05:48:25 1992 Ken Raeburn (raeburn@wombat.gnu.ai.mit.edu) + + * cp-*: Disabled 22 March changes relating to dbxout.c; the problem + will be fixed properly, with more extensive reworking of the C++ + front end, later. This fix was buggy. + * dbxout.c (dbxout_type_methods): Reverted 22 March changes; if a + template class is passed, print a warning message and emit no info + about methods. + + Mon Mar 23 14:18:30 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) + + * make-cc1.com: Add getpwd.c. + + Mon Mar 23 12:53:02 1992 Jyrki Kuoppala (jkp@batman.cs.hut.fi) + + * pc532-min.h (HAVE_ATEXIT): Defined. + + * ns32k.c (print_operand) [PC_RELATIVE]: + Always use output_address for MEM. + + * pc532.h (BASE_REG_NEEDED): Defined. + + Mon Mar 23 07:28:14 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * combine.c (try_combine): Correct error in last change; don't + pass STRICT_LOW_PART or ZERO_EXTRACT to reg_overlap_mentioned_p. + + * sun3.h (CPP_SPEC): Delete extra brace. + + Mon Mar 23 02:43:56 1992 Michael Tiemann (tiemann@mole.gnu.ai.mit.edu) + + * cp-decl.c (pop_from_top_level): Take care of C_C_D. + + Sun Mar 22 17:24:09 1992 Torbjorn Granlund (tege@hal.gnu.ai.mit.edu) + + * pyr.h: Remove TARGET_INDEX. Update other TARGET switches. + Fix several comments. + (REGNO_OK_FOR_BASE_P): Allow reg 0. + (REGNO_OK_FOR_INDEX_P): Reformulate. + (REG_OK_FOR_INDEX_P): Disallow reg 0. + + Sun Mar 22 15:10:49 1992 Michael Meissner (meissner@osf.org) + + * mips-tfile.c (mark_stabs): Make function defintion agree with + prototype. + + * mips.md (cpu, branch_likely attributes): Make these attributes + const. + (all functional units): Restore functional units that look at the + -mcpu= switch for scheduling now that genattrtab uses less memory. + + Sun Mar 22 13:57:51 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-typeck.c (convert_for_assignment): + Only explicit 0 converts to pointer. + + * Makefile.in (doc): Don't depend on gplus.info. + (gplus.info): Target deleted. + + * c-decl.c (store_parm_decls): Call build_type_copy with just one arg. + + * cccp.c (do_include): Use entire filename when checking for repeat. + Use lookup_include. + (lookup_include): New function. + + * protoize.c (find_extern_def): Store ??? one char at a time. + + * sparc.h (ASM_OUTPUT_FLOAT): Fix typo. + + * fold-const.c (operand_equal_p): Reject NaNs and infinities. + + * varasm.c (immed_real_const): Distinguish minus zero from zero. + + * sparc.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): + Use `inf' for infinities. Use hex for minus-zero. + + * objc-actions.c (build_selector_translation_table): + Don't make a duplicate decl here for _OBJC_SELECTOR_REFERENCES. + Just call finish_decl to store the initial value. + Call push_obstack_nochange to balance with finish_decl. + Use selector_type for declaring individual selector names. + + Sun Mar 22 13:11:32 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * loop.c (update_giv_derive): Correctly handle the case where + more than one biv update occurs after a giv is defined. + + * cse.c (rehash_using_reg): Add missing arg to call to exp_equiv_p. + + * expmed.c (expand_mult_add): Add missing arg to call to type_for_mode. + + * reorg.c (fill_slots_from_thread): In the case where have a reg-reg + copy and will substitute our destination for our source in the + following insn, correctly check for it modifying our destination. + + Sun Mar 22 09:20:16 1992 Michael Tiemann (tiemann@cygnus.com) + + * cp-typeck.c (unary_complex_lvalue): Don't complain about taking + the ``address'' of a bound static method or member. + + * cp-init.c (resolve_offset_ref): Fix bug in handling of static + members and member functions. + + * cp-decl2.c (finish_file): If CURRENT_CLASS_TYPE is non-NULL on + entry to this function, punt. + + * cp-parse.y (template_parm): Use CLASS_TYPE_NODE instead of + CLASS_TYPE value. + + * cp-cvt.c (build_type_conversion): Add another add-hoc rule to find + unsigned->int conversion (if conversion to long does not exist). + + * cp-method.c (build_overload_name): Don't call `array_type_nelts' + if the TYPE_DOMAIN of an array type is NULL_TREE. + + * cp-init.c (build_offset_ref): Set up and use DECL even in case + where NAME resolves to a method. + + * cp-call.c (ideal_candidate): Half of Jan 28 change was missing. + Now PARMS are not converted in place if BASETYPE is NULL. + + * cp-typeck.c (build_component_ref): Don't return a TYPE_DECL. + + * cp-type2.c (build_functional_cast): If CURRENT_FUNCTION_DECL is + NULL, don't wrap EXPR_AS_CTOR in a NEW_EXPR. This make it possible + to parse default initializers that involve constructor calls. + * cp-typeck.c (convert_for_initialization): Handle this change. + * cp-method.c (dump_init): Grok INDIRECT_REFs that have + TREE_HAS_CONSTRUCTOR set. + + * cp-decl.c (push_overloaded_decl): Don't use the + DECL_ASSEMBLER_NAME for GLOB as the TREE_PURPOSE of the new GLOB. + Use ORIG_NAME instead. + + * cp-decl.c (grokvardecl): If FIELD has incomplete type, complete it + with TYPE. + + * cp-decl2.c (flag_this_is_variable): Define the value -2 to mean an + object of known type is being constructed. + * cp-decl.c (resolves_to_fixed_type_p): Test FLAG_THIS_IS_VARIABLE + for the value -2 instead of testing DECL_CONSTRUCTOR_P in case we + are looking at `current_class_decl'. + * cp-search.c (init_vbase_pointers): Set FLAG_THIS_IS_VARIABLE to -2 + instead of 0. + (build_vbase_vtables_init): Ditto. + * cp-*.c: All tests of FLAG_THIS_IS_VARIABLE changed to reflect the + new semantics. + + * cp-typeck.c (comptypes): Don't use IS_AGGR_TYPE_2; test explicitly + that both are RECORD_TYPE. + (build_binary_op_nodefault): Ditto. + (convert_for_assignment): Ditto. + * cp-cvt.c (convert_to_pointer): Ditto. + (convert_to_pointer_force): Ditto. + * cp-call.c (convert_harshness): Ditto. + + * cp-search.c (get_first_matching_virtual): Fix typo. + + * cp-tree.c (layout_basetypes): When warning about certain + inheritance relationships, only print "virtual" when the + inheritance is virtual. + + Sun Mar 22 01:28:41 1992 Ken Raeburn (Raeburn@Cygnus.COM) + + Fix dbx info for methods of template classes: + * cp-decl.c (make_type_decl): New function. Creates a TYPE_DECL + node and assigns as its DECL_ASSEMBLER_NAME the encoded form of the + type name as it will be used in assembler output. All calls to + build_decl(TYPE_DECL,...) changed to call this. + * dbxout.c (dbxout_type_methods): Instead of skipping digits and + assuming the human-readable type name follows in the assembler names + for methods, use DECL_ASSEMBLER_NAME of the type. + Handle the special DECL_NAME that is made for templates. + * cp-lex.c (build_lang_field_decl): Set DECL_ASSEMBLER_NAME + correctly if new decl is a TYPE_DECL. + (build_lang_decl): Ditto. + * cp-decl.c (pushdecl): Use DECL_ASSEMBLER_NAME only for + FUNCTION_DECL and VAR_DECL nodes; all others use DECL_NAME. + * cp-tree.h (make_type_decl): Declare it. + + * cp-pt.c (overload_template_name, undo_template_name_overload): + Revert 4 March change. + + * cp-decl2.c: No longer define NEW_OVERLOAD_SCHEME. + (grokfield): Use new encoding scheme always. + + * cp-pt.c (overload_template_name): Deleted extra assignment to + IDENTIFIER_LOCAL_VALUE slot. + + * cp-method.c (dump_aggr_type): Use DECL_CONTEXT rather than + DECL_CLASS_CONTEXT. + + * cp-pt.c (instantiate_class_template): Move some common code from + two branches to before branch point. + + * cp-method.c (dump_aggr_type): Don't discard last character of + context string; it's not whitespace. + + Sun Mar 22 15:58:48 1992 Per Bothner (bothner@rtl.cygnus.com) + + * cp-tree.h: Add more enum->int casts needed by some compilers. + + Sun Mar 22 20:40:25 1992 Mike Stump (mrs@cygnus.com) + + * cp-typeck.c (build_modify_expr): Handle preincrement and + predecrement as valid lvals. + + * gplus.gperf: Finish off changing ASM to ASM_KEYWORD. + * cp-hash.h: Rebuilt. + + * cp-type2.c (build_functional_cast): remove incorrect error message. + + Sat Mar 21 15:43:04 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-typeck.c (build_c_cast): Don't warn if convert explicit 0 to ptr. + + * local-alloc.c (wipe_dead_reg): If insn has multiple sets and + the reg appears in a destination, extend life to end of insn. + * global-alloc.c (global_conflicts): Analogous change. + (mark_reg_conflicts): New function. + * combine.c (try_combine): If I2 has multiple dests, make sure + we don't change one of them to overlap anything used within another. + + * configure (pyramid): Commented out. + + * toplev.c (main): Handle -gen-aux-info, with argument. + (compile_file): Assume aux_info_file_name already computed. + Don't make it local here. + * protoize.c (munge_compile_params): Produce -aux-info. + Set aux_info_file_name_index. + (gen_aux_info_file): Produce and store the aux-info file name. + (input_file_name_index): Renamed from filename_index. + (aux_info_file_name_index): New var. + * Makefile.in (SYSCALLS.c.X): Use -aux-info. + * gcc.c, hp800.h, next.h, sparc.h, sun2.h, sun3.h, svr4.h: + (WORD_SWITCH_TAKES_ARG): Handle -aux-info. + * gcc.c (default_compilers): Pass -aux-info to cc1*. + + * configure (mips-*-sysv*): Renamed from mips-*-sysv and moved down. + + * gcc.c (execute): Undo Mar 12 change. + + * configure (i386-*-bsd*): New alternative. + * i386bsd.h: New file. + + Sat Mar 21 15:14:08 1992 Ron Guilmette (rfg at ncd.com) + + * sparc.c (output_move_double): Check for XEXP (op2, 0) being a + LOW_SUM, rather than checking op2. Handle both ldd and std there. + + Sat Mar 21 14:14:10 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) + + * vms.h (CPP_PREDEFINES): Do not define __GNU__. + + Sat Mar 21 21:35:37 1992 Jyrki Kuoppala (jkp@batman.cs.hut.fi) + + * ns32k.md (call_value): Added a missing "{". + + * ns32k.c (print_operand): Fixed typo X -> x, FILE -> file. + + Sat Mar 21 11:11:04 1992 Michael Meissner (meissner@osf.org) + + * mips.h (MIPS_VERSION): Bump Meissner version # to 14. + (CPP_PREDEFINES): Always define SYSTYPE_BSD43. + (CPP_SPEC): Don't define it here. + (ASM_SPEC): Pass -cpp/-nocpp/-mips1/-mips2/-mips3 to MIPS assembler, + and only pass -nocpp by default unless .s files are assembled for + MIPS compatibility. + (LINK_SPEC): Pass -mips1/-mips2/-mips3 to MIPS linker. + (MD_STARTFILE_PREFIX): Define to be /usr/lib/cmplrs/cc/ if not + already defined. + (NM_FLAGS): Define as appropriate for most MIPS systems. + (PREFERRED_DEBUGGING_TYPE): If -ggdb prefer stabs over the normal + ECOFF debug format, but -g selects ECOFF. + (DEFAULT_GDB_EXTENSIONS): Define as 1. + (DOLLARS_IN_IDENTIFIERS): Don't define if already defined. + + * mips.c (mips_output_filename): If emitting encapsulated stabs, + emit #@stabs immediately after the first .file, so that the @stabs + is the second symbol. GDB 4.4 only checks symbol #2 to see whether + it is encapsulated stabs, or ECOFF. + + * mips.md (subdi define_splits): Use ltu instead of lt. + (branch_zero_true): Generate correct code when not optimizing, and + an always true/false branch is generated. + (branch_zero_false): Ditto. + + * mips-bsd.h (CPP_PREDEFINES): Always define SYSTYPE_BSD43. + (CPP_SPEC): Don't define it here. Remove -Z{BSD43,SYSV} support. + Don't pass -I in here. + (SYSTEM_INCLUDE_DIR): Define to be /bsd43/usr/include. + (LINK_SPEC): Pass -mips1/-mips2/-mips3 to the linker. Remove + -Z{BSD43,SYSV} support. Always pass -systype /bsd43/ to the linker. + + * mips-sysv.h (CPP_PREDEFINES): Always define SYSTYPE_SYSV. + (CPP_SPEC): Don't define it here. Remove -Z{BSD43,SYSV} support. + Don't pass -I in here. + (SYSTEM_INCLUDE_DIR): Define to be /sysv/usr/include. + (LINK_SPEC): Pass -mips1/-mips2/-mips3 to the linker. Remove + -Z{BSD43,SYSV} support. Always pass -systype /sysv/ to the linker. + (MD_STARTFILE_PREFIX): Remove, this is now defined in mips.h. + + * mips-news.h (CPP_SPEC): Don't pass -I in here. + (SYSTEM_INCLUDE_DIR): Define to be /usr/include2.0. + (ASM_SPEC): Pass -cpp/-nocpp/-mips1/-mips2/-mips3 to MIPS assembler, + and only pass -nocpp by default unless .s files are assembled for + MIPS compatibility. + (LINK_SPEC): Pass -mips1/-mips2/-mips3 to the linker. + + * mips-news5.h (CPP_PREDEFINES): Define SYSTYPE_SYSV. + (CPP_SPEC): Don't define it here. Remove -Z{BSD43,SYSV} support. + Don't pass -I here. + (LINK_SPEC): Pass -mips1/-mips2/-mips3 to the linker. + + * iris.h (ASM_SPEC): Pass -cpp/-nocpp/-mips1/-mips2/-mips3 to MIPS + assembler, and only pass -nocpp by default unless .s files are + assembled for MIPS compatibility. + (LINK_SPEC): Pass -mips1/-mips2/-mips3 to the linker. + + * iris.h (DOLLARS_IN_IDENTIFIERS): Define as 0, for iris assembler. + (NO_DOLLAR_IN_LABEL): Define, to force static constructors to use a + period instead of a dollar sign. + + * decstatn.h (ASM_SPEC): Pass -cpp/-nocpp/-mips1/-mips2/-mips3 to + MIPS assembler, and only pass -nocpp by default unless .s files are + assembled for MIPS compatibility. + (LINK_SPEC): Pass -mips1/-mips2/-mips3 to the MIPS linker. + + * decsrose.h (ASM_SPEC): Pass -cpp/-nocpp/-mips1/-mips2/-mips3 to + MIPS assembler, and only pass -nocpp by default unless .s files are + assembled for MIPS compatibility. + (LINK_SPEC): Pass -mips1/-mips2/-mips3 to the MIPS linker. + + * Makefile.in (collect2.o): Define macros where the standard places + binaries are installed, so that if it is invoked outside of gcc, it + has a better chance of finding the correct version of the tools to + invoke. + + * mips-tdump.c (toplevel): Declare things void * on Silicon Graphics. + + * mips-tfile.c (toplevel): Declare things void * on Silicon + Graphics. + (stabs_seen): Move static variable to file scope. + (mark_stabs): New function to put out the @stabs symbol for GDB to + switch to encapsulated stabs. + (pseudo_ops): Call mark_stabs if #@stabs found. + (parse_stabs_common): Call mark_stabs if needed to add @stabs. + + * sdbout.c (sdbout_dequeue_anonymous_types): Don't core dump if + TREE_VALUE is null. + + * decstabs.h (new file): DECstation w/encapsulated stabs. + * irisgdb.h (new file): SGI iris w/encapsulated stabs. + * mips-gbsd.h (new file): Mips BSD43 w/encapsulated stabs. + * mips-gdb.h (new file): Mips w/encapsulated stabs. + * mips-gnews.h (new file): Sony NEWS w/encapsulated stabs. + * mips-gnews5.h (new file): Sony NEWS 5.0 w/encapsulated stabs. + * mips-gsvr4.h (new file): Mips SV.4 w/encapsulated stabs. + * mips-gsysv.h (new file): Mips SV.3 w/encapsulated stabs. + * mips-svr4.h (new file): Mips System V.4. + * x-iris (new file): Specify that iris needs alloca.o since it's + alloca is buggy. + + * dbxout.c (toplevel): If NO_STAB_H is defined, include gstab.h just + like if USG is defined. + * final.c (toplevel): Ditto. + * mips-tfile.c (toplevel): Ditto. + * xcoffout.c (toplevel): Ditto. + + * xm-mips.h (NO_STAB_H): Define, except on OSF/1. + + Fri Mar 20 23:51:54 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * reg-stack.c (subst_asm_stack_regs): A REG_UNUSED note never + applies to an input reg, even if that reg is tied to an output. + + * reg-stack.c (record_asm_reg_life): Use XVECLEN only on a PARALLEL. + (subst_asm_stack_regs): Likewise. + + Fri Mar 20 18:57:43 1992 Michael Meissner (meissner@osf.org) + + * mips.h (MIPS_VERSION): Bump Meissner version # to 13. + (mips_declare_object): Declare new function. + (ASM_OUTPUT_LABEL): Remove cruft from when collect spit out assembly + language instead of C code. + (ASM_GLOBALIZE_LABEL): Ditto. + (ASM_OUTPUT_INT): Ditto. + (ASM_OUTPUT_INT_CONST): Remove, no longer used. + (ASM_OUTPUT_PTR_INT_SUM): Ditto. + (ASM_OUTPUT_LABEL): Don't set that we've seen an identifier here. + (ASM_DECLARE_OBJECT_NAME): New macro, call mips_declare_object to + emit the label, and mark that no .extern is needed for the name. + (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Call mips_declare_object. + + * mips.c (mips_declare_object): New function to output the stuff + needed for global variables, bss variables, and static bss + variables. + + Fri Mar 20 14:13:32 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * cp-xref.c (GNU_xref_file): Get rid of arbitrary limit--malloc nmbuf. + + * cp-parse.y (scoped_id): Error if spec'd type is undefined. + + * m68k.c (output_function_epilogue): Output at least a nop. + + * xm-hp320.h (USG): Defined. + + * m68k.c (output_function_prologue, output_function_epilogue): + Change %I to %0I. + (print_operand): Likewise. + + * varasm.c (data_section): Add forward decl. + + * m68k.c (print_operand): Make %! print fpcr. + * crds.h, hp320.h, mot3300.h, news.h, tower-as.h (PRINT_OPERAND): + Likewise. + * m68k.md (fix_trunc*): Use %!. + + * toplev.c (compile_file): Optionally call setvbuf for output file. + + * loop.c (move_movables): Fix typo. + + Fri Mar 20 17:42:12 1992 Paul Eggert (eggert@twinsun.com) + + * Makefile.in (SYSCALLS.c): Use `cat' to create this file, instead + of having it consist of `#include' directives. + (mostlyclean): Delete SYSCALLS.c. + * SYSCALLS.c: File deleted. + + * getpwd.c (new file): Get and cache working directory, using PWD + if it works and getcwd otherwise. + * Makefile.in (OBJS, protoize): add getpwd.o + * cp-xref.c (GNU_xref_file): Likewise. + * dbxout.c (dbxout_init): Likewise. + * dwarfout.c (output_compile_unit_die): Likewise. + * protoize.c (main): Likewise. + + Fri Mar 20 12:58:57 1992 Ron Guilmette (rfg at ncd.com) + + * dwarfout.c (location_or_const_value_attribute): Fixed to use + DECL_INCOMING_RTL as the "location" for formal parameter variables. + + Fri Mar 20 13:26:16 1992 Michael Collison (collison@osf.org) + + * i386rose.h (INIT_SECTION_ASM_OP): OSF doesn't support a true + initialization section. + + Fri Mar 20 07:23:15 1992 Tom Wood (wood at dg-rtp.dg.com) + + * m88k.md (set zero_extract patterns): Use the + constraint. + + * crtstuff.c (__do_global_ctors_aux): Declare it. + + * m88k.h (CONDITIONAL_REGISTER_USAGE): Mark the PIC register fixed, + but not call used. + + * m88k.c (m88k_builtin_saveregs): Get a properly aligned block. + + * m88k.md (cpu attribute): Use const form. + + * m88k.h, m88k.c, m88kdgux.h (uses of *_ASM_OP): Add tabs. + + Fri Mar 20 05:46:26 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * expmed.c (emit_store_flag): Need to prevent SUBTARGET from being + OP0 in one more case. + + * loop.c (add_label_notes): New function. + (move_movables): Use it when hoisting a `move_insn' movable + to ensure we create any required REG_LABEL notes. + + * hp800.h (CONDITIONAL_REGISTER_USAGE): Make reg 27 a global_reg + for now. + + * combine.c (make_field_assignment): Use correct mode when shifting + the source of the assignment. + + * fold-const.c (invert_truthvalue): Correct error in last change. + + Thu Mar 19 18:59:24 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * stmt.c (expand_end_case): Convert do_tablejump arg to Pmode. + + Thu Mar 19 16:54:15 1992 Michael Meissner (meissner@osf.org) + + * collect2.c (main): Only pass -fxxx and -mxxx options to gcc when + building constructors. + + Thu Mar 19 16:44:21 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * fold-const.c (invert_truthvalue): Correctly check for floating + comparison. + + Thu Mar 19 14:42:49 1992 Tom Wood (wood at dg-rtp.dg.com) + + * function.c (expand_main_function): Do so if INVOKE__main is defined. + * libgcc2.c (__main): Provide if INVOKE__main is defined. + * crtstuff.c (__do_global_ctors_aux): Renamed from __do_global_ctors. + (__do_global_ctors): Simple non-static function that invokes + __do_global_ctors_aux. + + * crtstuff.c ({CTOR,DTOR}_LIST_{BEGIN,END}): Allow alternate way + to represent and define __{CTOR,DTOR}_LIST__. + * i386v.h, aix386.h (CTOR_LIST_{BEGIN,END}): Use these to push + instead of the funny definition of CTORS_SECTION_ASM_OP. + * svr3.h (CTORS_SECTION_ASM_OP): Use the .init section. + + * m88kv3.h (CTOR_LIST_BEGIN): Emit code to .init to push a zero. + (CTOR_LIST_END): Do nothing. + (ASM_OUTPUT_CONSTRUCTOR): Emit code to .init to push the address. + (DTOR_LIST_{BEGIN,END}): Output a block of four words. + (ASM_OUTPUT_DESTRUCTOR): Output the address and three words of -1. + (DO_GLOBAL_DTORS_BODY): Ignore all values of -1. + + * real.h (REAL_VALUE_ISNAN): Define. + * fold-const.c (target_isnan): New function. + * sun3.h, sparc.h (ASM_OUTPUT_{FLOAT,DOUBLE}): Use REAL_VALUE_ISNAN. + + * sun3.h: Delete extra #endif. + + Thu Mar 19 14:25:50 1992 Torbjorn Granlund (tege@hal.gnu.ai.mit.edu) + + * hp800.c (output_move_double): Don't check for CONST_DOUBLE + when classifying operand types, CONSTANT_P now includes it. + Use split_double to assign operand vectors for CNSTOP. + + Thu Mar 19 13:59:16 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * hp320.h (SPACE_AFTER_L_OPTION): Defined. + (LIB_SPEC): Defined. + + * toplev.c (compile_file): Output aux_info_file in source file's dir. + + Wed Mar 18 17:42:12 1992 Paul Eggert (eggert@twinsun.com) + + * c-aux-info.c (gen_aux_info_record): Don't put the absolute path + name into the output file: it's useless, expensive, and often wrong. + Use "." instead. + * protoize.c (is_syscalls_file): Look for SYSCALLS.c only at the + end of the file name. + (abspath): Remove useless test of '\0' versus '/'. Add apollo fix. + (shortpath): Stop when replacement filename is longer than the + original; this avoids buffer overrun. Do not pretend that + `a/b/c' is a path prefix of `a/b/cd'. + (gen_aux_info_file): Report errors when compilation fails. + Do not use stdio in child process. + Don't say `exit(errno)'; errno might be too large. + (process_aux_info_file): Increment error count if aux info file cannot + be generated. Allow the invocation filename to be relative; + for now, it will always be ".". + (do_processing): Replace strlen (x) with sizeof (x) - 1. + + Thu Mar 19 13:31:24 1992 Jim Wilson (wilson@wookumz.gnu.ai.mit.edu) + + * cse.c (simplify_binary_operation, PLUS and MINUS cases): Use + arg0s and arg1s instead of arg0 and arg1, so that resulting values + will be sign extended. + + * sched.c (sched_analyze_1): Don't call sched_analyze_2 at the end. + This code was never executed, and is wrong. + (sched_analyze_2): Convert from if statements to a switch. + Add support for PRE_DEC/PRE_INC/POST_DEC/POST_INC; pass them to + sched_analyze_1 because they are writes. + (sched_analyze_insn): Delete special case code to handle REG_INC + notes, obsoleted by change above. + + * sparc.c (output_block_move): Rewrite to more efficiently handle + constant length strings whose length is not a multiple of their + alignment. Also, the length of strings handled without a loop now + is a multiple of their alignment, instead of fixed size. + + * objc-actions.c (build_selector_translation_table): Add cast for + array index from enum to int to satisfy old compiler. + + * c-parse.gperf: Change ASM to ASM_KEYWORD. + * gplus.gperf: Likewise. + + * Makefile.in (install-man): Delete duplicate lines. + + Thu Mar 19 02:32:06 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-decl.c (init_decl_processing): Disable `sqrt'. + + Thu Mar 19 01:09:16 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.c (output_move_double): Properly check for signedness in a + const_double. + + Wed Mar 18 18:51:37 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * gcc.c (link_command_spec) [not LINK_LIBGCC_SPECIAL]: Put back -s. + + * config.sub (i486): Accept as CPU type. + + * collect2.c (do_wait): Handle NO_SYS_SIGLIST. + * xm-hp320.h (NO_SYS_SIGLIST): Defined. + + Wed Mar 18 15:58:31 1992 Tom Wood (wood at dg-rtp.dg.com) + + * crtstuff.c, dwarfout.c, svr3.h, svr4.h (*_ASM_OP): Remove tabs + and newlines. + * dwarfout.c, svr3.h, svr4.h + (ASM_OUTPUT_*, ASM_DECLARE_*, ASM_DWARF_*): Put tabs here when needed. + + Wed Mar 18 17:26:44 1992 Ron Guilmette (rfg at ncd.com) + + * svr4.h (MULTIBYTE_CHARS): Added definition. + + Wed Mar 18 17:36:30 1992 Michael Meissner (meissner@osf.org) + + * gcc.c (collect_obstack): New static obstack to build the + environment variables to pass to collect, so that it can reliably + find the compiler passes. + (putenv): New function to add a variable to the environment. + Stubbed out for MSDOS and VMS at present, or if HAVE_PUTENV is + defined. + (putenv_from_paths): New function to take a path list, and build + the corresponding environment variable for it. + (main): Pass argv[0] to collect through the environment variable + COLLECT_GCC. Rebuild the COMPILER_PATH and LIBRARY_PATH + environment variables to include all prefixes specified with -B, + -b, and -V. Construct COLLECT_GCC_OPTIONS environment variable to + consist of all of the options passed to gcc, except for the -B, + -b, and -V options. + + * collect2.c (main): Correctly size the number of arguments passed + to the compiler when building the constructor lists to account for + any options passed through the environment variable + COLLECT_GCC_OPTIONS. If the environment variable COLLECT_GCC + specifies a full pathname, use that for the pathname to invoke gcc + with. Print the name "collect2" in lowercase if -v. + + * xm-mips.h (HAVE_PUTENV): Define if OSF/1. + + Wed Mar 18 07:27:50 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * hp800.c (actual_fsize): Remove duplicate declaration. + (profile_flag): Remove definition; defined in flags.h. + (hp_profile_labelno, local_fsize, save_fregs): Move declarations to + top of file. + + * hp800.h (OPTIMIZATION_OPTIONS): Do same thing as Sparc. + + * combine.c (reg_bitfield_target_p): Use rtx_equal_p instead of + assuming the actual rtx is used. + + Wed Mar 18 00:20:38 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * gstddef.h: Handle _GCC_PTRDIFF_T, _GCC_SIZE_T, _GCC_WCHAR_T. + * fixincludes: Use those macros in inserted conditionals. + + * gstddef.h: Handle _T_SIZE_ and _T_PTRDIFF_, like _T_WCHAR_. + + * sun3.h (CPP_SPEC): Delete the alternative for fpa as default. + Define symbols with __ as well as without. + + * hp320.h (LINK_LIBGCC_SPECIAL, RELATIVE_PREFIX_NOT_LINKDIR): + Define unless USE_GAS. + + Tue Mar 17 17:19:07 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * fixincludes (making directories): Always use find. + + * c-decl.c (pushdecl): Don't warn if define nonansi builtin as static, + or if define ANSI builtin as inline static. + + * hp800hpux.h (LINK_LIBGCC_SPECIAL, RELATIVE_PREFIX_NOT_LINKDIR): New. + + * fixinc.svr4: Special changes for Sony MIPS-NEWS. + + Tue Mar 17 15:12:57 1992 Tim Moore (moore@defmacro.cs.utah.edu) + + * hp800.h (INITIAL_FRAME_POINTER_OFFSET): Get sign right, include + fixed area. + + Tue Mar 17 14:06:01 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Makefile.in (all.indirect): Renamed from all-internal. + + * t-mips (ALL): Deleted. + + Tue Mar 17 10:35:18 1992 Michael Meissner (meissner@osf.org) + + * halfpic.c (half_pic_address_p): Fix typo in last change. + + * x-decrose (CLIB): Add -lbsd, since vfork moved to libbsd.a. + * x-encrose (CLIB): Ditto. + * x-i386rose (CLIB): Ditto. + + Tue Mar 17 07:02:29 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * mips.md (movdi): FP_REGS don't allow DImode, so remove them + from the constraints. + + * mips.md (unaligned moves): Use UNSPEC to distinguish SETs that are + unaligned from those that aren't. + + * combine.c (try_combine): Update LOG_LINKS correctly when we split a + PARALLEL that loads from memory both as a full-word and sign-extended. + + Tue Mar 17 21:23:10 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) + + * vax.c (split_quadword_operands): Fix typo. + + * make-cc1.com: Add xcoffout.c. + + Mon Mar 16 17:12:26 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * configure (mips-dec-ultrix*): Use x-decstatn. + * x-decstatn (CLIB): Delete. + + * expr.c (move_by_pieces_1): Add negative ints--don't subtract ints. + + * next.h (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Turned off. + * t-next (EXTRA_PROGRAMS, ld): Use collect2. + * configure (m68k-next-*): Use t-next. + + * mips-bsd.h (TARGET_MEM_FUNCTIONS): Defined. + + Mon Mar 16 14:04:08 1992 Tim Moore (moore@defmacro.cs.utah.edu) + + * hp800.md (movsi + 10, movsi + 11): Add '*' to constraints. + (fix_truncsfsi2, fix_truncdfsi2): Add an alternative to put result + directly in a general register. + * hp800.h (ASM_DECLARE_FUNCTION_NAME): If function is not + TREE_PUBLIC, don't do the argument descriptor magic. + (EXPAND_BUILTIN_SAVEREGS): call hppa_builtin_saveregs. + (LEGITIMIZE_ADDRESS): Don't legitimize CONST addresses. + (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Put tabs back in. + * xm-hp800.h (S_ISDIR): Define for BSD. + + * hp800.c (hppa_builtin_saveregs): New function. + * va-hp800.h : Rewrite. + + + Sun Mar 15 23:38:39 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * objc-actions.c (really_start_method): Dynamically allocate `buf'. + + * sparc.h (TARGET_HOPE_ALIGN): Renamed from TARGET_ALIGN. + * sparc.c (output_move_double, output_fp_move_double): Use new name. + * sparc.h (TARGET_FORCE_ALIGN): New flag. + (FUNCTION_ARG_BOUNDARY): Defined. + (FUNCTION_ARG, FUNCTION_INCOMING_ARG, FUNCTION_ARG_ADVANCE): + (FUNCTION_ARG_PARTIAL_NREGS): Handle TARGET_FORCE_ALIGN. + (ROUND_REG): New subroutine macro. + + * sparc.h (CC1_SPEC): Don't try to recognize -dalign. + + * hp320.h (ASM_OUTPUT_ASCII): Put tab here. + (ASCII_DATA_ASM_OP): Not here. + * mot3300.h: Likewise. + + * Makefile.in (mostlyclean): Don't delete .s or .i files. + (extraclean): Do that here. + + * a29k.h, fx80.h, gmicro.h, i860v3.h, i860v4.h (*_ASM_OP): Remove tabs. + * m88kv4.h, m88kdgux.h, mips.h, romp.h, rs6000.h: Likewise. + * sun386.h, tower-as: Likewise. + * arm.h, hp800.h (*_ASM_OP): Remove extra tabs and newlines. + * m68ksgs.h (*_ASM_OP): Remove tabs. + (ASM_OUTPUT_*): Put the tabs here when appropriate. + * m68kv4.h, m88k.h, next.h: Likewise. + + Sun Mar 15 18:37:49 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * reload1.c (inc_for_reload): Rework to try to do addition in + INCLOC rather than assuming when it can be done; this fixes a bug + on hp800 and generates better code on some CISC machines. + + Sun Mar 15 15:12:39 1992 Ron Guilmette (rfg at ncd.com) + + * crtstuff.c: If defined, invoke INIT_SECTION_PREAMBLE. + + Sun Mar 15 15:12:39 1992 Ron Guilmette (rfg at ncd.com) + + * xm-sparcv4.h, x-sparcv4: New files. + * configure (sparc-*-sysv4*): Use them. + + Sun Mar 15 16:41:33 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * sparc.md (subdi3): Fix unterminated comment. + + Sun Mar 15 04:08:59 1992 Torbjorn Granlund (tege at zevs.sics.se) + + * hp800.c (output_block_move): Major rewrite. + * hp800.md (movstrsi): Rewrite to match new output_block_move. FAIL + if the actual operands are better handled by a library call. + (movstrsi recognizer): Rewrite. + + * sparc.md (movstrsi): FAIL for all blocks with unknown size. + + Sat Mar 14 19:06:02 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * c-decl.c (builtin_function): Don't declare static. + + Sat Mar 14 15:57:53 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * expr.c (get_pointer_alignment): Convert bytes to bits + when handling PLUS_EXPR. + + * cp-search.c (push_stack_level): Declare tp as char *. + + * mips.c (mips_asm_file_end): Use TREE_ASM_WRITTEN to avoid + duplicate .extern commands. + + * mips-tdump.c: Include fcntl.h. + * mips-tfile.c (open, fstat): Declarations deleted. + + * xm-mipsnews.h: New file. + * mips-news5.h: New file. Needs papers from Ron Cole. + * configure (mips-sony-sysv*): New alternative. + + Sat Mar 14 07:11:14 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * integrate.c (initialize_for_inline): If DECL_INCOMING_RTL is + the same object as DECL_RTL, store copy in both places. + + Sat Mar 14 10:12:39 1992 Michael Tiemann (tiemann@cygnus.com) + + * cp-decl2.c (flag_this_is_variable): Define the value -2 to mean an + object of known type is being constructed. + * cp-decl.c (resolves_to_fixed_type_p): Test FLAG_THIS_IS_VARIABLE + for the value -2 instead of testing DECL_CONSTRUCTOR_P in case we + are looking at `current_class_decl'. + * cp-search.c (init_vbase_pointers): Set FLAG_THIS_IS_VARIABLE to -2 + instead of 0. + (build_vbase_vtables_init): Ditto. + * cp-*.c: All tests of FLAG_THIS_IS_VARIABLE changed to reflect the + new semantics. + + * cp-type2.c (build_functional_cast): remove incorrect error message. + + * cp-typeck.c (comptypes): Don't use IS_AGGR_TYPE_2; test explicitly + that both are RECORD_TYPE. + (build_binary_op_nodefault): Ditto. + (convert_for_assignment): Ditto. + * cp-cvt.c (convert_to_pointer): Ditto. + (convert_to_pointer_force): Ditto. + * cp-call.c (convert_harshness): Ditto. + + * cp-search.c (get_first_matching_virtual): Fix typo. + + * cp-tree.c (layout_basetypes): When warning about certain + inheritance relationships, only print "virtual" when the + inheritance is virtual. + + * cp-spew.c (yylex): Fix some fencepost errors found by Chip + Salzenberg. + + * cp-init.c (is_aggr_typedef): Now calls `error' instead of `fatal' + if NAME is non-AGGR type. + + * cp-class.c (duplicate_tag_error): Set CLASSTYPE_VBASE_SIZE. + + Sat Mar 14 00:28:57 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * gcc.c (do_spec_1): Don't copy closing delim in %(...) or %[...]. + (read_specs): Don't ignore newline that ends a comment. + (handle_braces): Properly terminate scan for %*. + (validate_all_switches): Scan any extra specs from specs file. + + * x-iris: File deleted. + + * cccp.c (output_line_command): Avoid outputting line number 0. + + * final.c (asm_fprintf): Handle %O. + * m68k.c: Insert %O before `move' in MOTOROLA calls to asm_fprintf. + + Fri Mar 13 20:17:40 1992 Mike Stump (mrs@cygnus.com) + + * cp-typeck.c, cp-type2.c, cp-tree.c, cp-spew.c, cp-search.c, + cp-parse.y, cp-init.c, cp-decl.c, cp-cvt.c, cp-class.c, cp-call.c: + Merged in updated cp-* files for gcc-2.1. + + Fri Mar 13 14:54:23 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * objc-actions.c (get_arg_type_list) [not NEXT_OBJC_RUNTIME]: + 1st arg always an object. + (synth_module_prologue): Don't use parser interface, just build nodes. + Use `void *' to avoid problems with TAG_SUPER vs _TAG_SUPER. + (TAG_SUPER, _msg_id, _msgSuper_id): Deleted. + (objc_getClass_id, objc_getMetaClass_id): Deleted. + (selector_type): Renamed from _selector_type. + (forward_declare_categories, build_objc_symtab_template): + Don't use parser interface, just build nodes. + (create_builtin_decl): New function. + + * hp800hpux.h (LIB_SPEC): New definition. + + * arm.h (TARGET_WHEN_DEBUGGING): Name corrected. + + * protoize.c (abspath): Make abs_buffer a little longer. + + * encore.h (NO_ABSOLUTE_PREFIX_IF_SYMBOLIC): Defined. + (EXTERNAL_PREFIX, IMMEDIATE_PREFIX): Defined. + (TARGET_DEFAULT): Changed to 9. + (ENCORE_ASM): Defined. + + * sequent.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS): Deleted. + (IMMEDIATE_PREFIX): Define as 0. + (SEQUENT_ASM): Defined. + * ns32k.c (print_operand): Output f.p. as ints if SEQUENT_ASM. + Output doubles using 0f, not 0d, if ENCORE_ASM. + + * configure: If no configuration matches, print error and exit. + (m68k-sun-sunos*): Renamed from m68k-sun-sunos4*. + + * configure (copy): New variable. + If hard link fails, make a copy. + + * mips.c (mips_asm_file_end): Don't set flags in identifiers. + Just output every identifier found in extern_head. + + * configure (sparc-tti-*): Renamed from sparc-unicom-*. + (m68k-tti-*): Replaced. + (m68k-tti2-*): Deleted + + * config.sub (pbd): Alias for sparc-tti, not sparc-unicom. + (pbb): New machine alias. + (*-tti): Implies os=-sysv3. + (-oss*): Alias for -sysv3. + + Fri Mar 13 17:20:52 1992 david d [zoo] zuhn (zoo at lynx.spa.umn.edu) + + * x-mips: add -mld. + + Fri Mar 13 14:48:05 1992 Torbjorn Granlund (tege@hal.gnu.ai.mit.edu) + + * hp800.h (REGISTER_NAMES): Name register 112, the shift amount + register, as "SAR". It was left out. + + Fri Mar 13 04:08:53 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386isc.h (STARTFILE_SPEC): Use crt1, not crt0. + + * x-i386sco (CC,OLDCC): Don't define `i386' here. + (RCCFLAGS): Define it here, along with other SCO symbols. + (XCFLAGS): Use that. New variable. + (CLIB): Use -lPW to get alloca(). + + Fri Mar 13 14:11:41 1992 Jeffrey A. Law (law@wombat.gnu.ai.mit.edu) + + * Changes to enable use of sqrt builtin functions. + * c-decl.c (init_decl_processing): Enable BUILT_IN_FSQRT for + __builtin_sqrt. Also enable for sqrt if not traditional. + * cp-decl.c (init_decl_processing): Enable BUILT_IN_FSQRT for + __builtin_sqrt. + * expr.c (expand_builtin, case BUILT_IN_FSQRT): New case. Call + expand_unop to expand the operation. If that fails break and + emit a call to the library sqrt function. + * optabs.c (init_optabs): Initialize new optabs for sqrt functions. + * expr.h (sqrt_optab): Declare here so that expr.c can see it. + + Fri Mar 13 08:56:50 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * cse.c (delete_dead_from_cse): Fix error in last change. + + * a29k.h (PCC_BITFIELD_TYPE_MATTERS): Define as 1. + + * reorg.c (fill_slots_from_thread): Add missing arg in call to + try_split call that was recently added. + + * fold-const.c (invert_truthvalue, case COMPOUND_EXPR): New case. + + Fri Mar 13 01:02:56 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * collect2.c (ordinary scan_prog_file): Don't count | in sym name. + + * ns32k.md (movsf): Remove #if 0 around #ifndef GAS_SYNTAX. + + * pc532.h (GAS_SYNTAX): Defined. + + Thu Mar 12 00:10:23 1992 Stefan Petri (petri@jupiter.ibr.cs.tu-bs.de) + + * configure (pyramid): Re-enable. + + * pyr.h (STRUCTURE_SIZE_BOUNDARY): Restore definition from gcc-1.40. + (PCC_BITFIELD_TYPE_MATTERS): Define as 1 instead of empty. + + * pyr.h (STATIC_CHAIN_INCOMING_REGNUM): Added. + + * pyr.h (TRAMPOLINE_TEMPLATE, TRAMPOLINE_SIZE, TRAMPOLINE_ALIGNMENT, + INITIALIZE_TRAMPOLINE): Added, inspired by convex.h + + * pyr.h (INITIAL_FRAME_POINTER_OFFSET): New definition. + + * pyr.md (indirect_jump): New pattern. + + * libgcc2.c [L_trampoline]: Don't include gstddef.h in this case. + (__enable_execute_stack): Cloned definition for pyramid + from that for convex. + + Thu Mar 12 13:23:05 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * collect2.c (FREAD, FWRITE): #undef if USG. + + * x-mipsv: New file. + * configure (mips-*-sysv): Use it. + + * cccp.c (skip_to_end_of_comment): New arg NOWARN. Callers changed. + (do_xifdef, do_endif): Pass 1 for NOWARN. + + * i386.h, hp800.h (ENCODE_SECTION_INFO): Handle CONSTRUCTOR node. + * i386.h (ENCODE_SECTION_INFO): Only decls can be global. + + * cccp.c (warn_import): New variable. + (do_include): Test that. + (main): Handle -Wimport. + + * hp800hpux.h (DBX_DEBUGGING_INFO): #undef it. + * x-hp800hpux: New file. + * configure (hp800-hp-hpux*): Use it. + + * config.sub: Make triton alias for sysv3. + + * collect2.c: If CROSS_COMPILE, #undef the special OBJECT_FORMAT_*. + + Thu Mar 12 10:35:50 1992 Ron Guilmette (rfg at ncd.com) + + * gcc.c (default_compilers): Use .i suffix (instead of .cpp) for all + preprocessor output files. + (execute): Print commands used to invoke passes if -save-temps. + + * Makefile.in (mostlyclean): Delete *.i, not *.cpp. + Don't delete *.co. + + Thu Mar 12 07:13:33 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * xcoff.h (DBX_FINISH_SYMBOL): When writing function name, strip off + any storage class at the end. + + Thu Mar 12 05:16:49 1992 Tom Wood (wood@dg-rtp.dg.com) + + * config.sub (-triton*): Delete this OS (it's sysv3). + * configure (m88k-dolphin-sysv3): Rename alternative. + * xm-m88kdolph.h: Delete. Use xm-m88kv3.h instead. + * x-m88kdolph: New file. + + Thu Mar 12 00:19:14 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.md (movstrsi recognizers): Fix reversed operands. + + Thu Mar 12 00:01:11 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * gcc.c (main): + Don't require machine_suffix for md_startfile_prefix or md_exec_prefix. + + * toplev.c (main): Force flag_no_inline if not optimizing. + + * dbxout.c (dbxout_type): Ignored names don't count in case UNION_TYPE. + + * cp-decl.c (pushtag): Push on ->tags and make TYPE_STUB_DECL + even if type has no tag name. + * cp-class.c (finish_struct): Always call rest_of_type_compilation. + + * cse.c (simplify_unary_operation): For SQRT, do nothing. + + * byteorder.h: Test __i860_big_endian__. + + * ns32k.c (print_operand_address): Test NO_ABSOLUTE_PREFIX_IF_SYMBOLIC. + Test BASE_REG_NEEDED inside indirect address too. + * sequent.h (NO_ABSOLUTE_PREFIX_IF_SYMBOLIC): Defined. + (SEQUENT_ADDRESS_BUG, SEQUENT_BASE_REGS): #if 0. + + Wed Mar 11 22:55:38 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-decl.c (push_parm_decl): Clear immediate_size_expand temporarily. + * stor-layout.c (get_pending_sizes): Fix up SAVE_EXPR_CONTEXT. + (variable_size): No longer static. + * c-decl.c (grokdeclarator): Call variable_size, not save_expr. + Rename local `variable_size' to `size_varies'. + + Wed Mar 11 18:53:23 1992 Chip Salzenberg (chip@tct.com) + + * collect2.c (OBJECT_FORMAT_COFF, OBJECT_FORMAT_ROSE): + (OBJECT_FORMAT_NONE): Three alternative strategies for finding inits. + OBJECT_FORMAT_COFF is completely new. + (is_ctor_dtor): New function. + [OBJECT_FORMAT_NONE, OBJECT_FORMAT_ROSE] (scan_prog_file): + Use is_ctor_dtor. + + * x-rs6000 (CLIB): Add -lld. + * t-rs6000: New file. + * configure (rs6000...): Use that file. + + Wed Mar 11 17:31:13 1992 Torbjorn Granlund (tege@hal.gnu.ai.mit.edu) + + * reload1.c (inc_for_reload): Call gen_add2_insn with negated + constant instead of gen_sub2_insn. + + Wed Mar 11 17:30:35 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-typeck.c (build_binary_op): For shifts, always use op0 type. + + * stmt.c (expand_end_bindings): + Load virtual_incoming_args_rtx via a pseudo reg. + + * math-68881 (pow): Add missing parens; typo in fp constant. + + * i386isc.h (LIB_SPEC): Add -lg. + + * libgcc2.c (__CTOR_LIST__, __DTOR_LIST__): + Don't define if CTOR_LISTS_DEFINED_EXTERNALLY. + (__builtin_saveregs): Handle NO_UNDERSCORES for sparc. + + * pbb.h, pbd.h: New files from Mike Bloom. + * configure (m68k-tti2-*): Turned back on. + + * c++: Add a colon command in case system doesn't handle #!/bin/sh. + + Mon Mar 11 19:54:43 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.md (integer truncMN2): Delete patterns. Not needed on i386. + + Wed Mar 11 16:58:56 1992 Tom Wood (wood@dg-rtp.dg.com) + + * m88kv3.h (STARTFILE_SPEC, LIB_SPEC): Search for crt{begin,end}.o + (DO_GLOBAL_CTORS_BODY, CTORS_SECTION_ASM_OP, ASM_OUTPUT_CONSTRUCTOR, + DTORS_SECTION_ASM_OP): Implement new svr3 scheme. + + Wed Mar 11 16:24:03 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * fold-const.c (fold): When correcting constant result of GE, LE, NE, + make sure we really have a constant result. + + * ns32k.md (call, call_value): Support GAS_SYNTAX and GNX_V3 like 1.40. + + * c-decl.c (pushdecl): Properly use prev implicit decl in warning. + + Wed Mar 11 16:05:20 1992 Jim Wilson (wilson@wookumz.gnu.ai.mit.edu) + + * Makefile.in (OBJS): Add xcoffout.o. + (dbxout.o, final.o, toplev.o, varasm.o): Add xcoff.h dependency. + (xcoffout.o): Add rule to build. + + * xcoffout.c: Change names of rs6000_*_section_name variables to + xcoff_*_section_name, and move definitions of them here from + rs6000.c. + * xcoff.h: Likewise, move declarations here from rs6000.h. + * rs6000.c: Delete definitions of rs6000_*_section_name variables. + * rs6000.h: Delete declarations of rs6000_*_section_name variables. + + * rs6000.c (output_epilog): Add comment to note lack of traceback + table support. + * rs6000.h: Refine comment explaining ASM_SPEC definition. + (XCOFF_DEBUGGING_INFO): Define. + (DBX_CONTIN_LENGTH, DBX_NO_XREFS): Move to xcoff.h. + (ASM_FILE_START): When -g, emit private_data_section. + (ASM_DECLARE_FUNCTION_NAME): When -g, output .lglobl for static + functions. Also, output .function debug info. + (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Add bss_section call. + + * dbxout.c: Include xcoff.h when XCOFF_DEBUGGING_INFO is defined. + Define default values for DBX_DECL_STABS_CODE, + DBX_STATIC_CONST_VAR_CODE, DBX_REGPARM_STABS_CODE, and + DBX_REGPARM_STABS_LETTER. These exist to be overriden for xcoff. + Include entire file if either DBX_DEBUGGING_INFO or + XCOFF_DEBUGGING_INFO is defined. + (dbxout_type): Add early exit if DBX_TYPE_DEFINED, used for xcoff. + (dbxout_symbol): Use DBX_DECL_STABS_CODE instead of N_LSYM for + tags and typedefs. Use DBX_STATIC_CONST_VAR_CODE instead of N_FUN + for static const variables. Add DBX_STATIC_BLOCK_START and + DBX_STATIC_BLOCK_END around output of stab info, for xcoff use. + (dbxout_finish_symbol): Use DBX_FINISH_SYMBOL instead if defined. + (dbxout_syms, dbxout_parms): No longer static, referenced from + xcoffout.c. + (dbxout_parms): Use DBX_REGPARM_STABS_CODE instead of N_RSYM. Use + DBX_REGPARM_STABS_LETTER instead of 'P'. + (dbxout_reg_parms): No longer static. + * final.c: Also include gstab.h if XCOFF_DEBUGGING_INFO defined. + Include xcoff.h if XCOFF_DEBUGGING_INFO defined. + (final_start_function): Call xcoffout_output_first_source_line + when XCOFF_DEBUG. Set next_block_index if XCOFF_DEBUG. + (final_end_function): Call xcoffout_end_function if XCOFF_DEBUG. + Call xcoff_end_epilogue if XCOFF_DEBUG. + (final_scan_insn): Call xcoffout_begin_function, + xcoffout_begin_block, and xcoffout_end_block if XCOFF_DEBUG. + (output_source_line): Also call dbxout_source_file if XCOFF_DEBUG. + * flags.h: Define XCOFF_DEBUG. Also declare + use_gdb_dbx_extensions if XCOFF_DEBUGGING_INFO. + * toplev.c: Also declare use_gdb_dbx_extensions if + XCOFF_DEBUGGING_INFO. Include xcoff.h in XCOFF_DEBUGGING_INFO. + (compile_file): Also call dbxout_init, and dbxout_finish if + XCOFF_DEBUG. + (rest_of_decl_compilation): Also call dbxout_symbol if + XCOFF_DEBUG. + (rest_of_type_compilation): Also call dbxout_symbol if + XCOFF_DEBUG. + (main): Add support for recognizing -g when XCOFF_DEBUGGING_INFO. + * varasm.c: Include xcoff.h if XCOFF_DEBUGGING_INFO. + (assemble_variable): Also call dbxout_symbol when XCOFF_DEBUG. + Change all returns to goto finish. At finish label, + call dbxout_symbol if XCOFF_DEBUG. + + * dbxstclass.h: New file. Define XCOFF specific storage classes. + * xcoff.h: New file, for XCOFF support. Included by xcoffout.c, + dbxout.c, final.c, toplev.c, and varasm.c. + * xcoffout.c: New file for XCOFF support. Most of the support is + implemented by dbxout.c, this just includes stuff that can not be + easily performed within dbxout.c. + + * toplev.c (struct W_options): Add entry for warn_inline, so user + can turn this warning on. + + Wed Mar 11 15:11:42 1992 Torbjorn Granlund (tege@hal.gnu.ai.mit.edu) + + * optabs.c (init_optabs): Fix typo (Imode instead of TImode) in + HAVE_subti3 case. + + Wed Mar 11 13:10:20 1992 Jeffrey A. Law (law@wombat.gnu.ai.mit.edu) + + * sparc.h (REG_ALLOC_ORDER): Make %g3 more desirable. + + Wed Mar 11 12:35:12 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * fixincludes (egrep cmd): Delete misplaced `#e[nl]'. + + * jump.c (jump_optimize): Try to fix last change. + + * expmed.c (init_expmed): Use big, ugly factor in mult_is_very_cheap. + + Wed Mar 11 08:00:18 1992 Tom Wood (wood@dg-rtp.dg.com) + + * toplev.c (rest_of_compilation): Use sdbout_types to clear the + anonymous types queue if any. + * sdbout.c: Correct spelling of sdbout_dequeue_anonymous_types. + + * genattrtab.c (attr_string): Don't assume a terminating null. + + Wed Mar 11 07:05:38 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * reload1.c (reload_as_needed): Delete erroneous test of + basic_block_needs. + + * stmt.c (expand_end_case): Know that we will obtain a constant + if we were passed a COMPOUND_EXPR whose second operand is constant. + Fold the MINUS_EXPR we make for casesi. + + * reorg.c (update_block_from_store): Deleted. + (update_block): Always leave USE; don't try to update live regs. + + * explow.c (copy_to_suggested_reg): Add new arg for mode to use. + * expmed.c (expand_divmod): Pass new arg to copy_to_suggested_reg. + + * reload1.c (set_label_offsets, reload_as_needed): Consistently + ignore non-eliminables when computing num_not_at_initial_offset. + + * rs6000.md (subsi3): Remove unnecessary call to force_reg. + + * rs6000.c (output_epilog): Separate setting LR from loading + it from memory in some cases. + Branch to FP restore routine instead of calling it. + + * flow.c (propagate_block): CC0 is not live when we delete a dead + insn. + * cse.c (delete_dead_from_cse): An insn setting CC0 is not live + if the next insn doesn't reference CC0. + + * cse.c (cse_insn): If we see a narrow AND with a constant, check if + we have seen a wider AND. + + * combine.c (can_combine_p): Allow SUBREG of non-tiable regs if we + are going to do is copy it to CC0. + + * reload.c (find_secondary_reload): If X is a pseudo with an + equivalent MEM, use the MEM to see if a secondary reload is needed. + Don't call REG_CLASS_FROM_LETTER for 'r'. + * reload1.c (emit_reload_insns): Handle reloading pseudos + with equivalent MEM when we have secondary reloads; use the MEM + when required. + + * romp.md (reload_outsi): Pattern should be a single PARALLEL + whose second component is a CLOBBER. + + Wed Mar 11 03:11:26 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * gcc.c (find_a_file, do_spec_1): Always obey require_machine_suffix. + (machine_explicit): Var deleted. + + Tue Mar 10 23:12:24 1992 Jeffrey A. Law (law@wombat.gnu.ai.mit.edu) + + * m68k.md (68000 special shifts): No longer accept a shift count + of 16. Delete support for shifts by 16 places. + (shift by 16 bits): New patterns which apply to all 68k models. + * m68k.h (RTX_COSTS): Shifts by 16 are cheap. + + Tue Mar 10 20:37:31 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * dwarfout.c (location_or_const_value_attribute): + Reenable changes disabled on Feb 21. + * function.c (instantiate_decls): Likewise. + + * sdbout.c (sdbout_symbol): Handle (mem (const...)). + * dbxout.c (dbxout_symbol): Likewise. + + * xm-i386isc.h: New file. + * configure (i386-*-isc*): Use it. + + * hp320.h (MD_STARTFILE_PREFIX): Deleted. + + * m68k.h (RTX_COSTS): If MULT is a shift, jump to shift case. + + * sun3.h (TARGET_MEM_FUNCTIONS): Defined. + + * toplev.c (rest_of_compilation): Call sdbout_dequeue_anonymous_types + even if we don't output assembler code. + + * jump.c (jump_optimize): In `if (foo) bar; else break;' optimization, + include in range1 and range2 any line numbers at the beginning. + + * c-typeck.c (spelling_length): Initialize `size'. + (PUSH_SPELLING): `spelling_size' is measured in elements. + (get_spelling): Use xmalloc if there is no buffer yet. + + Tue Mar 10 20:25:56 1992 Jim Wilson (wilson@wookumz.gnu.ai.mit.edu) + + * integrate.c (save_for_inline_copying): + Set up LABEL_NAME of label copies. + + * sparc.md: Clean up attribute settings. Add default length of 2 + for insns of type multi. Make sure all insns have correct type and + length attribute values. + + Tue Mar 10 19:13:19 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-decl.c (warn_parentheses): Default is 0. + (c_decode_option): -Wall implies -Wparentheses. + + Tue Mar 10 17:49:51 1992 Torbjorn Granlund (tege at mole.gnu.ai.mit.edu) + + * hp800.md (shNadd recognizers): Put the MULT first, to obey insn + canonicalization rules. + + * hp800.md (subsi3): Don't handle constants for operand 2, but + do handle them for operand 1, for the subi insn. + + * hp800.md (compare into ordinary reg): Use "arith11_operand", not + "arith_operand" for operand 2. Use `I', not `J' as constraint. + Don't change the constant in the output code (i.e. undo Mar 10 + change). + * hp800.c (arith11_operand): New predicate function. Fix comment. + + hp800.md (mulsi3): Don't handle CONST_INT specifically, rely on + machine independent code. + * hp800.h (RTX_COST): Define. + * hp800.c (ABS, mul_operands, emit_mul_by_constant) Remove. + (mul_by_constant_aux, test_factor_and_output): Remove. + + * hp800.md (addsi3): Use "register_operand" for operand 1, not + "arith_operand". + + * hp800.md: Clean up spacing and comments in a few places. + + * hp800.c (output_move_double): Handle auto increment and auto + decrement. Remove unused enums. Test for either operand being a + REGOP instead if RNDOP, since we require at least one operand to + be a register. Pass the MEM address to find_addr_reg, not the + entire MEM rtx (in two places). + + * hp800.h (WORDS_BIG_ENDIAN): Fix typo in comment. + (RTX_COST): Return cost of a PLUS, to indirectly give the right + cost for the shNadd insns. Adjust the cost for division. + + Tue Mar 10 15:57:24 1992 Jim Wilson (wilson@wookumz.gnu.ai.mit.edu) + + * sparc.md: Add pattern for optimizing bitfield compares. This + pattern was accidently lost when other (now-obsolete) bitfield + patterns were removed. + + * sparc.c (arith32_operand): Deleted. + * sparc.md (movstrsi): Now uses nonmemory_operand for length. + + * sparc.c (output_arc_profiler): Emit insns from first to last + instead of last to first, since it is much clearer. Eliminate + profiler_target, since it resulted in illegal rtx sharing. + + * sparc.c (legitimize_pic_address): Make -fPIC work again, re the + Feb 27 cse.c LO_SUM fix. Put addresses inside UNSPEC when loading + them to ensure that cse won't mistakenly optimize them. + * sparc.md: Two new patterns, to match (HIGH (UNSPEC (..))) and + (LO_SUM (reg) (UNSPEC (..))) as generated above. + + Tue Mar 10 14:58:19 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * mips-news.h (ASM_SPEC): Move %{G*} outside of -mgas conditional. + * nws3250v4.h, xm-nws3250v4.h, x-nws3250v4: New files. From cph. + + * i860.c (sfmode_constant_to_ulong): Fix typo in last change. + + * expr.c (store_expr): Initialize `label'. + + * 3b1.h (HAVE_ATEXIT): #undef this. + + * hp800.md (compare into ordinary reg): Make large ints "negative". + + * hp800hpux.h: New file. + * configure (hp800-*-bsd*): Renamed from hp800-*-*. + (hp800-*-hpux*): New configuration. + + Tue Mar 10 11:03:47 1992 Torbjorn Granlund (tege@hal.gnu.ai.mit.edu) + + * expmed.c (init_expmed): Make the lea pattern in the canonical way. + + Tue Mar 10 10:32:30 1992 Tom Wood (wood@hal) + + * m88k.h (ASM_OUTPUT_{COMMON,LOCAL}): Compute size consistently. + + Tue Mar 10 07:41:09 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * recog.c (constrain_operands, case 'E'): Fix typo. + + * function.c (setjmp_protect): Don't put vars from inline functions + on the stack. + + * c-typeck.c (process_init_constructor): Don't use host integers for + bounds and index computation; use trees instead. + If specifying index in array with unset bounds, assume lower bound + of zero and check specified index against zero. + + * tree.h (mode_for_size): Don't declare here. + * machmode.h (mode_for_size): Declare here instead. + + * reorg.c (fill_slots_from_thread): Try to split THREAD immediately + so we don't get confused if it gets split later. + + * reorg.c (fill_slots_from_thread): Don't take add from loop + head if the increment amount depends on the target register, since + we can't undo the operation. + + Mon Mar 9 12:18:04 1992 Jim Wilson (wilson@wookumz.gnu.ai.mit.edu) + + * unroll.c (final_biv_value): Fail if the biv is not MODE_INT. + + * combine.c (distribute_notes, case REG_DEAD): Call rtx_equal_p + to verify that it was the set that modified the register, and + not a clobber. + + Sun Mar 8 22:20:24 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * c-parse.y,c-lex.c,cp-hash.h,cp-parse.y,cp-spew.c,objc-parse.y: + Rename `ASM' to `ASM_KEYWORD' to avoid trouble with SCO + . + + Sun Mar 8 23:16:37 1992 Jeffrey A. Law (law@wombat.gnu.ai.mit.edu) + + * expr.c (move_by_pieces, move_by_pieces_ninsns): Remove March 4 and + March 5 changes. Set max_size to MOVE_MAX + 1 instead. + + Sun Mar 8 17:08:57 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * expr.c (do_tablejump): New arg MODE. + * stmt.c (expand_end_case): Pass that arg. + + * c-decl.c (pushtag): Push even anonymous types on tags list. + (parmlist_tags_warning): Handle anonymous types in the list. + + Sun Mar 8 15:08:58 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386mach.h (perform_fixdfsi): Rename from *_fix_trundfsi2. + Restore float control word correctly. + * i386rose.h (perform_fixdfsi): Likewise. + + * i386.h (CONST_DOUBLE_OK_FOR_LETTER_P): Allow float constants, + even if -msoft-float is used: reg-stack.c may emit an insn to load + the function value register with 0.0. + + * i386.md (bit test insns): Don't allow memory operands as the + first argument of the zero_extract. + + * i386isc.h (RETURN_POPS_ARGS): Comment this out: ISC uses the + standard definition. + + * i386sco.h (STARTFILE_SPEC): Use crtbegin.o. + (ENDFILE_SPEC): Use crtend.o. + (CPP_SPEC): #undef before defining. + (RETURN_POPS_ARGS): Caller pops args on SCO. + + Sun Mar 8 14:25:16 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * configure: Fatal error if srcdir has already been configured. + Remove periods from error messages. + + * 3b1.h, mot3300.h (ASM_OUTPUT_OPCODE): Change swap to swap.w. + (SGS_SWAP_W): Deleted. + * m68ksgs.h (ASM_OUTPUT_OPCODE): If SGS_SWAP_W, change swap to swap.w. + * m68k.md: Delete all SGS_SWAP_W conditionals. + + * m68k.md (shift using swap, dbra patterns): Change clrw to clr%.w. + + * hp800.h (output_global_address): Use `-' for PLUS of neg integer. + Clean up spacing and braces in several places in file. + + * byteorder.h (htons): Use unsigned int for arg type. + + Sun Mar 8 07:36:44 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * rs6000.c (print_operand, case 'A'): New case. + * rs6000.md (sri): New %A to use "sli" for count of zero to work + around bug in RS/6000 assembler. + + * config.sub (os): Add "aos" to basic list, no longer the same + as "bsd"; "acis" is an alternate for "aos". + (romp): No longer has a default system. + * configure (romp-*-aos*): Renamed from romp-*-bsd*; BSD means + real BSD (4.3 Tahoe+), AOS means IBM system. + + * Makefile.in (crtbegin.o, crtend.o): Use -o for output instead of + putting in crtstuff.o and renaming to desired name. + + * reload1.c (reload): Re-check eliminability of registers on each + reload pass. + + * jump.c (mark_jump_label): Make multiple REG_LABEL notes if + more than one label is mentioned in an insn. + + * integrate.c (copy_rtx_and_substitute): Properly initialize + const_equiv_map for the equivalents of AP and FP. + + * rs6000.h (TARGET_MEM_FUNCTION): Define. + + Sun Mar 8 00:05:47 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-decl.c (store_parm_decls): Copy function type before changing it. + * tree.c (build_type_copy): New subroutine. + + * t-next (LIBGCC1): Assigned, instead of LIBGCC. + + * m68k.h (SHIFT_COUNT_TRUNCATED): Deleted. + + Sat Mar 7 23:47:57 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.md (xorsi3,xorhi3): Don't emit a byte opcode with an SImode + operand. + + Sat Mar 7 22:49:21 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-typeck.c (convert_arguments): -Wconversion warning + if argument is passed as float. + For fixed arguments, warn if type passed doesn't match + what default_conversion produces. + + * gcc.c (cross_compile): New variable, 1 if cross-compiling. + (read_specs): Read it from specs. + (process_command): Dump it to specs. + + * gcc.c (process_command): Don't use MD prefixes and + standard_startfile_prefix* here. + (main): Use them here, if not cross-compiling. + + Sat Mar 7 18:13:45 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * reload1.c (reload_as_needed): Eliminate regs in (use (mem ..)) + and (clobber (mem ...)) insns. + + * combine.c (distribute_notes): Fix minor bug in handling of + multi-register values when only one part is used. + + * optabs.c, expr.c: Always call emit_library_call with no_queue == 1. + + * function.c (fix_lexical_addr): Correctly set BASE in non-separate + AP case. + + Sat Mar 7 15:39:57 1992 Jyrki Kuoppala (jkp@batman.cs.hut.fi) + + * ns32k.h (TRANSFER_FROM_TRAMPOLINE): changed "ret" to "ret 0" + + Sat Mar 7 15:41:46 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * fixincludes: Don't do special fixes on signal.h, which were only + needed because of #endif comment fixes. + + Sat Mar 7 15:11:50 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * m68k.h (ASM_OUTPUT_ALIGN): Don't crash if LOG is more than 1. + + * varasm.c (decode_reg_name): Make various prefixes optional + whether or not they are in REGISTER_NAMES. + (strip_reg_name): New subroutine. + + * i386.c: Fatal error if EXTRA_CONSTRAINT is defined. + + * collect2.c [USG] (R_OK, W_OK, X_OK): Define them if missing. + + * x-hp320g (RANLIB, RANLIB_TEST): Defined. + + * Makefile.in (EXTRA_PROGRAMS): New variable is list of programs. + (native): Build them. Don't build EXTRA_PARTS. + (rest.encap): Build EXTRA_PARTS. + (GCC_PARTS): Include EXTRA_PROGRAMS. + (install-common): Build EXTRA_PROGRAMS. + * t-convex (EXTRA_PROGRAMS): Define instead of EXTRA_PARTS. + + * Makefile.in (distclean): Don't delete backups, etc. + (extraclean): New target--delete those things here. + (gcc.xtar): Use extraclean. + (cleanconfig): Deleted. + (realclean): Depend on distclean. + + Sat Mar 7 14:54:29 1992 Tom Wood (wood@dg-rtp.dg.com) + + * genattrtab (attr_printf): Provide alternate based on HAVE_VPRINTF. + + Sat Mar 7 14:25:58 1992 Torbjorn Granlund (tege@hal.gnu.ai.mit.edu) + + * hp800.c (secondary_reload_class): Change `=' to `==' in `if'. + + Sat Mar 7 13:25:17 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * cccp.c (do_line): Fix typo. + + * configure (decoding args): Delete excess fi. + + Sat Mar 7 09:29:41 1992 Michael Meissner (meissner@osf.org) + + * mips.h (CONST_COSTS): Complete last change. + + * mips.md (movsi_ulw, movsi_usw): Complete last change. + + Sat Mar 7 07:28:03 1992 Tom Wood (wood at dg-rtp.dg.com) + + * config.sub (*-dolphin, -triton*): New vendor/OS. + * configure (m88k-dolphin-trition): New alternative. + * m88kdolph.h: New file. + * xm-m88kdolph.h: New file. + + Sat Mar 7 10:07:44 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) + + * make-l2.com: Do not allow the user to run this with gcc 1.nn. + + * make-gcc.com: Use the new compiler to build libgcc2.c (through + make-l2.com). + + Sat Mar 7 05:36:16 1992 K. Richard Pixley (pixley@nutrimat.gnu.ai.mit.edu) + + * Makefile.in: added the exec_prefix variable for installing host + dependent programs and libraries. + + Sat Mar 7 00:09:50 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * genextract.c (mybzero): New fn. Used instead of bzero. + + * Makefile.in (all): Indirect to all-internal. + (all-internal): New rule, following where cross-make gets inserted. + + * vms.h (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Defined. + + * protoize.c: Don't declare fork or vfork. + + * i860.c (sfmode_constant_to_ulong): Use REAL_VALUE_FROM_CONST_DOUBLE. + + * gcc.c (handle_braces): Verify actual suffix length matches + desired. + + * hp800.h (GO_IF_LEGITIMATE_ADDRESS): Add parens for clarity. + + * c-typeck.c (pointer_int_sum): Handle intop which is sum or diff + of arguments with different types. + + * c-typeck.c (PUSH_SPELLING): If no buffer yet, use xmalloc. + + * m68k.c (output_dbcc_and_branch): Use \n\t between pair of insns. + + * sparc.h (TARGET_MEM_FUNCTIONS): Defined. + + Fri Mar 6 18:48:03 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Don't call ON_EXIT here. + * crtstuff.c, libgcc2.c (__do_global_ctors): Call it here. + + * i386sco.h (HAVE_ATEXIT): Defined. + + * collect2.c (my_exit, main): Avoid dereferencing 0. + + * stmt.c (expand_decl_init): Don't alter TREE_USED of the variable. + + Fri Mar 6 18:24:39 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * mot3300.h (SIZE_TYPE): Define as "unsigned int". + + * combine.c (make_extraction): STRICT_ALIGNMENT is now non-zero if + true, instead of relying on whether it is defined or not. + * c-typeck.c, cp-typeck.c (build_c_cast): Likewise. + * stor-layout.c (layout_type) Likewise. + * expr.h (MUST_PASS_INSTACK_BAD_ALIGN): Likewise. + * expr.c: Set default value of SLOW_UNALIGNED_ACCESS to zero. + (move_by_pieces, move_by_pieces_ninsns, emit_push_insn): + SLOW_UNALIGNED_ACCESS and STRICT_ALIGNMENT now true if non-zero. + * function.c (assign_stack_local, assign_outer_stack_local): + Remove turned-off code using STRICT_ALIGNMENT. + * config/*.h: Change representation of STRICT_ALIGNMENT and + SLOW_UNALIGNED_ACCESS. + * gmicro.h (SLOW_UNALIGNED_ACCESS): Set to 1. + + * Makefile.in (cleanconfig): Remove obsolete reference to + file aux-output2.c. + + * c-lex.c (yylex): Don't make out-of-range shift for very wide chars. + + Fri Mar 6 18:07:00 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * toplev.c (compile_file): No -Wunused warnings for static vars. + + * collect2.c (main): Don't handle -B, -b, -V, -m or -f. + collect2 gets only the options that ld would get. + Process COLLECT_GCC_OPTIONS envvar. + (savestring): New function. + + * genattrtab.c: Revert to previous version + because the new one uses vsprintf and it isn't trivial + to avoid it. + + Fri Mar 6 17:26:09 1992 Tom Wood (wood at dg-rtp.dg.com) + + * m88k.md ( expressions): Don't rely on the assembler being able + to handle constant expressions (Dolphin Triton88 can't). + + * genattrtab.c: Add a hash table mechanism to share RTL and strings. + (attr_hash_add_rtx, attr_hash_add_string): New functions. + (attr_rtx): New function to generate a shared RTL. + (attr_printf, attr_printf): New functions to generate a shared string. + + * genattrtab.c: Extend the treatment of DEFINE_ATTR to allow a CONST + expression as the default value, indicating a constant attribute. + (struct attr_desc): Add `is_const' field. + (check_attr_test): Add `is_const' parameter. Disallow use of insn + attributes and MATCH_OPERAND in a constant expression; allow + SYMBOL_REF in a constant expression. All callers updated. + (chech_attr_value): Allow a SYMBOL_REF as a constant expression. + (convert_const_symbol_ref): New function that converts a constant + SYMBOL_REF to a COND that explictly tests each value. + (make_canonical): Use `convert_const_symbol_ref' for constant + SYMBOL_REF expressions. + (make_length_attrs, find_attr, make_internal_attr): Mark `is_const' + as false. + (gen_attr): Get rid of a top-level CONST node and mark `is_const' true. + (walk_attr_value): Use of a constant SYMBOL_REF does not set + `must_extract' or `must_constrain'. + (write_attr_get): Deal with constant attributes. + + Fri Mar 6 16:14:27 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * cccp.c (main, path_include) [__MSDOS__]: Handle MSDOS syntax in path. + + * expr.c (store_expr): Fix bugs in last change. + + * objc-actions.c (receiver_is_class_object): Fix typos. + + * ecoff-cmp: File deleted. + + * config.sub (3b1): Convert to m68000, not m68k. + + * cccp.c (do_line): Handle "syetem header" indicator flag `3'. + + * t-i386isc: New file. + * configure (i386-*-isc*): Use the new file. + * i386isc.h (LIB_SPEC, ENDFILE_SPEC): Use crtbegin.o/crtend.o. + + Fri Mar 6 14:37:25 1992 Torbjorn Granlund (tege@hal.gnu.ai.mit.edu) + + * expmed.c (expand_dec): Fix comment. + + Fri Mar 6 09:49:54 1992 Tom Wood (wood at dg-rtp.dg.com) + + * m88k.c (emit_move_sequence): Check reload_in_progress in + addition to reload_completed. + + * m88k.md (cpu attribute): Fix. + + Fri Mar 6 06:24:08 1992 Michael Meissner (meissner@osf.org) + + * mips.h (CONST_COSTS): Fix eliminate_constant_term calling + sequence. + + * mips.c (simple_memory_operand): Move offset variable for calling + eliminate_constant_term into a local block by the call. + (mips_address_cost): Ditto. + + * mips.md (movsi_ulw, movsi_usw): Fix eliminate_constant_term + calling sequence. + + Fri Mar 6 00:30:10 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * fixincludes: Don't fix comments on #endif, #else. + It made the egrep string too long. + + * expr.c (store_expr): Handle size mismatch copying from string cst. + + Thu Mar 5 22:11:03 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * objc-actions.c (receiver_is_class_object): Clean up syntax. + + * sun386.h (ASM_GENERATE_INTERNAL_LABEL): Start with a star. + + * reload1.c (reload): Change `=' to `==' in `if' + inside REGISTER_CONSTRAINTS conditional. + + Thu Mar 5 21:29:33 1992 Michael Tiemann (tiemann@mole.gnu.ai.mit.edu) + + * cp-parse.y (yyprint): Make declarations declare __inline + consistently. + + Thu Mar 5 18:34:32 1992 Jeffrey A. Law (law@mole.gnu.ai.mit.edu) + + * m68k.md (dbra patterns): Fix NO_ADDSUB_Q ifdef conditionals. + Fix location of comment regarding use of REG_NOTES in dbra insns. + + Thu Mar 5 18:30:55 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Makefile.in (libgcc.a): If $(LIBGCC1) is empty, ignore it. + * cross-make (LIBGCC1): Make definition empty. + + Thu Mar 5 17:48:38 1992 Torbjorn Granlund (tege@wombat.gnu.ai.mit.edu) + + * reload.c (find_reloads): Correctly detect different operand + constraint alternatives (by changing subscription from 0 to loop + variable i). + + Thu Mar 5 16:58:38 1992 Tom Wood (wood at dg-rtp.dg.com) + + * Makefile.in (libsubdir): Rename $(libdir)/gcc gcc-lib. + * gcc.c (STANDARD_EXEC_PREFIX): Ditto. + + * c-typeck.c: Implement a spelling stack to store and print + compoment names for error messages. + + (push_{string,member_name,array_bounds}): New functions. + (SPELLING_DEPTH, RESTORE_SPELLING_DEPTH, SAVE_SPELLING_DEPTH): New + macros to save and restore the spelling stack. + (digest_init, process_init_constructor): Use these. + + (spelling_length, print_spelling): New functions. + (error_init, pedwarn_init): Use them. + + (get_spelling): New function. + (convert_for_assignment): Use `get_spelling' to interpret messages + that are based on the spelling stack. + (process_init_constructor): Pass `&initialization_message'. + + Thu Mar 5 15:22:22 1992 Jim Wilson (wilson@wookumz.gnu.ai.mit.edu) + + * expr.c (init_expr): Initialize forced_labels to zero. + (save_expr_status): Saved forced_labels away and initilize to + zero. + (restore_expr_status): Restore value of forced_labels. + * function.h (struct function): Add forced_labels field. + * integrate.c (function_cannot_inline_p): Reject function with + nonzero forced_labels. + + Thu Mar 5 15:08:47 1992 Tom Wood (wood at dg-rtp.dg.com) + + * regclass.c (fix_register): Use decode_reg_name. + * stmt.c (expand_asm_operands): Ditto. + * varasm.c (decode_reg_name): Ignore a leading '#'. + + For RMS: + * cp-call.c (build_method_call): Delete now redundant tests of + TREE_EXTERNAL before calls to assemble_external. + * cp-init.c (build_virtual_init, build_builtin_call): Ditto. + * cp-method.c (hack_identifier): Ditto. + * cp-typeck.c (build_component_ref, build_function_call_real): Ditto. + * c-parse.y (primary): Ditto. + + Thu Mar 5 13:49:29 1992 Jeffrey A. Law (law@wombat.gnu.ai.mit.edu) + + * expr.c (move_by_pieces_ninsns): Finish Mar. 4 change. Do not + choose a mode which has a size greater than MOVE_MAX. + + * m68k.c: Change all occurances of "mov." to "move%.l" so that + ASM_OUTPUT_OPCODE can choose the right syntax. + * m68k.md: Change "mov." to "move." in comments for consistency. + + Thu Mar 5 10:04:52 1992 Tom Wood (wood at dg-rtp.dg.com) + + * stmt.c (warn_if_unused_value): Handle NON_LVALUE_EXPR. + + * limits.h (_LIMITS_H_): Correct misspellings. + + * Makefile.in ("if" and "["): Romp, 4.3 BSD, and Ultirx systems + fail when the condition is false. Change troublesome instances to + either use "case" or use '-' as a prefix to the compilation rule. + + Thu Mar 5 09:08:11 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * rs6000.md (lshrdi3): Add earlyclobber to first alternative. + + * explow.c (stabilize): Copy RTX_UNCHANGING_P and MEM_VOLATILE_P. + + Thu Mar 5 06:05:31 1992 Michael Tiemann (tiemann@cygnus.com) + + * cp-parse.y (.pushlevel): Stack and unstack STMT_DECL_MSG. + + * cp-parse.y (unary_expr): Add EXTENSION support. + ({maybe_label,label}_decls, label_decl): Define these rules as from + c-parse.y. + * cp-decl.c ({lookup,shadow,define}_label): Update from c-decl.c. + * gplus.gperf: Add EXTENSION and LABEL. + * cp-hash.h: Remade using gperf. + + Wed Mar 4 21:38:41 1992 Jeffrey A. Law (law@wombat.gnu.ai.mit.edu) + + * expr.c (move_by_pieces): Do not choose a mode which has a size + greater than MOVE_MAX. + + Wed Mar 4 23:24:25 1992 Per Bothner (bothner@cygnus.com) + + * cp-class.c, cp-decl.c, cp-decl2.c, cp-init.c, cp-lex.c, + cp-method.c, cp-typeck.c: Casts from enum to int that + are necessary (not alas not quite sufficient) to get + cc1plus to compile using system cc on Sony NewsOS 3.2 + (presumably Portable C Compiler). + + Wed Mar 4 22:05:39 1992 Michael Tiemann (tiemann@cygnus.com) + + * cp-type2.c (build_functional_cast): Fix typo in code searching + down type lattice looking for constructor. + + Wed Mar 4 16:52:21 1992 Jim Wilson (wilson@cygnus.com) + + * gstdarg.h: Include va-sparc.h on sparc systems. Delete now + obsolete `#ifndef __sparc__'. + * va-sparc.h (va_start): Provide alternate definition when + included via stdarg.h. Delete obsolete comment. + (va_arg): Add missing set of parentheses. + + Wed Mar 4 15:21:20 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * fixincludes: Make egrep pattern more general. Check for + additional special case problems in Ultrix, News-OS, and IRIX. + + Wed Mar 4 15:15:45 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.c (function_epilogue): Don't make a special case for + current_function_returns_struct: this is done via + current_function_pops_args. + + * sun386.h (DATA_SECTION_ASSM_OP): Fix typo in undef. + + Wed Mar 4 14:21:37 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * fixincludes, fixinc.svr4: Only change #else and #endif at the + beginnings of lines, aside from whitespace, so it doesn't change + them within comments. + + Wed Mar 4 09:48:21 1992 Michael Tiemann (tiemann@mole.gnu.ai.mit.edu) + + * cp-method.c (build_decl_overload): Braino in handling of DELETE + (NEW was handled correctly). + + Wed Mar 4 09:14:57 1992 Jeffrey A. Law (law@wombat.gnu.ai.mit.edu) + + * Makefile.in (install-man): Install the g++ manual page. + + * m68k.md (dbCC peepholes): Two new peepholes to recognize cases + where a compare/branch can be done (for free) as part of a dbCC + insn. This turns jCC;dbf into dbCC;jCC (the jCC is now outside the + inner part of the loop). + + * m68k.c (valid_dbcc_comparison_p): New function which returns TRUE + if the given comparison is a valid comparison operator for the dbCC + instruction. + (output_dbcc_and_branch): New function to output a dbCC;jCC + instruction sequence (including possible counter adjustments in + SImode) + + Wed Mar 4 04:32:11 1992 Michael Tiemann (tiemann@cygnus.com) + + * cp-dem.c (optable): Add entry for `operator='. + + * cp-decl.c (finish_function): Emit a jump to RETURN_LABEL if + CLEANUP_LABEL is non-zero. (Suggested by niklas@appli.se) + + Wed Mar 4 04:28:10 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * libgcc1.c (perform_lesf2): Condition tested was backwards. + + Wed Mar 4 03:11:48 1992 Ken Raeburn (Raeburn@Cygnus.COM) + + * cp-pt.c (overload_template_name): Extra pushlevel isn't needed; + omit it. + (undo_template_name_overload): Don't pop the level that isn't pushed + any more. + + * cp-class.c (pushclass): Don't bother processing unnamed tags. + (popclass): Likewise. + + * cp-init.c (build_vec_delete): If pointer is null, don't do + anything. + + * cp-parse.y (member_init): Accept base class names that are + template type names. + + * cp-decl.c (start_decl): Don't prepend decl of `this' to arg lists + of methods of uninstantiated types. + + * cp-pt.c (instantiate_template): If no text has been saved away, + don't try to parse it; an external reference will result. + + * cp-parse.y (yyprint): Declare this at head of file. + + * cp-pt.c (instantiate_class_template): If the template specified + hasn't been defined, don't reject the instantiation; make it a + normal undefined type. + + * cp-parse.y (template_def): Try to recover from errors more + gracefully. + + Tue Mar 3 15:37:35 1992 Tom Wood (wood at dg-rtp.dg.com) + + * protoize.c (munge_compile_params): Compute the maximum number of + params (`temp_parms' length) safely. + + * dwarfout.c (const_value_attribute): Punt quasi-constant values. + (location_or_const_value_attribute): Ditto. + + * Makefile.in (install-common): Install the cross compilation + driver program even when $(tooldir)/bin doesn't exist. + + Tue Mar 3 14:39:55 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.h (enum reg_class): Undo Jan 17 change that deleted class BREG. + (REG_CLASS_NAMES,REG_CLASS_CONTENTS,REGNO_REG_CLASS): Likewise. + (REG_CLASS_FROM_LETTER): Likewise. + * i386.c (regclass_map): Likewise. + + * svr4.h (LINK_SPEC): Don't do -z or -t here: it's already in + link_command_spec. But do handle -G. + + * i386.md (casesi): Rewrite pattern to reflect the way to emitted + code actually works. + + Tue Mar 3 09:59:15 1992 Jeffrey A. Law (law@super.super.org) + + * m68k.md (dbra pattern in HImode): New pattern to match + decrement_and_branch insns when the loop counter is decremented in + HImode. + + Tue Mar 3 07:57:18 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * rs6000.md (doz patterns): Add missing `I' constraint. + + * reorg.c (mark_target_live_regs): A CALL_INSN livens all global regs. + + * vax.h (EXTRA_CONSTRAINT): New macro to select non-mode-dependent + MEM operands. + * vax.md (jlbc/jlbs): Use jbc/jbs if mode-dependent memory. + * vax.c (reg_or_nxmem_operand): Function deleted. + + * expr.c (do_store_flag): Swap comparison code when putting + constant arg second. + + * m68k.md (addhi3): Convert, e.g., 65535 to -1 before seeing if + we can use subqw. + (addqi3): Similarly for QImode constants + + * local-alloc (optimize_reg_copy_1): Renamed from optimize_reg_copy. + (optimize_reg_copy_2): New function. + (update_equiv_regs): Call optimize_reg_copy_[12]. + + * combine.c (make_compound_operation, case AND): Turn SUBREG case + back on now that bug in i386.md has been fixed. + (simplify_comparison, case ASHIFT): If shifting low-order bit to + sign bit and doing equality comparison, convert to AND with low-order + bit (inequality case was already handled). + Also remove redundant test of CONST_OP in an earlier case. + + * sun2o4.h (LINK_SPEC): No longer need -Bstatic with -g. + + * m68k.c, m68k.h: Avoid %X% for most upper-case X since it means + something special to SCCS. + + * rs6000.md (type): Add new type, mtlr. + (function_unit branch): Add delay from mtlr to br. + (movsi): When moving to lr, type is "mtlr". + + * unroll.c (reg_dead_after_loop): Check for infinite loop by + counting JUMP_INSNs we follow. + Use GET_RTX_CLASS, reg_referenced_p, and single_set. + + * expr.c (expand_increment): Set op0_is_copy when we are referencing + the low-order part of some value in a register. + + * combine.c (force_to_mode): New arg REG; pass in recursive call. + If X has the same value as REG, use REG. + (make_field_assignment): Handle case when DEST and part of source + aren't the same, but are equal; pass destination to force_to_mode. + + * m68k.md (addhi3): Generate addqw, subqw, or addw for + STRICT_LOW_PART versions the same way we handle the normal case. + (addqi3): Similarly for addqb, subqb, and addb. + + * genattrtab.c (write_test_expr, case MOD): Double `%' in printf call. + (write_eligible_delay): Internal attribute "*delay_type" is always + used literally; it has no suffix or prefix. + + * m68k.md, vax.md (sob): Rewrite inequality versions so that they + have a PLUS inside the comparison; combine cannot remove the PLUS + due to overflow considerations. + + Tue Mar 3 07:56:30 1992 Eric Youngdale (youngdale at v6550c.nrl.navy.mil) + + * vms.h (L__main): Remove #include + + * make-gcc.com: Call make-l2.com. + + Tue Mar 3 05:37:08 1992 Michael Tiemann (tiemann@cygnus.com) + + * stor-layout.c (layout_type): Handle OFFSET_TYPE. + * cp-tree.c (build_member_type): Deleted. + * cp-typeck.c, cp-decl.c, cp-init.c: All callers of + `build_member_type' now call `build_offset_type'. + * cp-typeck.c (convert_arguments): An argument that's an OFFSET_REF + must be resolved by `resolve_offset_ref'. The OFFSET_REF case in + expand_expr does not do the right thing for G++ yet. + + * cp-decl.c (grokdeclarator): Take CONSTP and VOLATILEP into account + when building METHOD_TYPEs. + (start_function): Ditto. + + * cp-method.c (build_decl_overload): Change interface to take DNAME + instead of NAME. Also, special-case handling of the default + operator new and operator delete for the std. signatures. + * cp-*.c: All callers changed. + + * cp-class.c (build_vtable_entry): Rewrite built-in limit check to + work on platforms where SIZETYPE is unsigned. + + Mon Mar 2 08:49:16 1992 Tom Wood (wood at dg-rtp.dg.com) + + * m88k.c (m88k_debugger_offset): Delete warning. + + * m88k.h (OVERRIDE_OPTIONS): Set `m88k_cpu' based on `target_flags'. + + * m88k.md (cmpsi insn): Delete alternative that complements the + compare string for a swapped compare (it's wrong and unnecessary). + (cpu attribute): Define. + + From Jyrki Kuoppala: + * pc532.h, pc532-mach.h, pc532-min.h, xm-ps532-min.h: New files. + * configure (ns32k-pc532-mach*, ns32k-pc532-minix*): New alternatives. + + * dbxout.c (dbxout_type): Don't invoke dbxout_type_methods if + there are none. + + * vax.c (print_operand_address): Allow REG+TERM. + + * c-typeck.c (process_init_constructor): Reuse space for error + message strings. + + Mon Mar 2 02:54:48 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * seq386gas.h: New file, for Sequent using 386 & GAS. + + * xm-i386sco.h: New file. + + * optabs.c (ldexp): New function. Used if host ldexp() is broken. + + * configure (i386-sequent-bsd*): Use seq386gas.h if --gas. + (i386-*-sco*): The host file is now xm-i386sco.h. + + * i386.md (SImode and HImode logical compare): If we are only + testing one byte of a mem, use a byte test opcode. + (bit test patterns): Likewise when emitting test opcodes. + + Sun Mar 1 14:47:31 1992 Torbjorn Granlund (tege@hal.gnu.ai.mit.edu) + + * longlong.h (_IBMR2 udiv_qrnnd): Switch off due to overflow problems. + + Sun Mar 1 11:19:55 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * combine.c (force_to_mode): New function. + (make_field_assignment): Rework code that handles fixed-position + fields to make it both much more general and much simpler. + + * m68k.md: Add missing insns for using byte operations with + STRICT_LOW_PART; add was missing commutative equivalent and + most operations other than add and subtract were missing. + + * varasm.c (assemble_start_function): Add missing arg to call to + dbxout_begin_function. + + * fold-const.c (const_binop): Make minor source change to work + around bug in IBM RT PC compiler. + + Sun Mar 1 05:01:34 1992 Michael Tiemann (tiemann@rtl.cygnus.com) + + * cp-typeck.c (build_modify_expr): When wrapping NEWRHS in a + SAVE_EXPR, call `break_out_cleanups' first. + + Sat Feb 29 23:19:20 1992 Jim Wilson (wilson@cygnus.com) + + * reload.c (find_reloads): Reset preferred_class to NO_REGS after + substituting a reg_equiv_address for a pseudo reg. + + * unroll.c (precondition_loop_p): Fix misplaced paren when checking + for MODE_FLOAT rtx. + + Sat Feb 29 13:59:54 1992 Michael Tiemann (tiemann@cygnus.com) + + * cp-typeck.c (build_modify_expr): To complete 24 Feb change, + COND_EXPRs must evaluate LHS in conditional slot if LHS has side + effects. Otherwise the SAVE_EXPRs in lhs will only be evaluated + once, even though they are referenced on both branches of the + conditional. + + Sat Feb 29 13:32:35 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * README.X11: Add warning to not use gas when compiling PIC code. + + * fixincludes: Allow TAB as well as SPC before symbols to change. + Don't change "sun" if it's part of a multiword name that contains + underscores. + Make intermediate dir, if needed, when doing special-case fixes. + Use previously fixed file, if it exists, as source for all special + fixes. Do less copying when making special fixes. + Ignore errors when chmod'ing a file that might not exist. + * fixinc.svr4: Preserve whitespace around "#" when fixing #else and + #endif. + Allow TAB as well as SPC before symbols to change. + Combine "sun" cases as in fixincludes. + + Sat Feb 29 11:10:55 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.md (movstrsi): Print opcode as "movsl" so that seq386.h can + change it into smovl. + + Sat Feb 29 09:15:51 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * function.c (expand_function_end): Allocate rtl that points to + trampoline permanently. + + * reload1.c (gen_input_reload): If one operand of a PLUS is a MEM, + move it into a reg and add the other (makes code agree with comments). + + * explow.c (eliminate_constant_term): Rework so it does not directly + add integer values; call simplify_binary_operation instead. + Second arg is now pointer to rtx, not int. + Assume constant is always second operand of PLUS. + (memory_address): Pass rtx pointer to eliminate_constant_term. + * halfpic.c (half_pic_address_p): Likewise. + * mips.c (simple_memory_operand, mips_address_cost): Likewise. + (mips_debugger_offset): Likewise. + * expr.c (expand_expr, case PLUS_EXPR): Likewise. + Don't add INTVALs; use simplify_binary_operation instead. + Remove obsolete OLD_INDEXING code. + Put a MULT in the first operand of the PLUS. + + * combine.c (combinable_i3pat): Don't combine if I3DEST is a hard + reg in a non-valid mode. + + Sat Feb 29 09:14:19 1992 Eric Youngdale (youngdale@v6550c.nrl.navy.mil) + + * vms.h (ASM_OUTPUT_COMMON): Use SIZE instead of ROUNDED bytes. + (DO_GLOBAL_CTORS_BODY): Do not call fflush(stdout). + + * gcc.texi: Update GLOBAL[DEF,REF,VALUE] documentation. + + * make-l2.com: Remove call to test_gcc2. + + Sat Feb 29 02:52:59 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * cccp.c (main): Rename envvars to CPLUS_INCLUDE_PATH and + OBJCPLUS_INCLUDE_PATH. + + * m68k.h (TRANSFER_FROM_TRAMPOLINE): Use `move', not `mov'. + + Fri Feb 28 19:39:09 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * fixincludes: Don't change symbols that already start with `_' + into `__symbol__'. Merge all of the sun* substitutions so they + don't fight each other. + Comment out junk after #elses and #endifs, to prevent warnings + when -pedantic is given. + + Fri Feb 28 13:42:05 1992 Jim Wilson (wilson@cygnus.com) + + * sched.c (schedule_insns): Don't update value of reg_live_length + when it is negative, because negative values are special. Earlier + fix Dec 17 disabled the fprintf call, but not the assignment. + + * unroll.c (copy_loop_body): After incrementing the base reg for a + split DEST_ADDR giv, must subtract the const_adjust from the base + reg to get its true current value. + + * loop.c (maybe_eliminate_biv_1): When handling COMPARE, verify + that mult_val is positive, which makes the code match the comment, + and surrounding code. + + * sparc.c (legitimize_pic_address): Always test reload_completed + in addition to reload_in_progress. + + * sched.c (schedule_block): Don't reorder any USE insns at the end + of a function. Exclude them all from scheduling. + + * c-typeck.c (build_array_ref): Check for when `ar' is an + error_mark_node and don't emit a second error message for that node. + + * Makefile.in: Correct misc typos in comments or spacing. + (mostlyclean): Update names of files to delete. + + * Makefile.in (install-man): Also install cccp man page. + (uninstall): Also delete cccp man page. Don't delete protoize and + unprotoize man pages twice. + + * Makefile.in (libgcc2.a): Delete unnecessary -fstrength-reduce -O + flags on gcc command lines, superseded by LIBGCC2_CFLAGS. + + * Makefile.in (config.status): Verify that file does not exist + before printing an error and failing. Prevents problem with Sun's + KEEP_STATE feature. + + Fri Feb 28 05:15:58 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * stmt.c (expand_computed_goto): Call emit_queue. + + * function.c (assign_parms): Don't generate convert whose operand + is register that is not valid in its mode. + + * reload.c (find_reloads_toplev): Don't do anything with paradoxical + SUBREGs if BYTE_LOADS_ZERO_EXTEND. + + Thu Feb 27 09:59:09 1992 Jeffrey A Law (law at b115.super.org) + + * toplev.c (main): Enable caller-saves for all machines at + optimization levels of -O2 or higher. + * mips.h (OPTIMIZATION_OPTIONS): toplev.c will turn on + caller-saves at -O2 now. Do not do it here. + * sparc.h (OPTIMIZATION_OPTIONS): Likewise + + Thu Feb 27 06:47:31 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * cp-call.c: Move some extern declarations to file level. + + * emit-rtl.c (init_emit_once): Cast VOIDmode to int in array index. + + * reorg.c (mark_target_live_regs): Don't make recursive call if + function being compiled has infinite loop. + + * cse.c (fold_rtx, case 'o'): New case to support folding LO_SUM. + + * global-alloc.c (global_alloc): When calling reload, pass the + result of get_insns instead of basic_block_head[0]. + + * c-typeck.c (process_init_constructor): Don't check array index + against limits if array bounds weren't specified. + + * gcc.c (link_command_spec): Put back -s. + + * gcc.c (find_a_file): Add missing paren in init of file_suffix. + + * i386sun.h (LIB_SPEC): Insert missing blank. + + * sun386.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Add #undef. + + * sparc.h (LINK_SPEC): Correct comment. + + * sun3.h, i386sun.h (LINK_SPEC): Don't force -Bstatic if -g. + + * mips-news.h (ASM_SPEC): Add missing "}". + + * Makefile.in (install-native): Don't include install-proto. + (.y.c): Suppress default rule for using Yacc. + + * combine.c (apply_distributive_law, case SUBREG): Check that word + numbers are the same. + Don't change a single-word operation into a multi-word operation. + Put all checks on SUBREGs in one place. + (gen_lowpart_for_combine): Use correct word number when making + explicit SUBREG. + + * README.SCO: Obsolete file deleted. + + Wed Feb 26 21:23:02 1992 Jim Wilson (wilson@cygnus.com) + + * sparc.md (DImode sethi): Correctly handle CONST_DOUBLE, was + wrong endian. + (DImode lo_sum): Don't output CONST_DOUBLES as 64 bit constants, + just output the low 32 bits. + + * unroll.c (find_splittable_givs): For combined address givs, save + the increment amount in add_val. + (copy_loop_body): For combined address givs, increment by the + amount calculated by find_splittable_givs, not by the amount that + the giv it was combined with gets incremented by. + + * expr.c (clear_pending_stack_adjust): Check flag_no_inline, not + optimize, to determine whether functions declared inline will be + inlined. + + * dbxout.c: Delete all #ifndef DBX_DEBUGGING_INFO stubs. None of + them are needed. + + * hp800.c, hp800.h: Fix typos in comments. + + Wed Feb 26 02:39:52 1992 Michael Tiemann (tiemann at rtl.cygnus.com) + + * cp-call.c (build_method_call): If conversion of INSTANCE_PTR + yields error_mark_node, return error_mark_node immediately. + + Tue Feb 25 23:40:01 1992 Mike Stump (mrs at cygnus.com) + + * tree.c (array_type_nelts): Fix documentation, really nelts-1 + * cp-tree.c cp-tree.h cp-init.c (expand_vec_init): Fixed + multi-dimensional array inits. + + Mon Feb 24 00:03:23 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-tree.c (build_cplus_new): Set TREE_SIDE_EFFECTS bit on + NEW_EXPR. + + * cp-typeck.c (build_modify_expr): Handle WITH_CLEANUP_EXPRs + specially when they appear in expressions (not initializations). + Also handle COND_EXPRs on the right-hand-side specially (in case one + of the COND_EXPR's branches is a WITH_CLEANUP_EXPR). + + Sun Feb 23 15:11:27 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-decl2.c (finish_anon_union): Make RTL for ANON_UNION_DECL based + on MAIN_DECL. + + * cp-decl.c (lookup_tag): Deal with the fact that `clear_anon_tags' + may have been run. + + * cp-decl.c (cplus_expand_expr_stmt): Give line number for usage + whcih incurs warning message. + + Sat Feb 22 02:09:55 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Version 2.0 released. + + * gcc.c (do_spec_1): Handle SPACE_AFTER_L_OPTION. + * hp320.h (SPACE_AFTER_L_OPTION): Defined. + Note: for 2.1, try making a space there on all systems. + + * i386mach.h (perform_*): New macros, copied from i386rose.h. + + * Makefile.in (distclean): New target. + (realclean): Avoid duplication with self or with distclean. + (gcc.xtar.Z): Depend on gcc.xtar. + (gcc.xtar): Fixes in copying files. + + * expr.c (do_store_flag): Don't correct CODE before where it is set. + + * cp-parse.y (stmt): Pass pushcase_range all the args it wants. + + Fri Feb 21 18:14:52 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * combine.c (distribute_notes): Correctly handle the case of a + REG_DEAD note for a multi-word hard register when not all of + the words are used. + + Fri Feb 21 16:47:32 1992 Michael Meissner (meissner@osf.org) + + * mips.h (MIPS_VERSION): Change Meissner version # to 12. + (half_pic support): Move the halfpic support to halfpic.h which is + included in the decrose case, and nop the support in other MIPS + platforms. + (OPTIMIZATION_OPTIONS): Move setting caller-saves to -O2. + (OBJECT_FORMAT_COFF, EXTENDED_COFF): Define unless OSF/rose. + (INITIAL_FRAME_POINTER_OFFSET): Always recalculate the frame size, + don't rely on cached values. + + * mips.c (half_pic support): Move the halfpic support to halfpic.c, + which is only compiled for OSF/rose. + (expand_block_move): Use copy_addr_to_reg instead of copy_to_reg in + case either the source or destination is an integer constant + converted to an appropriate pointer type. + (mips_debugger_offset): Use a local variable to hold function + result. + + * decrose.h (toplevel): Include halfpic.h for halfpic support. + (PTRDIFF_TYPE): Change to 'int' to match current include files. + (WCHAR_TYPE): Change to 'unsigned int' to match include files. + (INIT_SECTION_ASM_OP): Delete, since the OSF/rose assembler doesn't + support a true initialization section. + + * encrose.h (PTRDIFF_TYPE): Change to 'int' to match current include + files. + (WCHAR_TYPE): Change to 'unsigned int' to match include files. + + * t-decrose (EXTRA_OBJS): Define as halfpic.o to provide halfpic + support. + (CONFIG2_H): Treat halfpic.h as another config file. + (halfpic.o): Add dependencies. + + * halfpic.h (new file): Common include file for systems needing the + OSF/rose half-pic shared library support. + + * halfpic.c (new file): Common support file for systems needing the + OSF/rose half-pic shared library support. Currently these are stub + functions. + + Fri Feb 21 01:34:08 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * dwarfout.c (location_or_const_value_attribute): Use DECL_RTL again. + Seems to be safer for the moment. + * function.c (instantiate_decls): Don't instantiate DECL_INCOMING_RTL. + + * dwarfout.c (output_mem_loc_descriptor): Handle CONST like SYMBOL_REF. + + * collect2.c (errno): Declare if not macro. + + * dbxout.c [MIPS]: Include gstab.h, not stab.h. + + * dbxout.c (dbxout_symbol): No longer flush leading _ for C++ syms. + + * cp-parse.y (.hush_warning): Set $$. + + * gstdarg.h: Handle _HIDDEN_VA_LIST as in gvarargs.h. + + Thu Feb 20 07:41:29 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * vax.c (reg_or_nxmem_operand): New function. + (split_quadword_operands): Add missing return type (void). + * vax.md (jlbc/jbc/jlbs/jbs): Handle QImode operands properly. + + * caller-save.c (set_reg_live): Use mode of SUBREG to see how many + hard regs are written. + + * combine.c (simplify_shift_const, case IOR, AND, XOR): Perform + logic computation in RESULT_MODE, not mode of VAROP. + + Wed Feb 19 18:32:05 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * hp320.h (PRINT_OPERAND): Support codes '$' and '&'. + + * reload1.c (reload): Add cast of enum in index. + + * vms.h (CPP_PREDEFINES): Define __GNUC__ as 2. + + Wed Feb 19 21:43:36 1992 Ron Guilmette (rfg at ncd.com) + + * dwarfout.c (output_mem_loc_descriptor): Deleted useless blank line. + (output_mem_loc_descriptor) Added code to handle CONSTs in DECL_RTL + expressions. + (dwarfout_finish): Added code to put a null string at the end of + the terminating .debug_macinfo section. + + Tue Feb 18 18:34:13 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) + + * cccp.c (main): Fix typo in comment or spacing. + * dbxout.c (dbxout_block): Likewise. + * expr.c (convert_move): Likewise. + * reload1.c (emit_reload_insn): Likewise. + * rtl.h (REG_NOTES): Likewise. + * sun4o3.h: Likewise. + * ultrix.h (CPP_PREDEFINES): Likewise. + * toplev.c (flag_no_common): Likewise. + * stmt.c (layout_type): Likewise. + * gcc.c (is_linker_dir, lookup_compiler): Likewise. + + * sched.c (schedule_block): Comment code handling USE insns as + obsolete. + + Tue Feb 18 14:44:49 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c++: Run gcc in same dir as c++ was in, if exists there. + Use `exec' to run it. + New var `havefiles'; special message if no input files specified. + Pass through any unrecognized options. + + * g++: Now a link to c++. + + Tue Feb 18 04:54:52 1992 david d [zoo] zuhn (zoo at lynx.spa.umn.edu) + + * protoize.c (main): added support for -p flag, to specify which + gcc is the one to call for -fgen-aux-info support. + + Tue Feb 18 07:29:23 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * combine.c (try_combine): Don't clobber OTHER_INSN's PATTERN if + we aren't able to change the insn. + + * romp.md (bit_insv): Add missing CLOBBER when making pattern to + match mftb; likewise for the DEFINE_INSN. + + Tue Feb 18 01:03:41 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * rs6000.h (bss_section): Set `in_section' correctly. + + * expmed.c (synth_mult): Count second shift for alg_compound. + Count extra shift for lea case. + * m68k.h (RTX_COSTS): Reduce cost of multiply. + + * function.c (instantiate_decls): Instantiate DECL_INCOMING_RTL. + + Mon Feb 17 19:17:50 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * a29k.md (divmodsi4, udivmodsi4): Don't use reg 180 explicitly. + Instead use 'q' constraint letter. + + Mon Feb 17 16:15:02 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * global-alloc.c (global_alloc): Always call `reload'. + + Mon Feb 17 10:38:38 1992 Jim Wilson (wilson at sphagnum.cygnus.com) + + * a29k.md (movdi define_split): Use DImode in operand_subword + calls, not DFmode. + + Mon Feb 17 08:20:33 1992 Michael Tiemann (tiemann at mole.gnu.ai.mit.edu) + + * varasm.c (assemble_external): Check that DECL is some sort of + _DECL before referencing its DECL_RTL. + + Sun Feb 16 13:05:36 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-call.c (build_method_call): Add call to `assemble_external' in + case this is the first use of FUNCTION. + * cp-class.c (build_vfn_ref): Ditto for VTBL. + * cp-decl2.c (write_vtable_entries): Ditto for FN. + * cp-init.c (build_offset_ref): Ditto for T. + * cp-typeck.c (build_function_call_real): Ditto for FUNCTION. + * cp-method.c (hack_identifier): Ditto for VALUE. Also remove + action that made call to `assemble_external' when !TREE_USED (VALUE). + + * cp-lex.c (do_identifier): Remove call to `assemble_external' when + implicitly declaring ID. + + * cp-parse.y (primary): Simplify rules for calling assemble_external. + + * cp-decl.c (finish_function): For destructors, don't call + expand_expr_stmt if EXPRSTMT is VOID_ZERO_NODE. + + Sun Dec 16 23:31:54 1992 Ron Guilmette (rfg at ncd.com) + + * dwarfout.c (fundamental_type_code): Deleted gunk for handling + OFFSET_TYPEs. (They are *not* fundamental types). + (fundamental_type_code): Fixed typo. + (location_attribute, const_value_attribute): Changed to take one + rtx parameter rather than one tree parameter. + (location_or_const_value_attribute): Changed to use DECL_INCOMING_RTL + rather than DECL_RTL for formal parameters. Also changed calls to + location_attribute and const_value_attribute to provide the rtl + parameter. + (fund_type_attribute): Changed to accept an actual fundamental type + code as a parameter directly. Also changed all calls correspondingly. + (type_attribute): Separated tests for ERROR_MARK and for VOID_TYPE + and added comments. + (output_unspecified_parameters_die): Changed to take one tree param + and to generate *both* an AT_name and an AT_type attribute when the + input parameter represents of function definition. Also adjusted + all calls correspondingly. + + Sun Feb 16 00:54:10 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * fixincludes: Add #ifndef around size_t declaration in types.h. + + * varasm.c (assemble_external): Do nothing if arg isn't a decl. + + * Makefile.in (cp-parse.c): Update "expect" msg. + + * next.h (CPP_SPEC): Rename -bsd to -strict-bsd. + + * Makefile.in (mostlyclean): Add ld, mips-tfile, mips-tdump. + + * protoize.c (directory_specified_p): Don't match files in subdirs. + + * xm-rs6k-m.h: Renamed from xm-rs6000-mach.h. + * configure (rs6000-*-mach*): Changed accordingly. + + * collect2.c (handler): No error msg here. Just resend signal. + (write_c_file): Arg to write_list... is pointer. + (do_wait): Fix typo. + (scan_prog_file for non-OSF): Preserve all underscores. + + * Makefile.in (install-collect2): Install gcc in libsubdir. + + Sat Feb 15 15:26:03 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * varasm.c (decode_reg_name): Empty string is not a reg number. + + * fold-const.c (merge_component_references): NE tests against + mismatched constants forces 1, not 0, as value. + + * i386gas.h (ASM_OUTPUT_OPCODE): Convert repz to repe. + + * collect2.c: Get rid of PROTO macro; use non-prototype decls. + Don't include gstddef.h (had conflicts). Use gstdarg.h, not stdarg.h. + (xcalloc, xmalloc): Add casts. + (do_wait): Avoid macros WTERMSIG, WEXITSTATUS missing on some machines. + + * cp-typeck.c (default_conversion): Don't use initial value if BLKmode. + + * objc-actions.c (finish_objc): Fix typos in last change. + + * c-aux-info.c, dbxout.c, cccp.c (errno): Declare, if not a macro. + + * i386.md (QI bit test recognizer): Split into separate patterns + for memory and register args. Make a scratch reg for memory. + + Fri Feb 14 23:39:58 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * tree.c (get_identifier): Improve -Wid-clash message. + + Fri Feb 14 16:22:48 1992 Michael Collison (collison at osf.org) + + * i386rose.h (CPP_SPEC): Define the macros LANGUAGE_OBJECTIVE_C and + LANGUAGE_C_PLUS_PLUS if we are compiling Objective C or C++. + (INIT_SECTION_ASM_OP): Define as .init. + (CC1PLUS_SPEC): Define it. + (LINK_LIBGCC_SPECIAL): Define this to work around linker bug. + + Fri Feb 14 00:38:15 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Makefile.in (protoize.o, unprotoize.o): g++-include is under libdir. + + * Makefile.in (enquire.o): Make the command one long line. + + * gcc.c (do_spec_1): Omit relative prefixes from -L'ing + only if RELATIVE_PREFIX_NOT_LINKDIR is defined. + * rs6000.h (RELATIVE_PREFIX_NOT_LINKDIR): Defined. + + * varasm.c (assemble_external): Test TREE_EXTERNAL. + + * jump.c (follow_jumps): If can't find chain end, return orig label + + * mot3300.h (PRINT_OPERAND): Always print 16 hex digits for a double. + + * objc-actions.c (build_module_descriptor) [NEXT_OBJC_RUNTIME]: Ret 0. + (finish_objc): Value 0 from build_module_descriptor means no ctor. + When referencing a class_name symbol, don't output a .globl for it. + (finish_objc): Put artificial refs in text section. + + * cccp.c (pedwarn_with_file_and_line): Handle -w, -W. + + Fri Feb 14 07:44:08 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.c (notice_update_cc): sCOND opcodes don't change the flags. + Don't record test or compares involving stack-like regs, since + final can't omits tests or compares involving such regs correctly. + + * i386.c (seq,sne,beq,bne): These opcodes use the state of + cc_status from before the curren insn. + + * reg-stack.c (stack_reg_mentioned_p): Don't make static. + + Fri Feb 14 06:27:48 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * jump.c (jump_optimize): Disable "if (...) {... x = C;} if (x) ..." + optimization; there doesn't seem to be a way to fix it. + + Thu Feb 13 18:06:06 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * seq386.h (ASM_OUTPUT_OPCODE): New macro. Change "movs" into + "smov" at the start of a string move mnemonic - Sequent as(1) + doesn't handle the former. + + Thu Feb 13 17:21:26 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-decl.c (finish_struct): Use pedwarn for pedantic warning. + (grokdeclarator): Likewise. + * c-parse.y (component_decl_list2): Likewise. + + Thu Feb 13 22:11:36 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * combine.c (make_extraction): Default modes to byte and register + size, as appopriate, when the bitfield insn doesn't exist. + + * a29kunix.h (LINK_SPEC): Pass default option file to gld. + (LINK_LIBGCC_SPECIAL): Define to work around gld bug. + + * explow.c (copy_to_suggested_reg): Try getting mode from TARGET. + + * rs6000.h (ASM_FILE_END): New macro. + (EXTRA_SECTIONS): New section read_only_private_data. + (EXTRA_SECTION_FUNCTIONS): New function read_only_private_data_section. + (SELECT_RTX_SECTION): Always make non-toc data private, read-only. + (SELECT_SECTION): Put read-only data in appropriate sections. + + * jump.c (jump_optimize): Place branch in correct place when + optimizing "if (...) {... x = C;} if (x) ...". + (redirect_jump): Ensure jump's UID is within range of jump chain. + + * a29k.c (output_prologue): Correctly set LR1 when more than 64 + registers are needed. + + Wed Feb 12 22:22:46 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) + + * make-cccp.com: Define link as a local symbol to avoid + possible conflict with a user defined global symbol. + + * make-cc1.com: Likewise. + + Thu Feb 13 11:05:07 1992 Michael Meissner (meissner at osf.org) + + * mips.c (make_temp_file): Store created filename into a static + file-scope variable, not an auto. + (mips_asm_file_end): Use the appropriate filename in printing + errors. + + Thu Feb 13 01:15:00 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * cccp.c (skip_if_group): Skip comments after the #. + + * cccp.c (macarg): Don't assume stringify will compress spaces. + (macroexpand): In stringify, compress space only outside tokens. + + * cexp.y (exp1): Use pedwarn for comma in #if. + + * cp-decl.c (push_binding_level, pop_binding_level): + Change `inline' to `__inline'. + + * combine.c (make_compound_operation): Undo previous change. + + Wed Feb 12 18:47:47 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * function.c (instantiate_virtual_regs_1, case IF_THEN_ELSE): + Don't special case; allow all operands to be processed. The last + two operands are nontrivial on the Vax. + + Wed Feb 12 18:58:48 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * gcc.c (do_spec_1): Only absolute prefixes turn into -L's. + (link_command_spec): Handle LINK_LIBGCC_SPECIAL. + + Wed Feb 12 18:38:29 1992 Chris Smith (csmith at convex.com) + + * convex.h (DEFAULT_CALLER_SAVES): define again, bug is fixed. + * convex.h (BRANCH_COST): Define as 0, so we won't use complex + alternatives to branches (whose expansions contain branches + on convex). + + Wed Feb 12 17:23:57 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config.sub: Accept just `hppa' for machine. + + * Makefile.in (Install-collect2): New target. + + Wed Feb 12 13:55:24 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * reorg.c (relax_delay_slots): Don't convert jump to return here. + + * configure (a29k-ultra-*): Deleted. + (a29k-*-bsd*): Merged with a29k-ultra-*. + (romp-*-mach*): Fixed typo in xmake_file name. + * xm-a29kunix.h: Renamed from xm-a29k-ult.h. + * x-a29kunix: New file. + + * reload.c (find_reloads): Don't use class from preference if it + is a single-register class. + + Wed Feb 12 13:03:16 1992 Tom Wood (wood at dg-rtp.dg.com) + + * m88k.h (FUNCTION_BOUNDARY, ASM_OUTPUT_ALIGN): Pack code tightly + when compiling crtstuff.c (flag_inhibit_size_directive). + + Wed Feb 12 10:34:09 1992 Michael Meissner (meissner at osf.org) + + * decrose.h (*_SPEC): Compress some whitespace in the specs. Also, + simpify which LANGUAGE_xxx names are defined, to be the ones uses by + the system(s). + * decstatn.h (*_SPEC): Likewise. + * iris.h (*_SPEC): Likewise. + * mips.h (*_SPEC): Likewise. + * mips-bsd.h (*_SPEC): Likewise. + * mips-news.h (*_SPEC): Likewise. + * mips-sysv.h (*_SPEC): Likewise. + + Wed Feb 12 10:34:09 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * caller-save.c (insert_save_restore): Properly check for insns that + reference CC0. + + Wed Feb 12 03:17:00 1992 Chris Smith (csmith at convex.com) + + * convex.h (DEFAULT_CALLER_SAVES): don't define, to sidestep a bug. + * convex.md (ffssi2): Comment out. + + Wed Feb 12 00:08:42 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) + + * make-libgcc2.com: Do not save .s file. + + * vms.h: Wrap #include in #ifdef L__main/endif + + Tue Feb 11 21:58:42 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) + + * libgcc2.c (DO_GLOBAL_DTORS_BODY): New macro. + + * make-l2.com: New file to build libgcc2 on VMS. + + * vms.h (DO_GLOBAL_CTORS_BODY): Replacement definition. + + * vms.h (DO_GLOBAL_DTORS_BODY): Likewise. + + * make-cccp.com: Define bison and rename as local symbols to avoid + possible conflict with user defined global symbols. + + Tue Feb 11 22:17:32 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * sched.c (attach_deaths): Don't treat PIC offset table register + specially; flow.c doesn't. + + * combine.c (make_compound_operation, case AND): We can have + a (and (subreg (lshiftrt ..) ..) ..); handle same as without SUBREG. + + * Makefile.in (HOST_CLIB, HOST_ALLOCA, HOST_MALLOC, HOST_OBSTACK): New + variables to override. + (USE_HOST_*, HOST_LIBDEPS): Use HOST_PREFIX and new variables. + (HOST_LIBS): Use HOST_CLIB. + + Tue Feb 11 21:32:07 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Makefile.in (install-common-headers): Copy byteorder.h to + compilation dir. + + * config.sub: Allow unicos as operating system. + + * m88kv4.h (INIT_SECTION_ASM_OP): Add #progbits. + + * vax.h (DYNAMIC_CHAIN_ADDRESS): New macro. + + * c++: Propagate quoted args properly. + + Tue Feb 11 16:35:01 1992 Jim Wilson (wilson at cygnus.com) + + * fixincludes: Define TERM to `unknown', to ensure that it is + valid. Otherwise, ex may fail. + * fixinc.svr4: Likewise. + + Tue Feb 11 18:04:32 1992 Michael Meissner (meissner at osf.org) + + * decrose.h (CPP_SPEC): Define the macros LANGUAGE_OBJECTIVE_C and + LANGUAGE_C_PLUS_PLUS if we are compiling Objective C or C++. + Silicon Graphics in particular uses LANGUAGE_C_PLUS_PLUS. + * decstatn.h (CPP_SPEC): Likewise. + * iris.h (CPP_SPEC): Likewise. + * mips-bsd.h (CPP_SPEC): Likewise. + * mips-news.h (CPP_SPEC): Likewise. + * mips-sysv.h (CPP_SPEC): Likewise. + + * decstatn.h (CPP_PREDEFINES): Eliminate __ versions, since + gcc will do these automatically. Eliminate LANGUAGE_C, since it is + handled in CPP_SPEC. + + Tue Feb 11 15:38:27 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * flow.c (find_basic_blocks): Don't delete labels used in non-jumps. + + * vms.h (DO_GLOBAL_CTORS_BODY): Modify the return address + only the first time __main is called. + + * fixinc.svr4: Change headers to test __STRICT_ANSI__ instead of + testing __STDC__ != 0. + + * fixinc.svr4 (mman.h): Fix backward __STDC__ conditional. + Don't add declarations of munmap and mprotect. + + * varasm.c (output_constant): Allow empty constructor for any type. + + * dwarfout.c (ASM_OUTPUT_DWARF_DATA8): Just one definition; + test WORDS_BIG_ENDIAN "at run time". + + Tue Feb 11 09:00:01 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * reload.c (find_reloads): Don't substitute in MATCH_DUPs if we + are not generating replacements. + + Tue Feb 11 08:45:14 1992 Tom Wood (wood at dg-rtp.dg.com) + + * m88kv4.h ({CTORS,DTORS}_SECTION_ASM_OP): Fix typo. + + Mon Feb 10 22:34:47 1992 Chris Smith (csmith at convex.com) + + * convex.h(HARD_REGNO_NREGS): define correctly for 64-bit regs + + Mon Feb 10 21:50:23 1992 Michael Meissner (meissner at osf.org) + + * mips.h (MIPS_VERSION): Change Meissner version # to 11. + (CPP_SPEC): Define the macros LANGUAGE_OBJECTIVE_C and + LANGUAGE_C_PLUS_PLUS if we are compiling Objective C or C++. + Silicon Graphics in particular uses LANGUAGE_C_PLUS_PLUS. + (FP_DBX_FIRST): Change the test so that stabs in ECOFF uses the + value 38, in addition to stabs in GAS. + + * mips.md (all function units): Make the function units simpler, and + not depend on the cpu type, to work around a memory hungry + genattrtab, which attempts to grow the data segment to than 32 + megabytes. + + Mon Feb 10 16:34:11 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * convex.h (REAL_VALUE_TRUNCATE): Obsolete definition deleted. + + * config.sub (convex-*): These are BSD, not sysv. + + * dbxout.c (have_used_extensions): New var. + (dbxout_type, dbxout_type_fields, dbxout_symbol): + Set have_used_extensions when use an extension. + (dbxout_symbol): Don't use `Tt' extension unless extensions + have been used. + + Mon Feb 10 12:28:59 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * xm-a29k-ult.h: Fix typo in placement of copyright notice. + + Mon Feb 10 05:36:45 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * dbxout.c (dbxout_type): Don't use GDB extensions if they are empty. + + Mon Feb 10 00:10:20 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-class.c (finish_struct): Use DECL_CHAIN, not TREE_CHAIN to walk + through the list of methods identified by a visibility declaration. + + * cp-cvt.c (convert_pointer_to): No longer need to abort if BINFO is + not a TREE_VEC or AGGR_TYPE node. + + * cp-parse.y (stmt): Improve error handling for try/except. + + * cp-class.c (add_method): If we create RTL for a copy of METHOD, + copy the RTL to METHOD's DECL_RTL slot. + + * cp-method.c (dump_type): Print `const' and/or `volatile' for + VOID_TYPE and REAL_TYPEs, too. + + Sun Feb 9 21:07:45 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * varasm.c (assemble_integer): Pass third arg in recursive calls. + Act appropriately if word-by-word loop doesn't finish. + + * Makefile.in (bootstrap*): Don't override value of ALLOCA. + + * dbxout.c (dbxout_symbol, dbxout_parms): Do leaf function remap + only if LEAF_REG_REMAP and only in leaf functions. + + Sun Feb 9 16:46:27 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-init.c (maybe_adjust_addr_for_delete): Build final COND_EXPR + with TREE_TYPE (addr). + + Sun Feb 9 14:20:49 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * rs6000.h (rs6000_{bss,private_data,read_only}_section_name): + Add declarations. + (rs6000_text_section_asm_op): Deleted. + (ASM_FILE_START): Initialize section names and enter bss section once. + (EXTRA_SECTIONS): Add `private_data' and `bss'; + delete `global_variable'.. + (read_only_data_section): Don't form name here. + (global_variable_section): Deleted. + (private_data_section, bss_section): New functions. + (ASM_DECLARE_FUNCTION_NAME): Don't write function name with [PR]. + (ASM_OUTPUT_POLL_PROLOGUE): No longer needed. + (SELECT_{RTX_,}SECTION): Just calls data_section or + private_data_section. + (ASM_OUTPUT_LOCAL): Put in bss section. + (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Now a constant. + * rs6000.c (rs6000_text_section_asm_op): Deleted. + (rs6000_{bss,private_data,read_only}_section_name): Add definitions. + (rs6000_gen_section_name): New function. + + Sun Feb 9 08:29:21 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.h (REGNO_REG_CLASS): Use a lookup table: AIX can't handle + complex tertiary expressions. + (GO_IF_LEGITIMATE_ADDRESS): Simplify slightly for the AIX + compiler. + + * i386.c (regclass_map): New variable. Lookup array for + REGNO_REG_CLASS. + + Sat Feb 8 01:20:33 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * cp-parse.y (yyprint): Test __GNUC__, not __GNU__. + Use __inline, like everywhere else. + + * a29k.h, romp.h (OVERRIDE_OPTIONS): Deleted. + (OPTIMIZATION_OPTIONS): Defined, instead. + * rs6000.h (OPTIMIZATION_OPTIONS): New macro. + (OVERRIDE_OPTIONS): Don't change optimization. + + * final.c (leaf_renumber_regs_insn): No longer static. + * dbxout.c (dbxout_symbol, dbxout_parms): Call that. + + * c-decl.c (lookup_name): Do nothing special if type is error mark. + (grokdeclarator): Ignore putative type name whose type is error mark. + * c-parse.y (primary): If var type is error mark, return error mark. + + * c-typeck.c (build_array_ref): Return early if arg is error mark. + + * Makefile.in (test-protoize): Rule deleted. + + * stmt.c (emit_case_nodes): Handle just-left-subtree case + like just-right-subtree--delete mysterious code that tests cost_table. + + * varasm.c (decode_reg_name): Accept decimal number as reg name. + + * c-decl.c (finish_decl): If pop_obstacks goes to perm obstack, + call permanent_allocation. + + * gcc.c (link_command_spec): Use -lgcc, not libgcc.a. + + Fri Feb 7 16:56:17 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) + + * rs6000.h (DOLLARS_IN_IDENTIFIERS): Define to zero, because the + assembler does not accept dollar signs. + + Fri Feb 7 15:36:40 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Makefile.in (mostlyclean): Fix name of tmp-proto.1. + + * configure: Delete excess space in assignment to srcdir. + + * cp-decl2.c (DOLLARS_IN_IDENTIFIERS): Default now 1, as in C. + + * i386gas.h (ASM_OUTPUT_LOOP_ALIGN): New macro. + (ASM_OUTPUT_ALIGN_CODE): Use 16-byte boundary on 486. + + * m68k.h (TRANSFER_FROM_TRAMPOLINE): Use operands for the memrefs + to avoid dependence on assembler syntax. + + Fri Feb 7 10:26:32 1992 Michael Meissner (meissner at osf.org) + + * Makefile.in (EXTRA_OBJS): New variable for extra object files + needed when linking cc1, cc1plus, and cc1objc. + + Fri Feb 7 07:34:03 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * reload1.c (set_label_offsets, reload_as_needed): Recompute + num_not_at_initial_offset when we pick up offsets from offsets_at. + + * unroll.c (unroll_loop): Copy initial and final values to avoid + sharing. + + * cse.c (simplify_relational_operation): Complete last change by + correctly handling <= and >=. + + Thu Feb 6 23:57:02 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-decl.c (grokdeclarator): Invert sense of warning about + initialized extern vars, since in C++, const has funny semantics. + + Thu Feb 6 15:12:02 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * cse.c (simplify_relational_operation): Test properly for floating + equality; don't deduce this from < and >. + + * xm-mips.h (alloca): Don't define or declare if MIPS_OVERRIDE_ALLOCA. + * xm-irix4.h (MIPS_OVERRIDE_ALLOCA): Defined. + + * m68k.h (TRANSFER_FROM_TRAMPOLINE): Use explicit reg var + to avoid dependence on register name syntax. + + * mot3300.h (PUT_SDB_START_DIM, PUT_SDB_NEXT_DIM, PUT_SDB_LAST_DIM): + New macros. + (PUT_SDB_DIM): Deleted. + (PRINT_OPERAND): Handle %$ and %&. + (ASM_OUTPUT_OPCODE): Handle f%$move and f%&move. + + * gstdarg.h: If not __GNUC__, use system's stdarg.h. + + Thu Feb 6 22:36:36 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) + + * vms.h (DEFAULT_GDB_EXTENSIONS): Define as 0. + + Thu Feb 6 13:32:37 1992 Michael Meissner (meissner at osf.org) + + * mips.h (MIPS_VERSION): Set Meissner version # to 10. + (flag_half_pic, mips_branch_likely): New global variables. + (call_memory_operand): New function declaration. + (half_pic_encode_section_info): Likewise. + (mips_constant_address_p): Likewise. + (mips_debugger_offset): Likewise. + (CC1_SPEC): Make OSF/1 -pic-xxx switches to -mhalf-pic, which is + currently undergoing development. + (DEBUGGER_AUTO_OFFSET): Emit correct information if frame pointer is + omitted. + (DEBUGGER_ARG_OFFSET): Likewise. + (TARGET_SWITCHES): Add -mabicalls and -mhalf-pic switches. + (PIC_OFFSET_TABLE_REGNUM): Define as the GP register ($28). + (EXTRA_CONSTRAINT): Add 'S' constraint for half-pic references. + (CONSTANT_ADDRESS_P): Call mips_constant_address_p. + (ENCODE_SECTION_INFO): Reorder test to test optimize first, and to + call half_pic_encode_section_info if half pic. + (PREDICATE_CODES): Add call_memory_operand. + + * mips.c (flag_half_pic): New global variable to indicate to produce + half-pic output for OSF/rose. + (mips_branch_likely): New global variable to indicate the branch + should use the branch likely form of the instruction. + (mips_sw_reg_names): Use $fp instead of fp, since regdef.h no longer + defines fp. + (call_memory_operand): New function to return TRUE if the argument + is a valid MEM for a call instruction. + (mips_move_1word): Emit comment in la of half-pic addresses as a + temporary flag to put the right code down. + (mips_constant_address): New function to determine if something is a + constant address or not. Add stub code for -mhalf-pic. + (override_options): Set flag_half_pic if -mhalf-pic. + (override_options): Mark %? as valid for print_operand. + (mips_debugger_offset): New function to correct the offset for + variables and arguments if the frame pointer has been omitted. + (print_operand): %? now emits a 'l' if mips_branch_likeley is set. + (mips_asm_file_start, function_prologue): If -mabicalls, emit the + pseudo ops that the Pyramid System V.4 port seems to want. + (compute_frame_size): Reserve space for saving GP if -mabicalls. + (half_pic_encode_section_info): Stub function for encoding whether + or not to generate a half pic reference. + + * mips.md (type attribute): Add pic attribute. + (cpu attribute): New attribute to get the CPU type. + (branch_likely attribute): New attribute to say whether or not we + can use branch likely instructions. + (define_delay): Note that we can annull false branches if -mips2. + (memory function unit): Add pic in addition to load. + (various function units): Use the cpu attribute. + (branch patterns): Support branch likely instructions if -mips2. + (call, call_internal): Use call_memory_operand instead of + memory_operand. If -mhalf-pic put function address in a register. + (call_value, call_value_internal): Likewise. + + * decrose.h (INIT_SECTION_ASM_OP): Define as .init. + + Thu Feb 6 10:07:17 1992 Tom Wood (wood at dg-rtp.dg.com) + + * m88k.c (preserve_registers): Change to walk the epilogue delay + insns in the forward rather than reverse order (for reorg.c change). + + Thu Feb 6 02:54:28 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * cse.c (simplify_binary_operation, case PLUS): Don't make + a (const (plus X Y)) with X a CONST_INT. + + * fixincludes: Simplify egrep command. + + Thu Feb 6 01:11:28 1992 Mark Eichin (eichin at cygnus.com) + + * cp-lex.c (process_next_inline): if we get a "parse error at end of + saved function text", set yychar to something that + restore_pending_input will digest (if it thinks input is still + pending, it will abort, but we've already reported the problem to + the user.) + + Wed Feb 5 18:42:56 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * reorg.c (fill_simple_delay_slots): When filling delay slots by + searching backward, put each new insn we find at the head of the + delay list instead of at the tail. + + * cse.c (fold_rtx): When associating operations, avoid infinite + recursion if the new expression contains our operand. + + Wed Feb 5 21:18:06 1992 Mark Eichin (eichin at cygnus.com) + + * cp-decl.c (globalize_nested_type): If the type isn't found at all, + this is an anonymous forward reference, so permit it. + Abort if type is already globally defined. + + Wed Feb 5 18:01:12 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * varasm.c, hp800.h, i386.h, m88k.h, mips.h, romp.h, vms.h: + (ENCODE_SECTION_INFO): Renamed from ENCODE_SEGMENT_INFO. + + * sparc.md (nonlocal_goto): Copy static chain into + virtual_stack_vars_rtx, not frame pointer itself. + (nonlocal goto return recognizer): Jump to %o0+0. + + * toplev.c (main): Fix test for -Wid-clash. + + Wed Feb 5 16:58:15 1992 Ron Guilmette (rfg at ncd.com) + + * dwarfout.c (dwarfout_init): Add two words containing the starting + and ending address of the .text section for this compilation unit to + the special initial entry in the .debug_srcinfo section. + + Tue Feb 4 14:51:16 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * dbxout.c (dbxout_symbol): Handle DBX_OUTPUT_CONSTANT_SYMBOL. + (dbxout_block): Handle DBX_OUTPUT_CATCH. + + * cccp.c (lookup_import, add_import, do_include): + Use bcmp and bcopy to access st_ino and ->inode fields. + + * dbxout.c (dbxout_init): Pass syms to DBX_OUTPUT_STANDARD_TYPES. + + * fold-const.c (operand_equal_p): Check that modes match. + (comparison_equiv_p): New function. + (fold): Use that when converting ?: to min_expr or max_expr. + + * c-common.c (c_expand_expr_stmt): Test for ERROR_MARK as type. + + Tue Feb 4 12:03:26 1992 Michael Tiemann (tiemann at cygnus.com) + + * stmt.c (expand_end_case): Don't crash if function called + is not an ADDR_EXPR. + + Tue Feb 4 14:17:22 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * expr.h ({float[sd]i[sd]f,fix[sd]f[sd]i,fixuns[sd]f[sd]i}_libfunc): + New declarations. + * optabs.c: Define them. + (expand_float, expand_fix): Use them instead of making a new + SYMBOL_REF each call. + (init_optabs): Initialize them. + + Tue Feb 4 00:27:35 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Makefile.in (protoize.1, unprotoize.1): Rename temp files < 14 chrs. + + * cccp.c (skip_if_group): Make unknown cmd name a pedantic warning. + + Mon Feb 3 18:10:41 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * romp.h (LEGITIMATE_CONSTANT_P, ENCODE_SEGMENT_INFO): Use + SYMBOL_REF_FLAG. + + * x-romp-mach: New file. + * configure (romp-*-mach*): New alternative. + + Mon Feb 3 16:43:55 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * cp-typeck.c (warn_for_assignment): Print arg num in origin 1. + + * sparc.md (nonlocal_goto trap recognizer): Fix opcode spelling. + + * function.c (fix_lexical_addr): Properly search for correct display. + + * romp.h (OVERRIDE_OPTIONS): Don't set flag_omit_frame_pointer. + + Mon Feb 3 11:11:58 1992 Michael Tiemann (tiemann at cygnus.com) + + * gcc.c (@c++-cpp-output): Delete extraneous "}}}" at the end of the + rule. + + Mon Feb 3 11:38:19 1992 Ron Guilmette (rfg at ncd.com) + + * dwarfout.c (dwarfout_init): Generate an initial 2-word entry in the + .debug_srcinfo section containing the addresses of the starts of the + .line and .debug_sfnames sections. Generate it after the initial entry + for the .line section. + + * dwarfout.c [DWARF_TIMESTAMPS]: Ensure time_t and time declared. + (dwarfout_init): Make third word of initial .debug_srcinfo entry be + the compilation date/time if DWARF_TIMESTAMPS is defined, or else -1. + + * dwarfout.c (dwarfout_init): Output compilation directory name as + the first thing in the .debug_sfnames section. + + Mon Feb 3 04:12:51 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * Makefile.in (install-dir): `parent' is a shell variable. + + Mon Feb 3 09:43:51 1992 Tom Wood (wood at dg-rtp.dg.com) + + * m88k.h (EXTRA_SECTIONS): Use init and fini sections from svr3.h, + but only when using svr3.h. + + Sun Feb 2 19:50:29 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.h (ADDRESS_COST): New macro. + + Sun Feb 2 17:08:47 1992 Michael Meissner (meissner at osf.org) + + * mips.c (simple_memory_operand): Don't recognize references to + variables in .sdata or .sbss, which has the effect of not putting + stores into delay slots. This fixes a bug and also doesn't temp the + MIPS linker from trying to put 4 instructions into the delay slot + when it rewrites the function as a PIC function. + + Sun Feb 2 16:58:11 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Do ON_EXIT last. + + * Makefile.in (install-dir): Create the parent of mandir if nec. + + * real.h (REAL_VALUE_TRUNCATE): sizeof says what cast to float does. + + * dbxout.c (DBX_OUTPUT_MAIN_SOURCE_DIRECTORY): New parameter macro. + (DBX_OUTPUT_MAIN_SOURCE_FILENAME, DBX_OUTPUT_SOURCE_FILENAME): + (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Likewise. + These are used in place of ASM_... + * newpbb.h (DBX_OUTPUT_MAIN_SOURCE_FILENAME): Macro renamed. + (DBX_OUTPUT_SOURCE_FILENAME): Likewise. + * next.h (DBX_OUTPUT_MAIN_SOURCE_DIRECTORY): Macro renamed. + (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Likewise. + + Sun Feb 2 12:51:54 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-typeck.c (build_component_ref_1): Call `compute_visibility' + with a BASETYPE_PATH, not a TREE_LIST. + + * cp-class.c (build_vtable_entry): Apologize if we cannot build a + proper vtable because of builtin liminations. + + Sun Feb 2 07:30:08 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * reload.c (combine_reloads): Don't combine two reloads with different + secondary reloads; copy secondary reload to combined reload. + + * cse.c (cse_main): PIC_OFFSET_TABLE_REGNUM is not clobbered by calls + if -fpic or -fPIC. + * reorg.c (mark_target_live_regs): Likewise. + * sched.c (attach_deaths): Likewise. + + * flow.c (find_basic_blocks): Don't separate a CALL_INSN from + following CLOBBER insns. + + * function.c (use_variable, use_variable_after): Don't interpret + reference to internal arg pointer as variable-sized object. + (expand_function_start, expand_function_end): Add USE for virtual + arg pointer if stupid alloc and it is not the real arg pointer. + + * flow.c (insn_dead_p, mark_set_1, mark_used_regs): Don't treat + ARG_POINTER_REGNUM specially if it isn't fixed. + * sched.c (attach_deaths): Likewise. + * reorg.c (mark_target_live_regs): Likewise; also make set of regs + clobbered on call agree with cse and flow. + + * function.c (fix_lexical_addr): Rework to look for AP references + using internal_arg_pointer; make some related cleanups. + * expr.c (expand_expr, case VAR_DECL, SAVE_EXPR): Treat + inline_function_decl just like current_function_decl. + * stmt.c (expand_end_bindings): When restoring arg pointer, restore + into the virtual form so we will subtract the proper offset, since + the saved value includes the offset. + + Sat Feb 1 14:41:34 1992 Ken Raeburn (Raeburn@Cygnus.COM) + + * cp-pt.c (end_template_decl): For method template, no longer call + popclass; it isn't needed any more. If after processing template + we're not at the global binding level, throw away any other binding + levels, rather than aborting. Also deleted some other unused code. + + Sat Feb 1 09:13:47 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * xm-rs6000-mach.h, rs6000-mach.h: New files. + * configure (rs6000-*-mach): New option. + + Sat Feb 1 00:57:24 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.c: Include tree.h + (symbolic_operand): New predicate function. + (symbolic_reference_mentioned_p): New function. + (legitimize_pic_address,emit_pic_move): New functions. + (function_prologue): Delete unused variable nregs. + If the PIC reg is used, save the old contents and initialize with + a pointer to the GOT. + (simple_386_epilogue): Count the PIC reg if it is used. + (function_epilogue): Delete unused variable "insn". Restore the + original contents of the PIC reg if it was used. + + (output_pic_addr_const): New function to handle PIC symbol + reference suffixes. + (print_operand_address): Use that if flag_pic is true. + (print_operand): Likewise. Don't print a prefix in front of any + constant if the 'P' code is used. + + (output_387_binary_op): abort if the op is not one we handle. + + (maximum_field_alignment): New variable. + (handle_pragma_token): New function. Handle `weak' and `pack'. + + * i386.h (CONDITION_REGISTER_USAGE): New macro. Mark PIC reg as + fixed and call used if flag_pic is true. + (PIC_OFFSET_TABLE_REGNUM): New macro. + (FUNCTION_PROFILER): Output PIC compatible code if flag_pic. + (INITIAL_ELIMINATION_OFFSET): Count the PIC reg if it is used. + + (GO_IF_LEGITIMATE_ADDRESS): If flag_pic is true, reject bare + label or symbol references, but allow constant pool references. + In all cases, don't bother to check for a constant as the first + operand of a PLUS. + (LEGITIMIZE_ADDRESS): Call legitimize_pic_address for symbolic + references if flag_pic is true. In all cases, HImode regs are not + valid memory pointers. + (LEGITIMATE_PIC_OPERAND): New macro. + (SYMBOLIC_CONST): New macro. + (ENCODE_SEGMENT_INFO): New macro to notice static variables. + (CONST_COSTS): Symbolic constants cost more if flag_pic is true. + + * i386.md (movsi): Use define_expand. Call emit_pic_move for + symbolic constants if flag_pic is true. + (divmodM4,udivmodM4): Change predicates so that only regs are + allowed in operands that can't be a mem. Avoids reload + congestion. + (indirect_jump): Allow any reg or mem as operand, not just reg 0. + (casesi): New insn, only used if flag_pic is true. + (call,call_pop,call_value,call_value_pop): Use define_expand to + record if this function ever emits a call, which will implicitly + use the PIC address register. + + * svr4.h (SELECT_SECTION): Any item whose initial value involves + linker relocation must go in the data section if flag_pic is true. + + * i386v4.h (ASM_OUTPUT_ADDR_DIFF_ELT): Output in PIC style. If + flag_pic is false, ADDR_DIFF_VECs are not output and this is not + used. + (JUMP_TABLES_IN_TEXT_SECTION): New macro. + + (WEAK_ASM_OP,DEF_ASM_OP): New macros. + (maximum_field_alignment): New variable. Declare here. + (PCC_BITFIELD_TYPE_MATTERS): New macro. Value depends on + maximum_field_alignment. + (BIGGEST_FIELD_ALIGNMENT): New macro. Likewise. + (HANDLE_PRAGMA): New macro. + (ASM_OUTPUT_ALIGNED_LOCAL): New macro. + + Sat Feb 1 00:15:41 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * flow.c (flow_analysis, find_basic_blocks): + If have nonlocal labels, calls end basic blocks. + Each call can jump to each nonlocal label. + Pass extra arg to find_basic_blocks. + * function.c (nonlocal_label_rtx_list): New function. + + * dbxout.c (dbxout_init): Vars wd and wd_gotten moved to top level + and renamed to cwd and cwd_gotten. + + * c-decl.c (start_function): -Wmissing-prototypes warns if static + function was previously used without a prototype. + + * loop.c (find_and_verify_loop): Initialize uid_loop_num[0]. + (loop_optimize): Give up fast if no loops. + + * stmt.c (expand_end_bindings): Don't adjust fp in nonlocal goto hndlr + if there is a nonlocal_goto insn. + + * Makefile.in (cccp.o): Use just libdir in GPLUSPLUS_INCLUDE_DIR. + + * gcc.c (do_spec_1): Supply missing arg in some recursive calls. + + Fri Jan 31 21:50:03 1992 Jeffrey A. Law (law at wombat.gnu.ai.mit.edu) + + * m68k.h (OVERRIDE_OPTIONS): -fPIC is only supported on the 68020 + and later cpus. Give an error if -fPIC is tried on a 68000. + + Fri Jan 31 21:39:33 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * flow.c (find_auto_inc): If emitting a move insn in front of the + first insn in a block, update basic_block_head. + + * caller-save.c (init_caller_save): Correctly check for case where the + save or restore insns aren't recognized. + + Fri Jan 31 21:02:35 1992 Mark Eichin (eichin at cygnus.com) + + * cp-decl.c (pushtag): when calling pushdecl, if we're in a + class_binding_level just do a pushdecl_class_level. Otherwise + pushdecl gets called multiple times on class-nested enums, which + short circuits the name list in the global_binding_level. + + Fri Jan 31 00:14:20 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * stmt.c (expand_goto): Use nonlocal_goto pattern if it exists. + * sparc.md (nonlocal_goto): New pattern. + Also nameless pattern for the special trap insn. + + * gcc.c (S_ISDIR): Add default definition. + + * function.c (expand_function_end): + Set up arg_pointer_save_area at start of function. + + * c++: Accept -nostdlib, not -nostinc. + + * va-sparc.h: If GCC v1, define __extension__ as nothing. + * va-i860.h, va-pyr.h, va-spur.h: Likewise. + + * cp-class.c (finish_struct): Fill in DECL_ALIGN of vtable field. + + * regclass.c (reg_class_record): + Don't follow indirect loops in constraints. + + * function.c, expr.h (current_function_internal_arg_pointer): New var. + * function.c (assign_parms): Set it. + (push_function_context, pop_function_context): Save and restore it. + * expr.c (expand_builtin): Use it. + * function.h (struct function): New slot to save it in. + + * cse.c (cse_main): Calls do clobber arg pointer if not fixed. + + * hp320.h (HAVE_ATEXIT): New definition. + + * Makefile.in (ALL_CPPFLAGS): New variable. + Use in all compile steps instead of CPPFLAGS. + (X_CPPFLAGS, T_CPPFLAGS): New vars, used in ALL_CPPFLAGS. + * x-vax (X_CPPFLAGS): Use this instead of X_CFLAGS. + + * stmt.c (expand_end_bindings): Fix typo. + + Fri Jan 31 12:15:09 1992 Ron Guilmette (rfg ay ncd.com) + + * dwarfout.c (LINE_LAST_ENTRY_LABEL): Definition added. + (dwarfout_finish): Put a label on the last .line section entry. + (dwarfout_finish): Make first word of final .debug_srcinfo record + contain the offset of the final .line section entry. + + Fri Jan 31 10:31:44 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * cp-tree.c (__eprintf): Make definition match assert.h + declaration. + + Thu Jan 30 23:17:11 1992 Per Bothner (bothner at cygnus.com) + + * c++: The flags -c, -S, or -E suppress passing -lg++ + to gcc. (Otherwise, gcc prints a warning.) + + Thu Jan 30 21:10:02 1992 Ron Guilmette (rfg at ncd.com) + + * dwarfout.c (dwarfout_init): Fix generation of initial .debug_aranges + entry to be Dwarf Version 1 compliant. + + Thu Jan 30 15:51:27 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) + + * i386sun.h (LINK_SPEC): Delete useless %{-Bstatic} term. + * sun2o4.h (LINK_SPEC): Likewise. + * sun3.h (LINK_SPEC): Likewise. + * sparc.h (LINK_SPEC): Delete useless %{Bstatic} term. + + * cccp.c (default_include): Delete use of obsolete + NO_STANDARD_INCLUDE_DIR macro. + * protoize.c (default_include): Likewise. + + * Makefile.in (libgcc1.null): Delete dummy.o and dummy.c. + + Thu Jan 30 15:34:06 1992 Michael Meissner (meissner at osf.org) + + * gstdarg.h: Include va-mips.h on MIPS systems. + + * va-mips.h (va_start): Provide alternate definition when included + via stdarg.h. + (va_arg): Use __alignof(...) instead of sizeof(...) to determine + whether or not to dword align the argument pointer. + + Thu Jan 30 13:06:36 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Makefile.in (install-common): Get c++ and g++ from srcdir. + + * i860.h (FIXED_REGISTERS): Arg pointer is no longer fixed. + + * assert.h (__eprintf): Add const to string args in GCC ANSI case. + + * Makefile.in (cccp.o, protoize.o, unprotoize.o): + Define LOCAL_INCLUDE_DIR based on $(prefix). + + * stmt.c (expand_end_bindings): Arg pointer needs no special + treatment if not fixed. + + * cp-parse.y, c-lex.c (yyerror): + Avoid sign-extension of characters in error messages. + + Thu Jan 30 11:39:56 1992 Ron Guilmette (rfg at ncd.com) + + * dwarfout.c (dwarfout_finish): Fix generation of .debug_pubnames + terminating entry to be 4-bytes of zero followed by a null string. + + Thu Jan 30 09:30:19 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * rs6000.c (ccr_bit): Fix typo causing reference to possibly + undefined operand. + + * rs6000.h (ASM_SPEC): Remove until new AIX assembler is available. + (ASM_OUTPUT_POOL_PROLOGUE): Add missing "." in csect name. + (ENCODE_SEGMENT_INFO): Deleted. + (ASM_OUTPUT_EXTERNAL): Move code from ENCODE_SEGMENT_INFO here, + using permalloc instead of putting name into saveable_obstack. + Re-enable macro. + (ASM_OUTPUT_EXTERNAL_LIBCALL): Re-enable. + + Wed Jan 29 21:50:26 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * rs6000.h (ASM_SPEC): Add -u, now require new /bin/as for AIX. + (ASM_OUTPUT_EXTERNAL, ASM_OUTPUT_EXTERNAL_LIBCALL): No longer needed. + + * rs6000.h (ENCODE_SEGMENT_INFO): New macro; add [RW] or [DS] to name. + (RS6000_OUTPUT_BASENAME): New macro. + (ASM_OUTPUT_*): Use it instead of assemble_name when required. + (ASM_OUTPUT_POOL_PROLOGUE): Remove trailing [RW] or [DS]. + * rs6000.c (print_operand, case 'z'): New case, for name in CALL_INSN. + (output_toc): Use RS6000_OUTPUT_BASENAME instead of assemble_name + for toc entry name. + * rs60000.md (call): Use %z. + + Wed Jan 29 17:17:42 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-init.c (build_member_call): Fix bug involving static members + that are function pointers. + + Wed Jan 29 13:25:18 1992 Tom Wood (wood at dg-rtp.dg.com) + + * gcc.c (do_spec_1): For %D, only add -L options that are relevant. + (is_linker_dir): Determine if a -L option is relevant. + + Wed Jan 29 00:57:55 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * configure: Turn ns32k alternatives back on. + + * Makefile.in (getopt.o, getopt1.c): Join two lines into one. + + * x-i386v4, x-i860v4 (GCC_CFLAGS): Add missing `-B./'. + + * reload.c (find_dummy_reload, push_reload): Don't reuse dying input + reg as a reload if it is a fixed reg. + + * c-tree.h (C_MISSING_PROTOTYPE_WARNED): Deleted since unused. + + Wed Jan 29 00:42:34 1992 Tim Moore (moore at fast.cs.utah.edu) + + * hp800.c (print_operand): Handle INSN_ANNULLED_BRANCH_P in '*' + operand type. + * hp800.h (DEFAULT_GDB_EXTENSIONS): Define as 0. + * hp800.md (cmpsi): Change arith_operand to arith5_operand. + (bCC patterns): Delete pattern that matches a compare with a + constant first operand. Change arith_operand to arith5_operand. + (fp branches): Change type to cbranch. + + * function.c (assign_parms): Set current_function_arg_offset_rtx + correctly for ARGS_GROW_DOWNWARD. + * gstdarg.h: Include va-hp800.h. + * va-hp800.h: Complete rewrite. + + Tue Jan 28 17:04:38 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) + + * varasm.c (make_decl_rtl): Delete unused var `i'. + + * c-convert.c (convert_to_pointer): + Abort if no integer type is as wide as a pointer. + + * gcc.c (default_compilers, .i case): Add error message for -pg + and -fomit-frame-pointer incompatibility. + + * Makefile.in (install-common): Install c++ and g++ shell scripts in + bindir. + + Tue Jan 28 15:44:10 1992 Michael Collison (collison at osf.org) + + * x-encrose (OLDCC): changed to $(GNU_ROSE_BIN)/gcc + + * ns32k.h: Added trampoline code. + + Tue Jan 28 14:19:52 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * rtl.def (UNSPEC, UNSPEC_VOLATILE): New RTL codes. + * cse.c (canon_hash): UNSPEC_VOLATILE operations are volatile. + * loop.c (invariant_p): Likewise. + * reorg.c (mark_referenced_resources): Likewise. + * sched.c (sched_analyze_2): Likewise. + * rtlanal.c (volatile_refs_p, side_effects_p, may_trap_p): Likewise. + (reg_referenced_p): Support UNPEC and UNSPEC_VOLATILE. + + Tue Jan 28 11:50:35 1992 Michael Meissner (meissner at osf.org) + + * mips.c (toplevel): Add include of , since isdigit is + used. + + Tue Jan 28 05:47:08 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-decl.c (xref_tag): Addition to eichin's Jan 25 change. If REF + is extant, and it's seen in the global scope outside of + CLASS_BINDING_LEVEL, set its IDENTIFIER_GLOBAL_VALUE if NULL. + + * cp-class.c (pushclass): Forcibly remove any remnants of incomplete + type that was previously pushed. + + * cp-decl.c (various places): Remove all error messages about C++ + constructs being invalid in C language context; extern "C" is a + linkage specifier--no more. + + * cp-method.c (dump_type_prefix,dump_type): Never need to output + `unsigned' since its always part of an unsigned integer type name. + (build_overload_name): Change test for unsigned to use + `unsigned_type' instead of examining TREE_UNSIGNED. + + * cp-call.c (ideal_candidate): Don't convert PARMS in place if + BASETYPE is NULL_TREE. + + Tue Jan 28 02:21:31 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-decl.c (grokdeclarator): Use `auto' for nested fn fwd decls. + + * g++: New file. + + * fixincludes: + Convert machine names in #if's to have underscores. + Fix specific files stdlib.h, locale.h, hsfs/... for Sunos 4.1. + * fixinc.svr4: Convert machine names in #if's to have underscores. + + * gcc.c (do_spec_1): For %D, also make -L's for startfile_prefix. + Also append the machine + + * fold-const.c (fold_convert): Properly handle real-to-real case. + + * configure (i486-*-sysv4*): New alternative. + + Tue Jan 28 00:37:24 1992 Ron Guilmette (rfg at ncd.com) + + * dwarfout.c (location_attribute): Fix handling of objects which + were optimized out of existance for Dwarf Version 0 compliance. + + Tue Jan 28 00:42:57 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * Makefile.in (mostlyclean): Delete stack dump files too. + + Mon Jan 27 18:26:27 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * rs6000.h (HAVE_ATEXIT, NO_DOLLAR_IN_LABEL): Now defined. + + Mon Jan 27 13:32:51 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * libgcc2.a (L_exit): Declare __CTOR_LIST__ and __DTOR_LIST__ + with length 2; get rid of __CTOR_END__ and __DTOR_END__. + (L_ctor_list, L_dtor_list): New library members. + + * cccp.c (main): Add terminating null, then call trigraph_pcp. + + * fixincludes, fixinc.svr4: Fail unless an arg was given. + * Makefile.in (install-fixincludes): Pass output dir as argument. + + * Makefile.in: Renamed libgcc[12] to libgcc[12].a. + Likewise for tmplibgcc[12]. + + * toplev.c (rest_of_decl_compilation): Treat all fcns as if external. + + * Makefile.in (TAGS): Do the work in srcdir. + Include c-parse.h in files to move. + + Mon Jan 27 10:54:24 1992 Jim Wilson (wilson at sphagnum.cygnus.com) + + * cccp.c (get_filename): Don't pass -1 file descriptor to close. + + Mon Jan 27 00:26:33 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-decl.c (start_function): Preserve TREE_TYPE of RESULT_DECL, in + case we have a named return value. + (finish_function): Restrict the cases under which we build + `no_return_label'. Use CURRENT_FUNCTION_RETURN_VALUE to eliminate + the generation of needless cleanups when functions end with a return + stmt. No longer zeros out CLEANUP_LABEL. Also, call `emit_jump' + instead of `expand_null_return' in case NO_RETURN_LABEL is + non-NULL. + + * cp-decl2.c (grokfield): Don't specially hack static member + function names. + + * cp-except.c (cplus_expand_raise): Test correct predicate that we + have a non-null value return. + (cplus_expand_{throw,reraise}): Ditto. + + * cp-typeck.c (c_expand_return): Handle case where named return + value has incomplete type. + + Sun Jan 26 20:50:55 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-parse.y (LC): Fix rule to use `push_obstacks_nochange'. + (structsp): Use `pop_obstacks'. + + Sun Jan 26 17:39:15 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-parse.y (LC): Use push_obstacks_nochange and always call + end_temporary_allocation. + (structsp, template_instantiate_once): After LC, use pop_obstacks. + + * c-decl.c (grokdeclarator): + Static function decl within a function is not external. + + Sun Jan 26 08:14:53 1992 Michael Meissner (meissner at osf.org) + + * mips.h (MIPS_VERSION): Bump meissner version # to 9. + (enum processor_type): Delete PROCESSOR_R2000, since a r2000 + schedules just like a r3000. + (mips_isa, mips_isa_string, mips_cpu_string): New global variables. + (MD_EXEC_PREFIX): If not defined, define as "/usr/lib/cmplrs/cc/". + (TARGET_SWTICHES macros): Move setting the processor from + TARGET_SWITCHES to TARGET_OPTIONS. Also, delete the -mfixed-ovrfl + switch, and move -mwc8/-mwc16 to not use any bits, since we can't + support these in GCC 2.00. Readjust the positions the bits are in. + (TARGET_OPTIONS): Define to add switches -mcpu=x to set which + processor type to schedule for, and -mipsx to specify the + instruction set architecture level. + (BRANCH_LIKELY_P): New macro, true if MIPS ISA >= 2. + (HAVE_64BIT_P): New macro, true if MIPS_ISA >= 3. + (HAVE_SQRT_P): New macro, true if MIPS_ISA >= 2. + (BRANCH_COST): Define as 2 if r4000/r6000, 1 otherwise. + (ASM_OUTPUT_SKIP): Eliminate OSF/1 gas work around. + + * mips.c (mips_isa, mips_isa_string, mips_cpu_string): New global + variables. + (print_options): Print CPU and ISA level. + (override_otpions): Handle TARGET_OPTIONS setting cpu and ISA. + (override_options, print_operand): %: is no longer supported, since + -mfixed-ovfl is eliminated. + + * mips.md (type attribute): Add fsqrt. + (all define_function_units): Redo, to add full r6000 and r4000 + support, and to use the default case in case another processor type + is added. Also, tests against PROCESSOR_R2000 eliminated. + (add, subtract patterns): Delete use of %:. + (sqrtdf2, sqrtsf2): Define if the MIPS ISA >= 2. + + * decrose.h (MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Define these to + use the defaults on the OSF/1 reference platform. + (i386rose.h): Likewise. + + Sun Jan 26 07:58:00 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * cse.c (cse_insn): Don't call insert_regs on a SUBREG. + When scanning table for SUBREG assignment, ignore invalid entries. + + * cse.c (cse_insn): When looking for first non-deleted entry in + table, start by scanning backwards from the deleted entry. + + * function.c (assign_parms): Set current_function_return_rtx + unconditionally. + (expand_function_start): Don't set it here. + + Sat Jan 25 06:44:16 1992 Mark Eichin (eichin at cygnus.com) + + * cp-decl.c (set_identifier_local_value): New function. Clone of + set_identifier_type_value, but uses level->shadowed instead. Only + used in pushdecl, where the non-global install was previously + setting the local value directly which "stuck" and didn't get + cleared the next time through. + (pushdecl): use set_identifier_type_value so that the local value + actually gets erased when we leave this level. Changed code that + checks for global_binding_level to recognize that if + class_binding_level is set, we're not in the global one. + (poplevel_class): restore shadowed list too, like poplevel does. + (print_binding_level): added no_print_functions and + no_print_builtins variables to eliminate clutter while trying to + debug binding level problems. + + Fri Jan 24 18:03:36 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * tree.c (pop_momentary): Don't reference freed stack entry. + + Fri Jan 24 14:20:05 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-parse.y (stmt): Call `define_case_label' for default label. + * cp-decl.c (current_function_return_value): New variable. + (define_{case_}label): Clear CURRENT_FUNCTION_RETURN_VALUE. + * cp-typeck.c (c_expand_return): Set CURRENT_FUNCTION_RETURN_VALUE. + + * cp-tree.c (lang_printable_name): Use DECL_RING, and don't free + the printable name for CURRENT_FUNCTION_DECL. + + Fri Jan 24 14:17:30 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * gvarargs.h: If _ANSI_H, undef _VA_LIST_. + + * c-typeck.c (pointer_int_sum): Don't distribute * into pointer diff. + + * hp320.h (MD_STARTFILE_PREFIX): Defined. + (STANDARD_STARTFILE_PREFIX): Deleted. + + Fri Jan 24 09:30:41 1992 Fred Fish (fnf at fishpond) + + * assert.h (__eprintf): Declare as prototype for __STDC__ + + Fri Jan 24 05:28:53 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.md (jump,indirect_jump,tablejump): Don't output an align + directive here: let the following BARRIER do it. + + Thu Jan 23 11:54:11 1992 Ron Guilmette (rfg at ncd.com) + + * i486v4.h: New file. + + Thu Jan 23 20:34:22 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) + + * fixinc.svr4: Surround uses of ${INPUT} with "" instead of '' + so that it will get expanded. + + Thu Jan 23 17:50:13 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * cse.c (qty_mode): New variable. + (reg_rtx): Deleted. + (hard_regs_in_table, regs_invalidate_by_call): New variables. + (new_basic_block): Clear hard_regs_in_table. + (delete_reg_equiv): New name for reg_invalidate; don't update reg_tick. + (mention_regs): Don't set reg_rtx. + Update reg_tick for all registers in a multi-register hard register + reference. + (insert_regs): Don't do anything special with SUBREG. + Only insert register in a class if it is the same mode. + Don't set reg_rtx; set qty_mode instead. + (insert): Update hard_regs_in_table. + Get constant equivalence in proper mode. + (merge_equiv_classes): Call delete_reg_equiv. + (invalidate): Call delete_reg_equiv and update reg_tick. + Invalidate all parts of multi-word hard regs and invalidate + any multi-word hard reg overlapping what we are to invalidate. + Only look at constant in proper mode. + (remove_invalid_refs): Use refers_to_regno_p. + (invalidate_for_call): New function. + (canon_hash, refers_to_mem_p, fold_rtx, equiv_constant): Look at + constant in proper mode. + (cse_rtx_addr_varies_p, cse_process_notes): Likewise. + (exp_equiv_p): Likewise. + Check reg_tick for all parts of multi-word hard register. + (canon_reg): Don't use reg_rtx; get register from regno_reg_rtx or + build hard reg in proper mode. + (record_jump_equiv): Split into two pieces. + (record_jump_cond): Second part of record_jump_equiv; make recursive + call to some equivalences if args are SUBREGs. + (cse_insn): Only replace register with equivalent if proper mode; + don't use reg_rtx. + Call invalidate_for_call. + Don't avoid call to gen_lowpart for hard register. + Make a SUBREG if gen_lowpart_if_possible fails for SUBREG + assignment. + (invalidate_from_clobbers): Update reg_tick of SP; invalidate + REG entry in table, if present; use stack_pointer_rtx. + (cse_main): Don't allocate reg_rtx. + Initialize regs_invalidated_by_calls. + (cse_basic_block): Allocate qty_mode. + + * rs6000.h (ADDITIONAL_REGISTER_NAMES): Add so we can disambiguate + fixed and floating registers. + + * rs6000.md (ashrdi3): Reject all but constant shift counts. + + * jump.c (simplejump_p): Don't access PATTERN unless we know it is + a JUMP_INSN. + + * combine.c (get_last_value): Don't do a recursive call for a + paradoxical SUBREG. + + * jump.c (jump_optimize): In "if (...) x = a; else x = b;", + don't move "x = b;" if it has non-trivial REG_NOTES. Also, allow + B to be any constant, not just a CONT_INT. + + * stor-layout.c (layout_type): Handle alignment for arrays the same + as we do for records and unions. + + * calls.c (expand_call): Ignore `const' on void functions. + + * i860.c: Include recog.c. + Remove many explicit declaration of vars from include files. + (i860_compare_op[01]): Define these here. + * i860.h (i860_compare_op[01]): Add declarations. + * i860.md (compare, branch): Rework to use define_expand for cmpxx. + Compare just saves operands in i860_compare_op[01]. Branch emits + both insns using the saved operands. + + * i860.h (PREFERRED_RELOAD_CLASS): Handle FP registers and constants. + (SECONDARY_INPUT_RELOAD_CLASS): We need a scratch register to copy + an integer constant to a floating-point register. + * i860.md (addsi3, subsi3): Allow use of floating registers. + + Thu Jan 23 13:33:40 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * i386v4.h (CPP_PREDEFINES): Don't define X86. + + * c-lex.c (readescape): Warn for \a and \x if warn_traditional. + Handle \v as vertical tab regardless of -traditional. + + * fixincludes, fixinc.svr4: Make LIB absolute, near the beginning. + + * fixincludes: Simplify egrep command while matching the same lines + (plus occasional additional lines). + + * function.c (fixup_memory_subreg): New arg UNCRITICAL. Calls changed. + + * gcc.c (process_command): Handle LPATH like LIBRARY_PATH. + + * svr3.h (ASM_LONG): Deleted. + + * gvarargs.h: Ignore _VA_LIST_ if _ANSI_H_; + don't define _VA_LIST_ if already defined. + + Thu Jan 23 09:10:52 1992 Tom Wood (wood at dg-rtp.dg.com) + + * m88kluna.h (includes): Include aoutos.h. + + Thu Jan 23 09:10:52 1992 Ron Guilmette (rfg at ncd.com) + + * va-i860.h (__savereg): Fix typo. + + * i860.h (PREDICATE_CODES): Added definition. + + * i386v4.h (ASM_FILE_START): Definition added which generates + .version directive. + + Wed Jan 22 23:15:45 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) + + * make-cc1.com: Predefine symbols for "rename" and "bison"; always + generate c-parse.h when generating c-parse.c. + + Wed Jan 22 20:01:11 1992 Per Bothner (bothner at cygnus.com) + + * sdbout.c (sdbout_record_type_name): Use typedef names + for C++. (A kludge.) + * sdbout.c (sdbout_one_type): Emit base classes as + dummy fields, just like dbxout.c when not using gdb extensions. + + Wed Jan 22 20:01:11 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) + + * fixincludes: Surround uses of ${INPUT} with "" instead of '' + so that it will get expanded. + + * gcc.c (default_compilers): For c++, define __GNUG__ to 2, and + pass -trigraphs. + + * cccp.1, cpp.1, gcc.1, g++.1: Delete more RCS variables. + + Wed Jan 22 19:02:06 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * combine.c (simplify_shift_const, case ASHIFT): If we will + be suppressing a sign extension because the upper bits are + already the same, verify that the operand is in the same + mode as we will be doing the shift; don't ignore a SUBREG + inside the inner SHIFT. + + Wed Jan 22 09:25:07 1992 Tom Wood (wood at dg-rtp.dg.com) + + * c-typeck.c (comp_target_types): Make decl static. + Don't forget to return the value. + (function_types_compatible_p, comptypes): Initialize `val'. + + Tue Jan 21 13:29:50 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * cross-make (ALL): Override with definition it here. + * configure: Don't edit its value explicitly here. + + * crtstuff.c (__do_global_ctors): Include DO_GLOBAL_CTORS_BODY + in crtend.o, not in crtbegin.o. + + * svr3.h: Prepare to use with i386. + (PCC_BITFIELD_TYPE_MATTERS): Definition deleted. + This pertains to the individual cpu types. + (ASM_SHORT, ASM_LONG, ASM_DOUBLE): Likewise. + (DBX_DEBUGGING_INFO): Undef this. + (DBX_REGISTER_NUMBER): Deleted the #undef. + (STARTFILE_SPEC, LINK_SPEC, LIB_SPEC): Deleted. + * i860v3.h (STARTFILE_SPEC, LINK_SPEC, LIB_SPEC): New definitions. + + * att386.h: Coexist with svr3.h. + (ASM_FILE_START): Deleted. + (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise. + (ASM_BYTE_OP, NO_DOLLAR_IN_LABEL): Likewise. + (ASM_OUTPUT_LABELREF): Undef before defining. + (ASM_FILE_START_1): Undef before defining. + (EXTRA_SECTION_FUNCTIONS): Deleted. + (BSS_SECTION_FUNCTION): New macro; defines bss_section. + + * i386v.h, aix386.h: Include svr3.h. + (SCCS_DIRECTIVE, ASM_OUTPUT_IDENT): Deleted. + (TARGET_MEM_FUNCTIONS): Deleted. + (SDB_DEBUGGING_INFO, DBX_DEBUGGING_INFO): Deleted. + + * Support constructors and destructors on svr3. From james@bigtex. + * i386v.h, aix386.h (STARTFILE_SPEC): Use crtbegin.o after crt1.o. + (LIB_SPEC): Use crtend.o before crtn.o. + (CTORS_SECTION_ASM_OP, ASM_OUTPUT_CONSTRUCTOR): New macros. + (INIT_SECTION_ASM_OP): Likewise. + * svr3.h (DTORS_SECTION_ASM_OP): New macros. + (DO_GLOBAL_CTORS_BODY): New macro. + (EXTRA_SECTIONS,EXTRA_SECTION_FUNCTIONS): Use .init and .fini + sections in addition to .bss. + ({INIT,FINI}_SECTION_FUNCTION): New macros for *_section functions. + ({CTORS,DTORS}_SECTION_FUNCTION): Macros deleted. + (ASM_OUTPUT_CONSTRUCTOR): Deleted. + (ASM_OUTPUT_DESTRUCTOR): Use ASM_LONG. + (INT_ASM_OP): Deleted. + + * c-typeck.c (default_conversion): Don't use initial value if BLKmode. + If do use the initial value, update `type'. + + * arm.h (STRUCTURE_SIZE_BOUNDARY): New definition. + + * stor-layout.c (layout_type): Ignore MAX_FIXED_MODE_SIZE for integers. + + * ultrix.h (SIZE_TYPE): Use `unsigned int'. + * Makefile.in (install-common): Add missing -f in rm. + (install-fixincludes): Install the README file. + + * fixincludes: Don't match on size_t, etc., since we don't actually + change them. + + Mon Jan 20 23:22:45 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-call.c (ideal_candidate): Don't see two functions as ambiguous + if one is argument-by-argument equivalent or better than another. + + Mon Jan 20 14:08:06 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * toplev.c (strip_off_ending): Add ".ada". + + Mon Jan 20 13:53:15 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * protoize.c (xfree): No longer static. + + * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Allow tm.h to override. + + * final.c (leaf_renumber_regs_insn): Do just the pattern of an insn. + + * pyr.h (PCC_BITFIELD_TYPE_MATTERS): Defined. + (STRUCTURE_SIZE_BOUNDARY): Deleted. + + * mips.c: Clean up spacing around square brackets. + + * c-typeck.c (convert_arguments): + Get rid of feature to convert to a tagless union type. + (common_type): Add pedantic warning. + (comptypes, function_types_compatible_p): Return 2 meaning warn. + (comp_target_types): Do the warning here. + (type_lists_compatible_p): New function. + + Sun Jan 19 17:32:19 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * reload1.c (emit_reload_insns): Fix typos when checking for secondary + icode. + + Sun Jan 19 15:28:53 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * global-alloc.c (global_alloc): If LEAF_REGISTERS, those are the + regs that cost nothing to save, for setting regs_already_used. + + * expr.c (expand_builtin): Preserve function value reg + around the call to __builtin_saveregs. + + * configure (mips-sgi-irix4*, mips-sgi-irix*): Set install_with_cp. + + * c-decl.c (start_function): + Check properly for `static' function in handling -Wmissing-prototypes. + + * libgcc2.c (__main): Omit this fn if INIT_SECTION_ASM_OP. + + Sun Jan 19 13:23:13 1992 Fred Fish (fnf at sunfish) + + * amix.h (ASM_OUTPUT_ASCII): Override version in svr4.h. + + Sun Jan 19 13:16:56 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-search.c (lookup_field): Accept IS_AGGR_TYPE_CODE, not + just == RECORD_TYPE. + + * cp-class.c (finish_struct): Clear a tentative setting of + DECL_BIT_FIELD. + + * cp-decl.c (start_decl): Don't call `pushclass' for incomplete + CONTEXT. + + * cp-typeck.c (comp_target_types): Call `comp_target_parms' with + STRICT == 0, not -1. + (build_conditional_expr): Check that the target types of TYPE1 and + TYPE2 are aggr type before calling `common_base_type'. + + Sun Jan 19 04:10:16 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * configure: Fix typo inserting INSTALL=cp into makefile. + + Sat Jan 18 12:06:58 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-lex.c (build_with_cleanup): Delete obsolete function. + * cp-tree.c (break_out_cleanups): New function. + * cp-decl.c (cplus_expand_expr): Call `break_out_cleanups'. + * cp-typeck.c (build_compound_expr): Ditto. + + * cp-call.c (convert_harshness): Make any inheritance relationship + preferable to a void* conversion. + * cp-tree.h (CLASSTYPE_MAX_DEPTH): New macro. + * cp-class.c (finish_struct_bits): Set CLASSTYPE_MAX_DEPTH. + + * cp-cvt.c (build_up_reference): Don't return in ARRAY_REF case, + since we may need to adjust the return value for complex + inheritance. + + * cp-decl2.c (lang_f_options): Add recognizers for -f{no-}builtin, + -f{no-}ident, and -ansi. Also, remove unnecessary "no-*" forms. + + * cp-init.c (emit_base_init): If PEDANTIC, don't let base + initializers leak up the hierarchy. + + * cp-parse.y (structsp): Disable gratuitous error message. + + * cp-call.c (convert_harshness): Don't overlook PENALTY when + signed/unsigned differences are noted (in both POINTER_TYPE and + REFERENCE_TYPE cases). + + * toplev.c (strip_off_ending): Grok ".ii" endings (C++ preprocessed + files). + + * cp-typeck.c (build_component_ref): Add special handler when + COMPONENT is the CLASSTYPE_VFIELD name for BASETYPE. + + Sat Jan 18 08:29:58 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * cse.c (cse_insn): Don't make constant pool entries in MODE_CC modes. + + Sat Jan 18 00:28:48 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Makefile.in (install-common): Fix typo installing gcc. + + * crds.h, isi.h, newpbb.h, tti68k.h: Add #error because -m68000 + will cause a crash (I think), to ask people what to do. + + * gmicro.h (ASM_FILE_START): Don't do anything. + (TARGET_DEFAULT): Turn on the bitfield flag. + (TARGET_SWITCHES): Get rid of the bitfield options. + + * c-lex.c (readescape): No warning for \?. + + * protoize.c (munge_compile_params): Fix cast that sets compile_params. + (xmalloc, xrealloc): No longer static. + * Makefile.in (protoize, unprotoize): Add LIBDEPS as deps. + + * va-i860.h (va_arg): Use __extension__ to suppress pedantic warning. + * va-sparc.h, va-spur.h, va-pyr.h: Likewise. + + * x-irix4.h: New file. + * config.sub: Don't convert irix to sysv. + * configure (mips-sgi-irix4*): New configuration. + (mips-sgi-irix*): Renamed from mips-sgi-sysv*. + + * gcc.c (process_command): + Handle the standard_exec_prefix* before the md_*_prefix. + + * i386.h, ns32k.h (PCC_BITFIELD_TYPE_MATTERS): Defined. + + * Makefile.in (libgcc1.null): Depend on GCC_PASSES. + + * cccp.c (lookup_import, add_import): VMS kludges so they compile. + (hack_vms_include_specification): Add forward declaration. + + * stor-layout.c (layout_record): Handle BITFIELD_NBYTES_LIMITED + just like one of the things done for PCC_BITFIELD_TYPE_MATTERS. + + * x-next, x-i386mach: Deleted. + * t-libc-ok: New file. Define just LIBGCC1. + * configure (i386-*-mach, m68k-next-*): Use t-libc-ok. + + * t-svr4 (FIXINCLUDES): Defined. + * t-m88kv4 (FIXINCLUDES): Defined. + * t-svr3 (EXTRA_PARTS): Defined. + * t-i386sco (EXTRA_PARTS): Defined. + + * configure (sparc-*-sysv4*): New alternative. + + * configure (install_with_cp): New flag an alternative can set. + If host sets it, add INSTALL=cp to Makefile. + Set this for any system V, and for m68k-crds-unos. + + Sat Jan 18 23:15:08 1992 Ron Guilmette (rfg at ncd.com) + + * va-i860.h (va_list): Made __reg_base field type long* to avoid + compilation errors. + (__savereg): Add explicit cast to (__va_saved_regs *). + + Fri Jan 17 15:09:34 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * i386.h (FUNCTION_BOUNDARY): Do larger alignments for i486. + (ASM_OUTPUT_ALIGN_CODE): Same here. + (ASM_OUTPUT_LOOP_ALIGN): But not here - do word aligns as before. + + (enum reg_class): Delete classes ADREG and BREG - neither used nor + useful. Add classes FP_TOP_REG and FP_SECOND_REG. + (REG_CLASS_NAMES): Likewise. + (REG_CLASS_CONTENTS): Likewise. + (REGNO_REG_CLASS): Reflect that change. + (REG_CLASS_FROM_LETTER): Likewise. Add "t" and "u" constraints. + (CLASS_MAX_NREGS): New classes use only 1 hard reg for any mode. + + (CONST_OK_LETTER_P): Document uses of letters. + + * reg-stack.c: Add comments describing rules for asm statements + involving stack-like regs. + (asm_regs): Delete unused variable. + (fatal_for_asm): Delete unused function. + + (get_asm_operand_lengths): New function. + (constrain_asm_operands): New function. Like constrain_operands, + but records some information about the matched alternative. + + (record_asm_reg_life): New function. + (record_reg_life): If INSN is an asm statement, decode operands + and pass to record_asm_reg_life. + (record_reg_life_pat): Abort if any asm is seen here. + + (subst_asm_stack_regs): New function. + (subst_stack_regs): If INSN is an asm statement, decode operands + and pass to subst_asm_stack_regs. When handling REG_UNUSED notes, + emit the pops in the right order. + + (change_stack): New argument to insert any new insns before INSN + instead of after. All callers changed. + + (emit_swap_insn): Abort if the reg is not found in REGSTACK. + + * Makefile.in (reg-stack.o): Depends on insn-config.h. + + Fri Jan 17 16:38:32 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * toplev.c, flags.h (in_system_header): Declare here. + * c-lex.c, cp-lex.c (in_system_header): Not here. + * toplev.c (rest_of_compilation): Don't warn of unused static function + if definition is in a system header. + + * gcc.c (do_spec_1): Add missing arg in recursive call. + (link_command_spec): Don't pass -s, -S, -u*, -X, -Y*. + + Fri Jan 17 12:51:28 1992 Jim Wilson (wilson at cygnus.com) + + From Tiemann: + * rtlanal.c (reg_set_between_p): Call `reg_set_p' with INSN, not the + body of INSN so that CALL_INSNs are properly handled. + * explow.c (find_next_ref): Ditto. + + * hp800.h, hp800.md: Delete RCS Header variables. + + * reg-stack.c (replace_reg): Change `abort' to `abort ()'. + + Fri Jan 17 14:30:14 1992 Michael Meissner (meissner at osf.org) + + * caller-save.c (insert_save_restore): Don't pass a CODE_LABEL to + reg_mentioned_p when the machine has a condition code, since + CODE_LABEL's don't have the same format as normal INSN's do. + + Fri Jan 17 13:24:33 1992 Tom Wood (wood at dg-rtp.dg.com) + + * Makefile.in (unprotoize.o): Use the rm -f option. + + * cp-lex.c (check_newline): Define `used_up' as in c-lex.c. + (in_system_header): Define as in c-lex.c. + + Fri Jan 17 08:14:04 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * reorg.c (delete_from_delay_slot): Pass correct length to + emit_delay_sequence. + + * genattrtab.c (substitute_address): Handle IF_THEN_ELSE in addition + to COND. + + * expr.c (expand_builtin, case BUILT_IN_STRLEN): Correct args in + expand_expr call. + + Fri Jan 17 17:33:40 1992 James Van Artsdalen (james@raid) + + * x-i386v4 (CCLIBFLAGS): Delete macro. + (GCC-CFLAGS): Delete macro. Prevented Makefile.in from working. + + Thu Jan 16 17:03:27 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) + + * Makefile.in (cleanconfig): Also delete tconfig.h. + + * varasm.c (assemble_external): Only call ASM_OUTPUT_EXTERNAL once + for each symbol. + (assemble_external_libcall): Fix minor typo in spacing. + + * toplev.c (main): Force error if invalid -W option is used. + + Thu Jan 16 13:35:13 1992 Tom Wood (wood at dg-rtp.dg.com) + + * m88kdgux.h (CPP_PREDEFINES): Added __CLASSIFY_TYPE__ back and + noted when it would be useful. + + * m88k.h (ASM_FILE_END, ASM_OUTPUT_ASCII): Override svr4.h. + + Thu Jan 16 12:37:16 1992 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * svr4.h (SVR4): Add this back. + + * cccp.c (lookup_import): Use bcmp to compare inodes. + + * cccp.c (main): Handle -idirafter option. + + * m68kv4.h, m88kv4.h, i386v4.h, sparcv4.h, i860v4.h (CPP_PREDEFINES): + Add __svr4__ in case user programs want to distinguish. + + * cp-lex.c (check_newline): Changes like Jan 12 changes in c-lex.c. + + * Makefile.in (install-fixincludes): Renamed from `includes'. + Move comments so some shells are happier. Dep. on install-headers. + + * m88kdgux.h (CPP_PREDEFINES): Add __svr4__. Remove __CLASSIFY_TYPE__. + Add some assertions. + + * c-decl.c (init_decl_processing): Don't give arg type for abort, etc. + Always declare strlen, etc., so -O doesn't alter the warnings. + * expr.c (expand_builtin): Open-code str* or mem* or ffs if -O. + + * c-decl.c (start_function): Fix backwards test for -W* options. + + * protoize.c (GUESSPATHLEN): Treat POSIX like USG--and use just 200. + + * cccp.c (deps_output): Break line iff string is empty. + (do_include): Fix up the deps_output calls. + + * vax.c (print_operand_address): Handle form index + (reg+offset). + + * m88k.h (TARGET_VERSION): Don't use __DATE__. + + * gcc.c (default_compilers): Typos in c++-cpp-output case. + + Thu Jan 16 12:25:51 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) + + * loop.c (get_condition): In HAVE_cc0 code, generate a zero with + CONST0_RTX instead of just using const0_rtx. + + * cse.c (cse_isnsn): A CALL_INSN clobbers all fixed regs except + for ap, fp, and sp. + + Thu Jan 16 08:03:40 1992 Tom Wood (wood at dg-rtp.dg.com) + + * c-decl.c (finish_enum): Compute the precision properly if the + maximum value is negative. + + Thu Jan 16 07:40:29 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * reorg.c (try_merge_delay_insns, fill_slots_from_thread): Have + update_block put the phantom insn before THREAD. + (update_block): Update block status if WHERE, not INSN, is block head. + + Thu Jan 16 00:28:14 1992 Ron Guilmette (rfg ay ncd.com) + + * i860.c (output_fp_move_double): Fixed typo. + + * protoize.c (GUESSPATHLEN, pointer_type, const_pointer_type): + moved definitions declarations out of conditional region. + (string_list_cons, shortpath, munge_compile_params): Added casts. + (find_extern_def): Fixed string literal to avoid trigraph. + (find_rightmost_formals_list): Fixed to avoid unreached code warnings. + + * svr4.h (ASM_OUTPUT_ASCII): Fixed typo. + + Wed Jan 15 21:58:01 1992 Jeffrey A Law (law at b117b.super.org) + + * sparc.h (SELECT_RTX_SECTION): When generating PIC, place symbolic + operands in the data section. + + Wed Jan 15 21:45:09 1992 Michael Meissner (meissner at osf.org) + + * collect2.c (main): Pass any -b, -B, -m, -f, and + -V options to gcc instead of the linker, in order to allow + target switches that affect the size of pointers and search paths to + be passed through. + (main, choose_temp_base): Use TMPDIR environment variable, and the + P_tmpdir macro if defined to locate directory to put temp files. + (whole file): Reorganize so that all of the OSF/rose stuff goes at + the end of the file, rather than being scattered throughout. + (main, scan_prog_file): Invoke scan_prog_file twice, once on each + output of ld. + (scan_prog_file, read_file, write_file): On the second invocation, + rewrite the object file in place, adding a load command to put + __main in the list of initializer functions. This allows users + to put constructors and destructors into shared libraries. + (scan_prog_file): Move debug stuff and error routines to separate + functions. + + Wed Jan 15 17:59:02 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * combine.c (can_combine_p): Don't combine if DEST is still a field + assignment after we've tried to expand it. + + Wed Jan 15 16:01:13 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * regclass.c (fix_register): Don't match a null register name. + * varasm.c (decode_reg_name): Likewise. + + * i386.h (HI_REGISTER_NAMES): Give the eliminable arg pointer a + null name. + + Wed Jan 15 13:40:50 1992 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * gcc.c (default_compilers): Pass -lang-asm, not -lang-asmc, to cpp. + + * gcc.c (process_command): Don't dump md_exec_prefix in specs. + Use the md_... prefixes only if no -b. + + Wed Jan 15 13:35:09 1992 Ron Guilmette (rfg at ncd.com) + + * i386v4.h (RETURN_IN_MEMORY): Definition added. + (CPP_PREDEFINES): Added -DX86 (needed for some system headers). + (ASM_OUTPUT_DWARF_STRING): Deleted. + (ASM_OUTPUT_ASCII): Added specialized definition for i386/svr4. + + * svr4.h (SVR4): Deleted useless define. + (ASM_FILE_END): Added definition. + (ESCAPES, STRING_LIMIT, STRING_ASM_OP, ASM_OUTPUT_LIMITED_STRING): + (ASM_OUTPUT_ASCII): Generic svr4 definitions added. + + * m68kv4.h (CPP_PREDEFINES): Don't define SVR4. + * sparcv4.h (CPP_PREDEFINES): Don't define SVR4. + (ASM_OUTPUT_ASCII): Deleted obsolete definition. + + * xm-svr4.h (SVR4): Removed useless definition. + (POSIX): Added definition for protoize.c. + + * i860b.h (ASCII_DATA_ASM_OP, ASM_OUTPUT_ASCII): Moved from i860.h. + * i860v3.h (ASCII_DATA_ASM_OP): Added OS-specific definition. + * i860v4.h (ASCII_DATA_ASM_OP, ASM_OUTPUT_ASCII): + Deleted (now in svr4.h). + + * fixinc.svr4: Replaced all occurances of {1,\} in sed command + string with functional equivalents (to avoid bogus results). + + * c-lex.c (readescape): Pass thru escaped x, a, and v if -traditional. + (readescape): Pedantic warning for \?, \(, \{, and \[. + + * dwarfout.c: Updated copyright. + (fundamental_type_code): Abort for all non-fundamental types. + (type_is_fundamental): Return 0 for all non-fundamental types. + (containing_type_attribute, output_ptr_to_mbr_type_die): New functions. + (output_pointer_type_die, output_reference_type_die): Added calls to + equate_type_number_to_die_number. + (output_type): Handle OFFSET_TYPE correctly. + (output_type): Ignore LANG_TYPE (for now). + + Wed Jan 15 09:30:08 1992 Michael Tiemann (tiemann at cygnus.com) + + * All cp-* files: Remove calls to `cleanup_after_call'. + + * cp-method.c (fndecl_as_string): Add a missing space when printing + the return type. + + * cp-typeck.c (build_modify_expr): Treat arrays specially in both + INIT_EXPR and NOP_EXPR cases. Also, if we take the address NEWRHS + when it's not a SAVE_EXPR, build a new NEWRHS using that address. + * cp-tree.c (lvalue_p): Handle WITH_CLEANUP_EXPR case. + + * cp-decl.c (grokvardecl): Don't get tripped up by static class + members of incomplete type. + + Wed Jan 15 09:12:51 1992 Jeffrey A. Law (law at wombat.gnu.ai.mit.edu) + + * m68k.c (legitimize_pic_address): Re-enable code which was + mistakenly #ifdef'd out. + + Wed Jan 15 08:12:18 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * reload.c (find_reloads): Check for insn not recognized. + + * caller-save.c (reg_{save,restore}_code): New variables. + (init_caller_save): Set them. + (insert_save_restore): Just make SET for pattern of insn and set + code from reg_{save,restore}_code. + (save_call_clobbered_regs): Put restore insns before JUMP_INSN that + ends basic block, but after any other insn that ends the block. + + * sdbout.c (sdbout_symbol): Treat (mem (reg SP)) the same + as (mem (reg FP)). + + * reorg.c (mark_referenced_resources): Fix typo in last change. + (emit_delay_sequences): Update chain correctly when previous or + next insn is also a SEQUENCE. + + Wed Jan 15 08:10:29 1992 Chris Smith (cks at bach.convex.com) + + * t-convex: Use collect2 to link. + * convex.h: remove assembly output defines for old collect2. + * convex.h: define vprintf and wait macros for pcc mode boot of + collect2. + + * convex.h (ASM_OUTPUT_DOUBLE_INT): define. + + * convex.h (DEFAULT_GDB_EXTENSIONS): define as 0 until GDB version 4 + port is available. + + * convex.c (ap_reload_needed): Fix comment. + + Wed Jan 15 07:08:25 1992 Tom Wood (wood at dg-rtp.dg.com) + + * m88k.h (CONST_SECTION_FUNCTION): Trivial definition for targets + not based on svr[34].h (m88k-luna). + + * m88k.h (PREDICATE_CODES): Use it. + + * m88k.md (casesi_enter): Don't use bsr.n with -fno-delayed-branch. + * m88k.h (ASM_OUTPUT_CASE_END): The lda goes here when bsr is used. + + * m88k.c (legitimize_address): When converting a symbol_ref for + PIC, add a REG_EQUAL note. + + Wed Jan 15 06:22:34 1992 Michael Meissner (meissner at osf.org) + + * mips.h (MIPS_VERSION): Bump Meissner version # to 8. + (fcmp_op): Add function declaration. + (TARGET_FLOAT64): Support for -mfp64 switch to support the R4000 FR + psw bit, which doubles the number of floating point registers. + (TARGET_SWITCHES): Likewise. + (HARD_REGNO_NREGS): Likewise. + (CLASS_FCMP_OP): New bit for classifing floating point compares. + (PREDICATE_CODES): Add cmp2_op and fcmp_op support. + + * mips.c (various): Move extern declarations from inside of + functions to outside all functions. + (fcmp_op): Match comparison operators for floating point. + (mips_move_2words): Add -mfp64 support. + (override_options): Likewise. + (compute_frame_size): Likewise. + (override_options): Set up for fcmp_op. + (gen_conditional_branch): Redo floating point compares/branches, so + that it is like the rest of the compiler expects -- set cc0 to a + compare operator, instead of the exact test required, and put the + smarts in the branch operators to generate both the test and the + branch. + + * mips.md (cmpdf_eq, cmpdf_lt, cmpdf_le): Delete. + (cmpsf_eq, cmpsf_lt, cmpsf_le): Delete. + (cmpdf_internal): New define insn to match FP compares. + (cmpsf_internal): Likewise. + (branch_fp_true1, branch_fp_true2): Likewise. + (branch_fp_false1, branch_fp_false2): Likewise. + (branch_fp_true, branch_fp_false): New define_insns to match the + branch part of FP compares. + + Wed Jan 15 01:42:39 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) + + * unroll.c (copy_loop_body): New parameter copy_notes_from, to + correct problem with bad debug info generated for preconditioned + loops. + (unroll_loops): Fix calls of copy_loop_body to pass new parameter. + + Wed Jan 15 01:01:39 1992 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * gcc.c (main): Don't use TARGET_VERSION. + (endfile_spec, switches_need_spaces): New vars, initted from macros. + (set_spec, process_command): Read and write those vars. + (do_spec_1, process_command): Use the new vars, not the macros. + (SWITCHES_NEED_SPACES): New default macro definition. + + * Makefile.in (install-common): Install driver as gcc-$(target). + + * gstddef.h (wchar_t): Check for _T_WCHAR. + + * stmt.c (pushcase, pushcase_range): Return 5 if jump into stack level. + * c-parse.y, objc-parse.y (stmt): Print error msg for that. + * cp-parse.y: Likewise. + + Tue Jan 14 23:25:37 1992 Ron Guilmette (rfg at ncd.com) + + * dwarfout.c: Include if USG *or* POSIX. + (TREE_UID): Deleted. + (current_funcdef_number): Replacement for TREE_UID. + (dwarfout_file_scope_decl): Increment + current_funcdef_number after each funnction definition is processed. + (pending_sibling_stack_depth): Renamed globally to pending_siblings. + (pending_sibling_stack_size): Renamed to pending_siblings_allocated. + (PENDING_SIBLING_STACK_INCREMENT): Renamed PENDING_SIBLINGS_INCREMENT. + (pending_types_list, pending_types_allocated, pending_types, + PENDING_TYPES_INCREMENT, fake_containing_scope): New vars/macros. + + * dwarfout.c (total_ft_entries): Renamed to ft_entries_allocated. + (valid_ft_entries): Renamed to ft_entries. + (FT_ENTRIES_INCREMENT): Definition added. + (lookup_filename): Expand filename table (when needed) + by adding FT_ENTRIES_INCREMENT more table elements rather than + doubling current size. + (dwarfout_init): Allocate initial filename table. + + * dwarfout.c (INSN_LABEL_FMT, FUNC_END_LABEL_FMT): Use decimal format. + + * dwarfout.c (member_attribute): Rewritten for proper C++ support. + (output_array_type_die, output_set_type_die, output_entry_point_die, + output_enumeration_type_die, output_global_subroutine_die, + output_global_variable_die, output_inline_subroutine_die, + output_local_variable_die, output_member_die, output_pointer_type_die, + output_reference_type_die, output_string_type_die, + output_structure_type_die, output_local_subroutine_die, + output_subroutine_type_die, output_typedef_die, output_union_type_die): + Added calls to member_attribute (for C++). + + * dwarfout.c (inline_attribute): Test for TREE_INLINE in here. + (output_global_subroutine_die, output_local_subroutine_die): + Don't test for TREE_INLINE here. + + * dwarfout.c (output_formal_types): Fixed to handle METHOD_TYPE + nodes and to output all related type DIEs last (for SDB). + (type_ok_for_scope, output_pending_types_for_scope, pend_type): + Functions added to support C++. + (output_type, output_decl): Added `containing_scope' + parameter to handle C++ nested types. + (output_type): Don't output the type unless it's OK + for the current DIE chain (i.e. unless it's OK for the current scope). + (output_type): Output completed non-global tagged types + right away even if not finalizing. + (output_type): Use correct method to get head of chain + of C++ function members. + (output_decl): Skip first item on chain of DECL_ARGUMENTS + for a FUNCTION_DECL whose type is a METHOD_TYPE. + Suppress output of type DIEs for formal parms of a FUNCTION_DECL + until after all TAG_parameter DIEs have been output (for SDB + compatability). + Output DIEs for any LABEL_DECL nodes attached to outermost BLOCK of + a FUNCTION_DECL. + Handle LABEL_DECL nodes. + + * dwarfout.c (dwarfout_file_scope_decl): Un-pend all pending file- + scope types after each file-scope declaration is output. + (output_decls_for_scope): Un-pend all pending local types + at end of each local scope. + + Tue Jan 14 16:40:39 1992 Tim Moore (moore at fast.cs.utah.edu) + + * calls.c (expand_call): If ARGS_GROW_DOWNWARD, make slot_offset + negative and set highest_outgoing_arg_in_use to needed + 1. + (store_one_arg): If ARGS_GROW_DOWNWARD deal with negative slot_offset. + + Tue Jan 14 20:01:59 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) + + * sparc.h (TARGET_SUN_ASM, TARGET_GNU): Delete support for + obsolete and undocumented flags -msun-asm and -mgnu. + * sparc.md: Likewise. + + Tue Jan 14 19:36:21 1992 Tim Moore (moore at fast.cs.utah.edu) + + * xm-hp800.h (hpux8): define. + * hp800.h (LINK_SPEC): Conditionalize on hpux8. + (STACK_BOUNDARY): Define for snake. + (CALL_USED_REGISTERS): Shift register is special. + (HARD_REGNO_MODE_OK): Don't allow modes smaller that SImode in fp + registers. + (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Eliminate + GENERAL_OR_FP_REGS, GENERAL_OR_SNAKE_FP_REGS classes. + (FUNCTION_ARG): Handle snake fp arguments. + (ASM_DOUBLE_ARG_DESCRIPTORS): define. + (ASM_DECLARE_FUNCTION_NAME): Use above macro to get around hpux + 8.0 change. + * hp800.md (movsi, movdi): Add ! and * to constraints of anonymous + define-insns to discourage SImode values in fp registers. Don't + modify the stack pointer when moving between general and fp registers. + (mulsi): Take out pattern that matches a degenerate multiplication + by 1; it doesn't seem to be needed and causes problems. + (sar_sub): Change so that const_int isn't the first argument of + the comparison. + * hp800.c (output_fp_move_double): As above, don't modify the + stack pointer when moving between general and fp registers. + (output_block_move): Don't make one CONST_INT rtx and store + different integer values in it; cons up a "new" one for each value. + (output_floatsisf2, output_floatsidf2): Fix typos. + (output_arg_descriptor): Conditionalize for HPUX 8.0. + + Tue Jan 14 14:38:09 1992 Michael Tiemann (tiemann at cygnus.com) + + * cp-typeck.c (build_unary_op): Call readonly_warning_or_error if + ARG is TREE_READONLY (in addition to the type being TYPE_READONLY). + + * cp-init.c (maybe_adjust_addr_for_delete): If the adjustment needs + to be done, zero out the storage that held part of the cookie. + + Tue Jan 14 13:12:48 1991 Ron Guilmette (rfg at ncd.com) + + * c-decl.c (poplevel): Set TYPE_CONTEXT for each tagged type + except inside function declaration parm list. + (grokdeclarator): Set TYPE_CONTEXT for tagged type in decl parm list. + (pushtag): Don't set TYPE_CONTEXT for tagged types here. + + Tue Jan 14 06:46:37 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * global-alloc.c (global_alloc): Count multi-word pseudos correctly + in local_reg_n_refs. + (find_reg): Evict pseudos that overlap the register we take, not just + that start with that register. + + * a29k.c (a29k_debug_reg_map): New variable. + (output_prologue): Initialize it. + * a29k.h (DBX_REGISTER_NUMBER): Use that map. + + * ultrix.h (WCHAR_TYPE): Make definition be a known type. + + * final.c (final_scan_insn): Call DBR_OUTPUT_SEQEND before we + clear `final_sequence', so it can call dbr_sequence_length. + + * reload1.c (reload): Clear insn_needs once we know we have + reloads, instead of always. + Don't skip processing of reloads for CALL_INSNs when caller-save + needs a spill register. + + * flow.c (mark_used_regs, case RETURN): Insert missing test for global + registers. + + * reorg.c (mark_referenced_resources): Mark asm's as volatile + when appropriate. + + * integrate.h (struct inline_remap): New field const_equiv_map_size. + * integrate.c (expand_inline_function): Set it; make larger map. + (subst_constants): Don't reference out-of-range entry in equiv map. + * unroll.c (unroll_loop): Set const_equiv_map_size. + + See ChangeLog.4 for earlier changes. + + Local Variables: + mode: indented-text + left-margin: 8 + fill-column: 76 + version-control: never + End: diff -rc2N gcc-2.0/ChangeLog.4 gcc-2.1/ChangeLog.4 *** gcc-2.0/ChangeLog.4 Sat Feb 22 03:35:39 1992 --- gcc-2.1/ChangeLog.4 Thu Mar 5 13:59:12 1992 *************** *** 1,2445 **** - Sat Feb 22 02:09:55 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * Version 2.0 released. - - * gcc.c (do_spec_1): Handle SPACE_AFTER_L_OPTION. - * hp320.h (SPACE_AFTER_L_OPTION): Defined. - Note: for 2.1, try making a space there on all systems. - - * i386mach.h (perform_*): New macros, copied from i386rose.h. - - * Makefile.in (distclean): New target. - (realclean): Avoid duplication with self or with distclean. - (gcc.xtar.Z): Depend on gcc.xtar. - (gcc.xtar): Fixes in copying files. - - * expr.c (do_store_flag): Don't correct CODE before where it is set. - - * cp-parse.y (stmt): Pass pushcase_range all the args it wants. - - Fri Feb 21 18:14:52 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * combine.c (distribute_notes): Correctly handle the case of a - REG_DEAD note for a multi-word hard register when not all of - the words are used. - - Fri Feb 21 16:47:32 1992 Michael Meissner (meissner@osf.org) - - * mips.h (MIPS_VERSION): Change Meissner version # to 12. - (half_pic support): Move the halfpic support to halfpic.h which is - included in the decrose case, and nop the support in other MIPS - platforms. - (OPTIMIZATION_OPTIONS): Move setting caller-saves to -O2. - (OBJECT_FORMAT_COFF, EXTENDED_COFF): Define unless OSF/rose. - (INITIAL_FRAME_POINTER_OFFSET): Always recalculate the frame size, - don't rely on cached values. - - * mips.c (half_pic support): Move the halfpic support to halfpic.c, - which is only compiled for OSF/rose. - (expand_block_move): Use copy_addr_to_reg instead of copy_to_reg in - case either the source or destination is an integer constant - converted to an appropriate pointer type. - (mips_debugger_offset): Use a local variable to hold function - result. - - * decrose.h (toplevel): Include halfpic.h for halfpic support. - (PTRDIFF_TYPE): Change to 'int' to match current include files. - (WCHAR_TYPE): Change to 'unsigned int' to match include files. - (INIT_SECTION_ASM_OP): Delete, since the OSF/rose assembler doesn't - support a true initialization section. - - * encrose.h (PTRDIFF_TYPE): Change to 'int' to match current include - files. - (WCHAR_TYPE): Change to 'unsigned int' to match include files. - - * t-decrose (EXTRA_OBJS): Define as halfpic.o to provide halfpic - support. - (CONFIG2_H): Treat halfpic.h as another config file. - (halfpic.o): Add dependencies. - - * halfpic.h (new file): Common include file for systems needing the - OSF/rose half-pic shared library support. - - * halfpic.c (new file): Common support file for systems needing the - OSF/rose half-pic shared library support. Currently these are stub - functions. - - Fri Feb 21 01:34:08 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * dwarfout.c (location_or_const_value_attribute): Use DECL_RTL again. - Seems to be safer for the moment. - * function.c (instantiate_decls): Don't instantiate DECL_INCOMING_RTL. - - * dwarfout.c (output_mem_loc_descriptor): Handle CONST like SYMBOL_REF. - - * collect2.c (errno): Declare if not macro. - - * dbxout.c [MIPS]: Include gstab.h, not stab.h. - - * dbxout.c (dbxout_symbol): No longer flush leading _ for C++ syms. - - * cp-parse.y (.hush_warning): Set $$. - - * gstdarg.h: Handle _HIDDEN_VA_LIST as in gvarargs.h. - - Thu Feb 20 07:41:29 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * vax.c (reg_or_nxmem_operand): New function. - (split_quadword_operands): Add missing return type (void). - * vax.md (jlbc/jbc/jlbs/jbs): Handle QImode operands properly. - - * caller-save.c (set_reg_live): Use mode of SUBREG to see how many - hard regs are written. - - * combine.c (simplify_shift_const, case IOR, AND, XOR): Perform - logic computation in RESULT_MODE, not mode of VAROP. - - Wed Feb 19 18:32:05 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * hp320.h (PRINT_OPERAND): Support codes '$' and '&'. - - * reload1.c (reload): Add cast of enum in index. - - * vms.h (CPP_PREDEFINES): Define __GNUC__ as 2. - - Wed Feb 19 21:43:36 1992 Ron Guilmette (rfg at ncd.com) - - * dwarfout.c (output_mem_loc_descriptor): Deleted useless blank line. - (output_mem_loc_descriptor) Added code to handle CONSTs in DECL_RTL - expressions. - (dwarfout_finish): Added code to put a null string at the end of - the terminating .debug_macinfo section. - - Tue Feb 18 18:34:13 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) - - * cccp.c (main): Fix typo in comment or spacing. - * dbxout.c (dbxout_block): Likewise. - * expr.c (convert_move): Likewise. - * reload1.c (emit_reload_insn): Likewise. - * rtl.h (REG_NOTES): Likewise. - * sun4o3.h: Likewise. - * ultrix.h (CPP_PREDEFINES): Likewise. - * toplev.c (flag_no_common): Likewise. - * stmt.c (layout_type): Likewise. - * gcc.c (is_linker_dir, lookup_compiler): Likewise. - - * sched.c (schedule_block): Comment code handling USE insns as - obsolete. - - Tue Feb 18 14:44:49 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * c++: Run gcc in same dir as c++ was in, if exists there. - Use `exec' to run it. - New var `havefiles'; special message if no input files specified. - Pass through any unrecognized options. - - * g++: Now a link to c++. - - Tue Feb 18 04:54:52 1992 david d [zoo] zuhn (zoo at lynx.spa.umn.edu) - - * protoize.c (main): added support for -p flag, to specify which - gcc is the one to call for -fgen-aux-info support. - - Tue Feb 18 07:29:23 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * combine.c (try_combine): Don't clobber OTHER_INSN's PATTERN if - we aren't able to change the insn. - - * romp.md (bit_insv): Add missing CLOBBER when making pattern to - match mftb; likewise for the DEFINE_INSN. - - Tue Feb 18 01:03:41 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * rs6000.h (bss_section): Set `in_section' correctly. - - * expmed.c (synth_mult): Count second shift for alg_compound. - Count extra shift for lea case. - * m68k.h (RTX_COSTS): Reduce cost of multiply. - - * function.c (instantiate_decls): Instantiate DECL_INCOMING_RTL. - - Mon Feb 17 19:17:50 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * a29k.md (divmodsi4, udivmodsi4): Don't use reg 180 explicitly. - Instead use 'q' constraint letter. - - Mon Feb 17 16:15:02 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * global-alloc.c (global_alloc): Always call `reload'. - - Mon Feb 17 10:38:38 1992 Jim Wilson (wilson at sphagnum.cygnus.com) - - * a29k.md (movdi define_split): Use DImode in operand_subword - calls, not DFmode. - - Mon Feb 17 08:20:33 1992 Michael Tiemann (tiemann at mole.gnu.ai.mit.edu) - - * varasm.c (assemble_external): Check that DECL is some sort of - _DECL before referencing its DECL_RTL. - - Sun Feb 16 13:05:36 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-call.c (build_method_call): Add call to `assemble_external' in - case this is the first use of FUNCTION. - * cp-class.c (build_vfn_ref): Ditto for VTBL. - * cp-decl2.c (write_vtable_entries): Ditto for FN. - * cp-init.c (build_offset_ref): Ditto for T. - * cp-typeck.c (build_function_call_real): Ditto for FUNCTION. - * cp-method.c (hack_identifier): Ditto for VALUE. Also remove - action that made call to `assemble_external' when !TREE_USED (VALUE). - - * cp-lex.c (do_identifier): Remove call to `assemble_external' when - implicitly declaring ID. - - * cp-parse.y (primary): Simplify rules for calling assemble_external. - - * cp-decl.c (finish_function): For destructors, don't call - expand_expr_stmt if EXPRSTMT is VOID_ZERO_NODE. - - Sun Dec 16 23:31:54 1992 Ron Guilmette (rfg at ncd.com) - - * dwarfout.c (fundamental_type_code): Deleted gunk for handling - OFFSET_TYPEs. (They are *not* fundamental types). - (fundamental_type_code): Fixed typo. - (location_attribute, const_value_attribute): Changed to take one - rtx parameter rather than one tree parameter. - (location_or_const_value_attribute): Changed to use DECL_INCOMING_RTL - rather than DECL_RTL for formal parameters. Also changed calls to - location_attribute and const_value_attribute to provide the rtl - parameter. - (fund_type_attribute): Changed to accept an actual fundamental type - code as a parameter directly. Also changed all calls correspondingly. - (type_attribute): Separated tests for ERROR_MARK and for VOID_TYPE - and added comments. - (output_unspecified_parameters_die): Changed to take one tree param - and to generate *both* an AT_name and an AT_type attribute when the - input parameter represents of function definition. Also adjusted - all calls correspondingly. - - Sun Feb 16 00:54:10 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * fixincludes: Add #ifndef around size_t declaration in types.h. - - * varasm.c (assemble_external): Do nothing if arg isn't a decl. - - * Makefile.in (cp-parse.c): Update "expect" msg. - - * next.h (CPP_SPEC): Rename -bsd to -strict-bsd. - - * Makefile.in (mostlyclean): Add ld, mips-tfile, mips-tdump. - - * protoize.c (directory_specified_p): Don't match files in subdirs. - - * xm-rs6k-m.h: Renamed from xm-rs6000-mach.h. - * configure (rs6000-*-mach*): Changed accordingly. - - * collect2.c (handler): No error msg here. Just resend signal. - (write_c_file): Arg to write_list... is pointer. - (do_wait): Fix typo. - (scan_prog_file for non-OSF): Preserve all underscores. - - * Makefile.in (install-collect2): Install gcc in libsubdir. - - Sat Feb 15 15:26:03 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * varasm.c (decode_reg_name): Empty string is not a reg number. - - * fold-const.c (merge_component_references): NE tests against - mismatched constants forces 1, not 0, as value. - - * i386gas.h (ASM_OUTPUT_OPCODE): Convert repz to repe. - - * collect2.c: Get rid of PROTO macro; use non-prototype decls. - Don't include gstddef.h (had conflicts). Use gstdarg.h, not stdarg.h. - (xcalloc, xmalloc): Add casts. - (do_wait): Avoid macros WTERMSIG, WEXITSTATUS missing on some machines. - - * cp-typeck.c (default_conversion): Don't use initial value if BLKmode. - - * objc-actions.c (finish_objc): Fix typos in last change. - - * c-aux-info.c, dbxout.c, cccp.c (errno): Declare, if not a macro. - - * i386.md (QI bit test recognizer): Split into separate patterns - for memory and register args. Make a scratch reg for memory. - - Fri Feb 14 23:39:58 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * tree.c (get_identifier): Improve -Wid-clash message. - - Fri Feb 14 16:22:48 1992 Michael Collison (collison at osf.org) - - * i386rose.h (CPP_SPEC): Define the macros LANGUAGE_OBJECTIVE_C and - LANGUAGE_C_PLUS_PLUS if we are compiling Objective C or C++. - (INIT_SECTION_ASM_OP): Define as .init. - (CC1PLUS_SPEC): Define it. - (LINK_LIBGCC_SPECIAL): Define this to work around linker bug. - - Fri Feb 14 00:38:15 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * Makefile.in (protoize.o, unprotoize.o): g++-include is under libdir. - - * Makefile.in (enquire.o): Make the command one long line. - - * gcc.c (do_spec_1): Omit relative prefixes from -L'ing - only if RELATIVE_PREFIX_NOT_LINKDIR is defined. - * rs6000.h (RELATIVE_PREFIX_NOT_LINKDIR): Defined. - - * varasm.c (assemble_external): Test TREE_EXTERNAL. - - * jump.c (follow_jumps): If can't find chain end, return orig label - - * mot3300.h (PRINT_OPERAND): Always print 16 hex digits for a double. - - * objc-actions.c (build_module_descriptor) [NEXT_OBJC_RUNTIME]: Ret 0. - (finish_objc): Value 0 from build_module_descriptor means no ctor. - When referencing a class_name symbol, don't output a .globl for it. - (finish_objc): Put artificial refs in text section. - - * cccp.c (pedwarn_with_file_and_line): Handle -w, -W. - - Fri Feb 14 07:44:08 1992 James Van Artsdalen (james at bigtex.cactus.org) - - * i386.c (notice_update_cc): sCOND opcodes don't change the flags. - Don't record test or compares involving stack-like regs, since - final can't omits tests or compares involving such regs correctly. - - * i386.c (seq,sne,beq,bne): These opcodes use the state of - cc_status from before the curren insn. - - * reg-stack.c (stack_reg_mentioned_p): Don't make static. - - Fri Feb 14 06:27:48 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * jump.c (jump_optimize): Disable "if (...) {... x = C;} if (x) ..." - optimization; there doesn't seem to be a way to fix it. - - Thu Feb 13 18:06:06 1992 James Van Artsdalen (james at bigtex.cactus.org) - - * seq386.h (ASM_OUTPUT_OPCODE): New macro. Change "movs" into - "smov" at the start of a string move mnemonic - Sequent as(1) - doesn't handle the former. - - Thu Feb 13 17:21:26 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * c-decl.c (finish_struct): Use pedwarn for pedantic warning. - (grokdeclarator): Likewise. - * c-parse.y (component_decl_list2): Likewise. - - Thu Feb 13 22:11:36 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * combine.c (make_extraction): Default modes to byte and register - size, as appopriate, when the bitfield insn doesn't exist. - - * a29kunix.h (LINK_SPEC): Pass default option file to gld. - (LINK_LIBGCC_SPECIAL): Define to work around gld bug. - - * explow.c (copy_to_suggested_reg): Try getting mode from TARGET. - - * rs6000.h (ASM_FILE_END): New macro. - (EXTRA_SECTIONS): New section read_only_private_data. - (EXTRA_SECTION_FUNCTIONS): New function read_only_private_data_section. - (SELECT_RTX_SECTION): Always make non-toc data private, read-only. - (SELECT_SECTION): Put read-only data in appropriate sections. - - * jump.c (jump_optimize): Place branch in correct place when - optimizing "if (...) {... x = C;} if (x) ...". - (redirect_jump): Ensure jump's UID is within range of jump chain. - - * a29k.c (output_prologue): Correctly set LR1 when more than 64 - registers are needed. - - Wed Feb 12 22:22:46 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) - - * make-cccp.com: Define link as a local symbol to avoid - possible conflict with a user defined global symbol. - - * make-cc1.com: Likewise. - - Thu Feb 13 11:05:07 1992 Michael Meissner (meissner at osf.org) - - * mips.c (make_temp_file): Store created filename into a static - file-scope variable, not an auto. - (mips_asm_file_end): Use the appropriate filename in printing - errors. - - Thu Feb 13 01:15:00 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * cccp.c (skip_if_group): Skip comments after the #. - - * cccp.c (macarg): Don't assume stringify will compress spaces. - (macroexpand): In stringify, compress space only outside tokens. - - * cexp.y (exp1): Use pedwarn for comma in #if. - - * cp-decl.c (push_binding_level, pop_binding_level): - Change `inline' to `__inline'. - - * combine.c (make_compound_operation): Undo previous change. - - Wed Feb 12 18:47:47 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * function.c (instantiate_virtual_regs_1, case IF_THEN_ELSE): - Don't special case; allow all operands to be processed. The last - two operands are nontrivial on the Vax. - - Wed Feb 12 18:58:48 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * gcc.c (do_spec_1): Only absolute prefixes turn into -L's. - (link_command_spec): Handle LINK_LIBGCC_SPECIAL. - - Wed Feb 12 18:38:29 1992 Chris Smith (csmith at convex.com) - - * convex.h (DEFAULT_CALLER_SAVES): define again, bug is fixed. - * convex.h (BRANCH_COST): Define as 0, so we won't use complex - alternatives to branches (whose expansions contain branches - on convex). - - Wed Feb 12 17:23:57 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * config.sub: Accept just `hppa' for machine. - - * Makefile.in (Install-collect2): New target. - - Wed Feb 12 13:55:24 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * reorg.c (relax_delay_slots): Don't convert jump to return here. - - * configure (a29k-ultra-*): Deleted. - (a29k-*-bsd*): Merged with a29k-ultra-*. - (romp-*-mach*): Fixed typo in xmake_file name. - * xm-a29kunix.h: Renamed from xm-a29k-ult.h. - * x-a29kunix: New file. - - * reload.c (find_reloads): Don't use class from preference if it - is a single-register class. - - Wed Feb 12 13:03:16 1992 Tom Wood (wood at dg-rtp.dg.com) - - * m88k.h (FUNCTION_BOUNDARY, ASM_OUTPUT_ALIGN): Pack code tightly - when compiling crtstuff.c (flag_inhibit_size_directive). - - Wed Feb 12 10:34:09 1992 Michael Meissner (meissner at osf.org) - - * decrose.h (*_SPEC): Compress some whitespace in the specs. Also, - simpify which LANGUAGE_xxx names are defined, to be the ones uses by - the system(s). - * decstatn.h (*_SPEC): Likewise. - * iris.h (*_SPEC): Likewise. - * mips.h (*_SPEC): Likewise. - * mips-bsd.h (*_SPEC): Likewise. - * mips-news.h (*_SPEC): Likewise. - * mips-sysv.h (*_SPEC): Likewise. - - Wed Feb 12 10:34:09 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * caller-save.c (insert_save_restore): Properly check for insns that - reference CC0. - - Wed Feb 12 03:17:00 1992 Chris Smith (csmith at convex.com) - - * convex.h (DEFAULT_CALLER_SAVES): don't define, to sidestep a bug. - * convex.md (ffssi2): Comment out. - - Wed Feb 12 00:08:42 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) - - * make-libgcc2.com: Do not save .s file. - - * vms.h: Wrap #include in #ifdef L__main/endif - - Tue Feb 11 21:58:42 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) - - * libgcc2.c (DO_GLOBAL_DTORS_BODY): New macro. - - * make-l2.com: New file to build libgcc2 on VMS. - - * vms.h (DO_GLOBAL_CTORS_BODY): Replacement definition. - - * vms.h (DO_GLOBAL_DTORS_BODY): Likewise. - - * make-cccp.com: Define bison and rename as local symbols to avoid - possible conflict with user defined global symbols. - - Tue Feb 11 22:17:32 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * sched.c (attach_deaths): Don't treat PIC offset table register - specially; flow.c doesn't. - - * combine.c (make_compound_operation, case AND): We can have - a (and (subreg (lshiftrt ..) ..) ..); handle same as without SUBREG. - - * Makefile.in (HOST_CLIB, HOST_ALLOCA, HOST_MALLOC, HOST_OBSTACK): New - variables to override. - (USE_HOST_*, HOST_LIBDEPS): Use HOST_PREFIX and new variables. - (HOST_LIBS): Use HOST_CLIB. - - Tue Feb 11 21:32:07 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * Makefile.in (install-common-headers): Copy byteorder.h to - compilation dir. - - * config.sub: Allow unicos as operating system. - - * m88kv4.h (INIT_SECTION_ASM_OP): Add #progbits. - - * vax.h (DYNAMIC_CHAIN_ADDRESS): New macro. - - * c++: Propagate quoted args properly. - - Tue Feb 11 16:35:01 1992 Jim Wilson (wilson at cygnus.com) - - * fixincludes: Define TERM to `unknown', to ensure that it is - valid. Otherwise, ex may fail. - * fixinc.svr4: Likewise. - - Tue Feb 11 18:04:32 1992 Michael Meissner (meissner at osf.org) - - * decrose.h (CPP_SPEC): Define the macros LANGUAGE_OBJECTIVE_C and - LANGUAGE_C_PLUS_PLUS if we are compiling Objective C or C++. - Silicon Graphics in particular uses LANGUAGE_C_PLUS_PLUS. - * decstatn.h (CPP_SPEC): Likewise. - * iris.h (CPP_SPEC): Likewise. - * mips-bsd.h (CPP_SPEC): Likewise. - * mips-news.h (CPP_SPEC): Likewise. - * mips-sysv.h (CPP_SPEC): Likewise. - - * decstatn.h (CPP_PREDEFINES): Eliminate __ versions, since - gcc will do these automatically. Eliminate LANGUAGE_C, since it is - handled in CPP_SPEC. - - Tue Feb 11 15:38:27 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * flow.c (find_basic_blocks): Don't delete labels used in non-jumps. - - * vms.h (DO_GLOBAL_CTORS_BODY): Modify the return address - only the first time __main is called. - - * fixinc.svr4: Change headers to test __STRICT_ANSI__ instead of - testing __STDC__ != 0. - - * fixinc.svr4 (mman.h): Fix backward __STDC__ conditional. - Don't add declarations of munmap and mprotect. - - * varasm.c (output_constant): Allow empty constructor for any type. - - * dwarfout.c (ASM_OUTPUT_DWARF_DATA8): Just one definition; - test WORDS_BIG_ENDIAN "at run time". - - Tue Feb 11 09:00:01 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * reload.c (find_reloads): Don't substitute in MATCH_DUPs if we - are not generating replacements. - - Tue Feb 11 08:45:14 1992 Tom Wood (wood at dg-rtp.dg.com) - - * m88kv4.h ({CTORS,DTORS}_SECTION_ASM_OP): Fix typo. - - Mon Feb 10 22:34:47 1992 Chris Smith (csmith at convex.com) - - * convex.h(HARD_REGNO_NREGS): define correctly for 64-bit regs - - Mon Feb 10 21:50:23 1992 Michael Meissner (meissner at osf.org) - - * mips.h (MIPS_VERSION): Change Meissner version # to 11. - (CPP_SPEC): Define the macros LANGUAGE_OBJECTIVE_C and - LANGUAGE_C_PLUS_PLUS if we are compiling Objective C or C++. - Silicon Graphics in particular uses LANGUAGE_C_PLUS_PLUS. - (FP_DBX_FIRST): Change the test so that stabs in ECOFF uses the - value 38, in addition to stabs in GAS. - - * mips.md (all function units): Make the function units simpler, and - not depend on the cpu type, to work around a memory hungry - genattrtab, which attempts to grow the data segment to than 32 - megabytes. - - Mon Feb 10 16:34:11 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * convex.h (REAL_VALUE_TRUNCATE): Obsolete definition deleted. - - * config.sub (convex-*): These are BSD, not sysv. - - * dbxout.c (have_used_extensions): New var. - (dbxout_type, dbxout_type_fields, dbxout_symbol): - Set have_used_extensions when use an extension. - (dbxout_symbol): Don't use `Tt' extension unless extensions - have been used. - - Mon Feb 10 12:28:59 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * xm-a29k-ult.h: Fix typo in placement of copyright notice. - - Mon Feb 10 05:36:45 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * dbxout.c (dbxout_type): Don't use GDB extensions if they are empty. - - Mon Feb 10 00:10:20 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-class.c (finish_struct): Use DECL_CHAIN, not TREE_CHAIN to walk - through the list of methods identified by a visibility declaration. - - * cp-cvt.c (convert_pointer_to): No longer need to abort if BINFO is - not a TREE_VEC or AGGR_TYPE node. - - * cp-parse.y (stmt): Improve error handling for try/except. - - * cp-class.c (add_method): If we create RTL for a copy of METHOD, - copy the RTL to METHOD's DECL_RTL slot. - - * cp-method.c (dump_type): Print `const' and/or `volatile' for - VOID_TYPE and REAL_TYPEs, too. - - Sun Feb 9 21:07:45 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * varasm.c (assemble_integer): Pass third arg in recursive calls. - Act appropriately if word-by-word loop doesn't finish. - - * Makefile.in (bootstrap*): Don't override value of ALLOCA. - - * dbxout.c (dbxout_symbol, dbxout_parms): Do leaf function remap - only if LEAF_REG_REMAP and only in leaf functions. - - Sun Feb 9 16:46:27 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-init.c (maybe_adjust_addr_for_delete): Build final COND_EXPR - with TREE_TYPE (addr). - - Sun Feb 9 14:20:49 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * rs6000.h (rs6000_{bss,private_data,read_only}_section_name): - Add declarations. - (rs6000_text_section_asm_op): Deleted. - (ASM_FILE_START): Initialize section names and enter bss section once. - (EXTRA_SECTIONS): Add `private_data' and `bss'; - delete `global_variable'.. - (read_only_data_section): Don't form name here. - (global_variable_section): Deleted. - (private_data_section, bss_section): New functions. - (ASM_DECLARE_FUNCTION_NAME): Don't write function name with [PR]. - (ASM_OUTPUT_POLL_PROLOGUE): No longer needed. - (SELECT_{RTX_,}SECTION): Just calls data_section or - private_data_section. - (ASM_OUTPUT_LOCAL): Put in bss section. - (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Now a constant. - * rs6000.c (rs6000_text_section_asm_op): Deleted. - (rs6000_{bss,private_data,read_only}_section_name): Add definitions. - (rs6000_gen_section_name): New function. - - Sun Feb 9 08:29:21 1992 James Van Artsdalen (james at bigtex.cactus.org) - - * i386.h (REGNO_REG_CLASS): Use a lookup table: AIX can't handle - complex tertiary expressions. - (GO_IF_LEGITIMATE_ADDRESS): Simplify slightly for the AIX - compiler. - - * i386.c (regclass_map): New variable. Lookup array for - REGNO_REG_CLASS. - - Sat Feb 8 01:20:33 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * cp-parse.y (yyprint): Test __GNUC__, not __GNU__. - Use __inline, like everywhere else. - - * a29k.h, romp.h (OVERRIDE_OPTIONS): Deleted. - (OPTIMIZATION_OPTIONS): Defined, instead. - * rs6000.h (OPTIMIZATION_OPTIONS): New macro. - (OVERRIDE_OPTIONS): Don't change optimization. - - * final.c (leaf_renumber_regs_insn): No longer static. - * dbxout.c (dbxout_symbol, dbxout_parms): Call that. - - * c-decl.c (lookup_name): Do nothing special if type is error mark. - (grokdeclarator): Ignore putative type name whose type is error mark. - * c-parse.y (primary): If var type is error mark, return error mark. - - * c-typeck.c (build_array_ref): Return early if arg is error mark. - - * Makefile.in (test-protoize): Rule deleted. - - * stmt.c (emit_case_nodes): Handle just-left-subtree case - like just-right-subtree--delete mysterious code that tests cost_table. - - * varasm.c (decode_reg_name): Accept decimal number as reg name. - - * c-decl.c (finish_decl): If pop_obstacks goes to perm obstack, - call permanent_allocation. - - * gcc.c (link_command_spec): Use -lgcc, not libgcc.a. - - Fri Feb 7 16:56:17 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) - - * rs6000.h (DOLLARS_IN_IDENTIFIERS): Define to zero, because the - assembler does not accept dollar signs. - - Fri Feb 7 15:36:40 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * Makefile.in (mostlyclean): Fix name of tmp-proto.1. - - * configure: Delete excess space in assignment to srcdir. - - * cp-decl2.c (DOLLARS_IN_IDENTIFIERS): Default now 1, as in C. - - * i386gas.h (ASM_OUTPUT_LOOP_ALIGN): New macro. - (ASM_OUTPUT_ALIGN_CODE): Use 16-byte boundary on 486. - - * m68k.h (TRANSFER_FROM_TRAMPOLINE): Use operands for the memrefs - to avoid dependence on assembler syntax. - - Fri Feb 7 10:26:32 1992 Michael Meissner (meissner at osf.org) - - * Makefile.in (EXTRA_OBJS): New variable for extra object files - needed when linking cc1, cc1plus, and cc1objc. - - Fri Feb 7 07:34:03 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * reload1.c (set_label_offsets, reload_as_needed): Recompute - num_not_at_initial_offset when we pick up offsets from offsets_at. - - * unroll.c (unroll_loop): Copy initial and final values to avoid - sharing. - - * cse.c (simplify_relational_operation): Complete last change by - correctly handling <= and >=. - - Thu Feb 6 23:57:02 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-decl.c (grokdeclarator): Invert sense of warning about - initialized extern vars, since in C++, const has funny semantics. - - Thu Feb 6 15:12:02 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * cse.c (simplify_relational_operation): Test properly for floating - equality; don't deduce this from < and >. - - * xm-mips.h (alloca): Don't define or declare if MIPS_OVERRIDE_ALLOCA. - * xm-irix4.h (MIPS_OVERRIDE_ALLOCA): Defined. - - * m68k.h (TRANSFER_FROM_TRAMPOLINE): Use explicit reg var - to avoid dependence on register name syntax. - - * mot3300.h (PUT_SDB_START_DIM, PUT_SDB_NEXT_DIM, PUT_SDB_LAST_DIM): - New macros. - (PUT_SDB_DIM): Deleted. - (PRINT_OPERAND): Handle %$ and %&. - (ASM_OUTPUT_OPCODE): Handle f%$move and f%&move. - - * gstdarg.h: If not __GNUC__, use system's stdarg.h. - - Thu Feb 6 22:36:36 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) - - * vms.h (DEFAULT_GDB_EXTENSIONS): Define as 0. - - Thu Feb 6 13:32:37 1992 Michael Meissner (meissner at osf.org) - - * mips.h (MIPS_VERSION): Set Meissner version # to 10. - (flag_half_pic, mips_branch_likely): New global variables. - (call_memory_operand): New function declaration. - (half_pic_encode_section_info): Likewise. - (mips_constant_address_p): Likewise. - (mips_debugger_offset): Likewise. - (CC1_SPEC): Make OSF/1 -pic-xxx switches to -mhalf-pic, which is - currently undergoing development. - (DEBUGGER_AUTO_OFFSET): Emit correct information if frame pointer is - omitted. - (DEBUGGER_ARG_OFFSET): Likewise. - (TARGET_SWITCHES): Add -mabicalls and -mhalf-pic switches. - (PIC_OFFSET_TABLE_REGNUM): Define as the GP register ($28). - (EXTRA_CONSTRAINT): Add 'S' constraint for half-pic references. - (CONSTANT_ADDRESS_P): Call mips_constant_address_p. - (ENCODE_SECTION_INFO): Reorder test to test optimize first, and to - call half_pic_encode_section_info if half pic. - (PREDICATE_CODES): Add call_memory_operand. - - * mips.c (flag_half_pic): New global variable to indicate to produce - half-pic output for OSF/rose. - (mips_branch_likely): New global variable to indicate the branch - should use the branch likely form of the instruction. - (mips_sw_reg_names): Use $fp instead of fp, since regdef.h no longer - defines fp. - (call_memory_operand): New function to return TRUE if the argument - is a valid MEM for a call instruction. - (mips_move_1word): Emit comment in la of half-pic addresses as a - temporary flag to put the right code down. - (mips_constant_address): New function to determine if something is a - constant address or not. Add stub code for -mhalf-pic. - (override_options): Set flag_half_pic if -mhalf-pic. - (override_options): Mark %? as valid for print_operand. - (mips_debugger_offset): New function to correct the offset for - variables and arguments if the frame pointer has been omitted. - (print_operand): %? now emits a 'l' if mips_branch_likeley is set. - (mips_asm_file_start, function_prologue): If -mabicalls, emit the - pseudo ops that the Pyramid System V.4 port seems to want. - (compute_frame_size): Reserve space for saving GP if -mabicalls. - (half_pic_encode_section_info): Stub function for encoding whether - or not to generate a half pic reference. - - * mips.md (type attribute): Add pic attribute. - (cpu attribute): New attribute to get the CPU type. - (branch_likely attribute): New attribute to say whether or not we - can use branch likely instructions. - (define_delay): Note that we can annull false branches if -mips2. - (memory function unit): Add pic in addition to load. - (various function units): Use the cpu attribute. - (branch patterns): Support branch likely instructions if -mips2. - (call, call_internal): Use call_memory_operand instead of - memory_operand. If -mhalf-pic put function address in a register. - (call_value, call_value_internal): Likewise. - - * decrose.h (INIT_SECTION_ASM_OP): Define as .init. - - Thu Feb 6 10:07:17 1992 Tom Wood (wood at dg-rtp.dg.com) - - * m88k.c (preserve_registers): Change to walk the epilogue delay - insns in the forward rather than reverse order (for reorg.c change). - - Thu Feb 6 02:54:28 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * cse.c (simplify_binary_operation, case PLUS): Don't make - a (const (plus X Y)) with X a CONST_INT. - - * fixincludes: Simplify egrep command. - - Thu Feb 6 01:11:28 1992 Mark Eichin (eichin at cygnus.com) - - * cp-lex.c (process_next_inline): if we get a "parse error at end of - saved function text", set yychar to something that - restore_pending_input will digest (if it thinks input is still - pending, it will abort, but we've already reported the problem to - the user.) - - Wed Feb 5 18:42:56 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * reorg.c (fill_simple_delay_slots): When filling delay slots by - searching backward, put each new insn we find at the head of the - delay list instead of at the tail. - - * cse.c (fold_rtx): When associating operations, avoid infinite - recursion if the new expression contains our operand. - - Wed Feb 5 21:18:06 1992 Mark Eichin (eichin at cygnus.com) - - * cp-decl.c (globalize_nested_type): If the type isn't found at all, - this is an anonymous forward reference, so permit it. - Abort if type is already globally defined. - - Wed Feb 5 18:01:12 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * varasm.c, hp800.h, i386.h, m88k.h, mips.h, romp.h, vms.h: - (ENCODE_SECTION_INFO): Renamed from ENCODE_SEGMENT_INFO. - - * sparc.md (nonlocal_goto): Copy static chain into - virtual_stack_vars_rtx, not frame pointer itself. - (nonlocal goto return recognizer): Jump to %o0+0. - - * toplev.c (main): Fix test for -Wid-clash. - - Wed Feb 5 16:58:15 1992 Ron Guilmette (rfg at ncd.com) - - * dwarfout.c (dwarfout_init): Add two words containing the starting - and ending address of the .text section for this compilation unit to - the special initial entry in the .debug_srcinfo section. - - Tue Feb 4 14:51:16 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * dbxout.c (dbxout_symbol): Handle DBX_OUTPUT_CONSTANT_SYMBOL. - (dbxout_block): Handle DBX_OUTPUT_CATCH. - - * cccp.c (lookup_import, add_import, do_include): - Use bcmp and bcopy to access st_ino and ->inode fields. - - * dbxout.c (dbxout_init): Pass syms to DBX_OUTPUT_STANDARD_TYPES. - - * fold-const.c (operand_equal_p): Check that modes match. - (comparison_equiv_p): New function. - (fold): Use that when converting ?: to min_expr or max_expr. - - * c-common.c (c_expand_expr_stmt): Test for ERROR_MARK as type. - - Tue Feb 4 12:03:26 1992 Michael Tiemann (tiemann at cygnus.com) - - * stmt.c (expand_end_case): Don't crash if function called - is not an ADDR_EXPR. - - Tue Feb 4 14:17:22 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * expr.h ({float[sd]i[sd]f,fix[sd]f[sd]i,fixuns[sd]f[sd]i}_libfunc): - New declarations. - * optabs.c: Define them. - (expand_float, expand_fix): Use them instead of making a new - SYMBOL_REF each call. - (init_optabs): Initialize them. - - Tue Feb 4 00:27:35 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * Makefile.in (protoize.1, unprotoize.1): Rename temp files < 14 chrs. - - * cccp.c (skip_if_group): Make unknown cmd name a pedantic warning. - - Mon Feb 3 18:10:41 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * romp.h (LEGITIMATE_CONSTANT_P, ENCODE_SEGMENT_INFO): Use - SYMBOL_REF_FLAG. - - * x-romp-mach: New file. - * configure (romp-*-mach*): New alternative. - - Mon Feb 3 16:43:55 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * cp-typeck.c (warn_for_assignment): Print arg num in origin 1. - - * sparc.md (nonlocal_goto trap recognizer): Fix opcode spelling. - - * function.c (fix_lexical_addr): Properly search for correct display. - - * romp.h (OVERRIDE_OPTIONS): Don't set flag_omit_frame_pointer. - - Mon Feb 3 11:11:58 1992 Michael Tiemann (tiemann at cygnus.com) - - * gcc.c (@c++-cpp-output): Delete extraneous "}}}" at the end of the - rule. - - Mon Feb 3 11:38:19 1992 Ron Guilmette (rfg at ncd.com) - - * dwarfout.c (dwarfout_init): Generate an initial 2-word entry in the - .debug_srcinfo section containing the addresses of the starts of the - .line and .debug_sfnames sections. Generate it after the initial entry - for the .line section. - - * dwarfout.c [DWARF_TIMESTAMPS]: Ensure time_t and time declared. - (dwarfout_init): Make third word of initial .debug_srcinfo entry be - the compilation date/time if DWARF_TIMESTAMPS is defined, or else -1. - - * dwarfout.c (dwarfout_init): Output compilation directory name as - the first thing in the .debug_sfnames section. - - Mon Feb 3 04:12:51 1992 James Van Artsdalen (james at bigtex.cactus.org) - - * Makefile.in (install-dir): `parent' is a shell variable. - - Mon Feb 3 09:43:51 1992 Tom Wood (wood at dg-rtp.dg.com) - - * m88k.h (EXTRA_SECTIONS): Use init and fini sections from svr3.h, - but only when using svr3.h. - - Sun Feb 2 19:50:29 1992 James Van Artsdalen (james at bigtex.cactus.org) - - * i386.h (ADDRESS_COST): New macro. - - Sun Feb 2 17:08:47 1992 Michael Meissner (meissner at osf.org) - - * mips.c (simple_memory_operand): Don't recognize references to - variables in .sdata or .sbss, which has the effect of not putting - stores into delay slots. This fixes a bug and also doesn't temp the - MIPS linker from trying to put 4 instructions into the delay slot - when it rewrites the function as a PIC function. - - Sun Feb 2 16:58:11 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Do ON_EXIT last. - - * Makefile.in (install-dir): Create the parent of mandir if nec. - - * real.h (REAL_VALUE_TRUNCATE): sizeof says what cast to float does. - - * dbxout.c (DBX_OUTPUT_MAIN_SOURCE_DIRECTORY): New parameter macro. - (DBX_OUTPUT_MAIN_SOURCE_FILENAME, DBX_OUTPUT_SOURCE_FILENAME): - (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Likewise. - These are used in place of ASM_... - * newpbb.h (DBX_OUTPUT_MAIN_SOURCE_FILENAME): Macro renamed. - (DBX_OUTPUT_SOURCE_FILENAME): Likewise. - * next.h (DBX_OUTPUT_MAIN_SOURCE_DIRECTORY): Macro renamed. - (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Likewise. - - Sun Feb 2 12:51:54 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-typeck.c (build_component_ref_1): Call `compute_visibility' - with a BASETYPE_PATH, not a TREE_LIST. - - * cp-class.c (build_vtable_entry): Apologize if we cannot build a - proper vtable because of builtin liminations. - - Sun Feb 2 07:30:08 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * reload.c (combine_reloads): Don't combine two reloads with different - secondary reloads; copy secondary reload to combined reload. - - * cse.c (cse_main): PIC_OFFSET_TABLE_REGNUM is not clobbered by calls - if -fpic or -fPIC. - * reorg.c (mark_target_live_regs): Likewise. - * sched.c (attach_deaths): Likewise. - - * flow.c (find_basic_blocks): Don't separate a CALL_INSN from - following CLOBBER insns. - - * function.c (use_variable, use_variable_after): Don't interpret - reference to internal arg pointer as variable-sized object. - (expand_function_start, expand_function_end): Add USE for virtual - arg pointer if stupid alloc and it is not the real arg pointer. - - * flow.c (insn_dead_p, mark_set_1, mark_used_regs): Don't treat - ARG_POINTER_REGNUM specially if it isn't fixed. - * sched.c (attach_deaths): Likewise. - * reorg.c (mark_target_live_regs): Likewise; also make set of regs - clobbered on call agree with cse and flow. - - * function.c (fix_lexical_addr): Rework to look for AP references - using internal_arg_pointer; make some related cleanups. - * expr.c (expand_expr, case VAR_DECL, SAVE_EXPR): Treat - inline_function_decl just like current_function_decl. - * stmt.c (expand_end_bindings): When restoring arg pointer, restore - into the virtual form so we will subtract the proper offset, since - the saved value includes the offset. - - Sat Feb 1 14:41:34 1992 Ken Raeburn (Raeburn@Cygnus.COM) - - * cp-pt.c (end_template_decl): For method template, no longer call - popclass; it isn't needed any more. If after processing template - we're not at the global binding level, throw away any other binding - levels, rather than aborting. Also deleted some other unused code. - - Sat Feb 1 09:13:47 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * xm-rs6000-mach.h, rs6000-mach.h: New files. - * configure (rs6000-*-mach): New option. - - Sat Feb 1 00:57:24 1992 James Van Artsdalen (james at bigtex.cactus.org) - - * i386.c: Include tree.h - (symbolic_operand): New predicate function. - (symbolic_reference_mentioned_p): New function. - (legitimize_pic_address,emit_pic_move): New functions. - (function_prologue): Delete unused variable nregs. - If the PIC reg is used, save the old contents and initialize with - a pointer to the GOT. - (simple_386_epilogue): Count the PIC reg if it is used. - (function_epilogue): Delete unused variable "insn". Restore the - original contents of the PIC reg if it was used. - - (output_pic_addr_const): New function to handle PIC symbol - reference suffixes. - (print_operand_address): Use that if flag_pic is true. - (print_operand): Likewise. Don't print a prefix in front of any - constant if the 'P' code is used. - - (output_387_binary_op): abort if the op is not one we handle. - - (maximum_field_alignment): New variable. - (handle_pragma_token): New function. Handle `weak' and `pack'. - - * i386.h (CONDITION_REGISTER_USAGE): New macro. Mark PIC reg as - fixed and call used if flag_pic is true. - (PIC_OFFSET_TABLE_REGNUM): New macro. - (FUNCTION_PROFILER): Output PIC compatible code if flag_pic. - (INITIAL_ELIMINATION_OFFSET): Count the PIC reg if it is used. - - (GO_IF_LEGITIMATE_ADDRESS): If flag_pic is true, reject bare - label or symbol references, but allow constant pool references. - In all cases, don't bother to check for a constant as the first - operand of a PLUS. - (LEGITIMIZE_ADDRESS): Call legitimize_pic_address for symbolic - references if flag_pic is true. In all cases, HImode regs are not - valid memory pointers. - (LEGITIMATE_PIC_OPERAND): New macro. - (SYMBOLIC_CONST): New macro. - (ENCODE_SEGMENT_INFO): New macro to notice static variables. - (CONST_COSTS): Symbolic constants cost more if flag_pic is true. - - * i386.md (movsi): Use define_expand. Call emit_pic_move for - symbolic constants if flag_pic is true. - (divmodM4,udivmodM4): Change predicates so that only regs are - allowed in operands that can't be a mem. Avoids reload - congestion. - (indirect_jump): Allow any reg or mem as operand, not just reg 0. - (casesi): New insn, only used if flag_pic is true. - (call,call_pop,call_value,call_value_pop): Use define_expand to - record if this function ever emits a call, which will implicitly - use the PIC address register. - - * svr4.h (SELECT_SECTION): Any item whose initial value involves - linker relocation must go in the data section if flag_pic is true. - - * i386v4.h (ASM_OUTPUT_ADDR_DIFF_ELT): Output in PIC style. If - flag_pic is false, ADDR_DIFF_VECs are not output and this is not - used. - (JUMP_TABLES_IN_TEXT_SECTION): New macro. - - (WEAK_ASM_OP,DEF_ASM_OP): New macros. - (maximum_field_alignment): New variable. Declare here. - (PCC_BITFIELD_TYPE_MATTERS): New macro. Value depends on - maximum_field_alignment. - (BIGGEST_FIELD_ALIGNMENT): New macro. Likewise. - (HANDLE_PRAGMA): New macro. - (ASM_OUTPUT_ALIGNED_LOCAL): New macro. - - Sat Feb 1 00:15:41 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * flow.c (flow_analysis, find_basic_blocks): - If have nonlocal labels, calls end basic blocks. - Each call can jump to each nonlocal label. - Pass extra arg to find_basic_blocks. - * function.c (nonlocal_label_rtx_list): New function. - - * dbxout.c (dbxout_init): Vars wd and wd_gotten moved to top level - and renamed to cwd and cwd_gotten. - - * c-decl.c (start_function): -Wmissing-prototypes warns if static - function was previously used without a prototype. - - * loop.c (find_and_verify_loop): Initialize uid_loop_num[0]. - (loop_optimize): Give up fast if no loops. - - * stmt.c (expand_end_bindings): Don't adjust fp in nonlocal goto hndlr - if there is a nonlocal_goto insn. - - * Makefile.in (cccp.o): Use just libdir in GPLUSPLUS_INCLUDE_DIR. - - * gcc.c (do_spec_1): Supply missing arg in some recursive calls. - - Fri Jan 31 21:50:03 1992 Jeffrey A. Law (law at wombat.gnu.ai.mit.edu) - - * m68k.h (OVERRIDE_OPTIONS): -fPIC is only supported on the 68020 - and later cpus. Give an error if -fPIC is tried on a 68000. - - Fri Jan 31 21:39:33 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * flow.c (find_auto_inc): If emitting a move insn in front of the - first insn in a block, update basic_block_head. - - * caller-save.c (init_caller_save): Correctly check for case where the - save or restore insns aren't recognized. - - Fri Jan 31 21:02:35 1992 Mark Eichin (eichin at cygnus.com) - - * cp-decl.c (pushtag): when calling pushdecl, if we're in a - class_binding_level just do a pushdecl_class_level. Otherwise - pushdecl gets called multiple times on class-nested enums, which - short circuits the name list in the global_binding_level. - - Fri Jan 31 00:14:20 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * stmt.c (expand_goto): Use nonlocal_goto pattern if it exists. - * sparc.md (nonlocal_goto): New pattern. - Also nameless pattern for the special trap insn. - - * gcc.c (S_ISDIR): Add default definition. - - * function.c (expand_function_end): - Set up arg_pointer_save_area at start of function. - - * c++: Accept -nostdlib, not -nostinc. - - * va-sparc.h: If GCC v1, define __extension__ as nothing. - * va-i860.h, va-pyr.h, va-spur.h: Likewise. - - * cp-class.c (finish_struct): Fill in DECL_ALIGN of vtable field. - - * regclass.c (reg_class_record): - Don't follow indirect loops in constraints. - - * function.c, expr.h (current_function_internal_arg_pointer): New var. - * function.c (assign_parms): Set it. - (push_function_context, pop_function_context): Save and restore it. - * expr.c (expand_builtin): Use it. - * function.h (struct function): New slot to save it in. - - * cse.c (cse_main): Calls do clobber arg pointer if not fixed. - - * hp320.h (HAVE_ATEXIT): New definition. - - * Makefile.in (ALL_CPPFLAGS): New variable. - Use in all compile steps instead of CPPFLAGS. - (X_CPPFLAGS, T_CPPFLAGS): New vars, used in ALL_CPPFLAGS. - * x-vax (X_CPPFLAGS): Use this instead of X_CFLAGS. - - * stmt.c (expand_end_bindings): Fix typo. - - Fri Jan 31 12:15:09 1992 Ron Guilmette (rfg ay ncd.com) - - * dwarfout.c (LINE_LAST_ENTRY_LABEL): Definition added. - (dwarfout_finish): Put a label on the last .line section entry. - (dwarfout_finish): Make first word of final .debug_srcinfo record - contain the offset of the final .line section entry. - - Fri Jan 31 10:31:44 1992 James Van Artsdalen (james at bigtex.cactus.org) - - * cp-tree.c (__eprintf): Make definition match assert.h - declaration. - - Thu Jan 30 23:17:11 1992 Per Bothner (bothner at cygnus.com) - - * c++: The flags -c, -S, or -E suppress passing -lg++ - to gcc. (Otherwise, gcc prints a warning.) - - Thu Jan 30 21:10:02 1992 Ron Guilmette (rfg at ncd.com) - - * dwarfout.c (dwarfout_init): Fix generation of initial .debug_aranges - entry to be Dwarf Version 1 compliant. - - Thu Jan 30 15:51:27 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) - - * i386sun.h (LINK_SPEC): Delete useless %{-Bstatic} term. - * sun2o4.h (LINK_SPEC): Likewise. - * sun3.h (LINK_SPEC): Likewise. - * sparc.h (LINK_SPEC): Delete useless %{Bstatic} term. - - * cccp.c (default_include): Delete use of obsolete - NO_STANDARD_INCLUDE_DIR macro. - * protoize.c (default_include): Likewise. - - * Makefile.in (libgcc1.null): Delete dummy.o and dummy.c. - - Thu Jan 30 15:34:06 1992 Michael Meissner (meissner at osf.org) - - * gstdarg.h: Include va-mips.h on MIPS systems. - - * va-mips.h (va_start): Provide alternate definition when included - via stdarg.h. - (va_arg): Use __alignof(...) instead of sizeof(...) to determine - whether or not to dword align the argument pointer. - - Thu Jan 30 13:06:36 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * Makefile.in (install-common): Get c++ and g++ from srcdir. - - * i860.h (FIXED_REGISTERS): Arg pointer is no longer fixed. - - * assert.h (__eprintf): Add const to string args in GCC ANSI case. - - * Makefile.in (cccp.o, protoize.o, unprotoize.o): - Define LOCAL_INCLUDE_DIR based on $(prefix). - - * stmt.c (expand_end_bindings): Arg pointer needs no special - treatment if not fixed. - - * cp-parse.y, c-lex.c (yyerror): - Avoid sign-extension of characters in error messages. - - Thu Jan 30 11:39:56 1992 Ron Guilmette (rfg at ncd.com) - - * dwarfout.c (dwarfout_finish): Fix generation of .debug_pubnames - terminating entry to be 4-bytes of zero followed by a null string. - - Thu Jan 30 09:30:19 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * rs6000.c (ccr_bit): Fix typo causing reference to possibly - undefined operand. - - * rs6000.h (ASM_SPEC): Remove until new AIX assembler is available. - (ASM_OUTPUT_POOL_PROLOGUE): Add missing "." in csect name. - (ENCODE_SEGMENT_INFO): Deleted. - (ASM_OUTPUT_EXTERNAL): Move code from ENCODE_SEGMENT_INFO here, - using permalloc instead of putting name into saveable_obstack. - Re-enable macro. - (ASM_OUTPUT_EXTERNAL_LIBCALL): Re-enable. - - Wed Jan 29 21:50:26 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * rs6000.h (ASM_SPEC): Add -u, now require new /bin/as for AIX. - (ASM_OUTPUT_EXTERNAL, ASM_OUTPUT_EXTERNAL_LIBCALL): No longer needed. - - * rs6000.h (ENCODE_SEGMENT_INFO): New macro; add [RW] or [DS] to name. - (RS6000_OUTPUT_BASENAME): New macro. - (ASM_OUTPUT_*): Use it instead of assemble_name when required. - (ASM_OUTPUT_POOL_PROLOGUE): Remove trailing [RW] or [DS]. - * rs6000.c (print_operand, case 'z'): New case, for name in CALL_INSN. - (output_toc): Use RS6000_OUTPUT_BASENAME instead of assemble_name - for toc entry name. - * rs60000.md (call): Use %z. - - Wed Jan 29 17:17:42 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-init.c (build_member_call): Fix bug involving static members - that are function pointers. - - Wed Jan 29 13:25:18 1992 Tom Wood (wood at dg-rtp.dg.com) - - * gcc.c (do_spec_1): For %D, only add -L options that are relevant. - (is_linker_dir): Determine if a -L option is relevant. - - Wed Jan 29 00:57:55 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * configure: Turn ns32k alternatives back on. - - * Makefile.in (getopt.o, getopt1.c): Join two lines into one. - - * x-i386v4, x-i860v4 (GCC_CFLAGS): Add missing `-B./'. - - * reload.c (find_dummy_reload, push_reload): Don't reuse dying input - reg as a reload if it is a fixed reg. - - * c-tree.h (C_MISSING_PROTOTYPE_WARNED): Deleted since unused. - - Wed Jan 29 00:42:34 1992 Tim Moore (moore at fast.cs.utah.edu) - - * hp800.c (print_operand): Handle INSN_ANNULLED_BRANCH_P in '*' - operand type. - * hp800.h (DEFAULT_GDB_EXTENSIONS): Define as 0. - * hp800.md (cmpsi): Change arith_operand to arith5_operand. - (bCC patterns): Delete pattern that matches a compare with a - constant first operand. Change arith_operand to arith5_operand. - (fp branches): Change type to cbranch. - - * function.c (assign_parms): Set current_function_arg_offset_rtx - correctly for ARGS_GROW_DOWNWARD. - * gstdarg.h: Include va-hp800.h. - * va-hp800.h: Complete rewrite. - - Tue Jan 28 17:04:38 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) - - * varasm.c (make_decl_rtl): Delete unused var `i'. - - * c-convert.c (convert_to_pointer): - Abort if no integer type is as wide as a pointer. - - * gcc.c (default_compilers, .i case): Add error message for -pg - and -fomit-frame-pointer incompatibility. - - * Makefile.in (install-common): Install c++ and g++ shell scripts in - bindir. - - Tue Jan 28 15:44:10 1992 Michael Collison (collison at osf.org) - - * x-encrose (OLDCC): changed to $(GNU_ROSE_BIN)/gcc - - * ns32k.h: Added trampoline code. - - Tue Jan 28 14:19:52 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * rtl.def (UNSPEC, UNSPEC_VOLATILE): New RTL codes. - * cse.c (canon_hash): UNSPEC_VOLATILE operations are volatile. - * loop.c (invariant_p): Likewise. - * reorg.c (mark_referenced_resources): Likewise. - * sched.c (sched_analyze_2): Likewise. - * rtlanal.c (volatile_refs_p, side_effects_p, may_trap_p): Likewise. - (reg_referenced_p): Support UNPEC and UNSPEC_VOLATILE. - - Tue Jan 28 11:50:35 1992 Michael Meissner (meissner at osf.org) - - * mips.c (toplevel): Add include of , since isdigit is - used. - - Tue Jan 28 05:47:08 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-decl.c (xref_tag): Addition to eichin's Jan 25 change. If REF - is extant, and it's seen in the global scope outside of - CLASS_BINDING_LEVEL, set its IDENTIFIER_GLOBAL_VALUE if NULL. - - * cp-class.c (pushclass): Forcibly remove any remnants of incomplete - type that was previously pushed. - - * cp-decl.c (various places): Remove all error messages about C++ - constructs being invalid in C language context; extern "C" is a - linkage specifier--no more. - - * cp-method.c (dump_type_prefix,dump_type): Never need to output - `unsigned' since its always part of an unsigned integer type name. - (build_overload_name): Change test for unsigned to use - `unsigned_type' instead of examining TREE_UNSIGNED. - - * cp-call.c (ideal_candidate): Don't convert PARMS in place if - BASETYPE is NULL_TREE. - - Tue Jan 28 02:21:31 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * c-decl.c (grokdeclarator): Use `auto' for nested fn fwd decls. - - * g++: New file. - - * fixincludes: - Convert machine names in #if's to have underscores. - Fix specific files stdlib.h, locale.h, hsfs/... for Sunos 4.1. - * fixinc.svr4: Convert machine names in #if's to have underscores. - - * gcc.c (do_spec_1): For %D, also make -L's for startfile_prefix. - Also append the machine - - * fold-const.c (fold_convert): Properly handle real-to-real case. - - * configure (i486-*-sysv4*): New alternative. - - Tue Jan 28 00:37:24 1992 Ron Guilmette (rfg at ncd.com) - - * dwarfout.c (location_attribute): Fix handling of objects which - were optimized out of existance for Dwarf Version 0 compliance. - - Tue Jan 28 00:42:57 1992 James Van Artsdalen (james at bigtex.cactus.org) - - * Makefile.in (mostlyclean): Delete stack dump files too. - - Mon Jan 27 18:26:27 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * rs6000.h (HAVE_ATEXIT, NO_DOLLAR_IN_LABEL): Now defined. - - Mon Jan 27 13:32:51 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * libgcc2.a (L_exit): Declare __CTOR_LIST__ and __DTOR_LIST__ - with length 2; get rid of __CTOR_END__ and __DTOR_END__. - (L_ctor_list, L_dtor_list): New library members. - - * cccp.c (main): Add terminating null, then call trigraph_pcp. - - * fixincludes, fixinc.svr4: Fail unless an arg was given. - * Makefile.in (install-fixincludes): Pass output dir as argument. - - * Makefile.in: Renamed libgcc[12] to libgcc[12].a. - Likewise for tmplibgcc[12]. - - * toplev.c (rest_of_decl_compilation): Treat all fcns as if external. - - * Makefile.in (TAGS): Do the work in srcdir. - Include c-parse.h in files to move. - - Mon Jan 27 10:54:24 1992 Jim Wilson (wilson at sphagnum.cygnus.com) - - * cccp.c (get_filename): Don't pass -1 file descriptor to close. - - Mon Jan 27 00:26:33 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-decl.c (start_function): Preserve TREE_TYPE of RESULT_DECL, in - case we have a named return value. - (finish_function): Restrict the cases under which we build - `no_return_label'. Use CURRENT_FUNCTION_RETURN_VALUE to eliminate - the generation of needless cleanups when functions end with a return - stmt. No longer zeros out CLEANUP_LABEL. Also, call `emit_jump' - instead of `expand_null_return' in case NO_RETURN_LABEL is - non-NULL. - - * cp-decl2.c (grokfield): Don't specially hack static member - function names. - - * cp-except.c (cplus_expand_raise): Test correct predicate that we - have a non-null value return. - (cplus_expand_{throw,reraise}): Ditto. - - * cp-typeck.c (c_expand_return): Handle case where named return - value has incomplete type. - - Sun Jan 26 20:50:55 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-parse.y (LC): Fix rule to use `push_obstacks_nochange'. - (structsp): Use `pop_obstacks'. - - Sun Jan 26 17:39:15 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * c-parse.y (LC): Use push_obstacks_nochange and always call - end_temporary_allocation. - (structsp, template_instantiate_once): After LC, use pop_obstacks. - - * c-decl.c (grokdeclarator): - Static function decl within a function is not external. - - Sun Jan 26 08:14:53 1992 Michael Meissner (meissner at osf.org) - - * mips.h (MIPS_VERSION): Bump meissner version # to 9. - (enum processor_type): Delete PROCESSOR_R2000, since a r2000 - schedules just like a r3000. - (mips_isa, mips_isa_string, mips_cpu_string): New global variables. - (MD_EXEC_PREFIX): If not defined, define as "/usr/lib/cmplrs/cc/". - (TARGET_SWTICHES macros): Move setting the processor from - TARGET_SWITCHES to TARGET_OPTIONS. Also, delete the -mfixed-ovrfl - switch, and move -mwc8/-mwc16 to not use any bits, since we can't - support these in GCC 2.00. Readjust the positions the bits are in. - (TARGET_OPTIONS): Define to add switches -mcpu=x to set which - processor type to schedule for, and -mipsx to specify the - instruction set architecture level. - (BRANCH_LIKELY_P): New macro, true if MIPS ISA >= 2. - (HAVE_64BIT_P): New macro, true if MIPS_ISA >= 3. - (HAVE_SQRT_P): New macro, true if MIPS_ISA >= 2. - (BRANCH_COST): Define as 2 if r4000/r6000, 1 otherwise. - (ASM_OUTPUT_SKIP): Eliminate OSF/1 gas work around. - - * mips.c (mips_isa, mips_isa_string, mips_cpu_string): New global - variables. - (print_options): Print CPU and ISA level. - (override_otpions): Handle TARGET_OPTIONS setting cpu and ISA. - (override_options, print_operand): %: is no longer supported, since - -mfixed-ovfl is eliminated. - - * mips.md (type attribute): Add fsqrt. - (all define_function_units): Redo, to add full r6000 and r4000 - support, and to use the default case in case another processor type - is added. Also, tests against PROCESSOR_R2000 eliminated. - (add, subtract patterns): Delete use of %:. - (sqrtdf2, sqrtsf2): Define if the MIPS ISA >= 2. - - * decrose.h (MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Define these to - use the defaults on the OSF/1 reference platform. - (i386rose.h): Likewise. - - Sun Jan 26 07:58:00 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * cse.c (cse_insn): Don't call insert_regs on a SUBREG. - When scanning table for SUBREG assignment, ignore invalid entries. - - * cse.c (cse_insn): When looking for first non-deleted entry in - table, start by scanning backwards from the deleted entry. - - * function.c (assign_parms): Set current_function_return_rtx - unconditionally. - (expand_function_start): Don't set it here. - - Sat Jan 25 06:44:16 1992 Mark Eichin (eichin at cygnus.com) - - * cp-decl.c (set_identifier_local_value): New function. Clone of - set_identifier_type_value, but uses level->shadowed instead. Only - used in pushdecl, where the non-global install was previously - setting the local value directly which "stuck" and didn't get - cleared the next time through. - (pushdecl): use set_identifier_type_value so that the local value - actually gets erased when we leave this level. Changed code that - checks for global_binding_level to recognize that if - class_binding_level is set, we're not in the global one. - (poplevel_class): restore shadowed list too, like poplevel does. - (print_binding_level): added no_print_functions and - no_print_builtins variables to eliminate clutter while trying to - debug binding level problems. - - Fri Jan 24 18:03:36 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * tree.c (pop_momentary): Don't reference freed stack entry. - - Fri Jan 24 14:20:05 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-parse.y (stmt): Call `define_case_label' for default label. - * cp-decl.c (current_function_return_value): New variable. - (define_{case_}label): Clear CURRENT_FUNCTION_RETURN_VALUE. - * cp-typeck.c (c_expand_return): Set CURRENT_FUNCTION_RETURN_VALUE. - - * cp-tree.c (lang_printable_name): Use DECL_RING, and don't free - the printable name for CURRENT_FUNCTION_DECL. - - Fri Jan 24 14:17:30 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * gvarargs.h: If _ANSI_H, undef _VA_LIST_. - - * c-typeck.c (pointer_int_sum): Don't distribute * into pointer diff. - - * hp320.h (MD_STARTFILE_PREFIX): Defined. - (STANDARD_STARTFILE_PREFIX): Deleted. - - Fri Jan 24 09:30:41 1992 Fred Fish (fnf at fishpond) - - * assert.h (__eprintf): Declare as prototype for __STDC__ - - Fri Jan 24 05:28:53 1992 James Van Artsdalen (james at bigtex.cactus.org) - - * i386.md (jump,indirect_jump,tablejump): Don't output an align - directive here: let the following BARRIER do it. - - Thu Jan 23 11:54:11 1992 Ron Guilmette (rfg at ncd.com) - - * i486v4.h: New file. - - Thu Jan 23 20:34:22 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) - - * fixinc.svr4: Surround uses of ${INPUT} with "" instead of '' - so that it will get expanded. - - Thu Jan 23 17:50:13 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * cse.c (qty_mode): New variable. - (reg_rtx): Deleted. - (hard_regs_in_table, regs_invalidate_by_call): New variables. - (new_basic_block): Clear hard_regs_in_table. - (delete_reg_equiv): New name for reg_invalidate; don't update reg_tick. - (mention_regs): Don't set reg_rtx. - Update reg_tick for all registers in a multi-register hard register - reference. - (insert_regs): Don't do anything special with SUBREG. - Only insert register in a class if it is the same mode. - Don't set reg_rtx; set qty_mode instead. - (insert): Update hard_regs_in_table. - Get constant equivalence in proper mode. - (merge_equiv_classes): Call delete_reg_equiv. - (invalidate): Call delete_reg_equiv and update reg_tick. - Invalidate all parts of multi-word hard regs and invalidate - any multi-word hard reg overlapping what we are to invalidate. - Only look at constant in proper mode. - (remove_invalid_refs): Use refers_to_regno_p. - (invalidate_for_call): New function. - (canon_hash, refers_to_mem_p, fold_rtx, equiv_constant): Look at - constant in proper mode. - (cse_rtx_addr_varies_p, cse_process_notes): Likewise. - (exp_equiv_p): Likewise. - Check reg_tick for all parts of multi-word hard register. - (canon_reg): Don't use reg_rtx; get register from regno_reg_rtx or - build hard reg in proper mode. - (record_jump_equiv): Split into two pieces. - (record_jump_cond): Second part of record_jump_equiv; make recursive - call to some equivalences if args are SUBREGs. - (cse_insn): Only replace register with equivalent if proper mode; - don't use reg_rtx. - Call invalidate_for_call. - Don't avoid call to gen_lowpart for hard register. - Make a SUBREG if gen_lowpart_if_possible fails for SUBREG - assignment. - (invalidate_from_clobbers): Update reg_tick of SP; invalidate - REG entry in table, if present; use stack_pointer_rtx. - (cse_main): Don't allocate reg_rtx. - Initialize regs_invalidated_by_calls. - (cse_basic_block): Allocate qty_mode. - - * rs6000.h (ADDITIONAL_REGISTER_NAMES): Add so we can disambiguate - fixed and floating registers. - - * rs6000.md (ashrdi3): Reject all but constant shift counts. - - * jump.c (simplejump_p): Don't access PATTERN unless we know it is - a JUMP_INSN. - - * combine.c (get_last_value): Don't do a recursive call for a - paradoxical SUBREG. - - * jump.c (jump_optimize): In "if (...) x = a; else x = b;", - don't move "x = b;" if it has non-trivial REG_NOTES. Also, allow - B to be any constant, not just a CONT_INT. - - * stor-layout.c (layout_type): Handle alignment for arrays the same - as we do for records and unions. - - * calls.c (expand_call): Ignore `const' on void functions. - - * i860.c: Include recog.c. - Remove many explicit declaration of vars from include files. - (i860_compare_op[01]): Define these here. - * i860.h (i860_compare_op[01]): Add declarations. - * i860.md (compare, branch): Rework to use define_expand for cmpxx. - Compare just saves operands in i860_compare_op[01]. Branch emits - both insns using the saved operands. - - * i860.h (PREFERRED_RELOAD_CLASS): Handle FP registers and constants. - (SECONDARY_INPUT_RELOAD_CLASS): We need a scratch register to copy - an integer constant to a floating-point register. - * i860.md (addsi3, subsi3): Allow use of floating registers. - - Thu Jan 23 13:33:40 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * i386v4.h (CPP_PREDEFINES): Don't define X86. - - * c-lex.c (readescape): Warn for \a and \x if warn_traditional. - Handle \v as vertical tab regardless of -traditional. - - * fixincludes, fixinc.svr4: Make LIB absolute, near the beginning. - - * fixincludes: Simplify egrep command while matching the same lines - (plus occasional additional lines). - - * function.c (fixup_memory_subreg): New arg UNCRITICAL. Calls changed. - - * gcc.c (process_command): Handle LPATH like LIBRARY_PATH. - - * svr3.h (ASM_LONG): Deleted. - - * gvarargs.h: Ignore _VA_LIST_ if _ANSI_H_; - don't define _VA_LIST_ if already defined. - - Thu Jan 23 09:10:52 1992 Tom Wood (wood at dg-rtp.dg.com) - - * m88kluna.h (includes): Include aoutos.h. - - Thu Jan 23 09:10:52 1992 Ron Guilmette (rfg at ncd.com) - - * va-i860.h (__savereg): Fix typo. - - * i860.h (PREDICATE_CODES): Added definition. - - * i386v4.h (ASM_FILE_START): Definition added which generates - .version directive. - - Wed Jan 22 23:15:45 1992 (Eric Youngdale at youngdale@v6550c.nrl.navy.mil) - - * make-cc1.com: Predefine symbols for "rename" and "bison"; always - generate c-parse.h when generating c-parse.c. - - Wed Jan 22 20:01:11 1992 Per Bothner (bothner at cygnus.com) - - * sdbout.c (sdbout_record_type_name): Use typedef names - for C++. (A kludge.) - * sdbout.c (sdbout_one_type): Emit base classes as - dummy fields, just like dbxout.c when not using gdb extensions. - - Wed Jan 22 20:01:11 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) - - * fixincludes: Surround uses of ${INPUT} with "" instead of '' - so that it will get expanded. - - * gcc.c (default_compilers): For c++, define __GNUG__ to 2, and - pass -trigraphs. - - * cccp.1, cpp.1, gcc.1, g++.1: Delete more RCS variables. - - Wed Jan 22 19:02:06 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * combine.c (simplify_shift_const, case ASHIFT): If we will - be suppressing a sign extension because the upper bits are - already the same, verify that the operand is in the same - mode as we will be doing the shift; don't ignore a SUBREG - inside the inner SHIFT. - - Wed Jan 22 09:25:07 1992 Tom Wood (wood at dg-rtp.dg.com) - - * c-typeck.c (comp_target_types): Make decl static. - Don't forget to return the value. - (function_types_compatible_p, comptypes): Initialize `val'. - - Tue Jan 21 13:29:50 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * cross-make (ALL): Override with definition it here. - * configure: Don't edit its value explicitly here. - - * crtstuff.c (__do_global_ctors): Include DO_GLOBAL_CTORS_BODY - in crtend.o, not in crtbegin.o. - - * svr3.h: Prepare to use with i386. - (PCC_BITFIELD_TYPE_MATTERS): Definition deleted. - This pertains to the individual cpu types. - (ASM_SHORT, ASM_LONG, ASM_DOUBLE): Likewise. - (DBX_DEBUGGING_INFO): Undef this. - (DBX_REGISTER_NUMBER): Deleted the #undef. - (STARTFILE_SPEC, LINK_SPEC, LIB_SPEC): Deleted. - * i860v3.h (STARTFILE_SPEC, LINK_SPEC, LIB_SPEC): New definitions. - - * att386.h: Coexist with svr3.h. - (ASM_FILE_START): Deleted. - (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise. - (ASM_BYTE_OP, NO_DOLLAR_IN_LABEL): Likewise. - (ASM_OUTPUT_LABELREF): Undef before defining. - (ASM_FILE_START_1): Undef before defining. - (EXTRA_SECTION_FUNCTIONS): Deleted. - (BSS_SECTION_FUNCTION): New macro; defines bss_section. - - * i386v.h, aix386.h: Include svr3.h. - (SCCS_DIRECTIVE, ASM_OUTPUT_IDENT): Deleted. - (TARGET_MEM_FUNCTIONS): Deleted. - (SDB_DEBUGGING_INFO, DBX_DEBUGGING_INFO): Deleted. - - * Support constructors and destructors on svr3. From james@bigtex. - * i386v.h, aix386.h (STARTFILE_SPEC): Use crtbegin.o after crt1.o. - (LIB_SPEC): Use crtend.o before crtn.o. - (CTORS_SECTION_ASM_OP, ASM_OUTPUT_CONSTRUCTOR): New macros. - (INIT_SECTION_ASM_OP): Likewise. - * svr3.h (DTORS_SECTION_ASM_OP): New macros. - (DO_GLOBAL_CTORS_BODY): New macro. - (EXTRA_SECTIONS,EXTRA_SECTION_FUNCTIONS): Use .init and .fini - sections in addition to .bss. - ({INIT,FINI}_SECTION_FUNCTION): New macros for *_section functions. - ({CTORS,DTORS}_SECTION_FUNCTION): Macros deleted. - (ASM_OUTPUT_CONSTRUCTOR): Deleted. - (ASM_OUTPUT_DESTRUCTOR): Use ASM_LONG. - (INT_ASM_OP): Deleted. - - * c-typeck.c (default_conversion): Don't use initial value if BLKmode. - If do use the initial value, update `type'. - - * arm.h (STRUCTURE_SIZE_BOUNDARY): New definition. - - * stor-layout.c (layout_type): Ignore MAX_FIXED_MODE_SIZE for integers. - - * ultrix.h (SIZE_TYPE): Use `unsigned int'. - * Makefile.in (install-common): Add missing -f in rm. - (install-fixincludes): Install the README file. - - * fixincludes: Don't match on size_t, etc., since we don't actually - change them. - - Mon Jan 20 23:22:45 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-call.c (ideal_candidate): Don't see two functions as ambiguous - if one is argument-by-argument equivalent or better than another. - - Mon Jan 20 14:08:06 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * toplev.c (strip_off_ending): Add ".ada". - - Mon Jan 20 13:53:15 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * protoize.c (xfree): No longer static. - - * gbl-ctors.h (DO_GLOBAL_CTORS_BODY): Allow tm.h to override. - - * final.c (leaf_renumber_regs_insn): Do just the pattern of an insn. - - * pyr.h (PCC_BITFIELD_TYPE_MATTERS): Defined. - (STRUCTURE_SIZE_BOUNDARY): Deleted. - - * mips.c: Clean up spacing around square brackets. - - * c-typeck.c (convert_arguments): - Get rid of feature to convert to a tagless union type. - (common_type): Add pedantic warning. - (comptypes, function_types_compatible_p): Return 2 meaning warn. - (comp_target_types): Do the warning here. - (type_lists_compatible_p): New function. - - Sun Jan 19 17:32:19 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * reload1.c (emit_reload_insns): Fix typos when checking for secondary - icode. - - Sun Jan 19 15:28:53 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * global-alloc.c (global_alloc): If LEAF_REGISTERS, those are the - regs that cost nothing to save, for setting regs_already_used. - - * expr.c (expand_builtin): Preserve function value reg - around the call to __builtin_saveregs. - - * configure (mips-sgi-irix4*, mips-sgi-irix*): Set install_with_cp. - - * c-decl.c (start_function): - Check properly for `static' function in handling -Wmissing-prototypes. - - * libgcc2.c (__main): Omit this fn if INIT_SECTION_ASM_OP. - - Sun Jan 19 13:23:13 1992 Fred Fish (fnf at sunfish) - - * amix.h (ASM_OUTPUT_ASCII): Override version in svr4.h. - - Sun Jan 19 13:16:56 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-search.c (lookup_field): Accept IS_AGGR_TYPE_CODE, not - just == RECORD_TYPE. - - * cp-class.c (finish_struct): Clear a tentative setting of - DECL_BIT_FIELD. - - * cp-decl.c (start_decl): Don't call `pushclass' for incomplete - CONTEXT. - - * cp-typeck.c (comp_target_types): Call `comp_target_parms' with - STRICT == 0, not -1. - (build_conditional_expr): Check that the target types of TYPE1 and - TYPE2 are aggr type before calling `common_base_type'. - - Sun Jan 19 04:10:16 1992 James Van Artsdalen (james at bigtex.cactus.org) - - * configure: Fix typo inserting INSTALL=cp into makefile. - - Sat Jan 18 12:06:58 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-lex.c (build_with_cleanup): Delete obsolete function. - * cp-tree.c (break_out_cleanups): New function. - * cp-decl.c (cplus_expand_expr): Call `break_out_cleanups'. - * cp-typeck.c (build_compound_expr): Ditto. - - * cp-call.c (convert_harshness): Make any inheritance relationship - preferable to a void* conversion. - * cp-tree.h (CLASSTYPE_MAX_DEPTH): New macro. - * cp-class.c (finish_struct_bits): Set CLASSTYPE_MAX_DEPTH. - - * cp-cvt.c (build_up_reference): Don't return in ARRAY_REF case, - since we may need to adjust the return value for complex - inheritance. - - * cp-decl2.c (lang_f_options): Add recognizers for -f{no-}builtin, - -f{no-}ident, and -ansi. Also, remove unnecessary "no-*" forms. - - * cp-init.c (emit_base_init): If PEDANTIC, don't let base - initializers leak up the hierarchy. - - * cp-parse.y (structsp): Disable gratuitous error message. - - * cp-call.c (convert_harshness): Don't overlook PENALTY when - signed/unsigned differences are noted (in both POINTER_TYPE and - REFERENCE_TYPE cases). - - * toplev.c (strip_off_ending): Grok ".ii" endings (C++ preprocessed - files). - - * cp-typeck.c (build_component_ref): Add special handler when - COMPONENT is the CLASSTYPE_VFIELD name for BASETYPE. - - Sat Jan 18 08:29:58 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * cse.c (cse_insn): Don't make constant pool entries in MODE_CC modes. - - Sat Jan 18 00:28:48 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * Makefile.in (install-common): Fix typo installing gcc. - - * crds.h, isi.h, newpbb.h, tti68k.h: Add #error because -m68000 - will cause a crash (I think), to ask people what to do. - - * gmicro.h (ASM_FILE_START): Don't do anything. - (TARGET_DEFAULT): Turn on the bitfield flag. - (TARGET_SWITCHES): Get rid of the bitfield options. - - * c-lex.c (readescape): No warning for \?. - - * protoize.c (munge_compile_params): Fix cast that sets compile_params. - (xmalloc, xrealloc): No longer static. - * Makefile.in (protoize, unprotoize): Add LIBDEPS as deps. - - * va-i860.h (va_arg): Use __extension__ to suppress pedantic warning. - * va-sparc.h, va-spur.h, va-pyr.h: Likewise. - - * x-irix4.h: New file. - * config.sub: Don't convert irix to sysv. - * configure (mips-sgi-irix4*): New configuration. - (mips-sgi-irix*): Renamed from mips-sgi-sysv*. - - * gcc.c (process_command): - Handle the standard_exec_prefix* before the md_*_prefix. - - * i386.h, ns32k.h (PCC_BITFIELD_TYPE_MATTERS): Defined. - - * Makefile.in (libgcc1.null): Depend on GCC_PASSES. - - * cccp.c (lookup_import, add_import): VMS kludges so they compile. - (hack_vms_include_specification): Add forward declaration. - - * stor-layout.c (layout_record): Handle BITFIELD_NBYTES_LIMITED - just like one of the things done for PCC_BITFIELD_TYPE_MATTERS. - - * x-next, x-i386mach: Deleted. - * t-libc-ok: New file. Define just LIBGCC1. - * configure (i386-*-mach, m68k-next-*): Use t-libc-ok. - - * t-svr4 (FIXINCLUDES): Defined. - * t-m88kv4 (FIXINCLUDES): Defined. - * t-svr3 (EXTRA_PARTS): Defined. - * t-i386sco (EXTRA_PARTS): Defined. - - * configure (sparc-*-sysv4*): New alternative. - - * configure (install_with_cp): New flag an alternative can set. - If host sets it, add INSTALL=cp to Makefile. - Set this for any system V, and for m68k-crds-unos. - - Sat Jan 18 23:15:08 1992 Ron Guilmette (rfg at ncd.com) - - * va-i860.h (va_list): Made __reg_base field type long* to avoid - compilation errors. - (__savereg): Add explicit cast to (__va_saved_regs *). - - Fri Jan 17 15:09:34 1992 James Van Artsdalen (james at bigtex.cactus.org) - - * i386.h (FUNCTION_BOUNDARY): Do larger alignments for i486. - (ASM_OUTPUT_ALIGN_CODE): Same here. - (ASM_OUTPUT_LOOP_ALIGN): But not here - do word aligns as before. - - (enum reg_class): Delete classes ADREG and BREG - neither used nor - useful. Add classes FP_TOP_REG and FP_SECOND_REG. - (REG_CLASS_NAMES): Likewise. - (REG_CLASS_CONTENTS): Likewise. - (REGNO_REG_CLASS): Reflect that change. - (REG_CLASS_FROM_LETTER): Likewise. Add "t" and "u" constraints. - (CLASS_MAX_NREGS): New classes use only 1 hard reg for any mode. - - (CONST_OK_LETTER_P): Document uses of letters. - - * reg-stack.c: Add comments describing rules for asm statements - involving stack-like regs. - (asm_regs): Delete unused variable. - (fatal_for_asm): Delete unused function. - - (get_asm_operand_lengths): New function. - (constrain_asm_operands): New function. Like constrain_operands, - but records some information about the matched alternative. - - (record_asm_reg_life): New function. - (record_reg_life): If INSN is an asm statement, decode operands - and pass to record_asm_reg_life. - (record_reg_life_pat): Abort if any asm is seen here. - - (subst_asm_stack_regs): New function. - (subst_stack_regs): If INSN is an asm statement, decode operands - and pass to subst_asm_stack_regs. When handling REG_UNUSED notes, - emit the pops in the right order. - - (change_stack): New argument to insert any new insns before INSN - instead of after. All callers changed. - - (emit_swap_insn): Abort if the reg is not found in REGSTACK. - - * Makefile.in (reg-stack.o): Depends on insn-config.h. - - Fri Jan 17 16:38:32 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) - - * toplev.c, flags.h (in_system_header): Declare here. - * c-lex.c, cp-lex.c (in_system_header): Not here. - * toplev.c (rest_of_compilation): Don't warn of unused static function - if definition is in a system header. - - * gcc.c (do_spec_1): Add missing arg in recursive call. - (link_command_spec): Don't pass -s, -S, -u*, -X, -Y*. - - Fri Jan 17 12:51:28 1992 Jim Wilson (wilson at cygnus.com) - - From Tiemann: - * rtlanal.c (reg_set_between_p): Call `reg_set_p' with INSN, not the - body of INSN so that CALL_INSNs are properly handled. - * explow.c (find_next_ref): Ditto. - - * hp800.h, hp800.md: Delete RCS Header variables. - - * reg-stack.c (replace_reg): Change `abort' to `abort ()'. - - Fri Jan 17 14:30:14 1992 Michael Meissner (meissner at osf.org) - - * caller-save.c (insert_save_restore): Don't pass a CODE_LABEL to - reg_mentioned_p when the machine has a condition code, since - CODE_LABEL's don't have the same format as normal INSN's do. - - Fri Jan 17 13:24:33 1992 Tom Wood (wood at dg-rtp.dg.com) - - * Makefile.in (unprotoize.o): Use the rm -f option. - - * cp-lex.c (check_newline): Define `used_up' as in c-lex.c. - (in_system_header): Define as in c-lex.c. - - Fri Jan 17 08:14:04 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * reorg.c (delete_from_delay_slot): Pass correct length to - emit_delay_sequence. - - * genattrtab.c (substitute_address): Handle IF_THEN_ELSE in addition - to COND. - - * expr.c (expand_builtin, case BUILT_IN_STRLEN): Correct args in - expand_expr call. - - Fri Jan 17 17:33:40 1992 James Van Artsdalen (james@raid) - - * x-i386v4 (CCLIBFLAGS): Delete macro. - (GCC-CFLAGS): Delete macro. Prevented Makefile.in from working. - - Thu Jan 16 17:03:27 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) - - * Makefile.in (cleanconfig): Also delete tconfig.h. - - * varasm.c (assemble_external): Only call ASM_OUTPUT_EXTERNAL once - for each symbol. - (assemble_external_libcall): Fix minor typo in spacing. - - * toplev.c (main): Force error if invalid -W option is used. - - Thu Jan 16 13:35:13 1992 Tom Wood (wood at dg-rtp.dg.com) - - * m88kdgux.h (CPP_PREDEFINES): Added __CLASSIFY_TYPE__ back and - noted when it would be useful. - - * m88k.h (ASM_FILE_END, ASM_OUTPUT_ASCII): Override svr4.h. - - Thu Jan 16 12:37:16 1992 Richard Stallman (rms at mole.gnu.ai.mit.edu) - - * svr4.h (SVR4): Add this back. - - * cccp.c (lookup_import): Use bcmp to compare inodes. - - * cccp.c (main): Handle -idirafter option. - - * m68kv4.h, m88kv4.h, i386v4.h, sparcv4.h, i860v4.h (CPP_PREDEFINES): - Add __svr4__ in case user programs want to distinguish. - - * cp-lex.c (check_newline): Changes like Jan 12 changes in c-lex.c. - - * Makefile.in (install-fixincludes): Renamed from `includes'. - Move comments so some shells are happier. Dep. on install-headers. - - * m88kdgux.h (CPP_PREDEFINES): Add __svr4__. Remove __CLASSIFY_TYPE__. - Add some assertions. - - * c-decl.c (init_decl_processing): Don't give arg type for abort, etc. - Always declare strlen, etc., so -O doesn't alter the warnings. - * expr.c (expand_builtin): Open-code str* or mem* or ffs if -O. - - * c-decl.c (start_function): Fix backwards test for -W* options. - - * protoize.c (GUESSPATHLEN): Treat POSIX like USG--and use just 200. - - * cccp.c (deps_output): Break line iff string is empty. - (do_include): Fix up the deps_output calls. - - * vax.c (print_operand_address): Handle form index + (reg+offset). - - * m88k.h (TARGET_VERSION): Don't use __DATE__. - - * gcc.c (default_compilers): Typos in c++-cpp-output case. - - Thu Jan 16 12:25:51 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) - - * loop.c (get_condition): In HAVE_cc0 code, generate a zero with - CONST0_RTX instead of just using const0_rtx. - - * cse.c (cse_isnsn): A CALL_INSN clobbers all fixed regs except - for ap, fp, and sp. - - Thu Jan 16 08:03:40 1992 Tom Wood (wood at dg-rtp.dg.com) - - * c-decl.c (finish_enum): Compute the precision properly if the - maximum value is negative. - - Thu Jan 16 07:40:29 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * reorg.c (try_merge_delay_insns, fill_slots_from_thread): Have - update_block put the phantom insn before THREAD. - (update_block): Update block status if WHERE, not INSN, is block head. - - Thu Jan 16 00:28:14 1992 Ron Guilmette (rfg ay ncd.com) - - * i860.c (output_fp_move_double): Fixed typo. - - * protoize.c (GUESSPATHLEN, pointer_type, const_pointer_type): - moved definitions declarations out of conditional region. - (string_list_cons, shortpath, munge_compile_params): Added casts. - (find_extern_def): Fixed string literal to avoid trigraph. - (find_rightmost_formals_list): Fixed to avoid unreached code warnings. - - * svr4.h (ASM_OUTPUT_ASCII): Fixed typo. - - Wed Jan 15 21:58:01 1992 Jeffrey A Law (law at b117b.super.org) - - * sparc.h (SELECT_RTX_SECTION): When generating PIC, place symbolic - operands in the data section. - - Wed Jan 15 21:45:09 1992 Michael Meissner (meissner at osf.org) - - * collect2.c (main): Pass any -b, -B, -m, -f, and - -V options to gcc instead of the linker, in order to allow - target switches that affect the size of pointers and search paths to - be passed through. - (main, choose_temp_base): Use TMPDIR environment variable, and the - P_tmpdir macro if defined to locate directory to put temp files. - (whole file): Reorganize so that all of the OSF/rose stuff goes at - the end of the file, rather than being scattered throughout. - (main, scan_prog_file): Invoke scan_prog_file twice, once on each - output of ld. - (scan_prog_file, read_file, write_file): On the second invocation, - rewrite the object file in place, adding a load command to put - __main in the list of initializer functions. This allows users - to put constructors and destructors into shared libraries. - (scan_prog_file): Move debug stuff and error routines to separate - functions. - - Wed Jan 15 17:59:02 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * combine.c (can_combine_p): Don't combine if DEST is still a field - assignment after we've tried to expand it. - - Wed Jan 15 16:01:13 1992 James Van Artsdalen (james at bigtex.cactus.org) - - * regclass.c (fix_register): Don't match a null register name. - * varasm.c (decode_reg_name): Likewise. - - * i386.h (HI_REGISTER_NAMES): Give the eliminable arg pointer a - null name. - - Wed Jan 15 13:40:50 1992 Richard Stallman (rms at mole.gnu.ai.mit.edu) - - * gcc.c (default_compilers): Pass -lang-asm, not -lang-asmc, to cpp. - - * gcc.c (process_command): Don't dump md_exec_prefix in specs. - Use the md_... prefixes only if no -b. - - Wed Jan 15 13:35:09 1992 Ron Guilmette (rfg at ncd.com) - - * i386v4.h (RETURN_IN_MEMORY): Definition added. - (CPP_PREDEFINES): Added -DX86 (needed for some system headers). - (ASM_OUTPUT_DWARF_STRING): Deleted. - (ASM_OUTPUT_ASCII): Added specialized definition for i386/svr4. - - * svr4.h (SVR4): Deleted useless define. - (ASM_FILE_END): Added definition. - (ESCAPES, STRING_LIMIT, STRING_ASM_OP, ASM_OUTPUT_LIMITED_STRING): - (ASM_OUTPUT_ASCII): Generic svr4 definitions added. - - * m68kv4.h (CPP_PREDEFINES): Don't define SVR4. - * sparcv4.h (CPP_PREDEFINES): Don't define SVR4. - (ASM_OUTPUT_ASCII): Deleted obsolete definition. - - * xm-svr4.h (SVR4): Removed useless definition. - (POSIX): Added definition for protoize.c. - - * i860b.h (ASCII_DATA_ASM_OP, ASM_OUTPUT_ASCII): Moved from i860.h. - * i860v3.h (ASCII_DATA_ASM_OP): Added OS-specific definition. - * i860v4.h (ASCII_DATA_ASM_OP, ASM_OUTPUT_ASCII): - Deleted (now in svr4.h). - - * fixinc.svr4: Replaced all occurances of {1,\} in sed command - string with functional equivalents (to avoid bogus results). - - * c-lex.c (readescape): Pass thru escaped x, a, and v if -traditional. - (readescape): Pedantic warning for \?, \(, \{, and \[. - - * dwarfout.c: Updated copyright. - (fundamental_type_code): Abort for all non-fundamental types. - (type_is_fundamental): Return 0 for all non-fundamental types. - (containing_type_attribute, output_ptr_to_mbr_type_die): New functions. - (output_pointer_type_die, output_reference_type_die): Added calls to - equate_type_number_to_die_number. - (output_type): Handle OFFSET_TYPE correctly. - (output_type): Ignore LANG_TYPE (for now). - - Wed Jan 15 09:30:08 1992 Michael Tiemann (tiemann at cygnus.com) - - * All cp-* files: Remove calls to `cleanup_after_call'. - - * cp-method.c (fndecl_as_string): Add a missing space when printing - the return type. - - * cp-typeck.c (build_modify_expr): Treat arrays specially in both - INIT_EXPR and NOP_EXPR cases. Also, if we take the address NEWRHS - when it's not a SAVE_EXPR, build a new NEWRHS using that address. - * cp-tree.c (lvalue_p): Handle WITH_CLEANUP_EXPR case. - - * cp-decl.c (grokvardecl): Don't get tripped up by static class - members of incomplete type. - - Wed Jan 15 09:12:51 1992 Jeffrey A. Law (law at wombat.gnu.ai.mit.edu) - - * m68k.c (legitimize_pic_address): Re-enable code which was - mistakenly #ifdef'd out. - - Wed Jan 15 08:12:18 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * reload.c (find_reloads): Check for insn not recognized. - - * caller-save.c (reg_{save,restore}_code): New variables. - (init_caller_save): Set them. - (insert_save_restore): Just make SET for pattern of insn and set - code from reg_{save,restore}_code. - (save_call_clobbered_regs): Put restore insns before JUMP_INSN that - ends basic block, but after any other insn that ends the block. - - * sdbout.c (sdbout_symbol): Treat (mem (reg SP)) the same - as (mem (reg FP)). - - * reorg.c (mark_referenced_resources): Fix typo in last change. - (emit_delay_sequences): Update chain correctly when previous or - next insn is also a SEQUENCE. - - Wed Jan 15 08:10:29 1992 Chris Smith (cks at bach.convex.com) - - * t-convex: Use collect2 to link. - * convex.h: remove assembly output defines for old collect2. - * convex.h: define vprintf and wait macros for pcc mode boot of - collect2. - - * convex.h (ASM_OUTPUT_DOUBLE_INT): define. - - * convex.h (DEFAULT_GDB_EXTENSIONS): define as 0 until GDB version 4 - port is available. - - * convex.c (ap_reload_needed): Fix comment. - - Wed Jan 15 07:08:25 1992 Tom Wood (wood at dg-rtp.dg.com) - - * m88k.h (CONST_SECTION_FUNCTION): Trivial definition for targets - not based on svr[34].h (m88k-luna). - - * m88k.h (PREDICATE_CODES): Use it. - - * m88k.md (casesi_enter): Don't use bsr.n with -fno-delayed-branch. - * m88k.h (ASM_OUTPUT_CASE_END): The lda goes here when bsr is used. - - * m88k.c (legitimize_address): When converting a symbol_ref for - PIC, add a REG_EQUAL note. - - Wed Jan 15 06:22:34 1992 Michael Meissner (meissner at osf.org) - - * mips.h (MIPS_VERSION): Bump Meissner version # to 8. - (fcmp_op): Add function declaration. - (TARGET_FLOAT64): Support for -mfp64 switch to support the R4000 FR - psw bit, which doubles the number of floating point registers. - (TARGET_SWITCHES): Likewise. - (HARD_REGNO_NREGS): Likewise. - (CLASS_FCMP_OP): New bit for classifing floating point compares. - (PREDICATE_CODES): Add cmp2_op and fcmp_op support. - - * mips.c (various): Move extern declarations from inside of - functions to outside all functions. - (fcmp_op): Match comparison operators for floating point. - (mips_move_2words): Add -mfp64 support. - (override_options): Likewise. - (compute_frame_size): Likewise. - (override_options): Set up for fcmp_op. - (gen_conditional_branch): Redo floating point compares/branches, so - that it is like the rest of the compiler expects -- set cc0 to a - compare operator, instead of the exact test required, and put the - smarts in the branch operators to generate both the test and the - branch. - - * mips.md (cmpdf_eq, cmpdf_lt, cmpdf_le): Delete. - (cmpsf_eq, cmpsf_lt, cmpsf_le): Delete. - (cmpdf_internal): New define insn to match FP compares. - (cmpsf_internal): Likewise. - (branch_fp_true1, branch_fp_true2): Likewise. - (branch_fp_false1, branch_fp_false2): Likewise. - (branch_fp_true, branch_fp_false): New define_insns to match the - branch part of FP compares. - - Wed Jan 15 01:42:39 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) - - * unroll.c (copy_loop_body): New parameter copy_notes_from, to - correct problem with bad debug info generated for preconditioned - loops. - (unroll_loops): Fix calls of copy_loop_body to pass new parameter. - - Wed Jan 15 01:01:39 1992 Richard Stallman (rms at mole.gnu.ai.mit.edu) - - * gcc.c (main): Don't use TARGET_VERSION. - (endfile_spec, switches_need_spaces): New vars, initted from macros. - (set_spec, process_command): Read and write those vars. - (do_spec_1, process_command): Use the new vars, not the macros. - (SWITCHES_NEED_SPACES): New default macro definition. - - * Makefile.in (install-common): Install driver as gcc-$(target). - - * gstddef.h (wchar_t): Check for _T_WCHAR. - - * stmt.c (pushcase, pushcase_range): Return 5 if jump into stack level. - * c-parse.y, objc-parse.y (stmt): Print error msg for that. - * cp-parse.y: Likewise. - - Tue Jan 14 23:25:37 1992 Ron Guilmette (rfg at ncd.com) - - * dwarfout.c: Include if USG *or* POSIX. - (TREE_UID): Deleted. - (current_funcdef_number): Replacement for TREE_UID. - (dwarfout_file_scope_decl): Increment - current_funcdef_number after each funnction definition is processed. - (pending_sibling_stack_depth): Renamed globally to pending_siblings. - (pending_sibling_stack_size): Renamed to pending_siblings_allocated. - (PENDING_SIBLING_STACK_INCREMENT): Renamed PENDING_SIBLINGS_INCREMENT. - (pending_types_list, pending_types_allocated, pending_types, - PENDING_TYPES_INCREMENT, fake_containing_scope): New vars/macros. - - * dwarfout.c (total_ft_entries): Renamed to ft_entries_allocated. - (valid_ft_entries): Renamed to ft_entries. - (FT_ENTRIES_INCREMENT): Definition added. - (lookup_filename): Expand filename table (when needed) - by adding FT_ENTRIES_INCREMENT more table elements rather than - doubling current size. - (dwarfout_init): Allocate initial filename table. - - * dwarfout.c (INSN_LABEL_FMT, FUNC_END_LABEL_FMT): Use decimal format. - - * dwarfout.c (member_attribute): Rewritten for proper C++ support. - (output_array_type_die, output_set_type_die, output_entry_point_die, - output_enumeration_type_die, output_global_subroutine_die, - output_global_variable_die, output_inline_subroutine_die, - output_local_variable_die, output_member_die, output_pointer_type_die, - output_reference_type_die, output_string_type_die, - output_structure_type_die, output_local_subroutine_die, - output_subroutine_type_die, output_typedef_die, output_union_type_die): - Added calls to member_attribute (for C++). - - * dwarfout.c (inline_attribute): Test for TREE_INLINE in here. - (output_global_subroutine_die, output_local_subroutine_die): - Don't test for TREE_INLINE here. - - * dwarfout.c (output_formal_types): Fixed to handle METHOD_TYPE - nodes and to output all related type DIEs last (for SDB). - (type_ok_for_scope, output_pending_types_for_scope, pend_type): - Functions added to support C++. - (output_type, output_decl): Added `containing_scope' - parameter to handle C++ nested types. - (output_type): Don't output the type unless it's OK - for the current DIE chain (i.e. unless it's OK for the current scope). - (output_type): Output completed non-global tagged types - right away even if not finalizing. - (output_type): Use correct method to get head of chain - of C++ function members. - (output_decl): Skip first item on chain of DECL_ARGUMENTS - for a FUNCTION_DECL whose type is a METHOD_TYPE. - Suppress output of type DIEs for formal parms of a FUNCTION_DECL - until after all TAG_parameter DIEs have been output (for SDB - compatability). - Output DIEs for any LABEL_DECL nodes attached to outermost BLOCK of - a FUNCTION_DECL. - Handle LABEL_DECL nodes. - - * dwarfout.c (dwarfout_file_scope_decl): Un-pend all pending file- - scope types after each file-scope declaration is output. - (output_decls_for_scope): Un-pend all pending local types - at end of each local scope. - - Tue Jan 14 16:40:39 1992 Tim Moore (moore at fast.cs.utah.edu) - - * calls.c (expand_call): If ARGS_GROW_DOWNWARD, make slot_offset - negative and set highest_outgoing_arg_in_use to needed + 1. - (store_one_arg): If ARGS_GROW_DOWNWARD deal with negative slot_offset. - - Tue Jan 14 20:01:59 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) - - * sparc.h (TARGET_SUN_ASM, TARGET_GNU): Delete support for - obsolete and undocumented flags -msun-asm and -mgnu. - * sparc.md: Likewise. - - Tue Jan 14 19:36:21 1992 Tim Moore (moore at fast.cs.utah.edu) - - * xm-hp800.h (hpux8): define. - * hp800.h (LINK_SPEC): Conditionalize on hpux8. - (STACK_BOUNDARY): Define for snake. - (CALL_USED_REGISTERS): Shift register is special. - (HARD_REGNO_MODE_OK): Don't allow modes smaller that SImode in fp - registers. - (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Eliminate - GENERAL_OR_FP_REGS, GENERAL_OR_SNAKE_FP_REGS classes. - (FUNCTION_ARG): Handle snake fp arguments. - (ASM_DOUBLE_ARG_DESCRIPTORS): define. - (ASM_DECLARE_FUNCTION_NAME): Use above macro to get around hpux - 8.0 change. - * hp800.md (movsi, movdi): Add ! and * to constraints of anonymous - define-insns to discourage SImode values in fp registers. Don't - modify the stack pointer when moving between general and fp registers. - (mulsi): Take out pattern that matches a degenerate multiplication - by 1; it doesn't seem to be needed and causes problems. - (sar_sub): Change so that const_int isn't the first argument of - the comparison. - * hp800.c (output_fp_move_double): As above, don't modify the - stack pointer when moving between general and fp registers. - (output_block_move): Don't make one CONST_INT rtx and store - different integer values in it; cons up a "new" one for each value. - (output_floatsisf2, output_floatsidf2): Fix typos. - (output_arg_descriptor): Conditionalize for HPUX 8.0. - - Tue Jan 14 14:38:09 1992 Michael Tiemann (tiemann at cygnus.com) - - * cp-typeck.c (build_unary_op): Call readonly_warning_or_error if - ARG is TREE_READONLY (in addition to the type being TYPE_READONLY). - - * cp-init.c (maybe_adjust_addr_for_delete): If the adjustment needs - to be done, zero out the storage that held part of the cookie. - - Tue Jan 14 13:12:48 1991 Ron Guilmette (rfg at ncd.com) - - * c-decl.c (poplevel): Set TYPE_CONTEXT for each tagged type - except inside function declaration parm list. - (grokdeclarator): Set TYPE_CONTEXT for tagged type in decl parm list. - (pushtag): Don't set TYPE_CONTEXT for tagged types here. - - Tue Jan 14 06:46:37 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) - - * global-alloc.c (global_alloc): Count multi-word pseudos correctly - in local_reg_n_refs. - (find_reg): Evict pseudos that overlap the register we take, not just - that start with that register. - - * a29k.c (a29k_debug_reg_map): New variable. - (output_prologue): Initialize it. - * a29k.h (DBX_REGISTER_NUMBER): Use that map. - - * ultrix.h (WCHAR_TYPE): Make definition be a known type. - - * final.c (final_scan_insn): Call DBR_OUTPUT_SEQEND before we - clear `final_sequence', so it can call dbr_sequence_length. - - * reload1.c (reload): Clear insn_needs once we know we have - reloads, instead of always. - Don't skip processing of reloads for CALL_INSNs when caller-save - needs a spill register. - - * flow.c (mark_used_regs, case RETURN): Insert missing test for global - registers. - - * reorg.c (mark_referenced_resources): Mark asm's as volatile - when appropriate. - - * integrate.h (struct inline_remap): New field const_equiv_map_size. - * integrate.c (expand_inline_function): Set it; make larger map. - (subst_constants): Don't reference out-of-range entry in equiv map. - * unroll.c (unroll_loop): Set const_equiv_map_size. - Mon Jan 13 19:12:18 1992 Jim Wilson (wilson at wookumz.gnu.ai.mit.edu) --- 1,2 ---- *************** *** 13225,13233 **** See file ChangeLog.3. - - Local Variables: - mode: indented-text - left-margin: 8 - fill-column: 76 - version-control: never - End: --- 10782,10783 ---- diff -rc2N gcc-2.0/INSTALL gcc-2.1/INSTALL *** gcc-2.0/INSTALL Sun Feb 16 03:44:25 1992 --- gcc-2.1/INSTALL Mon Mar 23 23:33:58 1992 *************** *** 13,19 **** Here is the procedure for installing GNU CC on a Unix system. 1. If you have built GNU CC previously in the same directory for a ! different target machine, do `make cleanconfig' to delete all ! files that might be invalid. 2. On a Sequent system, go to the Berkeley universe. --- 13,27 ---- Here is the procedure for installing GNU CC on a Unix system. + * Menu: + + * Other Dir:: Compiling in a separate directory (not where the source is). + * Sun Install:: See below for installation on the Sun. + * 3B1 Install:: See below for installation on the 3B1. + * VMS Install:: See below for installation on VMS. + * Unos Install:: See below for installation on Unos (from CRDS). + 1. If you have built GNU CC previously in the same directory for a ! different target machine, do `make distclean' to delete all files ! that might be invalid. 2. On a Sequent system, go to the Berkeley universe. *************** *** 47,53 **** or aliases. For example, `sun3' stands for `m68k-sun', so `sun3-sunos4.1' is another way to specify a Sun 3. You can also ! use simply `sun3-sunos', since the version of Sunos is assumed by default to be version 4. `sun3-bsd' also works, since ! `configure' knows that the only BSD variant on a Sun 3 is Sunos. You can specify a version number after any of the system --- 55,61 ---- or aliases. For example, `sun3' stands for `m68k-sun', so `sun3-sunos4.1' is another way to specify a Sun 3. You can also ! use simply `sun3-sunos', since the version of SunOS is assumed by default to be version 4. `sun3-bsd' also works, since ! `configure' knows that the only BSD variant on a Sun 3 is SunOS. You can specify a version number after any of the system *************** *** 61,67 **** ns32k, romp, rs6000, sparc, vax. - Note that the type hppa currently works only with Berkeley - systems, not with HP/UX. - Here are the recognized company names. As you can see, customary abbreviations are used rather than the longer official --- 69,72 ---- *************** *** 79,85 **** Here is a list of system types: ! bsd, sysv, mach, minix, genix, ultrix, vms, sco, esix, isc, ! aix, sunos, hpux, unos, luna, dgux, newsos, osfrose, osf, ! dynix, aos, ctix. You can omit the system type; then `configure' guesses the --- 84,90 ---- Here is a list of system types: ! bsd, sysv, mach, minix, genix, ultrix, vms, sco, isc, aix, ! sunos, hpux, unos, luna, dgux, newsos, osfrose, osf, dynix, ! aos, ctix. You can omit the system type; then `configure' guesses the *************** *** 86,95 **** operating system from the CPU and company. ! Often a particular model of machine has a name. Many of these ! names are recognized as an alias for a CPU/company combination. ! The alias `sun3', mentioned above, is an example of this: it ! stands for `m68k-sun'. Sometimes we accept a company name as a ! machine name, when the name is popularly used for a particular ! machine. Here is a table of the known machine names: 3300, 3b1, 7300, altos3068, altos, apollo68, att-7300, --- 91,112 ---- operating system from the CPU and company. ! You can add a version number to the system type; this may or ! may not make a difference. For example, you can write `bsd4.3' or ! `bsd4.4' to distinguish versions of BSD. In practice, the version ! number is most needed for `sysv3' and `sysv4', which are often ! treated differently. ! ! If you specify an impossible combination such as `i860-dg-vms', ! then you may get an error message from `configure', or it may ! ignore part of the information and do the best it can with the ! rest. `configure' always prints the canonical name for the ! alternative that it used. ! ! Often a particular model of machine has a name. Many machine ! names are recognized as aliases for CPU/company combinations. ! Thus, the machine name `sun3', mentioned above, is an alias for ! `m68k-sun'. Sometimes we accept a company name as a machine ! name, when the name is popularly used for a particular machine. ! Here is a table of the known machine names: 3300, 3b1, 7300, altos3068, altos, apollo68, att-7300, *************** *** 101,109 **** sun386, sun3, sun4, symmetry, tower-32, tower. ! If you specify an impossible combination such as `i860-dg-vms', ! then you may get an error message from `configure', or it may ! ignore part of the information and do the best it can with the ! rest. `configure' always prints the canonical name for the ! alternative that it used. On certain systems, you must specify whether you want GNU CC --- 118,123 ---- sun386, sun3, sun4, symmetry, tower-32, tower. ! Remember that a machine name specifies both the cpu type and the ! company name. On certain systems, you must specify whether you want GNU CC *************** *** 131,136 **** `xm-m68k-local.h', `t-m68k-local', and `x-m68k-local'. ! Here is a list of configurations that have special treatment: `m68000-att' AT&T 3b1, a.k.a. 7300 PC. Special procedures are needed to --- 145,161 ---- `xm-m68k-local.h', `t-m68k-local', and `x-m68k-local'. ! Here is a list of configurations that have special treatment ! or special things you must know: + `hppa-hp-hpux' + HP precision architecture, running HP-UX. `-g' does not work + on this configuration, since the system uses a peculiar + debugging format which GNU CC does not know about. + + `i386-*-sco' + Compilation with RCC is recommended, but it produces lots of + spurious warnings. They do not necessarily indicate that + anything is wrong. + `m68000-att' AT&T 3b1, a.k.a. 7300 PC. Special procedures are needed to *************** *** 151,159 **** `m68k-hp-hpux' ! HP 9000 series 200 or 300 running HPUX. GNU CC does not ! support the special symbol table used by HP's debugger, but ! you can debug programs with GDB if you specify `--gas' to ! use the GNU tools instead. In order to use the GNU tools, ! you must install a library conversion program called `hpxt'. `m68k-sun' --- 176,186 ---- `m68k-hp-hpux' ! HP 9000 series 300 or 400 running HP-UX. HP-UX version 8.0 ! has a bug in the assembler that prevents compilation of GNU ! CC. To fix it, get patch PHCO_0800 from HP. ! ! In addition, `--gas' does not currently work with this ! configuration. Changes in HP-UX have broken the library ! conversion tool and the linker. `m68k-sun' *************** *** 171,174 **** --- 198,208 ---- eval `sde-target m88kbcs` + `mips-mips-bsd' + MIPS machines running the MIPS operating system in BSD mode. + It's possible that some old versions of the system lack the + functions `memcpy', `memcmp', and `memset'. If your system + lacks these, you must remove or undo the definition of + `TARGET_MEM_FUNCTIONS' in `mips-bsd.h'. + `ns32k-encore' Encore ns32000 system. Encore systems are supported only *************** *** 186,193 **** bootstrapping. ! `rs6000-ibm' ! IBM PowerStation/6000 machines. Due to the nonstandard ! debugging information required for this machine, `-g' is not ! available in this configuration. `vax-dec-ultrix' --- 220,227 ---- bootstrapping. ! `pyramid' ! The Pyramid C compler is reported to be unable to compile ! GNU CC. You must use an older version of GNU CC for ! bootstrapping. `vax-dec-ultrix' *************** *** 334,340 **** and report (*note Bugs::.). ! On systems that use COFF object files, bytes 5 to 8 will ! always be different, since it is a timestamp. On these systems, ! you can do the comparison as follows (in Bourne shell): for file in *.o; do --- 368,376 ---- and report (*note Bugs::.). ! On systems that use COFF object files, or an object file ! format that is a superset of COFF (such as ECOFF or XCOFF), bytes ! 5 to 8 will always be different, since it is a timestamp. On ! these systems, you can do the comparison as follows (in Bourne ! shell): for file in *.o; do *************** *** 344,354 **** done ! On MIPS machines, you need to use the shell script `ecoff-cmp' ! to compare two object files if you have built the compiler with ! the `-mno-mips-tfile' option. Thus, do this: ! ! for file in *.o; do ! ecoff-cmp $file stage2/$file ! done 11. Install the compiler driver, the compiler's passes and run-time --- 380,386 ---- done ! If you have built the compiler with the `-mno-mips-tfile' ! option on MIPS machines, you will not be able to compare the ! files. 11. Install the compiler driver, the compiler's passes and run-time *************** *** 362,369 **** This copies the files `cc1', `cpp' and `libgcc.a' to files `cc1', `cpp' and `libgcc.a' in directory ! `/usr/local/lib/gcc/TARGET/VERSION', which is where the compiler ! driver program looks for them. Here TARGET is the target machine ! type specified when you ran `configure', and VERSION is the ! version number of GNU CC. This naming scheme permits various versions and/or cross-compilers to coexist. --- 394,401 ---- This copies the files `cc1', `cpp' and `libgcc.a' to files `cc1', `cpp' and `libgcc.a' in directory ! `/usr/local/lib/gcc-lib/TARGET/VERSION', which is where the ! compiler driver program looks for them. Here TARGET is the target ! machine type specified when you ran `configure', and VERSION is ! the version number of GNU CC. This naming scheme permits various versions and/or cross-compilers to coexist. *************** *** 373,379 **** *Warning: there is a bug in `alloca' in the Sun library. To ! avoid this bug, install the binaries of GNU CC that were compiled ! by GNU CC. They use `alloca' as a built-in function and never ! the one in the library.* 12. If you will be using C++ or Objective C, and your operating --- 405,416 ---- *Warning: there is a bug in `alloca' in the Sun library. To ! avoid this bug, be sure to install the executables of GNU CC that ! were compiled by GNU CC. (That is, the executables from stage 2 ! or 3, not stage 1.) They use `alloca' as a built-in function and ! never the one in the library.* ! ! (It is usually better to install GNU CC executables from stage ! 2 or 3, since they usually run faster than the ones compiled with ! some other compiler.) 12. If you will be using C++ or Objective C, and your operating *************** *** 452,456 **** systems.) ! 2. Go to that directory before running `configure': mkdir gcc-sun3 --- 489,499 ---- systems.) ! 2. If you have ever run `configure' in the source directory, you ! must undo the configuration. Do this by running: ! ! make cleanconfig ! ! 3. Go to the directory in which you want to build the compiler before ! running `configure': mkdir gcc-sun3 *************** *** 460,464 **** must be on the same file system as the source code directory. ! 3. Specify where to find `configure' when you run it: ../gcc-2.00/configure ... --- 503,507 ---- must be on the same file system as the source code directory. ! 4. Specify where to find `configure' when you run it: ../gcc-2.00/configure ... *************** *** 531,561 **** - Installing GNU CC on SCO System V 3.2 - ===================================== - - The compiler that comes with this system does not work properly with - `-O'. Therefore, you should redefine the Make variable `CCLIBFLAGS' - not to use `-O'. - - In addition, the compiler produces incorrect output when compiling - parts of GNU CC; the resulting executable `cc1' does not work properly - when it is used with `-O'. - - Therefore, what you must do after building the first stage is use - GNU CC to compile itself without optimization. Here is how: - - make -k cc1 CC="./gcc -B./" - - You can think of this as "stage 1.1" of the installation process. - However, using this command has the effect of discarding the faulty - stage 1 executable for `cc1' and replacing it with stage 1.1. You can - then proceed with `make stage1' and the rest of installation. - - On Xenix, the same thing is necessary; in addition, you may have to - remove `-g' from the options used with `cc', and you may have to - simplify complicated statements in the sources of GNU CC to get them - to compile. - - Installing GNU CC on Unos ========================= --- 574,577 ---- *************** *** 604,609 **** be done with the commands: ! $ assign /super /system disk:[gcc.] gnu_cc ! $ assign /super /system disk:[gcc.include.] gnu_cc_include with the appropriate disk and directory names. These commands --- 620,627 ---- be done with the commands: ! $ assign /system /translation=concealed - ! disk:[gcc.] gnu_cc ! $ assign /system /translation=concealed - ! disk:[gcc.include.] gnu_cc_include with the appropriate disk and directory names. These commands *************** *** 615,619 **** 2. Install the `GCC' command with the command line: ! $ set command /table=sys$library:dcltables gnu_cc:[000000]gcc 3. To install the help file, do the following: --- 633,639 ---- 2. Install the `GCC' command with the command line: ! $ set command /table=sys$common:[syslib]dcltables - ! /output=sys$common:[syslib]dcltables gnu_cc:[000000]gcc ! $ install replace sys$common:[syslib]dcltables 3. To install the help file, do the following: *************** *** 632,640 **** files. This can be done with the command: ! $ assign /super /system disk:[gcc.gxx_include.] gnu_gxx_include with the appropriate disk and directory name. If you are going ! to be using libg++, you should place the libg++ header files in ! the directory that this logical name points to. 2. Obtain the file `gcc-cc1plus.exe', and place this in the same --- 652,661 ---- files. This can be done with the command: ! $ assign /system /translation=concealed - ! disk:[gcc.gxx_include.] gnu_gxx_include with the appropriate disk and directory name. If you are going ! to be using libg++, this is where the libg++ install procedure ! will install the libg++ header files. 2. Obtain the file `gcc-cc1plus.exe', and place this in the same *************** *** 641,654 **** directory that `gcc-cc1.exe' is kept. - 3. You will need several library functions which are used to call the - constructors and destructors for global objects. These functions - are part of the libg++ distribution, and you will automatically - get them if you install libg++. - - If you are not planning to install libg++, you will need to - obtain the files `gxx-startup-1.mar' and `gstart.cc' from the - libg++ distribution, compile them, and supply them to the linker - whenever you link a C++ program. - The GNU C++ compiler can be invoked with a command like `gcc /plus /verbose file.cc', which is equivalent to the command `g++ --- 662,665 ---- *************** *** 675,679 **** should be done with the command: ! $ assign /super /system disk:[bison.] gnu_bison You may, if you choose, use the `INSTALL_BISON.COM' script in --- 686,691 ---- should be done with the command: ! $ assign /system /translation=concealed - ! disk:[bison.] gnu_bison You may, if you choose, use the `INSTALL_BISON.COM' script in *************** *** 682,686 **** 3. Install the `BISON' command with the command line: ! $ set command /table=sys$library:dcltables gnu_bison:[000000]bison 4. Type `@make-gcc' to recompile everything (alternatively, you may --- 694,701 ---- 3. Install the `BISON' command with the command line: ! $ set command /table=sys$common:[syslib]dcltables - ! /output=sys$common:[syslib]dcltables - ! gnu_bison:[000000]bison ! $ install replace sys$common:[syslib]dcltables 4. Type `@make-gcc' to recompile everything (alternatively, you may *************** *** 690,693 **** --- 705,731 ---- appear in the comments. + 5. In order to use GCC, you need a library of functions which GCC + compiled code will call to perform certain tasks, and these + functions are defined in the file `libgcc2.c'. To compile this + you should use the command procedure `make-l2.com', which will + generate the library `libgcc2.olb'. `libgcc2.olb' should be + built using the compiler built from the same distribution that + `libgcc2.c' came from, and `make-gcc.com' will automatically do + all of this for you. + + To install the library, use the following commands: + + $ lib gnu_cc:[000000]gcclib/delete=(new,eprintf) + $ lib libgcc2/extract=*/output=libgcc2.obj + $ lib gnu_cc:[000000]gcclib libgcc2.obj + + The first command simply removes old modules that will be + replaced with modules from libgcc2. If the VMS librarian + complains about those modules not being present, simply ignore + the message and continue on with the next command. + + Whenever you update the compiler on your system, you should + also update the library with the above procedure. + *If you are building GNU CC with a previous version of GNU CC, you also should check to see that you have the newest version of *************** *** 733,734 **** --- 771,773 ---- `make-cccp.com' use the nonshared version of `VAXCRTL' (and thus use the `qsort' and `strncat' routines from `gcclib.olb'). + diff -rc2N gcc-2.0/Makefile.dos gcc-2.1/Makefile.dos *** gcc-2.0/Makefile.dos Wed Nov 27 15:25:12 1991 --- gcc-2.1/Makefile.dos Tue Mar 24 02:38:03 1992 *************** *** 46,50 **** insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \ insn-recog.o insn-extract.o insn-output.o \ ! insn-attrtab.o aux-output.o # GEN files are listed separately, so they can be built before doing parallel --- 46,50 ---- insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \ insn-recog.o insn-extract.o insn-output.o \ ! insn-attrtab.o aux-output.o getpwd.o # GEN files are listed separately, so they can be built before doing parallel *************** *** 177,184 **** gcc.o: gcc.c gvarargs.h obstack.h ! gcc $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) \ ! -DDEFAULT_TARGET_MACHINE=\"dos\" \ ! -DCPP_SPEC=\"-D__MSDOS__\040-D__GO32__\" \ ! -c gcc.c dumpvers: dumpvers.c --- 177,184 ---- gcc.o: gcc.c gvarargs.h obstack.h ! >gcc.rf $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) \ ! -DDEFAULT_TARGET_MACHINE="dos" \ ! -DCPP_SPEC="-noprecomp\040-D__MSDOS__\040-D__GO32__" ! gcc @gcc.rf -c gcc.c dumpvers: dumpvers.c *************** *** 221,224 **** --- 221,225 ---- emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) gvarargs.h function.h \ regs.h insn-config.h real.h expr.h + getpwd.o : getpwd.c $(CONFIG_H) integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \ *************** *** 293,297 **** proto: config.status protoize unprotoize SYSCALLS.c.X protoize.1 unprotoize.1 ! protoize: protoize.o getopt.o getopt1.o $(MALLOC) gcc -B./ $(GCC_CFLAGS) $(LDFLAGS) protoize.o getopt.o getopt1.o \ $(MALLOC) -o $@ --- 294,298 ---- proto: config.status protoize unprotoize SYSCALLS.c.X protoize.1 unprotoize.1 ! protoize: protoize.o getopt.o getopt1.o getpwd.o $(MALLOC) gcc -B./ $(GCC_CFLAGS) $(LDFLAGS) protoize.o getopt.o getopt1.o \ $(MALLOC) -o $@ *************** *** 304,308 **** protoize.c -I$(srcdir) ! unprotoize: unprotoize.o getopt.o getopt1.o $(MALLOC) gcc -B./ $(GCC_CFLAGS) $(LDFLAGS) unprotoize.o getopt.o getopt1.o \ $(MALLOC) -o $@ --- 305,309 ---- protoize.c -I$(srcdir) ! unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o $(MALLOC) gcc -B./ $(GCC_CFLAGS) $(LDFLAGS) unprotoize.o getopt.o getopt1.o \ $(MALLOC) -o $@ *************** *** 330,337 **** | awk 'NF > 0 {print}' > unprotoize.1 ! SYSCALLS.c.X: SYSCALLS.c gcc ./cc1 ./cpp ! gcc -B./ $(GCC_CFLAGS) $(CPPFLAGS) $(INCLUDES) -fgen-aux-info \ ! -S -o /dev/null SYSCALLS.c test-protoize: -rm -f tmp-protoize.* --- 331,342 ---- | awk 'NF > 0 {print}' > unprotoize.1 ! SYSCALLS.c : $(srcdir)/sys-types.h $(srcdir)/sys-protos.h ! cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h >$@ + # This info describes the target machine, so compile with GCC just built. + SYSCALLS.c.X: SYSCALLS.c $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ + -aux-info $@ -S -o /dev/null SYSCALLS.c + test-protoize: -rm -f tmp-protoize.* *************** *** 357,369 **** # to recompile insn-*.o. ! insn-config.h: md genconfig go32 genconfig md > tmp-config.h update tmp-config.h insn-config.h ! insn-flags.h: md genflags go32 genflags md > tmp-flags.h update tmp-flags.h insn-flags.h ! insn-codes.h: md gencodes go32 gencodes md > tmp-codes.h update tmp-codes.h insn-codes.h --- 362,377 ---- # to recompile insn-*.o. ! insn-config.h: tmp-config.h ! tmp-config.h: md genconfig go32 genconfig md > tmp-config.h update tmp-config.h insn-config.h ! insn-flags.h: tmp-flags.h ! tmp-flags.h: md genflags go32 genflags md > tmp-flags.h update tmp-flags.h insn-flags.h ! insn-codes.h: tmp-codes.h ! tmp-codes.h: md gencodes go32 gencodes md > tmp-codes.h update tmp-codes.h insn-codes.h *************** *** 381,385 **** gcc $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-recog.c ! insn-recog.c: md genrecog go32 genrecog md > tmp-recog.c update tmp-recog.c insn-recog.c --- 389,394 ---- gcc $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-recog.c ! insn-recog.c: tmp-recog.c ! tmp-recog.c: md genrecog go32 genrecog md > tmp-recog.c update tmp-recog.c insn-recog.c *************** *** 388,392 **** gcc $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-extract.c ! insn-extract.c: md genextract go32 genextract md > tmp-extract.c update tmp-extract.c insn-extract.c --- 397,402 ---- gcc $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-extract.c ! insn-extract.c: tmp-extract.c ! tmp-extract.c: md genextract go32 genextract md > tmp-extract.c update tmp-extract.c insn-extract.c *************** *** 395,399 **** gcc $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-peep.c ! insn-peep.c: md genpeep go32 genpeep md > tmp-peep.c update tmp-peep.c insn-peep.c --- 405,410 ---- gcc $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-peep.c ! insn-peep.c: tmp-peep.c ! tmp-peep.c: md genpeep go32 genpeep md > tmp-peep.c update tmp-peep.c insn-peep.c *************** *** 403,411 **** gcc $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-attrtab.c ! insn-attr.h: md genattr go32 genattr md > tmp-attr.h update tmp-attr.h insn-attr.h ! insn-attrtab.c: md genattrtab go32 genattrtab md > tmp-attrtab.c update tmp-attrtab.c insn-attrtab.c --- 414,424 ---- gcc $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-attrtab.c ! insn-attr.h: tmp-attr.h ! tmp-attr.h: md genattr go32 genattr md > tmp-attr.h update tmp-attr.h insn-attr.h ! insn-attrtab.c: tmp-attrtab.c ! tmp-attrtab.c: md genattrtab go32 genattrtab md > tmp-attrtab.c update tmp-attrtab.c insn-attrtab.c *************** *** 416,420 **** gcc $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-output.c ! insn-output.c: md genoutput go32 genoutput md > tmp-output.c update tmp-output.c insn-output.c --- 429,434 ---- gcc $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) -c insn-output.c ! insn-output.c: tmp-output.c ! tmp-output.c: md genoutput go32 genoutput md > tmp-output.c update tmp-output.c insn-output.c diff -rc2N gcc-2.0/Makefile.in gcc-2.1/Makefile.in *** gcc-2.0/Makefile.in Sat Feb 22 03:12:34 1992 --- gcc-2.1/Makefile.in Mon Mar 23 15:15:55 1992 *************** *** 20,26 **** # The targets for external use include: # all, doc, proto, install, install-cross, install-cross-rest, ! # uninstall, TAGS, mostlyclean, clean, cleanconfig, realclean, # stage1, stage2, stage3, stage4. .NOEXPORT: # This tells GNU Make version 3 # not to put all the variables in the environment. --- 20,29 ---- # The targets for external use include: # all, doc, proto, install, install-cross, install-cross-rest, ! # uninstall, TAGS, mostlyclean, clean, distclean, realclean, # stage1, stage2, stage3, stage4. + # Suppress smart makes who think they know how to automake Yacc files + .y.c: + .NOEXPORT: # This tells GNU Make version 3 # not to put all the variables in the environment. *************** *** 85,89 **** CCLIBFLAGS = -O ! # Version of ar to use when compiling libgcc1.a. OLDAR = ar --- 88,92 ---- CCLIBFLAGS = -O ! # Version of ar to use when compiling libgcc1.a. OLDAR = ar *************** *** 122,131 **** # NOTE: This directory must exist when you start installation. prefix = /usr/local # Directory in which to put the executable for the command `gcc' ! bindir = $(prefix)/bin # Directory in which to put the directories used by the compiler. ! libdir = $(prefix)/lib # Directory in which the compiler finds executables, libraries, etc. ! libsubdir = $(libdir)/gcc/$(target)/$(version) # Extension (if any) to put in installed man-page filename. manext = .1 --- 125,136 ---- # NOTE: This directory must exist when you start installation. prefix = /usr/local + # Directory in which to put host dependent programs and libraries + exec_prefix = $(prefix) # Directory in which to put the executable for the command `gcc' ! bindir = $(exec_prefix)/bin # Directory in which to put the directories used by the compiler. ! libdir = $(exec_prefix)/lib # Directory in which the compiler finds executables, libraries, etc. ! libsubdir = $(libdir)/gcc-lib/$(target)/$(version) # Extension (if any) to put in installed man-page filename. manext = .1 *************** *** 144,147 **** --- 149,154 ---- # Specify the rule for actually making libgcc1.a. + # The value may be empty; that means to do absolutely nothing + # with or for libgcc1.a. LIBGCC1 = libgcc1.a *************** *** 160,165 **** EXTRA_PASSES = ! # List of extra executables that should be compiled for this target machine ! # that are used for linking. # The rules for compiling them should be in the t-* file for the machine. EXTRA_PARTS = --- 167,174 ---- EXTRA_PASSES = ! # Like EXTRA_PASSES, but these are used when linking. ! EXTRA_PROGRAMS = ! ! # List of extra object files that should be compiled for this target machine. # The rules for compiling them should be in the t-* file for the machine. EXTRA_PARTS = *************** *** 194,203 **** # List of things which should already be built whenever we try to use gcc # to link anything. ! GCC_PARTS=$(GCC_PASSES) libgcc.a $(EXTRA_PARTS) # Change this to empty to prevent installing limits.h. ! # Actually, this currently has no effect, # and if that causes no problems, it can be deleted. ! # Otherwise, it must be replaced so as to control # the actions of install-limits-h. LIMITS_H = limits.h --- 203,212 ---- # List of things which should already be built whenever we try to use gcc # to link anything. ! GCC_PARTS=$(GCC_PASSES) libgcc.a $(EXTRA_PROGRAMS) $(EXTRA_PARTS) # Change this to empty to prevent installing limits.h. ! # Actually, this currently has no effect, # and if that causes no problems, it can be deleted. ! # Otherwise, it must be replaced so as to control # the actions of install-limits-h. LIMITS_H = limits.h *************** *** 236,240 **** # The real definition is under `all.internal' (for native compilers) # or `all.cross' (for cross compilers). ! all: $(ALL) # sed inserts variable overrides after the following line. --- 245,249 ---- # The real definition is under `all.internal' (for native compilers) # or `all.cross' (for cross compilers). ! all: all.indirect # sed inserts variable overrides after the following line. *************** *** 243,246 **** --- 252,257 ---- # Now figure out from those variables how to compile and link. + all.indirect: $(ALL) + INTERNAL_CFLAGS = $(CROSS) *************** *** 252,259 **** # Even if ALLOCA is set, don't use it if compiling with GCC. ! USE_ALLOCA= `if [ x"${CC}" = x"${OLDCC}" ] ; then echo ${ALLOCA}; else true; fi` ! USE_HOST_ALLOCA= `if [ x"${HOST_CC}" = x"${OLDCC}" -a x"${HOST_ALLOCA}" != x ] ; then echo ${HOST_PREFIX}${HOST_ALLOCA}; else true; fi` ! USE_HOST_MALLOC= `if [ x"${HOST_MALLOC}" != x ] ; then echo ${HOST_PREFIX}${HOST_MALLOC}; else true; fi` ! USE_HOST_OBSTACK= `if [ x"${HOST_OBSTACK}" != x ] ; then echo ${HOST_PREFIX}${HOST_OBSTACK}; else true; fi` # Dependency on obstack, alloca, malloc or whatever library facilities --- 263,270 ---- # Even if ALLOCA is set, don't use it if compiling with GCC. ! USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo ${ALLOCA} ;; esac ` ! USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac ` ! USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac ` ! USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac ` # Dependency on obstack, alloca, malloc or whatever library facilities *************** *** 318,322 **** OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \ function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \ ! rtl.o print-rtl.o rtlanal.o dbxout.o sdbout.o dwarfout.o emit-rtl.o \ integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \ regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \ --- 329,334 ---- OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \ function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \ ! rtl.o print-rtl.o rtlanal.o emit-rtl.o \ ! dbxout.o sdbout.o dwarfout.o xcoffout.o \ integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \ regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \ *************** *** 323,327 **** insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \ insn-recog.o insn-extract.o insn-output.o insn-emit.o \ ! insn-attrtab.o aux-output.o $(EXTRA_OBJS) # GEN files are listed separately, so they can be built before doing parallel --- 335,339 ---- insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \ insn-recog.o insn-extract.o insn-output.o insn-emit.o \ ! insn-attrtab.o aux-output.o getpwd.o $(EXTRA_OBJS) # GEN files are listed separately, so they can be built before doing parallel *************** *** 394,401 **** for-bootstrap: start.encap libgcc.a # These can't be made, with COFF encapsulation, until after GCC can run. ! rest.encap: libgcc.a float.h # This is what is made with the host's compiler # whether making a cross compiler or not. ! native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PARTS) # Define the names for selecting languages in LANGUAGES. --- 406,413 ---- for-bootstrap: start.encap libgcc.a # These can't be made, with COFF encapsulation, until after GCC can run. ! rest.encap: libgcc.a float.h $(EXTRA_PARTS) # This is what is made with the host's compiler # whether making a cross compiler or not. ! native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) # Define the names for selecting languages in LANGUAGES. *************** *** 406,412 **** PROTO: proto config.status: ! @echo You must configure gcc. Look at the INSTALL file for details. ! @false compilations: ${OBJS} --- 418,431 ---- PROTO: proto + # Really, really stupid make features, such as SUN's KEEP_STATE, may force + # a target to build even if it is up-to-date. So we must verify that + # config.status does not exist before failing. config.status: ! @if [ ! -f config.status ] ; then \ ! echo You must configure gcc. Look at the INSTALL file for details.; \ ! false; \ ! else \ ! true; \ ! fi compilations: ${OBJS} *************** *** 492,496 **** # that should not make the command give up when the if condition is false. # Instead, we test for failure after each command where it matters. ! for file in .. $(LIB1FUNCS_EXTRA); \ do \ if [ x$${file} != x.. ]; then \ --- 511,515 ---- # that should not make the command give up when the if condition is false. # Instead, we test for failure after each command where it matters. ! -for file in .. $(LIB1FUNCS_EXTRA); \ do \ if [ x$${file} != x.. ]; then \ *************** *** 535,540 **** do \ echo $${name}; \ ! $(GCC_FOR_TARGET) -fstrength-reduce -O $(INCLUDES) \ ! $(LIBGCC2_CFLAGS) -c -DL$${name} \ $(srcdir)/libgcc2.c -o $${name}.o; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ --- 554,558 ---- do \ echo $${name}; \ ! $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \ $(srcdir)/libgcc2.c -o $${name}.o; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ *************** *** 548,552 **** # that should not make the command give up when the if condition is false. # Instead, we test for failure after each command where it matters. ! for file in .. $(LIB2FUNCS_EXTRA); \ do \ if [ x$${file} != x.. ]; then \ --- 566,570 ---- # that should not make the command give up when the if condition is false. # Instead, we test for failure after each command where it matters. ! -for file in .. $(LIB2FUNCS_EXTRA); \ do \ if [ x$${file} != x.. ]; then \ *************** *** 557,562 **** if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ else true; fi; \ ! $(GCC_FOR_TARGET) -fstrength-reduce -O $(INCLUDES) \ ! $(LIBGCC2_CFLAGS) -c $${file}; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \ --- 575,579 ---- if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ else true; fi; \ ! $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \ *************** *** 576,580 **** -rm -rf tmplibgcc.a libgcc.a tmpcopy mkdir tmpcopy ! (cd tmpcopy; $(AR) x ../$(LIBGCC1)) (cd tmpcopy; $(AR) x ../$(LIBGCC2)) (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o) --- 593,600 ---- -rm -rf tmplibgcc.a libgcc.a tmpcopy mkdir tmpcopy ! -if [ x$(LIBGCC1) != x ]; \ ! then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \ ! else true; \ ! fi (cd tmpcopy; $(AR) x ../$(LIBGCC2)) (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o) *************** *** 590,600 **** crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_BEGIN \ ! -finhibit-size-directive -g0 -c $(srcdir)/crtstuff.c ! mv crtstuff.o crtbegin.o crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_END \ ! -finhibit-size-directive -g0 -c $(srcdir)/crtstuff.c ! mv crtstuff.o crtend.o # Compiling object files from source files. --- 610,618 ---- crtbegin.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_BEGIN \ ! -finhibit-size-directive -g0 -c $(srcdir)/crtstuff.c -o crtbegin.o crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_END \ ! -finhibit-size-directive -g0 -c $(srcdir)/crtstuff.c -o crtend.o # Compiling object files from source files. *************** *** 663,666 **** --- 681,690 ---- collect2.o : collect2.c $(CONFIG_H) gstab.h + $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ + -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ + -DSTANDARD_BIN_PREFIX=\"$(bindir)/\" \ + -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \ + -DDEFAULT_TARGET_MACHINE=\"$(target)\" \ + -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'` # Objectionable C language specific files. *************** *** 684,688 **** $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ ! -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \ -DDEFAULT_TARGET_MACHINE=\"$(target)\" \ -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'` --- 708,712 ---- $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ ! -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \ -DDEFAULT_TARGET_MACHINE=\"$(target)\" \ -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'` *************** *** 697,701 **** stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h ! toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h insn-attr.h rtl.o : rtl.c $(CONFIG_H) $(RTL_H) --- 721,726 ---- stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h ! toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \ ! insn-attr.h xcoffout.h rtl.o : rtl.c $(CONFIG_H) $(RTL_H) *************** *** 705,709 **** varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h \ ! insn-codes.h expr.h hard-reg-set.h regs.h function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \ insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \ --- 730,734 ---- varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h \ ! insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h \ insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \ *************** *** 722,726 **** insn-flags.h insn-config.h insn-codes.h expr.h recog.h dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \ ! insn-config.h reload.h gstab.h sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \ insn-config.h reload.h --- 747,751 ---- insn-flags.h insn-config.h insn-codes.h expr.h recog.h dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \ ! insn-config.h reload.h gstab.h xcoffout.h sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \ insn-config.h reload.h *************** *** 727,732 **** --- 752,759 ---- dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \ insn-config.h reload.h output.h + xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) flags.h gvarargs.h function.h \ regs.h insn-config.h insn-codes.h real.h expr.h + getpwd.o : getpwd.c $(CONFIG_H) integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \ *************** *** 769,773 **** final.o : final.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h regs.h \ recog.h conditions.h insn-config.h insn-attr.h real.h output.h \ ! hard-reg-set.h insn-codes.h gstab.h recog.o : recog.c $(CONFIG_H) $(RTL_H) \ regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \ --- 796,800 ---- final.o : final.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h regs.h \ recog.h conditions.h insn-config.h insn-attr.h real.h output.h \ ! hard-reg-set.h insn-codes.h gstab.h xcoffout.h recog.o : recog.c $(CONFIG_H) $(RTL_H) \ regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \ *************** *** 789,792 **** --- 816,820 ---- `echo $(srcdir)/alloca.c | sed 's,^\./,,'` $(ALLOCA_FINISH) + -rm alloca.s # Generate header and source files from the machine description, *************** *** 1020,1027 **** # is for compatibility with the current version of libg++. $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ ! -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \ -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \ ! -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \ -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'` --- 1048,1055 ---- # is for compatibility with the current version of libg++. $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ ! -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \ -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \ ! -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \ -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'` *************** *** 1028,1034 **** proto: config.status protoize unprotoize SYSCALLS.c.X protoize.1 unprotoize.1 ! protoize: protoize.o getopt.o getopt1.o version.o $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) \ ! protoize.o getopt.o getopt1.o version.o $(LIBS) -o $@ protoize.o: $(srcdir)/protoize.c getopt.h $(CONFIG_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ --- 1056,1062 ---- proto: config.status protoize unprotoize SYSCALLS.c.X protoize.1 unprotoize.1 ! protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) \ ! protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@ protoize.o: $(srcdir)/protoize.c getopt.h $(CONFIG_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ *************** *** 1040,1046 **** $(srcdir)/protoize.c ! unprotoize: unprotoize.o getopt.o getopt1.o version.o $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) \ ! unprotoize.o getopt.o getopt1.o version.o $(LIBS) -o $@ unprotoize.o: $(srcdir)/protoize.c getopt.h $(CONFIG_H) cp $(srcdir)/protoize.c unprotoize.c --- 1068,1074 ---- $(srcdir)/protoize.c ! unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) \ ! unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@ unprotoize.o: $(srcdir)/protoize.c getopt.h $(CONFIG_H) cp $(srcdir)/protoize.c unprotoize.c *************** *** 1071,1082 **** mv tmp-unproto.1 unprotoize.1 # This info describes the target machine, so compile with GCC just built. SYSCALLS.c.X: SYSCALLS.c $(GCC_PASSES) $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! -fgen-aux-info -S -o /dev/null $(srcdir)/SYSCALLS.c # Remake the info files. ! doc: $(srcdir)/cpp.info $(srcdir)/gplus.info $(srcdir)/gcc.info $(srcdir)/cpp.info: $(srcdir)/cpp.texi --- 1099,1113 ---- mv tmp-unproto.1 unprotoize.1 + SYSCALLS.c : $(srcdir)/sys-types.h $(srcdir)/sys-protos.h + cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h >$@ + # This info describes the target machine, so compile with GCC just built. SYSCALLS.c.X: SYSCALLS.c $(GCC_PASSES) $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ ! -aux-info $@ -S -o /dev/null SYSCALLS.c # Remake the info files. ! doc: $(srcdir)/cpp.info $(srcdir)/gcc.info $(srcdir)/cpp.info: $(srcdir)/cpp.texi *************** *** 1083,1088 **** makeinfo `echo $(srcdir)/cpp.texi | sed 's,^\./,,'` ! $(srcdir)/gplus.info: $(srcdir)/gplus.texi ! makeinfo `echo $(srcdir)/gplus.texi | sed 's,^\./,,'` $(srcdir)/gcc.info: $(srcdir)/gcc.texi --- 1114,1119 ---- makeinfo `echo $(srcdir)/cpp.texi | sed 's,^\./,,'` ! #$(srcdir)/gplus.info: $(srcdir)/gplus.texi ! # makeinfo `echo $(srcdir)/gplus.texi | sed 's,^\./,,'` $(srcdir)/gcc.info: $(srcdir)/gcc.texi *************** *** 1093,1099 **** # `mostlyclean', `clean', `cleanconfig' and `realclean'. # `mostlyclean' is useful while working on a particular type of machine. # It does not delete libgcc.a or its parts, so it won't have to be recompiled. ! # `clean' deletes what you want to delete ordinarily to save space. ! # This is most, but not all, of the files made by compilation. # `cleanconfig' also deletes the files made by config. # `realclean' also deletes everything that could be regenerated automatically. --- 1124,1130 ---- # `mostlyclean', `clean', `cleanconfig' and `realclean'. # `mostlyclean' is useful while working on a particular type of machine. + # It deletes most, but not all, of the files made by compilation. # It does not delete libgcc.a or its parts, so it won't have to be recompiled. ! # `clean' deletes everything made by running `make all'. # `cleanconfig' also deletes the files made by config. # `realclean' also deletes everything that could be regenerated automatically. *************** *** 1106,1121 **** -rm -f $(HOST_PREFIX_1)obstack.c # Delete the temp files made in the course of building libgcc.a. ! -rm -f tmplibgcc.a* tmpcopy for name in $(LIB1FUNCS); do rm -f $${name}.c; done # Delete other temporary files. ! -rm -f tmp-float.h tmp-*proto.1 tmp-gcc.xtar.Z tmp-limits.h # Delete the stamp files. -rm -f stamp-* tmp-* ! -rm -f *.s *.s[0-9] *.co -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop ! -rm -f *.dbr *.jump2 *.sched *.cse2 *.cpp *.sched2 *.stack ! -rm -f gccnew specs core float.h enquire SYSCALLS.c.X ! -rm -f collect collect2 ld mips-tfile mips-tdump -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg # delete all files made by compilation. --- 1137,1158 ---- -rm -f $(HOST_PREFIX_1)obstack.c # Delete the temp files made in the course of building libgcc.a. ! -rm -f tmplibgcc* tmpcopy for name in $(LIB1FUNCS); do rm -f $${name}.c; done # Delete other temporary files. ! -rm -f tmp-float.h tmp-*proto.1 tmp-gcc.xtar.Z tmp-limits.h gccnew # Delete the stamp files. -rm -f stamp-* tmp-* ! # Delete debugging dump files. -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop ! -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack ! # Delete some files made during installation. ! -rm -f specs float.h enquire SYSCALLS.c SYSCALLS.c.X ! -rm -f collect collect2 ld mips-tfile mips-tdump alloca.s ! # Delete unwanted output files from TeX. -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg + # Delete sorted indices we don't actually use. + -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns + # Delete core dumps. + -rm -f core # delete all files made by compilation. *************** *** 1124,1141 **** -rm -fr stage1 stage2 stage3 stage4 ! # Like clean but also delete the links and files made to configure gcc. ! cleanconfig: clean -rm -f tm.h aux-output.c config.h md config.status tconfig.h ! -rm -f Makefile aux-output2.c ! # This is used to get rid of everything found in the source dir # that shouldn't be in the distribution. ! distclean: cleanconfig ! -rm -rf =* #* *~ config/#* config/*~ ! -rm -f *.dvi *.oaux patch* # Get rid of every file that's generated from some other file. # Most of these files ARE PRESENT in the GCC distribution. ! realclean: cleanconfig -rm -f cp-parse.c cp-parse.h cp-parse.output -rm -f objc-parse.c objc-parse.output --- 1161,1180 ---- -rm -fr stage1 stage2 stage3 stage4 ! # This is used to get rid of everything found in the source dir ! # that shouldn't be in the distribution. ! distclean: clean -rm -f tm.h aux-output.c config.h md config.status tconfig.h ! -rm -f Makefile *.dvi *.oaux ! # Delete anything likely to be found in the source directory # that shouldn't be in the distribution. ! extraclean: distclean ! -rm -rf =* #* *~* config/=* config/#* config/*~* ! -rm -f *.dvi *.oaux patch* *.orig *.rej *.d *.Z *.tar ! -rm -f *.s *.s[0-9] *.i # Get rid of every file that's generated from some other file. # Most of these files ARE PRESENT in the GCC distribution. ! realclean: distclean -rm -f cp-parse.c cp-parse.h cp-parse.output -rm -f objc-parse.c objc-parse.output *************** *** 1155,1159 **** # Copy the files of native compiler into directories where they will be run. install-native: install-common install-libgcc $(INSTALL_HEADERS) \ ! install-man install-proto # Copy the files of cross compiler into directories where they will be run. --- 1194,1198 ---- # Copy the files of native compiler into directories where they will be run. install-native: install-common install-libgcc $(INSTALL_HEADERS) \ ! install-man # Copy the files of cross compiler into directories where they will be run. *************** *** 1221,1227 **** install-dir: if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi ! if [ -d $(libdir)/gcc ] ; then true ; else mkdir $(libdir)/gcc ; fi ! if [ -d $(libdir)/gcc/$(target) ] ; then true ; else mkdir $(libdir)/gcc/$(target) ; fi ! if [ -d $(libdir)/gcc/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc/$(target)/$(version) ; fi if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi # We don't use mkdir -p to create the parents of mandir, --- 1260,1266 ---- install-dir: if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi ! if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; fi ! if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; fi ! if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; fi if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi # We don't use mkdir -p to create the parents of mandir, *************** *** 1241,1245 **** fi; \ done ! for file in $(EXTRA_PASSES) $(EXTRA_PARTS) ..; do \ if [ x"$$file" != x.. ]; then \ rm -f $(libsubdir)/$$file; \ --- 1280,1284 ---- fi; \ done ! for file in $(EXTRA_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) ..; do \ if [ x"$$file" != x.. ]; then \ rm -f $(libsubdir)/$$file; \ *************** *** 1252,1259 **** # and also as either gcc (if native) or $(tooldir)/bin/gcc. -if [ -f gcc-cross ] ; then \ if [ -d $(tooldir)/bin/. ] ; then \ rm -f $(tooldir)/bin/gcc; \ $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \ - $(INSTALL_PROGRAM) gcc-cross $(bindir)/gcc-$(target); \ else true; fi; \ else \ --- 1291,1298 ---- # and also as either gcc (if native) or $(tooldir)/bin/gcc. -if [ -f gcc-cross ] ; then \ + $(INSTALL_PROGRAM) gcc-cross $(bindir)/gcc-$(target); \ if [ -d $(tooldir)/bin/. ] ; then \ rm -f $(tooldir)/bin/gcc; \ $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \ else true; fi; \ else \ *************** *** 1280,1287 **** # Install the man pages. ! install-man: install-dir $(srcdir)/gcc.1 protoize.1 unprotoize.1 -rm -f $(mandir)/gcc$(manext) $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext) chmod a-x $(mandir)/gcc$(manext) -rm -f $(mandir)/protoize$(manext) $(INSTALL_DATA) protoize.1 $(mandir)/protoize$(manext) --- 1319,1330 ---- # Install the man pages. ! install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 \ ! protoize.1 unprotoize.1 $(srcdir)/g++.1 -rm -f $(mandir)/gcc$(manext) $(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext) chmod a-x $(mandir)/gcc$(manext) + -rm -f $(mandir)/cccp$(manext) + $(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext) + chmod a-x $(mandir)/cccp$(manext) -rm -f $(mandir)/protoize$(manext) $(INSTALL_DATA) protoize.1 $(mandir)/protoize$(manext) *************** *** 1290,1293 **** --- 1333,1339 ---- $(INSTALL_DATA) unprotoize.1 $(mandir)/unprotoize$(manext) chmod a-x $(mandir)/unprotoize$(manext) + -rm -f $(mandir)/g++$(manext) + $(INSTALL_DATA) $(srcdir)/g++.1 $(mandir)/g++$(manext) + chmod a-x $(mandir)/g++$(manext) # Install the library. *************** *** 1353,1358 **** # This appears not to work. It isn't clear how to fix it. ! # $(libsubdir)/include/README: $(libsubdir)/include $(srcdir)/fixincludes ! # LIB=$(libsubdir)/include $(srcdir)/fixincludes # $(INSTALL_DATA) $(srcdir)/fixincludes-README $@ # chmod a-x $@ --- 1399,1404 ---- # This appears not to work. It isn't clear how to fix it. ! # $(libsubdir)/include/README: $(libsubdir)/include $(srcdir)/$(FIXINCLUDES) ! # LIB=$(libsubdir)/include $(srcdir)/$(FIXINCLUDES) # $(INSTALL_DATA) $(srcdir)/fixincludes-README $@ # chmod a-x $@ *************** *** 1363,1367 **** mkdir $(libsubdir)/tmp # Move aside the headers that come from GCC; delete all else. ! cd $(libsubdir)/include; mv $(INSTALLED_H) ../tmp; rm -rf * # Install fixed copies of system files. $(srcdir)/$(FIXINCLUDES) $(libsubdir)/include --- 1409,1421 ---- mkdir $(libsubdir)/tmp # Move aside the headers that come from GCC; delete all else. ! # The sed command gets just the last file name component; ! # this is necessary because VPATH could add a dirname. ! # Using basename would be simpler, but some systems don't have it. ! cd $(libsubdir)/include; \ ! for file in $(INSTALLED_H); do \ ! realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ ! mv $$realfile ../tmp; \ ! done; \ ! rm -rf * # Install fixed copies of system files. $(srcdir)/$(FIXINCLUDES) $(libsubdir)/include *************** *** 1386,1394 **** -rm -rf $(libsubdir) -rm -rf $(bindir)/gcc - -rm -rf $(mandir)/protoize$(manext) - -rm -rf $(mandir)/unprotoize$(manext) -rm -rf $(bindir)/protoize -rm -rf $(bindir)/unprotoize -rm -rf $(mandir)/gcc$(manext) -rm -rf $(mandir)/protoize$(manext) -rm -rf $(mandir)/unprotoize$(manext) --- 1440,1447 ---- -rm -rf $(libsubdir) -rm -rf $(bindir)/gcc -rm -rf $(bindir)/protoize -rm -rf $(bindir)/unprotoize -rm -rf $(mandir)/gcc$(manext) + -rm -rf $(mandir)/cccp$(manext) -rm -rf $(mandir)/protoize$(manext) -rm -rf $(mandir)/unprotoize$(manext) *************** *** 1433,1437 **** mv tmp gcc-$(version) # Get rid of everything we don't want in the distribution. ! cd gcc-$(version); make -f Makefile.in distclean # Make the distribution. tar chf gcc.xtar gcc-$(version) --- 1486,1490 ---- mv tmp gcc-$(version) # Get rid of everything we don't want in the distribution. ! cd gcc-$(version); make -f Makefile.in extraclean # Make the distribution. tar chf gcc.xtar gcc-$(version) *************** *** 1479,1483 **** # Copy the object files from a particular stage into a subdirectory. stage1: force ! if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi -mv $(STAGESTUFF) stage1 -rm -f stage1/libgcc.a --- 1532,1536 ---- # Copy the object files from a particular stage into a subdirectory. stage1: force ! -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi -mv $(STAGESTUFF) stage1 -rm -f stage1/libgcc.a *************** *** 1486,1490 **** stage2: force ! if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi -mv $(STAGESTUFF) stage2 -rm -f stage2/libgcc.a --- 1539,1543 ---- stage2: force ! -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi -mv $(STAGESTUFF) stage2 -rm -f stage2/libgcc.a diff -rc2N gcc-2.0/README gcc-2.1/README *** gcc-2.0/README Sun Jan 19 13:56:52 1992 --- gcc-2.1/README Mon Mar 23 01:00:40 1992 *************** *** 1,4 **** ! This directory contains the version 2.0 release of the GNU C compiler. ! This is the first test release of GCC version 2. See the file gcc.texi (together with other files that it includes) for --- 1,4 ---- ! This directory contains the version 2.1 release of the GNU C compiler. ! This is the second test release of GCC version 2. See the file gcc.texi (together with other files that it includes) for diff -rc2N gcc-2.0/README-ENCAP gcc-2.1/README-ENCAP *** gcc-2.0/README-ENCAP Sat Mar 3 15:36:53 1990 --- gcc-2.1/README-ENCAP Thu Mar 5 16:57:34 1992 *************** *** 20,24 **** Now you must copy `cc1' and `cpp' and `gnulib' into the directory ! `/usr/local/lib/gcc/i386-sysv-gas/VERSION', where VERSION stands for the GCC version number. Also install `gcc' in a directory in your path. --- 20,24 ---- Now you must copy `cc1' and `cpp' and `gnulib' into the directory ! `/usr/local/lib/gcc-lib/i386-sysv-gas/VERSION', where VERSION stands for the GCC version number. Also install `gcc' in a directory in your path. *************** *** 28,32 **** cd .../gas make a386 ! cp a386 /usr/local/lib/gcc/i386-sysv-gas/VERSION Now, make the other utilities: --- 28,32 ---- cd .../gas make a386 ! cp a386 /usr/local/lib/gcc-lib/i386-sysv-gas/VERSION Now, make the other utilities: *************** *** 37,41 **** make ! cp ld /usr/local/lib/gcc/i386-sysv-gas/VERSION Put the other programs (size nm strip ar objdump and ranlib) somewhere --- 37,41 ---- make ! cp ld /usr/local/lib/gcc-lib/i386-sysv-gas/VERSION Put the other programs (size nm strip ar objdump and ranlib) somewhere *************** *** 54,58 **** cp .../gcc/gnulib usg-gnulib make gnulib ! cp gnulib /usr/local/lib/gcc/i386-sysv-gas/VERSION robotussin /lib/crt0.o /usr/local/lib/gcc-crt0.o --- 54,58 ---- cp .../gcc/gnulib usg-gnulib make gnulib ! cp gnulib /usr/local/lib/gcc-lib/i386-sysv-gas/VERSION robotussin /lib/crt0.o /usr/local/lib/gcc-crt0.o *************** *** 64,68 **** cd .../gcc make rest.encap ! cp gnulib /usr/local/lib/gcc/i386-sysv-gas/VERSION Now, you should be able to use 'gcc' to compile programs. --- 64,68 ---- cd .../gcc make rest.encap ! cp gnulib /usr/local/lib/gcc-lib/i386-sysv-gas/VERSION Now, you should be able to use 'gcc' to compile programs. diff -rc2N gcc-2.0/README-bugs gcc-2.1/README-bugs *** gcc-2.0/README-bugs --- gcc-2.1/README-bugs Mon Mar 23 23:30:15 1992 *************** *** 0 **** --- 1,136 ---- + If you encounter a problem in GCC, what should you do? + + You should send a bug report. + + Here are some tips for how you can report problems in GCC effectively. + All of them follow from common sense together with the nature of the + purpose and the situation. + + * It is absolutely vital that you tell me about even the smallest + change or departure from the standard sources and procedure. + + Otherwise, you are not testing the same program that I asked you to + test. 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 am about to release. I might think + that GCC works, when in fact it has not even been 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 machine-specific configuration files. + They also give you 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. + + (Testing with a different set of options can be useful *in addition*, + but not *instead of* the default options.) + + * 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 such 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. + + * Don't delay sending information. + + When you test on a system and encounter no problems, please tell me + about it right away. That way, I will know that someone has tested + GCC on that kind of system. + + Please don't wait for several days "to see if it really works before + you say anything." Tell me right away that GCC seems basically to + work; then, if you notice a problem a few days later, tell me + immediately about that when you see it. + + It is okay if you double check things before reporting a problem, such + as to see if you can easily fix it. But don't wait very long. A good + rule to use in pretesting 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. + + * 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. So I might have to ignore your patch. + + * When you write a fix, keep in mind that I can't install a change + that *might* break other systems without the risk that it will fail to + work and therefore require an additional cycle of pretesting. + + 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. + + * 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. + + Local Variables: + mode: text + End: \ No newline at end of file diff -rc2N gcc-2.0/README-mips gcc-2.1/README-mips *** gcc-2.0/README-mips --- gcc-2.1/README-mips Mon Mar 23 22:04:54 1992 *************** *** 0 **** --- 1,69 ---- + The following two patches were suggested for mips-tfile.c. + They arrived too late to be considered for installation. + But it's possible that they actually are needed. + If you have trouble with mips-tfile, please try these patches. + + + Mon Mar 23 15:10:10 1992 Brendan Kehoe (brendan@cs.widener.edu) + + * mips-tfile.c (parse_begin, parse_bend): Look in the external + symbols table for labels; also refer to each as an external + symbol, not as a normal symbol. + + --- mips-tfile.c.~4~ Mon Mar 23 14:46:08 1992 + +++ mips-tfile.c Mon Mar 23 15:08:58 1992 + @@ -2813,7 +2813,7 @@ + + hash_ptr = hash_string (start, + end_p1 - start, + - &orig_str_hash[0], + + &ext_str_hash[0], + (symint_t *)0); + + if (hash_ptr == (shash_t *)0) + @@ -2830,7 +2830,7 @@ + + (void) add_local_symbol ((const char *)0, (const char *)0, + st_Block, sc_Text, + - (symint_t)hash_ptr->sym_ptr->value - cur_oproc_begin->value, + + (symint_t)hash_ptr->esym_ptr->asym.value - cur_oproc_begin->value, + (symint_t)0); + } + + @@ -2863,7 +2863,7 @@ + + hash_ptr = hash_string (start, + end_p1 - start, + - &orig_str_hash[0], + + &ext_str_hash[0], + (symint_t *)0); + + if (hash_ptr == (shash_t *)0) + @@ -2880,7 +2880,7 @@ + + (void) add_local_symbol ((const char *)0, (const char *)0, + st_End, sc_Text, + - (symint_t)hash_ptr->sym_ptr->value - cur_oproc_begin->value, + + (symint_t)hash_ptr->esym_ptr->asym.value - cur_oproc_begin->value, + (symint_t)0); + } + + + Mon Mar 23 15:10:10 1992 Brendan Kehoe (brendan@cs.widener.edu) + + * mips-tfile.c (copy_object): It doesn't make sense to enter + static variables into the original symbol table, since the + same name may show up a number of times. + + -- + --- mips-tfile.c.~4~ Mon Mar 23 15:08:58 1992 + +++ mips-tfile.c Mon Mar 23 16:23:44 1992 + @@ -4581,7 +4581,6 @@ + break; + + case st_Global: + - case st_Static: + case st_Label: + case st_Proc: + case st_StaticProc: + diff -rc2N gcc-2.0/README.CRDS gcc-2.1/README.CRDS *** gcc-2.0/README.CRDS Fri Jan 3 17:41:50 1992 --- gcc-2.1/README.CRDS Fri Mar 13 23:58:08 1992 *************** *** 28,32 **** alloca() expects that the C compiler pops the stack after every function ! call. The Green Hills C compiler verion 1.8.0 supplied with UNSO does not. This behavior causes some programs (GNU make) to crash, and others to merely grow unbounded (GCC). To avoid this problem do not use -O in stage1/stage2, --- 28,32 ---- alloca() expects that the C compiler pops the stack after every function ! call. The Green Hills C compiler version 1.8.0 supplied with UNSO does not. This behavior causes some programs (GNU make) to crash, and others to merely grow unbounded (GCC). To avoid this problem do not use -O in stage1/stage2, diff -rc2N gcc-2.0/README.DWARF gcc-2.1/README.DWARF *** gcc-2.0/README.DWARF Thu Feb 20 02:52:08 1992 --- gcc-2.1/README.DWARF Fri Mar 13 23:58:09 1992 *************** *** 26,30 **** combination of GCC and svr4 SDB.) Note however that it is currently believed that the register numbering conventions used by GCC (in Dwarf ! output) are consistant with those used by the svr4 SDB debuggers provided with the System V Release 4 reference ports for the m88k, i386, and i860 processors. --- 26,30 ---- combination of GCC and svr4 SDB.) Note however that it is currently believed that the register numbering conventions used by GCC (in Dwarf ! output) are consistent with those used by the svr4 SDB debuggers provided with the System V Release 4 reference ports for the m88k, i386, and i860 processors. *************** *** 33,37 **** by Network Computing Devices to the Free Software Foundation. The additional code involved is covered under the GNU General Public ! Licence (aka `copyleft') just as the rest of GCC is. If you have questions or comments about the Dwarf generation feature --- 33,37 ---- by Network Computing Devices to the Free Software Foundation. The additional code involved is covered under the GNU General Public ! License (aka `copyleft') just as the rest of GCC is. If you have questions or comments about the Dwarf generation feature *************** *** 49,54 **** participating in the continuing evolution of Dwarf within the UI/PLSIG group, please contact either myself or the UI/PLSIG chairman, Dan Oldman ! . The UI/PLSIG welcomes and encourages the partici- ! pation of new members who might be interested in discussing debugging issues in general, and Dwarf in particular. There are no dues and you DO NOT have to be a UI member in order to join the UI/PLSIG. The UI/PLSIG --- 49,54 ---- participating in the continuing evolution of Dwarf within the UI/PLSIG group, please contact either myself or the UI/PLSIG chairman, Dan Oldman ! . The UI/PLSIG welcomes and encourages the ! participation of new members who might be interested in discussing debugging issues in general, and Dwarf in particular. There are no dues and you DO NOT have to be a UI member in order to join the UI/PLSIG. The UI/PLSIG *************** *** 181,185 **** 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 preceeding 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 --- 181,185 ---- 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 *************** *** 246,250 **** (5) The date/time (in seconds since midnight 1/1/70) at which the ! compilation of this compilation unit occured. This value should be interpreted as an unsigned quantity because gcc might be configured to generate a default value of 0xffffffff --- 246,250 ---- (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 *************** *** 254,258 **** Note that the first string placed into the .debug_sfnames section for each ! compilation unit is the name of the directory in which compilation occured. 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 --- 254,258 ---- 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 *************** *** 372,376 **** 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 intutively obvious ways. In the case of inline functions, the Dwarf representation is exactly as --- 372,376 ---- 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 diff -rc2N gcc-2.0/README.NS32K gcc-2.1/README.NS32K *** gcc-2.0/README.NS32K Wed Feb 22 12:29:18 1989 --- gcc-2.1/README.NS32K Fri Mar 13 23:58:10 1992 *************** *** 83,87 **** 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 refering 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)" --- 83,87 ---- 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)" diff -rc2N gcc-2.0/README.RS6000 gcc-2.1/README.RS6000 *** gcc-2.0/README.RS6000 Mon Feb 17 22:16:08 1992 --- gcc-2.1/README.RS6000 Wed Mar 11 23:44:56 1992 *************** *** 1,8 **** - The current release of GCC 2 does not support debugging on the RS/6000. - Debugging support is being written, and will probably be in a future - release. - The current version of the assembler (/bin/as) for the RS/6000 has ! certain problems that prevent debugging with GCC from working at all. IBM has produced a fixed version of the assembler. The replacement --- 1,5 ---- The current version of the assembler (/bin/as) for the RS/6000 has ! certain problems that prevent prevent the "-g" option in GCC from ! working. IBM has produced a fixed version of the assembler. The replacement *************** *** 14,26 **** have an IBM rep nearby with a networked VM machine. ! In either case, have your customer number ready and execute ! lslpp -h bos.obj ! to determine your release level. (Look on the ACTIVE line for ! something like 03.01.0005.0012.) Then call IBM Support at ! 800-237-5511. Ask for emergency shipment of the RS/6000 AIX fix for ! APAR IX22829. They may ask you to verify that it's a fix for ".extern ! foo conflicts with defining foo"; say yes. You will receive a tar or ! tar.Z file containing an assembler plus installation instructions. ! ! You might as well start this process now rather than waiting until ! you actually wish you had the fixed assembler. --- 11,22 ---- have an IBM rep nearby with a networked VM machine. ! In either case, execute ! lslpp -h bos.obj to determine your release level. (Look on the ! ACTIVE line for something like 03.01.0005.0012.) If you know your ! customer number, please have it available; if you do not, you will ! still be able to obtain the fixed assembler, but you will need to be ! insistent. Then call IBM Support at 800-237-5511. Ask for emergency ! shipment of the RS/6000 AIX fix for APAR IX22829. They may ask you to ! verify that it's a fix for ".extern foo conflicts with defining foo"; ! say yes. You will receive a tar or tar.Z file containing an assembler ! plus installation instructions. diff -rc2N gcc-2.0/README.X11 gcc-2.1/README.X11 *** gcc-2.0/README.X11 Wed Feb 12 12:58:15 1992 --- gcc-2.1/README.X11 Thu Mar 5 23:25:51 1992 *************** *** 4,7 **** --- 4,12 ---- the Sparc and 68k machines. + 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 *************** *** 9,13 **** mit/config/sunLib.rules -- If HasGcc2 is defined, then use -fpic to ! generate PIC code. mit/config/site.def -- Define HasGcc2 to be YES. --- 14,21 ---- mit/config/sunLib.rules -- If HasGcc2 is defined, then use -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. diff -rc2N gcc-2.0/SERVICE gcc-2.1/SERVICE *** gcc-2.0/SERVICE Sat Feb 22 03:37:56 1992 --- gcc-2.1/SERVICE Tue Mar 24 21:49:29 1992 *************** *** 396,420 **** Updated:10/10/91  - Jim Kingdon - East Wind - Route 3, box 6B2 - Tecumseh, Missouri 65760 - (417)679-4682 - - Willing to take on any gnu software; particularly knowledgeable about - the debugger (GDB) although I also have (varying amounts of) - experience with emacs, GCC, binutils, and others. I am familiar with - both VMS and Unix. Should be able to do porting, other programming tasks, - installation, user support, etc. - - Qualifications: Minor in computer science from Oberlin College, 2 - years experience in programming, helping users, system management. - Maintained GDB for the Free Software Foundation for a year. - - Rates: Negotiable, but as a ballpark figure $30/hr. Free or cheap to - Good Causes. - - Updated: 28 Dec 1991 -  Scott J. Kramer P.O. Box 3392 --- 396,399 ---- diff -rc2N gcc-2.0/byteorder.h gcc-2.1/byteorder.h *** gcc-2.0/byteorder.h Wed Jan 15 18:08:00 1992 --- gcc-2.1/byteorder.h Thu Mar 12 00:13:22 1992 *************** *** 63,67 **** } ! #elif defined (__i860__) || defined (__ns32k__) || defined (__vax__) || defined (__spur__) || defined (__arm__) /* For other little-endian machines, using C code is just as efficient as --- 63,69 ---- } ! #elif ((defined (__i860__) && !defined (__i860_big_endian__)) \ ! || defined (__ns32k__) || defined (__vax__) \ ! || defined (__spur__) || defined (__arm__)) /* For other little-endian machines, using C code is just as efficient as *************** *** 87,91 **** __STATIC __inline__ unsigned short htons (__arg) ! unsigned short __arg; { register unsigned short __result; --- 89,93 ---- __STATIC __inline__ unsigned short htons (__arg) ! unsigned int __arg; { register unsigned short __result; *************** *** 111,115 **** __STATIC __inline__ unsigned short htons (__arg) ! unsigned short __arg; { return __arg; --- 113,117 ---- __STATIC __inline__ unsigned short htons (__arg) ! unsigned int __arg; { return __arg; diff -rc2N gcc-2.0/c++ gcc-2.1/c++ *** gcc-2.0/c++ Tue Feb 18 16:22:04 1992 --- gcc-2.1/c++ Wed Mar 11 18:17:19 1992 *************** *** 1,4 **** --- 1,5 ---- #!/bin/sh # Compile programs, treating .c files as C++. + : || exec /bin/sh -f $0 $argv:q newargs= diff -rc2N gcc-2.0/c-aux-info.c gcc-2.1/c-aux-info.c *** gcc-2.0/c-aux-info.c Sat Feb 15 16:24:40 1992 --- gcc-2.1/c-aux-info.c Thu Mar 19 15:24:13 1992 *************** *** 56,59 **** --- 56,60 ---- void gen_aux_info_record (); + #if 0 /* Virtually every UN*X system now in common use (except for pre-4.3-tahoe BSD systems) now provides getcwd as called for by POSIX. Allow for *************** *** 69,72 **** --- 70,74 ---- #define GUESSPATHLEN 100 #endif /* (defined (USG) || defined (VMS)) */ + #endif /* 0 */ /* Take two strings and mash them together into a newly allocated area. */ *************** *** 236,240 **** hand) at some convenient moment. ! The string chozen here is a comment with question marks in it. */ if (!*formal_list) --- 238,242 ---- hand) at some convenient moment. ! The string chosen here is a comment with question marks in it. */ if (!*formal_list) *************** *** 621,624 **** --- 623,627 ---- if (! compiled_from_record++) { + #if 0 int size; char *wd; *************** *** 639,645 **** if (value != 0) fprintf (aux_info_file, "/* compiled from: %s */\n", wd); } ! /* Write the actual line of auxilliary info. */ fprintf (aux_info_file, "/* %s:%d:%c%c */ %s;", --- 642,653 ---- if (value != 0) fprintf (aux_info_file, "/* compiled from: %s */\n", wd); + #endif + /* The first line tells which directory file names are relative to. + Currently, -fgen-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;", diff -rc2N gcc-2.0/c-decl.c gcc-2.1/c-decl.c *** gcc-2.0/c-decl.c Thu Feb 13 17:21:26 1992 --- gcc-2.1/c-decl.c Sun Mar 22 21:07:53 1992 *************** *** 257,261 **** static int warn_about_return_type; ! /* Nonzero when starting a function delcared `extern inline'. */ static int current_extern_inline; --- 257,261 ---- static int warn_about_return_type; ! /* Nonzero when starting a function declared `extern inline'. */ static int current_extern_inline; *************** *** 377,381 **** static tree grokparms (), grokdeclarator (); tree pushdecl (); ! static tree builtin_function (); static tree lookup_tag (); --- 377,381 ---- static tree grokparms (), grokdeclarator (); tree pushdecl (); ! tree builtin_function (); static tree lookup_tag (); *************** *** 477,481 **** /* Warn if adding () is suggested. */ ! int warn_parentheses = 1; /* Nonzero means `$' can be in an identifier. --- 477,481 ---- /* Warn if adding () is suggested. */ ! int warn_parentheses; /* Nonzero means `$' can be in an identifier. *************** *** 623,626 **** --- 623,627 ---- warn_format = 1; warn_char_subscripts = 1; + warn_parentheses = 1; } else *************** *** 1074,1084 **** if (TYPE_NAME (type) == 0) TYPE_NAME (type) = name; - - if (b == global_binding_level) - b->tags = perm_tree_cons (name, type, b->tags); - else - b->tags = saveable_tree_cons (name, type, b->tags); } /* Create a fake NULL-named TYPE_DECL node whose TREE_TYPE will be the tagged type we just added to the current binding level. This fake --- 1075,1085 ---- if (TYPE_NAME (type) == 0) TYPE_NAME (type) = name; } + if (b == global_binding_level) + b->tags = perm_tree_cons (name, type, b->tags); + else + b->tags = saveable_tree_cons (name, type, b->tags); + /* Create a fake NULL-named TYPE_DECL node whose TREE_TYPE will be the tagged type we just added to the current binding level. This fake *************** *** 1128,1132 **** } /* Likewise, if the built-in is not ansi, then programs can ! overide it even globally without an error. */ else if (DECL_BUILT_IN_NONANSI (olddecl)) warning_with_decl (newdecl, --- 1129,1133 ---- } /* Likewise, if the built-in is not ansi, then programs can ! override it even globally without an error. */ else if (DECL_BUILT_IN_NONANSI (olddecl)) warning_with_decl (newdecl, *************** *** 1611,1615 **** { warning_with_decl (x, "type mismatch with previous implicit declaration"); ! warning_with_decl (x, "previous implicit declaration of `%s'"); } --- 1612,1617 ---- { warning_with_decl (x, "type mismatch with previous implicit declaration"); ! warning_with_decl (IDENTIFIER_IMPLICIT_DECL (name), ! "previous implicit declaration of `%s'"); } *************** *** 1683,1687 **** && ! TREE_PUBLIC (x) && ! TREE_EXTERNAL (x)) { ! if (IDENTIFIER_IMPLICIT_DECL (name)) pedwarn ("`%s' was declared implicitly `extern' and later `static'", IDENTIFIER_POINTER (name)); --- 1685,1696 ---- && ! TREE_PUBLIC (x) && ! TREE_EXTERNAL (x)) { ! /* Okay to declare an ANSI built-in as inline static. */ ! if (t != 0 && DECL_BUILT_IN (t) ! && TREE_INLINE (x)) ! ; ! /* Okay to declare a non-ANSI built-in as anything. */ ! else if (t != 0 && DECL_BUILT_IN_NONANSI (t)) ! ; ! else if (IDENTIFIER_IMPLICIT_DECL (name)) pedwarn ("`%s' was declared implicitly `extern' and later `static'", IDENTIFIER_POINTER (name)); *************** *** 2440,2444 **** endlink)))); ! /* ``integer_tpe_node'' mispelling corrected: North-Keys 30 Mar 91 */ builtin_function ("__builtin_constant_p", build_function_type (integer_type_node, endlink), --- 2449,2453 ---- endlink)))); ! /* ``integer_tpe_node'' misspelling corrected: North-Keys 30 Mar 91 */ builtin_function ("__builtin_constant_p", build_function_type (integer_type_node, endlink), *************** *** 2538,2541 **** --- 2547,2552 ---- builtin_function ("__builtin_strlen", sizet_ftype_string, BUILT_IN_STRLEN, "strlen"); + builtin_function ("__builtin_fsqrt", double_ftype_double, + BUILT_IN_FSQRT, "sqrt"); /* In an ANSI C program, it is okay to supply built-in meanings for these functions, since applications cannot validly use them *************** *** 2552,2555 **** --- 2563,2570 ---- builtin_function ("strcpy", string_ftype_ptr_ptr, BUILT_IN_STRCPY, 0); builtin_function ("strlen", sizet_ftype_string, BUILT_IN_STRLEN, 0); + #if 0 /* No good, since open-coded implementation fails to set errno. + The ANSI committee made a real mistake in specifying math fns. */ + builtin_function ("sqrt", double_ftype_double, BUILT_IN_FSQRT, 0); + #endif } *************** *** 2564,2568 **** builtin_function ("__builtin_frem", double_ftype_double_double, BUILT_IN_FREM, 0); builtin_function ("__builtin_memset", ptr_ftype_ptr_int_int, BUILT_IN_MEMSET, 0); - builtin_function ("__builtin_fsqrt", double_ftype_double, BUILT_IN_FSQRT, 0); builtin_function ("__builtin_getexp", double_ftype_double, BUILT_IN_GETEXP, 0); builtin_function ("__builtin_getman", double_ftype_double, BUILT_IN_GETMAN, 0); --- 2579,2582 ---- *************** *** 2582,2586 **** the name to be called if we can't opencode the function. */ ! static tree builtin_function (name, type, function_code, library_name) char *name; --- 2596,2600 ---- the name to be called if we can't opencode the function. */ ! tree builtin_function (name, type, function_code, library_name) char *name; *************** *** 3050,3053 **** --- 3064,3070 ---- { tree decl; + int old_immediate_size_expand = immediate_size_expand; + /* Don't try computing parm sizes now -- wait till fn is called. */ + immediate_size_expand = 0; /* The corresponding pop_obstacks is in finish_decl. */ *************** *** 3057,3060 **** --- 3074,3079 ---- decl = pushdecl (decl); + immediate_size_expand = old_immediate_size_expand; + current_binding_level->parm_order = tree_cons (NULL_TREE, decl, current_binding_level->parm_order); *************** *** 3075,3079 **** /* Make TYPE a complete type based on INITIAL_VALUE. ! Return 0 if successful, 1 if INITIAL_VALUE can't be decyphered, 2 if there was no information (in which case assume 1 if DO_DEFAULT). */ --- 3094,3098 ---- /* Make TYPE a complete type based on INITIAL_VALUE. ! Return 0 if successful, 1 if INITIAL_VALUE can't be deciphered, 2 if there was no information (in which case assume 1 if DO_DEFAULT). */ *************** *** 3162,3166 **** This function is where the complicated C meanings of `static' ! and `extern' are intrepreted. */ static tree --- 3181,3185 ---- This function is where the complicated C meanings of `static' ! and `extern' are interpreted. */ static tree *************** *** 3186,3190 **** enum tree_code innermost_code = ERROR_MARK; int bitfield = 0; ! int variable_size = 0; if (decl_context == BITFIELD) --- 3205,3209 ---- enum tree_code innermost_code = ERROR_MARK; int bitfield = 0; ! int size_varies = 0; if (decl_context == BITFIELD) *************** *** 3319,3323 **** typedef_type = type; if (type) ! variable_size = C_TYPE_VARIABLE_SIZE (type); /* No type at all: default to `int', and set EXPLICIT_INT --- 3338,3342 ---- typedef_type = type; if (type) ! size_varies = C_TYPE_VARIABLE_SIZE (type); /* No type at all: default to `int', and set EXPLICIT_INT *************** *** 3593,3598 **** /* Make sure the array size remains visibly nonconstant even if it is (eg) a const variable with known value. */ ! variable_size = 1; ! itype = build_index_type (save_expr (itype)); } } --- 3612,3618 ---- /* Make sure the array size remains visibly nonconstant even if it is (eg) a const variable with known value. */ ! size_varies = 1; ! itype = variable_size (itype); ! itype = build_index_type (itype); } } *************** *** 3629,3633 **** type = build_array_type (type, itype); ! if (variable_size) C_TYPE_VARIABLE_SIZE (type) = 1; } --- 3649,3653 ---- type = build_array_type (type, itype); ! if (size_varies) C_TYPE_VARIABLE_SIZE (type) = 1; } *************** *** 3641,3645 **** continue; ! variable_size = 0; /* Warn about some types functions can't return. */ --- 3661,3665 ---- continue; ! size_varies = 0; /* Warn about some types functions can't return. */ *************** *** 3709,3713 **** constp = 0; volatilep = 0; ! variable_size = 0; type = build_pointer_type (type); --- 3729,3733 ---- constp = 0; volatilep = 0; ! size_varies = 0; type = build_pointer_type (type); *************** *** 3779,3783 **** { type = build_array_type (TREE_TYPE (type), 0); ! if (variable_size) C_TYPE_VARIABLE_SIZE (type) = 1; } --- 3799,3803 ---- { type = build_array_type (TREE_TYPE (type), 0); ! if (size_varies) C_TYPE_VARIABLE_SIZE (type) = 1; } *************** *** 3830,3834 **** (c_build_type_variant (TREE_TYPE (type), constp, volatilep)); volatilep = constp = 0; ! variable_size = 0; } else if (TREE_CODE (type) == FUNCTION_TYPE) --- 3850,3854 ---- (c_build_type_variant (TREE_TYPE (type), constp, volatilep)); volatilep = constp = 0; ! size_varies = 0; } else if (TREE_CODE (type) == FUNCTION_TYPE) *************** *** 3844,3848 **** decl = build_decl (PARM_DECL, declarator, type); ! if (variable_size) C_DECL_VARIABLE_SIZE (decl) = 1; --- 3864,3868 ---- decl = build_decl (PARM_DECL, declarator, type); ! if (size_varies) C_DECL_VARIABLE_SIZE (decl) = 1; *************** *** 3888,3892 **** } decl = build_decl (FIELD_DECL, declarator, type); ! if (variable_size) C_DECL_VARIABLE_SIZE (decl) = 1; } --- 3908,3912 ---- } decl = build_decl (FIELD_DECL, declarator, type); ! if (size_varies) C_DECL_VARIABLE_SIZE (decl) = 1; } *************** *** 3957,3961 **** decl = build_decl (VAR_DECL, declarator, type); ! if (variable_size) C_DECL_VARIABLE_SIZE (decl) = 1; --- 3977,3981 ---- decl = build_decl (VAR_DECL, declarator, type); ! if (size_varies) C_DECL_VARIABLE_SIZE (decl) = 1; *************** *** 4230,4238 **** { enum tree_code code = TREE_CODE (TREE_VALUE (elt)); ! warning ("`%s %s' declared inside parameter list", ! (code == RECORD_TYPE ? "struct" ! : code == UNION_TYPE ? "union" ! : "enum"), ! IDENTIFIER_POINTER (TREE_PURPOSE (elt))); if (! already) { --- 4250,4265 ---- { enum tree_code code = TREE_CODE (TREE_VALUE (elt)); ! if (TREE_PURPOSE (elt) != 0) ! warning ("`%s %s' declared inside parameter list", ! (code == RECORD_TYPE ? "struct" ! : code == UNION_TYPE ? "union" ! : "enum"), ! IDENTIFIER_POINTER (TREE_PURPOSE (elt))); ! else ! warning ("anonymous %s declared inside parameter list", ! (code == RECORD_TYPE ? "struct" ! : code == UNION_TYPE ? "union" ! : "enum")); ! if (! already) { *************** *** 4261,4265 **** There will be an error message anyway, from pending_xref_error. If we create an empty xref just for an invalid use of the type, ! the main result is to create lots of superflous error messages. */ if (ref) return ref; --- 4288,4292 ---- There will be an error message anyway, from pending_xref_error. If we create an empty xref just for an invalid use of the type, ! the main result is to create lots of superfluous error messages. */ if (ref) return ref; *************** *** 5310,5313 **** --- 5337,5350 ---- else actual = type; + + /* We are going to assign a new value for the TYPE_ACTUAL_ARG_TYPES + of the type of this function, but we need to avoid having this + affect the types of other similarly-typed functions, so we must + first force the generation of an identical (but separate) type + node for the relevant function type. The new node we create + will be a variant of the main variant of the original function + type. */ + + TREE_TYPE (fndecl) = build_type_copy (TREE_TYPE (fndecl)); TYPE_ACTUAL_ARG_TYPES (TREE_TYPE (fndecl)) = actual; diff -rc2N gcc-2.0/c-lex.c gcc-2.1/c-lex.c *** gcc-2.0/c-lex.c Thu Jan 30 23:26:43 1992 --- gcc-2.1/c-lex.c Fri Mar 13 23:58:29 1992 *************** *** 1,3 **** ! /* Lexical analyser for C and Objective C. Copyright (C) 1987, 1988, 1989, 1992 Free Software Foundation, Inc. --- 1,3 ---- ! /* Lexical analyzer for C and Objective C. Copyright (C) 1987, 1988, 1989, 1992 Free Software Foundation, Inc. *************** *** 153,161 **** { {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, ! {"asm", ASM, NORID}, {"",}, ! {"__asm", ASM, NORID}, {"",}, ! {"__asm__", ASM, NORID}, {"break", BREAK, NORID}, {"__typeof__", TYPEOF, NORID}, --- 153,161 ---- { {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, ! {"asm", ASM_KEYWORD, NORID}, {"",}, ! {"__asm", ASM_KEYWORD, NORID}, {"",}, ! {"__asm__", ASM_KEYWORD, NORID}, {"break", BREAK, NORID}, {"__typeof__", TYPEOF, NORID}, *************** *** 1085,1089 **** /* Even if we decided to recognize asm, still perhaps warn. */ if (pedantic ! && (value == ASM || value == TYPEOF || ptr->rid == RID_INLINE) && token_buffer[0] != '_') --- 1085,1089 ---- /* Even if we decided to recognize asm, still perhaps warn. */ if (pedantic ! && (value == ASM_KEYWORD || value == TYPEOF || ptr->rid == RID_INLINE) && token_buffer[0] != '_') *************** *** 1757,1761 **** if (c < 0) goto skipnewline; ! if (!wide_flag && c >= (1 << TYPE_PRECISION (char_type_node))) pedwarn ("escape sequence out of range for character"); } --- 1757,1763 ---- if (c < 0) goto skipnewline; ! if (!wide_flag ! && TYPE_PRECISION (char_type_node) < HOST_BITS_PER_INT ! && c >= (1 << TYPE_PRECISION (char_type_node))) pedwarn ("escape sequence out of range for character"); } *************** *** 1933,1937 **** } ! /* Sets the value of the 'yydebug' varable to VALUE. This is a function so we don't have to have YYDEBUG defined in order to build the compiler. */ --- 1935,1939 ---- } ! /* Sets the value of the 'yydebug' variable to VALUE. This is a function so we don't have to have YYDEBUG defined in order to build the compiler. */ diff -rc2N gcc-2.0/c-parse.gperf gcc-2.1/c-parse.gperf *** gcc-2.0/c-parse.gperf Mon Jun 18 16:31:11 1990 --- gcc-2.1/c-parse.gperf Thu Mar 19 13:32:44 1992 *************** *** 6,11 **** __alignof, ALIGNOF, NORID __alignof__, ALIGNOF, NORID ! __asm, ASM, NORID ! __asm__, ASM, NORID __attribute, ATTRIBUTE, NORID __attribute__, ATTRIBUTE, NORID --- 6,11 ---- __alignof, ALIGNOF, NORID __alignof__, ALIGNOF, NORID ! __asm, ASM_KEYWORD, NORID ! __asm__, ASM_KEYWORD, NORID __attribute, ATTRIBUTE, NORID __attribute__, ATTRIBUTE, NORID *************** *** 22,26 **** __volatile, TYPE_QUAL, RID_VOLATILE __volatile__, TYPE_QUAL, RID_VOLATILE ! asm, ASM, NORID auto, SCSPEC, RID_AUTO break, BREAK, NORID --- 22,26 ---- __volatile, TYPE_QUAL, RID_VOLATILE __volatile__, TYPE_QUAL, RID_VOLATILE ! asm, ASM_KEYWORD, NORID auto, SCSPEC, RID_AUTO break, BREAK, NORID diff -rc2N gcc-2.0/c-parse.h gcc-2.1/c-parse.h *** gcc-2.0/c-parse.h Sun Feb 16 20:26:26 1992 --- gcc-2.1/c-parse.h Thu Mar 12 07:48:31 1992 *************** *** 25,29 **** #define RETURN 280 #define GOTO 281 ! #define ASM 282 #define TYPEOF 283 #define ALIGNOF 284 --- 25,29 ---- #define RETURN 280 #define GOTO 281 ! #define ASM_KEYWORD 282 #define TYPEOF 283 #define ALIGNOF 284 diff -rc2N gcc-2.0/c-parse.y gcc-2.1/c-parse.y *** gcc-2.0/c-parse.y Thu Feb 13 17:23:07 1992 --- gcc-2.1/c-parse.y Thu Mar 12 00:27:18 1992 *************** *** 105,110 **** /* the reserved words */ %token SIZEOF ENUM STRUCT UNION IF ELSE WHILE DO FOR SWITCH CASE DEFAULT ! %token BREAK CONTINUE RETURN GOTO ASM TYPEOF ALIGNOF ALIGN %token ATTRIBUTE EXTENSION LABEL --- 105,111 ---- /* the reserved words */ + /* SCO include files test "ASM", so use something else. */ %token SIZEOF ENUM STRUCT UNION IF ELSE WHILE DO FOR SWITCH CASE DEFAULT ! %token BREAK CONTINUE RETURN GOTO ASM_KEYWORD TYPEOF ALIGNOF ALIGN %token ATTRIBUTE EXTENSION LABEL *************** *** 215,219 **** fndef | datadef ! | ASM '(' expr ')' ';' { STRIP_NOPS ($3); if ((TREE_CODE ($3) == ADDR_EXPR --- 216,220 ---- fndef | datadef ! | ASM_KEYWORD '(' expr ')' ';' { STRIP_NOPS ($3); if ((TREE_CODE ($3) == ADDR_EXPR *************** *** 476,483 **** else if (TREE_TYPE ($$) == error_mark_node) $$ = error_mark_node; ! else if (! TREE_USED ($$)) { ! if (TREE_EXTERNAL ($$)) ! assemble_external ($$); TREE_USED ($$) = 1; } --- 477,483 ---- else if (TREE_TYPE ($$) == error_mark_node) $$ = error_mark_node; ! else { ! assemble_external ($$); TREE_USED ($$) = 1; } *************** *** 726,730 **** /* empty */ { $$ = NULL_TREE; } ! | ASM '(' string ')' { if (TREE_CHAIN ($3)) $3 = combine_strings ($3); $$ = $3; --- 726,730 ---- /* empty */ { $$ = NULL_TREE; } ! | ASM_KEYWORD '(' string ')' { if (TREE_CHAIN ($3)) $3 = combine_strings ($3); $$ = $3; *************** *** 1376,1380 **** emit_line_note ($-1, $0); c_expand_return ($2); } ! | ASM maybe_type_qual '(' expr ')' ';' { stmt_count++; emit_line_note ($-1, $0); --- 1376,1380 ---- emit_line_note ($-1, $0); c_expand_return ($2); } ! | ASM_KEYWORD maybe_type_qual '(' expr ')' ';' { stmt_count++; emit_line_note ($-1, $0); *************** *** 1387,1391 **** error ("argument of `asm' is not a constant string"); } /* This is the case with just output operands. */ ! | ASM maybe_type_qual '(' expr ':' asm_operands ')' ';' { stmt_count++; emit_line_note ($-1, $0); --- 1387,1391 ---- error ("argument of `asm' is not a constant string"); } /* This is the case with just output operands. */ ! | ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ')' ';' { stmt_count++; emit_line_note ($-1, $0); *************** *** 1394,1398 **** input_filename, lineno); } /* This is the case with input operands as well. */ ! | ASM maybe_type_qual '(' expr ':' asm_operands ':' asm_operands ')' ';' { stmt_count++; emit_line_note ($-1, $0); --- 1394,1398 ---- input_filename, lineno); } /* This is the case with input operands as well. */ ! | ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ':' asm_operands ')' ';' { stmt_count++; emit_line_note ($-1, $0); *************** *** 1401,1405 **** input_filename, lineno); } /* This is the case with clobbered registers as well. */ ! | ASM maybe_type_qual '(' expr ':' asm_operands ':' asm_operands ':' asm_clobbers ')' ';' { stmt_count++; --- 1401,1405 ---- input_filename, lineno); } /* This is the case with clobbered registers as well. */ ! | ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ':' asm_operands ':' asm_clobbers ')' ';' { stmt_count++; diff -rc2N gcc-2.0/c-tree.h gcc-2.1/c-tree.h *** gcc-2.0/c-tree.h Wed Jan 29 14:10:13 1992 --- gcc-2.1/c-tree.h Sat Mar 14 15:55:54 1992 *************** *** 146,149 **** --- 146,152 ---- extern tree c_build_type_variant (); + /* Declare a predefined function. Return the declaration. */ + extern tree builtin_function (); + /* Functions in c-common.c: */ diff -rc2N gcc-2.0/c-typeck.c gcc-2.1/c-typeck.c *** gcc-2.0/c-typeck.c Sat Feb 8 13:30:50 1992 --- gcc-2.1/c-typeck.c Sun Mar 22 15:04:27 1992 *************** *** 48,51 **** --- 48,52 ---- static tree process_init_constructor (); static tree convert_arguments (); + static char *get_spelling (); tree digest_init (); static void pedantic_lvalue_warning (); *************** *** 385,389 **** return 0; ! /* If generating auxilliary info, allow for two different type nodes which have essentially the same definition. */ --- 386,390 ---- return 0; ! /* If generating auxiliary info, allow for two different type nodes which have essentially the same definition. */ *************** *** 1102,1106 **** } ! /* We *must* set TREE_READONLY when dereferencinga pointer to const, so that we get the proper error message if the result is used to assign to. Also, &* is supposed to be a no-op. --- 1103,1107 ---- } ! /* We *must* set TREE_READONLY when dereferencing a pointer to const, so that we get the proper error message if the result is used to assign to. Also, &* is supposed to be a no-op. *************** *** 1226,1229 **** --- 1227,1233 ---- } + if (ar == error_mark_node) + return ar; + if (TREE_CODE (TREE_TYPE (ar)) != POINTER_TYPE) { *************** *** 1941,1945 **** #endif ! /* Optionally warn about conversions that can overflow. */ if (warn_conversion) { --- 1945,1950 ---- #endif ! /* Optionally warn about conversions that ! differ from the default conversions. */ if (warn_conversion) { *************** *** 1954,1957 **** --- 1959,1970 ---- && TREE_CODE (TREE_TYPE (val)) != REAL_TYPE) warning ("integer argument converted to floating"); + else if (TREE_CODE (type) == REAL_TYPE + && TREE_CODE (TREE_TYPE (val)) == REAL_TYPE) + { + /* Warn if any argument is passed as `float', + since withtout a prototype it would be `double'. */ + if (formal_prec == TYPE_PRECISION (float_type_node)) + warning ("floating argument passed as `float' rather than `double'"); + } /* Detect integer changing in width or signedness. */ else if ((TREE_CODE (type) == INTEGER_TYPE *************** *** 1958,1970 **** || TREE_CODE (type) == ENUMERAL_TYPE) && (TREE_CODE (TREE_TYPE (val)) == INTEGER_TYPE ! || TREE_CODE (TREE_TYPE (val)) == ENUMERAL_TYPE) ! && ((TREE_UNSIGNED (type) ! != TREE_UNSIGNED (TREE_TYPE (val))) ! || (MAX (formal_prec, int_prec) ! != MAX (actual_prec, int_prec)))) { ! if (MAX (formal_prec, int_prec) ! != MAX (actual_prec, int_prec)) ! warning ("integer argument converted in width"); else if (TREE_CODE (val) == INTEGER_CST && int_fits_type_p (val, type)) --- 1971,1983 ---- || TREE_CODE (type) == ENUMERAL_TYPE) && (TREE_CODE (TREE_TYPE (val)) == INTEGER_TYPE ! || TREE_CODE (TREE_TYPE (val)) == ENUMERAL_TYPE)) { ! tree would_have_been = default_conversion (val); ! tree type1 = TREE_TYPE (would_have_been); ! ! if (TYPE_PRECISION (type) != TYPE_PRECISION (type)) ! warning ("prototype changes width used for integer argument"); ! else if (TREE_UNSIGNED (type) == TREE_UNSIGNED (type1)) ! ; else if (TREE_CODE (val) == INTEGER_CST && int_fits_type_p (val, type)) *************** *** 1973,1979 **** ; else if (TREE_UNSIGNED (type)) ! warning ("signed argument converted to unsigned"); else ! warning ("unsigned argument converted to signed"); } } --- 1986,1992 ---- ; else if (TREE_UNSIGNED (type)) ! warning ("argument passed as unsigned due to prototype"); else ! warning ("argument passed as signed due to prototype"); } } *************** *** 2313,2316 **** --- 2326,2332 ---- warning ("shift count exceeds width of value shifted"); } + /* Use the type of the value to be shifted. + This is what most traditional C compilers do. */ + result_type = type0; /* Unless traditional, convert the shift-count to an integer, regardless of size of value being shifted. */ *************** *** 2317,2321 **** if (! flag_traditional) { - result_type = type0; if (TREE_TYPE (op1) != integer_type_node) op1 = convert (integer_type_node, op1); --- 2333,2336 ---- *************** *** 2323,2328 **** converted = 1; } - else - common = 1; } break; --- 2338,2341 ---- *************** *** 2337,2340 **** --- 2350,2356 ---- && TREE_INT_CST_LOW (op1) >= TYPE_PRECISION (type0)) warning ("shift count exceeds width of value shifted"); + /* Use the type of the value to be shifted. + This is what most traditional C compilers do. */ + result_type = type0; /* Unless traditional, convert the shift-count to an integer, regardless of size of value being shifted. */ *************** *** 2341,2345 **** if (! flag_traditional) { - result_type = type0; if (TREE_TYPE (op1) != integer_type_node) op1 = convert (integer_type_node, op1); --- 2357,2360 ---- *************** *** 2347,2352 **** converted = 1; } - else - common = 1; } break; --- 2362,2365 ---- *************** *** 2362,2365 **** --- 2375,2381 ---- && TREE_INT_CST_LOW (op1) >= TYPE_PRECISION (type0)) warning ("shift count >= width of value shifted"); + /* Use the type of the value to be shifted. + This is what most traditional C compilers do. */ + result_type = type0; /* Unless traditional, convert the shift-count to an integer, regardless of size of value being shifted. */ *************** *** 2366,2370 **** if (! flag_traditional) { - result_type = type0; if (TREE_TYPE (op1) != integer_type_node) op1 = convert (integer_type_node, op1); --- 2382,2385 ---- *************** *** 2372,2377 **** converted = 1; } - else - common = 1; } break; --- 2387,2390 ---- *************** *** 2746,2753 **** { enum tree_code subcode = resultcode; if (TREE_CODE (intop) == MINUS_EXPR) subcode = (subcode == PLUS_EXPR ? MINUS_EXPR : PLUS_EXPR); ! ptrop = build_binary_op (subcode, ptrop, TREE_OPERAND (intop, 1), 1); ! intop = TREE_OPERAND (intop, 0); } --- 2759,2771 ---- { enum tree_code subcode = resultcode; + tree int_type = TREE_TYPE (intop); if (TREE_CODE (intop) == MINUS_EXPR) subcode = (subcode == PLUS_EXPR ? MINUS_EXPR : PLUS_EXPR); ! /* Convert both subexpression types to the type of intop, ! because weird cases involving pointer arithmetic ! can result in a sum or difference with different type args. */ ! ptrop = build_binary_op (subcode, ptrop, ! convert (int_type, TREE_OPERAND (intop, 1)), 1); ! intop = convert (int_type, TREE_OPERAND (intop, 0)); } *************** *** 3619,3623 **** otype = TREE_TYPE (value); ! /* Optionally warn about potentially worrysome casts. */ if (warn_cast_qual --- 3637,3641 ---- otype = TREE_TYPE (value); ! /* Optionally warn about potentially worrisome casts. */ if (warn_cast_qual *************** *** 3634,3639 **** /* Warn about possible alignment problems. */ ! #ifdef STRICT_ALIGNMENT ! if (warn_cast_align && TREE_CODE (type) == POINTER_TYPE && TREE_CODE (otype) == POINTER_TYPE --- 3652,3656 ---- /* Warn about possible alignment problems. */ ! if (STRICT_ALIGNMENT && warn_cast_align && TREE_CODE (type) == POINTER_TYPE && TREE_CODE (otype) == POINTER_TYPE *************** *** 3642,3646 **** && TYPE_ALIGN (TREE_TYPE (type)) > TYPE_ALIGN (TREE_TYPE (otype))) warning ("cast increases required alignment of target type"); - #endif if (TREE_CODE (type) == INTEGER_TYPE --- 3659,3662 ---- *************** *** 3651,3655 **** if (TREE_CODE (type) == POINTER_TYPE && TREE_CODE (otype) == INTEGER_TYPE ! && TYPE_PRECISION (type) != TYPE_PRECISION (otype)) warning ("cast to pointer from integer of different size"); --- 3667,3674 ---- if (TREE_CODE (type) == POINTER_TYPE && TREE_CODE (otype) == INTEGER_TYPE ! && TYPE_PRECISION (type) != TYPE_PRECISION (otype) ! /* Don't warn about converting 0 to pointer, ! provided the 0 was explicit--not cast or made by folding. */ ! && !(TREE_CODE (value) == INTEGER_CST && integer_zerop (value))) warning ("cast to pointer from integer of different size"); *************** *** 3827,3831 **** ERRTYPE is a string to use in error messages: "assignment", "return", etc. If it is null, this is parameter passing ! for a function call (and different error messages are output). FUNNAME is the name of the function being called, --- 3846,3852 ---- ERRTYPE is a string to use in error messages: "assignment", "return", etc. If it is null, this is parameter passing ! for a function call (and different error messages are output). Otherwise, ! it may be a name stored in the spelling stack and interpreted by ! get_spelling. FUNNAME is the name of the function being called, *************** *** 3898,3902 **** && TREE_CODE (ttl) == FUNCTION_TYPE))) warn_for_assignment ("ANSI forbids %s between function pointer and `void *'", ! errtype, funname, parmnum); /* Const and volatile mean something different for function types, so the usual warnings are not appropriate. */ --- 3919,3923 ---- && TREE_CODE (ttl) == FUNCTION_TYPE))) warn_for_assignment ("ANSI forbids %s between function pointer and `void *'", ! get_spelling (errtype), funname, parmnum); /* Const and volatile mean something different for function types, so the usual warnings are not appropriate. */ *************** *** 3906,3913 **** if (! TYPE_READONLY (ttl) && TYPE_READONLY (ttr)) warn_for_assignment ("%s discards `const' from pointer target type", ! errtype, funname, parmnum); if (! TYPE_VOLATILE (ttl) && TYPE_VOLATILE (ttr)) warn_for_assignment ("%s discards `volatile' from pointer target type", ! errtype, funname, parmnum); } else --- 3927,3934 ---- if (! TYPE_READONLY (ttl) && TYPE_READONLY (ttr)) warn_for_assignment ("%s discards `const' from pointer target type", ! get_spelling (errtype), funname, parmnum); if (! TYPE_VOLATILE (ttl) && TYPE_VOLATILE (ttr)) warn_for_assignment ("%s discards `volatile' from pointer target type", ! get_spelling (errtype), funname, parmnum); } else *************** *** 3919,3926 **** if (TYPE_READONLY (ttl) && ! TYPE_READONLY (ttr)) warn_for_assignment ("%s makes `const *' function pointer from non-const", ! errtype, funname, parmnum); if (TYPE_VOLATILE (ttl) && ! TYPE_VOLATILE (ttr)) warn_for_assignment ("%s makes `volatile *' function pointer from non-volatile", ! errtype, funname, parmnum); } } --- 3940,3947 ---- if (TYPE_READONLY (ttl) && ! TYPE_READONLY (ttr)) warn_for_assignment ("%s makes `const *' function pointer from non-const", ! get_spelling (errtype), funname, parmnum); if (TYPE_VOLATILE (ttl) && ! TYPE_VOLATILE (ttr)) warn_for_assignment ("%s makes `volatile *' function pointer from non-volatile", ! get_spelling (errtype), funname, parmnum); } } *************** *** 3928,3935 **** == unsigned_type (TYPE_MAIN_VARIANT (ttr))) warn_for_assignment ("pointer targets in %s differ in signedness", ! errtype, funname, parmnum); else warn_for_assignment ("%s from incompatible pointer type", ! errtype, funname, parmnum); return convert (type, rhs); } --- 3949,3956 ---- == unsigned_type (TYPE_MAIN_VARIANT (ttr))) warn_for_assignment ("pointer targets in %s differ in signedness", ! get_spelling (errtype), funname, parmnum); else warn_for_assignment ("%s from incompatible pointer type", ! get_spelling (errtype), funname, parmnum); return convert (type, rhs); } *************** *** 3936,3943 **** else if (codel == POINTER_TYPE && coder == INTEGER_TYPE) { ! if (! integer_zerop (rhs)) { warn_for_assignment ("%s makes pointer from integer without a cast", ! errtype, funname, parmnum); return convert (type, rhs); } --- 3957,3966 ---- else if (codel == POINTER_TYPE && coder == INTEGER_TYPE) { ! /* An explicit constant 0 can convert to a pointer, ! but not a 0 that results from casting or folding. */ ! if (! (TREE_CODE (rhs) == INTEGER_CST && integer_zerop (rhs))) { warn_for_assignment ("%s makes pointer from integer without a cast", ! get_spelling (errtype), funname, parmnum); return convert (type, rhs); } *************** *** 3947,3951 **** { warn_for_assignment ("%s makes integer from pointer without a cast", ! errtype, funname, parmnum); return convert (type, rhs); } --- 3970,3974 ---- { warn_for_assignment ("%s makes integer from pointer without a cast", ! get_spelling (errtype), funname, parmnum); return convert (type, rhs); } *************** *** 3961,3965 **** } else ! error ("incompatible types in %s", errtype); return error_mark_node; --- 3984,3988 ---- } else ! error ("incompatible types in %s", get_spelling (errtype)); return error_mark_node; *************** *** 4129,4133 **** /* Note that this is the only place we can detect the error in a case such as struct foo bar = (struct foo) { x, y }; ! where there is one initial value which is a constuctor expression. */ if (value == error_mark_node) ; --- 4152,4156 ---- /* Note that this is the only place we can detect the error in a case such as struct foo bar = (struct foo) { x, y }; ! where there is one initial value which is a constructor expression. */ if (value == error_mark_node) ; *************** *** 4158,4161 **** --- 4181,4351 ---- } + /* Methods for storing and printing names for error messages. + + /* Implement a spelling stack that allows components of a name to be pushed + and popped. Each element on the stack is this structure. */ + + struct spelling + { + int kind; + union + { + int i; + char *s; + } u; + }; + + #define SPELLING_STRING 1 + #define SPELLING_MEMBER 2 + #define SPELLING_BOUNDS 3 + + static struct spelling *spelling; /* Next stack element (unused). */ + static struct spelling *spelling_base; /* Spelling stack base. */ + static int spelling_size; /* Size of the spelling stack. */ + + /* Macros to save and restore the spelling stack around push_... functions. + Alternative to SAVE_SPELLING_STACK. */ + + #define SPELLING_DEPTH() (spelling - spelling_base) + #define RESTORE_SPELLING_DEPTH(depth) (spelling = spelling_base + depth) + + /* Save and restore the spelling stack around arbitrary C code. */ + + #define SAVE_SPELLING_DEPTH(code) \ + { \ + int __depth = SPELLING_DEPTH (); \ + code; \ + RESTORE_SPELLING_DEPTH (__depth); \ + } + + /* Push an element on the spelling stack with type KIND and assign VALUE + to MEMBER. */ + + #define PUSH_SPELLING(KIND, VALUE, MEMBER) \ + { \ + int depth = SPELLING_DEPTH (); \ + \ + if (depth >= spelling_size) \ + { \ + spelling_size += 10; \ + if (spelling_base == 0) \ + spelling_base \ + = (struct spelling *) xmalloc (spelling_size * sizeof (struct spelling)); \ + else \ + spelling_base \ + = (struct spelling *) xrealloc (spelling_base, \ + spelling_size * sizeof (struct spelling)); \ + RESTORE_SPELLING_DEPTH (depth); \ + } \ + \ + spelling->kind = (KIND); \ + spelling->MEMBER = (VALUE); \ + spelling++; \ + } + + /* Push STRING on the stack. Printed literally. */ + + static void + push_string (string) + char *string; + { + PUSH_SPELLING (SPELLING_STRING, string, u.s); + } + + /* Push a member name on the stack. Printed as '.' STRING. */ + + static void + push_member_name (string) + char *string; + { + PUSH_SPELLING (SPELLING_MEMBER, string, u.s); + } + + /* Push an array bounds on the stack. Printed as [BOUNDS]. */ + + static void + push_array_bounds (bounds) + int bounds; + { + PUSH_SPELLING (SPELLING_BOUNDS, bounds, u.i); + } + + /* Compute the maximum size in bytes of the printed spelling. */ + + static int + spelling_length () + { + register int size = 0; + register struct spelling *p; + + for (p = spelling_base; p < spelling; p++) + { + if (p->kind == SPELLING_BOUNDS) + size += 25; + else + size += strlen (p->u.s) + 1; + } + + return size; + } + + /* Print the spelling to BUFFER and return it. */ + + static char * + print_spelling (buffer) + register char *buffer; + { + register char *d = buffer; + register char *s; + register struct spelling *p; + + for (p = spelling_base; p < spelling; p++) + if (p->kind == SPELLING_BOUNDS) + { + sprintf (d, "[%d]", p->u.i); + d += strlen (d); + } + else + { + if (p->kind == SPELLING_MEMBER) + *d++ = '.'; + for (s = p->u.s; *d = *s++; d++) + ; + } + *d++ = '\0'; + return buffer; + } + + /* Provide a means to pass component names derived from the spelling stack. */ + + char initialization_message; + + /* Interpret the spelling of the given ERRTYPE message. */ + + static char * + get_spelling (errtype) + char *errtype; + { + static char *buffer; + static int size = -1; + + if (errtype == &initialization_message) + { + /* Avoid counting chars */ + static char message[] = "initialization of `%s'"; + register int needed = sizeof (message) + spelling_length () + 1; + + if (size < 0) + buffer = (char *) xmalloc (size = needed); + if (needed > size) + buffer = (char *) xrealloc (buffer, size = needed); + + sprintf (buffer, message, print_spelling (alloca (needed))); + return buffer; + } + + return errtype; + } + /* Issue an error message for a bad initializer component. FORMAT describes the message. OFWHAT is the name for the component. *************** *** 4163,4167 **** into the message. ! If OFWHAT is a null string, then LOCAL is omitted entirely. */ void --- 4353,4358 ---- into the message. ! If OFWHAT is null, the component name is stored on the spelling stack. ! If the compoment name is a null string, then LOCAL is omitted entirely. */ void *************** *** 4169,4174 **** char *format, *local, *ofwhat; { ! char *buffer = (char *) alloca (strlen (local) + strlen (ofwhat) + 2); if (*ofwhat) sprintf (buffer, local, ofwhat); --- 4360,4369 ---- char *format, *local, *ofwhat; { ! char *buffer; + if (ofwhat == 0) + ofwhat = print_spelling (alloca (spelling_length () + 1)); + buffer = (char *) alloca (strlen (local) + strlen (ofwhat) + 2); + if (*ofwhat) sprintf (buffer, local, ofwhat); *************** *** 4184,4188 **** into the message. ! If OFWHAT is a null string, then LOCAL is omitted entirely. */ void --- 4379,4384 ---- into the message. ! If OFWHAT is null, the component name is stored on the spelling stack. ! If the compoment name is a null string, then LOCAL is omitted entirely. */ void *************** *** 4190,4194 **** char *format, *local, *ofwhat; { ! char *buffer = (char *) alloca (strlen (local) + strlen (ofwhat) + 2); if (*ofwhat) --- 4386,4394 ---- char *format, *local, *ofwhat; { ! char *buffer; ! ! if (ofwhat == 0) ! ofwhat = print_spelling (alloca (spelling_length () + 1)); ! buffer = (char *) alloca (strlen (local) + strlen (ofwhat) + 2); if (*ofwhat) *************** *** 4213,4218 **** applies only to elements of constructors. ! If OFWHAT is nonzero, it specifies what we are initializing, for error ! messages. Examples: variable name, variable.member, array[44]. */ tree --- 4413,4419 ---- applies only to elements of constructors. ! If OFWHAT is nonnull, it specifies what we are initializing, for error ! messages. Examples: variable name, variable.member, array[44]. ! If OFWHAT is null, the component name is stored on the spelling stack. */ tree *************** *** 4225,4229 **** tree element = 0; tree old_tail_contents; - char *member_str; /* For building strings about member names. */ /* Nonzero if INIT is a braced grouping, which comes in as a CONSTRUCTOR tree node which has no TREE_TYPE. */ --- 4426,4429 ---- *************** *** 4402,4422 **** } ! /* Build the name of this member, with a "." for membership. */ ! member_str = (char *) alloca (strlen (ofwhat) ! + IDENTIFIER_LENGTH (DECL_NAME (field)) + 2); ! sprintf (member_str, "%s.%s", ofwhat, ! IDENTIFIER_POINTER (DECL_NAME (field))); ! if (raw_constructor) ! return process_init_constructor (type, init, 0, ! require_constant, ! constructor_constant, member_str); ! else if (tail != 0) ! { ! *tail = old_tail_contents; ! return process_init_constructor (type, 0, tail, ! require_constant, ! constructor_constant, member_str); ! } } --- 4602,4628 ---- } ! SAVE_SPELLING_DEPTH ! ({ ! if (ofwhat) ! push_string (ofwhat); ! push_member_name (IDENTIFIER_POINTER (DECL_NAME (field))); ! ! if (raw_constructor) ! result = process_init_constructor (type, init, 0, ! require_constant, ! constructor_constant, 0); ! else if (tail != 0) ! { ! *tail = old_tail_contents; ! result = process_init_constructor (type, 0, tail, ! require_constant, ! constructor_constant, 0); ! } ! else ! result = 0; ! }); ! if (result) ! return result; } *************** *** 4447,4460 **** #endif ! /* Build the name of the member being initialized, for error msgs. */ ! { ! /* Avoid counting chars */ ! static char message[] = "initialization of `%s'"; ! member_str = (char *) alloca (strlen (ofwhat) + sizeof (message) + 1); ! sprintf (member_str, message, ofwhat); ! } ! ! init = convert_for_assignment (type, default_conversion (init), ! member_str, NULL_TREE, 0); if (require_constant && ! TREE_CONSTANT (init)) --- 4653,4663 ---- #endif ! SAVE_SPELLING_DEPTH ! ({ ! if (ofwhat) ! push_string (ofwhat); ! init = convert_for_assignment (type, default_conversion (init), ! &initialization_message, NULL_TREE, 0); ! }); if (require_constant && ! TREE_CONSTANT (init)) *************** *** 4531,4535 **** OFWHAT is a character string describing the object being initialized, for error messages. It might be "variable" or "variable.member" ! or "variable[17].member[5]". */ static tree --- 4734,4739 ---- OFWHAT is a character string describing the object being initialized, for error messages. It might be "variable" or "variable.member" ! or "variable[17].member[5]". If OFWHAT is null, the description string ! is stored on the spelling stack. */ static tree *************** *** 4544,4548 **** in reverse order. */ register tree members = NULL; - int members_length = 0; tree result; int allconstant = 1; --- 4748,4751 ---- *************** *** 4549,4553 **** int allsimple = 1; int erroneous = 0; ! char *member_str; /* String used to pass member names. */ /* Make TAIL be the list of elements to use for the initialization, --- 4752,4759 ---- int allsimple = 1; int erroneous = 0; ! int depth = SPELLING_DEPTH (); ! ! if (ofwhat) ! push_string (ofwhat); /* Make TAIL be the list of elements to use for the initialization, *************** *** 4565,4583 **** if (TREE_CODE (type) == ARRAY_TYPE) { ! tree domain = TYPE_DOMAIN (type); ! register long len; ! register int i; ! ! if (domain) ! len = (TREE_INT_CST_LOW (TYPE_MAX_VALUE (domain)) ! - TREE_INT_CST_LOW (TYPE_MIN_VALUE (domain)) ! + 1); else ! len = -1; /* Take as many as there are */ ! /* Don't leave the loop based on i if the next item has an explicit ! index value that will override i. */ ! for (i = 0; tail != 0; i++) { register tree next1; --- 4771,4802 ---- if (TREE_CODE (type) == ARRAY_TYPE) { ! tree min_index, max_index, current_index, members_index; ! tree bound_type; ! tree one; ! ! /* If we have array bounds, set our bounds from that. Otherwise, ! we have a lower bound of zero and an unknown upper bound. Also ! set the type of the bounds; use "int" as default. */ ! if (TYPE_DOMAIN (type)) ! { ! min_index = members_index = TYPE_MIN_VALUE (TYPE_DOMAIN (type)); ! max_index = TYPE_MAX_VALUE (TYPE_DOMAIN (type)); ! bound_type = TREE_TYPE (min_index); ! } else ! { ! min_index = members_index = integer_zero_node; ! max_index = 0; ! bound_type = integer_type_node; ! } ! one = convert (bound_type, integer_one_node); ! /* Don't leave the loop based on index if the next item has an explicit ! index value that will override it. */ ! ! for (current_index = min_index; tail != 0; ! current_index = fold (build (PLUS_EXPR, bound_type, ! current_index, one))) { register tree next1; *************** *** 4593,4604 **** else if (TREE_CODE (TREE_PURPOSE (tail)) != INTEGER_CST) error ("non-constant array index in initializer"); ! else if (tree_int_cst_lt (TREE_PURPOSE (tail), ! TYPE_MIN_VALUE (domain)) ! || ! tree_int_cst_lt (TYPE_MAX_VALUE (domain), ! TREE_PURPOSE (tail))) error ("array index out of range in initializer"); else ! i = TREE_INT_CST_LOW (TREE_PURPOSE (tail)), win = 1; if (!win) --- 4812,4821 ---- else if (TREE_CODE (TREE_PURPOSE (tail)) != INTEGER_CST) error ("non-constant array index in initializer"); ! else if (tree_int_cst_lt (TREE_PURPOSE (tail), min_index) ! || (max_index && tree_int_cst_lt (max_index, ! TREE_PURPOSE (tail)))) error ("array index out of range in initializer"); else ! current_index = TREE_PURPOSE (tail), win = 1; if (!win) *************** *** 4606,4610 **** } ! if (len >= 0 && i >= len) break; /* Stop if we've indeed run out of elements. */ --- 4823,4827 ---- } ! if (max_index && tree_int_cst_lt (max_index, current_index)) break; /* Stop if we've indeed run out of elements. */ *************** *** 4614,4635 **** tree tail1 = tail; ! /* Build the index of this member, with a "." for membership. */ ! member_str = (char *) alloca (25 + strlen (ofwhat)); ! sprintf (member_str, "%s[%d]", ofwhat, i); ! ! next1 = digest_init (TYPE_MAIN_VARIANT (TREE_TYPE (type)), ! TREE_VALUE (tail), &tail1, ! /* Both of these are the same because ! a value here is an elt overall. */ ! constant_element, constant_element, ! member_str); if (tail1 != 0 && TREE_CODE (tail1) != TREE_LIST) abort (); ! if (tail == tail1 && len < 0) { error_init ( "non-empty initializer for array%s of empty elements", ! " `%s'", ofwhat); /* Just ignore what we were supposed to use. */ tail1 = 0; --- 4831,4854 ---- tree tail1 = tail; ! /* Build the element of this array, with "[]" notation. For ! error messages, we assume that the index fits within a ! host int. */ ! SAVE_SPELLING_DEPTH ! ({ ! push_array_bounds (TREE_INT_CST_LOW (current_index)); ! next1 = digest_init (TYPE_MAIN_VARIANT (TREE_TYPE (type)), ! TREE_VALUE (tail), &tail1, ! /* Both of these are the same because ! a value here is an elt overall. */ ! constant_element, constant_element, 0); ! }); if (tail1 != 0 && TREE_CODE (tail1) != TREE_LIST) abort (); ! if (tail == tail1 && TYPE_DOMAIN (type) == 0) { error_init ( "non-empty initializer for array%s of empty elements", ! " `%s'", 0); /* Just ignore what we were supposed to use. */ tail1 = 0; *************** *** 4652,4666 **** /* Now store NEXT1 in the list, I elements from the *end*. Make the list longer if necessary. */ ! while (i >= members_length) { members = tree_cons (NULL_TREE, NULL_TREE, members); ! members_length++; } { tree temp; ! int j; temp = members; ! for (j = members_length - 1; j > i; j--) temp = TREE_CHAIN (temp); TREE_VALUE (temp) = next1; --- 4871,4890 ---- /* Now store NEXT1 in the list, I elements from the *end*. Make the list longer if necessary. */ ! while (! tree_int_cst_lt (current_index, members_index)) { members = tree_cons (NULL_TREE, NULL_TREE, members); ! members_index = fold (build (PLUS_EXPR, bound_type, ! members_index, one)); } + { tree temp; ! tree idx; temp = members; ! for (idx = fold (build (MINUS_EXPR, bound_type, ! members_index, one)); ! tree_int_cst_lt (current_index, idx); ! idx = fold (build (MINUS_EXPR, bound_type, idx, one))) temp = TREE_CHAIN (temp); TREE_VALUE (temp) = next1; *************** *** 4671,4674 **** --- 4895,4899 ---- { register tree field; + int members_length = 0; int i; *************** *** 4719,4731 **** /* Build the name of this member, with a "." for membership. */ ! member_str = (char *) alloca (strlen (ofwhat) ! + IDENTIFIER_LENGTH (DECL_NAME (field)) + 2); ! sprintf (member_str, "%s.%s", ofwhat, ! IDENTIFIER_POINTER (DECL_NAME (field))); ! ! next1 = digest_init (TREE_TYPE (field), ! TREE_VALUE (tail), &tail1, ! constant_element, constant_element, ! member_str); if (tail1 != 0 && TREE_CODE (tail1) != TREE_LIST) abort (); --- 4944,4954 ---- /* Build the name of this member, with a "." for membership. */ ! SAVE_SPELLING_DEPTH ! ({ ! push_member_name (IDENTIFIER_POINTER (DECL_NAME (field))); ! next1 = digest_init (TREE_TYPE (field), ! TREE_VALUE (tail), &tail1, ! constant_element, constant_element, 0); ! }); if (tail1 != 0 && TREE_CODE (tail1) != TREE_LIST) abort (); *************** *** 4805,4816 **** /* Build the name of this member, with a "." for membership. */ ! member_str = (char *) alloca (strlen (ofwhat) ! + IDENTIFIER_LENGTH (DECL_NAME (field)) + 2); ! sprintf (member_str, "%s.%s", ofwhat, ! IDENTIFIER_POINTER (DECL_NAME (field))); ! ! next1 = digest_init (TREE_TYPE (field), ! TREE_VALUE (tail), &tail1, ! constant_value, constant_element, member_str); if (tail1 != 0 && TREE_CODE (tail1) != TREE_LIST) abort (); --- 5028,5038 ---- /* Build the name of this member, with a "." for membership. */ ! SAVE_SPELLING_DEPTH ! ({ ! push_member_name (IDENTIFIER_POINTER (DECL_NAME (field))); ! next1 = digest_init (TREE_TYPE (field), ! TREE_VALUE (tail), &tail1, ! constant_value, constant_element, 0); ! }); if (tail1 != 0 && TREE_CODE (tail1) != TREE_LIST) abort (); *************** *** 4842,4846 **** { pedwarn_init ("excess elements in union initializer%s", ! " after `%s'", ofwhat); } else --- 5064,5068 ---- { pedwarn_init ("excess elements in union initializer%s", ! " after `%s'", 0); } else *************** *** 4847,4853 **** { pedwarn_init ("excess elements in aggregate initializer%s", ! " after `%s'", ofwhat); } } if (erroneous) --- 5069,5081 ---- { pedwarn_init ("excess elements in aggregate initializer%s", ! " after `%s'", 0); } } + + /* It might be possible to use SAVE_SPELLING_DEPTH, but I suspect that + some preprocessor somewhere won't accept that much text as an argument. + It's also likely to make debugging difficult. */ + + RESTORE_SPELLING_DEPTH (depth); if (erroneous) diff -rc2N gcc-2.0/calls.c gcc-2.1/calls.c *** gcc-2.0/calls.c Thu Jan 23 18:02:09 1992 --- gcc-2.1/calls.c Fri Mar 13 23:58:35 1992 *************** *** 719,723 **** place unnamed args that were passed in registers into the stack. So treat all args as named. This allows the insns emitting for a specific ! argument list to be independant of the function declaration. If SETUP_INCOMING_VARARGS is not defined, we do not have any reliable --- 719,723 ---- place unnamed args that were passed in registers into the stack. So treat all args as named. This allows the insns emitting for a specific ! argument list to be independent of the function declaration. If SETUP_INCOMING_VARARGS is not defined, we do not have any reliable *************** *** 1622,1626 **** ARGBLOCK is the address of the stack-block for all the arguments, ! or 0 on a machine where arguemnts are pushed individually. MAY_BE_ALLOCA nonzero says this could be a call to `alloca' --- 1622,1626 ---- ARGBLOCK is the address of the stack-block for all the arguments, ! or 0 on a machine where arguments are pushed individually. MAY_BE_ALLOCA nonzero says this could be a call to `alloca' diff -rc2N gcc-2.0/cccp.c gcc-2.1/cccp.c *** gcc-2.0/cccp.c Tue Feb 18 19:52:51 1992 --- gcc-2.1/cccp.c Sun Mar 22 22:45:33 1992 *************** *** 202,205 **** --- 202,206 ---- static void print_containing_files (); static int lookup_import (); + static int lookup_include (); static int check_preconditions (); static void pcfinclude (); *************** *** 378,381 **** --- 379,386 ---- static int warn_trigraphs; + /* Nonzero means warn if #import is used. */ + + static int warn_import = 1; + /* Nonzero means turn warnings into errors. */ *************** *** 1082,1085 **** --- 1087,1094 ---- else if (!strcmp (argv[i], "-Wno-traditional")) warn_stringify = 0; + else if (!strcmp (argv[i], "-Wimport")) + warn_import = 1; + else if (!strcmp (argv[i], "-Wno-import")) + warn_import = 0; else if (!strcmp (argv[i], "-Werror")) warnings_are_errors = 1; *************** *** 1421,1425 **** break; case 1: ! epath = getenv ("C++_INCLUDE_PATH"); break; case 2: --- 1430,1434 ---- break; case 1: ! epath = getenv ("CPLUS_INCLUDE_PATH"); break; case 2: *************** *** 1427,1431 **** break; case 3: ! epath = getenv ("OBJC++_INCLUDE_PATH"); break; } --- 1436,1440 ---- break; case 3: ! epath = getenv ("OBJCPLUS_INCLUDE_PATH"); break; } *************** *** 1447,1451 **** num_dirs = 0; while (1) { ! if ((*endp == ':') || (*endp == '\0')) { strncpy (nstore, startp, endp-startp); if (endp == startp) --- 1456,1466 ---- num_dirs = 0; while (1) { ! /* Handle cases like c:/usr/lib:d:/gcc/lib */ ! if ((*endp == ':' ! #ifdef __MSDOS__ ! && (endp-startp != 1 || !isalpha (*startp))) ! #endif ! ) ! || (*endp == 0)) { strncpy (nstore, startp, endp-startp); if (endp == startp) *************** *** 1814,1818 **** --- 1829,1838 ---- /* Find the end of this name. */ + #ifdef __MSDOS__ + /* Handle cases like c:/usr/lib:d:/gcc/lib */ + while (*q != 0 && (*q != ':' || (q - p == 1 && isalpha (*p)))) q++; + #else while (*q != 0 && *q != ':') q++; + #endif if (p == q) { /* An empty name in the path stands for the current directory. */ *************** *** 1925,1929 **** /* Move all backslash-newline pairs out of embarrassing places. Exchange all such pairs following BP ! with any potentially-embarrasing characters that follow them. Potentially-embarrassing characters are / and * (because a backslash-newline inside a comment delimiter --- 1945,1949 ---- /* Move all backslash-newline pairs out of embarrassing places. Exchange all such pairs following BP ! with any potentially-embarrassing characters that follow them. Potentially-embarrassing characters are / and * (because a backslash-newline inside a comment delimiter *************** *** 3043,3047 **** } else if (*bp == '/' && bp[1] == '*') { ip->bufp = bp; ! skip_to_end_of_comment (ip, &ip->lineno); bp = ip->bufp; } else if (*bp == '\\' && bp[1] == '\n') { --- 3063,3067 ---- } else if (*bp == '/' && bp[1] == '*') { ip->bufp = bp; ! skip_to_end_of_comment (ip, &ip->lineno, 0); bp = ip->bufp; } else if (*bp == '\\' && bp[1] == '\n') { *************** *** 3187,3191 **** U_CHAR *obp = bp - 1; ip->bufp = bp + 1; ! skip_to_end_of_comment (ip, &ip->lineno); bp = ip->bufp; /* No need to copy the command because of a comment at the end; --- 3207,3211 ---- U_CHAR *obp = bp - 1; ip->bufp = bp + 1; ! skip_to_end_of_comment (ip, &ip->lineno, 0); bp = ip->bufp; /* No need to copy the command because of a comment at the end; *************** *** 3321,3325 **** /* If we already copied the command through, already_output != 0 prevents outputting comment now. */ ! skip_to_end_of_comment (ip, already_output); if (keep_comments) while (xp != ip->bufp) --- 3341,3345 ---- /* If we already copied the command through, already_output != 0 prevents outputting comment now. */ ! skip_to_end_of_comment (ip, already_output, 0); if (keep_comments) while (xp != ip->bufp) *************** *** 3589,3593 **** f= -1; /* JF we iz paranoid! */ ! if (importing && !instack[indepth].system_header_p && !import_warning) { import_warning = 1; warning ("using `#import' is not recommended"); --- 3609,3614 ---- f= -1; /* JF we iz paranoid! */ ! if (importing && warn_import ! && !instack[indepth].system_header_p && !import_warning) { import_warning = 1; warning ("using `#import' is not recommended"); *************** *** 3711,3728 **** /* + 2 above for slash and terminating null. */ - /* See if we already included this file and we can tell in advance - (from a #ifndef around its contents last time) - that there is no need to include it again. */ - { - struct file_name_list *l = all_include_files; - strncpy (fname, fbeg, flen); - fname[flen] = 0; - for (; l; l = l->next) - if (! strcmp (fname, l->fname) - && l->control_macro - && lookup (l->control_macro, -1, -1)) - return 0; - } - /* If specified file name is absolute, just open it. */ --- 3732,3735 ---- *************** *** 3730,3733 **** --- 3737,3742 ---- strncpy (fname, fbeg, flen); fname[flen] = 0; + if (lookup_include (fname)) + return 0; if (importing) f = lookup_import (fname); *************** *** 3772,3775 **** --- 3781,3788 ---- if (f == -2) return 0; /* Already included this file */ + if (lookup_include (fname)) { + close (f); + return 0; + } if (f >= 0) break; *************** *** 3902,3905 **** --- 3915,3935 ---- } + /* Return nonzero if there is no need to include file NAME + because it has already been included and it contains a conditional + to make a repeated include do nothing. */ + + static int + lookup_include (name) + char *name; + { + struct file_name_list *l = all_include_files; + for (; l; l = l->next) + if (! strcmp (name, l->fname) + && l->control_macro + && lookup (l->control_macro, -1, -1)) + return 1; + return 0; + } + /* Process the contents of include file FNAME, already open on descriptor F, with output to OP. *************** *** 4337,4341 **** str->writeflag = 1; else ! /* Otherwist, for each key, */ for (; nkeys--; free (tmpbuf.buf), cp = endofthiskey + 1) { KEYDEF *kp = (KEYDEF *) cp; --- 4367,4371 ---- str->writeflag = 1; else ! /* Otherwise, for each key, */ for (; nkeys--; free (tmpbuf.buf), cp = endofthiskey + 1) { KEYDEF *kp = (KEYDEF *) cp; *************** *** 4442,4446 **** /* Pass a directive through to the output file. ! BUF points to the contents of the directive, as a continguous string. LIMIT points to the first character past the end of the directive. KEYWORD is the keyword-table entry for the directive. */ --- 4472,4476 ---- /* Pass a directive through to the output file. ! BUF points to the contents of the directive, as a contiguous string. LIMIT points to the first character past the end of the directive. KEYWORD is the keyword-table entry for the directive. */ *************** *** 4619,4623 **** /* Process a #define command. ! BUF points to the contents of the #define command, as a continguous string. LIMIT points to the first character past the end of the definition. KEYWORD is the keyword-table entry for #define. */ --- 4649,4653 ---- /* Process a #define command. ! BUF points to the contents of the #define command, as a contiguous string. LIMIT points to the first character past the end of the definition. KEYWORD is the keyword-table entry for #define. */ *************** *** 5559,5562 **** --- 5589,5594 ---- else if (*bp == '2') file_change = leave_file; + else if (*bp == '3') + ip->system_header_p = 1; else { error ("invalid format `#line' command"); *************** *** 5566,5569 **** --- 5598,5606 ---- bp++; SKIP_WHITE_SPACE (bp); + if (*bp == '3') { + ip->system_header_p = 1; + bp++; + SKIP_WHITE_SPACE (bp); + } if (*bp) { error ("invalid format `#line' command"); *************** *** 5909,5913 **** U_CHAR *save_bufp = ip->bufp; ip->bufp = p + 1; ! p = skip_to_end_of_comment (ip, &junk); ip->bufp = save_bufp; } --- 5946,5950 ---- U_CHAR *save_bufp = ip->bufp; ip->bufp = p + 1; ! p = skip_to_end_of_comment (ip, &junk, 1); ip->bufp = save_bufp; } *************** *** 6028,6032 **** || ((cplusplus || objc) && *bp == '/')) { ip->bufp = ++bp; ! bp = skip_to_end_of_comment (ip, &ip->lineno); } break; --- 6065,6069 ---- || ((cplusplus || objc) && *bp == '/')) { ip->bufp = ++bp; ! bp = skip_to_end_of_comment (ip, &ip->lineno, 0); } break; *************** *** 6303,6307 **** U_CHAR *save_bufp = ip->bufp; ip->bufp = p + 1; ! p = skip_to_end_of_comment (ip, &junk); ip->bufp = save_bufp; } --- 6340,6344 ---- U_CHAR *save_bufp = ip->bufp; ip->bufp = p + 1; ! p = skip_to_end_of_comment (ip, &junk, 1); ip->bufp = save_bufp; } *************** *** 6366,6380 **** } ! /* ! * Skip a comment, assuming the input ptr immediately follows the ! * initial slash-star. Bump line counter as necessary. ! * (The canonical line counter is &ip->lineno). ! * Don't use this routine (or the next one) if bumping the line ! * counter is not sufficient to deal with newlines in the string. ! */ static U_CHAR * ! skip_to_end_of_comment (ip, line_counter) register FILE_BUF *ip; int *line_counter; /* place to remember newlines, or NULL */ { register U_CHAR *limit = ip->buf + ip->length; --- 6403,6421 ---- } ! /* Skip a comment, assuming the input ptr immediately follows the ! initial slash-star. Bump *LINE_COUNTER for each newline. ! (The canonical line counter is &ip->lineno.) ! Don't use this routine (or the next one) if bumping the line ! counter is not sufficient to deal with newlines in the string. ! ! If NOWARN is nonzero, don't warn about slash-star inside a comment. ! This feature is useful when processing a comment that is going to be ! processed or was processed at another point in the preprocessor, ! to avoid a duplicate warning. */ static U_CHAR * ! skip_to_end_of_comment (ip, line_counter, nowarn) register FILE_BUF *ip; int *line_counter; /* place to remember newlines, or NULL */ + int nowarn; { register U_CHAR *limit = ip->buf + ip->length; *************** *** 6416,6420 **** switch (*bp++) { case '/': ! if (warn_comments && bp < limit && *bp == '*') warning ("`/*' within comment"); break; --- 6457,6461 ---- switch (*bp++) { case '/': ! if (warn_comments && !nowarn && bp < limit && *bp == '*') warning ("`/*' within comment"); break; *************** *** 6526,6530 **** This does not handle newlines, because it's used for the arg of #if, ! where there aren't any newlines. Also, bacslash-newline can't appear. */ static U_CHAR * --- 6567,6571 ---- This does not handle newlines, because it's used for the arg of #if, ! where there aren't any newlines. Also, backslash-newline can't appear. */ static U_CHAR * *************** *** 6553,6557 **** if (*p == '*') { ip->bufp = p; ! p = skip_to_end_of_comment (ip, &lines_dummy); p = ip->bufp; } --- 6594,6598 ---- if (*p == '*') { ip->bufp = p; ! p = skip_to_end_of_comment (ip, &lines_dummy, 0); p = ip->bufp; } *************** *** 6613,6616 **** --- 6654,6664 ---- } + /* Don't output a line number of 0 if we can help it. */ + if (ip->lineno == 0 && ip->bufp - ip->buf < ip->length + && *ip->bufp == '\n') { + ip->lineno++; + ip->bufp++; + } + #ifdef OUTPUT_LINE_COMMANDS sprintf (line_cmd_buf, "#line %d \"%s\"", ip->lineno, ip->nominal_fname); *************** *** 8456,8460 **** if (cp[-2] != '.') { /* ! * The VMS part ends in a `]', and the preceeding character is not a `.'. * We strip the `]', and then splice the two parts of the name in the * usual way. Given the default locations for include files in cccp.c, --- 8504,8508 ---- if (cp[-2] != '.') { /* ! * The VMS part ends in a `]', and the preceding character is not a `.'. * We strip the `]', and then splice the two parts of the name in the * usual way. Given the default locations for include files in cccp.c, diff -rc2N gcc-2.0/collect2.c gcc-2.1/collect2.c *** gcc-2.0/collect2.c Fri Feb 21 01:33:59 1992 --- gcc-2.1/collect2.c Thu Mar 19 17:07:22 1992 *************** *** 55,58 **** --- 55,117 ---- #endif + #ifdef USG + #define vfork fork + #endif + + #ifndef R_OK + #define R_OK 4 + #define W_OK 2 + #define X_OK 1 + #endif + + /* On MSDOS, write temp files in current dir + because there's no place else we can expect to use. */ + #if __MSDOS__ + #ifndef P_tmpdir + #define P_tmpdir "./" + #endif + #endif + + /* On certain systems, we have code that works by scanning the object file + directly. But this code uses system-specific header files and library + functions, so turn it off in a cross-compiler. */ + + #ifdef CROSS_COMPILE + #undef OBJECT_FORMAT_COFF + #undef OBJECT_FORMAT_ROSE + #endif + + /* If we can't use a special method, use the ordinary one: + run nm to find what symbols are present. + In a cross-compiler, this means you need a cross nm, + but that isn't quite as unpleasant as special headers. */ + + #if !defined (OBJECT_FORMAT_COFF) && !defined (OBJECT_FORMAT_ROSE) + #define OBJECT_FORMAT_NONE + #endif + + #ifdef OBJECT_FORMAT_COFF + + #include + #include + + #ifdef UMAX + #include + #endif + + #ifdef _AIX + #define ISCOFF(magic) \ + ((magic) == U802WRMAGIC || (magic) == U802ROMAGIC || (magic) == U802TOCMAGIC) + #endif + + #if defined (_AIX) || defined (USG) + #undef FREAD + #undef FWRITE + #endif + + #include + + #endif /* OBJECT_FORMAT_COFF */ + #ifdef OBJECT_FORMAT_ROSE *************** *** 70,75 **** --- 129,137 ---- #include #include + #endif /* OBJECT_FORMAT_ROSE */ + #ifdef OBJECT_FORMAT_NONE + /* Default flags to pass to nm. */ #ifndef NM_FLAGS *************** *** 77,92 **** #endif ! #ifdef USG ! #define vfork fork ! #endif ! ! /* On MSDOS, write temp files in current dir ! because there's no place else we can expect to use. */ ! #if __MSDOS__ ! #ifndef P_tmpdir ! #define P_tmpdir "./" ! #endif ! #endif ! /* Linked lists of constructor and destructor names. */ --- 139,143 ---- #endif ! #endif /* OBJECT_FORMAT_NONE */ /* Linked lists of constructor and destructor names. */ *************** *** 113,117 **** --- 164,170 ---- }; + #ifndef NO_SYS_SIGLIST extern char *sys_siglist[]; + #endif extern char *version_string; *************** *** 149,153 **** #if !defined(HAVE_STRERROR) && !defined(_OSF_SOURCE) ! char *strerror (e) int e; { --- 202,207 ---- #if !defined(HAVE_STRERROR) && !defined(_OSF_SOURCE) ! char * ! strerror (e) int e; { *************** *** 175,182 **** int status; { ! if (c_file[0]) maybe_unlink (c_file); ! if (o_file[0]) maybe_unlink (o_file); --- 229,236 ---- int status; { ! if (c_file != 0 && c_file[0]) maybe_unlink (c_file); ! if (o_file != 0 && o_file[0]) maybe_unlink (o_file); *************** *** 337,340 **** --- 391,450 ---- } + /* Make a copy of a string INPUT with size SIZE. */ + + char * + savestring (input, size) + char *input; + int size; + { + char *output = (char *) xmalloc (size + 1); + strcpy (output, input); + return output; + } + + /* Decide whether the given symbol is: + a constructor (1), a destructor (2), or neither (0). */ + + static int + is_ctor_dtor (s) + char *s; + { + struct names { char *name; int len; int ret; int two_underscores; }; + + register struct names *p; + register int ch; + register char *orig_s = s; + + static struct names special[] = { + #ifdef NO_DOLLAR_IN_LABEL + { "GLOBAL_.I.", sizeof ("GLOBAL_.I.")-1, 1, 0 }, + { "GLOBAL_.D.", sizeof ("GLOBAL_.D.")-1, 2, 0 }, + #else + { "GLOBAL_$I$", sizeof ("GLOBAL_$I$")-1, 1, 0 }, + { "GLOBAL_$D$", sizeof ("GLOBAL_$I$")-1, 2, 0 }, + #endif + { "sti__", sizeof ("sti__")-1, 1, 1 }, + { "std__", sizeof ("std__")-1, 2, 1 }, + { NULL, 0, 0, 0 } + }; + + while ((ch = *s) == '_') + ++s; + + if (s == orig_s) + return 0; + + for (p = &special[0]; p->len > 0; p++) + { + if (ch == p->name[0] + && (!p->two_underscores || ((s - orig_s) >= 2)) + && strncmp(s, p->name, p->len) == 0) + { + return p->ret; + } + } + return 0; + } + /* Compute a string to use as the base of all temporary file names. *************** *** 386,394 **** char *ld_file_name; char *c_file_name; - char *B_option; char *p; char *prefix; ! char **c_argv = (char **) xcalloc (sizeof (char *), argc+7); ! char **c_ptr = c_argv; char **ld1_argv = (char **) xcalloc (sizeof (char *), argc+2); char **ld1 = ld1_argv; --- 496,503 ---- char *ld_file_name; char *c_file_name; char *p; char *prefix; ! char **c_argv; ! char **c_ptr; char **ld1_argv = (char **) xcalloc (sizeof (char *), argc+2); char **ld1 = ld1_argv; *************** *** 396,399 **** --- 505,509 ---- char **ld2 = ld2_argv; int first_file; + int num_c_args = argc+7; int len; int clen; *************** *** 404,407 **** --- 514,532 ---- #endif + p = (char *) getenv ("COLLECT_GCC_OPTIONS"); + if (p) + while (*p) + { + char *q = p; + while (*q && *q != ' ') q++; + if (*p == '-' && (p[1] == 'm' || p[1] == 'f')) + num_c_args++; + + if (*q) q++; + p = q; + } + + c_ptr = c_argv = (char **) xcalloc (sizeof (char *), num_c_args); + if (argc < 2) fatal ("no arguments"); *************** *** 464,470 **** ld_file_name = xcalloc (len + sizeof ("real-ld"), 1); - c_file_name = xcalloc (clen + sizeof ("gcc"), 1); nm_file_name = xcalloc (len + sizeof ("gnm"), 1); - B_option = xcalloc (len + sizeof ("-B"), 1); memcpy (ld_file_name, prefix, len); --- 589,593 ---- *************** *** 484,499 **** } ! memcpy (c_file_name, prefix, len); ! strcpy (c_file_name + len, "gcc"); ! if (access (c_file_name, X_OK) < 0) { ! #ifdef STANDARD_BIN_PREFIX ! strcpy (c_file_name, STANDARD_BIN_PREFIX); ! strcat (c_file_name, "gcc"); if (access (c_file_name, X_OK) < 0) - #endif { ! #ifdef STANDARD_EXEC_PREFIX ! strcpy (c_file_name, STANDARD_EXEC_PREFIX); strcat (c_file_name, "gcc"); if (access (c_file_name, X_OK) < 0) --- 607,620 ---- } ! c_file_name = getenv ("COLLECT_GCC"); ! if (c_file_name == 0 || c_file_name[0] != '/') { ! c_file_name = xcalloc (clen + sizeof ("gcc"), 1); ! memcpy (c_file_name, prefix, len); ! strcpy (c_file_name + len, "gcc"); if (access (c_file_name, X_OK) < 0) { ! #ifdef STANDARD_BIN_PREFIX ! strcpy (c_file_name, STANDARD_BIN_PREFIX); strcat (c_file_name, "gcc"); if (access (c_file_name, X_OK) < 0) *************** *** 500,504 **** #endif { ! strcpy (c_file_name, "gcc"); } } --- 621,632 ---- #endif { ! #ifdef STANDARD_EXEC_PREFIX ! strcpy (c_file_name, STANDARD_EXEC_PREFIX); ! strcat (c_file_name, "gcc"); ! if (access (c_file_name, X_OK) < 0) ! #endif ! { ! strcpy (c_file_name, "gcc"); ! } } } *************** *** 521,527 **** } - strcpy (B_option, "-B"); - strcpy (B_option + sizeof ("-B") - 1, prefix); - *ld1++ = *ld2++ = "ld"; --- 649,652 ---- *************** *** 532,536 **** sprintf (c_file, "%s.c", temp_filename); sprintf (o_file, "%s.o", temp_filename); ! *c_ptr++ = "gcc"; *c_ptr++ = "-c"; *c_ptr++ = "-o"; --- 657,661 ---- sprintf (c_file, "%s.c", temp_filename); sprintf (o_file, "%s.o", temp_filename); ! *c_ptr++ = c_file_name; *c_ptr++ = "-c"; *c_ptr++ = "-o"; *************** *** 537,542 **** *c_ptr++ = o_file; /* Parse arguments. Remember output file spec, pass the rest to ld. */ ! /* After the first file, put in the c++ rt0 */ first_file = 1; while ((arg = *++argv) != (char *)0) --- 662,675 ---- *c_ptr++ = o_file; + /* !!! When GCC calls collect2, + it does not know whether it is calling collect2 or ld. + So collect2 cannot meaningfully understand any options + except those ld understands. + If you propose to make GCC pass some other option, + just imagine what will happen if ld is really ld!!! */ + /* Parse arguments. Remember output file spec, pass the rest to ld. */ ! /* After the first file, put in the c++ rt0. */ ! first_file = 1; while ((arg = *++argv) != (char *)0) *************** *** 557,576 **** break; - /* pass -f, -B, -b, -V, and -m - options to gcc. This allows options to be passed - that affect search rules, and the size of pointers. */ - case 'b': - case 'B': - case 'f': - case 'm': - case 'V': - if (arg[1] != '\0') - { - ld1--; - ld2--; - *c_ptr++ = arg; - } - break; - case 'o': outfile = (arg[2] == '\0') ? argv[1] : &arg[2]; --- 690,693 ---- *************** *** 597,601 **** } ! *c_ptr++ = B_option; *c_ptr++ = c_file; *c_ptr = *ld1 = *ld2 = (char *)0; --- 714,731 ---- } ! /* Get any options that the upper GCC wants to pass to the sub-GCC. */ ! p = (char *) getenv ("COLLECT_GCC_OPTIONS"); ! if (p) ! while (*p) ! { ! char *q = p; ! while (*q && *q != ' ') q++; ! if (*p == '-' && (p[1] == 'm' || p[1] == 'f')) ! *c_ptr++ = savestring (p, q - p); ! ! if (*q) q++; ! p = q; ! } ! *c_ptr++ = c_file; *c_ptr = *ld1 = *ld2 = (char *)0; *************** *** 603,607 **** if (vflag) { ! fprintf (stderr, "GNU COLLECT2 version %s", version_string); #ifdef TARGET_VERSION TARGET_VERSION; --- 733,737 ---- if (vflag) { ! fprintf (stderr, "collect2 version %s", version_string); #ifdef TARGET_VERSION TARGET_VERSION; *************** *** 612,622 **** if (debug) { ! fprintf (stderr, "prefix = %s\n", prefix); ! fprintf (stderr, "ld_file_name = %s\n", ld_file_name); ! fprintf (stderr, "c_file_name = %s\n", c_file_name); ! fprintf (stderr, "nm_file_name = %s\n", nm_file_name); ! fprintf (stderr, "B_option = %s\n", B_option); ! fprintf (stderr, "c_file = %s\n", c_file); ! fprintf (stderr, "o_file = %s\n", o_file); } --- 742,770 ---- if (debug) { ! char *ptr; ! fprintf (stderr, "prefix = %s\n", prefix); ! fprintf (stderr, "ld_file_name = %s\n", ld_file_name); ! fprintf (stderr, "c_file_name = %s\n", c_file_name); ! fprintf (stderr, "nm_file_name = %s\n", nm_file_name); ! fprintf (stderr, "c_file = %s\n", c_file); ! fprintf (stderr, "o_file = %s\n", o_file); ! ! ptr = getenv ("COLLECT_GCC_OPTIONS"); ! if (ptr) ! fprintf (stderr, "COLLECT_GCC_OPTIONS = %s\n", ptr); ! ! ptr = getenv ("COLLECT_GCC"); ! if (ptr) ! fprintf (stderr, "COLLECT_GCC = %s\n", ptr); ! ! ptr = getenv ("COMPILER_PATH"); ! if (ptr) ! fprintf (stderr, "COMPILER_PATH = %s\n", ptr); ! ! ptr = getenv ("LIBRARY_PATH"); ! if (ptr) ! fprintf (stderr, "LIBRARY_PATH = %s\n", ptr); ! ! fprintf (stderr, "\n"); } *************** *** 691,694 **** --- 839,848 ---- if (sig != -1 && sig != 0) { + #ifdef NO_SYS_SIGLIST + error ("%s terminated with signal %d %s", + prog, + sig, + (status & 0200) ? ", core dumped" : ""); + #else error ("%s terminated with signal %d [%s]%s", prog, *************** *** 696,699 **** --- 850,854 ---- sys_siglist[sig], (status & 0200) ? ", core dumped" : ""); + #endif my_exit (127); *************** *** 849,857 **** ! #ifndef OBJECT_FORMAT_ROSE ! /* OSF/rose specific version to scan the name list of the loaded ! program for the symbols g++ uses for static constructors and ! destructors. The constructor table begins at __CTOR_LIST__ and contains a count --- 1004,1011 ---- ! #ifdef OBJECT_FORMAT_NONE ! /* Generic version to scan the name list of the loaded program for ! the symbols g++ uses for static constructors and destructors. The constructor table begins at __CTOR_LIST__ and contains a count *************** *** 943,948 **** { int ch, ch2; ! char *start; ! char *end; /* If it contains a constructor or destructor name, add the name --- 1097,1101 ---- { int ch, ch2; ! char *name, *end; /* If it contains a constructor or destructor name, add the name *************** *** 954,996 **** if (ch == '\0' || ch == '\n') continue; ! ! /* Record where the symbol name starts. */ ! start = p; ! ! while ((ch = *p) == '_') /* Skip any extra '_' inserted. */ ! p++; - /* Find end of symbol name and null-terminate it. */ - for (end = p; (ch2 = *end) != '\0' && !isspace (ch2); end++) - ; *end = '\0'; ! ! if (ch == 'G') ! { ! if (! strncmp (p, "GLOBAL_$I$", 10)) ! add_to_list (&constructors, start); ! ! else if (! strncmp (p, "GLOBAL_$D$", 10)) ! add_to_list (&destructors, start); ! ! else /* not a constructor or destructor */ ! continue; ! } ! ! else if (ch == 's' && (p - start) >= 2) { ! if (! strncmp (p, "sti__", 5)) ! add_to_list (&constructors, start); ! ! else if (! strncmp (p, "std__", 5)) ! add_to_list (&destructors, start); ! else /* not a constructor or destructor */ ! continue; } - else - continue; - if (debug) fprintf (stderr, "\t%s\n", buf); --- 1107,1133 ---- if (ch == '\0' || ch == '\n') continue; ! ! name = p; ! /* Find the end of the symbol name. ! Don't include `|', because Encore nm can tack that on the end. */ ! for (end = p; (ch2 = *end) != '\0' && !isspace (ch2) && ch2 != '|'; ! end++) ! continue; *end = '\0'; ! switch (is_ctor_dtor (name)) { ! case 1: ! add_to_list (&constructors, name); ! break; ! ! case 2: ! add_to_list (&destructors, name); ! break; ! default: /* not a constructor or destructor */ ! continue; } if (debug) fprintf (stderr, "\t%s\n", buf); *************** *** 1009,1013 **** } ! #endif /* !OBJECT_FORMAT_ROSE */ --- 1146,1258 ---- } ! #endif /* OBJECT_FORMAT_NONE */ ! ! ! /* ! * COFF specific stuff. ! */ ! ! #ifdef OBJECT_FORMAT_COFF ! ! #if defined(EXTENDED_COFF) ! # define GCC_SYMBOLS(X) (SYMHEADER(X).isymMax+SYMHEADER(X).iextMax) ! # define GCC_SYMENT SYMR ! # define GCC_OK_SYMBOL(X) ((X).st == stProc && (X).sc == scText) ! # define GCC_SYMINC(X) (1) ! # define GCC_SYMZERO(X) (SYMHEADER(X).isymMax) ! #else ! # define GCC_SYMBOLS(X) (HEADER(ldptr).f_nsyms) ! # define GCC_SYMENT SYMENT ! # define GCC_OK_SYMBOL(X) \ ! (((X).n_sclass == C_EXT) && \ ! (((X).n_type & N_TMASK) == (DT_NON << N_BTSHFT) || \ ! ((X).n_type & N_TMASK) == (DT_FCN << N_BTSHFT))) ! # define GCC_SYMINC(X) ((X).n_numaux+1) ! # define GCC_SYMZERO(X) 0 ! #endif ! ! extern char *ldgetname (); ! ! /* COFF version to scan the name list of the loaded program for ! the symbols g++ uses for static constructors and destructors. ! ! The constructor table begins at __CTOR_LIST__ and contains a count ! of the number of pointers (or -1 if the constructors are built in a ! separate section by the linker), followed by the pointers to the ! constructor functions, terminated with a null pointer. The ! destructor table has the same format, and begins at __DTOR_LIST__. */ ! ! static void ! scan_prog_file (prog_name, which_pass) ! char *prog_name; ! enum pass which_pass; ! { ! LDFILE *ldptr; ! int sym_index, sym_count; ! ! if (which_pass != PASS_FIRST) ! return; ! ! if ((ldptr = ldopen (prog_name, ldptr)) == NULL) ! fatal ("%s: can't open as COFF file", prog_name); ! ! if (!ISCOFF (HEADER(ldptr).f_magic)) ! fatal ("%s: not a COFF file", prog_name); ! ! sym_count = GCC_SYMBOLS (ldptr); ! sym_index = GCC_SYMZERO (ldptr); ! while (sym_index < sym_count) ! { ! GCC_SYMENT symbol; ! ! if (ldtbread (ldptr, sym_index, &symbol) <= 0) ! break; ! sym_index += GCC_SYMINC (symbol); ! ! if (GCC_OK_SYMBOL (symbol)) ! { ! char *name; ! ! if ((name = ldgetname (ldptr, &symbol)) == NULL) ! continue; /* should never happen */ ! ! #ifdef _AIX ! /* All AIX function names begin with a dot. */ ! if (*name++ != '.') ! continue; ! #endif ! ! switch (is_ctor_dtor (name)) ! { ! case 1: ! add_to_list (&constructors, name); ! break; ! ! case 2: ! add_to_list (&destructors, name); ! break; ! ! default: /* not a constructor or destructor */ ! continue; ! } ! ! #if !defined(EXTENDED_COFF) ! if (debug) ! fprintf (stderr, "\tsec=%d class=%d type=%s%o %s\n", ! symbol.n_scnum, symbol.n_sclass, ! (symbol.n_type ? "0" : ""), symbol.n_type, ! name); ! #else ! if (debug) ! fprintf (stderr, "\tiss = %5d, value = %5d, index = %5d, name = %s\n", ! symbol.iss, symbol.value, symbol.index, name); ! #endif ! } ! } ! ! (void) ldclose(ldptr); ! } ! ! #endif /* OBJECT_FORMAT_COFF */ *************** *** 1024,1028 **** ldc_header_t hdr; /* common header */ load_cmd_map_command_t map; /* map indexing other load cmds */ ! interpreter_command_t iprtr; /* interpereter pathname */ strings_command_t str; /* load commands strings section */ region_command_t region; /* region load command */ --- 1269,1273 ---- ldc_header_t hdr; /* common header */ load_cmd_map_command_t map; /* map indexing other load cmds */ ! interpreter_command_t iprtr; /* interpreter pathname */ strings_command_t str; /* load commands strings section */ region_command_t region; /* region load command */ *************** *** 1194,1198 **** if (debug) { ! char *kind = "uknown"; switch (load_hdr->sym.symc_kind) --- 1439,1443 ---- if (debug) { ! char *kind = "unknown"; switch (load_hdr->sym.symc_kind) *************** *** 1222,1226 **** symbol_info_t *sym = ((symbol_info_t *) load_cmd->section) + i; char *name = sym->si_name.symbol_name + str_sect; - char *name_start = name; if (name[0] != '_') --- 1467,1470 ---- *************** *** 1227,1237 **** continue; - while (*++name == '_') /* skip any extra '_' inserted */ - ; - if (rw) { ! if (*name != 'm' || (name - name_start) < 2 ! || strcmp (name, "main")) continue; --- 1471,1480 ---- continue; if (rw) { ! char *n = name; ! while (*n == '_') ! ++n; ! if (*n != 'm' || (n - name) < 2 || strcmp (n, "main")) continue; *************** *** 1238,1269 **** main_sym = sym; } ! ! else if (*name == 'G') ! { ! if (! strncmp (name, "GLOBAL_$I$", 10)) ! add_to_list (&constructors, name_start); ! ! else if (! strncmp (name, "GLOBAL_$D$", 10)) ! add_to_list (&destructors, name_start); ! ! else /* not a constructor or destructor */ ! continue; ! } ! ! else if (*name == 's' && (name - name_start) > 2) { ! if (! strncmp (name, "sti__", 5)) ! add_to_list (&constructors, name_start); ! ! else if (! strncmp (name, "std__", 5)) ! add_to_list (&destructors, name_start); ! ! else /* not a constructor or destructor */ ! continue; } - else - continue; - if (debug) fprintf (stderr, "\ttype = 0x%.4x, sc = 0x%.2x, flags = 0x%.8x, name = %.30s\n", --- 1481,1501 ---- main_sym = sym; } ! else { ! switch (is_ctor_dtor (name)) ! { ! case 1: ! add_to_list (&constructors, name); ! break; ! ! case 2: ! add_to_list (&destructors, name); ! break; ! ! default: /* not a constructor or destructor */ ! continue; ! } } if (debug) fprintf (stderr, "\ttype = 0x%.4x, sc = 0x%.2x, flags = 0x%.8x, name = %.30s\n", *************** *** 1360,1364 **** /* Add a function table to the load commands to call a function ! on initition or termination of the process. */ static void --- 1592,1596 ---- /* Add a function table to the load commands to call a function ! on initiation or termination of the process. */ static void diff -rc2N gcc-2.0/combine.c gcc-2.1/combine.c *** gcc-2.0/combine.c Sat Feb 22 02:32:57 1992 --- gcc-2.1/combine.c Mon Mar 23 14:40:33 1992 *************** *** 115,119 **** /* Vector mapping INSN_UIDs to cuids. ! The cuids are like uids but increase monononically always. Combine always uses cuids so that it can compare them. But actually renumbering the uids, which we used to do, --- 115,119 ---- /* Vector mapping INSN_UIDs to cuids. ! The cuids are like uids but increase monotonically always. Combine always uses cuids so that it can compare them. But actually renumbering the uids, which we used to do, *************** *** 175,179 **** /* The next group of arrays allows the recording of the last value assigned to (hard or pseudo) register n. We use this information to see if a ! operation being processed is redundant given the a prior operation peformed on the register. For example, an `and' with a constant is redundant if all the zero bits are already known to be turned off. --- 175,179 ---- /* The next group of arrays allows the recording of the last value assigned to (hard or pseudo) register n. We use this information to see if a ! operation being processed is redundant given a prior operation performed on the register. For example, an `and' with a constant is redundant if all the zero bits are already known to be turned off. *************** *** 518,522 **** /* Finally, see if any of the insns that this insn links to explicitly references CC0. If so, try this insn, that insn, ! and its prececessor if it sets CC0. */ for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) if (GET_CODE (XEXP (links, 0)) == INSN --- 518,522 ---- /* Finally, see if any of the insns that this insn links to explicitly references CC0. If so, try this insn, that insn, ! and its predecessor if it sets CC0. */ for (links = LOG_LINKS (insn); links; links = XEXP (links, 1)) if (GET_CODE (XEXP (links, 0)) == INSN *************** *** 577,581 **** /* If this is a complex assignment, see if we can convert it into a ! simple assignent. */ set = expand_field_assignment (set); if (SET_DEST (set) == x) --- 577,581 ---- /* If this is a complex assignment, see if we can convert it into a ! simple assignment. */ set = expand_field_assignment (set); if (SET_DEST (set) == x) *************** *** 683,689 **** insns, since the reg inside may need to be copied from in the outside mode, and that may be invalid if it is an fp reg copied in ! integer mode. */ || (GET_CODE (src) == SUBREG ! && ! MODES_TIEABLE_P (GET_MODE (src), GET_MODE (SUBREG_REG (src)))) /* If we couldn't eliminate a field assignment, we can't combine. */ || GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == STRICT_LOW_PART --- 683,696 ---- insns, since the reg inside may need to be copied from in the outside mode, and that may be invalid if it is an fp reg copied in ! integer mode. As a special exception, we can allow this if ! I3 is simply copying DEST, a REG, to CC0. */ || (GET_CODE (src) == SUBREG ! && ! MODES_TIEABLE_P (GET_MODE (src), GET_MODE (SUBREG_REG (src))) ! #ifdef HAVE_cc0 ! && ! (GET_CODE (i3) == INSN && GET_CODE (PATTERN (i3)) == SET ! && SET_DEST (PATTERN (i3)) == cc0_rtx ! && GET_CODE (dest) == REG && dest == SET_SRC (PATTERN (i3))) ! #endif ! ) /* If we couldn't eliminate a field assignment, we can't combine. */ || GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == STRICT_LOW_PART *************** *** 901,908 **** && (reg_overlap_mentioned_p (i2dest, inner_dest) || (i1dest && reg_overlap_mentioned_p (i1dest, inner_dest)))) ! #ifdef SMALL_REGISTER_CLASSES || (GET_CODE (inner_dest) == REG ! && REGNO (inner_dest) < FIRST_PSEUDO_REGISTER) #endif || (i1_not_in_src && reg_overlap_mentioned_p (i1dest, src))) return 0; --- 908,920 ---- && (reg_overlap_mentioned_p (i2dest, inner_dest) || (i1dest && reg_overlap_mentioned_p (i1dest, inner_dest)))) ! /* This is the same test done in can_combine_p. */ || (GET_CODE (inner_dest) == REG ! && REGNO (inner_dest) < FIRST_PSEUDO_REGISTER ! #ifndef SMALL_REGISTER_CLASSES ! && ! HARD_REGNO_MODE_OK (REGNO (inner_dest), ! GET_MODE (inner_dest)) #endif + ) + || (i1_not_in_src && reg_overlap_mentioned_p (i1dest, src))) return 0; *************** *** 1027,1053 **** && GET_CODE (PATTERN (i2)) == PARALLEL && ! side_effects_p (SET_DEST (PATTERN (i3))) && ! reg_overlap_mentioned_p (SET_SRC (PATTERN (i3)), SET_DEST (PATTERN (i3))) && next_real_insn (i2) == i3) ! for (i = 0; i < XVECLEN (PATTERN (i2), 0); i++) ! if (SET_DEST (XVECEXP (PATTERN (i2), 0, i)) == SET_SRC (PATTERN (i3))) ! { ! combine_merges++; ! ! subst_insn = i3; ! subst_low_cuid = INSN_CUID (i2); ! ! added_sets_2 = 0; ! i2dest = SET_SRC (PATTERN (i3)); ! /* Replace the dest in I2 with our dest and make the resulting ! insn the new pattern for I3. Then skip to where we ! validate the pattern. Everything was set up above. */ ! SUBST (SET_DEST (XVECEXP (PATTERN (i2), 0, i)), ! SET_DEST (PATTERN (i3))); ! newpat = PATTERN (i2); ! goto validate_replacement; ! } #ifndef HAVE_cc0 --- 1039,1092 ---- && GET_CODE (PATTERN (i2)) == PARALLEL && ! side_effects_p (SET_DEST (PATTERN (i3))) + /* If the dest of I3 is a ZERO_EXTRACT or STRICT_LOW_PART, the code + below would need to check what is inside (and reg_overlap_mentioned_p + doesn't support those codes anyway). Don't allow those destinations; + the resulting insn isn't likely to be recognized anyway. */ + && GET_CODE (SET_DEST (PATTERN (i3))) != ZERO_EXTRACT + && GET_CODE (SET_DEST (PATTERN (i3))) != STRICT_LOW_PART && ! reg_overlap_mentioned_p (SET_SRC (PATTERN (i3)), SET_DEST (PATTERN (i3))) && next_real_insn (i2) == i3) ! { ! rtx p2 = PATTERN (i2); ! /* Make sure that the destination of I3, ! which we are going to substitute into one output of I2, ! is not used within another output of I2. We must avoid making this: ! (parallel [(set (mem (reg 69)) ...) ! (set (reg 69) ...)]) ! which is not well-defined as to order of actions. ! (Besides, reload can't handle output reloads for this.) ! ! The problem can also happen if the dest of I3 is a memory ref, ! if another dest in I2 is an indirect memory ref. */ ! for (i = 0; i < XVECLEN (p2, 0); i++) ! if (GET_CODE (XVECEXP (p2, 0, i)) == SET ! && reg_overlap_mentioned_p (SET_DEST (PATTERN (i3)), ! SET_DEST (XVECEXP (p2, 0, i)))) ! break; ! ! if (i == XVECLEN (p2, 0)) ! for (i = 0; i < XVECLEN (p2, 0); i++) ! if (SET_DEST (XVECEXP (p2, 0, i)) == SET_SRC (PATTERN (i3))) ! { ! combine_merges++; ! ! subst_insn = i3; ! subst_low_cuid = INSN_CUID (i2); ! ! added_sets_2 = 0; ! i2dest = SET_SRC (PATTERN (i3)); ! ! /* Replace the dest in I2 with our dest and make the resulting ! insn the new pattern for I3. Then skip to where we ! validate the pattern. Everything was set up above. */ ! SUBST (SET_DEST (XVECEXP (p2, 0, i)), ! SET_DEST (PATTERN (i3))); ! newpat = p2; ! goto validate_replacement; ! } ! } #ifndef HAVE_cc0 *************** *** 1130,1134 **** mov r3,(r3)+ which is a famous insn on the PDP-11 where the value of r3 used as the ! source was model-dependant. Avoid this sort of thing. */ #if 0 --- 1169,1173 ---- mov r3,(r3)+ which is a famous insn on the PDP-11 where the value of r3 used as the ! source was model-dependent. Avoid this sort of thing. */ #if 0 *************** *** 1171,1175 **** /* If the set in I2 needs to be kept around, we must make a copy of PATTERN (I2), so that when we substitute I1SRC for I1DEST in ! PATTERN (I2), we are only substituing for the original I1DEST, not into an already-substituted copy. This also prevents making self-referential rtx. If I2 is a PARALLEL, we just need the piece that assigns I2SRC to --- 1210,1214 ---- /* If the set in I2 needs to be kept around, we must make a copy of PATTERN (I2), so that when we substitute I1SRC for I1DEST in ! PATTERN (I2), we are only substituting for the original I1DEST, not into an already-substituted copy. This also prevents making self-referential rtx. If I2 is a PARALLEL, we just need the piece that assigns I2SRC to *************** *** 1513,1516 **** --- 1552,1599 ---- if (i2_code_number >= 0) insn_code_number = recog_for_combine (&newpat, i3, &new_i3_notes); + + if (insn_code_number >= 0) + { + rtx insn; + rtx link; + + /* If we will be able to accept this, we have made a change to the + destination of I3. This can invalidate a LOG_LINKS pointing + to I3. No other part of combine.c makes such a transformation. + + The new I3 will have a destination that was previously the + destination of I1 or I2 and which was used in i2 or I3. Call + distribute_links to make a LOG_LINK from the next use of + that destination. */ + + PATTERN (i3) = newpat; + distribute_links (gen_rtx (INSN_LIST, VOIDmode, i3, 0)); + + /* I3 now uses what used to be its destination and which is + now I2's destination. That means we need a LOG_LINK from + I3 to I2. But we used to have one, so we still will. + + However, some later insn might be using I2's dest and have + a LOG_LINK pointing at I3. We must remove this link. + The simplest way to remove the link is to point it at I1, + which we know will be a NOTE. */ + + for (insn = NEXT_INSN (i3); + insn && GET_CODE (insn) != CODE_LABEL + && GET_CODE (PREV_INSN (insn)) != JUMP_INSN; + insn = NEXT_INSN (insn)) + { + if (GET_RTX_CLASS (GET_CODE (insn)) == 'i' + && reg_referenced_p (SET_DEST (newi2pat), PATTERN (insn))) + { + for (link = LOG_LINKS (insn); link; + link = XEXP (link, 1)) + if (XEXP (link, 0) == i3) + XEXP (link, 0) = i1; + + break; + } + } + } } *************** *** 1616,1620 **** /* Ensure that we do not have something that should not be shared but occurs multiple times in the new insns. Check this by first ! restting all the `used' flags and then copying anything is shared. */ reset_used_flags (i3notes); --- 1699,1703 ---- /* Ensure that we do not have something that should not be shared but occurs multiple times in the new insns. Check this by first ! resetting all the `used' flags and then copying anything is shared. */ reset_used_flags (i3notes); *************** *** 2078,2082 **** IN_DEST is non-zero if we are processing the SET_DEST of a SET. ! UNIQUE_COPY is non-zero if each substition must be unique. We do this by copying if `n_occurrences' is non-zero. */ --- 2161,2165 ---- IN_DEST is non-zero if we are processing the SET_DEST of a SET. ! UNIQUE_COPY is non-zero if each substitution must be unique. We do this by copying if `n_occurrences' is non-zero. */ *************** *** 3789,3797 **** != CODE_FOR_nothing))) || (GET_CODE (inner) == MEM && pos >= 0 ! #ifdef STRICT_ALIGNMENT ! && (pos % GET_MODE_ALIGNMENT (tmode)) == 0 ! #else ! && (pos % BITS_PER_UNIT) == 0 ! #endif /* We can't do this if we are widening INNER_MODE (it may not be aligned, for one thing). */ --- 3872,3878 ---- != CODE_FOR_nothing))) || (GET_CODE (inner) == MEM && pos >= 0 ! && (pos ! % (STRICT_ALIGNMENT ? GET_MODE_ALIGNMENT (tmode) ! : BITS_PER_UNIT)) == 0 /* We can't do this if we are widening INNER_MODE (it may not be aligned, for one thing). */ *************** *** 4054,4058 **** XEXP (XEXP (x, 0), 1), i, 1, 0, in_code == COMPARE); ! #if 0 /* Same as previous, but for (subreg (lshiftrt ...)) in first op. */ else if (GET_CODE (XEXP (x, 0)) == SUBREG --- 4135,4139 ---- XEXP (XEXP (x, 0), 1), i, 1, 0, in_code == COMPARE); ! /* Same as previous, but for (subreg (lshiftrt ...)) in first op. */ else if (GET_CODE (XEXP (x, 0)) == SUBREG *************** *** 4064,4068 **** XEXP (SUBREG_REG (XEXP (x, 0)), 1), i, 1, 0, in_code == COMPARE); - #endif /* One machines without logical shifts, if the operand of the AND is --- 4145,4148 ---- *************** *** 4196,4199 **** --- 4276,4415 ---- } + /* Rewrite X so that it is an expression in MODE. We only care about the + low-order BITS bits so we can ignore AND operations that just clear + higher-order bits. + + Also, if REG is non-zero and X is a register equal in value to REG, + replace X with REG. */ + + static rtx + force_to_mode (x, mode, bits, reg) + rtx x; + enum machine_mode mode; + int bits; + rtx reg; + { + enum rtx_code code = GET_CODE (x); + + /* If X is narrower than MODE or if BITS is larger than the size of MODE, + just get X in the proper mode. */ + + if (GET_MODE_SIZE (GET_MODE (x)) < GET_MODE_SIZE (mode) + || bits > GET_MODE_BITSIZE (mode)) + return gen_lowpart_for_combine (mode, x); + + switch (code) + { + case SIGN_EXTEND: + case ZERO_EXTEND: + case ZERO_EXTRACT: + case SIGN_EXTRACT: + x = expand_compound_operation (x); + if (GET_CODE (x) != code) + return force_to_mode (x, mode, bits, reg); + break; + + case REG: + if (reg != 0 && (rtx_equal_p (get_last_value (reg), x) + || rtx_equal_p (reg, get_last_value (x)))) + x = reg; + break; + + case CONST_INT: + if (bits < HOST_BITS_PER_INT) + x = gen_rtx (CONST_INT, VOIDmode, + INTVAL (x) & ((1 << (bits + 1)) - 1)); + return x; + + case SUBREG: + /* Ignore low-order SUBREGs. */ + if (subreg_lowpart_p (x)) + return force_to_mode (SUBREG_REG (x), mode, bits, reg); + break; + + case AND: + /* If this is an AND with a constant. Otherwise, we fall through to + do the general binary case. */ + + if (GET_CODE (XEXP (x, 1)) == CONST_INT) + { + int mask = INTVAL (XEXP (x, 1)); + int len = exact_log2 (mask + 1); + rtx op = XEXP (x, 0); + + /* If this is masking some low-order bits, we may be able to + impose a stricter constraint on what bits of the operand are + required. */ + + op = force_to_mode (op, mode, len > 0 ? MIN (len, bits) : bits, + reg); + + if (bits < HOST_BITS_PER_INT) + mask &= (1 << (bits + 1)) - 1; + + x = simplify_and_const_int (x, mode, op, mask); + + /* If X is still an AND, see if it is an AND with a mask that + is just some low-order bits. If so, and it is BITS wide (it + can't be wider), we don't need it. */ + + if (GET_CODE (x) == AND && GET_CODE (XEXP (x, 1)) == CONST_INT + && bits < HOST_BITS_PER_INT + && INTVAL (XEXP (x, 1)) == (1 << (bits + 1)) - 1) + x = XEXP (x, 0); + return x; + } + + /* ... fall through ... */ + + case PLUS: + case MINUS: + case MULT: + case IOR: + case XOR: + /* For most binary operations, just propagate into the operation and + change the mode. */ + + return gen_binary (code, mode, + force_to_mode (XEXP (x, 0), mode, bits, reg), + force_to_mode (XEXP (x, 1), mode, bits, reg)); + + case ASHIFT: + case LSHIFT: + /* For left shifts, do the same, but just for the first operand. + If the shift count is a constant, we need even fewer bits of the + first operand. */ + + if (GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) < bits) + bits -= INTVAL (XEXP (x, 1)); + + return gen_binary (code, mode, + force_to_mode (XEXP (x, 0), mode, bits, reg), + XEXP (x, 1)); + + case LSHIFTRT: + /* Here we can only do something if the shift count is a constant and + the count plus BITS is no larger than the width of MODE, we can do + the shift in MODE. */ + + if (GET_CODE (XEXP (x, 1)) == CONST_INT + && INTVAL (XEXP (x, 1)) + bits <= GET_MODE_BITSIZE (mode)) + return gen_binary (LSHIFTRT, mode, + force_to_mode (XEXP (x, 0), mode, + bits + INTVAL (XEXP (x, 1)), reg), + XEXP (x, 1)); + break; + + case NEG: + case NOT: + /* Handle these similarly to the way we handle most binary operations. */ + return gen_unary (code, mode, + force_to_mode (XEXP (x, 0), mode, bits, reg)); + } + + /* Otherwise, just do the operation canonically. */ + return gen_lowpart_for_combine (mode, x); + } + /* See if X, a SET operation, can be rewritten as a bit-field assignment. Return that assignment if so. *************** *** 4207,4211 **** rtx dest = SET_DEST (x); rtx src = SET_SRC (x); ! rtx assign = 0; /* If SRC was (and (not (ashift (const_int 1) POS)) DEST), this is --- 4423,4431 ---- rtx dest = SET_DEST (x); rtx src = SET_SRC (x); ! rtx ourdest; ! rtx assign; ! int c1, pos, len; ! rtx other; ! enum machine_mode mode; /* If SRC was (and (not (ashift (const_int 1) POS)) DEST), this is *************** *** 4217,4225 **** && GET_CODE (XEXP (XEXP (src, 0), 0)) == CONST_INT && INTVAL (XEXP (XEXP (src, 0), 0)) == -2 ! && rtx_equal_p (dest, XEXP (src, 1))) { assign = make_extraction (VOIDmode, dest, -1, XEXP (XEXP (src, 0), 1), 1, 1, 1, 0); ! src = const0_rtx; } --- 4437,4447 ---- && GET_CODE (XEXP (XEXP (src, 0), 0)) == CONST_INT && INTVAL (XEXP (XEXP (src, 0), 0)) == -2 ! && (rtx_equal_p (dest, XEXP (src, 1)) ! || rtx_equal_p (dest, get_last_value (XEXP (src, 1))) ! || rtx_equal_p (get_last_value (dest), XEXP (src, 1)))) { assign = make_extraction (VOIDmode, dest, -1, XEXP (XEXP (src, 0), 1), 1, 1, 1, 0); ! return gen_rtx (SET, VOIDmode, assign, const0_rtx); } *************** *** 4230,4234 **** && GET_CODE (SUBREG_REG (XEXP (src, 0))) == ROTATE && INTVAL (XEXP (SUBREG_REG (XEXP (src, 0)), 0)) == -2 ! && rtx_equal_p (dest, XEXP (src, 1))) { assign = make_extraction (VOIDmode, dest, -1, --- 4452,4458 ---- && GET_CODE (SUBREG_REG (XEXP (src, 0))) == ROTATE && INTVAL (XEXP (SUBREG_REG (XEXP (src, 0)), 0)) == -2 ! && (rtx_equal_p (dest, XEXP (src, 1)) ! || rtx_equal_p (dest, get_last_value (XEXP (src, 1))) ! || rtx_equal_p (get_last_value (dest), XEXP (src, 1)))) { assign = make_extraction (VOIDmode, dest, -1, *************** *** 4235,4239 **** XEXP (SUBREG_REG (XEXP (src, 0)), 1), 1, 1, 1, 0); ! src = const0_rtx; } --- 4459,4463 ---- XEXP (SUBREG_REG (XEXP (src, 0)), 1), 1, 1, 1, 0); ! return gen_rtx (SET, VOIDmode, assign, const0_rtx); } *************** *** 4242,4321 **** else if (GET_CODE (src) == IOR && GET_CODE (XEXP (src, 0)) == ASHIFT && XEXP (XEXP (src, 0), 0) == const1_rtx ! && rtx_equal_p (dest, XEXP (src, 1))) { assign = make_extraction (VOIDmode, dest, -1, XEXP (XEXP (src, 0), 1), 1, 1, 1, 0); ! src = const1_rtx; ! } ! ! /* The common case of a constant assignment into a constant-position ! field looks like (ior (and DEST C1) C2). We clear the bits in C1 ! that are present in C2 and C1 must then be the complement of a mask ! that selects a field. */ ! ! else if (GET_CODE (src) == IOR && GET_CODE (XEXP (src, 1)) == CONST_INT ! && GET_CODE (XEXP (src, 0)) == AND ! && GET_CODE (XEXP (XEXP (src, 0), 1)) == CONST_INT ! && GET_MODE_BITSIZE (GET_MODE (dest)) <= HOST_BITS_PER_INT ! && rtx_equal_p (XEXP (XEXP (src, 0), 0), dest)) ! { ! unsigned c1 = INTVAL (XEXP (XEXP (src, 0), 1)); ! unsigned c2 = INTVAL (XEXP (src, 1)); ! int pos, len; ! ! c1 &= ~ c2; ! ! c1 = (~ c1) & GET_MODE_MASK (GET_MODE (dest)); ! if ((pos = get_pos_from_mask (c1, &len)) >= 0) ! { ! assign = make_extraction (VOIDmode, dest, pos, 0, len, 1, 1, 0); ! src = gen_rtx (CONST_INT, VOIDmode, c2 >> pos); ! } } ! /* Finally, see if this is an assignment of a varying item into a fixed ! field. This looks like (ior (and DEST C1) (and (ashift SRC POS) C2)), ! but we have to allow for the operands to be in either order. */ ! else if (GET_CODE (src) == IOR && GET_CODE (XEXP (src, 0)) == AND ! && GET_CODE (XEXP (src, 1)) == AND ! && GET_MODE_BITSIZE (GET_MODE (dest)) <= HOST_BITS_PER_INT) ! { ! rtx mask, other; ! /* Set MASK to the (and DEST C1) and OTHER to the mask of the shift. */ ! if (GET_CODE (XEXP (XEXP (src, 0), 0)) == ASHIFT) ! mask = XEXP (src, 1), other = XEXP (src, 0); ! else if (GET_CODE (XEXP (XEXP (src, 1), 0)) == ASHIFT) ! mask = XEXP (src, 0), other = XEXP (src, 1); ! else ! return x; ! if (rtx_equal_p (XEXP (mask, 0), dest) ! && GET_CODE (XEXP (mask, 1)) == CONST_INT ! && GET_CODE (XEXP (other, 1)) == CONST_INT ! && GET_CODE (XEXP (XEXP (other, 0), 1)) == CONST_INT) ! { ! unsigned c1 = INTVAL (XEXP (mask, 1)); ! unsigned c2 = INTVAL (XEXP (other, 1)); ! int pos, len; ! /* The two masks must be complements within the relevant mode, ! C2 must select a field, and the shift must move to that ! position. */ ! if (((c1 % ~c2) & GET_MODE_MASK (GET_MODE (dest))) == 0 ! && (pos = get_pos_from_mask (c2, &len)) >= 0 ! && pos == INTVAL (XEXP (XEXP (other, 0), 1))) ! { ! assign = make_extraction (VOIDmode, dest, pos, 0, len, 1, 1, 0); ! src = XEXP (XEXP (other, 0), 0); ! } ! } ! } ! if (assign) ! return gen_rtx_combine (SET, VOIDmode, assign, src); ! return x; } --- 4466,4522 ---- else if (GET_CODE (src) == IOR && GET_CODE (XEXP (src, 0)) == ASHIFT && XEXP (XEXP (src, 0), 0) == const1_rtx ! && (rtx_equal_p (dest, XEXP (src, 1)) ! || rtx_equal_p (dest, get_last_value (XEXP (src, 1))) ! || rtx_equal_p (get_last_value (dest), XEXP (src, 1)))) { assign = make_extraction (VOIDmode, dest, -1, XEXP (XEXP (src, 0), 1), 1, 1, 1, 0); ! return gen_rtx (SET, VOIDmode, assign, const1_rtx); } ! /* The other case we handle is assignments into a constant-position ! field. They look like (ior (and DEST C1) OTHER). If C1 represents ! a mask that has all one bits except for a group of zero bits and ! OTHER is known to have zeros where C1 has ones, this is such an ! assignment. Compute the position and length from C1. Shift OTHER ! to the appropriate position, force it to the required mode, and ! make the extraction. Check for the AND in both operands. */ ! ! if (GET_CODE (src) == IOR && GET_CODE (XEXP (src, 0)) == AND ! && GET_CODE (XEXP (XEXP (src, 0), 1)) == CONST_INT ! && (rtx_equal_p (XEXP (XEXP (src, 0), 0), dest) ! || rtx_equal_p (XEXP (XEXP (src, 0), 0), get_last_value (dest)) ! || rtx_equal_p (get_last_value (XEXP (XEXP (src, 0), 1)), dest))) ! c1 = INTVAL (XEXP (XEXP (src, 0), 1)), other = XEXP (src, 1); ! else if (GET_CODE (src) == IOR && GET_CODE (XEXP (src, 1)) == AND ! && GET_CODE (XEXP (XEXP (src, 1), 1)) == CONST_INT ! && (rtx_equal_p (XEXP (XEXP (src, 1), 0), dest) ! || rtx_equal_p (XEXP (XEXP (src, 1), 0), get_last_value (dest)) ! || rtx_equal_p (get_last_value (XEXP (XEXP (src, 1), 0)), ! dest))) ! c1 = INTVAL (XEXP (XEXP (src, 1), 1)), other = XEXP (src, 0); ! else ! return x; ! pos = get_pos_from_mask (~c1, &len); ! if (pos < 0 || pos + len > GET_MODE_BITSIZE (GET_MODE (dest)) ! || (c1 & significant_bits (other, GET_MODE (other))) != 0) ! return x; ! assign = make_extraction (VOIDmode, dest, pos, 0, len, 1, 1, 0); ! /* The mode to use for the source is the mode of the assignment, or of ! what is inside a possible STRICT_LOW_PART. */ ! mode = (GET_CODE (assign) == STRICT_LOW_PART ! ? GET_MODE (XEXP (assign, 0)) : GET_MODE (assign)); ! /* Shift OTHER right POS places and make it the source, restricting it ! to the proper length and mode. */ ! src = force_to_mode (simplify_shift_const (0, LSHIFTRT, GET_MODE (src), ! other, pos), ! mode, len, dest); ! return gen_rtx_combine (SET, VOIDmode, assign, src); } *************** *** 4339,4354 **** lhs = XEXP (x, 0), rhs = XEXP (x, 1); ! /* If either operand is a primitive or a complex SUBREG, ! we can't do anything. */ if (GET_RTX_CLASS (GET_CODE (lhs)) == 'o' ! || GET_RTX_CLASS (GET_CODE (rhs)) == 'o' ! || (GET_CODE (lhs) == SUBREG ! && (! subreg_lowpart_p (lhs) ! || (GET_MODE_SIZE (GET_MODE (lhs)) ! >= GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs)))))) ! || (GET_CODE (rhs) == SUBREG ! && (! subreg_lowpart_p (rhs) ! || (GET_MODE_SIZE (GET_MODE (rhs)) ! >= GET_MODE_SIZE (GET_MODE (SUBREG_REG (rhs))))))) return x; --- 4540,4546 ---- lhs = XEXP (x, 0), rhs = XEXP (x, 1); ! /* If either operand is a primitive we can't do anything, so get out fast. */ if (GET_RTX_CLASS (GET_CODE (lhs)) == 'o' ! || GET_RTX_CLASS (GET_CODE (rhs)) == 'o') return x; *************** *** 4382,4388 **** case SUBREG: ! /* This distributes over all operations, provided the inner modes ! are the same, but we produce the result slightly differently. */ ! if (GET_MODE (SUBREG_REG (lhs)) != GET_MODE (SUBREG_REG (rhs))) return x; --- 4574,4593 ---- case SUBREG: ! /* Non-paradoxical SUBREGs distributes over all operations, provided ! the inner modes and word numbers are the same, this is an extraction ! of a low-order part, and we would not be converting a single-word ! operation into a multi-word operation. The latter test is not ! required, but we prevents generating unneeded multi-word operations. ! Some of the previous tests are redundant given the latter test, but ! are retained because they are required for correctness. ! ! We produce the result slightly differently in this case. */ ! ! if (GET_MODE (SUBREG_REG (lhs)) != GET_MODE (SUBREG_REG (rhs)) ! || SUBREG_WORD (lhs) != SUBREG_WORD (rhs) ! || ! subreg_lowpart_p (lhs) ! || (GET_MODE_SIZE (GET_MODE (lhs)) ! < GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs)))) ! || GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs))) > UNITS_PER_WORD) return x; *************** *** 5989,5993 **** include and explicit SUBREG or we may simplify it further in combine. */ else ! return gen_rtx (SUBREG, mode, x, 0); } --- 6194,6206 ---- include and explicit SUBREG or we may simplify it further in combine. */ else ! { ! int word = 0; ! ! if (WORDS_BIG_ENDIAN && GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD) ! word = ((GET_MODE_SIZE (GET_MODE (x)) ! - MAX (GET_MODE_SIZE (mode), UNITS_PER_WORD)) ! / UNITS_PER_WORD); ! return gen_rtx (SUBREG, mode, x, word); ! } } *************** *** 6120,6124 **** It is possible that we might detect that a comparison is either always true or always false. However, we do not perform general constant ! folding in combine, so this knowlege isn't useful. Such tautologies should have been detected earlier. Hence we ignore all such cases. */ --- 6333,6337 ---- It is possible that we might detect that a comparison is either always true or always false. However, we do not perform general constant ! folding in combine, so this knowledge isn't useful. Such tautologies should have been detected earlier. Hence we ignore all such cases. */ *************** *** 6552,6556 **** case PLUS: /* (eq (plus X C1) C2) -> (eq X (minus C2 C1)). We can only do ! this for equality comparisons due to pathalogical cases involving overflows. */ if (equality_comparison_p && GET_CODE (XEXP (op0, 1)) == CONST_INT --- 6765,6769 ---- case PLUS: /* (eq (plus X C1) C2) -> (eq X (minus C2 C1)). We can only do ! this for equality comparisons due to pathological cases involving overflows. */ if (equality_comparison_p && GET_CODE (XEXP (op0, 1)) == CONST_INT *************** *** 6742,6749 **** } ! /* If we are doing an LT or GE comparison, it means we are testing a particular bit. Convert it to the appropriate AND. */ ! if (const_op == 0 && sign_bit_comparison_p ! && GET_CODE (XEXP (op0, 1)) == CONST_INT && mode_width <= HOST_BITS_PER_INT) { --- 6955,6961 ---- } ! /* If we are doing a sign bit comparison, it means we are testing a particular bit. Convert it to the appropriate AND. */ ! if (sign_bit_comparison_p && GET_CODE (XEXP (op0, 1)) == CONST_INT && mode_width <= HOST_BITS_PER_INT) { *************** *** 6754,6757 **** --- 6966,6980 ---- continue; } + + /* If this an equality comparison with zero and we are shifting + the low bit to the sign bit, we can convert this to an AND of the + low-order bit. */ + if (const_op == 0 && equality_comparison_p + && GET_CODE (XEXP (op0, 1)) == CONST_INT + && INTVAL (XEXP (op0, 1)) == mode_width - 1) + { + op0 = simplify_and_const_int (0, mode, XEXP (op0, 0), 1); + continue; + } break; *************** *** 7433,7439 **** if (GET_CODE (body) == SET) return ((GET_CODE (SET_DEST (body)) == ZERO_EXTRACT ! && reg == XEXP (SET_DEST (body), 0)) || (GET_CODE (SET_DEST (body)) == STRICT_LOW_PART ! && reg == SUBREG_REG (XEXP (SET_DEST (body), 0)))); else if (GET_CODE (body) == PARALLEL) --- 7656,7662 ---- if (GET_CODE (body) == SET) return ((GET_CODE (SET_DEST (body)) == ZERO_EXTRACT ! && rtx_equal_p (reg, XEXP (SET_DEST (body), 0))) || (GET_CODE (SET_DEST (body)) == STRICT_LOW_PART ! && rtx_equal_p (reg, SUBREG_REG (XEXP (SET_DEST (body), 0))))); else if (GET_CODE (body) == PARALLEL) *************** *** 7599,7603 **** rtx set = single_set (tem); ! if (set != 0 && ! side_effects_p (SET_SRC (set))) { /* Move the notes and links of TEM elsewhere. --- 7822,7830 ---- rtx set = single_set (tem); ! /* Verify that it was the set, and not a clobber that ! modified the register. */ ! ! if (set != 0 && ! side_effects_p (SET_SRC (set)) ! && rtx_equal_p (XEXP (note, 0), SET_DEST (set))) { /* Move the notes and links of TEM elsewhere. *************** *** 7687,7690 **** --- 7914,7918 ---- place); + all_used = 0; REG_NOTES (use_insn) = gen_rtx (EXPR_LIST, REG_DEAD, piece, *************** *** 7735,7739 **** /* Similarly to above, distribute the LOG_LINKS that used to be present on ! I3, I2, and I1 to new locations. */ static void --- 7963,7968 ---- /* Similarly to above, distribute the LOG_LINKS that used to be present on ! I3, I2, and I1 to new locations. This is also called in one case to ! add a link pointing at I3 when I3's destination is changed. */ static void *************** *** 7778,7782 **** Note that this correctly handles the link that used to point from ! I3 to I2. Also note that not much seaching is typically done here since most links don't point very far away. */ --- 8007,8011 ---- Note that this correctly handles the link that used to point from ! I3 to I2. Also note that not much searching is typically done here since most links don't point very far away. */ diff -rc2N gcc-2.0/conditions.h gcc-2.1/conditions.h *** gcc-2.0/conditions.h Tue Dec 31 15:47:53 1991 --- gcc-2.1/conditions.h Sat Mar 14 00:01:16 1992 *************** *** 97,101 **** /* 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 arithmentic or logical insns can leave the condition codes set in a fortuitous (though inverted) state. */ --- 97,101 ---- /* 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. */ diff -rc2N gcc-2.0/config/3b1.h gcc-2.1/config/3b1.h *** gcc-2.0/config/3b1.h Mon Dec 23 22:55:44 1991 --- gcc-2.1/config/3b1.h Tue Mar 10 19:00:31 1992 *************** *** 23,27 **** the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - #define SGS_SWAP_W /* Use swap.w rather than just plain swap */ #define SGS_SWITCH_TABLES /* Different switch table handling */ --- 23,26 ---- *************** *** 102,105 **** --- 101,108 ---- #define __INT_TO_PTR(P) ((char *)(P)) + /* The 3b1 does not have `atexit'. */ + + #undef HAVE_ATEXIT + /* Override parts of m68k.h to fit the SGS-3b1 assembler. */ *************** *** 378,381 **** --- 381,389 ---- { putc (*(PTR), (FILE)); ++(PTR); } \ fprintf ((FILE), ".w"); } \ + else if ((PTR)[0] == 's') \ + { \ + if (!strncmp ((PTR), "swap", 4)) \ + { fprintf ((FILE), "swap.w"); (PTR) += 4; } \ + } \ else if ((PTR)[0] == 'f') \ { \ *************** *** 389,394 **** && (PTR)[2] == 'v' && (PTR)[3] == 'e') \ { fprintf ((FILE), "mov"); (PTR) += 4; \ ! if ((PTR)[0] == 'q' || (PTR)[0] == 'a' || \ ! (PTR)[0] == 'c') (PTR)++; } \ /* SUB, SUBQ, SUBA, SUBI ==> SUB */ \ else if ((PTR)[0] == 's' && (PTR)[1] == 'u' \ --- 397,402 ---- && (PTR)[2] == 'v' && (PTR)[3] == 'e') \ { fprintf ((FILE), "mov"); (PTR) += 4; \ ! if ((PTR)[0] == 'q' || (PTR)[0] == 'a' \ ! || (PTR)[0] == 'c') (PTR)++; } \ /* SUB, SUBQ, SUBA, SUBI ==> SUB */ \ else if ((PTR)[0] == 's' && (PTR)[1] == 'u' \ *************** *** 395,400 **** && (PTR)[2] == 'b') \ { fprintf ((FILE), "sub"); (PTR) += 3; \ ! if ((PTR)[0] == 'q' || (PTR)[0] == 'i' || \ ! (PTR)[0] == 'a') (PTR)++; } \ /* CMP, CMPA, CMPI, CMPM ==> CMP */ \ else if ((PTR)[0] == 'c' && (PTR)[1] == 'm' \ --- 403,408 ---- && (PTR)[2] == 'b') \ { fprintf ((FILE), "sub"); (PTR) += 3; \ ! if ((PTR)[0] == 'q' || (PTR)[0] == 'i' \ ! || (PTR)[0] == 'a') (PTR)++; } \ /* CMP, CMPA, CMPI, CMPM ==> CMP */ \ else if ((PTR)[0] == 'c' && (PTR)[1] == 'm' \ *************** *** 401,406 **** && (PTR)[2] == 'p') \ { fprintf ((FILE), "cmp"); (PTR) += 3; \ ! if ((PTR)[0] == 'a' || (PTR)[0] == 'i' || \ ! (PTR)[0] == 'm') (PTR)++; } \ } --- 409,414 ---- && (PTR)[2] == 'p') \ { fprintf ((FILE), "cmp"); (PTR) += 3; \ ! if ((PTR)[0] == 'a' || (PTR)[0] == 'i' \ ! || (PTR)[0] == 'm') (PTR)++; } \ } diff -rc2N gcc-2.0/config/a29k.h gcc-2.1/config/a29k.h *** gcc-2.0/config/a29k.h Sun Feb 9 00:09:11 1992 --- gcc-2.1/config/a29k.h Mon Mar 16 04:39:35 1992 *************** *** 100,104 **** #define TARGET_DEFAULT 3 ! /* Define this to change the optimizations peformed by default. */ #define OPTIMIZATION_OPTIONS(LEVEL) \ --- 100,104 ---- #define TARGET_DEFAULT 3 ! /* Define this to change the optimizations performed by default. */ #define OPTIMIZATION_OPTIONS(LEVEL) \ *************** *** 142,146 **** #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 142,146 ---- #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 173,176 **** --- 173,179 ---- #define STRUCTURE_SIZE_BOUNDARY 8 + /* A bitfield declared as `int' forces `int' alignment for the struct. */ + #define PCC_BITFIELD_TYPE_MATTERS 1 + /* No data type wants to be aligned rounder than this. */ #define BIGGEST_ALIGNMENT 32 *************** *** 187,198 **** && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! /* #define STRICT_ALIGNMENT */ ! /* Define this if unaligned move instructions are extremely slow. On the 29k, they trap. */ ! #define SLOW_UNALIGNED_ACCESS /* Standard register usage. */ --- 190,201 ---- && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ! /* Set this non-zero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 0 ! /* Set this non-zero if unaligned move instructions are extremely slow. On the 29k, they trap. */ ! #define SLOW_UNALIGNED_ACCESS 1 /* Standard register usage. */ *************** *** 1274,1286 **** /* Output before instructions. */ ! #define TEXT_SECTION_ASM_OP "\t.text" /* Output before read-only data. */ ! #define READONLY_DATA_SECTION_ASM_OP "\t.use .lit" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP "\t.data" /* Define an extra section for read-only data, a routine to enter it, and --- 1277,1289 ---- /* Output before instructions. */ ! #define TEXT_SECTION_ASM_OP ".text" /* Output before read-only data. */ ! #define READONLY_DATA_SECTION_ASM_OP ".use .lit" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP ".data" /* Define an extra section for read-only data, a routine to enter it, and diff -rc2N gcc-2.0/config/a29k.md gcc-2.1/config/a29k.md *** gcc-2.0/config/a29k.md Tue Feb 18 07:47:03 1992 --- gcc-2.1/config/a29k.md Sat Mar 14 00:15:21 1992 *************** *** 24,28 **** ;; User's Manual (i.e., alphabetical by machine op-code). ;; ! ;; DEFINE_EXPAND's are located near the first occurrance of the major insn ;; that they generate. --- 24,28 ---- ;; User's Manual (i.e., alphabetical by machine op-code). ;; ! ;; DEFINE_EXPAND's are located near the first occurrence of the major insn ;; that they generate. diff -rc2N gcc-2.0/config/aix386.h gcc-2.1/config/aix386.h *** gcc-2.0/config/aix386.h Tue Jan 21 21:56:06 1992 --- gcc-2.1/config/aix386.h Thu Mar 19 15:42:02 1992 *************** *** 110,115 **** fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED))) ! /* Define a few machine-specific details ! of the implementation of constructors. */ #undef INIT_SECTION_ASM_OP --- 110,115 ---- fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED))) ! /* Define a few machine-specific details of the implementation of ! constructors. */ #undef INIT_SECTION_ASM_OP *************** *** 116,123 **** #define INIT_SECTION_ASM_OP ".section .init,\"x\"" ! #define CTORS_SECTION_ASM_OP \ ! INIT_SECTION_ASM_OP "\n" \ ! "\tpushl $0\n\t" \ ! DATA_SECTION_ASM_OP #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ --- 116,123 ---- #define INIT_SECTION_ASM_OP ".section .init,\"x\"" ! #define CTOR_LIST_BEGIN \ ! asm (INIT_SECTION_ASM_OP); \ ! asm ("pushl $0") ! #define CTOR_LIST_END CTOR_LIST_BEGIN #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ diff -rc2N gcc-2.0/config/arm.c gcc-2.1/config/arm.c *** gcc-2.0/config/arm.c Tue Aug 27 16:49:33 1991 --- gcc-2.1/config/arm.c Sat Mar 14 00:15:24 1992 *************** *** 171,175 **** /* Return TRUE for a valid operand of a DImode operation. ! Either: REG, CONST_DOUBLE or MEM(offsetable). Note that this disallows MEM(REG+REG). */ --- 171,175 ---- /* Return TRUE for a valid operand of a DImode operation. ! Either: REG, CONST_DOUBLE or MEM(offsettable). Note that this disallows MEM(REG+REG). */ *************** *** 333,337 **** /* Output a move between double words. It must be REG<-REG, REG<-CONST_DOUBLE, REG<-CONST_INT, REG<-MEM ! or MEM<-REG and all MEMs must be offsetable addresses. */ char * --- 333,337 ---- /* Output a move between double words. It must be REG<-REG, REG<-CONST_DOUBLE, REG<-CONST_INT, REG<-MEM ! or MEM<-REG and all MEMs must be offsettable addresses. */ char * *************** *** 394,398 **** { otherops[1] = adj_offsettable_operand (operands[1], 4); ! /* Take care of overlaping base/data reg. */ if (reg_mentioned_p (operands[0], operands[1])) { --- 394,398 ---- { otherops[1] = adj_offsettable_operand (operands[1], 4); ! /* Take care of overlapping base/data reg. */ if (reg_mentioned_p (operands[0], operands[1])) { *************** *** 1085,1089 **** bss segment directly. ! XXX This is a severe hack, which is garanteed NOT to work since it doesn't define STATIC COMMON space but merely STATIC BSS space. */ --- 1085,1089 ---- bss segment directly. ! XXX This is a severe hack, which is guaranteed NOT to work since it doesn't define STATIC COMMON space but merely STATIC BSS space. */ *************** *** 1104,1108 **** /* A finite state machine takes care of noticing whether or not instructions ! can be conditionaly executed, and thus decrease execution time and code size by deleting branch instructions. The fsm is controlled by final_prescan_insn, and controls the actions of ASM_OUTPUT_OPCODE. */ --- 1104,1108 ---- /* A finite state machine takes care of noticing whether or not instructions ! can be conditionally executed, and thus decrease execution time and code size by deleting branch instructions. The fsm is controlled by final_prescan_insn, and controls the actions of ASM_OUTPUT_OPCODE. */ diff -rc2N gcc-2.0/config/arm.h gcc-2.1/config/arm.h *** gcc-2.0/config/arm.h Tue Jan 21 17:47:13 1992 --- gcc-2.1/config/arm.h Mon Mar 16 04:40:11 1992 *************** *** 89,95 **** matter for the final code. */ #ifdef riscos ! #define TARGET_WHEN_DEBUGING 3 #else ! #define TARGET_WHEN_DEBUGING 1 #endif --- 89,95 ---- matter for the final code. */ #ifdef riscos ! #define TARGET_WHEN_DEBUGGING 3 #else ! #define TARGET_WHEN_DEBUGGING 1 #endif *************** *** 97,101 **** { \ if (write_symbols != NO_DEBUG) \ ! target_flags |= TARGET_WHEN_DEBUGING; \ else if (TARGET_POKE_FUNCTION_NAME) \ target_flags |= 1; \ --- 97,101 ---- { \ if (write_symbols != NO_DEBUG) \ ! target_flags |= TARGET_WHEN_DEBUGGING; \ else if (TARGET_POKE_FUNCTION_NAME) \ target_flags |= 1; \ *************** *** 126,130 **** #define WORDS_BIG_ENDIAN 0 ! /* Number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 126,130 ---- #define WORDS_BIG_ENDIAN 0 ! /* Number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 333,337 **** C is the letter, and VALUE is a constant value. Return 1 if VALUE is in the range specified by C. ! I: immediate arithmetic operand (i.e. 8 bits shifted as requried). J: valid indexing constants. */ #define CONST_OK_FOR_LETTER_P(VALUE, C) \ --- 333,337 ---- C is the letter, and VALUE is a constant value. Return 1 if VALUE is in the range specified by C. ! I: immediate arithmetic operand (i.e. 8 bits shifted as required). J: valid indexing constants. */ #define CONST_OK_FOR_LETTER_P(VALUE, C) \ *************** *** 339,343 **** (C) == 'J' ? (abs (VALUE) < 4096) : 0) ! /* Constaint letter 'G' for the FPU immediate constants. */ #define CONST_DOUBLE_OK_FOR_LETTER_P(X,C) \ ((C) == 'G' ? const_double_rtx_ok_for_fpu (X) : 0) --- 339,343 ---- (C) == 'J' ? (abs (VALUE) < 4096) : 0) ! /* Constant letter 'G' for the FPU immediate constants. */ #define CONST_DOUBLE_OK_FOR_LETTER_P(X,C) \ ((C) == 'G' ? const_double_rtx_ok_for_fpu (X) : 0) *************** *** 975,980 **** /* Switch to the text or data segment. */ ! #define TEXT_SECTION_ASM_OP "\n\t.text\n" ! #define DATA_SECTION_ASM_OP "\n\t.data\n" /* The assembler's names for the registers. RFP need not always be used as --- 975,980 ---- /* Switch to the text or data segment. */ ! #define TEXT_SECTION_ASM_OP ".text" ! #define DATA_SECTION_ASM_OP ".data" /* The assembler's names for the registers. RFP need not always be used as *************** *** 1167,1171 **** int i; \ \ ! fflush (STREAM); /* XXX for dubugging only. */ \ if (arm_ccfsm_state == 1 || arm_ccfsm_state == 2) \ { \ --- 1167,1171 ---- int i; \ \ ! fflush (STREAM); /* XXX for debugging only. */ \ if (arm_ccfsm_state == 1 || arm_ccfsm_state == 2) \ { \ diff -rc2N gcc-2.0/config/arm.md gcc-2.1/config/arm.md *** gcc-2.0/config/arm.md Mon Jan 6 12:01:24 1992 --- gcc-2.1/config/arm.md Sat Mar 14 00:15:27 1992 *************** *** 521,525 **** ") ! ;; Zero extention instructions. (define_expand "zero_extendhisi2" --- 521,525 ---- ") ! ;; Zero extension instructions. (define_expand "zero_extendhisi2" diff -rc2N gcc-2.0/config/convex.h gcc-2.1/config/convex.h *** gcc-2.0/config/convex.h Wed Feb 12 18:44:20 1992 --- gcc-2.1/config/convex.h Sat Mar 14 00:15:29 1992 *************** *** 113,117 **** #define WORDS_BIG_ENDIAN 1 ! /* Number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 113,117 ---- #define WORDS_BIG_ENDIAN 1 ! /* Number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 151,157 **** #define BIGGEST_ALIGNMENT 32 ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! /* #define STRICT_ALIGNMENT */ /* Define sizes of basic C types to conform to ordinary usage -- these --- 151,157 ---- #define BIGGEST_ALIGNMENT 32 ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 0 /* Define sizes of basic C types to conform to ordinary usage -- these diff -rc2N gcc-2.0/config/crds.h gcc-2.1/config/crds.h *** gcc-2.0/config/crds.h Sat Jan 18 23:47:58 1992 --- gcc-2.1/config/crds.h Fri Mar 20 14:11:46 1992 *************** *** 256,260 **** '#' for an immediate operand prefix (# in MIT and Motorola syntax but & in SGS syntax, $ in unos syntax). ! '!' for the cc register (used in an `and to cc' insn). 'b' for byte insn (no effect, on the Sun; this is for the ISI). --- 256,260 ---- '#' for an immediate operand prefix (# in MIT and Motorola syntax but & in SGS syntax, $ in unos syntax). ! '!' for the fpcr register (used in some float-to-fixed conversions). 'b' for byte insn (no effect, on the Sun; this is for the ISI). *************** *** 282,286 **** else if (CODE == '+') fprintf (FILE, "(sp)+"); \ else if (CODE == '@') fprintf (FILE, "(sp)"); \ ! else if (CODE == '!') fprintf (FILE, "cc"); \ else if (GET_CODE (X) == REG) \ { if (REGNO (X) < 16 && (CODE == 'y' || CODE == 'x') && GET_MODE (X) == DFmode) \ --- 282,286 ---- else if (CODE == '+') fprintf (FILE, "(sp)+"); \ else if (CODE == '@') fprintf (FILE, "(sp)"); \ ! else if (CODE == '!') fprintf (FILE, "fpcr"); \ else if (GET_CODE (X) == REG) \ { if (REGNO (X) < 16 && (CODE == 'y' || CODE == 'x') && GET_MODE (X) == DFmode) \ diff -rc2N gcc-2.0/config/decrose.h gcc-2.1/config/decrose.h *** gcc-2.0/config/decrose.h Fri Feb 21 17:04:24 1992 --- gcc-2.1/config/decrose.h Sat Mar 21 12:03:44 1992 *************** *** 30,34 **** %{EL} %{!EL:-EL} \ %{EB: %e-EB not supported} \ ! %{!mrnames: -nocpp} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g0} %{g1} %{g2} %{g3} \ --- 30,35 ---- %{EL} %{!EL:-EL} \ %{EB: %e-EB not supported} \ ! %{!mrnames: %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}}} \ ! %{mips1} %{mips2} %{mips3} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g0} %{g1} %{g2} %{g3} \ *************** *** 58,61 **** --- 59,63 ---- %{EL} %{!EL: -EL} \ %{EB: %e-EB not supported} \ + %{mips1} %{mips2} %{mips3} \ %{bestGnum}} \ %{!mmips-as: \ diff -rc2N gcc-2.0/config/decstabs.h gcc-2.1/config/decstabs.h *** gcc-2.0/config/decstabs.h --- gcc-2.1/config/decstabs.h Sat Mar 21 13:47:08 1992 *************** *** 0 **** --- 1,22 ---- + /* Definitions of target machine for GNU compiler. DECstation (ultrix) version + using encapsulated stabs. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #include "decstatn.h" diff -rc2N gcc-2.0/config/decstatn.h gcc-2.1/config/decstatn.h *** gcc-2.0/config/decstatn.h Wed Feb 12 10:37:30 1992 --- gcc-2.1/config/decstatn.h Sat Mar 21 12:01:55 1992 *************** *** 25,32 **** #define ASM_SPEC "\ %{!mgas: \ ! %{!mrnames: -nocpp} \ %{pipe:%e:-pipe not supported} \ %{EL} %{!EL:-EL} \ %{EB: %e-EB not supported} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K}} \ --- 25,33 ---- #define ASM_SPEC "\ %{!mgas: \ ! %{!mrnames: %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}}} \ %{pipe:%e:-pipe not supported} \ %{EL} %{!EL:-EL} \ %{EB: %e-EB not supported} \ + %{mips1} %{mips2} %{mips3} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K}} \ *************** *** 46,49 **** --- 47,51 ---- %{EL} %{!EL: -EL} \ %{EB: %e-EB not supported} \ + %{mips1} %{mips2} %{mips3} \ %{bestGnum}}" diff -rc2N gcc-2.0/config/encore.h gcc-2.1/config/encore.h *** gcc-2.0/config/encore.h Thu Dec 5 21:11:44 1991 --- gcc-2.1/config/encore.h Fri Mar 13 17:34:08 1992 *************** *** 21,29 **** ! /* ! * Looks like all multiprocessors have this bug! ! */ ! ! #define SEQUENT_ADDRESS_BUG 1 #include "ns32k.h" --- 21,26 ---- ! #define EXTERNAL_PREFIX '?' ! #define IMMEDIATE_PREFIX '$' #include "ns32k.h" *************** *** 54,58 **** #undef ASM_OUTPUT_LABELREF_AS_INT ! #define TARGET_DEFAULT 25 /* 32532 with 32081 (guessing) */ #define TARGET_VERSION fprintf (stderr, " (32000, Encore syntax)"); /* Note Encore does not standardly do -Dencore. */ --- 51,55 ---- #undef ASM_OUTPUT_LABELREF_AS_INT ! #define TARGET_DEFAULT 9 /* 32332 with 32081. */ #define TARGET_VERSION fprintf (stderr, " (32000, Encore syntax)"); /* Note Encore does not standardly do -Dencore. */ *************** *** 148,151 **** --- 145,150 ---- } + #define NO_ABSOLUTE_PREFIX_IF_SYMBOLIC + /* * Dollar signs are required before immediate operands, double *************** *** 239,240 **** --- 238,241 ---- #define FUNCTION_PROFILER(FILE, LABELNO) \ fprintf (FILE, "\taddr .LP%d,r0\n\tjsr mcount\n", (LABELNO)) + + #define ENCORE_ASM diff -rc2N gcc-2.0/config/fx80.h gcc-2.1/config/fx80.h *** gcc-2.0/config/fx80.h Sat Jan 4 03:28:46 1992 --- gcc-2.1/config/fx80.h Mon Mar 16 04:40:39 1992 *************** *** 139,143 **** #define WORDS_BIG_ENDIAN 0 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 139,143 ---- #define WORDS_BIG_ENDIAN 0 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 170,176 **** #define BIGGEST_ALIGNMENT 16 ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT /* Define number of bits in most basic integer type. --- 170,176 ---- #define BIGGEST_ALIGNMENT 16 ! /* Set this non-zero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 1 /* Define number of bits in most basic integer type. *************** *** 1027,1035 **** /* Output before read-only data. */ ! #define TEXT_SECTION_ASM_OP "\t.text" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP "\t.data" /* How to refer to registers in assembler output. --- 1027,1035 ---- /* Output before read-only data. */ ! #define TEXT_SECTION_ASM_OP ".text" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP ".data" /* How to refer to registers in assembler output. diff -rc2N gcc-2.0/config/gmicro.h gcc-2.1/config/gmicro.h *** gcc-2.0/config/gmicro.h Sun Jan 19 00:08:50 1992 --- gcc-2.1/config/gmicro.h Mon Mar 16 04:41:03 1992 *************** *** 137,141 **** #define WORDS_BIG_ENDIAN 0 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 137,141 ---- #define WORDS_BIG_ENDIAN 0 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 168,177 **** #define BIGGEST_ALIGNMENT 32 ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! /* Unaligned data is allowed on Gmicro, though the access is slow. */ ! /* But now STRICT is defined */ ! #define STRICT_ALIGNMENT /* Make strings word-aligned so strcpy from constants will be faster. */ #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ --- 168,178 ---- #define BIGGEST_ALIGNMENT 32 ! /* Set this non-zero if move instructions will actually fail to work when given unaligned data. */ ! Unaligned data is allowed on Gmicro, though the access is slow. */ + #define STRICT_ALIGNMENT 1 + #define SLOW_UNALIGNED_ACCESS 1 + /* Make strings word-aligned so strcpy from constants will be faster. */ #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ *************** *** 370,374 **** machine description; we zorch the constraint letters that aren't appropriate for a specific target. This allows us to guarantee ! that a specific kind of register will not be used for a given taget without fiddling with the register classes above. */ --- 371,375 ---- machine description; we zorch the constraint letters that aren't appropriate for a specific target. This allows us to guarantee ! that a specific kind of register will not be used for a given target without fiddling with the register classes above. */ *************** *** 385,389 **** For the Gmicro, all immediate value optimizations are done ! by assember, so no machine dependent definition is necessary ??? */ /* #define CONST_OK_FOR_LETTER_P(VALUE, C) ((C) == 'I') */ --- 386,390 ---- For the Gmicro, all immediate value optimizations are done ! by assembler, so no machine dependent definition is necessary ??? */ /* #define CONST_OK_FOR_LETTER_P(VALUE, C) ((C) == 'I') */ *************** *** 403,407 **** In general this is just CLASS; but on some machines in some cases it is preferable to use a more restrictive class. */ ! /* On the Gmicro series, there is no restricton on GENERAL_REGS, so CLASS is returned. I do not know whether I should treat FPU_REGS specially or not (at least, m68k does not). */ --- 404,408 ---- In general this is just CLASS; but on some machines in some cases it is preferable to use a more restrictive class. */ ! /* On the Gmicro series, there is no restriction on GENERAL_REGS, so CLASS is returned. I do not know whether I should treat FPU_REGS specially or not (at least, m68k does not). */ *************** *** 439,443 **** /* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. */ ! /* On the Gmicro, sp is decrimented by the exact size of the operand */ #define PUSH_ROUNDING(BYTES) (BYTES) --- 440,444 ---- /* If we generate an insn to push BYTES bytes, this says how many the stack pointer really advances by. */ ! /* On the Gmicro, sp is decremented by the exact size of the operand */ #define PUSH_ROUNDING(BYTES) (BYTES) *************** *** 1216,1220 **** #define NOTICE_UPDATE_CC(EXP, INSN) {CC_STATUS_INIT;} ! /* The skelton of the next macro is taken from "vax.h". FPU-reg manipulation is added. M.Yuhara */ /* Now comment out. --- 1217,1221 ---- #define NOTICE_UPDATE_CC(EXP, INSN) {CC_STATUS_INIT;} ! /* The skeleton of the next macro is taken from "vax.h". FPU-reg manipulation is added. M.Yuhara */ /* Now comment out. *************** *** 1269,1281 **** /* Output before read-only data. */ ! #define TEXT_SECTION_ASM_OP "\t.section text,code,align=4" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP "\t.section data,data,align=4" /* Output before uninitialized data. */ ! #define BSS_SECTION_ASM_OP "\t.section bss,data,align=4" #define EXTRA_SECTIONS in_bss --- 1270,1282 ---- /* Output before read-only data. */ ! #define TEXT_SECTION_ASM_OP ".section text,code,align=4" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP ".section data,data,align=4" /* Output before uninitialized data. */ ! #define BSS_SECTION_ASM_OP ".section bss,data,align=4" #define EXTRA_SECTIONS in_bss diff -rc2N gcc-2.0/config/gmicro.md gcc-2.1/config/gmicro.md *** gcc-2.0/config/gmicro.md Mon Nov 25 21:48:26 1991 --- gcc-2.1/config/gmicro.md Sat Mar 14 00:15:35 1992 *************** *** 771,775 **** ;; experiment on the built-in strcpy (__builtin_smov) ;; ! ;; len = 0 means unkown string length. ;; ;; mem:SI is dummy. Necessary so as not to be deleted by optimization. --- 771,775 ---- ;; experiment on the built-in strcpy (__builtin_smov) ;; ! ;; len = 0 means unknown string length. ;; ;; mem:SI is dummy. Necessary so as not to be deleted by optimization. *************** *** 2181,2185 **** ;; bitfield instructions are not applicable to registers ;-< ;; But I write the register cases, because without them the gcc ! ;; seems to use "and" instructon with some other instructions ;; instead of using a shift instruction. ;; It is because on many processors shift instructions are slower. --- 2181,2185 ---- ;; bitfield instructions are not applicable to registers ;-< ;; But I write the register cases, because without them the gcc ! ;; seems to use "and" instruction with some other instructions ;; instead of using a shift instruction. ;; It is because on many processors shift instructions are slower. diff -rc2N gcc-2.0/config/hp320.h gcc-2.1/config/hp320.h *** gcc-2.0/config/hp320.h Sat Feb 22 02:13:22 1992 --- gcc-2.1/config/hp320.h Fri Mar 20 14:10:00 1992 *************** *** 32,35 **** --- 32,42 ---- #define SGS_CMP_ORDER /* Takes cmp operands in reverse order */ #define HPUX_ASM + + /* gcc.c should find libgcc.a itself rather than expecting linker to. */ + #define LINK_LIBGCC_SPECIAL + /* The arguments of -L must be a separate argv element. */ + #define SPACE_AFTER_L_OPTION + /* HP/UX doesn't have libg.a. */ + #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" #endif *************** *** 96,102 **** "%{m68000:-mc68000}%{mc68000:-mc68000}%{!mc68000:%{!m68000:-mc68020}}" - /* special directory for gnu libs on hp-ux system */ - #define MD_STARTFILE_PREFIX "/usr/local/lib/gnu/" - /* Tell GCC to put a space after -L when generating such options. */ #define SPACE_AFTER_L_OPTION --- 103,106 ---- *************** *** 289,293 **** #define DATA_SECTION_ASM_OP "data" ! #define ASCII_DATA_ASM_OP "\tbyte" /* This says how to output an assembler line --- 293,297 ---- #define DATA_SECTION_ASM_OP "data" ! #define ASCII_DATA_ASM_OP "byte" /* This says how to output an assembler line *************** *** 382,386 **** else if (CODE == '+') fprintf (FILE, "(%%sp)+"); \ else if (CODE == '@') fprintf (FILE, "(%%sp)"); \ ! else if (CODE == '!') fprintf (FILE, "%%cc"); \ else if (CODE == '$') { if (TARGET_68040_ONLY) fprintf (FILE, "s"); } \ else if (CODE == '&') { if (TARGET_68040_ONLY) fprintf (FILE, "d"); } \ --- 386,390 ---- else if (CODE == '+') fprintf (FILE, "(%%sp)+"); \ else if (CODE == '@') fprintf (FILE, "(%%sp)"); \ ! else if (CODE == '!') fprintf (FILE, "%%fpcr"); \ else if (CODE == '$') { if (TARGET_68040_ONLY) fprintf (FILE, "s"); } \ else if (CODE == '&') { if (TARGET_68040_ONLY) fprintf (FILE, "d"); } \ *************** *** 554,558 **** inside = FALSE; \ } \ ! fprintf((f), "%s ", ASCII_DATA_ASM_OP); \ } \ if ((p)[i] < 32 || (p)[i] == '\\' || (p)[i] == '"' || (p)[i] == 127) { \ --- 558,562 ---- inside = FALSE; \ } \ ! fprintf((f), "\t%s ", ASCII_DATA_ASM_OP); \ } \ if ((p)[i] < 32 || (p)[i] == '\\' || (p)[i] == '"' || (p)[i] == 127) { \ diff -rc2N gcc-2.0/config/hp800.c gcc-2.1/config/hp800.c *** gcc-2.0/config/hp800.c Wed Feb 5 19:01:15 1992 --- gcc-2.1/config/hp800.c Thu Mar 19 14:15:26 1992 *************** *** 1,5 **** /* Subroutines for insn-output.c for HPPA. Copyright (C) 1992 Free Software Foundation, Inc. ! Contributed by Tim Moore (moore@cs.utah.edu), based on out-sparc.c This file is part of GNU CC. --- 1,5 ---- /* Subroutines for insn-output.c for HPPA. Copyright (C) 1992 Free Software Foundation, Inc. ! Contributed by Tim Moore (moore@cs.utah.edu), based on sparc.c This file is part of GNU CC. *************** *** 33,36 **** --- 33,37 ---- #include "tree.h" #include "c-tree.h" + #include "expr.h" /* Save the operands last given to a compare for use when we *************** *** 40,43 **** --- 41,47 ---- enum cmp_type hppa_branch_type; + /* Set by the FUNCTION_PROFILER macro. */ + int hp_profile_labelno; + /* Global variables set by FUNCTION_PROLOGUE. */ /* Size of frame. Need to know this to emit return insns from *************** *** 45,48 **** --- 49,53 ---- int apparent_fsize; int actual_fsize; + int local_fsize, save_fregs; /* Name of where we pretend to think the frame pointer points. *************** *** 238,244 **** } ! /* Return truth value of whether OP can be used as an operands in a three ! address arithmetic insn (such as add %o1,7,%l2) of mode MODE. */ ! int arith_operand (op, mode) --- 243,249 ---- } ! /* Return truth value of whether OP can be used as an operand in a ! three operand arithmetic insn that accepts registers of mode MODE ! or 14-bit signed integers. */ int arith_operand (op, mode) *************** *** 250,253 **** --- 255,270 ---- } + /* Return truth value of whether OP can be used as an operand in a + three operand arithmetic insn that accepts registers of mode MODE + or 11-bit signed integers. */ + int + arith11_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return (register_operand (op, mode) + || (GET_CODE (op) == CONST_INT && INT_11_BITS (op))); + } + int arith_double_operand (op, mode) *************** *** 516,520 **** && !read_only_operand (XEXP (operand1, 0))) { ! rtx temp = reload_in_progress ? operand0 : gen_reg_rtx(mode); emit_insn (gen_rtx (SET, VOIDmode, temp, operand1)); --- 533,537 ---- && !read_only_operand (XEXP (operand1, 0))) { ! rtx temp = reload_in_progress ? operand0 : gen_reg_rtx (mode); emit_insn (gen_rtx (SET, VOIDmode, temp, operand1)); *************** *** 641,645 **** rtx *operands; { ! enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype0, optype1; rtx latehalf[2]; rtx addreg0 = 0, addreg1 = 0; --- 658,662 ---- rtx *operands; { ! enum { REGOP, OFFSOP, MEMOP, CNSTOP, RNDOP } optype0, optype1; rtx latehalf[2]; rtx addreg0 = 0, addreg1 = 0; *************** *** 658,663 **** if (REG_P (operands[1])) optype1 = REGOP; ! else if (CONSTANT_P (operands[1]) ! || GET_CODE (operands[1]) == CONST_DOUBLE) optype1 = CNSTOP; else if (offsettable_memref_p (operands[1])) --- 675,679 ---- if (REG_P (operands[1])) optype1 = REGOP; ! else if (CONSTANT_P (operands[1])) optype1 = CNSTOP; else if (offsettable_memref_p (operands[1])) *************** *** 672,678 **** because generating code for these cases is painful. */ ! if (optype0 == RNDOP || optype1 == RNDOP) abort (); /* If an operand is an unoffsettable memory ref, find a register we can increment temporarily to make it refer to the second word. */ --- 688,772 ---- because generating code for these cases is painful. */ ! if (optype0 != REGOP && optype1 != REGOP) abort (); + /* Handle auto decrementing and incrementing loads and stores + specifically, since the structure of the function doesn't work + for them without major modification. Do it better when we learn + this port about the general inc/dec addressing of PA. + (This was written by tege. Chide him if it doesn't work.) */ + + if (optype0 == MEMOP) + { + rtx addr = XEXP (operands[0], 0); + if (GET_CODE (addr) == POST_INC || GET_CODE (addr) == POST_DEC + || GET_CODE (addr) == PRE_INC || GET_CODE (addr) == PRE_DEC) + { + operands[0] = gen_rtx (MEM, SImode, addr); + return "stw%M0 %1,%0\n\tstw%M0 %1,%0"; + } + } + if (optype1 == MEMOP) + { + /* We have to output the address syntax ourselves, since print_operand + doesn't deal with the addresses we want to use. Fix this later. */ + + rtx addr = XEXP (operands[1], 0); + if (GET_CODE (addr) == POST_INC || GET_CODE (addr) == POST_DEC) + { + rtx high_reg = gen_rtx (SUBREG, SImode, operands[0], 0); + + operands[1] = XEXP (addr, 0); + if (GET_CODE (operands[0]) != REG || GET_CODE (operands[1]) != REG) + abort (); + + if (!reg_overlap_mentioned_p (high_reg, addr)) + { + /* No overlap between high target register and address + register. (We do this in an non-obious way to + save a register file writeback) */ + if (GET_CODE (addr) == POST_INC) + return "ldws,ma 8(0,%1),%0\n\tldw -4(0,%1),%R0"; + return "ldws,ma -8(0,%1),%0\n\tldw 12(0,%1),%R0"; + } + else + { + /* This is an undefined situation. We should load into the + address register *and* update that register. Probably + we don't need to handle this at all. */ + if (GET_CODE (addr) == POST_INC) + return "ldw 4(0,%1),%R0\n\tldws,ma 8(0,%1),%0"; + return "ldw 4(0,%1),%R0\n\tldws,ma -8(0,%1),%0"; + } + } + else if (GET_CODE (addr) == PRE_INC || GET_CODE (addr) == PRE_DEC) + { + rtx high_reg = gen_rtx (SUBREG, SImode, operands[0], 0); + + operands[1] = XEXP (addr, 0); + if (GET_CODE (operands[0]) != REG || GET_CODE (operands[1]) != REG) + abort (); + + if (!reg_overlap_mentioned_p (high_reg, addr)) + { + /* No overlap between high target register and address + register. (We do this in an non-obious way to + save a register file writeback) */ + if (GET_CODE (addr) == PRE_INC) + return "ldws,mb 8(0,%1),%0\n\tldw 4(0,%1),%R0"; + return "ldws,mb -8(0,%1),%0\n\tldw 4(0,%1),%R0"; + } + else + { + /* This is an undefined situation. We should load into the + address register *and* update that register. Probably + we don't need to handle this at all. */ + if (GET_CODE (addr) == PRE_INC) + return "ldw 12(0,%1),%R0\n\tldws,mb 8(0,%1),%0"; + return "ldw -4(0,%1),%R0\n\tldws,mb -8(0,%1),%0"; + } + } + } + /* If an operand is an unoffsettable memory ref, find a register we can increment temporarily to make it refer to the second word. */ *************** *** 679,691 **** if (optype0 == MEMOP) ! addreg0 = find_addr_reg (operands[0]); if (optype1 == MEMOP) ! addreg1 = find_addr_reg (operands[1]); /* Ok, we can do one word at a time. ! Normally we do the low-numbered word first, ! but if either operand is autodecrementing then we ! do the high-numbered word first. In either case, set up in LATEHALF the operands to use --- 773,783 ---- if (optype0 == MEMOP) ! addreg0 = find_addr_reg (XEXP (operands[0], 0)); if (optype1 == MEMOP) ! addreg1 = find_addr_reg (XEXP (operands[1], 0)); /* Ok, we can do one word at a time. ! Normally we do the low-numbered word first. In either case, set up in LATEHALF the operands to use *************** *** 705,719 **** latehalf[1] = adj_offsettable_operand (operands[1], 4); else if (optype1 == CNSTOP) ! { ! if (CONSTANT_P (operands[1])) ! latehalf[1] = const0_rtx; ! else if (GET_CODE (operands[1]) == CONST_DOUBLE) ! { ! latehalf[1] = gen_rtx (CONST_INT, VOIDmode, ! XINT (operands[1], 1)); ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! XINT (operands[1], 0)); ! } ! } else latehalf[1] = operands[1]; --- 797,801 ---- latehalf[1] = adj_offsettable_operand (operands[1], 4); else if (optype1 == CNSTOP) ! split_double (operands[1], &operands[1], &latehalf[1]); else latehalf[1] = operands[1]; *************** *** 726,730 **** sets it up, and that is an undefined circumstance." ! but it happens on the sparc when loading parameter registers, so I am going to define that circumstance, and make it work as expected. */ --- 808,812 ---- sets it up, and that is an undefined circumstance." ! but it happens on the HP-PA when loading parameter registers, so I am going to define that circumstance, and make it work as expected. */ *************** *** 910,1057 **** } - /* Output code to place a size count SIZE in register REG. - ALIGN is the size of the unit of transfer. - - Because block moves are pipelined, we don't include the - first element in the transfer of SIZE to REG. */ - - static void - output_size_for_block_move (size, reg, align) - rtx size, reg; - rtx align; - { - rtx xoperands[3]; - - xoperands[0] = reg; - xoperands[1] = size; - xoperands[2] = align; - if (GET_CODE (size) == REG) - output_asm_insn ("ldo -%2(%1),%0", xoperands); - else - { - xoperands[1] - = gen_rtx (CONST_INT, VOIDmode, INTVAL (size) - INTVAL (align)); - if (INT_14_BITS (xoperands[1])) - output_asm_insn ("ldi %1,%0", xoperands); - else - output_asm_insn ("addil L'%1,0\n\tldo R'%1(1),%0", xoperands); - } - } - /* Emit code to perform a block move. ! OPERANDS[0] is the destination. ! OPERANDS[1] is the source. ! OPERANDS[2] is the size. ! OPERANDS[3] is the alignment safe to use. ! OPERANDS[4] is a register we can safely clobber as a temp. */ char * ! output_block_move (operands) rtx *operands; { ! /* A vector for our computed operands. Note that load_output_address ! makes use of (and can clobber) up to the 8th element of this vector. */ ! rtx xoperands[10]; ! rtx zoperands[10]; ! static int movstrsi_label = 0; ! int i, j; ! rtx temp1 = operands[4]; ! rtx alignrtx = operands[3]; ! int align = INTVAL (alignrtx); ! ! xoperands[0] = operands[0]; ! xoperands[1] = operands[1]; ! xoperands[2] = temp1; ! /* We can't move more than four bytes at a time ! because we have only one register to move them through. */ if (align > 4) { ! align = 4; ! alignrtx = gen_rtx (CONST_INT, VOIDmode, 4); ! } ! /* Since we clobber untold things, nix the condition codes. */ ! /* Recognize special cases of block moves. These occur ! when GNU C++ is forced to treat something as BLKmode ! to keep it in memory, when its mode could be represented ! with something smaller. ! We cannot do this for global variables, since we don't know ! what pages they don't cross. Sigh. */ ! if (GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) <= 8 ! && ! CONSTANT_ADDRESS_P (operands[0]) ! && ! CONSTANT_ADDRESS_P (operands[1])) ! { ! int size = INTVAL (operands[2]); ! if (align == 1) ! { ! if (memory_address_p (QImode, plus_constant (xoperands[0], size)) ! && memory_address_p (QImode, plus_constant (xoperands[1], size))) { ! /* We will store different integers into xoperands[2]. */ ! for (i = 0; i <= size-1; i++) ! { ! xoperands[2] = gen_rtx (CONST_INT, VOIDmode, i); ! output_asm_insn ("ldbs %2(%1),1\n\tstbs,ma 1,1(0,%0)", ! xoperands); ! } ! return ""; } ! } ! else if (align == 2) ! { ! if (memory_address_p (HImode, plus_constant (xoperands[0], size)) ! && memory_address_p (HImode, plus_constant (xoperands[1], size))) { ! for (i = 0 ; i <= (size>>1)-1; i++) ! { ! xoperands[2] = gen_rtx (CONST_INT, VOIDmode, i << 1); ! output_asm_insn ("ldhs %2(%1),1\n\tsths,ma 1,2(0,%0)", ! xoperands); ! } ! return ""; } } ! else { ! if (memory_address_p (SImode, plus_constant (xoperands[0], size)) ! && memory_address_p (SImode, plus_constant (xoperands[1], size))) { ! for (i = 0; i <= (size>>2)-1; i++) ! { ! xoperands[2] = gen_rtx (CONST_INT, VOIDmode, i << 2); ! output_asm_insn ("ldws %2(%1),1\n\tstws,ma 1,4(0,%0)", ! xoperands); ! } ! return ""; } } } ! /* This is the size of the transfer. ! Either use the register which already contains the size, ! or use a free register (used by no operands). ! Also emit code to decrement the size value by ALIGN. */ ! output_size_for_block_move (operands[2], temp1, alignrtx); ! zoperands[0] = operands[0]; ! zoperands[3] = gen_rtx (PLUS, SImode, operands[0], temp1); ! output_load_address (zoperands); ! ! xoperands[3] = gen_rtx (CONST_INT, VOIDmode, movstrsi_label++); ! xoperands[4] = gen_rtx (CONST_INT, VOIDmode, - align); ! ! if (align == 1) ! output_asm_insn ("\nLm%3\n\tldbx %2(%1),1\n\taddib,>= %4,%2,Lm%3\n\tstbs,ma 1,%4(0,%0)", xoperands); ! else if (align == 2) ! output_asm_insn ("\nLm%3\n\tldhx %2(%1),1\n\taddib,>= %4,%2,Lm%3\n\tsths,ma 1,%4(0,%0)", xoperands); else ! output_asm_insn ("\nLm%3\n\tldwx %2(%1),1\n\taddib,>= %4,%2,Lm%3\n\tstws,ma 1,%4(0,%0)", xoperands); return ""; } --- 992,1163 ---- } /* Emit code to perform a block move. ! Restriction: If the length argument is non-constant, alignment ! must be 4. + OPERANDS[0] is the destination pointer as a REG, clobbered. + OPERANDS[1] is the source pointer as a REG, clobbered. + if SIZE_IS_CONSTANT + OPERANDS[2] is a register for temporary storage. + OPERANDS[4] is the size as a CONST_INT + else + OPERANDS[2] is a REG which will contain the size, clobbered. + OPERANDS[3] is a register for temporary storage. + OPERANDS[5] is the alignment safe to use, as a CONST_INT. */ + char * ! output_block_move (operands, size_is_constant) rtx *operands; + int size_is_constant; { ! int align = INTVAL (operands[5]); ! unsigned long n_bytes; ! /* We can't move more than four bytes at a time because the PA ! has no longer integer move insns. (Could use fp mem ops?) */ if (align > 4) + align = 4; + + if (size_is_constant) { ! unsigned long n_items; ! unsigned long offset; ! rtx temp; ! n_bytes = INTVAL (operands[4]); ! if (n_bytes == 0) ! return ""; ! if (align >= 4) ! { ! /* Don't unroll too large blocks. */ ! if (n_bytes > 64) ! goto copy_with_loop; ! /* Read and store using two registers, and hide latency ! by defering the stores until three instructions after ! the corresponding load. The last load insn will read ! the entire word were the last bytes are, possibly past ! the end of the source block, but since loads are aligned, ! this is harmless. */ ! output_asm_insn ("ldws,ma 4(0,%1),%2", operands); ! ! for (offset = 4; offset < n_bytes; offset += 4) { ! output_asm_insn ("ldws,ma 4(0,%1),%3", operands); ! output_asm_insn ("stws,ma %2,4(0,%0)", operands); ! temp = operands[2]; ! operands[2] = operands[3]; ! operands[3] = temp; } ! if (n_bytes % 4 == 0) ! /* Store the last word. */ ! output_asm_insn ("stw %2,0(0,%0)", operands); ! else { ! /* Store the last, partial word. */ ! operands[4] = gen_rtx (CONST_INT, VOIDmode, n_bytes % 4); ! output_asm_insn ("stbys,e %2,%4(0,%0)", operands); } + return ""; } ! ! if (align >= 2 && n_bytes >= 2) { ! output_asm_insn ("ldhs,ma 2(0,%1),%2", operands); ! ! for (offset = 2; offset + 2 <= n_bytes; offset += 2) { ! output_asm_insn ("ldhs,ma 2(0,%1),%3", operands); ! output_asm_insn ("sths,ma %2,2(0,%0)", operands); ! ! temp = operands[2]; ! operands[2] = operands[3]; ! operands[3] = temp; } + if (n_bytes % 2 != 0) + output_asm_insn ("ldb 0(0,%1),%3", operands); + + output_asm_insn ("sths,ma %2,2(0,%0)", operands); + + if (n_bytes % 2 != 0) + output_asm_insn ("stb %3,0(0,%0)", operands); + + return ""; + } + + output_asm_insn ("ldbs,ma 1(0,%1),%2", operands); + + for (offset = 1; offset + 1 <= n_bytes; offset += 1) + { + output_asm_insn ("ldbs,ma 1(0,%1),%3", operands); + output_asm_insn ("stbs,ma %2,1(0,%0)", operands); + + temp = operands[2]; + operands[2] = operands[3]; + operands[3] = temp; } + output_asm_insn ("stb %2,0(0,%0)", operands); + + return ""; } ! if (align != 4) ! abort(); ! copy_with_loop: ! ! if (size_is_constant) ! { ! /* Size is an compile-time determined, and also not ! very small (such small cases are handled above). */ ! operands[4] = gen_rtx (CONST_INT, VOIDmode, n_bytes - 4); ! output_asm_insn ("ldo %4(0),%2", operands); ! } ! else ! { ! /* Decrement counter by 4, and if it becomes negative, jump past the ! word copying loop. */ ! output_asm_insn ("addib,<,n -4,%2,.+16", operands); ! } ! ! /* Copying loop. Note that the first load is in the anulled delay slot ! of addib. Is it OK on PA to have a load in a delay slot, i.e. is a ! possible page fault stopped in time? */ ! output_asm_insn ("ldws,ma 4(0,%1),%3", operands); ! output_asm_insn ("addib,>= -4,%2,.-4", operands); ! output_asm_insn ("stws,ma %3,4(0,%0)", operands); ! ! /* The counter is negative, >= -4. The remaining number of bytes are ! determined by the two least significant bits. */ ! ! if (size_is_constant) ! { ! if (n_bytes % 4 != 0) ! { ! /* Read the entire word of the source block tail. */ ! output_asm_insn ("ldw 0(0,%1),%3", operands); ! operands[4] = gen_rtx (CONST_INT, VOIDmode, n_bytes % 4); ! output_asm_insn ("stbys,e %3,%4(0,%0)", operands); ! } ! } else ! { ! /* Add 4 to counter. If it becomes zero, we're done. */ ! output_asm_insn ("addib,=,n 4,%2,.+16", operands); ! ! /* Read the entire word of the source block tail. (Also this ! load is in an anulled delay slot.) */ ! output_asm_insn ("ldw 0(0,%1),%3", operands); ! ! /* Make %0 point at the first byte after the destination block. */ ! output_asm_insn ("add %2,%0,%0", operands); ! /* Store the leftmost bytes, up to, but not including, the address ! in %0. */ ! output_asm_insn ("stbys,e %3,0(0,%0)", operands); ! } return ""; } *************** *** 1068,1075 **** unsigned char partial_output[16]; /* Max space 4 chars can occupy. */ ! /* The HP assember can only take strings of 256 characters at one time. This is a limitation on input line length, *not* the length of the string. Sigh. Even worse, it seems that the ! restricition is in number of input characters (see \xnn & \whatever). So we have to do this very carefully. */ --- 1174,1181 ---- unsigned char partial_output[16]; /* Max space 4 chars can occupy. */ ! /* The HP assembler can only take strings of 256 characters at one time. This is a limitation on input line length, *not* the length of the string. Sigh. Even worse, it seems that the ! restriction is in number of input characters (see \xnn & \whatever). So we have to do this very carefully. */ *************** *** 1175,1179 **** . . ! SP + p (SP') points to next avaliable address. */ --- 1281,1285 ---- . . ! SP + p (SP') points to next available address. */ *************** *** 1204,1213 **** } - /* Set by the FUNCTION_PROFILER macro. */ - int hp_profile_labelno; - extern int profile_flag; - - int local_fsize, save_fregs, actual_fsize; - int compute_frame_size (size, leaf_function) --- 1310,1313 ---- *************** *** 1351,1363 **** if (save_fregs) if (frame_pointer_needed) ! if (VAL_14_BITS_P (offset)) ! fprintf (file, "\tldo %d(4),1\n", offset); ! else ! fprintf (file, "\taddil L'%d,4\n\tldo R'%d(1),1\n", offset, offset); else ! if (VAL_14_BITS_P (offset)) ! fprintf (file, "\tldo %d(30),1\n", offset); ! else ! fprintf (file, "\taddil L'%d,30\n\tldo R'%d(1),1\n", offset, offset); if (!TARGET_SNAKE) { --- 1451,1467 ---- if (save_fregs) if (frame_pointer_needed) ! { ! if (VAL_14_BITS_P (offset)) ! fprintf (file, "\tldo %d(4),1\n", offset); ! else ! fprintf (file, "\taddil L'%d,4\n\tldo R'%d(1),1\n", offset, offset); ! } else ! { ! if (VAL_14_BITS_P (offset)) ! fprintf (file, "\tldo %d(30),1\n", offset); ! else ! fprintf (file, "\taddil L'%d,30\n\tldo R'%d(1),1\n", offset, offset); ! } if (!TARGET_SNAKE) { *************** *** 1419,1431 **** if (save_fregs) if (frame_pointer_needed) ! if (VAL_14_BITS_P (offset)) ! fprintf (file, "\tldo %d(4),1\n", offset); ! else ! fprintf (file, "\taddil L'%d,4\n\tldo R'%d(1),1\n", offset, offset); else ! if (VAL_14_BITS_P (offset)) ! fprintf (file, "\tldo %d(30),1\n", offset); ! else ! fprintf (file, "\taddil L'%d,30\n\tldo R'%d(1),1\n", offset, offset); if (!TARGET_SNAKE) { --- 1523,1539 ---- if (save_fregs) if (frame_pointer_needed) ! { ! if (VAL_14_BITS_P (offset)) ! fprintf (file, "\tldo %d(4),1\n", offset); ! else ! fprintf (file, "\taddil L'%d,4\n\tldo R'%d(1),1\n", offset, offset); ! } else ! { ! if (VAL_14_BITS_P (offset)) ! fprintf (file, "\tldo %d(30),1\n", offset); ! else ! fprintf (file, "\taddil L'%d,30\n\tldo R'%d(1),1\n", offset, offset); ! } if (!TARGET_SNAKE) { *************** *** 1785,1792 **** output_addr_const (file, base); } ! else ! if (GET_CODE(XEXP (XEXP (x, 0), 0)) == CONST_INT) ! offset = INTVAL (XEXP (XEXP (x, 0), 0)); ! else abort(); if (GET_CODE (XEXP (XEXP (x, 0), 1)) == SYMBOL_REF) { --- 1893,1900 ---- output_addr_const (file, base); } ! else if (GET_CODE (XEXP (XEXP (x, 0), 0)) == CONST_INT) ! offset = INTVAL (XEXP (XEXP (x, 0), 0)); ! else abort (); ! if (GET_CODE (XEXP (XEXP (x, 0), 1)) == SYMBOL_REF) { *************** *** 1794,1812 **** output_addr_const (file, base); } ! else ! if (GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT) ! offset = INTVAL (XEXP (XEXP (x, 0),1)); ! else abort(); if (GET_CODE (XEXP (x, 0)) == PLUS) ! sep= "+"; ! else ! if (GET_CODE (XEXP (x, 0)) == MINUS ! && (GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF)) ! sep = "-"; ! else abort(); if (!read_only_operand (base)) fprintf (file, "-$global$"); fprintf (file, "%s", sep); ! if (offset) fprintf(file,"%d", offset); } else --- 1902,1928 ---- output_addr_const (file, base); } ! else if (GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT) ! offset = INTVAL (XEXP (XEXP (x, 0),1)); ! else abort (); ! if (GET_CODE (XEXP (x, 0)) == PLUS) ! { ! if (offset < 0) ! { ! offset = -offset; ! sep = "-"; ! } ! else ! sep = "+"; ! } ! else if (GET_CODE (XEXP (x, 0)) == MINUS ! && (GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF)) ! sep = "-"; ! else abort (); ! if (!read_only_operand (base)) fprintf (file, "-$global$"); fprintf (file, "%s", sep); ! if (offset) fprintf (file,"%d", offset); } else *************** *** 1865,2103 **** } - /* What the spectrum lacks in hardware, make up for in software. - Compute a fairly good sequence of shift and add insns - to make a multiply happen. This should punt and call millicode if - the sequence gets too big, but that's hard to do at this stage - because it involves clobbering several registers. Oh, well. */ - - #define ABS(x) ((x) < 0 ? -(x) : x) - - static rtx *mul_operands; - - void mul_by_constant_aux (); - - int - emit_mul_by_constant (operands, unsignedp) - rtx *operands; - int unsignedp; - { - int constant; - mul_operands = operands; - - constant = INTVAL (operands[2]); - if (constant == 0) - { - /* Does happen, at least when not optimizing. */ - emit_insn (gen_rtx (SET, VOIDmode, operands[0], const0_rtx)); - return 1; - } - if (constant == 1) - { - emit_insn (gen_rtx (SET, VOIDmode, operands[0], operands[1])); - return 1; - } - mul_by_constant_aux (ABS(constant)); - if (constant < 0) - emit_insn (gen_negsi2 (operands[0], operands[0])); - return 1; - } - - /* This greedy algorithm uses the fact that several constant - multiplies are rather cheap on the PA: - * 2^n (shift n places) - * (2^n + 1) and (2^n - 1) (shift n and add or subtract) - * 3, 5, 9 (sh1add, sh2add, sh3add) */ - - void - mul_by_constant_aux (constant) - int constant; - { - int log2, diff; /* log2 of constant and difference */ - /* from a power of 2 */ - int ffs_res; - rtx xoperands[4]; - - xoperands[0] = mul_operands[0]; xoperands[1] = mul_operands[1]; - log2 = log2_and_diff(constant, &diff); - /* constant = 2^n or 2^n +/- 1? constant = 3,5,9 is handled better - by the shift and add instructions. */ - if (!diff || (diff == 1 && constant != 3 && constant != 5 && constant != 9) - || (diff == -1 && constant != 3)) - { - emit_insn (gen_rtx (SET, VOIDmode, - mul_operands[0], - gen_rtx (ASHIFT, SImode, - mul_operands[1], - gen_rtx (CONST_INT, VOIDmode, log2)))); - if (diff == 1) - emit_insn (gen_addsi3 (mul_operands[0], - mul_operands[0], - mul_operands[1])); - else if (diff == -1) - emit_insn (gen_subsi3 (mul_operands[0], - mul_operands[0], - mul_operands[1])); - } - /* The things we try are ordered by how many binary digits of - constant they consume */ - /* is 2^n a factor of constant, n > 3? */ - else if ((ffs_res = ffs (constant)) > 4) - { - mul_by_constant_aux ((constant >> (ffs_res - 1))); - emit_insn (gen_rtx (SET, VOIDmode, - mul_operands[0], - gen_rtx (ASHIFT, SImode, - mul_operands[0], - gen_rtx (CONST_INT, VOIDmode, - ffs_res - 1)))); - } - /* If the bottom n bits of constant are all 1's, that's the same as - multiplying the total by 2^n and subtracting the multiplicand. */ - else if ((ffs_res = ffs (~constant)) > 4) - { - mul_by_constant_aux ((constant >> (ffs_res - 1)) | 1); - emit_insn (gen_rtx (SET, VOIDmode, - mul_operands[0], - gen_rtx (ASHIFT, SImode, - mul_operands[0], - gen_rtx (CONST_INT, VOIDmode, - ffs_res - 1)))); - emit_insn (gen_subsi3 (mul_operands[0], - mul_operands[0], - mul_operands[1])); - } - /* factor and test for possible shift/add combinations */ - else if (test_factor_and_output (constant, 9)); - else if (test_factor_and_output (constant, 8)); - else if ((constant & 0x7) == 0x1) - { - mul_by_constant_aux (constant >> 3); - emit_insn (gen_rtx (SET, VOIDmode, - mul_operands[0], - gen_rtx (PLUS, SImode, - mul_operands[1], - gen_rtx (MULT, SImode, - mul_operands[0], - gen_rtx (CONST_INT, VOIDmode, - 8))))); - } - else if (test_factor_and_output (constant, 5)); - else if (test_factor_and_output (constant, 4)); - else if ((constant & 0x3) == 0x1) - { - mul_by_constant_aux (constant >> 2); - emit_insn (gen_rtx (SET, VOIDmode, - mul_operands[0], - gen_rtx (PLUS, SImode, - mul_operands[1], - gen_rtx (MULT, SImode, - mul_operands[0], - gen_rtx (CONST_INT, VOIDmode, - 4))))); - } - else if (test_factor_and_output (constant, 3)); - else if (test_factor_and_output (constant, 2)); - else - { - mul_by_constant_aux (constant >> 1); - emit_insn (gen_rtx (SET, VOIDmode, - mul_operands[0], - gen_rtx (PLUS, SImode, - mul_operands[1], - gen_rtx (MULT, SImode, - mul_operands[0], - gen_rtx (CONST_INT, VOIDmode, - 2))))); - } - } - - /* If FACTOR is a factor of CONSTANT, output the appropriate shift and - add instruction */ - - int - test_factor_and_output (constant, factor) - int constant, factor; - { - rtx xoperands0, xoperands1, xoperands2; - int shift, add_op = 0; - - xoperands0 = mul_operands[0]; - if (!(constant % factor)) - { - switch (factor) - { - case 9: - shift = 3; add_op = 1; break; - case 8: - shift = 3; break; - case 5: - shift = 2; add_op = 1; break; - case 4: - shift = 2; break; - case 3: - shift = 1; add_op = 1; break; - case 2: - shift = 1; break; - default: - abort (); - } - if (constant / factor == 1) - { - xoperands1 = mul_operands[1]; - xoperands2 = mul_operands[1]; - } - else - { - mul_by_constant_aux (constant / factor); - xoperands1 = mul_operands[0]; - xoperands2 = mul_operands[0]; - } - if (add_op) - emit_insn (gen_rtx (SET, VOIDmode, - xoperands0, - gen_rtx (PLUS, SImode, - xoperands1, - gen_rtx (MULT, SImode, - xoperands2, - gen_rtx (CONST_INT, VOIDmode, - 1 << shift))))); - else - emit_insn (gen_rtx (SET, VOIDmode, - xoperands0, - gen_rtx (ASHIFT, SImode, - xoperands1, - gen_rtx (CONST_INT, VOIDmode, shift)))); - return 1; - } - return 0; - } - - /* This routine finds the floor_log2 of val and returns it and the - difference between val and 2^log2(val). If val is 1 less than a - power of 2, that power's log and -1 are returned. */ - - int log2_and_diff (val, diff) - int val, *diff; - { - int log = floor_log2 (val); - - *diff = val - (1 << log); - if (!*diff || *diff == 1) - { - return log; - } - else /* see if val is one less than a power */ - { /* of 2 */ - int alt_log = floor_log2 (val + 1); - if (!((val + 1) - (1 << alt_log))) - { - *diff = -1; - return alt_log; - } - } - return log; - } - - /* HP's millicode routines mean something special to the assembler. Keep track of which ones we have used. */ --- 1981,1984 ---- *************** *** 2113,2117 **** enum millicodes code; { ! char str[sizeof(import_string)]; if (!imported[(int)code]) --- 1994,1998 ---- enum millicodes code; { ! char str[sizeof (import_string)]; if (!imported[(int)code]) *************** *** 2173,2177 **** int ! emit_hpdiv_const(operands, unsignedp) rtx *operands; int unsignedp; --- 2054,2058 ---- int ! emit_hpdiv_const (operands, unsignedp) rtx *operands; int unsignedp; *************** *** 2201,2205 **** char * ! output_div_insn(operands, unsignedp) rtx *operands; int unsignedp; --- 2082,2086 ---- char * ! output_div_insn (operands, unsignedp) rtx *operands; int unsignedp; *************** *** 2337,2341 **** if (class == FP_REGS || class == SNAKE_FP_REGS || class == HI_SNAKE_FP_REGS) { ! if (regno = -1 || !REGNO_OK_FOR_FP_P (regno)) return GENERAL_REGS; } --- 2218,2222 ---- if (class == FP_REGS || class == SNAKE_FP_REGS || class == HI_SNAKE_FP_REGS) { ! if (regno == -1 || !REGNO_OK_FOR_FP_P (regno)) return GENERAL_REGS; } *************** *** 2343,2348 **** } - enum direction {none, upward, downward}; - enum direction function_arg_padding (mode, type) --- 2224,2227 ---- *************** *** 2379,2381 **** --- 2258,2370 ---- reg_mentioned_p (gen_rtx (REG, SImode, 29), insn) || reg_mentioned_p (gen_rtx (REG, SImode, 31), insn)); + } + + /* Do what is necessary for `va_start'. The argument is ignored; + We look at the current function to determine if stdargs or varargs + is used and fill in an initial va_list. A pointer to this constructor + is returned. */ + + struct rtx_def * + hppa_builtin_saveregs (arglist) + tree arglist; + { + rtx block, float_addr, offset, float_mem; + tree fntype = TREE_TYPE (current_function_decl); + int argadj = ((!(TYPE_ARG_TYPES (fntype) != 0 + && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) + != void_type_node))) + ? UNITS_PER_WORD : 0); + + if (argadj) + offset = plus_constant (current_function_arg_offset_rtx, argadj); + else + offset = current_function_arg_offset_rtx; + /* Allocate the va_list structure. */ + block = assign_stack_local (BLKmode, 4 * UNITS_PER_WORD, BITS_PER_UNIT); + RTX_UNCHANGING_P (block) = 1; + RTX_UNCHANGING_P (XEXP (block, 0)) = 1; + /* + * Store a pointer to where arguments should begin on the stack in + * __va_stack_start. + */ + emit_move_insn (change_address (block, Pmode, XEXP (block, 0)), + copy_to_reg + (plus_constant (current_function_internal_arg_pointer, + -16))); + /* Store where to start getting args from in the __va_int member. */ + emit_move_insn (change_address (block, Pmode, + plus_constant (XEXP (block, 0), + UNITS_PER_WORD)), + copy_to_reg (expand_binop (Pmode, add_optab, + current_function_internal_arg_pointer, + offset, + 0, 0, OPTAB_LIB_WIDEN))); + /* Store general registers on the stack. */ + move_block_from_reg (23, + gen_rtx (MEM, BLKmode, + plus_constant + (current_function_internal_arg_pointer, -16)), + 4); + /* + * Allocate space for the float args, and store it in the + * __va_float member. + */ + float_addr = copy_to_reg (XEXP (float_mem = + assign_stack_local (BLKmode, + 4 * UNITS_PER_WORD, -1), + 0)); + MEM_IN_STRUCT_P (float_mem) = 1; + RTX_UNCHANGING_P (float_mem) = 1; + RTX_UNCHANGING_P (XEXP (float_mem, 0)) = 1; + emit_move_insn (change_address (block, Pmode, + plus_constant (XEXP (block, 0), + 2 * UNITS_PER_WORD)), + copy_to_reg (expand_binop (Pmode, add_optab, + float_addr, + plus_constant (offset, 4 * + UNITS_PER_WORD), + 0, 0, OPTAB_LIB_WIDEN))); + /* Store fp registers. */ + emit_move_insn (gen_rtx (MEM, SFmode, float_addr), + gen_rtx (REG, SFmode, TARGET_SNAKE ? 60 : 39)); + emit_move_insn (gen_rtx (MEM, SFmode, gen_rtx (PLUS, Pmode, float_addr, + gen_rtx (CONST_INT, + Pmode, 4))), + gen_rtx (REG, SFmode, TARGET_SNAKE ? 58 : 38)); + emit_move_insn (gen_rtx (MEM, SFmode, gen_rtx (PLUS, Pmode, float_addr, + gen_rtx (CONST_INT, + Pmode, 8))), + gen_rtx (REG, SFmode, TARGET_SNAKE ? 56 : 37)); + emit_move_insn (gen_rtx (MEM, SFmode, gen_rtx (PLUS, Pmode, float_addr, + gen_rtx (CONST_INT, + Pmode, 12))), + gen_rtx (REG, SFmode, TARGET_SNAKE ? 54 : 36)); + /* + * Allocate space for the double args, and store it in the + * __va_double member. + */ + float_addr = copy_to_reg (XEXP (float_mem = + assign_stack_local (BLKmode, + 4 * UNITS_PER_WORD, -1), + 0)); + MEM_IN_STRUCT_P (float_mem) = 1; + RTX_UNCHANGING_P (float_mem) = 1; + RTX_UNCHANGING_P (XEXP (float_mem, 0)) = 1; + emit_move_insn (change_address (block, Pmode, + plus_constant (XEXP (block, 0), + 3 * UNITS_PER_WORD)), + copy_to_reg (expand_binop (Pmode, add_optab, + float_addr, + plus_constant (offset, 4 * + UNITS_PER_WORD), + 0, 0, OPTAB_LIB_WIDEN))); + /* Store fp registers as doubles. */ + + emit_move_insn (gen_rtx (MEM, DFmode, float_addr), + (gen_rtx (REG, DFmode, TARGET_SNAKE ? 60 : 39))); + emit_move_insn (gen_rtx (MEM, DFmode, gen_rtx (PLUS, Pmode, float_addr, + gen_rtx (CONST_INT, + Pmode, 8))), + gen_rtx (REG, DFmode, TARGET_SNAKE ? 56 : 37)); + return copy_to_reg (XEXP (block, 0)); } diff -rc2N gcc-2.0/config/hp800.h gcc-2.1/config/hp800.h *** gcc-2.0/config/hp800.h Wed Feb 5 19:04:09 1992 --- gcc-2.1/config/hp800.h Sat Mar 21 17:46:59 1992 *************** *** 50,63 **** #endif ! /* Don't schedule insns unless explicitly asked... ! it messes with debugging too much. Don't follow jumps except at ! higher optimizations levels, since it's so slow to do so. */ #define OPTIMIZATION_OPTIONS(OPTIMIZE) \ ! (flag_omit_frame_pointer = (optimize >= 2), \ ! flag_cse_follow_jumps = (optimize >= 3), \ ! flag_schedule_insns = (optimize >= 4), \ ! flag_schedule_insns_after_reload = (optimize >= 5)) \ - /* These compiler options take an argument. We ignore -target for now. */ --- 50,61 ---- #endif ! /* Omit frame pointer at high optimization levels. */ ! #define OPTIMIZATION_OPTIONS(OPTIMIZE) \ ! { \ ! if (OPTIMIZE >= 2) \ ! flag_omit_frame_pointer = 1; \ ! } /* These compiler options take an argument. We ignore -target for now. */ *************** *** 64,68 **** #define WORD_SWITCH_TAKES_ARG(STR) \ (!strcmp (STR, "Tdata") || !strcmp (STR, "include") \ ! || !strcmp (STR, "imacros") || !strcmp (STR, "target")) /* Names to predefine in the preprocessor for this target machine. */ --- 62,67 ---- #define WORD_SWITCH_TAKES_ARG(STR) \ (!strcmp (STR, "Tdata") || !strcmp (STR, "include") \ ! || !strcmp (STR, "imacros") || !strcmp (STR, "target")\ ! || !strcmp (STR, "aux-info")) /* Names to predefine in the preprocessor for this target machine. */ *************** *** 110,114 **** #define BYTES_BIG_ENDIAN 1 ! /* Define this if most significant word of a multiword number is numbered. */ /* For the hp9k800 we can decide arbitrarily since there are no machine instructions for them. */ --- 109,114 ---- #define BYTES_BIG_ENDIAN 1 ! /* Define this if most significant word of a multiword number is lowest ! numbered. */ /* For the hp9k800 we can decide arbitrarily since there are no machine instructions for them. */ *************** *** 115,119 **** #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 115,119 ---- #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 135,139 **** /* Largest alignment required for any stack parameter, in bits. ! Don't define this if it is equal to PARM_BOUNDRY */ #define MAX_PARM_BOUNDARY 64 --- 135,139 ---- /* Largest alignment required for any stack parameter, in bits. ! Don't define this if it is equal to PARM_BOUNDARY */ #define MAX_PARM_BOUNDARY 64 *************** *** 167,173 **** ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT /* Generate calls to memcpy, memcmp and memset. */ --- 167,173 ---- ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 1 /* Generate calls to memcpy, memcmp and memset. */ *************** *** 192,196 **** differently: the left and right halves of registers are addressable as 32 bit registers. So, we will set things up like the 68k which ! has different fp units: define seperate register sets for the 1.0 and 1.1 fp units. */ --- 192,196 ---- differently: the left and right halves of registers are addressable as 32 bit registers. So, we will set things up like the 68k which ! has different fp units: define separate register sets for the 1.0 and 1.1 fp units. */ *************** *** 284,289 **** This assumes that putting a register in fixed_regs will keep the compiler's mitts completely off it. We don't bother to zero it out ! of register classes. */ #define CONDITIONAL_REGISTER_USAGE \ { \ --- 284,291 ---- This assumes that putting a register in fixed_regs will keep the compiler's mitts completely off it. We don't bother to zero it out ! of register classes. + Make register 27 global for now. We'll undo this kludge after 2.1. */ + #define CONDITIONAL_REGISTER_USAGE \ { \ *************** *** 290,293 **** --- 292,296 ---- int i; \ HARD_REG_SET x; \ + global_regs[27] = 1; \ if (!TARGET_SNAKE) \ { \ *************** *** 391,395 **** frame pointer. If it is a leaf function, we guessed right! */ #define INITIAL_FRAME_POINTER_OFFSET(VAR) \ ! do { (VAR) = compute_frame_size (get_frame_size (), 1); } while (0) /* Base register for access to arguments of the function. */ --- 394,398 ---- frame pointer. If it is a leaf function, we guessed right! */ #define INITIAL_FRAME_POINTER_OFFSET(VAR) \ ! do { (VAR) = -compute_frame_size (get_frame_size (), 1) - 32; } while (0) /* Base register for access to arguments of the function. */ *************** *** 596,600 **** /* Keep the stack pointer constant throughout the function. ! This is both an optimization and a neccessity: longjmp doesn't behave itself when the stack pointer moves within the function! */ --- 599,603 ---- /* Keep the stack pointer constant throughout the function. ! This is both an optimization and a necessity: longjmp doesn't behave itself when the stack pointer moves within the function! */ *************** *** 759,763 **** fprintf (FILE, ",ARGW%d=FR", (ARG1));} while (0) #endif - #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do { tree fntype = DECL_RESULT (DECL); \ --- 762,765 ---- *************** *** 765,805 **** tree parm; \ int i; \ ! fputs ("\t.EXPORT ", FILE); assemble_name (FILE, NAME); \ ! fputs (",PRIV_LEV=3", FILE); \ ! for (parm = DECL_ARGUMENTS (DECL), i = 0; parm && i < 4; \ ! parm = TREE_CHAIN (parm), i++) \ { \ ! if (TYPE_MODE (DECL_ARG_TYPE (parm)) == SFmode) \ ! fprintf (FILE, ",ARGW%d=FR", i); \ ! else if (TYPE_MODE (DECL_ARG_TYPE (parm)) == DFmode) \ { \ ! if (i == 0 || i == 2) \ ! { \ ! ASM_DOUBLE_ARG_DESCRIPTORS (FILE, i++, i); \ ! } \ ! else if (i == 1) \ ! { \ ! ASM_DOUBLE_ARG_DESCRIPTORS (FILE, ++i, ++i); \ ! } \ } \ ! else \ ! fprintf (FILE, ",ARGW%d=GR", i); \ } \ ! /* anonymous args */ \ ! if (TYPE_ARG_TYPES (tree_type) != 0 \ ! && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (tree_type))) \ ! != void_type_node)) \ ! { \ ! for (; i < 4; i++) \ ! fprintf (FILE, ",ARGW%d=GR", i); \ ! } \ ! if (TYPE_MODE (fntype) == DFmode) \ ! fprintf (FILE, ",RTNVAL=FR"); \ ! else if (TYPE_MODE (fntype) == SFmode) \ ! fprintf (FILE, ",RTNVAL=FU"); \ ! else if (fntype != void_type_node) \ ! fprintf (FILE, ",RTNVAL=GR"); \ ! fputs ("\n", FILE); \ ! ASM_OUTPUT_LABEL (FILE, NAME);} while (0) /* Two views of the size of the current frame. */ --- 767,810 ---- tree parm; \ int i; \ ! if (TREE_PUBLIC (DECL)) \ { \ ! fputs ("\t.EXPORT ", FILE); assemble_name (FILE, NAME); \ ! fputs (",PRIV_LEV=3", FILE); \ ! for (parm = DECL_ARGUMENTS (DECL), i = 0; parm && i < 4; \ ! parm = TREE_CHAIN (parm), i++) \ { \ ! if (TYPE_MODE (DECL_ARG_TYPE (parm)) == SFmode) \ ! fprintf (FILE, ",ARGW%d=FR", i); \ ! else if (TYPE_MODE (DECL_ARG_TYPE (parm)) == DFmode) \ ! { \ ! if (i == 0 || i == 2) \ ! { \ ! ASM_DOUBLE_ARG_DESCRIPTORS (FILE, i++, i); \ ! } \ ! else if (i == 1) \ ! { \ ! ASM_DOUBLE_ARG_DESCRIPTORS (FILE, ++i, ++i); \ ! } \ ! } \ ! else \ ! fprintf (FILE, ",ARGW%d=GR", i); \ } \ ! /* anonymous args */ \ ! if (TYPE_ARG_TYPES (tree_type) != 0 \ ! && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (tree_type)))\ ! != void_type_node)) \ ! { \ ! for (; i < 4; i++) \ ! fprintf (FILE, ",ARGW%d=GR", i); \ ! } \ ! if (TYPE_MODE (fntype) == DFmode) \ ! fprintf (FILE, ",RTNVAL=FR"); \ ! else if (TYPE_MODE (fntype) == SFmode) \ ! fprintf (FILE, ",RTNVAL=FU"); \ ! else if (fntype != void_type_node) \ ! fprintf (FILE, ",RTNVAL=GR"); \ ! fputs ("\n", FILE); \ } \ ! ASM_OUTPUT_LABEL (FILE, NAME);} while (0) /* Two views of the size of the current frame. */ *************** *** 815,819 **** knowing which registers should not be saved even if used. */ ! /* On SPARC, move-double insns between fpu and cpu need an 8-byte block of memory. If any fpu reg is used in the function, we allocate such a block here, at the bottom of the frame, just in case it's needed. --- 820,824 ---- knowing which registers should not be saved even if used. */ ! /* On HP-PA, move-double insns between fpu and cpu need an 8-byte block of memory. If any fpu reg is used in the function, we allocate such a block here, at the bottom of the frame, just in case it's needed. *************** *** 900,903 **** --- 905,909 ---- + #if 0 #define EXPAND_BUILTIN_SAVEREGS(ARGLIST) \ (emit_insn (gen_rtx (USE, VOIDmode, gen_rtx (REG, TImode, 23))), \ *************** *** 911,915 **** emit_insn (gen_rtx (USE, VOIDmode, gen_rtx (REG, DFmode, 38))), \ emit_insn (gen_rtx (USE, VOIDmode, gen_rtx (REG, DFmode, 39)))))) ! --- 917,922 ---- emit_insn (gen_rtx (USE, VOIDmode, gen_rtx (REG, DFmode, 38))), \ emit_insn (gen_rtx (USE, VOIDmode, gen_rtx (REG, DFmode, 39)))))) ! #endif ! #define EXPAND_BUILTIN_SAVEREGS(ARGLIST) (rtx)hppa_builtin_saveregs (ARGLIST) *************** *** 977,981 **** been eliminated by then. */ ! /* Optional extra constraints for this machine. Borrowed from tm-sparc.h. For the HPPA, `Q' means that this is a memory operand but not a --- 984,988 ---- been eliminated by then. */ ! /* Optional extra constraints for this machine. Borrowed from sparc.h. For the HPPA, `Q' means that this is a memory operand but not a *************** *** 1065,1073 **** #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ { \ ! if (REG_P (X) && REG_OK_FOR_BASE_P (X) \ || ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == POST_DEC \ || GET_CODE (X) == PRE_INC || GET_CODE (X) == POST_INC) \ ! && REG_P (XEXP (X, 0)) \ ! && REG_OK_FOR_BASE_P (XEXP (X, 0)))) \ goto ADDR; \ else if (GET_CODE (X) == PLUS) \ --- 1072,1080 ---- #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ { \ ! if ((REG_P (X) && REG_OK_FOR_BASE_P (X)) \ || ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == POST_DEC \ || GET_CODE (X) == PRE_INC || GET_CODE (X) == POST_INC) \ ! && REG_P (XEXP (X, 0)) \ ! && REG_OK_FOR_BASE_P (XEXP (X, 0)))) \ goto ADDR; \ else if (GET_CODE (X) == PLUS) \ *************** *** 1150,1154 **** if (flag_pic) (X) = legitimize_pic_address (X, MODE, gen_reg_rtx (Pmode));\ else if ((GET_CODE (X) == SYMBOL_REF & read_only_operand (X)) \ ! || GET_CODE (X) == CONST || GET_CODE (X) == LABEL_REF)\ (X) = gen_rtx (LO_SUM, Pmode, \ copy_to_mode_reg (Pmode, gen_rtx (HIGH, Pmode, X)), X); \ --- 1157,1161 ---- if (flag_pic) (X) = legitimize_pic_address (X, MODE, gen_reg_rtx (Pmode));\ else if ((GET_CODE (X) == SYMBOL_REF & read_only_operand (X)) \ ! || GET_CODE (X) == LABEL_REF) \ (X) = gen_rtx (LO_SUM, Pmode, \ copy_to_mode_reg (Pmode, gen_rtx (HIGH, Pmode, X)), X); \ *************** *** 1179,1183 **** The macro definition, if any, is executed immediately after the ! rtl for DECL has been created and stored in `DECL_RTL (DECL)'. The value of the rtl will be a `mem' whose address is a `symbol_ref'. --- 1186,1190 ---- The macro definition, if any, is executed immediately after the ! rtl for DECL or other node is created. The value of the rtl will be a `mem' whose address is a `symbol_ref'. *************** *** 1189,1193 **** On the PA-RISC we use this to indicate if a symbol is in text or ! data space.*/ #define ENCODE_SECTION_INFO(DECL)\ --- 1196,1200 ---- On the PA-RISC we use this to indicate if a symbol is in text or ! data space. */ #define ENCODE_SECTION_INFO(DECL)\ *************** *** 1198,1206 **** else \ { \ ! rtx decl_rtl = (*tree_code_type[(int)TREE_CODE (DECL)] == 'c') ?\ ! TREE_CST_RTL (DECL) : DECL_RTL (DECL); \ ! if (RTX_UNCHANGING_P (decl_rtl) && !MEM_VOLATILE_P (decl_rtl) \ && !flag_pic) \ ! SYMBOL_REF_FLAG (XEXP (decl_rtl, 0)) = 1; \ } \ } \ --- 1205,1213 ---- else \ { \ ! rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ ! ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ ! if (RTX_UNCHANGING_P (rtl) && !MEM_VOLATILE_P (rtl) \ && !flag_pic) \ ! SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1; \ } \ } \ *************** *** 1309,1312 **** --- 1316,1334 ---- || (CLASS1 == GENERAL_REGS && CLASS2 == FP_REGS)) ? 6 : 2) + /* Provide the costs of a rtl expression. This is in the body of a + switch on CODE. The purpose for the cost of MULT is to encourage + `synth_mult' to find a synthetic multiply when reasonable. */ + + #define RTX_COSTS(X,CODE) \ + case MULT: \ + return COSTS_N_INSNS (20); \ + case DIV: \ + case UDIV: \ + case MOD: \ + case UMOD: \ + return COSTS_N_INSNS (60); \ + case PLUS: /* this includes shNadd insns */ \ + return COSTS_N_INSNS (1) + 2; + /* Conditional branches with empty delay slots have a length of two. */ #define ADJUST_INSN_LENGTH(INSN, LENGTH) \ *************** *** 1346,1349 **** --- 1368,1372 ---- /* Output before code. */ + /* Supposedly the assembler rejects the command if there is no tab! */ #define TEXT_SECTION_ASM_OP "\t.SPACE $TEXT$\n\t.SUBSPA $CODE$\n" *************** *** 1350,1353 **** --- 1373,1377 ---- /* Output before writable data. */ + /* Supposedly the assembler rejects the command if there is no tab! */ #define DATA_SECTION_ASM_OP "\t.SPACE $PRIVATE$\n\t.SUBSPA $DATA$\n" *************** *** 1369,1373 **** "20", "20R", "21", "21R", "22", "22R", "23", "23R", \ "24", "24R", "25", "25R", "26", "26R", "27", "27R", \ ! "28", "28R", "29", "29R", "30", "30R", "31", "31R"} /* How to renumber registers for dbx and gdb. */ --- 1393,1397 ---- "20", "20R", "21", "21R", "22", "22R", "23", "23R", \ "24", "24R", "25", "25R", "26", "26R", "27", "27R", \ ! "28", "28R", "29", "29R", "30", "30R", "31", "31R", "SAR"} /* How to renumber registers for dbx and gdb. */ *************** *** 1611,1615 **** #define SMALL_INT(OP) INT_14_BITS (OP) ! /* Define functions in out-sparc.c and used in insn-output.c. */ extern char *output_move_double (); --- 1635,1639 ---- #define SMALL_INT(OP) INT_14_BITS (OP) ! /* Define functions in hp800.c and used in insn-output.c. */ extern char *output_move_double (); diff -rc2N gcc-2.0/config/hp800.md gcc-2.1/config/hp800.md *** gcc-2.0/config/hp800.md Wed Jan 29 00:45:52 1992 --- gcc-2.1/config/hp800.md Mon Mar 16 14:03:36 1992 *************** *** 407,411 **** (match_operator:CC 3 "comparison_operator" [(match_operand:SI 1 "register_operand" "r,r") ! (match_operand:SI 2 "arith_operand" "r,J")]))] "" "* --- 407,411 ---- (match_operator:CC 3 "comparison_operator" [(match_operand:SI 1 "register_operand" "r,r") ! (match_operand:SI 2 "arith11_operand" "r,I")]))] "" "* *************** *** 799,803 **** (define_insn "" ! [(set (match_operand:SI 0 "fp_reg_operand" "fxy") (match_operand:SI 1 "short_memory_operand" "T"))] "" --- 799,803 ---- (define_insn "" ! [(set (match_operand:SI 0 "fp_reg_operand" "*f*x*y") (match_operand:SI 1 "short_memory_operand" "T"))] "" *************** *** 808,812 **** (define_insn "" [(set (match_operand:SI 0 "short_memory_operand" "T") ! (match_operand:SI 1 "fp_reg_operand" "fxy"))] "" "fstws%F0 %1,%0" --- 808,812 ---- (define_insn "" [(set (match_operand:SI 0 "short_memory_operand" "T") ! (match_operand:SI 1 "fp_reg_operand" "*f*x*y"))] "" "fstws%F0 %1,%0" *************** *** 902,915 **** [(parallel [(set (mem:BLK (match_operand:BLK 0 "general_operand" "")) (mem:BLK (match_operand:BLK 1 "general_operand" ""))) - (use (match_operand:SI 2 "arith_operand" "")) - (use (match_operand:SI 3 "immediate_operand" "")) (clobber (match_dup 0)) (clobber (match_dup 1)) (clobber (match_scratch:SI 4 "")) ! (clobber (reg:SI 0)) ! (clobber (match_scratch:SI 5 ""))])] "" " { operands[0] = copy_to_mode_reg (SImode, XEXP (operands[0], 0)); operands[1] = copy_to_mode_reg (SImode, XEXP (operands[1], 0)); --- 902,923 ---- [(parallel [(set (mem:BLK (match_operand:BLK 0 "general_operand" "")) (mem:BLK (match_operand:BLK 1 "general_operand" ""))) (clobber (match_dup 0)) (clobber (match_dup 1)) (clobber (match_scratch:SI 4 "")) ! (clobber (match_scratch:SI 5 "")) ! (use (match_operand:SI 2 "arith_operand" "")) ! (use (match_operand:SI 3 "const_int_operand" ""))])] "" " { + /* If the blocks are not word-aligned and rather big (>16 items), + or the size is indeterminate, don't inline the copy code. A + procedure call is better since it can check the alignment at + runtime and make the optimal decisions. */ + if (INTVAL (operands[3]) != 4 + && (GET_CODE (operands[2]) != CONST_INT + || (INTVAL (operands[2]) / INTVAL (operands[3]) > 16))) + FAIL; + operands[0] = copy_to_mode_reg (SImode, XEXP (operands[0], 0)); operands[1] = copy_to_mode_reg (SImode, XEXP (operands[1], 0)); *************** *** 917,932 **** }") (define_insn "" ! [(set (mem:BLK (match_operand:SI 0 "register_operand" "r")) ! (mem:BLK (match_operand:SI 1 "register_operand" "r"))) ! (use (match_operand:SI 2 "arith_operand" "rn")) ! (use (match_operand:SI 3 "immediate_operand" "i")) (clobber (match_dup 0)) (clobber (match_dup 1)) ! (clobber (match_scratch:SI 4 "=&r")) ! (clobber (reg:SI 0)) ! (clobber (match_scratch:SI 5 "=&a"))] "" ! "* return output_block_move (operands);" [(set_attr "type" "multi")]) --- 925,944 ---- }") + ;; The operand constraints are written like this to support both compile-time + ;; and run-time determined byte count. If the count is run-time determined, + ;; the register with the byte count is clobbered by the copying code, and + ;; therefore it is forced to operand 2. If the count is compile-time + ;; determined, we need two scratch registers for the unrolled code. (define_insn "" ! [(set (mem:BLK (match_operand:SI 0 "register_operand" "r,r")) ! (mem:BLK (match_operand:SI 1 "register_operand" "r,r"))) (clobber (match_dup 0)) (clobber (match_dup 1)) ! (clobber (match_scratch:SI 2 "=r,r")) ;loop cnt/item tmp ! (clobber (match_scratch:SI 3 "=r,r")) ;item tmp ! (use (match_operand:SI 4 "arith_operand" "J,2")) ;byte count ! (use (match_operand:SI 5 "const_int_operand" "n,n"))] ;alignment "" ! "* return output_block_move (operands, !which_alternative);" [(set_attr "type" "multi")]) *************** *** 993,997 **** [(set (match_operand:DI 0 "reg_or_nonsymb_mem_operand" "=r,Q,&r,&r,*f*x*y,*f*x*y,*f*x*y,r,Q") ! (match_operand:DI 1 "general_operand" "r,r,Q,i,r,*f*x*y,Q,*f*x*y,*f*x*y"))] "" "* --- 1005,1010 ---- [(set (match_operand:DI 0 "reg_or_nonsymb_mem_operand" "=r,Q,&r,&r,*f*x*y,*f*x*y,*f*x*y,r,Q") ! (match_operand:DI 1 "general_operand" ! "r,r,Q,i,r,*f*x*y,Q,*f*x*y,*f*x*y"))] "" "* *************** *** 1220,1235 **** (define_insn "fix_truncsfsi2" ! [(set (match_operand:SI 0 "register_operand" "=fxy") ! (fix:SI (fix:SF (match_operand:SF 1 "register_operand" "fxy"))))] "" ! "fcnvfxt,sgl,sgl %1,%0" ! [(set_attr "type" "fpalu")]) (define_insn "fix_truncdfsi2" ! [(set (match_operand:SI 0 "register_operand" "=fxy") ! (fix:SI (fix:DF (match_operand:DF 1 "register_operand" "fxy"))))] "" ! "fcnvfxt,dbl,sgl %1,%0" ! [(set_attr "type" "fpalu")]) --- 1233,1256 ---- (define_insn "fix_truncsfsi2" ! [(set (match_operand:SI 0 "register_operand" "=r,fxy") ! (fix:SI (fix:SF (match_operand:SF 1 "register_operand" "fxy,fxy")))) ! (clobber (match_scratch:SI 2 "=&fxy,X"))] "" ! "@ ! fcnvfxt,sgl,sgl %1,%2\;fstws %2,-16(30)\;ldw -16(30),%0 ! fcnvfxt,sgl,sgl %1,%0" ! [(set_attr "type" "fpalu,fpalu") ! (set_attr "length" "3,1")]) (define_insn "fix_truncdfsi2" ! [(set (match_operand:SI 0 "register_operand" "=r,fxy") ! (fix:SI (fix:DF (match_operand:DF 1 "register_operand" "fxy,fxy")))) ! (clobber (match_scratch:SI 2 "=&fxy,X"))] "" ! "@ ! fcnvfxt,dbl,sgl %1,%2\;fstws %2,-16(30)\;ldw -16(30),%0 ! fcnvfxt,dbl,sgl %1,%0" ! [(set_attr "type" "fpalu,fpalu") ! (set_attr "length" "3,1")]) *************** *** 1247,1251 **** (define_insn "addsi3" [(set (match_operand:SI 0 "register_operand" "=r,r") ! (plus:SI (match_operand:SI 1 "arith_operand" "%r,r") (match_operand:SI 2 "arith_operand" "r,J")))] "" --- 1268,1272 ---- (define_insn "addsi3" [(set (match_operand:SI 0 "register_operand" "=r,r") ! (plus:SI (match_operand:SI 1 "register_operand" "%r,r") (match_operand:SI 2 "arith_operand" "r,J")))] "" *************** *** 1262,1280 **** [(set_attr "length" "2")]) (define_insn "subsi3" [(set (match_operand:SI 0 "register_operand" "=r,r") ! (minus:SI (match_operand:SI 1 "arith_operand" "r,r") ! (match_operand:SI 2 "arith_operand" "r,J")))] "" "@ sub %1,%2,%0 ! ldo %n2(%1),%0") ! ;; The mulsi3 insns set up registers for the millicode call. However, ! ;; if the multiplication involves constants, all that is ! ;; short-circuited. ! ;; ! ;; The algorithm used by output_mul_by_constant requires the source ! ;; and destination to be in different registers. (define_expand "mulsi3" --- 1283,1306 ---- [(set_attr "length" "2")]) + ;(define_insn "subsi3" + ; [(set (match_operand:SI 0 "register_operand" "=r,r,r") + ; (minus:SI (match_operand:SI 1 "arith11_operand" "r,I,r") + ; (match_operand:SI 2 "arith_operand" "r,r,J")))] + ; "" + ; "@ + ; sub %1,%2,%0 + ; subi %1,%2,%0 + ; ldo %n2(%1),%0") + (define_insn "subsi3" [(set (match_operand:SI 0 "register_operand" "=r,r") ! (minus:SI (match_operand:SI 1 "arith11_operand" "r,I") ! (match_operand:SI 2 "register_operand" "r,r")))] "" "@ sub %1,%2,%0 ! subi %1,%2,%0") ! ;; The mulsi3 insns set up registers for the millicode call. (define_expand "mulsi3" *************** *** 1288,1323 **** (set (match_operand:SI 0 "register_operand" "") (reg:SI 29))] "" ! " ! { ! if (GET_CODE (operands[1]) == CONST_INT) ! { ! if (GET_CODE (operands[2]) == CONST_INT) ! emit_move_insn (operands[0], ! gen_rtx (CONST_INT, VOIDmode, ! INTVAL (operands[1]) * INTVAL (operands[2]))); ! else ! { ! rtx temp; ! ! if (GET_CODE (operands[2]) == REG) ! temp = make_safe_from (operands[2], operands[0]); ! else ! temp = copy_to_reg (operands[2]); ! operands[2] = operands[1]; ! operands[1] = temp; ! emit_mul_by_constant (operands, 0); ! } ! DONE; ! } ! else if (GET_CODE (operands[2]) == CONST_INT) ! { ! if (GET_CODE (operands[1]) == REG) ! operands[1] = make_safe_from (operands[1], operands[0]); ! else ! operands[1] = copy_to_reg (operands[1]); ! emit_mul_by_constant (operands, 0); ! DONE; ! } ! }") (define_insn "" --- 1314,1318 ---- (set (match_operand:SI 0 "register_operand" "") (reg:SI 29))] "" ! "") (define_insn "" *************** *** 1341,1346 **** (clobber (reg:SI 25)) (clobber (reg:SI 31))]) ! (set (match_operand:SI 0 "general_operand" "") (reg:SI 29)) ! ] "" " --- 1336,1340 ---- (clobber (reg:SI 25)) (clobber (reg:SI 31))]) ! (set (match_operand:SI 0 "general_operand" "") (reg:SI 29))] "" " *************** *** 1366,1370 **** }") - (define_insn "" [(set (reg:SI 29) --- 1360,1363 ---- *************** *** 1387,1392 **** (clobber (reg:SI 25)) (clobber (reg:SI 31))]) ! (set (match_operand:SI 0 "general_operand" "") (reg:SI 29)) ! ] "" " --- 1380,1384 ---- (clobber (reg:SI 25)) (clobber (reg:SI 31))]) ! (set (match_operand:SI 0 "general_operand" "") (reg:SI 29))] "" " *************** *** 1757,1766 **** [(set_attr "type" "fpsqrtsgl")]) ! ;;- arithmetic shift instructions ! ! ;; A safe subtraction insn for values going into the shift register. ;; Optimized special case of shifting. - ;; Must precede the general case. ? (define_insn "" --- 1749,1755 ---- [(set_attr "type" "fpsqrtsgl")]) ! ;;- Shift instructions ;; Optimized special case of shifting. (define_insn "" *************** *** 1773,1779 **** (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (plus:SI (match_operand:SI 1 "register_operand" "r") ! (mult:SI (match_operand:SI 2 "register_operand" "r") ! (const_int 2))))] "" "sh1add %2,%1,%0") --- 1762,1768 ---- (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r") ! (const_int 2)) ! (match_operand:SI 1 "register_operand" "r")))] "" "sh1add %2,%1,%0") *************** *** 1781,1787 **** (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (plus:SI (match_operand:SI 1 "register_operand" "r") ! (mult:SI (match_operand:SI 2 "register_operand" "r") ! (const_int 4))))] "" "sh2add %2,%1,%0") --- 1770,1776 ---- (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r") ! (const_int 4)) ! (match_operand:SI 1 "register_operand" "r")))] "" "sh2add %2,%1,%0") *************** *** 1789,1795 **** (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (plus:SI (match_operand:SI 1 "register_operand" "r") ! (mult:SI (match_operand:SI 2 "register_operand" "r") ! (const_int 8))))] "" "sh3add %2,%1,%0") --- 1778,1784 ---- (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") ! (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r") ! (const_int 8)) ! (match_operand:SI 1 "register_operand" "r")))] "" "sh3add %2,%1,%0") diff -rc2N gcc-2.0/config/hp800hpux.h gcc-2.1/config/hp800hpux.h *** gcc-2.0/config/hp800hpux.h --- gcc-2.1/config/hp800hpux.h Tue Mar 17 17:58:02 1992 *************** *** 0 **** --- 1,14 ---- + #include "hp800.h" + + /* Make GCC agree with types.h. */ + #define SIZE_TYPE "unsigned int" + + /* HPUX doesn't use any debugging format that GCC knows about. */ + #undef DBX_DEBUGGING_INFO + + /* Like the default, except no -lg. */ + #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" + + /* Control how gcc finds libgcc.a and how it passes -L options. */ + #define LINK_LIBGCC_SPECIAL + #define RELATIVE_PREFIX_NOT_LINKDIR diff -rc2N gcc-2.0/config/i386.c gcc-2.1/config/i386.c *** gcc-2.0/config/i386.c Fri Feb 14 15:32:25 1992 --- gcc-2.1/config/i386.c Thu Mar 19 01:13:20 1992 *************** *** 32,35 **** --- 32,42 ---- #include "flags.h" + #ifdef EXTRA_CONSTRAINT + /* If EXTRA_CONSTRAINT is defined, then the 'S' + constraint in REG_CLASS_FROM_LETTER will no longer work, and various + asm statements that need 'S' for class SIREG will break. */ + #error EXTRA_CONSTRAINT conflicts with S constraint letter + #endif + #define AT_BP(mode) (gen_rtx (MEM, (mode), frame_pointer_rtx)) *************** *** 50,54 **** { /* ax, dx, cx, bx */ ! AREG, DREG, CREG, Q_REGS, /* si, di, bp, sp */ SIREG, DIREG, INDEX_REGS, GENERAL_REGS, --- 57,61 ---- { /* ax, dx, cx, bx */ ! AREG, DREG, CREG, BREG, /* si, di, bp, sp */ SIREG, DIREG, INDEX_REGS, GENERAL_REGS, *************** *** 319,323 **** split_double (operands[1], &operands[1], &latehalf[1]); else if (CONSTANT_P (operands[1])) ! latehalf[1] = const0_rtx; } else --- 326,335 ---- split_double (operands[1], &operands[1], &latehalf[1]); else if (CONSTANT_P (operands[1])) ! { ! if (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) < 0) ! latehalf[1] = constm1_rtx; ! else ! latehalf[1] = const0_rtx; ! } } else *************** *** 791,799 **** else output_asm_insn ("ret %1", xops); - } - else if (current_function_returns_struct) - { - xops[0] = gen_rtx (CONST_INT, VOIDmode, 4); - output_asm_insn ("ret %0", xops); } else --- 803,806 ---- diff -rc2N gcc-2.0/config/i386.h gcc-2.1/config/i386.h *** gcc-2.0/config/i386.h Sun Feb 9 08:28:48 1992 --- gcc-2.1/config/i386.h Sat Mar 14 00:15:41 1992 *************** *** 20,24 **** /* The purpose of this file is to define the characteristics of the i386, ! independant of assembler syntax or operating system. Three other files build on this one to describe a specific assembler syntax: --- 20,24 ---- /* The purpose of this file is to define the characteristics of the i386, ! independent of assembler syntax or operating system. Three other files build on this one to describe a specific assembler syntax: *************** *** 92,96 **** #define WORDS_BIG_ENDIAN 0 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 92,96 ---- #define WORDS_BIG_ENDIAN 0 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 130,136 **** #define BIGGEST_ALIGNMENT 32 ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! /* #define STRICT_ALIGNMENT */ /* If bit field type is int, don't let it cross an int, --- 130,136 ---- #define BIGGEST_ALIGNMENT 32 ! /* Set this non-zero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 0 /* If bit field type is int, don't let it cross an int, *************** *** 310,320 **** For any two classes, it is very desirable that there be another ! class that represents their union. */ ! enum reg_class { NO_REGS, ! AREG, DREG, CREG, Q_REGS, /* %eax %ebx %ecx %edx */ SIREG, DIREG, --- 310,323 ---- For any two classes, it is very desirable that there be another ! class that represents their union. + It might seem that class BREG is unnecessary, since no useful 386 + opcode needs reg %ebx. But some systems pass args to the OS in ebx, + and the "b" register constraint is useful in asms for syscalls. */ + enum reg_class { NO_REGS, ! AREG, DREG, CREG, BREG, Q_REGS, /* %eax %ebx %ecx %edx */ SIREG, DIREG, *************** *** 332,336 **** #define REG_CLASS_NAMES \ { "NO_REGS", \ ! "AREG", "DREG", "CREG", \ "Q_REGS", \ "SIREG", "DIREG", \ --- 335,339 ---- #define REG_CLASS_NAMES \ { "NO_REGS", \ ! "AREG", "DREG", "CREG", "BREG", \ "Q_REGS", \ "SIREG", "DIREG", \ *************** *** 347,351 **** #define REG_CLASS_CONTENTS \ { 0, \ ! 0x1, 0x2, 0x4, /* AREG, DREG, CREG */ \ 0xf, /* Q_REGS */ \ 0x10, 0x20, /* SIREG, DIREG */ \ --- 350,354 ---- #define REG_CLASS_CONTENTS \ { 0, \ ! 0x1, 0x2, 0x4, 0x8, /* AREG, DREG, CREG, BREG */ \ 0xf, /* Q_REGS */ \ 0x10, 0x20, /* SIREG, DIREG */ \ *************** *** 410,413 **** --- 413,417 ---- (C) == 'u' ? FP_SECOND_REG : \ (C) == 'a' ? AREG : \ + (C) == 'b' ? BREG : \ (C) == 'c' ? CREG : \ (C) == 'd' ? DREG : \ *************** *** 436,443 **** /* Similar, but for floating constants, and defining letters G and H. ! Here VALUE is the CONST_DOUBLE rtx itself. */ #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ ! ((C) == 'G' ? (TARGET_80387 && standard_80387_constant_p (VALUE)) : 0) /* Place additional restrictions on the register class to use when it --- 440,449 ---- /* Similar, but for floating constants, and defining letters G and H. ! Here VALUE is the CONST_DOUBLE rtx itself. We allow constants even if ! TARGET_387 isn't set, because the stack register converter may need to ! load 0.0 into the function value register. */ #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ ! ((C) == 'G' ? standard_80387_constant_p (VALUE) : 0) /* Place additional restrictions on the register class to use when it *************** *** 989,993 **** function named by the symbol (such as what section it is in). ! On i386, if using PIC, mark a SYMBOL_REF for a static declaration so that we may access it directly in the GOT. */ --- 995,999 ---- function named by the symbol (such as what section it is in). ! On i386, if using PIC, mark a SYMBOL_REF for a non-global symbol so that we may access it directly in the GOT. */ *************** *** 997,1003 **** if (flag_pic) \ { \ ! rtx decl_rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) == 'c' \ ! ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ ! SYMBOL_REF_FLAG (XEXP (decl_rtl, 0)) = ! TREE_PUBLIC (DECL); \ } \ } \ --- 1003,1011 ---- if (flag_pic) \ { \ ! rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ ! ? TREE_CST_RTL (DECL) : DECL_RTL (DECL)); \ ! SYMBOL_REF_FLAG (XEXP (rtl, 0)) \ ! = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \ ! || ! TREE_PUBLIC (DECL)); \ } \ } \ *************** *** 1202,1206 **** */ ! /* note the last four are not really qi_registsers, but the md will have to never output movb into one of them only a movw . There is no movb into the last four regs */ --- 1210,1214 ---- */ ! /* note the last four are not really qi_registers, but the md will have to never output movb into one of them only a movw . There is no movb into the last four regs */ diff -rc2N gcc-2.0/config/i386.md gcc-2.1/config/i386.md *** gcc-2.0/config/i386.md Sat Feb 15 16:27:49 1992 --- gcc-2.1/config/i386.md Sat Mar 14 00:15:43 1992 *************** *** 253,260 **** ;; logical compare - ;; ??? What if we are testing one byte of an offsettable memory reference? (define_insn "" [(set (cc0) ! (and:SI (match_operand:SI 0 "general_operand" "%rm") (match_operand:SI 1 "general_operand" "ri")))] "" --- 253,259 ---- ;; logical compare (define_insn "" [(set (cc0) ! (and:SI (match_operand:SI 0 "general_operand" "%ro") (match_operand:SI 1 "general_operand" "ri")))] "" *************** *** 263,280 **** /* For small integers, we may actually use testb. */ if (GET_CODE (operands[1]) == CONST_INT ! && (INTVAL (operands[1]) & ~0xffff) == 0 ! && ! (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))) { /* We may set the sign bit spuriously. */ - cc_status.flags |= CC_NOT_NEGATIVE; ! if (! NON_QI_REG_P (operands[0]) && (INTVAL (operands[1]) & ~0xff) == 0) ! return AS2 (test%B0,%1,%b0); ! if (QI_REG_P (operands[0]) && (INTVAL (operands[1]) & ~0xff00) == 0) { operands[1] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[1]) >> 8); ! return AS2 (test%B0,%1,%h0); } } --- 262,310 ---- /* For small integers, we may actually use testb. */ if (GET_CODE (operands[1]) == CONST_INT ! && ! (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0])) ! && ! NON_QI_REG_P (operands[0])) { /* We may set the sign bit spuriously. */ ! if ((INTVAL (operands[1]) & ~0xff) == 0) ! { ! cc_status.flags |= CC_NOT_NEGATIVE; ! return AS2 (test%B0,%1,%b0); ! } ! if ((INTVAL (operands[1]) & ~0xff00) == 0) { + cc_status.flags |= CC_NOT_NEGATIVE; operands[1] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[1]) >> 8); ! ! if (QI_REG_P (operands[0])) ! return AS2 (test%B0,%1,%h0); ! else ! { ! operands[0] = adj_offsettable_operand (operands[0], 1); ! return AS2 (test%B0,%1,%b0); ! } ! } ! ! if (GET_CODE (operands[0]) == MEM ! && (INTVAL (operands[1]) & ~0xff0000) == 0) ! { ! cc_status.flags |= CC_NOT_NEGATIVE; ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! INTVAL (operands[1]) >> 16); ! ! operands[0] = adj_offsettable_operand (operands[0], 2); ! return AS2 (test%B0,%1,%b0); ! } ! ! if (GET_CODE (operands[0]) == MEM ! && (INTVAL (operands[1]) & ~0xff000000) == 0) ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! (INTVAL (operands[1]) >> 24) & 0xff); ! ! operands[0] = adj_offsettable_operand (operands[0], 3); ! return AS2 (test%B0,%1,%b0); } } *************** *** 288,292 **** (define_insn "" [(set (cc0) ! (and:HI (match_operand:HI 0 "general_operand" "%rm") (match_operand:HI 1 "general_operand" "ri")))] "" --- 318,322 ---- (define_insn "" [(set (cc0) ! (and:HI (match_operand:HI 0 "general_operand" "%ro") (match_operand:HI 1 "general_operand" "ri")))] "" *************** *** 294,303 **** { if (GET_CODE (operands[1]) == CONST_INT ! && ! (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0]))) { ! /* Can we ignore the upper byte? */ ! if (! NON_QI_REG_P (operands[0]) ! && (INTVAL (operands[1]) & 0xff00) == 0) { if (INTVAL (operands[1]) & 0xffff0000) operands[1] = gen_rtx (CONST_INT, VOIDmode, --- 324,333 ---- { if (GET_CODE (operands[1]) == CONST_INT ! && ! (GET_CODE (operands[0]) == MEM && MEM_VOLATILE_P (operands[0])) ! && ! NON_QI_REG_P (operands[0])) { ! if ((INTVAL (operands[1]) & 0xff00) == 0) { + /* ??? This might not be necessary. */ if (INTVAL (operands[1]) & 0xffff0000) operands[1] = gen_rtx (CONST_INT, VOIDmode, *************** *** 309,319 **** } ! /* Can we ignore the lower byte? */ ! /* ??? what about offsettable memory references? */ ! if (QI_REG_P (operands[0]) && (INTVAL (operands[1]) & 0xff) == 0) { operands[1] = gen_rtx (CONST_INT, VOIDmode, (INTVAL (operands[1]) >> 8) & 0xff); ! return AS2 (test%B0,%1,%h0); } } --- 339,354 ---- } ! if ((INTVAL (operands[1]) & 0xff) == 0) { operands[1] = gen_rtx (CONST_INT, VOIDmode, (INTVAL (operands[1]) >> 8) & 0xff); ! ! if (QI_REG_P (operands[0])) ! return AS2 (test%B0,%1,%h0); ! else ! { ! operands[0] = adj_offsettable_operand (operands[0], 1); ! return AS2 (test%B0,%1,%b0); ! } } } *************** *** 748,792 **** ;;- NONE - ;;- truncation instructions - - (define_insn "truncsiqi2" - [(set (match_operand:QI 0 "general_operand" "=q,qm") - (truncate:QI - (match_operand:SI 1 "general_operand" "qim,qn")))] - "" - "* - { - if (CONSTANT_P (operands[1]) && GET_CODE (operands[1]) != CONST_INT) - return AS2 (mov%L0,%1,%k0); - - return AS2 (mov%B0,%b1,%0); - }") - - (define_insn "trunchiqi2" - [(set (match_operand:QI 0 "general_operand" "=q,qm") - (truncate:QI - (match_operand:HI 1 "general_operand" "qim,qn")))] - "" - "* - { - if (CONSTANT_P (operands[1]) && GET_CODE (operands[1]) != CONST_INT) - return AS2 (mov%L0,%1,%k0); - - return AS2 (mov%B0,%b1,%0); - }") - - (define_insn "truncsihi2" - [(set (match_operand:HI 0 "general_operand" "=r,rm") - (truncate:HI - (match_operand:SI 1 "general_operand" "rim,rn")))] - "" - "* - { - if (CONSTANT_P (operands[1]) && GET_CODE (operands[1]) != CONST_INT) - return AS2 (mov%L0,%1,%k0); - - return AS2 (mov%W0,%w1,%0); - }") - ;;- zero extension instructions ;; See comments by `andsi' for when andl is faster than movzx. --- 783,786 ---- *************** *** 1061,1065 **** }") ! ;; These match a signed convertion of either DFmode or SFmode to DImode. (define_insn "" --- 1055,1059 ---- }") ! ;; These match a signed conversion of either DFmode or SFmode to DImode. (define_insn "" *************** *** 1114,1118 **** ;; The actual pattern that matches these is at the end of this file. ! ;; ??? Possibly repsent floatunssidf2 here in gcc2. (define_expand "floatsisf2" --- 1108,1112 ---- ;; The actual pattern that matches these is at the end of this file. ! ;; ??? Possibly represent floatunssidf2 here in gcc2. (define_expand "floatsisf2" *************** *** 1861,1865 **** if (INTVAL (operands[2]) == 0xff) ! return AS1 (not%B0,%0); return AS2 (xor%B0,%2,%b0); --- 1855,1859 ---- if (INTVAL (operands[2]) == 0xff) ! return AS1 (not%B0,%b0); return AS2 (xor%B0,%2,%b0); *************** *** 1902,1906 **** if (INTVAL (operands[2]) == 0xff) ! return AS1 (not%B0,%0); return AS2 (xor%B0,%2,%b0); --- 1896,1900 ---- if (INTVAL (operands[2]) == 0xff) ! return AS1 (not%B0,%b0); return AS2 (xor%B0,%2,%b0); *************** *** 2623,2626 **** --- 2617,2624 ---- ;; bt on the MEM directly. + ;; ??? The first argument of a zero_extract must not be reloaded, so + ;; don't allow a MEM in the operand predicate without allowing it in the + ;; constraint. + (define_insn "" [(set (cc0) (zero_extract (match_operand:QI 0 "register_operand" "q") *************** *** 2644,2677 **** }") ! (define_insn "" ! [(set (cc0) (zero_extract (match_operand:QI 0 "memory_operand" "m") ! (const_int 1) ! (match_operand:SI 1 "general_operand" "ri"))) ! (clobber (match_scratch:SI 2 "=&r"))] ! "" ! "* ! { ! /* Copy memory to scratch register; pretend it was there to start with. */ ! if (GET_CODE (operands[0]) == MEM) ! { ! output_asm_insn (AS2 (mov%L2,%0,%2), operands); ! operands[0] = operands[2]; ! } ! if (GET_CODE (operands[1]) == CONST_INT) ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, 1 << INTVAL (operands[1])); ! output_asm_insn (AS2 (test%L0,%1,%0), operands); ! } ! else ! { ! operands[0] = gen_rtx (REG, SImode, REGNO (operands[0])); ! cc_status.flags |= CC_Z_IN_NOT_C; ! output_asm_insn (AS2 (bt%L0,%1,%0), operands); ! } ! RET; ! }") (define_insn "" ! [(set (cc0) (zero_extract (match_operand:HI 0 "nonimmediate_operand" "r") (const_int 1) (match_operand:SI 1 "general_operand" "ri")))] --- 2642,2651 ---- }") ! ;; ??? The first argument of a zero_extract must not be reloaded, so ! ;; don't allow a MEM in the operand predicate without allowing it in the ! ;; constraint. (define_insn "" ! [(set (cc0) (zero_extract (match_operand:HI 0 "register_operand" "r") (const_int 1) (match_operand:SI 1 "general_operand" "ri")))] *************** *** 2681,2686 **** if (GET_CODE (operands[1]) == CONST_INT) { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, 1 << INTVAL (operands[1])); ! output_asm_insn (AS2 (test%W0,%1,%0), operands); } else --- 2655,2684 ---- if (GET_CODE (operands[1]) == CONST_INT) { ! if (QI_REG_P (operands[0]) && INTVAL (operands[1]) < 8) ! { ! cc_status.flags |= CC_NOT_NEGATIVE; ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! 1 << INTVAL (operands[1])); ! ! output_asm_insn (AS2 (test%B0,%1,%b0), operands); ! } ! else if (QI_REG_P (operands[0])) ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! 1 << (INTVAL (operands[1]) - 8)); ! ! output_asm_insn (AS2 (test%B0,%1,%h0), operands); ! } ! else ! { ! /* ??? This will never set CC to negative, even if we test ! the sign bit of the HImode reg. But CC0 is only tested ! for EQ and NE after this insn. */ ! ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! 1 << INTVAL (operands[1])); ! ! output_asm_insn (AS2 (test%L0,%1,%k0), operands); ! } } else *************** *** 2692,2697 **** }") (define_insn "" ! [(set (cc0) (zero_extract (match_operand:SI 0 "nonimmediate_operand" "r") (const_int 1) (match_operand:SI 1 "general_operand" "ri")))] --- 2690,2699 ---- }") + ;; ??? The first argument of a zero_extract must not be reloaded, so + ;; don't allow a MEM in the operand predicate without allowing it in the + ;; constraint. + (define_insn "" ! [(set (cc0) (zero_extract (match_operand:SI 0 "register_operand" "r") (const_int 1) (match_operand:SI 1 "general_operand" "ri")))] *************** *** 2701,2706 **** if (GET_CODE (operands[1]) == CONST_INT) { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, 1 << INTVAL (operands[1])); ! output_asm_insn (AS2 (test%L0,%1,%0), operands); } else --- 2703,2729 ---- if (GET_CODE (operands[1]) == CONST_INT) { ! if (QI_REG_P (operands[0]) && INTVAL (operands[1]) < 8) ! { ! cc_status.flags |= CC_NOT_NEGATIVE; ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! 1 << INTVAL (operands[1])); ! ! output_asm_insn (AS2 (test%B0,%1,%b0), operands); ! } ! else if (QI_REG_P (operands[0]) && INTVAL (operands[1]) < 16) ! { ! cc_status.flags |= CC_NOT_NEGATIVE; ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! 1 << (INTVAL (operands[1]) - 8)); ! ! output_asm_insn (AS2 (test%B0,%1,%h0), operands); ! } ! else ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! 1 << INTVAL (operands[1])); ! ! output_asm_insn (AS2 (test%L0,%1,%0), operands); ! } } else *************** *** 3080,3108 **** (define_expand "casesi" ! [(parallel [(set (pc) ! (if_then_else (leu (minus:SI ! (match_operand:SI 0 "general_operand" "") ! (match_operand:SI 1 "const_int_operand" "")) ! (match_operand:SI 2 "const_int_operand" "")) ! (plus:SI (mem:SI (plus:SI (pc) ! (minus:SI (match_dup 0) ! (match_dup 1)))) ! (label_ref (match_operand 3 "" ""))) ! (pc))) ! (use (label_ref (match_operand 4 "" ""))) ! (clobber (match_scratch:SI 5 ""))])] "flag_pic" " { ! rtx reg = gen_reg_rtx (SImode); ! current_function_uses_pic_offset_table = 1; - - emit_insn (gen_subsi3 (reg, operands[0], operands[1])); - emit_insn (gen_cmpsi (reg, operands[2])); - emit_jump_insn (gen_bgtu (operands[4])); - operands[0] = reg; - operands[1] = CONST0_RTX (SImode); }") --- 3103,3129 ---- (define_expand "casesi" ! [(set (match_dup 5) ! (minus:SI (match_operand:SI 0 "general_operand" "") ! (match_operand:SI 1 "general_operand" ""))) ! (set (cc0) ! (compare (match_dup 5) ! (match_operand:SI 2 "general_operand" ""))) ! (set (pc) ! (if_then_else (gtu (cc0) ! (const_int 0)) ! (label_ref (match_operand 4 "" "")) ! (pc))) ! (parallel [(set (pc) ! (minus:SI (reg:SI 3) ! (mem:SI (plus:SI (mult:SI (match_dup 5) ! (const_int 4)) ! (label_ref (match_operand 3 "" "")))))) ! (clobber (match_scratch:SI 6 ""))])] "flag_pic" " { ! operands[5] = gen_reg_rtx (SImode); current_function_uses_pic_offset_table = 1; }") *************** *** 3138,3152 **** (define_insn "" [(set (pc) ! (if_then_else (leu (minus:SI ! (match_operand:SI 0 "general_operand" "r") ! (match_operand:SI 1 "const_int_operand" "i")) ! (match_operand:SI 2 "const_int_operand" "i")) ! (plus:SI (mem:SI (plus:SI (pc) ! (minus:SI (match_dup 0) ! (match_dup 1)))) ! (label_ref (match_operand 3 "" ""))) ! (pc))) ! (use (label_ref (match_operand 4 "" ""))) ! (clobber (match_scratch:SI 5 "=&r"))] "" "* --- 3159,3168 ---- (define_insn "" [(set (pc) ! (minus:SI (reg:SI 3) ! (mem:SI (plus:SI ! (mult:SI (match_operand:SI 0 "register_operand" "r") ! (const_int 4)) ! (label_ref (match_operand 1 "" "")))))) ! (clobber (match_scratch:SI 2 "=&r"))] "" "* *************** *** 3154,3165 **** rtx xops[4]; ! xops[0] = pic_offset_table_rtx; ! xops[1] = operands[5]; ! xops[2] = operands[3]; ! xops[3] = operands[0]; ! ! output_asm_insn (AS2 (mov%L1,%0,%1), xops); ! output_asm_insn (\"sub%L1 %l2@GOTOFF(%0,%3,4),%1\", xops); ! output_asm_insn (AS1 (jmp,%*%1), xops); ASM_OUTPUT_ALIGN_CODE (asm_out_file); RET; --- 3170,3181 ---- rtx xops[4]; ! xops[0] = operands[0]; ! xops[1] = operands[1]; ! xops[2] = operands[2]; ! xops[3] = pic_offset_table_rtx; ! ! output_asm_insn (AS2 (mov%L2,%3,%2), xops); ! output_asm_insn (\"sub%L2 %l1@GOTOFF(%3,%0,4),%2\", xops); ! output_asm_insn (AS1 (jmp,%*%2), xops); ASM_OUTPUT_ALIGN_CODE (asm_out_file); RET; *************** *** 3419,3423 **** output_asm_insn (\"rep movsd\", xops); #else ! output_asm_insn (\"rep\;movs%L1\", xops); #endif } --- 3435,3439 ---- output_asm_insn (\"rep movsd\", xops); #else ! output_asm_insn (\"rep\;movsl\", xops); #endif } *************** *** 3452,3457 **** (define_insn "" [(set (match_operand:QI 0 "general_operand" "=q") ! (compare (mem:BLK (match_operand:SI 1 "general_operand" "D")) ! (mem:BLK (match_operand:SI 2 "general_operand" "S")))) (use (match_operand:SI 3 "general_operand" "c")) (use (match_operand:SI 4 "immediate_operand" "i")) --- 3468,3473 ---- (define_insn "" [(set (match_operand:QI 0 "general_operand" "=q") ! (compare (mem:BLK (match_operand:SI 1 "general_operand" "S")) ! (mem:BLK (match_operand:SI 2 "general_operand" "D")))) (use (match_operand:SI 3 "general_operand" "c")) (use (match_operand:SI 4 "immediate_operand" "i")) *************** *** 3479,3484 **** (define_insn "" [(set (cc0) ! (compare (mem:BLK (match_operand:SI 0 "general_operand" "D")) ! (mem:BLK (match_operand:SI 1 "general_operand" "S")))) (use (match_operand:SI 2 "general_operand" "c")) (use (match_operand:SI 3 "immediate_operand" "i")) --- 3495,3500 ---- (define_insn "" [(set (cc0) ! (compare (mem:BLK (match_operand:SI 0 "general_operand" "S")) ! (mem:BLK (match_operand:SI 1 "general_operand" "D")))) (use (match_operand:SI 2 "general_operand" "c")) (use (match_operand:SI 3 "immediate_operand" "i")) diff -rc2N gcc-2.0/config/i386bsd.h gcc-2.1/config/i386bsd.h *** gcc-2.0/config/i386bsd.h --- gcc-2.1/config/i386bsd.h Sat Mar 21 15:49:31 1992 *************** *** 0 **** --- 1,8 ---- + /* Configuration for an i386 running 386BSD as the target machine. */ + #include "i386mach.h" + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dunix -Di386" + + /* Specify extra dir to search for include files. */ + #undef SYSTEM_INCLUDE_DIR diff -rc2N gcc-2.0/config/i386isc.h gcc-2.1/config/i386isc.h *** gcc-2.0/config/i386isc.h Sat Nov 30 23:56:29 1991 --- gcc-2.1/config/i386isc.h Fri Mar 13 14:58:13 1992 *************** *** 7,24 **** #include "i386v.h" ! /* Use crt0.o or crt1.o as a startup file and crtn.o as a closing file. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC \ ! "%{!shlib:%{posix:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp0.o%s}}}\ ! %{!posix:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}\ %{p:-L/lib/libp} %{pg:-L/lib/libp}}}\ ! %{shlib:%{posix:crtp1.o%s}%{!posix:crt1.o%s}} " - #define ENDFILE_SPEC "crtn.o%s" - /* Library spec */ #undef LIB_SPEC ! #define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc" /* caller has to pop the extra argument passed to functions that return structures. */ --- 7,28 ---- #include "i386v.h" ! /* Use crt1.o, not crt0.o, as a startup file, and crtn.o as a closing file. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC \ ! "%{!shlib:%{posix:%{pg:mcrtp1.o%s}%{!pg:%{p:mcrtp1.o%s}%{!p:crtp1.o%s}}}\ ! %{!posix:%{pg:mcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}\ %{p:-L/lib/libp} %{pg:-L/lib/libp}}}\ ! %{shlib:%{posix:crtp1.o%s}%{!posix:crt1.o%s}} crtbegin.o%s" ! ! #define ENDFILE_SPEC "crtend.o%s crtn.o%s" /* Library spec */ #undef LIB_SPEC ! #define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc -lg" + #if 0 + /* This is apparently not true: ISC versions up to 3.0,at least, use + the standard calling sequence in which the called function pops the + extra arg. */ /* caller has to pop the extra argument passed to functions that return structures. */ *************** *** 34,36 **** /* On other 386 systems, the last line looks like this: : (aggregate_value_p (FUNTYPE)) ? GET_MODE_SIZE (Pmode) : 0) */ ! --- 38,40 ---- /* On other 386 systems, the last line looks like this: : (aggregate_value_p (FUNTYPE)) ? GET_MODE_SIZE (Pmode) : 0) */ ! #endif diff -rc2N gcc-2.0/config/i386mach.h gcc-2.1/config/i386mach.h *** gcc-2.0/config/i386mach.h Sat Feb 22 02:45:55 1992 --- gcc-2.1/config/i386mach.h Sun Mar 15 00:18:49 1992 *************** *** 10,13 **** --- 10,17 ---- /* Defines to be able to build libgcc.a with GCC. */ + /* It might seem that these are not important, since gcc 2 will never + call libgcc for these functions. But programs might be linked with + code compiled by gcc 1, and then these will be used. */ + #define perform_udivsi3(a,b) \ { \ *************** *** 21,25 **** } ! #define perform_divsi3(a,b) \ { \ register int dx asm("dx"); \ --- 25,29 ---- } ! #define perform_divsi3(a,b) \ { \ register int dx asm("dx"); \ *************** *** 42,46 **** } ! #define perform_modsi3(a,b) \ { \ register int dx asm("dx"); \ --- 46,50 ---- } ! #define perform_modsi3(a,b) \ { \ register int dx asm("dx"); \ *************** *** 52,56 **** } ! #define perform_fix_truncdfsi2(a) \ { \ auto unsigned short ostatus; \ --- 56,60 ---- } ! #define perform_fixdfsi(a) \ { \ auto unsigned short ostatus; \ *************** *** 67,71 **** asm volatile ("fldl %0" : /* no outputs */ : "m" (a)); \ asm volatile ("fistpl %0" : "=m" (ret)); \ ! asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus)); \ \ return ret; \ --- 71,75 ---- asm volatile ("fldl %0" : /* no outputs */ : "m" (a)); \ asm volatile ("fistpl %0" : "=m" (ret)); \ ! asm volatile ("fldcw %0" : /* no outputs */ : "m" (ostatus)); \ \ return ret; \ diff -rc2N gcc-2.0/config/i386rose.h gcc-2.1/config/i386rose.h *** gcc-2.0/config/i386rose.h Sat Feb 22 02:45:59 1992 --- gcc-2.1/config/i386rose.h Fri Mar 20 13:51:40 1992 *************** *** 128,141 **** #define HAVE_ATEXIT - /* If defined, a C string constant for the assembler operation to - identify the following data as initialization code. If not - defined, GNU CC will assume such a section does not exist. - - OSF/rose doesn't presently have an init section, but this macro - also controls whether or not __main is called from main, collect - will however build an initialization section directly. */ - - #define INIT_SECTION_ASM_OP ".init" - /* Define this macro meaning that gcc should find the library 'libgcc.a' by hand, rather than passing the argeument '-lgcc' to tell the linker --- 128,131 ---- *************** *** 156,160 **** } ! #define perform_divsi3(a,b) \ { \ register int dx asm("dx"); \ --- 146,150 ---- } ! #define perform_divsi3(a,b) \ { \ register int dx asm("dx"); \ *************** *** 177,181 **** } ! #define perform_modsi3(a,b) \ { \ register int dx asm("dx"); \ --- 167,171 ---- } ! #define perform_modsi3(a,b) \ { \ register int dx asm("dx"); \ *************** *** 187,191 **** } ! #define perform_fix_truncdfsi2(a) \ { \ auto unsigned short ostatus; \ --- 177,181 ---- } ! #define perform_fixdfsi(a) \ { \ auto unsigned short ostatus; \ *************** *** 202,206 **** asm volatile ("fldl %0" : /* no outputs */ : "m" (a)); \ asm volatile ("fistpl %0" : "=m" (ret)); \ ! asm volatile ("fldcw %0" : /* no outputs */ : "m" (nstatus)); \ \ return ret; \ --- 192,196 ---- asm volatile ("fldl %0" : /* no outputs */ : "m" (a)); \ asm volatile ("fistpl %0" : "=m" (ret)); \ ! asm volatile ("fldcw %0" : /* no outputs */ : "m" (ostatus)); \ \ return ret; \ diff -rc2N gcc-2.0/config/i386sco.h gcc-2.1/config/i386sco.h *** gcc-2.0/config/i386sco.h Thu Dec 19 16:04:58 1991 --- gcc-2.1/config/i386sco.h Sun Mar 8 21:45:20 1992 *************** *** 9,15 **** #undef STARTFILE_SPEC ! #define STARTFILE_SPEC "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}" ! #define ENDFILE_SPEC "crtn.o%s" /* Library spec, including SCO international language support. */ --- 9,15 ---- #undef STARTFILE_SPEC ! #define STARTFILE_SPEC "%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} crtbegin.o%s" ! #define ENDFILE_SPEC "crtend.o%s crtn.o%s" /* Library spec, including SCO international language support. */ *************** *** 24,29 **** --- 24,34 ---- #define CPP_PREDEFINES "-Dunix -Di386 -DM_UNIX -DM_I386 -DM_COFF -DM_WORDSWAP" + #undef CPP_SPEC #define CPP_SPEC "%{scointl:-DM_INTERNAT}" + /* Use atexit for static destructors, instead of defining + our own exit function. */ + #define HAVE_ATEXIT + #if 0 /* Not yet certain whether this is needed. */ /* If no 387, use the general regs to return floating values, *************** *** 43,44 **** --- 48,63 ---- : (MODE) != QImode) #endif + + /* caller has to pop the extra argument passed to functions that return + structures. */ + + #undef RETURN_POPS_ARGS + #define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ + (TREE_CODE (FUNTYPE) == IDENTIFIER_NODE ? 0 \ + : (TARGET_RTD \ + && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ + || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \ + == void_type_node))) ? (SIZE) \ + : 0) + /* On other 386 systems, the last line looks like this: + : (aggregate_value_p (FUNTYPE)) ? GET_MODE_SIZE (Pmode) : 0) */ diff -rc2N gcc-2.0/config/i386sun.h gcc-2.1/config/i386sun.h *** gcc-2.0/config/i386sun.h Thu Jan 30 15:56:41 1992 --- gcc-2.1/config/i386sun.h Thu Feb 27 07:50:32 1992 *************** *** 34,38 **** "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" ! #define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}\ %{g:-lg} %{sun386:}" /* That last item is just to prevent a spurious error. */ --- 34,38 ---- "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" ! #define LIB_SPEC "%{g:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} \ %{g:-lg} %{sun386:}" /* That last item is just to prevent a spurious error. */ *************** *** 39,43 **** #undef LINK_SPEC ! #define LINK_SPEC "%{!e*:-e _start} -dc -dp %{g:-Bstatic} %{static:-Bstatic}" /* Extra switches to give the assembler. */ --- 39,43 ---- #undef LINK_SPEC ! #define LINK_SPEC "%{!e*:-e _start} -dc -dp %{static:-Bstatic}" /* Extra switches to give the assembler. */ diff -rc2N gcc-2.0/config/i386v.h gcc-2.1/config/i386v.h *** gcc-2.0/config/i386v.h Tue Jan 21 22:07:13 1992 --- gcc-2.1/config/i386v.h Thu Mar 19 15:40:58 1992 *************** *** 40,43 **** --- 40,45 ---- %{p:-L/usr/lib/libp}%{pg:-L/usr/lib/libp}" + /* ??? There is a suggestion that -lg is needed here. + Does anyone know whether this is right? */ #define LIB_SPEC "%{posix:-lcposix} %{shlib:-lc_s} -lc crtend.o%s crtn.o%s" *************** *** 98,110 **** (current_function_calls_setjmp || current_function_calls_longjmp) ! /* Define a few machine-specific details ! of the implementation of constructors. ! CTORS_SECTION_ASM_OP should be defined to concatenate ! the macro INIT_SECTION_ASM_OP, a newline, and a push instruction ! to push a word containing 0 (or some equivalent of that). ! ASM_OUTPUT_CONSTRUCTOR should be defined ! to push the address of the constructor. */ #undef INIT_SECTION_ASM_OP --- 100,112 ---- (current_function_calls_setjmp || current_function_calls_longjmp) ! /* Define a few machine-specific details of the implementation of ! constructors. ! The __CTORS_LIST__ goes in the .init section. Define CTOR_LIST_BEGIN ! and CTOR_LIST_END to contribute to the .init section an instruction to ! push a word containing 0 (or some equivalent of that). ! ASM_OUTPUT_CONSTRUCTOR should be defined to push the address of the ! constructor. */ #undef INIT_SECTION_ASM_OP *************** *** 111,121 **** #define INIT_SECTION_ASM_OP ".section .init,\"x\"" ! #define CTORS_SECTION_ASM_OP \ ! INIT_SECTION_ASM_OP "\n" \ ! "\tpushl $0\n\t" \ ! DATA_SECTION_ASM_OP ! /* The reason we end with DATA_SECTION_ASM_OP is to prevent the ! initial and final table elements (see crtstuff.c) from getting into ! the .init section and causing a crash. */ #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ --- 113,120 ---- #define INIT_SECTION_ASM_OP ".section .init,\"x\"" ! #define CTOR_LIST_BEGIN \ ! asm (INIT_SECTION_ASM_OP); \ ! asm ("pushl $0") ! #define CTOR_LIST_END CTOR_LIST_BEGIN #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ diff -rc2N gcc-2.0/config/i860.c gcc-2.1/config/i860.c *** gcc-2.0/config/i860.c Thu Jan 23 14:10:18 1992 --- gcc-2.1/config/i860.c Sat Mar 14 00:15:46 1992 *************** *** 1348,1353 **** /* Predecrement the loop counter. This happens again also in the `bla' ! instruction which precceds the loop, but we need to have it done ! two times before we enter the loop because of the bizzare semantics of the bla instruction. */ --- 1348,1353 ---- /* Predecrement the loop counter. This happens again also in the `bla' ! instruction which precedes the loop, but we need to have it done ! two times before we enter the loop because of the bizarre semantics of the bla instruction. */ *************** *** 1523,1527 **** /* Now recognize the insn which we put in its delay slot. ! We must do this after outputing the branch insn, since operands may just be a pointer to `recog_operand'. */ INSN_CODE (delay_insn) = insn_code_number = recog (pat, delay_insn); --- 1523,1527 ---- /* Now recognize the insn which we put in its delay slot. ! We must do this after outputting the branch insn, since operands may just be a pointer to `recog_operand'. */ INSN_CODE (delay_insn) = insn_code_number = recog (pat, delay_insn); *************** *** 1558,1562 **** /* Now recognize the insn which we put in its delay slot. ! We must do this after outputing the branch insn, since operands may just be a pointer to `recog_operand'. */ insn_code_number = recog_memoized (delay_insn); --- 1558,1562 ---- /* Now recognize the insn which we put in its delay slot. ! We must do this after outputting the branch insn, since operands may just be a pointer to `recog_operand'. */ insn_code_number = recog_memoized (delay_insn); *************** *** 1568,1572 **** insn_extract (delay_insn); ! /* It is possible that this insn has not been properly scaned by final yet. If this insn's operands don't appear in the peephole's actual operands, then they won't be fixed up by final, so we --- 1568,1572 ---- insn_extract (delay_insn); ! /* It is possible that this insn has not been properly scanned by final yet. If this insn's operands don't appear in the peephole's actual operands, then they won't be fixed up by final, so we *************** *** 1615,1619 **** rtx x; { ! union { double d; unsigned long i[2]; } u; union { float f; unsigned long i; } u2; --- 1615,1619 ---- rtx x; { ! REAL_VALUE_TYPE d; union { float f; unsigned long i; } u2; *************** *** 1621,1633 **** abort (); ! #ifndef HOST_WORDS_BIG_ENDIAN ! u.i[0] = CONST_DOUBLE_LOW (x); ! u.i[1] = CONST_DOUBLE_HIGH (x); ! #else ! u.i[0] = CONST_DOUBLE_HIGH (x); ! u.i[1] = CONST_DOUBLE_LOW (x); #endif ! ! u2.f = u.d; return u2.i; } --- 1621,1629 ---- abort (); ! #if TARGET_FLOAT_FORMAT != HOST_FLOAT_FORMAT ! # error IEEE emulation needed #endif ! REAL_VALUE_FROM_CONST_DOUBLE (d, x); ! u2.f = d; return u2.i; } *************** *** 1668,1672 **** Previous versions of GCC also saved the "preserved" registers in the ! "nagative" part of the frame, but they saved them using positive offsets from the (adjusted) stack pointer (after it had been adjusted to allocate space for the new frame). That's just plain wrong --- 1664,1668 ---- Previous versions of GCC also saved the "preserved" registers in the ! "negative" part of the frame, but they saved them using positive offsets from the (adjusted) stack pointer (after it had been adjusted to allocate space for the new frame). That's just plain wrong *************** *** 1707,1711 **** There are two somewhat different ways that you can generate prologues here... i.e. pedantically ABI-compliant, and the "other" way. The ! "other" way is more consistant with what is currently generated by the "native" svr4 C compiler for the i860. That's important if you want to use the current (as of 8/91) incarnation of svr4 SDB for the i860. --- 1703,1707 ---- There are two somewhat different ways that you can generate prologues here... i.e. pedantically ABI-compliant, and the "other" way. The ! "other" way is more consistent with what is currently generated by the "native" svr4 C compiler for the i860. That's important if you want to use the current (as of 8/91) incarnation of svr4 SDB for the i860. diff -rc2N gcc-2.0/config/i860.h gcc-2.1/config/i860.h *** gcc-2.0/config/i860.h Thu Jan 30 15:00:30 1992 --- gcc-2.1/config/i860.h Sat Mar 14 00:15:48 1992 *************** *** 78,82 **** #define WORDS_BIG_ENDIAN 0 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 78,82 ---- #define WORDS_BIG_ENDIAN 0 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 118,124 **** #define BIGGEST_ALIGNMENT 128 ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT /* If bit field type is int, dont let it cross an int, --- 118,124 ---- #define BIGGEST_ALIGNMENT 128 ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 1 /* If bit field type is int, dont let it cross an int, *************** *** 1208,1212 **** a memory ref to a constant address. Print the correct notation to yield the high part of the given value or ! address or the high part of the address of the refered to memory object. --- 1208,1212 ---- a memory ref to a constant address. Print the correct notation to yield the high part of the given value or ! address or the high part of the address of the referred to memory object. *************** *** 1348,1352 **** of their formal arguments and the actual types of their return values. Otherwise, gcc will generate calls to the libgcc1.c ! routines, passing argumenst in in the floating-point registers, but the libgcc1.c routines will expect their arguments on the stack (where the i860 calling conventions require structs & --- 1348,1352 ---- of their formal arguments and the actual types of their return values. Otherwise, gcc will generate calls to the libgcc1.c ! routines, passing arguments in the floating-point registers, but the libgcc1.c routines will expect their arguments on the stack (where the i860 calling conventions require structs & *************** *** 1362,1366 **** `MACHINE.c'. This macro is called within an initializer of an array of structures. The first field in the structure is the ! name of a predicate and the second field is an arrary of rtl codes. For each predicate, list all rtl codes that can be in expressions matched by the predicate. The list should have a --- 1362,1366 ---- `MACHINE.c'. This macro is called within an initializer of an array of structures. The first field in the structure is the ! name of a predicate and the second field is an array of rtl codes. For each predicate, list all rtl codes that can be in expressions matched by the predicate. The list should have a diff -rc2N gcc-2.0/config/i860v3.h gcc-2.1/config/i860v3.h *** gcc-2.0/config/i860v3.h Tue Jan 21 22:01:18 1992 --- gcc-2.1/config/i860v3.h Mon Mar 16 04:42:18 1992 *************** *** 126,132 **** #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"x\"\n" #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"x\"\n" /* Add definitions to support the .tdesc section as specified in the svr4 --- 126,132 ---- #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\"\n" #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\"\n" /* Add definitions to support the .tdesc section as specified in the svr4 *************** *** 133,137 **** ABI for the i860. */ ! #define TDESC_SECTION_ASM_OP "\t.section\t.tdesc" #undef EXTRA_SECTIONS --- 133,137 ---- ABI for the i860. */ ! #define TDESC_SECTION_ASM_OP ".section\t.tdesc" #undef EXTRA_SECTIONS diff -rc2N gcc-2.0/config/i860v4.h gcc-2.1/config/i860v4.h *** gcc-2.0/config/i860v4.h Thu Jan 16 14:12:09 1992 --- gcc-2.1/config/i860v4.h Mon Mar 16 04:43:05 1992 *************** *** 101,107 **** #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"a\",\"progbits\"\n" #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"a\",\"progbits\"\n" /* Add definitions to support the .tdesc section as specified in the svr4 --- 101,107 ---- #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"a\",\"progbits\"" #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"a\",\"progbits\"" /* Add definitions to support the .tdesc section as specified in the svr4 *************** *** 108,112 **** ABI for the i860. */ ! #define TDESC_SECTION_ASM_OP "\t.section\t.tdesc" #undef EXTRA_SECTIONS --- 108,112 ---- ABI for the i860. */ ! #define TDESC_SECTION_ASM_OP ".section\t.tdesc" #undef EXTRA_SECTIONS diff -rc2N gcc-2.0/config/iris.h gcc-2.1/config/iris.h *** gcc-2.0/config/iris.h Wed Feb 12 10:39:47 1992 --- gcc-2.1/config/iris.h Sat Mar 21 18:29:03 1992 *************** *** 43,48 **** #define ASM_SPEC "\ %{!mgas: \ ! %{!mrnames: -nocpp} \ %{pipe: %e-pipe is not supported.} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K}} \ --- 43,49 ---- #define ASM_SPEC "\ %{!mgas: \ ! %{!mrnames: %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}}} \ %{pipe: %e-pipe is not supported.} \ + %{mips1} %{mips2} %{mips3} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K}} \ *************** *** 51,55 **** #define LINK_SPEC "\ %{G*} \ ! %{!mgas: %{bestGnum}}" /* Always use 1 for .file number. I [meissner@osf.org] wonder why --- 52,57 ---- #define LINK_SPEC "\ %{G*} \ ! %{!mgas: %{mips1} %{mips2} %{mips3} \ ! %{bestGnum}}" /* Always use 1 for .file number. I [meissner@osf.org] wonder why *************** *** 69,72 **** --- 71,87 ---- SIZE.constant = 32; \ } + + /* Define this macro to control use of the character `$' in + identifier names. The value should be 0, 1, or 2. 0 means `$' + is not allowed by default; 1 means it is allowed by default if + `-traditional' is used; 2 means it is allowed by default provided + `-ansi' is not used. 1 is the default; there is no need to + define this macro in that case. */ + + #define DOLLARS_IN_IDENTIFIERS 0 + + /* Tell G++ not to create constructors or destructors with $'s in them. */ + + #define NO_DOLLAR_IN_LABEL 1 #include "mips.h" diff -rc2N gcc-2.0/config/irisgdb.h gcc-2.1/config/irisgdb.h *** gcc-2.0/config/irisgdb.h --- gcc-2.1/config/irisgdb.h Sat Mar 21 13:45:25 1992 *************** *** 0 **** --- 1,22 ---- + /* Definitions of target machine for GNU compiler. Iris version + using encapsulated stabs. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #include "iris.h" diff -rc2N gcc-2.0/config/m68k.c gcc-2.1/config/m68k.c *** gcc-2.0/config/m68k.c Wed Feb 5 19:04:06 1992 --- gcc-2.1/config/m68k.c Sat Mar 21 02:55:29 1992 *************** *** 51,59 **** /* Emit a (use pic_offset_table_rtx) if we used PIC relocation in the function at any time during the compilation process. In the future ! we should try and eliminate the USE if we can easily deterine that all PIC references were deleted from the current function. That would save an address register */ ! finalize_pic() { if (flag_pic && current_function_uses_pic_offset_table) --- 51,59 ---- /* Emit a (use pic_offset_table_rtx) if we used PIC relocation in the function at any time during the compilation process. In the future ! we should try and eliminate the USE if we can easily determine that all PIC references were deleted from the current function. That would save an address register */ ! finalize_pic () { if (flag_pic && current_function_uses_pic_offset_table) *************** *** 93,100 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tlink.w %s,%I%d\n", reg_names[FRAME_POINTER_REGNUM], -fsize); #else ! asm_fprintf (stream, "\tlink %s,%I%d\n", reg_names[FRAME_POINTER_REGNUM], -fsize); #endif --- 93,100 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tlink.w %s,%0I%d\n", reg_names[FRAME_POINTER_REGNUM], -fsize); #else ! asm_fprintf (stream, "\tlink %s,%0I%d\n", reg_names[FRAME_POINTER_REGNUM], -fsize); #endif *************** *** 103,110 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tlink.l %s,%I%d\n", reg_names[FRAME_POINTER_REGNUM], -fsize); #else ! asm_fprintf (stream, "\tlink %s,%I%d\n", reg_names[FRAME_POINTER_REGNUM], -fsize); #endif --- 103,110 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tlink.l %s,%0I%d\n", reg_names[FRAME_POINTER_REGNUM], -fsize); #else ! asm_fprintf (stream, "\tlink %s,%0I%d\n", reg_names[FRAME_POINTER_REGNUM], -fsize); #endif *************** *** 113,120 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tlink.w %s,%I0\n\tadd.l %I%d,%Rsp\n", reg_names[FRAME_POINTER_REGNUM], -fsize); #else ! asm_fprintf (stream, "\tlink %s,%I0\n\taddl %I%d,%Rsp\n", reg_names[FRAME_POINTER_REGNUM], -fsize); #endif --- 113,120 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tlink.w %s,%0I0\n\tadd.l %0I%d,%Rsp\n", reg_names[FRAME_POINTER_REGNUM], -fsize); #else ! asm_fprintf (stream, "\tlink %s,%0I0\n\taddl %0I%d,%Rsp\n", reg_names[FRAME_POINTER_REGNUM], -fsize); #endif *************** *** 127,133 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tadd.w %I%d,%Rsp\n", - (fsize + 4)); #else ! asm_fprintf (stream, "\taddw %I%d,%Rsp\n", - (fsize + 4)); #endif } --- 127,133 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tadd.w %0I%d,%Rsp\n", - (fsize + 4)); #else ! asm_fprintf (stream, "\taddw %0I%d,%Rsp\n", - (fsize + 4)); #endif } *************** *** 135,141 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tadd.l %I%d,%Rsp\n", - (fsize + 4)); #else ! asm_fprintf (stream, "\taddl %I%d,%Rsp\n", - (fsize + 4)); #endif } --- 135,141 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tadd.l %0I%d,%Rsp\n", - (fsize + 4)); #else ! asm_fprintf (stream, "\taddl %0I%d,%Rsp\n", - (fsize + 4)); #endif } *************** *** 160,166 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tfmovm %I0x%x,-(%Rsp)\n", mask & 0xff); #else ! asm_fprintf (stream, "\tfmovem %I0x%x,%Rsp@-\n", mask & 0xff); #endif } --- 160,166 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tfmovm %0I0x%x,-(%Rsp)\n", mask & 0xff); #else ! asm_fprintf (stream, "\tfmovem %0I0x%x,%Rsp@-\n", mask & 0xff); #endif } *************** *** 191,195 **** asm_fprintf (stream, #ifdef MOTOROLA ! "\tmov.l %s,-(%Rsp)\n", #else "\tmovel %s,%Rsp@-\n", --- 191,195 ---- asm_fprintf (stream, #ifdef MOTOROLA ! "\t%Omove.l %s,-(%Rsp)\n", #else "\tmovel %s,%Rsp@-\n", *************** *** 200,206 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmovm.l %I0x%x,-(%Rsp)\n", mask); #else ! asm_fprintf (stream, "\tmoveml %I0x%x,%Rsp@-\n", mask); #endif } --- 200,206 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmovm.l %0I0x%x,-(%Rsp)\n", mask); #else ! asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask); #endif } *************** *** 208,212 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmov.l %I__GLOBAL_OFFSET_TABLE_, %s\n", reg_names[PIC_OFFSET_TABLE_REGNUM]); asm_fprintf (stream, "\tlea.l (%Rpc,%s.l),%s\n", --- 208,212 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\t%Omove.l %0I__GLOBAL_OFFSET_TABLE_, %s\n", reg_names[PIC_OFFSET_TABLE_REGNUM]); asm_fprintf (stream, "\tlea.l (%Rpc,%s.l),%s\n", *************** *** 214,218 **** reg_names[PIC_OFFSET_TABLE_REGNUM]); #else ! asm_fprintf (stream, "\tmovel %I__GLOBAL_OFFSET_TABLE_, %s\n", reg_names[PIC_OFFSET_TABLE_REGNUM]); asm_fprintf (stream, "\tlea %Rpc@(0,%s:l),%s\n", --- 214,218 ---- reg_names[PIC_OFFSET_TABLE_REGNUM]); #else ! asm_fprintf (stream, "\tmovel %0I__GLOBAL_OFFSET_TABLE_, %s\n", reg_names[PIC_OFFSET_TABLE_REGNUM]); asm_fprintf (stream, "\tlea %Rpc@(0,%s:l),%s\n", *************** *** 269,273 **** insn = prev_nonnote_insn (insn); if (insn && GET_CODE (insn) == BARRIER) ! return; #ifdef FUNCTION_EXTRA_EPILOGUE --- 269,278 ---- insn = prev_nonnote_insn (insn); if (insn && GET_CODE (insn) == BARRIER) ! { ! /* Output just a no-op so that debuggers don't get confused ! about which function the pc is in at this address. */ ! asm_fprintf (stream, "\tnop\n"); ! return; ! } #ifdef FUNCTION_EXTRA_EPILOGUE *************** *** 304,310 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmov.l %I%d,%Ra0\n", -fsize); #else ! asm_fprintf (stream, "\tmovel %I%d,%Ra0\n", -fsize); #endif fsize = 0, big = 1; --- 309,315 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\t%Omove.l %0I%d,%Ra0\n", -fsize); #else ! asm_fprintf (stream, "\tmovel %0I%d,%Ra0\n", -fsize); #endif fsize = 0, big = 1; *************** *** 326,330 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmov.l -%d(%s,%Ra0.l),%s\n", offset + fsize, reg_names[FRAME_POINTER_REGNUM], --- 331,335 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\t%Omove.l -%d(%s,%Ra0.l),%s\n", offset + fsize, reg_names[FRAME_POINTER_REGNUM], *************** *** 339,343 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmov.l (%Rsp)+,%s\n", reg_names[i]); #else --- 344,348 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\t%Omove.l (%Rsp)+,%s\n", reg_names[i]); #else *************** *** 349,353 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmov.l -%d(%s),%s\n", offset + fsize, reg_names[FRAME_POINTER_REGNUM], --- 354,358 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\t%Omove.l -%d(%s),%s\n", offset + fsize, reg_names[FRAME_POINTER_REGNUM], *************** *** 367,371 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmovm.l -%d(%s,%Ra0.l),%I0x%x\n", offset + fsize, reg_names[FRAME_POINTER_REGNUM], --- 372,376 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmovm.l -%d(%s,%Ra0.l),%0I0x%x\n", offset + fsize, reg_names[FRAME_POINTER_REGNUM], *************** *** 372,376 **** mask); #else ! asm_fprintf (stream, "\tmoveml %s@(-%d,%Ra0:l),%I0x%x\n", reg_names[FRAME_POINTER_REGNUM], offset + fsize, mask); --- 377,381 ---- mask); #else ! asm_fprintf (stream, "\tmoveml %s@(-%d,%Ra0:l),%0I0x%x\n", reg_names[FRAME_POINTER_REGNUM], offset + fsize, mask); *************** *** 380,386 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmovm.l (%Rsp)+,%I0x%x\n", mask); #else ! asm_fprintf (stream, "\tmoveml %Rsp@+,%I0x%x\n", mask); #endif } --- 385,391 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmovm.l (%Rsp)+,%0I0x%x\n", mask); #else ! asm_fprintf (stream, "\tmoveml %Rsp@+,%0I0x%x\n", mask); #endif } *************** *** 388,392 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmovm.l -%d(%s),%I0x%x\n", offset + fsize, reg_names[FRAME_POINTER_REGNUM], --- 393,397 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tmovm.l -%d(%s),%0I0x%x\n", offset + fsize, reg_names[FRAME_POINTER_REGNUM], *************** *** 393,397 **** mask); #else ! asm_fprintf (stream, "\tmoveml %s@(-%d),%I0x%x\n", reg_names[FRAME_POINTER_REGNUM], offset + fsize, mask); --- 398,402 ---- mask); #else ! asm_fprintf (stream, "\tmoveml %s@(-%d),%0I0x%x\n", reg_names[FRAME_POINTER_REGNUM], offset + fsize, mask); *************** *** 404,408 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tfmovm -%d(%s,%Ra0.l),%I0x%x\n", foffset + fsize, reg_names[FRAME_POINTER_REGNUM], --- 409,413 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tfmovm -%d(%s,%Ra0.l),%0I0x%x\n", foffset + fsize, reg_names[FRAME_POINTER_REGNUM], *************** *** 409,413 **** fmask); #else ! asm_fprintf (stream, "\tfmovem %s@(-%d,%Ra0:l),%I0x%x\n", reg_names[FRAME_POINTER_REGNUM], foffset + fsize, fmask); --- 414,418 ---- fmask); #else ! asm_fprintf (stream, "\tfmovem %s@(-%d,%Ra0:l),%0I0x%x\n", reg_names[FRAME_POINTER_REGNUM], foffset + fsize, fmask); *************** *** 417,423 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tfmovm (%Rsp)+,%I0x%x\n", fmask); #else ! asm_fprintf (stream, "\tfmovem %Rsp@+,%I0x%x\n", fmask); #endif } --- 422,428 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tfmovm (%Rsp)+,%0I0x%x\n", fmask); #else ! asm_fprintf (stream, "\tfmovem %Rsp@+,%0I0x%x\n", fmask); #endif } *************** *** 425,429 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tfmovm -%d(%s),%I0x%x\n", foffset + fsize, reg_names[FRAME_POINTER_REGNUM], --- 430,434 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tfmovm -%d(%s),%0I0x%x\n", foffset + fsize, reg_names[FRAME_POINTER_REGNUM], *************** *** 430,434 **** fmask); #else ! asm_fprintf (stream, "\tfmovem %s@(-%d),%I0x%x\n", reg_names[FRAME_POINTER_REGNUM], foffset + fsize, fmask); --- 435,439 ---- fmask); #else ! asm_fprintf (stream, "\tfmovem %s@(-%d),%0I0x%x\n", reg_names[FRAME_POINTER_REGNUM], foffset + fsize, fmask); *************** *** 486,492 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tadd.w %I%d,%Rsp\n", fsize + 4); #else ! asm_fprintf (stream, "\taddw %I%d,%Rsp\n", fsize + 4); #endif } --- 491,497 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tadd.w %0I%d,%Rsp\n", fsize + 4); #else ! asm_fprintf (stream, "\taddw %0I%d,%Rsp\n", fsize + 4); #endif } *************** *** 494,500 **** { #ifdef MOTOROLA ! asm_fprintf (stream, "\tadd.l %I%d,%Rsp\n", fsize + 4); #else ! asm_fprintf (stream, "\taddl %I%d,%Rsp\n", fsize + 4); #endif } --- 499,505 ---- { #ifdef MOTOROLA ! asm_fprintf (stream, "\tadd.l %0I%d,%Rsp\n", fsize + 4); #else ! asm_fprintf (stream, "\taddl %0I%d,%Rsp\n", fsize + 4); #endif } *************** *** 501,505 **** } if (current_function_pops_args) ! asm_fprintf (stream, "\trtd %I%d\n", current_function_pops_args); else fprintf (stream, "\trts\n"); --- 506,510 ---- } if (current_function_pops_args) ! asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args); else fprintf (stream, "\trts\n"); *************** *** 516,519 **** --- 521,673 ---- } + /* Return TRUE if X is a valid comparison operator for the dbcc + instruction. + + Note it rejects floating point comparison operators. + (In the future we could use Fdbcc). + + It also rejects some comparisons when CC_NO_OVERFLOW is set. */ + + int + valid_dbcc_comparison_p (x, mode) + rtx x; + enum machine_mode mode; + { + /* We could add support for these in the future */ + if (cc_prev_status.flags & CC_IN_68881) + return 0; + + switch (GET_CODE (x)) + { + + case EQ: case NE: case GTU: case LTU: + case GEU: case LEU: + return 1; + + /* Reject some when CC_NO_OVERFLOW is set. This may be over + conservative */ + case GT: case LT: case GE: case LE: + return ! (cc_prev_status.flags & CC_NO_OVERFLOW); + default: + return 0; + } + } + + /* Output a dbCC; jCC sequence. Note we do not handle the + floating point version of this sequence (Fdbcc). We also + do not handle alternative conditions when CC_NO_OVERFLOW is + set. It is assumed that valid_dbcc_comparison_p will kick + those out before we get here. */ + + output_dbcc_and_branch (operands) + rtx *operands; + { + + switch (GET_CODE (operands[3])) + { + case EQ: + #ifdef MOTOROLA + output_asm_insn ("dbeq %0,%l1\n\tjbeq %l2", operands); + #else + output_asm_insn ("dbeq %0,%l1\n\tjeq %l2", operands); + #endif + break; + + case NE: + #ifdef MOTOROLA + output_asm_insn ("dbne %0,%l1\n\tjbne %l2", operands); + #else + output_asm_insn ("dbne %0,%l1\n\tjne %l2", operands); + #endif + break; + + case GT: + #ifdef MOTOROLA + output_asm_insn ("dbgt %0,%l1\n\tjbgt %l2", operands); + #else + output_asm_insn ("dbgt %0,%l1\n\tjgt %l2", operands); + #endif + break; + + case GTU: + #ifdef MOTOROLA + output_asm_insn ("dbhi %0,%l1\n\tjbhi %l2", operands); + #else + output_asm_insn ("dbhi %0,%l1\n\tjhi %l2", operands); + #endif + break; + + case LT: + #ifdef MOTOROLA + output_asm_insn ("dblt %0,%l1\n\tjblt %l2", operands); + #else + output_asm_insn ("dblt %0,%l1\n\tjlt %l2", operands); + #endif + break; + + case LTU: + #ifdef MOTOROLA + output_asm_insn ("dbcs %0,%l1\n\tjbcs %l2", operands); + #else + output_asm_insn ("dbcs %0,%l1\n\tjcs %l2", operands); + #endif + break; + + case GE: + #ifdef MOTOROLA + output_asm_insn ("dbge %0,%l1\n\tjbge %l2", operands); + #else + output_asm_insn ("dbge %0,%l1\n\tjge %l2", operands); + #endif + break; + + case GEU: + #ifdef MOTOROLA + output_asm_insn ("dbcc %0,%l1\n\tjbcc %l2", operands); + #else + output_asm_insn ("dbcc %0,%l1\n\tjcc %l2", operands); + #endif + break; + + case LE: + #ifdef MOTOROLA + output_asm_insn ("dble %0,%l1\n\tjble %l2", operands); + #else + output_asm_insn ("dble %0,%l1\n\tjle %l2", operands); + #endif + break; + + case LEU: + #ifdef MOTOROLA + output_asm_insn ("dbls %0,%l1\n\tjbls %l2", operands); + #else + output_asm_insn ("dbls %0,%l1\n\tjls %l2", operands); + #endif + break; + + default: + abort (); + } + + /* If the decrement is to be done in SImode, then we have + to compensate for the fact that dbcc decrements in HImode. */ + switch (GET_MODE (operands[0])) + { + case SImode: + #ifdef MOTOROLA + output_asm_insn ("clr%.w %0\n\tsubq%.l %#1,%0\n\tjbpl %l1", operands); + #else + output_asm_insn ("clr%.w %0\n\tsubq%.l %#1,%0\n\tjpl %l1", operands); + #endif + break; + + case HImode: + break; + + default: + abort (); + } + } + char * output_btst (operands, countop, dataop, insn, signpos) *************** *** 698,702 **** && INTVAL (operands[1]) >= -128) { ! #if defined(MOTOROLA) && !defined(CRDS) return "moveq%.l %1,%0"; #else --- 852,856 ---- && INTVAL (operands[1]) >= -128) { ! #if defined (MOTOROLA) && !defined (CRDS) return "moveq%.l %1,%0"; #else *************** *** 1019,1023 **** { #ifdef SUPPORT_SUN_FPA ! if (TARGET_FPA && FPA_REG_P(operands[0])) { int code = standard_sun_fpa_constant_p (operands[1]); --- 1173,1177 ---- { #ifdef SUPPORT_SUN_FPA ! if (TARGET_FPA && FPA_REG_P (operands[0])) { int code = standard_sun_fpa_constant_p (operands[1]); *************** *** 1245,1249 **** * Stuff that looks different if it's single or double */ ! if (GET_MODE(x) == SFmode) { if (d == S_E) --- 1399,1403 ---- * Stuff that looks different if it's single or double */ ! if (GET_MODE (x) == SFmode) { if (d == S_E) *************** *** 1377,1381 **** else if (letter == '#') { ! asm_fprintf (file, "%I"); } else if (letter == '-') --- 1531,1535 ---- else if (letter == '#') { ! asm_fprintf (file, "%0I"); } else if (letter == '-') *************** *** 1405,1413 **** else if (letter == '!') { ! #ifdef MOTOROLA ! asm_fprintf (file, "(%Rcc)"); ! #else ! asm_fprintf (file, "%Rcc"); ! #endif } else if (letter == '$') --- 1559,1563 ---- else if (letter == '!') { ! asm_fprintf (file, "%Rfpcr"); } else if (letter == '$') *************** *** 1453,1457 **** #ifdef SUPPORT_SUN_FPA else if ((letter == 'y' || letter == 'w') ! && GET_CODE(op) == CONST_DOUBLE && (i = standard_sun_fpa_constant_p (op))) { --- 1603,1607 ---- #ifdef SUPPORT_SUN_FPA else if ((letter == 'y' || letter == 'w') ! && GET_CODE (op) == CONST_DOUBLE && (i = standard_sun_fpa_constant_p (op))) { *************** *** 1475,1479 **** else { ! asm_fprintf (file, "%I"); output_addr_const (file, op); } } --- 1625,1629 ---- else { ! asm_fprintf (file, "%0I"); output_addr_const (file, op); } } diff -rc2N gcc-2.0/config/m68k.h gcc-2.1/config/m68k.h *** gcc-2.0/config/m68k.h Tue Feb 18 01:27:04 1992 --- gcc-2.1/config/m68k.h Fri Mar 20 14:17:48 1992 *************** *** 83,87 **** /* Optimize for 68040. ! The 68040 will execute all 68030 and 68881/2 instrcutions, but some of them must be emulated in software by the OS. When TARGET_68040 is turned on, these instructions won't be used. This code will still --- 83,87 ---- /* Optimize for 68040. ! The 68040 will execute all 68030 and 68881/2 instructions, but some of them must be emulated in software by the OS. When TARGET_68040 is turned on, these instructions won't be used. This code will still *************** *** 159,163 **** #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 159,163 ---- #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 190,196 **** #define BIGGEST_ALIGNMENT 16 ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT #define SELECT_RTX_SECTION(MODE, X) \ --- 190,196 ---- #define BIGGEST_ALIGNMENT 16 ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 1 #define SELECT_RTX_SECTION(MODE, X) \ *************** *** 971,976 **** register char *a0 asm ("%a0"); \ asm ("___trampoline:"); \ ! asm volatile ("mov%.l %0,%@" : : "m" (a0[22])); \ ! asm volatile ("mov%.l %1,%0" : "=a" (a0) : "m" (a0[18])); \ asm ("rts":); \ } --- 971,976 ---- register char *a0 asm ("%a0"); \ asm ("___trampoline:"); \ ! asm volatile ("move%.l %0,%@" : : "m" (a0[22])); \ ! asm volatile ("move%.l %1,%0" : "=a" (a0) : "m" (a0[18])); \ asm ("rts":); \ } *************** *** 1255,1263 **** #define SLOW_BYTE_ACCESS 0 - /* Define if shifts truncate the shift count - which implies one can omit a sign-extension or zero-extension - of a shift count. */ - #define SHIFT_COUNT_TRUNCATED - /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits is done just by pretending it is already truncated. */ --- 1255,1258 ---- *************** *** 1329,1332 **** --- 1324,1330 ---- /* A shift by a big integer takes an extra instruction. */ \ if (GET_CODE (XEXP (X, 1)) == CONST_INT \ + && (INTVAL (XEXP (X, 1)) == 16)) \ + return COSTS_N_INSNS (2); /* clrw;swap */ \ + if (GET_CODE (XEXP (X, 1)) == CONST_INT \ && !(INTVAL (XEXP (X, 1)) > 0 \ && INTVAL (XEXP (X, 1)) <= 8)) \ *************** *** 1336,1340 **** if (GET_CODE (XEXP (x, 1)) == CONST_INT \ && exact_log2 (INTVAL (XEXP (x, 1))) >= 0) \ ! total = 2; \ else if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \ return COSTS_N_INSNS (8); /* mul.w */ \ --- 1334,1348 ---- if (GET_CODE (XEXP (x, 1)) == CONST_INT \ && exact_log2 (INTVAL (XEXP (x, 1))) >= 0) \ ! { \ ! /* A shift by a big integer takes an extra instruction. */ \ ! if (GET_CODE (XEXP (X, 1)) == CONST_INT \ ! && (INTVAL (XEXP (X, 1)) == (1 << 16))) \ ! return COSTS_N_INSNS (2); /* clrw;swap */ \ ! if (GET_CODE (XEXP (X, 1)) == CONST_INT \ ! && !(INTVAL (XEXP (X, 1)) > 1 \ ! && INTVAL (XEXP (X, 1)) <= 256)) \ ! return COSTS_N_INSNS (3); /* lsr #i,dn */ \ ! break; \ ! } \ else if (GET_MODE (X) == QImode || GET_MODE (X) == HImode) \ return COSTS_N_INSNS (8); /* mul.w */ \ *************** *** 1473,1477 **** #define ASM_OUTPUT_LABELREF(FILE,NAME) \ ! asm_fprintf (FILE, "%U%s", NAME) /* This is how to output an internal numbered label where --- 1481,1485 ---- #define ASM_OUTPUT_LABELREF(FILE,NAME) \ ! asm_fprintf (FILE, "%0U%s", NAME) /* This is how to output an internal numbered label where *************** *** 1479,1483 **** #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ ! asm_fprintf (FILE, "%L%s%d:\n", PREFIX, NUM) /* This is how to store into the string LABEL --- 1487,1491 ---- #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ ! asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM) /* This is how to store into the string LABEL *************** *** 1566,1574 **** to a multiple of 2**LOG bytes. */ #define ASM_OUTPUT_ALIGN(FILE,LOG) \ ! if ((LOG) == 1) \ ! fprintf (FILE, "\t.even\n"); \ ! else if ((LOG) != 0) \ ! abort (); #define ASM_OUTPUT_SKIP(FILE,SIZE) \ --- 1574,1582 ---- to a multiple of 2**LOG bytes. */ + /* We don't have a way to align to more than a two-byte boundary, so do the + best we can and don't complain. */ #define ASM_OUTPUT_ALIGN(FILE,LOG) \ ! if ((LOG) >= 1) \ ! fprintf (FILE, "\t.even\n"); #define ASM_OUTPUT_SKIP(FILE,SIZE) \ *************** *** 1638,1642 **** '#' for an immediate operand prefix (# in MIT and Motorola syntax but & in SGS syntax). ! '!' for the cc register (used in an `and to cc' insn). '$' for the letter `s' in an op code, but only on the 68040. '&' for the letter `d' in an op code, but only on the 68040. --- 1646,1650 ---- '#' for an immediate operand prefix (# in MIT and Motorola syntax but & in SGS syntax). ! '!' for the fpcr register (used in some float-to-fixed conversions). '$' for the letter `s' in an op code, but only on the 68040. '&' for the letter `d' in an op code, but only on the 68040. diff -rc2N gcc-2.0/config/m68k.md gcc-2.1/config/m68k.md *** gcc-2.0/config/m68k.md Mon Jan 20 00:26:48 1992 --- gcc-2.1/config/m68k.md Fri Mar 20 14:17:44 1992 *************** *** 62,66 **** ;;- "%+" pop operand "sp@+" move%.l d0,%+ ;;- "%@" top of stack "sp@" move%.l d0,%@ ! ;;- "%!" ??? "cc" (not used) ;;- "%$" single-precision fp specifier ("s" or "") f%$add.x fp0,fp1 ;;- "%&" double-precision fp specifier ("d" or "") f%&add.x fp0,fp1 --- 62,66 ---- ;;- "%+" pop operand "sp@+" move%.l d0,%+ ;;- "%@" top of stack "sp@" move%.l d0,%@ ! ;;- "%!" fpcr register ;;- "%$" single-precision fp specifier ("s" or "") f%$add.x fp0,fp1 ;;- "%&" double-precision fp specifier ("d" or "") f%&add.x fp0,fp1 *************** *** 222,226 **** ;;- 68000 registers is being done. This can be expressed easily in ;;- constraints, so generally the mode of the instruction is ! ;;- determined by a branch off of which_alternative. In outputing ;;- instructions, a 'w' means to output an access to the constant ram ;;- (if the arg is CONST_DOUBLE and is one of the available --- 222,226 ---- ;;- 68000 registers is being done. This can be expressed easily in ;;- constraints, so generally the mode of the instruction is ! ;;- determined by a branch off of which_alternative. In outputting ;;- instructions, a 'w' means to output an access to the constant ram ;;- (if the arg is CONST_DOUBLE and is one of the available *************** *** 692,696 **** ;; This is the main "hook" for PIC code. When generating ;; PIC, movsi is responsible for determining when the source address ! ;; needs PIC relocation and appropriatly calling legitimize_pic_address ;; to perform the actual relocation. ;; --- 692,696 ---- ;; This is the main "hook" for PIC code. When generating ;; PIC, movsi is responsible for determining when the source address ! ;; needs PIC relocation and appropriately calling legitimize_pic_address ;; to perform the actual relocation. ;; *************** *** 1157,1161 **** if (GET_CODE (operands[0]) == REG) { ! /* Must clear condition codes, since the mov.l bases them on the entire 32 bits, not just the desired 8 bits. */ CC_STATUS_INIT; --- 1157,1161 ---- if (GET_CODE (operands[0]) == REG) { ! /* Must clear condition codes, since the move.l bases them on the entire 32 bits, not just the desired 8 bits. */ CC_STATUS_INIT; *************** *** 1178,1182 **** || GET_CODE (operands[1]) == CONST_INT)) { ! /* Must clear condition codes, since the mov.w bases them on the entire 16 bits, not just the desired 8 bits. */ CC_STATUS_INIT; --- 1178,1182 ---- || GET_CODE (operands[1]) == CONST_INT)) { ! /* Must clear condition codes, since the move.w bases them on the entire 16 bits, not just the desired 8 bits. */ CC_STATUS_INIT; *************** *** 1185,1189 **** if (GET_CODE (operands[0]) == REG) { ! /* Must clear condition codes, since the mov.l bases them on the entire 32 bits, not just the desired 8 bits. */ CC_STATUS_INIT; --- 1185,1189 ---- if (GET_CODE (operands[0]) == REG) { ! /* Must clear condition codes, since the move.l bases them on the entire 32 bits, not just the desired 8 bits. */ CC_STATUS_INIT; *************** *** 1204,1208 **** if (GET_CODE (operands[0]) == REG) { ! /* Must clear condition codes, since the mov.l bases them on the entire 32 bits, not just the desired 8 bits. */ CC_STATUS_INIT; --- 1204,1208 ---- if (GET_CODE (operands[0]) == REG) { ! /* Must clear condition codes, since the move.l bases them on the entire 32 bits, not just the desired 8 bits. */ CC_STATUS_INIT; *************** *** 1578,1582 **** { CC_STATUS_INIT; ! return \"fmovem%.l fpcr,%2\;moveq #16,%3\;or%.l %2,%3\;and%.w #-33,%3\;fmovem%.l %3,fpcr\;fmove%.l %1,%0\;fmovem%.l %2,fpcr\"; }") --- 1578,1582 ---- { CC_STATUS_INIT; ! return \"fmovem%.l %!,%2\;moveq #16,%3\;or%.l %2,%3\;and%.w #-33,%3\;fmovem%.l %3,%!\;fmove%.l %1,%0\;fmovem%.l %2,%!\"; }") *************** *** 1590,1594 **** { CC_STATUS_INIT; ! return \"fmovem%.l fpcr,%2\;moveq #16,%3\;or%.l %2,%3\;and%.w #-33,%3\;fmovem%.l %3,fpcr\;fmove%.w %1,%0\;fmovem%.l %2,fpcr\"; }") --- 1590,1594 ---- { CC_STATUS_INIT; ! return \"fmovem%.l %!,%2\;moveq #16,%3\;or%.l %2,%3\;and%.w #-33,%3\;fmovem%.l %3,%!\;fmove%.w %1,%0\;fmovem%.l %2,%!\"; }") *************** *** 1602,1606 **** { CC_STATUS_INIT; ! return \"fmovem%.l fpcr,%2\;moveq #16,%3\;or%.l %2,%3\;and%.w #-33,%3\;fmovem%.l %3,fpcr\;fmove%.b %1,%0\;fmovem%.l %2,fpcr\"; }") --- 1602,1606 ---- { CC_STATUS_INIT; ! return \"fmovem%.l %!,%2\;moveq #16,%3\;or%.l %2,%3\;and%.w #-33,%3\;fmovem%.l %3,%!\;fmove%.b %1,%0\;fmovem%.l %2,%!\"; }") *************** *** 1748,1752 **** } /* On everything except the 68000 it is faster to use two ! addqw instuctions to add a small integer (8 < N <= 16) to an address register. Likewise for subqw.*/ if (INTVAL (operands[2]) > 8 --- 1748,1752 ---- } /* On everything except the 68000 it is faster to use two ! addqw instructions to add a small integer (8 < N <= 16) to an address register. Likewise for subqw.*/ if (INTVAL (operands[2]) > 8 *************** *** 1794,1797 **** --- 1794,1806 ---- if (GET_CODE (operands[2]) == CONST_INT) { + /* If the constant would be a negative number when interpreted as + HImode, make it negative. This is usually, but not always, done + elsewhere in the compiler. First check for constants out of range, + which could confuse us. */ + + if (INTVAL (operands[2]) >= 32768) + operands[2] = gen_rtx (CONST_INT, VOIDmode, + INTVAL (operands[2]) - 65536); + if (INTVAL (operands[2]) > 0 && INTVAL (operands[2]) <= 8) *************** *** 1805,1809 **** } /* On everything except the 68000 it is faster to use two ! addqw instuctions to add a small integer (8 < N <= 16) to an address register. Likewise for subqw. */ if (INTVAL (operands[2]) > 8 --- 1814,1818 ---- } /* On everything except the 68000 it is faster to use two ! addqw insttuctions to add a small integer (8 < N <= 16) to an address register. Likewise for subqw. */ if (INTVAL (operands[2]) > 8 *************** *** 1829,1832 **** --- 1838,1847 ---- }") + ;; These insns must use MATCH_DUP instead of the more expected + ;; use of a matching constraint because the "output" here is also + ;; an input, so you can't use the matching constraint. That also means + ;; that you can't use the "%", so you need patterns with the matched + ;; operand in both positions. + (define_insn "" [(set (strict_low_part (match_operand:HI 0 "general_operand" "+m,d")) *************** *** 1834,1838 **** (match_operand:HI 1 "general_operand" "dn,rmn")))] "" ! "add%.w %1,%0") (define_insn "addqi3" --- 1849,1954 ---- (match_operand:HI 1 "general_operand" "dn,rmn")))] "" ! "* ! { ! #ifndef NO_ADDSUB_Q ! if (GET_CODE (operands[1]) == CONST_INT) ! { ! /* If the constant would be a negative number when interpreted as ! HImode, make it negative. This is usually, but not always, done ! elsewhere in the compiler. First check for constants out of range, ! which could confuse us. */ ! ! if (INTVAL (operands[1]) >= 32768) ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! INTVAL (operands[1]) - 65536); ! ! if (INTVAL (operands[1]) > 0 ! && INTVAL (operands[1]) <= 8) ! return \"addq%.w %1,%0\"; ! if (INTVAL (operands[1]) < 0 ! && INTVAL (operands[1]) >= -8) ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! - INTVAL (operands[1])); ! return \"subq%.w %1,%0\"; ! } ! /* On everything except the 68000 it is faster to use two ! addqw instuctions to add a small integer (8 < N <= 16) ! to an address register. Likewise for subqw. */ ! if (INTVAL (operands[1]) > 8 ! && INTVAL (operands[1]) <= 16 ! && ADDRESS_REG_P (operands[0]) ! && TARGET_68020) ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[1]) - 8); ! return \"addq%.w %#8,%0; addq%.w %1,%0\"; ! } ! if (INTVAL (operands[1]) < -8 ! && INTVAL (operands[1]) >= -16 ! && ADDRESS_REG_P (operands[0]) ! && TARGET_68020) ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! - INTVAL (operands[1]) - 8); ! return \"subq%.w %#8,%0; subq%.w %1,%0\"; ! } ! } ! #endif ! return \"add%.w %1,%0\"; ! }") ! ! (define_insn "" ! [(set (strict_low_part (match_operand:HI 0 "general_operand" "+m,d")) ! (plus:HI (match_operand:HI 1 "general_operand" "dn,rmn") ! (match_dup 0)))] ! "" ! "* ! { ! #ifndef NO_ADDSUB_Q ! if (GET_CODE (operands[1]) == CONST_INT) ! { ! /* If the constant would be a negative number when interpreted as ! HImode, make it negative. This is usually, but not always, done ! elsewhere in the compiler. First check for constants out of range, ! which could confuse us. */ ! ! if (INTVAL (operands[1]) >= 32768) ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! INTVAL (operands[1]) - 65536); ! ! if (INTVAL (operands[1]) > 0 ! && INTVAL (operands[1]) <= 8) ! return \"addq%.w %1,%0\"; ! if (INTVAL (operands[1]) < 0 ! && INTVAL (operands[1]) >= -8) ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! - INTVAL (operands[1])); ! return \"subq%.w %1,%0\"; ! } ! /* On everything except the 68000 it is faster to use two ! addqw instuctions to add a small integer (8 < N <= 16) ! to an address register. Likewise for subqw. */ ! if (INTVAL (operands[1]) > 8 ! && INTVAL (operands[1]) <= 16 ! && ADDRESS_REG_P (operands[0]) ! && TARGET_68020) ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[1]) - 8); ! return \"addq%.w %#8,%0; addq%.w %1,%0\"; ! } ! if (INTVAL (operands[1]) < -8 ! && INTVAL (operands[1]) >= -16 ! && ADDRESS_REG_P (operands[0]) ! && TARGET_68020) ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! - INTVAL (operands[1]) - 8); ! return \"subq%.w %#8,%0; subq%.w %1,%0\"; ! } ! } ! #endif ! return \"add%.w %1,%0\"; ! }") (define_insn "addqi3" *************** *** 1846,1855 **** if (GET_CODE (operands[2]) == CONST_INT) { if (INTVAL (operands[2]) > 0 && INTVAL (operands[2]) <= 8) return \"addq%.b %2,%0\"; - } - if (GET_CODE (operands[2]) == CONST_INT) - { if (INTVAL (operands[2]) < 0 && INTVAL (operands[2]) >= -8) { --- 1962,1972 ---- if (GET_CODE (operands[2]) == CONST_INT) { + if (INTVAL (operands[2]) >= 128) + operands[2] = gen_rtx (CONST_INT, VOIDmode, + INTVAL (operands[2]) - 256); + if (INTVAL (operands[2]) > 0 && INTVAL (operands[2]) <= 8) return \"addq%.b %2,%0\"; if (INTVAL (operands[2]) < 0 && INTVAL (operands[2]) >= -8) { *************** *** 1867,1871 **** (match_operand:QI 1 "general_operand" "dn,dmn")))] "" ! "add%.b %1,%0") (define_expand "adddf3" --- 1984,2035 ---- (match_operand:QI 1 "general_operand" "dn,dmn")))] "" ! "* ! { ! #ifndef NO_ADDSUB_Q ! if (GET_CODE (operands[1]) == CONST_INT) ! { ! if (INTVAL (operands[1]) >= 128) ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! INTVAL (operands[1]) - 256); ! ! if (INTVAL (operands[1]) > 0 ! && INTVAL (operands[1]) <= 8) ! return \"addq%.b %1,%0\"; ! if (INTVAL (operands[1]) < 0 && INTVAL (operands[1]) >= -8) ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, - INTVAL (operands[1])); ! return \"subq%.b %1,%0\"; ! } ! } ! #endif ! return \"add%.b %1,%0\"; ! }") ! ! (define_insn "" ! [(set (strict_low_part (match_operand:QI 0 "general_operand" "+m,d")) ! (plus:QI (match_operand:QI 1 "general_operand" "dn,dmn") ! (match_dup 0)))] ! "" ! "* ! { ! #ifndef NO_ADDSUB_Q ! if (GET_CODE (operands[1]) == CONST_INT) ! { ! if (INTVAL (operands[1]) >= 128) ! operands[1] = gen_rtx (CONST_INT, VOIDmode, ! INTVAL (operands[1]) - 256); ! ! if (INTVAL (operands[1]) > 0 ! && INTVAL (operands[1]) <= 8) ! return \"addq%.b %1,%0\"; ! if (INTVAL (operands[1]) < 0 && INTVAL (operands[1]) >= -8) ! { ! operands[1] = gen_rtx (CONST_INT, VOIDmode, - INTVAL (operands[1])); ! return \"subq%.b %1,%0\"; ! } ! } ! #endif ! return \"add%.b %1,%0\"; ! }") (define_expand "adddf3" *************** *** 2523,2531 **** CC_STATUS_INIT; #ifdef MOTOROLA - #ifdef SGS_SWAP_W - return \"ext%.l %0\;divs%.w %2,%0\;swap%.w %0\"; - #else return \"ext%.l %0\;divs%.w %2,%0\;swap %0\"; - #endif #else return \"extl %0\;divs %2,%0\;swap %0\"; --- 2687,2691 ---- *************** *** 2545,2553 **** CC_STATUS_INIT; #ifdef MOTOROLA - #ifdef SGS_SWAP_W - return \"divs%.w %2,%0\;swap%.w %0\"; - #else return \"divs%.w %2,%0\;swap %0\"; - #endif #else return \"divs %2,%0\;swap %0\"; --- 2705,2709 ---- *************** *** 2565,2573 **** CC_STATUS_INIT; #ifdef MOTOROLA - #ifdef SGS_SWAP_W - return \"divs%.w %2,%0\;swap%.w %0\"; - #else return \"divs%.w %2,%0\;swap %0\"; - #endif #else return \"divs %2,%0\;swap %0\"; --- 2721,2725 ---- *************** *** 2585,2593 **** CC_STATUS_INIT; #ifdef MOTOROLA - #ifdef SGS_SWAP_W - return \"and%.l %#0xFFFF,%0\;divu%.w %2,%0\;swap%.w %0\"; - #else return \"and%.l %#0xFFFF,%0\;divu%.w %2,%0\;swap %0\"; - #endif #else return \"andl %#0xFFFF,%0\;divu %2,%0\;swap %0\"; --- 2737,2741 ---- *************** *** 2607,2615 **** CC_STATUS_INIT; #ifdef MOTOROLA - #ifdef SGS_SWAP_W - return \"divu%.w %2,%0\;swap%.w %0\"; - #else return \"divu%.w %2,%0\;swap %0\"; - #endif #else return \"divu %2,%0\;swap %0\"; --- 2755,2759 ---- *************** *** 2627,2635 **** CC_STATUS_INIT; #ifdef MOTOROLA - #ifdef SGS_SWAP_W - return \"divu%.w %2,%0\;swap%.w %0\"; - #else return \"divu%.w %2,%0\;swap %0\"; - #endif #else return \"divu %2,%0\;swap %0\"; --- 2771,2775 ---- *************** *** 2671,2675 **** ;; Prevent AND from being made with sp. This doesn't exist in the machine ;; and reload will cause inefficient code. Since sp is a FIXED_REG, we ! ;; can't allocate psuedos into it. (define_insn "andsi3" [(set (match_operand:SI 0 "not_sp_operand" "=m,d") --- 2811,2815 ---- ;; Prevent AND from being made with sp. This doesn't exist in the machine ;; and reload will cause inefficient code. Since sp is a FIXED_REG, we ! ;; can't allocate pseudos into it. (define_insn "andsi3" [(set (match_operand:SI 0 "not_sp_operand" "=m,d") *************** *** 2722,2725 **** --- 2862,2879 ---- "and%.w %2,%0") + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "general_operand" "+m,d")) + (and:HI (match_dup 0) + (match_operand:HI 1 "general_operand" "dn,dmn")))] + "" + "and%.w %1,%0") + + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "general_operand" "+m,d")) + (and:HI (match_operand:HI 1 "general_operand" "dn,dmn") + (match_dup 0)))] + "" + "and%.w %1,%0") + (define_insn "andqi3" [(set (match_operand:QI 0 "general_operand" "=m,d") *************** *** 2729,2732 **** --- 2883,2899 ---- "and%.b %2,%0") + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "general_operand" "+m,d")) + (and:QI (match_dup 0) + (match_operand:QI 1 "general_operand" "dn,dmn")))] + "" + "and%.b %1,%0") + + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "general_operand" "+m,d")) + (and:QI (match_operand:QI 1 "general_operand" "dn,dmn") + (match_dup 0)))] + "" + "and%.b %1,%0") ;; inclusive-or instructions *************** *** 2777,2780 **** --- 2944,2961 ---- "or%.w %2,%0") + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "general_operand" "+m,d")) + (ior:HI (match_dup 0) + (match_operand:HI 1 "general_operand" "dn,dmn")))] + "" + "or%.w %1,%0") + + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "general_operand" "+m,d")) + (ior:HI (match_operand:HI 1 "general_operand" "dn,dmn") + (match_dup 0)))] + "" + "or%.w %1,%0") + (define_insn "iorqi3" [(set (match_operand:QI 0 "general_operand" "=m,d") *************** *** 2783,2786 **** --- 2964,2981 ---- "" "or%.b %2,%0") + + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "general_operand" "+m,d")) + (ior:QI (match_dup 0) + (match_operand:QI 1 "general_operand" "dn,dmn")))] + "" + "or%.b %1,%0") + + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "general_operand" "+m,d")) + (ior:QI (match_operand:QI 1 "general_operand" "dn,dmn") + (match_dup 0)))] + "" + "or%.b %1,%0") ;; xor instructions *************** *** 2813,2816 **** --- 3008,3026 ---- "eor%.w %2,%0") + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "general_operand" "+dm")) + (xor:HI (match_dup 0) + (match_operand:HI 1 "general_operand" "dn")))] + "" + "eor%.w %1,%0") + + + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "general_operand" "+dm")) + (xor:HI (match_operand:HI 1 "general_operand" "dn") + (match_dup 0)))] + "" + "eor%.w %1,%0") + (define_insn "xorqi3" [(set (match_operand:QI 0 "general_operand" "=dm") *************** *** 2819,2822 **** --- 3029,3046 ---- "" "eor%.b %2,%0") + + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "general_operand" "+dm")) + (xor:QI (match_dup 0) + (match_operand:QI 1 "general_operand" "dn")))] + "" + "eor%.b %1,%0") + + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "general_operand" "+dm")) + (xor:QI (match_operand:QI 1 "general_operand" "dn") + (match_dup 0)))] + "" + "eor%.b %1,%0") ;; negation instructions *************** *** 2834,2837 **** --- 3058,3067 ---- "neg%.w %0") + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "general_operand" "+dm")) + (neg:HI (match_dup 0)))] + "" + "neg%.w %0") + (define_insn "negqi2" [(set (match_operand:QI 0 "general_operand" "=dm") *************** *** 2840,2843 **** --- 3070,3079 ---- "neg%.b %0") + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "general_operand" "+dm")) + (neg:QI (match_dup 0)))] + "" + "neg%.b %0") + (define_expand "negsf2" [(set (match_operand:SF 0 "general_operand" "") *************** *** 2958,2961 **** --- 3194,3203 ---- "not%.w %0") + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "general_operand" "+dm")) + (not:HI (match_dup 0)))] + "" + "not%.w %0") + (define_insn "one_cmplqi2" [(set (match_operand:QI 0 "general_operand" "=dm") *************** *** 2963,2966 **** --- 3205,3214 ---- "" "not%.b %0") + + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "general_operand" "+dm")) + (not:QI (match_dup 0)))] + "" + "not%.b %0") ;; arithmetic shift instructions *************** *** 2967,2970 **** --- 3215,3231 ---- ;; We don't need the shift memory by 1 bit instruction + ;; On all 68k models, this makes faster code in a special case. + + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=d") + (ashift:SI (match_operand:SI 1 "register_operand" "0") + (match_operand:SI 2 "immediate_operand" "i")))] + "(GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 16)" + "* + { + CC_STATUS_INIT; + return \"swap %0\;clr%.w %0\"; + }") + ;; On the 68000, this makes faster code in a special case. *************** *** 2974,2978 **** (match_operand:SI 2 "immediate_operand" "i")))] "(! TARGET_68020 && GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) >= 16 && INTVAL (operands[2]) <= 24)" "* { --- 3235,3239 ---- (match_operand:SI 2 "immediate_operand" "i")))] "(! TARGET_68020 && GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) > 16 && INTVAL (operands[2]) <= 24)" "* { *************** *** 2979,2987 **** CC_STATUS_INIT; - if (INTVAL (operands[2]) == 16) - return \"swap %0\;clrw %0\"; - operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) - 16); ! return \"asl%.w %2,%0\;swap %0\;clrw %0\"; }") --- 3240,3245 ---- CC_STATUS_INIT; operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) - 16); ! return \"asl%.w %2,%0\;swap %0\;clr%.w %0\"; }") *************** *** 3005,3008 **** --- 3263,3273 ---- "asl%.w %2,%0") + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d")) + (ashift:HI (match_dup 0) + (match_operand:HI 1 "general_operand" "dI")))] + "" + "asl%.w %1,%0") + (define_insn "ashlqi3" [(set (match_operand:QI 0 "register_operand" "=d") *************** *** 3012,3015 **** --- 3277,3296 ---- "asl%.b %2,%0") + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d")) + (ashift:QI (match_dup 0) + (match_operand:QI 1 "general_operand" "dI")))] + "" + "asl%.b %1,%0") + + ;; On all 68k models, this makes faster code in a special case. + + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=d") + (ashiftrt:SI (match_operand:SI 1 "register_operand" "0") + (match_operand:SI 2 "immediate_operand" "i")))] + "(GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 16)" + "swap %0\;ext%.l %0") + ;; On the 68000, this makes faster code in a special case. *************** *** 3019,3028 **** (match_operand:SI 2 "immediate_operand" "i")))] "(! TARGET_68020 && GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) >= 16 && INTVAL (operands[2]) <= 24)" "* { - if (INTVAL (operands[2]) == 16) - return \"swap %0\;ext%.l %0\"; - operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) - 16); return \"swap %0\;asr%.w %2,%0\;ext%.l %0\"; --- 3300,3306 ---- (match_operand:SI 2 "immediate_operand" "i")))] "(! TARGET_68020 && GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) > 16 && INTVAL (operands[2]) <= 24)" "* { operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) - 16); return \"swap %0\;asr%.w %2,%0\;ext%.l %0\"; *************** *** 3046,3049 **** --- 3324,3334 ---- "asr%.w %2,%0") + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d")) + (ashiftrt:HI (match_dup 0) + (match_operand:HI 1 "general_operand" "dI")))] + "" + "asr%.w %1,%0") + (define_insn "ashrqi3" [(set (match_operand:QI 0 "register_operand" "=d") *************** *** 3052,3058 **** --- 3337,3363 ---- "" "asr%.b %2,%0") + + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d")) + (ashiftrt:QI (match_dup 0) + (match_operand:QI 1 "general_operand" "dI")))] + "" + "asr%.b %1,%0") ;; logical shift instructions + ;; On all 68k models, this makes faster code in a special case. + + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=d") + (lshift:SI (match_operand:SI 1 "register_operand" "0") + (match_operand:SI 2 "immediate_operand" "i")))] + "(GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 16)" + "* + { + CC_STATUS_INIT; + return \"swap %0\;clr%.w %0\"; + }") + ;; On the 68000, this makes faster code in a special case. *************** *** 3062,3066 **** (match_operand:SI 2 "immediate_operand" "i")))] "(! TARGET_68020 && GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) >= 16 && INTVAL (operands[2]) <= 24)" "* { --- 3367,3371 ---- (match_operand:SI 2 "immediate_operand" "i")))] "(! TARGET_68020 && GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) > 16 && INTVAL (operands[2]) <= 24)" "* { *************** *** 3067,3075 **** CC_STATUS_INIT; - if (INTVAL (operands[2]) == 16) - return \"swap %0\;clrw %0\"; - operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) - 16); ! return \"lsl%.w %2,%0\;swap %0\;clrw %0\"; }") --- 3372,3377 ---- CC_STATUS_INIT; operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) - 16); ! return \"lsl%.w %2,%0\;swap %0\;clr%.w %0\"; }") *************** *** 3093,3096 **** --- 3395,3405 ---- "lsl%.w %2,%0") + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d")) + (lshift:HI (match_dup 0) + (match_operand:HI 1 "general_operand" "dI")))] + "" + "lsl%.w %1,%0") + (define_insn "lshlqi3" [(set (match_operand:QI 0 "register_operand" "=d") *************** *** 3100,3103 **** --- 3409,3432 ---- "lsl%.b %2,%0") + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d")) + (lshift:QI (match_dup 0) + (match_operand:QI 1 "general_operand" "dI")))] + "" + "lsl%.b %1,%0") + + ;; On all 68k models, this makes faster code in a special case. + + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=d") + (lshiftrt:SI (match_operand:SI 1 "register_operand" "0") + (match_operand:SI 2 "immediate_operand" "i")))] + "(GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) == 16)" + "* + { + CC_STATUS_INIT; + return \"clr%.w %0\;swap %0\"; + }") + ;; On the 68000, this makes faster code in a special case. *************** *** 3107,3122 **** (match_operand:SI 2 "immediate_operand" "i")))] "(! TARGET_68020 && GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) >= 16 && INTVAL (operands[2]) <= 24)" "* { - if (INTVAL (operands[2]) == 16) - { - CC_STATUS_INIT; - return \"clrw %0\;swap %0\"; - } - /* I think lsr%.w sets the CC properly. */ operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) - 16); ! return \"clrw %0\;swap %0\;lsr%.w %2,%0\"; }") --- 3436,3445 ---- (match_operand:SI 2 "immediate_operand" "i")))] "(! TARGET_68020 && GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) > 16 && INTVAL (operands[2]) <= 24)" "* { /* I think lsr%.w sets the CC properly. */ operands[2] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) - 16); ! return \"clr%.w %0\;swap %0\;lsr%.w %2,%0\"; }") *************** *** 3138,3141 **** --- 3461,3471 ---- "lsr%.w %2,%0") + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d")) + (lshiftrt:HI (match_dup 0) + (match_operand:HI 1 "general_operand" "dI")))] + "" + "lsr%.w %1,%0") + (define_insn "lshrqi3" [(set (match_operand:QI 0 "register_operand" "=d") *************** *** 3144,3147 **** --- 3474,3484 ---- "" "lsr%.b %2,%0") + + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d")) + (lshiftrt:QI (match_dup 0) + (match_operand:QI 1 "general_operand" "dI")))] + "" + "lsr%.b %1,%0") ;; rotate instructions *************** *** 3161,3164 **** --- 3498,3509 ---- "rol%.w %2,%0") + + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d")) + (rotate:HI (match_dup 0) + (match_operand:HI 1 "general_operand" "dI")))] + "" + "rol%.w %1,%0") + (define_insn "rotlqi3" [(set (match_operand:QI 0 "register_operand" "=d") *************** *** 3168,3171 **** --- 3513,3523 ---- "rol%.b %2,%0") + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d")) + (rotate:QI (match_dup 0) + (match_operand:QI 1 "general_operand" "dI")))] + "" + "rol%.b %1,%0") + (define_insn "rotrsi3" [(set (match_operand:SI 0 "register_operand" "=d") *************** *** 3182,3185 **** --- 3534,3544 ---- "ror%.w %2,%0") + (define_insn "" + [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d")) + (rotatert:HI (match_dup 0) + (match_operand:HI 1 "general_operand" "dI")))] + "" + "ror%.w %1,%0") + (define_insn "rotrqi3" [(set (match_operand:QI 0 "register_operand" "=d") *************** *** 3188,3191 **** --- 3547,3557 ---- "" "ror%.b %2,%0") + + (define_insn "" + [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d")) + (rotatert:QI (match_dup 0) + (match_operand:QI 1 "general_operand" "dI")))] + "" + "ror%.b %1,%0") ;; Special cases of bit-field insns which we should *************** *** 4050,4054 **** #ifdef MOTOROLA #ifdef SGS_CMP_ORDER ! #ifndef NO_ADDSUB_Q return \"sub%.w %#1,%0\;cmp%.w %0,%#-1\;jbne %l1\"; #else --- 4416,4420 ---- #ifdef MOTOROLA #ifdef SGS_CMP_ORDER ! #ifdef NO_ADDSUB_Q return \"sub%.w %#1,%0\;cmp%.w %0,%#-1\;jbne %l1\"; #else *************** *** 4078,4082 **** CC_STATUS_INIT; #ifdef MOTOROLA ! #ifndef NO_ADDSUB_Q if (DATA_REG_P (operands[0])) return \"dbra %0,%l1\;clr%.w %0\;sub%.l %#1,%0\;jbcc %l1\"; --- 4444,4448 ---- CC_STATUS_INIT; #ifdef MOTOROLA ! #ifdef NO_ADDSUB_Q if (DATA_REG_P (operands[0])) return \"dbra %0,%l1\;clr%.w %0\;sub%.l %#1,%0\;jbcc %l1\"; *************** *** 4088,4094 **** if (GET_CODE (operands[0]) == MEM) return \"subq%.l %#1,%0\;jbcc %l1\"; ! #endif /* not NO_ADDSUB_Q */ #ifdef SGS_CMP_ORDER ! #ifndef NO_ADDSUB_Q return \"sub.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\"; #else --- 4454,4460 ---- if (GET_CODE (operands[0]) == MEM) return \"subq%.l %#1,%0\;jbcc %l1\"; ! #endif /* NO_ADDSUB_Q */ #ifdef SGS_CMP_ORDER ! #ifdef NO_ADDSUB_Q return \"sub.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\"; #else *************** *** 4100,4104 **** #else /* not MOTOROLA */ if (DATA_REG_P (operands[0])) ! return \"dbra %0,%l1\;clrw %0\;subql %#1,%0\;jcc %l1\"; if (GET_CODE (operands[0]) == MEM) return \"subql %#1,%0\;jcc %l1\"; --- 4466,4470 ---- #else /* not MOTOROLA */ if (DATA_REG_P (operands[0])) ! return \"dbra %0,%l1\;clr%.w %0\;subql %#1,%0\;jcc %l1\"; if (GET_CODE (operands[0]) == MEM) return \"subql %#1,%0\;jcc %l1\"; *************** *** 4107,4111 **** }") ! ;; dbra patterns that use REG_NOTES info generated by strength_reduce. (define_insn "decrement_and_branch_until_zero" --- 4473,4522 ---- }") ! ;; Two dbra patterns that use REG_NOTES info generated by strength_reduce. ! ! (define_insn "" ! [(set (pc) ! (if_then_else ! (ge (plus:HI (match_operand:HI 0 "general_operand" "+g") ! (const_int -1)) ! (const_int 0)) ! (label_ref (match_operand 1 "" "")) ! (pc))) ! (set (match_dup 0) ! (plus:HI (match_dup 0) ! (const_int -1)))] ! "find_reg_note (insn, REG_NONNEG, 0)" ! "* ! { ! CC_STATUS_INIT; ! #ifdef MOTOROLA ! #ifdef NO_ADDSUB_Q ! if (DATA_REG_P (operands[0])) ! return \"dbra %0,%l1\"; ! if (GET_CODE (operands[0]) == MEM) ! return \"sub%.w %#1,%0\;jbcc %l1\"; ! #else ! if (DATA_REG_P (operands[0])) ! return \"dbra %0,%l1\"; ! if (GET_CODE (operands[0]) == MEM) ! return \"subq%.w %#1,%0\;jbcc %l1\"; ! #endif ! #ifdef SGS_CMP_ORDER ! #ifdef NO_ADDSUB_Q ! return \"sub.w %#1,%0\;cmp.w %0,%#-1\;jbne %l1\"; ! #else ! return \"subq.w %#1,%0\;cmp.w %0,%#-1\;jbne %l1\"; ! #endif ! #else /* not SGS_CMP_ORDER */ ! return \"subq.w %#1,%0\;cmp.w %#-1,%0\;jbne %l1\"; ! #endif /* not SGS_CMP_ORDER */ ! #else /* not MOTOROLA */ ! if (DATA_REG_P (operands[0])) ! return \"dbra %0,%l1\"; ! if (GET_CODE (operands[0]) == MEM) ! return \"subqw %#1,%0\;jcc %l1\"; ! return \"subqw %#1,%0\;cmpw %#-1,%0\;jne %l1\"; ! #endif /* not MOTOROLA */ ! }") (define_insn "decrement_and_branch_until_zero" *************** *** 4112,4116 **** [(set (pc) (if_then_else ! (gt (match_operand:SI 0 "general_operand" "+g") (const_int 0)) (label_ref (match_operand 1 "" "")) --- 4523,4528 ---- [(set (pc) (if_then_else ! (ge (plus:SI (match_operand:SI 0 "general_operand" "+g") ! (const_int -1)) (const_int 0)) (label_ref (match_operand 1 "" "")) *************** *** 4124,4128 **** CC_STATUS_INIT; #ifdef MOTOROLA ! #ifndef NO_ADDSUB_Q if (DATA_REG_P (operands[0])) return \"dbra %0,%l1\;clr%.w %0\;sub%.l %#1,%0\;jbcc %l1\"; --- 4536,4540 ---- CC_STATUS_INIT; #ifdef MOTOROLA ! #ifdef NO_ADDSUB_Q if (DATA_REG_P (operands[0])) return \"dbra %0,%l1\;clr%.w %0\;sub%.l %#1,%0\;jbcc %l1\"; *************** *** 4136,4140 **** #endif #ifdef SGS_CMP_ORDER ! #ifndef NO_ADDSUB_Q return \"sub.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\"; #else --- 4548,4552 ---- #endif #ifdef SGS_CMP_ORDER ! #ifdef NO_ADDSUB_Q return \"sub.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\"; #else *************** *** 4146,4150 **** #else /* not MOTOROLA */ if (DATA_REG_P (operands[0])) ! return \"dbra %0,%l1\;clrw %0\;subql %#1,%0\;jcc %l1\"; if (GET_CODE (operands[0]) == MEM) return \"subql %#1,%0\;jcc %l1\"; --- 4558,4562 ---- #else /* not MOTOROLA */ if (DATA_REG_P (operands[0])) ! return \"dbra %0,%l1\;clr%.w %0\;subql %#1,%0\;jcc %l1\"; if (GET_CODE (operands[0]) == MEM) return \"subql %#1,%0\;jcc %l1\"; *************** *** 4264,4268 **** }") ! ;; Used for framless functions which save no regs and allocate no locals. (define_insn "return" [(return)] --- 4676,4680 ---- }") ! ;; Used for frameless functions which save no regs and allocate no locals. (define_insn "return" [(return)] *************** *** 4414,4417 **** --- 4826,4894 ---- return \"\"; }") + + ;; dbCC peepholes + ;; + ;; Turns + ;; loop: + ;; [ ... ] + ;; jCC label ; abnormal loop termination + ;; dbra dN, loop ; normal loop termination + ;; + ;; Into + ;; loop: + ;; [ ... ] + ;; dbCC dN, loop + ;; jCC label + ;; + ;; Which moves the jCC condition outside the inner loop for free. + ;; + (define_peephole + [(set (pc) (if_then_else (match_operator 3 "valid_dbcc_comparison_p" + [(cc0) (const_int 0)]) + (label_ref (match_operand 2 "" "")) + (pc))) + (parallel + [(set (pc) + (if_then_else + (ge (plus:HI (match_operand:HI 0 "register_operand" "+d") + (const_int -1)) + (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc))) + (set (match_dup 0) + (plus:HI (match_dup 0) + (const_int -1)))])] + "DATA_REG_P (operands[0])" + "* + { + CC_STATUS_INIT; + output_dbcc_and_branch (operands); + return \"\"; + }") + + (define_peephole + [(set (pc) (if_then_else (match_operator 3 "valid_dbcc_comparison_p" + [(cc0) (const_int 0)]) + (label_ref (match_operand 2 "" "")) + (pc))) + (parallel + [(set (pc) + (if_then_else + (ge (plus:SI (match_operand:SI 0 "register_operand" "+d") + (const_int -1)) + (const_int 0)) + (label_ref (match_operand 1 "" "")) + (pc))) + (set (match_dup 0) + (plus:SI (match_dup 0) + (const_int -1)))])] + "DATA_REG_P (operands[0])" + "* + { + CC_STATUS_INIT; + output_dbcc_and_branch (operands); + return \"\"; + }") + ;; FPA multiply and add. diff -rc2N gcc-2.0/config/m68ksgs.h gcc-2.1/config/m68ksgs.h *** gcc-2.0/config/m68ksgs.h Sat Jan 11 22:30:32 1992 --- gcc-2.1/config/m68ksgs.h Mon Mar 16 04:45:34 1992 *************** *** 34,48 **** /* SGS specific assembler pseudo ops. */ ! #define BYTE_ASM_OP "\t.byte" ! #define WORD_ASM_OP "\t.short" ! #define LONG_ASM_OP "\t.long" ! #define SPACE_ASM_OP "\t.space" ! #define ALIGN_ASM_OP "\t.align" ! #define GLOBAL_ASM_OP "\t.global" ! #define SWBEG_ASM_OP "\t.swbeg" ! #define SET_ASM_OP "\t.set" ! #define UNALIGNED_SHORT_ASM_OP "\t.short" /* Used in dwarfout.c */ ! #define UNALIGNED_INT_ASM_OP "\t.long" /* Used in dwarfout.c */ #define ASM_PN_FORMAT "%s_%d" /* Format for private names */ --- 34,48 ---- /* SGS specific assembler pseudo ops. */ ! #define BYTE_ASM_OP ".byte" ! #define WORD_ASM_OP ".short" ! #define LONG_ASM_OP ".long" ! #define SPACE_ASM_OP ".space" ! #define ALIGN_ASM_OP ".align" ! #define GLOBAL_ASM_OP ".global" ! #define SWBEG_ASM_OP ".swbeg" ! #define SET_ASM_OP ".set" ! #define UNALIGNED_SHORT_ASM_OP ".short" /* Used in dwarfout.c */ ! #define UNALIGNED_INT_ASM_OP ".long" /* Used in dwarfout.c */ #define ASM_PN_FORMAT "%s_%d" /* Format for private names */ *************** *** 115,119 **** #undef ASM_OUTPUT_SHORT #define ASM_OUTPUT_SHORT(FILE,VALUE) \ ! ( fprintf ((FILE), "%s ", WORD_ASM_OP), \ output_addr_const ((FILE), (VALUE)), \ fprintf ((FILE), "\n")) --- 115,119 ---- #undef ASM_OUTPUT_SHORT #define ASM_OUTPUT_SHORT(FILE,VALUE) \ ! ( fprintf ((FILE), "\t%s ", WORD_ASM_OP), \ output_addr_const ((FILE), (VALUE)), \ fprintf ((FILE), "\n")) *************** *** 125,129 **** do { union { double d; long l[2]; } tem; \ tem.d = (VALUE); \ ! fprintf((FILE), "%s 0x%x,0x%x\n", LONG_ASM_OP, \ tem.l[0], tem.l[1]); \ } while (0) --- 125,129 ---- do { union { double d; long l[2]; } tem; \ tem.d = (VALUE); \ ! fprintf((FILE), "\t%s 0x%x,0x%x\n", LONG_ASM_OP, \ tem.l[0], tem.l[1]); \ } while (0) *************** *** 135,139 **** do { union { float f; long l;} tem; \ tem.f = (VALUE); \ ! fprintf ((FILE), "%s 0x%x\n", LONG_ASM_OP, tem.l); \ } while (0) --- 135,139 ---- do { union { float f; long l;} tem; \ tem.f = (VALUE); \ ! fprintf ((FILE), "\t%s 0x%x\n", LONG_ASM_OP, tem.l); \ } while (0) *************** *** 144,148 **** #define ASM_OUTPUT_ALIGN(FILE,LOG) \ if ((LOG) > 0) \ ! fprintf ((FILE), "%s \t%u\n", ALIGN_ASM_OP, 1 << (LOG)); \ else if ((LOG) > 31) \ abort (); --- 144,148 ---- #define ASM_OUTPUT_ALIGN(FILE,LOG) \ if ((LOG) > 0) \ ! fprintf ((FILE), "\t%s \t%u\n", ALIGN_ASM_OP, 1 << (LOG)); \ else if ((LOG) > 31) \ abort (); *************** *** 158,162 **** { \ register int sp = 0, lp = 0, ch; \ ! fprintf ((FILE), "%s ", BYTE_ASM_OP); \ do { \ ch = (PTR)[sp]; \ --- 158,162 ---- { \ register int sp = 0, lp = 0, ch; \ ! fprintf ((FILE), "\t%s ", BYTE_ASM_OP); \ do { \ ch = (PTR)[sp]; \ *************** *** 173,177 **** if ((sp % 10) == 0) \ { \ ! fprintf ((FILE), "\n%s ", BYTE_ASM_OP); \ } \ else \ --- 173,177 ---- if ((sp % 10) == 0) \ { \ ! fprintf ((FILE), "\n\t%s ", BYTE_ASM_OP); \ } \ else \ *************** *** 206,210 **** #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ do { \ ! fprintf ((FILE), "%s ", GLOBAL_ASM_OP); \ assemble_name ((FILE), NAME); \ fputs ("\n", FILE); \ --- 206,210 ---- #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ do { \ ! fprintf ((FILE), "\t%s ", GLOBAL_ASM_OP); \ assemble_name ((FILE), NAME); \ fputs ("\n", FILE); \ *************** *** 227,232 **** #undef ASM_OUTPUT_SKIP #define ASM_OUTPUT_SKIP(FILE,SIZE) \ ! fprintf (FILE, "%s %u\n", SPACE_ASM_OP, (SIZE)) ! /* Translate Motorola opcodes such as `jbeq' into SGS opcodes such as `beq.w'. --- 227,232 ---- #undef ASM_OUTPUT_SKIP #define ASM_OUTPUT_SKIP(FILE,SIZE) \ ! fprintf (FILE, "\t%s %u\n", SPACE_ASM_OP, (SIZE)) ! /* Translate Motorola opcodes such as `jbeq' into SGS opcodes such as `beq.w'. *************** *** 237,252 **** Change `divsl' to `tdivs' (32/32 -> 32r:32q) Change `divul' to `tdivu' (32/32 -> 32r:32q) */ #define ASM_OUTPUT_OPCODE(FILE, PTR) \ { \ extern int flag_pic; \ ! if (!strncmp ((PTR), "jbsr", 4)) { \ ! if (flag_pic) \ ! fprintf ((FILE), "bsr"); \ ! else \ ! fprintf ((FILE),"jsr"); \ ! (PTR) += 4; \ ! } else if ((PTR)[0] == 'j' && (PTR)[1] == 'b') \ { ++(PTR); \ while (*(PTR) != ' ') \ --- 237,327 ---- Change `divsl' to `tdivs' (32/32 -> 32r:32q) Change `divul' to `tdivu' (32/32 -> 32r:32q) + Optionally change swap to swap.w. */ + #ifdef SGS_SWAP_W + #define ASM_OUTPUT_OPCODE(FILE, PTR) \ + { \ + extern int flag_pic; \ + if (!strncmp ((PTR), "jbsr", 4)) \ + { if (flag_pic) \ + fprintf ((FILE), "bsr"); \ + else \ + fprintf ((FILE), "jsr"); \ + (PTR) += 4; } \ + else if ((PTR)[0] == 'j' && (PTR)[1] == 'b') \ + { ++(PTR); \ + while (*(PTR) != ' ') \ + { putc (*(PTR), (FILE)); ++(PTR); } \ + fprintf ((FILE), ".w"); } \ + else if ((PTR)[0] == 's') \ + { \ + if (!strncmp ((PTR), "swap", 4)) \ + { fprintf ((FILE), "swap.w"); (PTR) += 4; } \ + } \ + /* FMOVE ==> FMOV, (and F%& F%$ translations) */ \ + else if ((PTR)[0] == 'f') \ + { \ + if (!strncmp ((PTR), "fmove", 5)) \ + { fprintf ((FILE), "fmov"); (PTR) += 5; } \ + else if (!strncmp ((PTR), "ftst", 4)) \ + { fprintf ((FILE), "ftest"); (PTR) += 4; } \ + else if (!strncmp ((PTR), "fbne", 4)) \ + { fprintf ((FILE), "fbneq"); (PTR) += 4; } \ + else if (!strncmp ((PTR), "fsne", 4)) \ + { fprintf ((FILE), "fsneq"); (PTR) += 4; } \ + else if (!strncmp ((PTR), "f%$move", 7)) \ + { (PTR) += 7; \ + if (TARGET_68040_ONLY) \ + fprintf ((FILE), "fsmov"); \ + else fprintf ((FILE), "fmov"); } \ + else if (!strncmp ((PTR), "f%&move", 7)) \ + { (PTR) += 7; \ + if (TARGET_68040_ONLY) \ + fprintf ((FILE), "fdmov"); \ + else fprintf ((FILE), "fmov"); } \ + } \ + /* MOVE, MOVEA, MOVEQ, MOVEC ==> MOV */ \ + else if ((PTR)[0] == 'm' && (PTR)[1] == 'o' \ + && (PTR)[2] == 'v' && (PTR)[3] == 'e') \ + { fprintf ((FILE), "mov"); (PTR) += 4; \ + if ((PTR)[0] == 'q' || (PTR)[0] == 'a' \ + || (PTR)[0] == 'c') (PTR)++; } \ + /* SUB, SUBQ, SUBA, SUBI ==> SUB */ \ + else if ((PTR)[0] == 's' && (PTR)[1] == 'u' \ + && (PTR)[2] == 'b') \ + { fprintf ((FILE), "sub"); (PTR) += 3; \ + if ((PTR)[0] == 'q' || (PTR)[0] == 'i' \ + || (PTR)[0] == 'a') (PTR)++; } \ + /* CMP, CMPA, CMPI, CMPM ==> CMP */ \ + else if ((PTR)[0] == 'c' && (PTR)[1] == 'm' \ + && (PTR)[2] == 'p') \ + { fprintf ((FILE), "cmp"); (PTR) += 3; \ + if ((PTR)[0] == 'a' || (PTR)[0] == 'i' \ + || (PTR)[0] == 'm') (PTR)++; } \ + /* DIVSL ==> TDIVS */ \ + else if ((PTR)[0] == 'd' && (PTR)[1] == 'i' \ + && (PTR)[2] == 'v' && (PTR)[3] == 's' \ + && (PTR)[4] == 'l') \ + { fprintf ((FILE), "tdivs"); (PTR) += 5; } \ + /* DIVUL ==> TDIVU */ \ + else if ((PTR)[0] == 'd' && (PTR)[1] == 'i' \ + && (PTR)[2] == 'v' && (PTR)[3] == 'u' \ + && (PTR)[4] == 'l') \ + { fprintf ((FILE), "tdivu"); (PTR) += 5; } \ + } + + #else /* not SGS_SWAP_W */ + #define ASM_OUTPUT_OPCODE(FILE, PTR) \ { \ extern int flag_pic; \ ! if (!strncmp ((PTR), "jbsr", 4)) \ ! { if (flag_pic) \ ! fprintf ((FILE), "bsr"); \ ! else \ ! fprintf ((FILE), "jsr"); \ ! (PTR) += 4; } \ ! else if ((PTR)[0] == 'j' && (PTR)[1] == 'b') \ { ++(PTR); \ while (*(PTR) != ' ') \ *************** *** 279,284 **** && (PTR)[2] == 'v' && (PTR)[3] == 'e') \ { fprintf ((FILE), "mov"); (PTR) += 4; \ ! if ((PTR)[0] == 'q' || (PTR)[0] == 'a' || \ ! (PTR)[0] == 'c') (PTR)++; } \ /* SUB, SUBQ, SUBA, SUBI ==> SUB */ \ else if ((PTR)[0] == 's' && (PTR)[1] == 'u' \ --- 354,359 ---- && (PTR)[2] == 'v' && (PTR)[3] == 'e') \ { fprintf ((FILE), "mov"); (PTR) += 4; \ ! if ((PTR)[0] == 'q' || (PTR)[0] == 'a' \ ! || (PTR)[0] == 'c') (PTR)++; } \ /* SUB, SUBQ, SUBA, SUBI ==> SUB */ \ else if ((PTR)[0] == 's' && (PTR)[1] == 'u' \ *************** *** 285,290 **** && (PTR)[2] == 'b') \ { fprintf ((FILE), "sub"); (PTR) += 3; \ ! if ((PTR)[0] == 'q' || (PTR)[0] == 'i' || \ ! (PTR)[0] == 'a') (PTR)++; } \ /* CMP, CMPA, CMPI, CMPM ==> CMP */ \ else if ((PTR)[0] == 'c' && (PTR)[1] == 'm' \ --- 360,365 ---- && (PTR)[2] == 'b') \ { fprintf ((FILE), "sub"); (PTR) += 3; \ ! if ((PTR)[0] == 'q' || (PTR)[0] == 'i' \ ! || (PTR)[0] == 'a') (PTR)++; } \ /* CMP, CMPA, CMPI, CMPM ==> CMP */ \ else if ((PTR)[0] == 'c' && (PTR)[1] == 'm' \ *************** *** 291,296 **** && (PTR)[2] == 'p') \ { fprintf ((FILE), "cmp"); (PTR) += 3; \ ! if ((PTR)[0] == 'a' || (PTR)[0] == 'i' || \ ! (PTR)[0] == 'm') (PTR)++; } \ /* DIVSL ==> TDIVS */ \ else if ((PTR)[0] == 'd' && (PTR)[1] == 'i' \ --- 366,371 ---- && (PTR)[2] == 'p') \ { fprintf ((FILE), "cmp"); (PTR) += 3; \ ! if ((PTR)[0] == 'a' || (PTR)[0] == 'i' \ ! || (PTR)[0] == 'm') (PTR)++; } \ /* DIVSL ==> TDIVS */ \ else if ((PTR)[0] == 'd' && (PTR)[1] == 'i' \ *************** *** 305,308 **** --- 380,385 ---- } + #endif /* not SGS_SWAP_W */ + /* This macro outputs the label at the start of a switch table. The ".swbeg " is an assembler directive that causes the switch table *************** *** 311,315 **** #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \ ! fprintf ((FILE), "%s &%d\n", SWBEG_ASM_OP, XVECLEN (PATTERN (TABLE), 1)); \ ASM_OUTPUT_INTERNAL_LABEL((FILE),(PREFIX),(NUM)); --- 388,392 ---- #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \ ! fprintf ((FILE), "\t%s &%d\n", SWBEG_ASM_OP, XVECLEN (PATTERN (TABLE), 1)); \ ASM_OUTPUT_INTERNAL_LABEL((FILE),(PREFIX),(NUM)); *************** *** 325,329 **** #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE) \ if (RTX_INTEGRATED_P (TABLE)) \ ! asm_fprintf (FILE, "%s %LLD%d,%LL%d-%LLI%d-2.b\n", \ SET_ASM_OP, (NUM), (NUM), (NUM)) --- 402,406 ---- #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE) \ if (RTX_INTEGRATED_P (TABLE)) \ ! asm_fprintf (FILE, "\t%s %LLD%d,%LL%d-%LLI%d-2.b\n",\ SET_ASM_OP, (NUM), (NUM), (NUM)) *************** *** 332,336 **** #undef ASM_OUTPUT_ADDR_DIFF_ELT #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ ! asm_fprintf (FILE, "%s %LL%d-%LL%d\n", WORD_ASM_OP, VALUE, REL) /* Currently, JUMP_TABLES_IN_TEXT_SECTION must be defined in order to --- 409,413 ---- #undef ASM_OUTPUT_ADDR_DIFF_ELT #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ ! asm_fprintf (FILE, "\t%s %LL%d-%LL%d\n", WORD_ASM_OP, VALUE, REL) /* Currently, JUMP_TABLES_IN_TEXT_SECTION must be defined in order to diff -rc2N gcc-2.0/config/m68kv4.h gcc-2.1/config/m68kv4.h *** gcc-2.0/config/m68kv4.h Thu Jan 16 14:10:12 1992 --- gcc-2.1/config/m68kv4.h Mon Mar 16 04:46:33 1992 *************** *** 22,26 **** /* Use SGS_* macros to control compilation in m68k.md */ - #define SGS_SWAP_W /* Use swap.w rather than just plain swap */ #define SGS_SWITCH_TABLES /* Different switch table handling */ --- 22,25 ---- *************** *** 86,90 **** #undef BSS_ASM_OP ! #define BSS_ASM_OP "\t.lcomm" /* Register in which address to store a structure value is passed to a --- 85,89 ---- #undef BSS_ASM_OP ! #define BSS_ASM_OP ".lcomm" /* Register in which address to store a structure value is passed to a *************** *** 114,118 **** #undef ASM_OUTPUT_SKIP #define ASM_OUTPUT_SKIP(FILE,SIZE) \ ! fprintf (FILE, "%s %u\n", SPACE_ASM_OP, (SIZE)) /* 1 if N is a possible register number for a function value. --- 113,117 ---- #undef ASM_OUTPUT_SKIP #define ASM_OUTPUT_SKIP(FILE,SIZE) \ ! fprintf (FILE, "\t%s %u\n", SPACE_ASM_OP, (SIZE)) /* 1 if N is a possible register number for a function value. diff -rc2N gcc-2.0/config/m88k-move.sh gcc-2.1/config/m88k-move.sh *** gcc-2.0/config/m88k-move.sh Mon Jan 6 08:21:43 1992 --- gcc-2.1/config/m88k-move.sh Sat Mar 14 00:15:57 1992 *************** *** 6,10 **** #ident "@(#) m88k-move.sh 3-Jan-92" # ! # This file provided by Data General, Feburary 1990. # # This script generates the necessary movstr library functions --- 6,10 ---- #ident "@(#) m88k-move.sh 3-Jan-92" # ! # This file provided by Data General, February 1990. # # This script generates the necessary movstr library functions diff -rc2N gcc-2.0/config/m88k.c gcc-2.1/config/m88k.c *** gcc-2.0/config/m88k.c Thu Feb 6 10:07:08 1992 --- gcc-2.1/config/m88k.c Fri Mar 20 07:22:46 1992 *************** *** 48,52 **** extern FILE *asm_out_file; ! static char out_sccs_id[] = "@(#)m88k.c 1.96.5.2 06 Feb 1992 10:02:20"; static char tm_sccs_id [] = TM_SCCS_ID; --- 48,52 ---- extern FILE *asm_out_file; ! static char out_sccs_id[] = "@(#)m88k.c 2.0.3.4 19 Mar 1992 11:11:58"; static char tm_sccs_id [] = TM_SCCS_ID; *************** *** 64,67 **** --- 64,69 ---- rtx m88k_compare_op0; /* cmpsi operand 0 */ rtx m88k_compare_op1; /* cmpsi operand 1 */ + + enum attr_cpu m88k_cpu; /* target cpu */ /* Determine what instructions are needed to manufacture the integer VALUE *************** *** 217,221 **** return 1; } ! if (! reload_in_progress) { operands[0] = validize_mem (operand0); --- 219,223 ---- return 1; } ! if (! reload_in_progress && ! reload_completed) { operands[0] = validize_mem (operand0); *************** *** 230,234 **** && GET_CODE (operand1) != CONST_DOUBLE) { ! rtx temp = reload_in_progress ? operand0 : gen_reg_rtx (Pmode); operands[1] = legitimize_address (flag_pic && symbolic_address_p (operand1), --- 232,237 ---- && GET_CODE (operand1) != CONST_DOUBLE) { ! rtx temp = ((reload_in_progress || reload_completed) ! ? operand0 : gen_reg_rtx (Pmode)); operands[1] = legitimize_address (flag_pic && symbolic_address_p (operand1), *************** *** 695,699 **** /* Output a call. Normally this is just bsr or jsr, but this also deals with accomplishing a branch after the call by incrementing r1. This requires ! that various assembler bugs be accomodated. The 4.30 DG/UX assembler requires that forward references not occur when computing the difference of two labels. The [version?] Motorola assembler computes a word difference. --- 698,702 ---- /* Output a call. Normally this is just bsr or jsr, but this also deals with accomplishing a branch after the call by incrementing r1. This requires ! that various assembler bugs be accommodated. The 4.30 DG/UX assembler requires that forward references not occur when computing the difference of two labels. The [version?] Motorola assembler computes a word difference. *************** *** 809,813 **** (low, "L", CODE_LABEL_NUMBER (XEXP (sb_low, 0))); /* This will change as the assembler requirements become known. */ ! fprintf (stream, "%s\t %s,%s-%s\n", DEF_ASM_OP, &name[1], &high[1], &low[1]); } --- 812,816 ---- (low, "L", CODE_LABEL_NUMBER (XEXP (sb_low, 0))); /* This will change as the assembler requirements become known. */ ! fprintf (stream, "\t%s\t %s,%s-%s\n", DEF_ASM_OP, &name[1], &high[1], &low[1]); } *************** *** 818,822 **** /* Report errors on floating point, if we are given NaN's, or such. Leave the number as is, though, since we output the number in hex, and the ! assemble won't choak on it. */ void --- 821,825 ---- /* Report errors on floating point, if we are given NaN's, or such. Leave the number as is, though, since we output the number in hex, and the ! assembler won't choke on it. */ void *************** *** 1309,1313 **** time_t now = time ((time_t *)0); ! sprintf (indent, "]\"\n%s\t \"@(#)%s [", IDENT_ASM_OP, main_input_filename); fprintf (file, indent+3); pos = fprintf (file, "gcc %s, %.24s,", VERSION_STRING, ctime (&now)); --- 1312,1316 ---- time_t now = time ((time_t *)0); ! sprintf (indent, "]\"\n\t%s\t \"@(#)%s [", IDENT_ASM_OP, main_input_filename); fprintf (file, indent+3); pos = fprintf (file, "gcc %s, %.24s,", VERSION_STRING, ctime (&now)); *************** *** 1329,1333 **** register int num = 0; ! fprintf (file, "%s\t \"", ASCII_DATA_ASM_OP); for (i = 0; i < size; i++) { --- 1332,1336 ---- register int num = 0; ! fprintf (file, "\t%s\t \"", ASCII_DATA_ASM_OP); for (i = 0; i < size; i++) { *************** *** 1336,1340 **** if (num > 48) { ! fprintf (file, "\"\n%s\t \"", ASCII_DATA_ASM_OP); num = 0; } --- 1339,1343 ---- if (num > 48) { ! fprintf (file, "\"\n\t%s\t \"", ASCII_DATA_ASM_OP); num = 0; } *************** *** 1404,1408 **** if (state == ps_name || state == ps_value) { ! fprintf (asm_out_file, "%s\t ", WEAK_ASM_OP); ASM_OUTPUT_LABELREF (asm_out_file, name); fputc ('\n', asm_out_file); --- 1407,1411 ---- if (state == ps_name || state == ps_value) { ! fprintf (asm_out_file, "\t%s\t ", WEAK_ASM_OP); ASM_OUTPUT_LABELREF (asm_out_file, name); fputc ('\n', asm_out_file); *************** *** 1409,1413 **** if (state == ps_value) { ! fprintf (asm_out_file, "%s\t ", DEF_ASM_OP); ASM_OUTPUT_LABELREF (asm_out_file, name); fputc (',', asm_out_file); --- 1412,1416 ---- if (state == ps_value) { ! fprintf (asm_out_file, "\t%s\t ", DEF_ASM_OP); ASM_OUTPUT_LABELREF (asm_out_file, name); fputc (',', asm_out_file); *************** *** 1883,1887 **** { rtx insn = get_last_insn (); ! #if (MONITOR_GCC & 0x4) /* What are interesting prologue/epiloge values? */ fprintf (stream, "; size = %d, m88k_fp_offset = %d, m88k_stack_size = %d\n", size, m88k_fp_offset, m88k_stack_size); --- 1886,1890 ---- { rtx insn = get_last_insn (); ! #if (MONITOR_GCC & 0x4) /* What are interesting prologue/epilogue values? */ fprintf (stream, "; size = %d, m88k_fp_offset = %d, m88k_stack_size = %d\n", size, m88k_fp_offset, m88k_stack_size); *************** *** 2130,2137 **** else if (reg != arg_pointer_rtx) { if (! (GET_CODE (reg) == REG && REGNO (reg) >= FIRST_PSEUDO_REGISTER)) - /* @@ For now, I'd like to know if this happens. */ warning ("Internal gcc error: Can't express symbolic location"); return 0; } --- 2133,2141 ---- else if (reg != arg_pointer_rtx) { + #if (MONITOR_GCC & 0x10) /* Watch for suspicious symbolic locations. */ if (! (GET_CODE (reg) == REG && REGNO (reg) >= FIRST_PSEUDO_REGISTER)) warning ("Internal gcc error: Can't express symbolic location"); + #endif return 0; } *************** *** 2193,2197 **** tdesc_section (); ! fprintf (file, "%s\t %d", INT_ASM_OP, (16 << 2) | 2 /* 8:0,22:16,2:2 */); fprintf (file, ",%d", flag_pic ? 2 : 1); --- 2197,2201 ---- tdesc_section (); ! fprintf (file, "\t%s\t %d", INT_ASM_OP, (16 << 2) | 2 /* 8:0,22:16,2:2 */); fprintf (file, ",%d", flag_pic ? 2 : 1); *************** *** 2441,2445 **** /* Allocate the va_list constructor */ ! block = assign_stack_local (BLKmode, 3 * UNITS_PER_WORD, BITS_PER_UNIT); RTX_UNCHANGING_P (block) = 1; RTX_UNCHANGING_P (XEXP (block, 0)) = 1; --- 2445,2449 ---- /* Allocate the va_list constructor */ ! block = assign_stack_local (BLKmode, 3 * UNITS_PER_WORD, BITS_PER_WORD); RTX_UNCHANGING_P (block) = 1; RTX_UNCHANGING_P (XEXP (block, 0)) = 1; *************** *** 2725,2729 **** return; ! case 'r': /* an immediate 0 should be repesented as `r0' */ if (x == const0_rtx) { --- 2729,2733 ---- return; ! case 'r': /* an immediate 0 should be represented as `r0' */ if (x == const0_rtx) { diff -rc2N gcc-2.0/config/m88k.h gcc-2.1/config/m88k.h *** gcc-2.0/config/m88k.h Wed Feb 12 13:03:00 1992 --- gcc-2.1/config/m88k.h Fri Mar 20 11:19:32 1992 *************** *** 96,99 **** --- 96,101 ---- extern struct rtx_def *m88k_compare_op1; + extern enum attr_cpu m88k_cpu; + extern int null_epilogue (); extern int integer_ok_for_set (); *************** *** 203,209 **** Redefined in m88kv4.h, and m88kluna.h. */ #define VERSION_INFO1 "88open OCS/BCS, " ! #define VERSION_INFO2 "12 Feb 1992" #define VERSION_STRING version_string ! #define TM_SCCS_ID "@(#)m88k.h 1.96.5.5 12 Feb 1992 12:59:25" /* Run-time compilation parameters selecting different hardware subsets. */ --- 205,211 ---- Redefined in m88kv4.h, and m88kluna.h. */ #define VERSION_INFO1 "88open OCS/BCS, " ! #define VERSION_INFO2 "20 Mar 1992" #define VERSION_STRING version_string ! #define TM_SCCS_ID "@(#)m88k.h 2.0.3.6 20 Mar 1992 08:33:40" /* Run-time compilation parameters selecting different hardware subsets. */ *************** *** 303,306 **** --- 305,311 ---- target_flags |= CPU_DEFAULT; \ \ + m88k_cpu = (TARGET_88000 ? CPU_M88000 \ + : (TARGET_88100 ? CPU_M88100 : CPU_M88110)); \ + \ if (TARGET_BIG_PIC) \ flag_pic = 2; \ *************** *** 360,364 **** #define WORDS_BIG_ENDIAN 1 ! /* Number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 365,369 ---- #define WORDS_BIG_ENDIAN 1 ! /* Number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 410,416 **** #define STRUCTURE_SIZE_BOUNDARY 8 ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT /* A bitfield declared as `int' forces `int' alignment for the struct. */ --- 415,421 ---- #define STRUCTURE_SIZE_BOUNDARY 8 ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 1 /* A bitfield declared as `int' forces `int' alignment for the struct. */ *************** *** 423,427 **** /* Report errors on floating point, if we are given NaN's, or such. Leave the number as is, though, since we output the number in hex, and the ! assemble won't choak on it. */ #define CHECK_FLOAT_VALUE(MODE,VALUE) check_float_value (MODE, VALUE) --- 428,432 ---- /* Report errors on floating point, if we are given NaN's, or such. Leave the number as is, though, since we output the number in hex, and the ! assembler won't choke on it. */ #define CHECK_FLOAT_VALUE(MODE,VALUE) check_float_value (MODE, VALUE) *************** *** 483,491 **** { \ if (flag_pic) \ ! { \ ! fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ ! call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ ! global_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ ! } \ } --- 488,492 ---- { \ if (flag_pic) \ ! fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ } *************** *** 645,649 **** that letter. ! For the m88000, the following contraints are used: `I' requires a non-negative 16-bit value. `J' requires a non-positive 16-bit value. --- 646,650 ---- that letter. ! For the m88000, the following constants are used: `I' requires a non-negative 16-bit value. `J' requires a non-positive 16-bit value. *************** *** 988,992 **** must be copied; the last 12 bytes are just storage that's filled in later. So for allocation purposes, it's 32+12 bytes, but for ! initializaiton purposes, it's 32 bytes. */ #define TRAMPOLINE_SIZE (32+12) --- 989,993 ---- must be copied; the last 12 bytes are just storage that's filled in later. So for allocation purposes, it's 32+12 bytes, but for ! initialization purposes, it's 32 bytes. */ #define TRAMPOLINE_SIZE (32+12) *************** *** 1359,1363 **** /* Provide the costs of an addressing mode that contains ADDR. ! If ADDR is not a valid address, it's cost is irrelavent. REG+REG is made slightly more expensive because it might keep a register live for longer than we might like. */ --- 1360,1364 ---- /* Provide the costs of an addressing mode that contains ADDR. ! If ADDR is not a valid address, its cost is irrelevant. REG+REG is made slightly more expensive because it might keep a register live for longer than we might like. */ *************** *** 1417,1464 **** /* These are used in varasm.c as well. */ ! #define TEXT_SECTION_ASM_OP "\ttext" ! #define DATA_SECTION_ASM_OP "\tdata" /* Other sections. */ #define CONST_SECTION_ASM_OP (VERSION_0300_SYNTAX \ ! ? "\tsection\t .rodata,\"a\"\n" \ ! : "\tsection\t .rodata,\"x\"\n") #define TDESC_SECTION_ASM_OP (VERSION_0300_SYNTAX \ ! ? "\tsection\t .tdesc,\"a\"" \ ! : "\tsection\t .tdesc,\"x\"") /* These must be constant strings for crtstuff.c. */ ! #define CTORS_SECTION_ASM_OP "\tsection\t .ctors,\"d\"\n" ! #define DTORS_SECTION_ASM_OP "\tsection\t .dtors,\"d\"\n" ! #define INIT_SECTION_ASM_OP "\tsection\t .init,\"x\"" ! #define FINI_SECTION_ASM_OP "\tsection\t .fini,\"x\"" /* These are pretty much common to all assemblers. */ ! #define IDENT_ASM_OP "\tident" ! #define FILE_ASM_OP "\tfile" ! #define SECTION_ASM_OP "\tsection" ! #define DEF_ASM_OP "\tdef" ! #define GLOBAL_ASM_OP "\tglobal" ! #define ALIGN_ASM_OP "\talign" ! #define SKIP_ASM_OP "\tzero" ! #define COMMON_ASM_OP "\tcomm" ! #define LOCAL_ASM_OP "\tbss" ! #define FLOAT_ASM_OP "\tfloat" ! #define DOUBLE_ASM_OP "\tdouble" ! #define INT_ASM_OP "\tword" #define ASM_LONG INT_ASM_OP ! #define SHORT_ASM_OP "\thalf" ! #define CHAR_ASM_OP "\tbyte" ! #define ASCII_DATA_ASM_OP "\tstring" /* These are particular to the global pool optimization. */ ! #define SBSS_ASM_OP "\tsbss" ! #define SCOMM_ASM_OP "\tscomm" ! #define SDATA_SECTION_ASM_OP "\tsdata" /* These are specific to PIC. */ ! #define TYPE_ASM_OP "\ttype" ! #define SIZE_ASM_OP "\tsize" ! #define WEAK_ASM_OP "\tweak" #ifndef AS_BUG_POUND_TYPE /* Faulty assemblers require @ rather than #. */ #undef TYPE_OPERAND_FMT --- 1418,1465 ---- /* These are used in varasm.c as well. */ ! #define TEXT_SECTION_ASM_OP "text" ! #define DATA_SECTION_ASM_OP "data" /* Other sections. */ #define CONST_SECTION_ASM_OP (VERSION_0300_SYNTAX \ ! ? "section\t .rodata,\"a\"" \ ! : "section\t .rodata,\"x\"") #define TDESC_SECTION_ASM_OP (VERSION_0300_SYNTAX \ ! ? "section\t .tdesc,\"a\"" \ ! : "section\t .tdesc,\"x\"") /* These must be constant strings for crtstuff.c. */ ! #define CTORS_SECTION_ASM_OP "section\t .ctors,\"d\"" ! #define DTORS_SECTION_ASM_OP "section\t .dtors,\"d\"" ! #define INIT_SECTION_ASM_OP "section\t .init,\"x\"" ! #define FINI_SECTION_ASM_OP "section\t .fini,\"x\"" /* These are pretty much common to all assemblers. */ ! #define IDENT_ASM_OP "ident" ! #define FILE_ASM_OP "file" ! #define SECTION_ASM_OP "section" ! #define DEF_ASM_OP "def" ! #define GLOBAL_ASM_OP "global" ! #define ALIGN_ASM_OP "align" ! #define SKIP_ASM_OP "zero" ! #define COMMON_ASM_OP "comm" ! #define LOCAL_ASM_OP "bss" ! #define FLOAT_ASM_OP "float" ! #define DOUBLE_ASM_OP "double" ! #define INT_ASM_OP "word" #define ASM_LONG INT_ASM_OP ! #define SHORT_ASM_OP "half" ! #define CHAR_ASM_OP "byte" ! #define ASCII_DATA_ASM_OP "string" /* These are particular to the global pool optimization. */ ! #define SBSS_ASM_OP "sbss" ! #define SCOMM_ASM_OP "scomm" ! #define SDATA_SECTION_ASM_OP "sdata" /* These are specific to PIC. */ ! #define TYPE_ASM_OP "type" ! #define SIZE_ASM_OP "size" ! #define WEAK_ASM_OP "weak" #ifndef AS_BUG_POUND_TYPE /* Faulty assemblers require @ rather than #. */ #undef TYPE_OPERAND_FMT *************** *** 1467,1475 **** /* These are specific to version 03.00 assembler syntax. */ ! #define INTERNAL_ASM_OP "\tlocal" ! #define VERSION_ASM_OP "\tversion" #define ASM_DWARF_POP_SECTION(FILE) fputs ("\tprevious\n", FILE) ! #define UNALIGNED_SHORT_ASM_OP "\tuahalf" ! #define UNALIGNED_INT_ASM_OP "\tuaword" /* Output any initial stuff to the assembly file. Always put out --- 1468,1476 ---- /* These are specific to version 03.00 assembler syntax. */ ! #define INTERNAL_ASM_OP "local" ! #define VERSION_ASM_OP "version" #define ASM_DWARF_POP_SECTION(FILE) fputs ("\tprevious\n", FILE) ! #define UNALIGNED_SHORT_ASM_OP "uahalf" ! #define UNALIGNED_INT_ASM_OP "uaword" /* Output any initial stuff to the assembly file. Always put out *************** *** 1478,1482 **** Immediately after putting out the file, put out a "sem." declaration. This should be harmless on other systems, and ! is used in DG/UX by the debuggers to suppliment COFF. The fields in the integer value are as follows: --- 1479,1483 ---- Immediately after putting out the file, put out a "sem." declaration. This should be harmless on other systems, and ! is used in DG/UX by the debuggers to supplement COFF. The fields in the integer value are as follows: *************** *** 1515,1519 **** do { \ if (VERSION_0300_SYNTAX) \ ! fprintf (FILE, "%s\t \"03.00\"\n", VERSION_ASM_OP); \ } while (0) --- 1516,1520 ---- do { \ if (VERSION_0300_SYNTAX) \ ! fprintf (FILE, "\t%s\t \"03.00\"\n", VERSION_ASM_OP); \ } while (0) *************** *** 1527,1531 **** #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) \ ! fprintf (FILE, "%s\t \"%s\"\n", FILE_ASM_OP, NAME) #ifdef SDB_DEBUGGING_INFO --- 1528,1532 ---- #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) \ ! fprintf (FILE, "\t%s\t \"%s\"\n", FILE_ASM_OP, NAME) #ifdef SDB_DEBUGGING_INFO *************** *** 1542,1546 **** #else #define ASM_OUTPUT_IDENT(FILE, NAME) \ ! fprintf(FILE, "%s\t \"%s\"\n", IDENT_ASM_OP, NAME) #endif --- 1543,1547 ---- #else #define ASM_OUTPUT_IDENT(FILE, NAME) \ ! fprintf (FILE, "\t%s\t \"%s\"\n", IDENT_ASM_OP, NAME) #endif *************** *** 1594,1598 **** if (DECLARE_ASM_NAME) \ { \ ! fprintf (FILE, "%s\t ", TYPE_ASM_OP); \ assemble_name (FILE, NAME); \ putc (',', FILE); \ --- 1595,1599 ---- if (DECLARE_ASM_NAME) \ { \ ! fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ assemble_name (FILE, NAME); \ putc (',', FILE); \ *************** *** 1609,1613 **** if (DECLARE_ASM_NAME) \ { \ ! fprintf (FILE, "%s\t ", TYPE_ASM_OP); \ assemble_name (FILE, NAME); \ putc (',', FILE); \ --- 1610,1614 ---- if (DECLARE_ASM_NAME) \ { \ ! fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ assemble_name (FILE, NAME); \ putc (',', FILE); \ *************** *** 1616,1620 **** if (!flag_inhibit_size_directive) \ { \ ! fprintf (FILE, "%s\t ", SIZE_ASM_OP); \ assemble_name (FILE, NAME); \ fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (decl))); \ --- 1617,1621 ---- if (!flag_inhibit_size_directive) \ { \ ! fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ assemble_name (FILE, NAME); \ fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (decl))); \ *************** *** 1637,1641 **** ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ ! fprintf (FILE, "%s\t ", SIZE_ASM_OP); \ assemble_name (FILE, (FNAME)); \ fprintf (FILE, ",%s-", &label[1]); \ --- 1638,1642 ---- ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ ! fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ assemble_name (FILE, (FNAME)); \ fprintf (FILE, ",%s-", &label[1]); \ *************** *** 1655,1659 **** #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ do { \ ! fprintf (FILE, "%s\t ", GLOBAL_ASM_OP); \ assemble_name (FILE, NAME); \ putc ('\n', FILE); \ --- 1656,1660 ---- #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ do { \ ! fprintf (FILE, "\t%s\t ", GLOBAL_ASM_OP); \ assemble_name (FILE, NAME); \ putc ('\n', FILE); \ *************** *** 1676,1680 **** #ifdef AS_BUG_DOT_LABELS /* The assembler requires a declaration of local. */ #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ ! fprintf (FILE, VERSION_0300_SYNTAX ? ".%s%d:\n%s\t .%s%d\n" : "@%s%d:\n", \ PREFIX, NUM, INTERNAL_ASM_OP, PREFIX, NUM) #else --- 1677,1681 ---- #ifdef AS_BUG_DOT_LABELS /* The assembler requires a declaration of local. */ #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ ! fprintf (FILE, VERSION_0300_SYNTAX ? ".%s%d:\n\t%s\t .%s%d\n" : "@%s%d:\n", \ PREFIX, NUM, INTERNAL_ASM_OP, PREFIX, NUM) #else *************** *** 1735,1739 **** union { REAL_VALUE_TYPE d; long l[2]; } x; \ x.d = (VALUE); \ ! fprintf (FILE, "%s\t 0x%.8x, 0x%.8x\n", INT_ASM_OP, \ x.l[0], x.l[1]); \ } while (0) --- 1736,1740 ---- union { REAL_VALUE_TYPE d; long l[2]; } x; \ x.d = (VALUE); \ ! fprintf (FILE, "\t%s\t 0x%.8x, 0x%.8x\n", INT_ASM_OP, \ x.l[0], x.l[1]); \ } while (0) *************** *** 1744,1748 **** int i; \ FLOAT_TO_INT_INTERNAL (VALUE, i); \ ! fprintf (FILE, "%s\t 0x%.8x\n", INT_ASM_OP, i); \ } while (0) --- 1745,1749 ---- int i; \ FLOAT_TO_INT_INTERNAL (VALUE, i); \ ! fprintf (FILE, "\t%s\t 0x%.8x\n", INT_ASM_OP, i); \ } while (0) *************** *** 1749,1753 **** /* Likewise for `int', `short', and `char' constants. */ #define ASM_OUTPUT_INT(FILE,VALUE) \ ! ( fprintf (FILE, "%s\t ", INT_ASM_OP), \ output_addr_const (FILE, (VALUE)), \ fprintf (FILE, "\n")) --- 1750,1754 ---- /* Likewise for `int', `short', and `char' constants. */ #define ASM_OUTPUT_INT(FILE,VALUE) \ ! ( fprintf (FILE, "\t%s\t ", INT_ASM_OP), \ output_addr_const (FILE, (VALUE)), \ fprintf (FILE, "\n")) *************** *** 1754,1758 **** #define ASM_OUTPUT_SHORT(FILE,VALUE) \ ! ( fprintf (FILE, "%s\t ", SHORT_ASM_OP), \ output_addr_const (FILE, (VALUE)), \ fprintf (FILE, "\n")) --- 1755,1759 ---- #define ASM_OUTPUT_SHORT(FILE,VALUE) \ ! ( fprintf (FILE, "\t%s\t ", SHORT_ASM_OP), \ output_addr_const (FILE, (VALUE)), \ fprintf (FILE, "\n")) *************** *** 1759,1763 **** #define ASM_OUTPUT_CHAR(FILE,VALUE) \ ! ( fprintf (FILE, "%s\t ", CHAR_ASM_OP), \ output_addr_const (FILE, (VALUE)), \ fprintf (FILE, "\n")) --- 1760,1764 ---- #define ASM_OUTPUT_CHAR(FILE,VALUE) \ ! ( fprintf (FILE, "\t%s\t ", CHAR_ASM_OP), \ output_addr_const (FILE, (VALUE)), \ fprintf (FILE, "\n")) *************** *** 1765,1769 **** /* This is how to output an assembler line for a numeric constant byte. */ #define ASM_OUTPUT_BYTE(FILE,VALUE) \ ! fprintf (FILE, "%s\t 0x%x\n", CHAR_ASM_OP, (VALUE)) /* The singl-byte pseudo-op is the default. Override svr[34].h. */ --- 1766,1770 ---- /* This is how to output an assembler line for a numeric constant byte. */ #define ASM_OUTPUT_BYTE(FILE,VALUE) \ ! fprintf (FILE, "\t%s\t 0x%x\n", CHAR_ASM_OP, (VALUE)) /* The singl-byte pseudo-op is the default. Override svr[34].h. */ *************** *** 1805,1809 **** #define ASM_OUTPUT_ALIGN(FILE,LOG) \ if ((LOG) != 0) \ ! fprintf (FILE, "%s\t %d\n", ALIGN_ASM_OP, 1<<(LOG)) /* Align the text address to half a cache boundary when it can only be --- 1806,1810 ---- #define ASM_OUTPUT_ALIGN(FILE,LOG) \ if ((LOG) != 0) \ ! fprintf (FILE, "\t%s\t %d\n", ALIGN_ASM_OP, 1<<(LOG)) /* Align the text address to half a cache boundary when it can only be *************** *** 1815,1819 **** #undef ASM_OUTPUT_SKIP #define ASM_OUTPUT_SKIP(FILE,SIZE) \ ! fprintf (FILE, "%s\t %u\n", SKIP_ASM_OP, (SIZE)) /* Override svr4.h. */ --- 1816,1820 ---- #undef ASM_OUTPUT_SKIP #define ASM_OUTPUT_SKIP(FILE,SIZE) \ ! fprintf (FILE, "\t%s\t %u\n", SKIP_ASM_OP, (SIZE)) /* Override svr4.h. */ *************** *** 1826,1835 **** #undef ASM_OUTPUT_ALIGNED_COMMON #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ ! ( fprintf ((FILE), "%s\t ", \ ! (ROUNDED) <= m88k_gp_threshold ? SCOMM_ASM_OP : COMMON_ASM_OP), \ assemble_name ((FILE), (NAME)), \ fprintf ((FILE), ",%u\n", (SIZE) ? (SIZE) : 1)) ! /* This says how to output an assember line to define a local common symbol. Override svr[34].h. */ #undef ASM_OUTPUT_LOCAL --- 1827,1836 ---- #undef ASM_OUTPUT_ALIGNED_COMMON #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ ! ( fprintf ((FILE), "\t%s\t ", \ ! ((SIZE) ? (SIZE) : 1) <= m88k_gp_threshold ? SCOMM_ASM_OP : COMMON_ASM_OP), \ assemble_name ((FILE), (NAME)), \ fprintf ((FILE), ",%u\n", (SIZE) ? (SIZE) : 1)) ! /* This says how to output an assembler line to define a local common symbol. Override svr[34].h. */ #undef ASM_OUTPUT_LOCAL *************** *** 1836,1841 **** #undef ASM_OUTPUT_ALIGNED_LOCAL #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ ! ( fprintf ((FILE), "%s\t ", \ ! (ROUNDED) <= m88k_gp_threshold ? SBSS_ASM_OP : LOCAL_ASM_OP), \ assemble_name ((FILE), (NAME)), \ fprintf ((FILE), ",%u,%d\n", (SIZE) ? (SIZE) : 1, (SIZE) <= 4 ? 4 : 8)) --- 1837,1842 ---- #undef ASM_OUTPUT_ALIGNED_LOCAL #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ ! ( fprintf ((FILE), "\t%s\t ", \ ! ((SIZE) ? (SIZE) : 1) <= m88k_gp_threshold ? SBSS_ASM_OP : LOCAL_ASM_OP), \ assemble_name ((FILE), (NAME)), \ fprintf ((FILE), ",%u,%d\n", (SIZE) ? (SIZE) : 1, (SIZE) <= 4 ? 4 : 8)) diff -rc2N gcc-2.0/config/m88k.md gcc-2.1/config/m88k.md *** gcc-2.0/config/m88k.md Wed Jan 15 07:08:11 1992 --- gcc-2.1/config/m88k.md Fri Mar 20 15:12:24 1992 *************** *** 29,33 **** [(match_operand:SI 0 "" "")] "" ! "{ static char sccs_id[] = \"@(#)m88k.md 1.96.4.3 1/14/92 09:46:15\"; FAIL; }") --- 29,33 ---- [(match_operand:SI 0 "" "")] "" ! "{ static char sccs_id[] = \"@(#)m88k.md 2.0.3.4 20 Mar 1992 15:09:03\"; FAIL; }") *************** *** 34,37 **** --- 34,41 ---- ;; Attribute specifications + ; Target CPU. + (define_attr "cpu" "m88000,m88100,m88110" + (const (symbol_ref "m88k_cpu"))) + ; Type of each instruction. Default is arithmetic. ; I'd like to write the list as this, but genattrtab won't accept it. *************** *** 164,168 **** ; Describing stores is currently not useful. The suggestion here is that the ; function unit ordering has already been established (writeback is last) and ! ; that store insns use the units in an unusal order. ;(define_function_unit "writeback" 1 1 (eq_attr "type" "store,mstore") 0 1) ;(define_function_unit "memory" 1 3 (eq_attr "type" "store,mstore") 1 2) --- 168,172 ---- ; Describing stores is currently not useful. The suggestion here is that the ; function unit ordering has already been established (writeback is last) and ! ; that store insns use the units in an unusual order. ;(define_function_unit "writeback" 1 1 (eq_attr "type" "store,mstore") 0 1) ;(define_function_unit "memory" 1 3 (eq_attr "type" "store,mstore") 1 2) *************** *** 186,190 **** (match_operand:SI 3 "int5_operand" "")))] "INTVAL (operands [2]) <= INTVAL (operands [3])" ! "ext %0,%1,%w3<(%3-%2)>") (define_insn "" --- 190,199 ---- (match_operand:SI 3 "int5_operand" "")))] "INTVAL (operands [2]) <= INTVAL (operands [3])" ! "* ! { ! operands[4] = gen_rtx (CONST_INT, SImode, ! INTVAL (operands[3]) - INTVAL (operands[2])); ! return \"ext %0,%1,%w3<%4>\"; /* <(%3-%2)> */ ! }") (define_insn "" *************** *** 194,198 **** (match_operand:SI 3 "int5_operand" "")))] "INTVAL (operands [2]) <= INTVAL (operands [3])" ! "extu %0,%1,%w3<(%3-%2)>") ;; Optimize possible cases of the set instruction. --- 203,212 ---- (match_operand:SI 3 "int5_operand" "")))] "INTVAL (operands [2]) <= INTVAL (operands [3])" ! "* ! { ! operands[4] = gen_rtx (CONST_INT, SImode, ! INTVAL (operands[3]) - INTVAL (operands[2])); ! return \"extu %0,%1,%w3<%4>\"; /* <(%3-%2)> */ ! }") ;; Optimize possible cases of the set instruction. *************** *** 643,654 **** (define_insn "" ! [(set (match_operand:CC 0 "register_operand" "=r,r") ! (compare:CC (match_operand:SI 1 "register_operand" "rO,I") ! (match_operand:SI 2 "arith_operand" "rI,r")))] "" ! "@ ! cmp %0,%r1,%2 ! cmp %0,%2,%1\;xor.c %0,%#r0,%0" ! [(set_attr "type" "arith,marith")]) (define_insn "" --- 657,665 ---- (define_insn "" ! [(set (match_operand:CC 0 "register_operand" "=r") ! (compare:CC (match_operand:SI 1 "register_operand" "rO") ! (match_operand:SI 2 "arith_operand" "rI")))] "" ! "cmp %0,%r1,%2") (define_insn "" *************** *** 2653,2657 **** (match_operand:SI 3 "int5_operand" "")))] "" ! "ext %0,%1,%2<(32-%2-%3)>") (define_insn "" --- 2664,2673 ---- (match_operand:SI 3 "int5_operand" "")))] "" ! "* ! { ! operands[4] = gen_rtx (CONST_INT, SImode, ! (32 - INTVAL (operands[2])) - INTVAL (operands[3])); ! return \"ext %0,%1,%2<%4>\"; /* <(32-%2-%3)> */ ! }") (define_insn "" *************** *** 2669,2676 **** (match_operand:SI 3 "int5_operand" "")))] "" ! "extu %0,%1,%2<(32-%2-%3)>") (define_insn "" ! [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "r") (match_operand:SI 1 "int5_operand" "") (match_operand:SI 2 "int5_operand" "")) --- 2685,2697 ---- (match_operand:SI 3 "int5_operand" "")))] "" ! "* ! { ! operands[4] = gen_rtx (CONST_INT, SImode, ! (32 - INTVAL (operands[2])) - INTVAL (operands[3])); ! return \"extu %0,%1,%2<%4>\"; /* <(32-%2-%3)> */ ! }") (define_insn "" ! [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r") (match_operand:SI 1 "int5_operand" "") (match_operand:SI 2 "int5_operand" "")) *************** *** 2677,2684 **** (const_int 0))] "" ! "clr %0,%0,%1<(32-%1-%2)>") (define_insn "" ! [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "r") (match_operand:SI 1 "int5_operand" "") (match_operand:SI 2 "int5_operand" "")) --- 2698,2710 ---- (const_int 0))] "" ! "* ! { ! operands[3] = gen_rtx (CONST_INT, SImode, ! (32 - INTVAL (operands[1])) - INTVAL (operands[2])); ! return \"clr %0,%0,%1<%3>\"; /* <(32-%1-%2)> */ ! }") (define_insn "" ! [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r") (match_operand:SI 1 "int5_operand" "") (match_operand:SI 2 "int5_operand" "")) *************** *** 2685,2692 **** (const_int -1))] "" ! "set %0,%0,%1<(32-%1-%2)>") (define_insn "" ! [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "=r") (match_operand:SI 1 "int5_operand" "") (match_operand:SI 2 "int5_operand" "")) --- 2711,2723 ---- (const_int -1))] "" ! "* ! { ! operands[3] = gen_rtx (CONST_INT, SImode, ! (32 - INTVAL (operands[1])) - INTVAL (operands[2])); ! return \"set %0,%0,%1<%3>\"; /* <(32-%1-%2)> */ ! }") (define_insn "" ! [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r") (match_operand:SI 1 "int5_operand" "") (match_operand:SI 2 "int5_operand" "")) diff -rc2N gcc-2.0/config/m88kdgux.h gcc-2.1/config/m88kdgux.h *** gcc-2.0/config/m88kdgux.h Thu Jan 16 15:24:40 1992 --- gcc-2.1/config/m88kdgux.h Fri Mar 20 07:22:18 1992 *************** *** 79,83 **** %{V} %{v:%{!V:-V}} %{pipe: - %{msvr4:%{mversion-03.00:-KV3}}}\ %{!mlegend:%{mstandard:-Wc,off}}\ ! %{mlegend:-Wc,-fix-bb,-h\"gcc-1.96.5\",-s\"%i\"\ %{traditional:,-lc}%{!traditional:,-lansi-c}\ %{mstandard:,-keep-std}\ --- 79,83 ---- %{V} %{v:%{!V:-V}} %{pipe: - %{msvr4:%{mversion-03.00:-KV3}}}\ %{!mlegend:%{mstandard:-Wc,off}}\ ! %{mlegend:-Wc,-fix-bb,-h\"gcc-2.0.3\",-s\"%i\"\ %{traditional:,-lc}%{!traditional:,-lansi-c}\ %{mstandard:,-keep-std}\ *************** *** 129,133 **** do { \ if (VERSION_0300_SYNTAX) \ ! fprintf (FILE, "%s\t \"03.00\"\n", VERSION_ASM_OP); \ if (write_symbols != NO_DEBUG \ && ! (TARGET_STANDARD && ! TARGET_LEGEND)) \ --- 129,133 ---- do { \ if (VERSION_0300_SYNTAX) \ ! fprintf (FILE, "\t%s\t \"03.00\"\n", VERSION_ASM_OP); \ if (write_symbols != NO_DEBUG \ && ! (TARGET_STANDARD && ! TARGET_LEGEND)) \ *************** *** 151,155 **** #undef WCHAR_TYPE_SIZE ! /* Override svr4.h and m88k.h except when compling crtstuff.c. */ #if !defined (CRT_BEGIN) && !defined (CRT_END) #if 0 /* The SVR4 init method doesn't yet work. */ --- 151,155 ---- #undef WCHAR_TYPE_SIZE ! /* Override svr4.h and m88k.h except when compiling crtstuff.c. */ #if !defined (CRT_BEGIN) && !defined (CRT_END) #if 0 /* The SVR4 init method doesn't yet work. */ *************** *** 156,169 **** #undef INIT_SECTION_ASM_OP #define INIT_SECTION_ASM_OP (VERSION_0300_SYNTAX \ ! ? "\tsection\t .init,\"xa\"\n" \ ! : "\tsection\t .init,\"x\"\n") #endif #undef CTORS_SECTION_ASM_OP #define CTORS_SECTION_ASM_OP (VERSION_0300_SYNTAX \ ! ? "\tsection\t .ctors,\"aw\"\n" \ ! : "\tsection\t .ctors,\"d\"\n") #undef DTORS_SECTION_ASM_OP #define DTORS_SECTION_ASM_OP (VERSION_0300_SYNTAX \ ! ? "\tsection\t .dtors,\"aw\"\n" \ ! : "\tsection\t .dtors,\"d\"\n") #endif /* crtstuff.c */ --- 156,169 ---- #undef INIT_SECTION_ASM_OP #define INIT_SECTION_ASM_OP (VERSION_0300_SYNTAX \ ! ? "section\t .init,\"xa\"" \ ! : "section\t .init,\"x\"") #endif #undef CTORS_SECTION_ASM_OP #define CTORS_SECTION_ASM_OP (VERSION_0300_SYNTAX \ ! ? "section\t .ctors,\"aw\"" \ ! : "section\t .ctors,\"d\"") #undef DTORS_SECTION_ASM_OP #define DTORS_SECTION_ASM_OP (VERSION_0300_SYNTAX \ ! ? "section\t .dtors,\"aw\"" \ ! : "section\t .dtors,\"d\"") #endif /* crtstuff.c */ diff -rc2N gcc-2.0/config/m88kdolph.h gcc-2.1/config/m88kdolph.h *** gcc-2.0/config/m88kdolph.h --- gcc-2.1/config/m88kdolph.h Thu Mar 12 10:54:33 1992 *************** *** 0 **** --- 1,33 ---- + /* Definitions of target machine for GNU compiler. + Motorola m88100 running the Dolphin UNIX System V/88 Release 3.2, + Version 3.5/5.60. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #include "m88kv3.h" + + /* Don't output structure tag names when it causes a forward reference. + Symptom: + Error messages like + as: "/usr/tmp/cca22733.s": cannot reduce symbol table, unused symbols remain + when compiling some programs. + example program (C++): struct bad { bad(); }; bad::bad() {} */ + #undef SDB_ALLOW_FORWARD_REFERENCES + + /* Use T_ARG as T_VOID. T_VOID is not defined in as it should be. */ + #define T_VOID T_ARG diff -rc2N gcc-2.0/config/m88kv3.h gcc-2.1/config/m88kv3.h *** gcc-2.0/config/m88kv3.h Wed Jan 8 07:45:52 1992 --- gcc-2.1/config/m88kv3.h Thu Mar 19 15:40:28 1992 *************** *** 37,41 **** #undef STARTFILE_SPEC #define STARTFILE_SPEC \ ! "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" /* Profiled libraries live in a different directory but keep the same --- 37,41 ---- #undef STARTFILE_SPEC #define STARTFILE_SPEC \ ! "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}} crtbegin.o%s" /* Profiled libraries live in a different directory but keep the same *************** *** 42,46 **** names other than that. arul@sdsu.edu says -lg is always needed. */ #undef LIB_SPEC ! #define LIB_SPEC "%{p:-L/lib/libp}%{pg:%{!p:-L/lib/libp}} -lg -lc" /* Hot version of the profiler that uses r10 to pass the address of --- 42,46 ---- names other than that. arul@sdsu.edu says -lg is always needed. */ #undef LIB_SPEC ! #define LIB_SPEC "%{p:-L/lib/libp}%{pg:%{!p:-L/lib/libp}} -lg -lc crtend.o%s" /* Hot version of the profiler that uses r10 to pass the address of *************** *** 59,60 **** --- 59,140 ---- #undef USE_LIBG #define USE_LIBG + + /* Define a few machine-specific details of the implementation of + constructors. */ + + /* Although the .init section is used, it is not automatically invoked. */ + #define INVOKE__main + + /* State that atexit exists so __do_global_ctors will register + __do_global_dtors. */ + #define HAVE_ATEXIT + + #if (STACK_BOUNDARY / BITS_PER_UNIT) == 16 && REG_PARM_STACK_SPACE (0) == 32 + #define CTOR_LIST_BEGIN \ + asm (INIT_SECTION_ASM_OP); \ + asm ("\tsubu\t r31,r31,16"); \ + asm ("\tst\t r0,r31,32"); + #define CTOR_LIST_END + #endif + + /* ASM_OUTPUT_CONSTRUCTOR outputs code into the .init section to push the + address of the constructor. This becomes the body of __do_global_ctors + in crtstuff.c. r13 is a temporary register. */ + #undef ASM_OUTPUT_CONSTRUCTOR + #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ + do { \ + init_section (); \ + fprintf (FILE, "\tor.u\t r13,r0,hi16("); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, ")\n\tor\t r13,r13,lo16("); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, ")\n\tsubu\t r31,r31,%d\n\tst\t r13,r31,%d\n", \ + STACK_BOUNDARY / BITS_PER_UNIT, REG_PARM_STACK_SPACE (0)); \ + } while (0) + + #undef DO_GLOBAL_CTORS_BODY + #define DO_GLOBAL_CTORS_BODY \ + do { \ + func_ptr *__CTOR_LIST__ = __builtin_alloca (0), *p; \ + for (p = __CTOR_LIST__; *p; p += 4) \ + (*p) (); \ + } while (0) + + #define DTOR_LIST_BEGIN \ + asm (FINI_SECTION_ASM_OP); \ + func_ptr __DTOR_LIST__[4] = { (func_ptr) (-1), (func_ptr) (-1), \ + (func_ptr) (-1), (func_ptr) (-1) } + #define DTOR_LIST_END \ + asm (FINI_SECTION_ASM_OP); \ + func_ptr __DTOR_END__[4] = { (func_ptr) 0, (func_ptr) 0, \ + (func_ptr) 0, (func_ptr) 0 } + + /* A C statement (sans semicolon) to output an element in the table of + global destructors. The table is constructed in the .fini section + so that an explicit linker script is not required. The complication + is that this section is padded with NOP instructions and to either + 8 or 16 byte alignment depending on the specific system. A clever + way to avoid trouble is to output a block of 16 bytes where the + extra words are known values (-1). */ + #undef ASM_OUTPUT_DESTRUCTOR + #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ + do { \ + register int i; \ + fini_section (); \ + fprintf (FILE, "\t%s\t ", ASM_LONG); \ + assemble_name (FILE,NAME); \ + fprintf (FILE, "\n"); \ + for (i = 1; i < 4; i++) \ + fprintf (FILE, "\t%s\t -1\n", ASM_LONG); \ + } while (0) + + /* Walk the list looking for the terminating zero and ignoring all values of + -1. */ + #undef DO_GLOBAL_DTORS_BODY + #define DO_GLOBAL_DTORS_BODY \ + do { \ + int i; \ + for (i = 0; __DTOR_LIST__[i] != 0; i++) \ + if (((int *)__DTOR_LIST__)[i] != -1) \ + __DTOR_LIST__[i] (); \ + } while (0) diff -rc2N gcc-2.0/config/m88kv4.h gcc-2.1/config/m88kv4.h *** gcc-2.0/config/m88kv4.h Tue Feb 11 23:07:49 1992 --- gcc-2.1/config/m88kv4.h Fri Mar 20 07:21:51 1992 *************** *** 58,66 **** /* Override svr4.h and m88k.h. */ #undef INIT_SECTION_ASM_OP ! #define INIT_SECTION_ASM_OP "\tsection\t.init,\"xa\",#progbits\n" #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP "\tsection\t.ctors,\"a\",#progbits\n" #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP "\tsection\t.dtors,\"a\",#progbits\n" ! ! --- 58,64 ---- /* Override svr4.h and m88k.h. */ #undef INIT_SECTION_ASM_OP ! #define INIT_SECTION_ASM_OP "section\t.init,\"xa\",#progbits" #undef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP "section\t.ctors,\"a\",#progbits" #undef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP "section\t.dtors,\"a\",#progbits" diff -rc2N gcc-2.0/config/merlin.h gcc-2.1/config/merlin.h *** gcc-2.0/config/merlin.h Sun Dec 1 00:02:58 1991 --- gcc-2.1/config/merlin.h Sat Mar 14 00:16:07 1992 *************** *** 54,58 **** #undef ASM_OUTPUT_ALIGN_CODE ! /* Assember pseudo-op for shared data segment. */ #define SHARED_SECTION_ASM_OP ".shdata" --- 54,58 ---- #undef ASM_OUTPUT_ALIGN_CODE ! /* Assembler pseudo-op for shared data segment. */ #define SHARED_SECTION_ASM_OP ".shdata" diff -rc2N gcc-2.0/config/mips-bsd.h gcc-2.1/config/mips-bsd.h *** gcc-2.0/config/mips-bsd.h Wed Feb 12 10:42:52 1992 --- gcc-2.1/config/mips-bsd.h Sat Mar 21 11:32:39 1992 *************** *** 20,32 **** #define MIPS_BSD43 ! #define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000" #define CPP_SPEC "\ - %{!ansi: %{!ZSYSV: -DSYSTYPE_BSD43} \ - %{ZSYSV: -DSYSTYPE_SYSV}} \ - %{!ZSYSV: -D__SYSTYPE_BSD43__} \ - %{ZSYSV: -D__SYSTYPE_SYSV__} \ - %{!nostdinc: %{!ZSYSV: -I/bsd43/usr/include} \ - %{ZSYSV: -I/sysv/usr/include}} \ %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ --- 20,28 ---- #define MIPS_BSD43 ! #define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_BSD43" + #define SYSTEM_INCLUDE_DIR "/bsd43/usr/include" + #define CPP_SPEC "\ %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ *************** *** 42,47 **** %{EL: %e-EL not supported} \ %{bestGnum} \ ! %{!ZSYSV: -systype /bsd43/} \ ! %{ZSYSV: -systype /sysv/}}" #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc" --- 38,43 ---- %{EL: %e-EL not supported} \ %{bestGnum} \ ! %{mips1} %{mips2} %{mips3} \ ! -systype /bsd43/ }" #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc" *************** *** 50,53 **** --- 46,52 ---- #define MACHINE_TYPE "RISC-OS BSD Mips" + + /* Generate calls to memcpy, etc., not bcopy, etc. */ + #define TARGET_MEM_FUNCTIONS #include "mips.h" diff -rc2N gcc-2.0/config/mips-gbsd.h gcc-2.1/config/mips-gbsd.h *** gcc-2.0/config/mips-gbsd.h --- gcc-2.1/config/mips-gbsd.h Sat Mar 21 14:30:37 1992 *************** *** 0 **** --- 1,22 ---- + /* Definitions of target machine for GNU compiler. Mips BSD version + using encapsulated stabs. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #include "mips-gbsd.h" diff -rc2N gcc-2.0/config/mips-gdb.h gcc-2.1/config/mips-gdb.h *** gcc-2.0/config/mips-gdb.h --- gcc-2.1/config/mips-gdb.h Sat Mar 21 14:32:07 1992 *************** *** 0 **** --- 1,22 ---- + /* Definitions of target machine for GNU compiler. MIPS default version + using encapsulated stabs. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #include "mips.h" diff -rc2N gcc-2.0/config/mips-gnews.h gcc-2.1/config/mips-gnews.h *** gcc-2.0/config/mips-gnews.h --- gcc-2.1/config/mips-gnews.h Sat Mar 21 14:33:31 1992 *************** *** 0 **** --- 1,22 ---- + /* Definitions of target machine for GNU compiler. Sony RISC NEWS (mips) + using encapsulated stabs. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #include "mips-news.h" diff -rc2N gcc-2.0/config/mips-gnews5.h gcc-2.1/config/mips-gnews5.h *** gcc-2.0/config/mips-gnews5.h --- gcc-2.1/config/mips-gnews5.h Sat Mar 21 14:35:29 1992 *************** *** 0 **** --- 1,22 ---- + /* Definitions of target machine for GNU compiler. Sony RISC NEWS (mips) + System V using encapsulated stabs. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #include "mips-news5.h" diff -rc2N gcc-2.0/config/mips-gsvr4.h gcc-2.1/config/mips-gsvr4.h *** gcc-2.0/config/mips-gsvr4.h --- gcc-2.1/config/mips-gsvr4.h Sat Mar 21 16:51:50 1992 *************** *** 0 **** --- 1,22 ---- + /* Definitions of target machine for GNU compiler. Mips System V.4 version + using encapsulated stabs. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #include "mips-svr4.h" diff -rc2N gcc-2.0/config/mips-gsysv.h gcc-2.1/config/mips-gsysv.h *** gcc-2.0/config/mips-gsysv.h --- gcc-2.1/config/mips-gsysv.h Sat Mar 21 14:29:59 1992 *************** *** 0 **** --- 1,22 ---- + /* Definitions of target machine for GNU compiler. Mips System V version + using encapsulated stabs. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + #include "mips-sysv.h" diff -rc2N gcc-2.0/config/mips-news.h gcc-2.1/config/mips-news.h *** gcc-2.0/config/mips-news.h Wed Feb 12 10:44:06 1992 --- gcc-2.1/config/mips-news.h Sat Mar 21 11:52:51 1992 *************** *** 25,38 **** #define ASM_SPEC "\ %{!mgas: \ ! %{!mrnames: -nocpp} \ %{pipe:%e:-pipe not supported} \ %{EB} %{!EB:-EB} \ %{EL: %e-EL not supported} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ ! %{g} %{g1} %{g2} %{g3} %{g0} %{v} %{K} \ %{G*}" #define CPP_SPEC "\ - %{!nostdinc: -I/usr/include2.0} \ %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ --- 25,40 ---- #define ASM_SPEC "\ %{!mgas: \ ! %{!mrnames: %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}}} \ %{pipe:%e:-pipe not supported} \ %{EB} %{!EB:-EB} \ %{EL: %e-EL not supported} \ + %{mips1} %{mips2} %{mips3} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ ! %{g} %{g1} %{g2} %{g3} %{g0} %{v} %{K}} \ %{G*}" + #define SYSTEM_INCLUDE_DIR "/usr/include2.0" + #define CPP_SPEC "\ %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ *************** *** 47,50 **** --- 49,53 ---- %{EB} %{!EB:-EB} \ %{EL: %e-EL not supported} \ + %{mips1} %{mips2} %{mips3} \ %{bestGnum}}" diff -rc2N gcc-2.0/config/mips-news5.h gcc-2.1/config/mips-news5.h *** gcc-2.0/config/mips-news5.h --- gcc-2.1/config/mips-news5.h Sat Mar 21 11:56:51 1992 *************** *** 0 **** --- 1,54 ---- + /* Definitions of target machine for GNU compiler. Sony RISC NEWS (mips) System V version. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define MIPS_SYSV + + #define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -Dsony -Dsonyrisc -DMIPSEB -DSYSTYPE_SYSV" + + #define MD_STARTFILE_PREFIX "/usr/ccs/lib/" + + #define CPP_SPEC "\ + %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ + %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ + %{.C: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ + %{.m: -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C} \ + %{.S: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ + %{!.S: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}" + + #define LINK_SPEC "\ + %{G*} \ + %{!mgas: %{mips1} %{mips2} %{mips3} \ + %{EB} %{!EB:-EB} %{EL: %e-EL not supported} \ + %{bestGnum}}" + + #define LIB_SPEC "\ + %{ZBSD43: -L/usr/ucblib -lucb -lresolv -lsocket -lnsl} \ + -nocount %{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s values-Xt.o%s" + + #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:-nocount crt1.o%s -count}}" + + #define MACHINE_TYPE "Sony RISC NEWS (SVR4 mips)" + + #define NO_LIB_PROTOTYPE + + #define NO_DOLLAR_IN_LABEL + + #define NM_FLAGS "-Bp" + + #include "mips.h" diff -rc2N gcc-2.0/config/mips-svr4.h gcc-2.1/config/mips-svr4.h *** gcc-2.0/config/mips-svr4.h --- gcc-2.1/config/mips-svr4.h Sat Mar 21 16:50:37 1992 *************** *** 0 **** --- 1,49 ---- + /* Definitions of target machine for GNU compiler. MIPS RISC-OS System V.4 version. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define MIPS_SVR4 + + #define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SVR4" + + #define SYSTEM_INCLUDE_DIR "/svr4/usr/include" + + #define CPP_SPEC "\ + %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ + %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ + %{.C: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ + %{.m: -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C} \ + %{.S: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ + %{!.S: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}" + + #define LINK_SPEC "\ + %{G*} \ + %{!mgas: \ + %{EB} %{!EB:-EB} \ + %{EL: %e-EL not supported} \ + %{bestGnum} \ + %{mips1} %{mips2} %{mips3} \ + -systype /svr4/}" + + #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" + + #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}" + + #define MACHINE_TYPE "RISC-OS System V.4 Mips" + + #include "mips.h" diff -rc2N gcc-2.0/config/mips-sysv.h gcc-2.1/config/mips-sysv.h *** gcc-2.0/config/mips-sysv.h Wed Feb 12 10:45:01 1992 --- gcc-2.1/config/mips-sysv.h Sat Mar 21 11:36:58 1992 *************** *** 20,34 **** #define MIPS_SYSV ! #define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000" ! #define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc" #define CPP_SPEC "\ - %{!ansi: %{!ZBSD43: -DSYSTYPE_SYSV} \ - %{ZBSD43: -DSYSTYPE_BSD43}} \ - %{!ZBSD43: -D__SYSTYPE_SYSV__} \ - %{ZBSD43: -D__SYSTYPE_BSD43__} \ - %{!nostdinc: %{!ZBSD43: -I/sysv/usr/include} \ - %{ZBSD43: -I/bsd43/usr/include}} \ %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ --- 20,28 ---- #define MIPS_SYSV ! #define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_SYSV" ! #define SYSTEM_INCLUDE_DIR "/sysv/usr/include" #define CPP_SPEC "\ %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ *************** *** 44,49 **** %{EL: %e-EL not supported} \ %{bestGnum} \ ! %{!ZBSD43: -systype /sysv/} \ ! %{ZBSD43: -systype /bsd43/}}" #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" --- 38,43 ---- %{EL: %e-EL not supported} \ %{bestGnum} \ ! %{mips1} %{mips2} %{mips3} \ ! -systype /sysv/}" #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s" diff -rc2N gcc-2.0/config/mips.c gcc-2.1/config/mips.c *** gcc-2.0/config/mips.c Fri Feb 21 17:00:37 1992 --- gcc-2.1/config/mips.c Sat Mar 21 18:33:19 1992 *************** *** 146,150 **** int file_in_function_warning = FALSE; ! /* Whether to supress issuing .loc's because the user attempted to change the filename within a function. */ int ignore_line_number = FALSE; --- 146,150 ---- int file_in_function_warning = FALSE; ! /* Whether to suppress issuing .loc's because the user attempted to change the filename within a function. */ int ignore_line_number = FALSE; *************** *** 520,524 **** { rtx addr, plus0, plus1; - int offset = 0; /* Eliminate non-memory operations */ --- 520,523 ---- *************** *** 571,585 **** return FALSE; ! addr = eliminate_constant_term (addr, &offset); ! if (GET_CODE (op) != SYMBOL_REF) ! return FALSE; ! /* fall through */ case SYMBOL_REF: - /* let's be paranoid.... */ - if (offset < 0 || offset > 0xffff) - return FALSE; - return SYMBOL_REF_FLAG (addr); #endif --- 570,586 ---- return FALSE; ! { ! rtx offset = const0_rtx; ! addr = eliminate_constant_term (addr, &offset); ! if (GET_CODE (op) != SYMBOL_REF) ! return FALSE; ! ! /* let's be paranoid.... */ ! if (INTVAL (offset) < 0 || INTVAL (offset) > 0xffff) ! return FALSE; ! } /* fall through */ case SYMBOL_REF: return SYMBOL_REF_FLAG (addr); #endif *************** *** 775,779 **** /* Determine whether a memory reference takes one (based off of the GP pointer), ! two (normal), or three (label + reg) instructins, and bump the appropriate counter for -mstats. */ --- 776,780 ---- /* Determine whether a memory reference takes one (based off of the GP pointer), ! two (normal), or three (label + reg) instructions, and bump the appropriate counter for -mstats. */ *************** *** 1393,1397 **** /* Provide the costs of an addressing mode that contains ADDR. ! If ADDR is not a valid address, its cost is irrelavent. */ int --- 1394,1398 ---- /* Provide the costs of an addressing mode that contains ADDR. ! If ADDR is not a valid address, its cost is irrelevant. */ int *************** *** 1399,1404 **** rtx addr; { - int offset; - switch (GET_CODE (addr)) { --- 1400,1403 ---- *************** *** 1411,1425 **** case CONST: ! offset = 0; ! addr = eliminate_constant_term (addr, &offset); ! if (GET_CODE (addr) == LABEL_REF) ! return 2; ! ! if (GET_CODE (addr) != SYMBOL_REF) ! return 4; ! if (offset < -32768 || offset > 32767) ! return 2; /* fall through */ --- 1410,1425 ---- case CONST: ! { ! rtx offset = const0_rtx; ! addr = eliminate_constant_term (addr, &offset); ! if (GET_CODE (addr) == LABEL_REF) ! return 2; ! if (GET_CODE (addr) != SYMBOL_REF) ! return 4; + if (INTVAL (offset) < -32768 || INTVAL (offset) > 32767) + return 2; + } /* fall through */ *************** *** 1633,1637 **** rtx reg; /* temporary register */ rtx src_addr; /* source address */ ! rtx dest_addr; /* destintation address */ rtx (*load_func)(); /* function to generate load insn */ rtx (*store_func)(); /* function to generate destination insn */ --- 1633,1637 ---- rtx reg; /* temporary register */ rtx src_addr; /* source address */ ! rtx dest_addr; /* destination address */ rtx (*load_func)(); /* function to generate load insn */ rtx (*store_func)(); /* function to generate destination insn */ *************** *** 2418,2422 **** #endif ! /* Set up the classificaiton arrays now. */ mips_rtx_classify[(int)PLUS] = CLASS_ADD_OP; mips_rtx_classify[(int)MINUS] = CLASS_ADD_OP; --- 2418,2422 ---- #endif ! /* Set up the classification arrays now. */ mips_rtx_classify[(int)PLUS] = CLASS_ADD_OP; mips_rtx_classify[(int)MINUS] = CLASS_ADD_OP; *************** *** 2478,2482 **** is a little enthusiastic about storing extra values in FP registers, and this is not good for things like OS kernels. Also, due to the ! manditory delay, it is as fast to load from cached memory as to move from the FP register. */ --- 2478,2482 ---- is a little enthusiastic about storing extra values in FP registers, and this is not good for things like OS kernels. Also, due to the ! mandatory delay, it is as fast to load from cached memory as to move from the FP register. */ *************** *** 2526,2534 **** int offset; { ! int offset2 = 0; rtx reg = eliminate_constant_term (addr, &offset2); if (!offset) ! offset = offset2; if (reg == stack_pointer_rtx) --- 2526,2534 ---- int offset; { ! rtx offset2 = const0_rtx; rtx reg = eliminate_constant_term (addr, &offset2); if (!offset) ! offset = INTVAL (offset2); if (reg == stack_pointer_rtx) *************** *** 2983,2986 **** --- 2983,2988 ---- current_function_file = name; fprintf (stream, "\t.file\t%d \"%s\"\n", num_source_filenames, name); + if (!TARGET_GAS && write_symbols == DBX_DEBUG) + fprintf (stream, "\t#@stabs\n"); } *************** *** 3112,3118 **** { name_tree = get_identifier (p->name); ! if (!TREE_ADDRESSABLE (name_tree)) { ! TREE_ADDRESSABLE (name_tree) = 1; fputs ("\t.extern\t", file); assemble_name (file, p->name); --- 3114,3122 ---- { name_tree = get_identifier (p->name); ! ! /* Positively ensure only one .extern for any given symbol. */ ! if (! TREE_ASM_WRITTEN (name_tree)) { ! TREE_ASM_WRITTEN (name_tree) = 1; fputs ("\t.extern\t", file); assemble_name (file, p->name); *************** *** 3135,3138 **** --- 3139,3166 ---- if (fclose (asm_out_text_file) != 0) pfatal_with_name (temp_filename); + } + } + + + /* Emit either a label, .comm, or .lcomm directive, and mark + that the symbol is used, so that we don't emit an .extern + for it in mips_asm_file_end. */ + + void + mips_declare_object (stream, name, init_string, final_string, size) + FILE *stream; + char *name; + char *init_string; + char *final_string; + int size; + { + fputs (init_string, stream); /* "", "\t.comm\t", or "\t.lcomm\t" */ + assemble_name (stream, name); + fprintf (stream, final_string, size); /* ":\n", ",%u\n", ",%u\n" */ + + if (TARGET_GP_OPT && mips_section_threshold != 0) + { + tree name_tree = get_identifier (name); + TREE_ASM_WRITTEN (name_tree) = 1; } } diff -rc2N gcc-2.0/config/mips.h gcc-2.1/config/mips.h *** gcc-2.0/config/mips.h Fri Feb 21 17:01:10 1992 --- gcc-2.1/config/mips.h Sat Mar 21 18:38:23 1992 *************** *** 125,128 **** --- 125,129 ---- extern void mips_asm_file_end (); extern void mips_asm_file_start (); + extern void mips_declare_object (); extern int mips_const_double_ok (); extern void mips_count_memory_refs (); *************** *** 250,254 **** flag_rerun_cse_after_loop = TRUE; \ flag_schedule_insns = TRUE; \ - flag_caller_saves = TRUE; \ } \ \ --- 251,254 ---- *************** *** 270,273 **** --- 270,274 ---- || defined(MIPS_NEWS) \ || defined(MIPS_SYSV) \ + || defined(MIPS_SVR4) \ || defined(MIPS_BSD43) *************** *** 297,300 **** --- 298,306 ---- #endif + /* Tell collect what flags to pass to nm. */ + #ifndef NM_FLAGS + #define NM_FLAGS "-Bp" + #endif + /* Names to predefine in the preprocessor for this target machine. */ *************** *** 301,305 **** #ifndef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000" #endif --- 307,311 ---- #ifndef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Dmips -Dunix -Dhost_mips -DMIPSEB -DR3000 -DSYSTYPE_BSD43" #endif *************** *** 309,316 **** #define ASM_SPEC "\ %{!mgas: \ ! %{!mrnames: -nocpp} \ %{pipe: %e-pipe is not supported.} \ %{EB} %{!EB:-EB} \ %{EL: %e-EL not supported} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K}} \ --- 315,323 ---- #define ASM_SPEC "\ %{!mgas: \ ! %{!mrnames: %{!.s:-nocpp} %{.s: %{cpp} %{nocpp}}} \ %{pipe: %e-pipe is not supported.} \ %{EB} %{!EB:-EB} \ %{EL: %e-EL not supported} \ + %{mips1} %{mips2} %{mips3} \ %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ %{g} %{g0} %{g1} %{g2} %{g3} %{v} %{K}} \ *************** *** 322,326 **** has run to stuff the mips debug information into the object file. This is needed because the $#!%^ MIPS assembler provides no way ! of specifing such information in the assembly file. */ #ifndef ASM_FINAL_SPEC --- 329,333 ---- has run to stuff the mips debug information into the object file. This is needed because the $#!%^ MIPS assembler provides no way ! of specifying such information in the assembly file. */ #ifndef ASM_FINAL_SPEC *************** *** 351,354 **** --- 358,362 ---- %{EB} %{!EB:-EB} \ %{EL: %e-EL not supported} \ + %{mips1} %{mips2} %{mips3} \ %{bestGnum}}" #endif /* LINK_SPEC defined */ *************** *** 376,380 **** #ifndef CPP_SPEC #define CPP_SPEC "\ - %{!ansi:-DSYSTYPE_BSD} -D__SYSTYPE_BSD__ \ %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ --- 384,387 ---- *************** *** 389,393 **** #ifndef MD_EXEC_PREFIX ! #define MD_EXEC_PREFIX "/usr/lib/cmplrs/cc" #endif --- 396,404 ---- #ifndef MD_EXEC_PREFIX ! #define MD_EXEC_PREFIX "/usr/lib/cmplrs/cc/" ! #endif ! ! #ifndef MD_STARTFILE_PREFIX ! #define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/" #endif *************** *** 395,399 **** /* Print subsidiary information on the compiler version in use. */ ! #define MIPS_VERSION "[AL 1.1, MM 12]" #ifndef MACHINE_TYPE --- 406,410 ---- /* Print subsidiary information on the compiler version in use. */ ! #define MIPS_VERSION "[AL 1.1, MM 14]" #ifndef MACHINE_TYPE *************** *** 416,422 **** #ifndef PREFERRED_DEBUGGING_TYPE /* assume SDB_DEBUGGING_INFO */ ! #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG #endif /* If we are passing smuggling stabs through the MIPS ECOFF object format, put a comment in front of the .stab operation so --- 427,436 ---- #ifndef PREFERRED_DEBUGGING_TYPE /* assume SDB_DEBUGGING_INFO */ ! #define PREFERRED_DEBUGGING_TYPE ((len > 1 && !strncmp (str, "ggdb", len)) ? DBX_DEBUG : SDB_DEBUG) #endif + /* By default, turn on GDB extensions. */ + #define DEFAULT_GDB_EXTENSIONS 1 + /* If we are passing smuggling stabs through the MIPS ECOFF object format, put a comment in front of the .stab operation so *************** *** 616,620 **** #define MASK_WC8 0x00000000 /* wchar's are 8 bits, not 32 */ #define MASK_WC16 0x00000000 /* wchar's are 16 bits, not 32 */ ! #define MASK_WC32 0x00000000 /* dummy for consistancy */ /* Debug switches, not documented */ --- 630,634 ---- #define MASK_WC8 0x00000000 /* wchar's are 8 bits, not 32 */ #define MASK_WC16 0x00000000 /* wchar's are 16 bits, not 32 */ ! #define MASK_WC32 0x00000000 /* dummy for consistency */ /* Debug switches, not documented */ *************** *** 806,810 **** #endif ! /* Number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 820,824 ---- #endif ! /* Number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 886,892 **** #define BIGGEST_FIELD_ALIGNMENT 64 ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT /* Define this if you wish to imitate the way many other C compilers --- 900,906 ---- #define BIGGEST_FIELD_ALIGNMENT 64 ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 1 /* Define this if you wish to imitate the way many other C compilers *************** *** 1325,1330 **** second operand. ! `Q' is for memory refereces using take more than 1 instruction. ! `R' is for memory refereces which take 1 word for the instruction. `S' is for references to extern items which are PIC for OSF/rose. */ --- 1339,1344 ---- second operand. ! `Q' is for memory references which take more than 1 instruction. ! `R' is for memory references which take 1 word for the instruction. `S' is for references to extern items which are PIC for OSF/rose. */ *************** *** 1948,1952 **** assembler can use $r1 to load just the high 16 bits, add \ in the register, and fold the low 16 bits into the memory \ ! reference, wheras the compiler generates a 4 instruction \ sequence. On the other hand, CSE is not as effective. \ It would be a win to generate the lui directly, but the \ --- 1962,1966 ---- assembler can use $r1 to load just the high 16 bits, add \ in the register, and fold the low 16 bits into the memory \ ! reference, whereas the compiler generates a 4 instruction \ sequence. On the other hand, CSE is not as effective. \ It would be a win to generate the lui directly, but the \ *************** *** 2127,2132 **** #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 ! /* By default, allow $ to be part of an identifier. */ #define DOLLARS_IN_IDENTIFIERS 1 /* Specify the machine mode that pointers have. --- 2141,2154 ---- #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 ! /* Define this macro to control use of the character `$' in ! identifier names. The value should be 0, 1, or 2. 0 means `$' ! is not allowed by default; 1 means it is allowed by default if ! `-traditional' is used; 2 means it is allowed by default provided ! `-ansi' is not used. 1 is the default; there is no need to ! define this macro in that case. */ ! ! #ifndef DOLLARS_IN_IDENTIFIERS #define DOLLARS_IN_IDENTIFIERS 1 + #endif /* Specify the machine mode that pointers have. *************** *** 2174,2178 **** { \ extern rtx eliminate_constant_term (); \ ! int offset = 0; \ rtx symref = eliminate_constant_term (X, &offset); \ \ --- 2196,2200 ---- { \ extern rtx eliminate_constant_term (); \ ! rtx offset = const0_rtx; \ rtx symref = eliminate_constant_term (X, &offset); \ \ *************** *** 2184,2188 **** \ /* let's be paranoid.... */ \ ! if (offset < -32768 || offset > 32767) \ return COSTS_N_INSNS (2); \ \ --- 2206,2210 ---- \ /* let's be paranoid.... */ \ ! if (INTVAL (offset) < -32768 || INTVAL (offset) > 32767) \ return COSTS_N_INSNS (2); \ \ *************** *** 2398,2402 **** `MACHINE.c'. This macro is called within an initializer of an array of structures. The first field in the structure is the ! name of a predicate and the second field is an arrary of rtl codes. For each predicate, list all rtl codes that can be in expressions matched by the predicate. The list should have a --- 2420,2424 ---- `MACHINE.c'. This macro is called within an initializer of an array of structures. The first field in the structure is the ! name of a predicate and the second field is an array of rtl codes. For each predicate, list all rtl codes that can be in expressions matched by the predicate. The list should have a *************** *** 2867,2871 **** of getting the decl nodes from the name. */ - #ifndef COLLECT #define ASM_OUTPUT_LABEL(STREAM,NAME) \ do { \ --- 2889,2892 ---- *************** *** 2872,2894 **** assemble_name (STREAM, NAME); \ fputs (":\n", STREAM); \ - \ - if (TARGET_GP_OPT && mips_section_threshold != 0) \ - { \ - tree name_tree = get_identifier (NAME); \ - TREE_ADDRESSABLE (name_tree) = 1; \ - } \ } while (0) ! #else ! #define ASM_OUTPUT_LABEL(STREAM,NAME) \ ! do { \ ! fprintf (STREAM, "%s:\n", NAME); \ ! } while (0) ! #endif /* This is how to output a command to make the user-level label named NAME defined for reference from other files. */ - #ifndef COLLECT #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ do { \ --- 2893,2916 ---- assemble_name (STREAM, NAME); \ fputs (":\n", STREAM); \ } while (0) ! ! /* A C statement (sans semicolon) to output to the stdio stream ! STREAM any text necessary for declaring the name NAME of an ! initialized variable which is being defined. This macro must ! output the label definition (perhaps using `ASM_OUTPUT_LABEL'). ! The argument DECL is the `VAR_DECL' tree node representing the ! variable. ! ! If this macro is not defined, then the variable name is defined ! in the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). */ + #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \ + mips_declare_object (STREAM, NAME, "", ":\n", 0); + + /* This is how to output a command to make the user-level label named NAME defined for reference from other files. */ #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ do { \ *************** *** 2898,2939 **** } while (0) ! #else ! #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ ! do { \ ! fprintf (STREAM, "\t.globl\t%s\n", NAME); \ ! } while (0) ! #endif ! ! /* This says how to output an assembler line ! to define a global common symbol. */ #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \ ! do { \ ! fputs ("\n\t.comm\t", (STREAM)); \ ! assemble_name ((STREAM), (NAME)); \ ! fprintf ((STREAM), ",%u\n", (ROUNDED)); \ ! \ ! if (TARGET_GP_OPT && mips_section_threshold != 0) \ ! { \ ! tree name_tree = get_identifier (NAME); \ ! TREE_ADDRESSABLE (name_tree) = 1; \ ! } \ ! } while (0) ! /* This says how to output an assembler line ! to define a local common symbol. */ #define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \ ! do { \ ! fputs ("\n\t.lcomm\t", (STREAM)); \ ! assemble_name ((STREAM), (NAME)); \ ! fprintf ((STREAM), ",%u\n", (ROUNDED)); \ ! \ ! if (TARGET_GP_OPT && mips_section_threshold != 0) \ ! { \ ! tree name_tree = get_identifier (NAME); \ ! TREE_ADDRESSABLE (name_tree) = 1; \ ! } \ ! } while (0) --- 2920,2933 ---- } while (0) ! /* This says how to define a global common symbol. */ #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \ ! mips_declare_object (STREAM, NAME, "\n\t.comm\t", ",%u\n", (ROUNDED)) ! /* This says how to define a local common symbol (ie, not visable to ! linker). */ #define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \ ! mips_declare_object (STREAM, NAME, "\n\t.lcomm\t", ",%u\n", (ROUNDED)) *************** *** 3006,3010 **** /* This is how to output an assembler line defining an `int' constant. */ - #ifndef COLLECT #define ASM_OUTPUT_INT(STREAM,VALUE) \ do { \ --- 3000,3003 ---- *************** *** 3014,3022 **** } while (0) - #else - #define ASM_OUTPUT_INT(STREAM,VALUE) \ - fprintf (STREAM, "\t.word\t%d\n", VALUE) - #endif - /* Likewise for `char' and `short' constants. */ --- 3007,3010 ---- *************** *** 3035,3061 **** } - /* This is how to output an assembler line defining an `int' constant, - which is not in tree format (for collect.c). */ - - #define ASM_OUTPUT_INT_CONST(STREAM,VALUE) \ - fprintf(STREAM, "\t.word\t%d\n", VALUE) - - /* This is how to output an assembler line defining an external/static - address which is not in tree format (for collect.c). */ - - #define ASM_OUTPUT_PTR_INT_SUM(STREAM, NAME, VALUE) \ - do { \ - fprintf (STREAM, "\t.word\t"); \ - ASM_OUTPUT_LABELREF (STREAM, NAME); \ - fprintf (STREAM, "+%d\n", VALUE); \ - } while (0) - - #define ASM_OUTPUT_LABELREF_AS_INT(STREAM, NAME) \ - do { \ - fprintf (STREAM, "\t.word\t"); \ - ASM_OUTPUT_LABELREF (STREAM, NAME); \ - fprintf (STREAM, "\n"); \ - } while (0) - /* This is how to output an assembler line for a numeric constant byte. */ --- 3023,3026 ---- *************** *** 3190,3206 **** /* Output before read-only data. */ ! #define TEXT_SECTION_ASM_OP "\t.text" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP "\t.data" /* Output before writable short data. */ ! #define SDATA_SECTION_ASM_OP "\t.sdata" /* Output before read-only data. */ ! #define RDATA_SECTION_ASM_OP "\t.rdata" #define READONLY_DATA_SECTION rdata_section --- 3155,3171 ---- /* Output before read-only data. */ ! #define TEXT_SECTION_ASM_OP ".text" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP ".data" /* Output before writable short data. */ ! #define SDATA_SECTION_ASM_OP ".sdata" /* Output before read-only data. */ ! #define RDATA_SECTION_ASM_OP ".rdata" #define READONLY_DATA_SECTION rdata_section diff -rc2N gcc-2.0/config/mips.md gcc-2.1/config/mips.md *** gcc-2.0/config/mips.md Mon Feb 10 22:23:30 1992 --- gcc-2.1/config/mips.md Sun Mar 22 08:04:34 1992 *************** *** 64,68 **** (define_attr "length" "" (const_int 1)) ! ;; whether or not an instruction has a mandiatory delay slot (define_attr "dslot" "no,yes" (if_then_else (eq_attr "type" "branch,jump,call,load,xfer,hilo,fcmp") --- 64,68 ---- (define_attr "length" "" (const_int 1)) ! ;; whether or not an instruction has a mandatory delay slot (define_attr "dslot" "no,yes" (if_then_else (eq_attr "type" "branch,jump,call,load,xfer,hilo,fcmp") *************** *** 72,76 **** ;; Attribute describing the processor (define_attr "cpu" "default,r3000,r4000,r6000" ! ; (const (cond [(eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_DEFAULT")) (const_string "default") (eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_R3000")) (const_string "r3000") --- 72,76 ---- ;; Attribute describing the processor (define_attr "cpu" "default,r3000,r4000,r6000" ! (const (cond [(eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_DEFAULT")) (const_string "default") (eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_R3000")) (const_string "r3000") *************** *** 77,81 **** (eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_R4000")) (const_string "r4000") (eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_R6000")) (const_string "r6000")] ! (const_string "default"))) ;; Attribute defining whether or not we can use the branch-likely instructions --- 77,81 ---- (eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_R4000")) (const_string "r4000") (eq (symbol_ref "mips_cpu") (symbol_ref "PROCESSOR_R6000")) (const_string "r6000")] ! (const_string "default")))) ;; Attribute defining whether or not we can use the branch-likely instructions *************** *** 83,90 **** (define_attr "branch_likely" "no,yes" ! ; (const (if_then_else (ge (symbol_ref "mips_isa") (const_int 2)) (const_string "yes") ! (const_string "no"))) --- 83,90 ---- (define_attr "branch_likely" "no,yes" ! (const (if_then_else (ge (symbol_ref "mips_isa") (const_int 2)) (const_string "yes") ! (const_string "no")))) *************** *** 123,260 **** ;; Make the default case (PROCESSOR_DEFAULT) handle the worst case - ;; At present, the functional units with cpu attributes fully - ;; specified cause genattrtab to use more than 32 megabytes of - ;; data, which is too much for some systems, so simplify things - ;; to use only the default case. - - (define_function_unit "memory" 1 0 (eq_attr "type" "load,pic") 3 0) - (define_function_unit "memory" 1 0 (eq_attr "type" "store") 1 0) - - (define_function_unit "transfer" 1 0 (eq_attr "type" "xfer") 2 0) - (define_function_unit "transfer" 1 0 (eq_attr "type" "hilo") 3 0) - - (define_function_unit "imuldiv" 1 1 (eq_attr "type" "imul") 17 34) - (define_function_unit "imuldiv" 1 1 (eq_attr "type" "idiv") 38 76) - - (define_function_unit "adder" 1 1 (eq_attr "type" "fadd") 4 8) - (define_function_unit "fast" 1 1 (eq_attr "type" "fabs,fneg") 2 4) - - (define_function_unit "mult" 1 1 (and (eq_attr "type" "fmul") (eq_attr "mode" "SF")) 7 14) - (define_function_unit "mult" 1 1 (and (eq_attr "type" "fmul") (eq_attr "mode" "DF")) 8 16) - - (define_function_unit "divide" 1 1 (and (eq_attr "type" "fdiv") (eq_attr "mode" "SF")) 23 46) - (define_function_unit "divide" 1 1 (and (eq_attr "type" "fdiv") (eq_attr "mode" "DF")) 36 72) - - (define_function_unit "sqrt" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "SF")) 54 108) - (define_function_unit "sqrt" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "DF")) 112 224) - - ;; (define_function_unit "memory" 1 0 - ;; (and (eq_attr "type" "load,pic") (eq_attr "cpu" "!r3000")) - ;; 3 0) - ;; - ;; (define_function_unit "memory" 1 0 - ;; (and (eq_attr "type" "load,pic") (eq_attr "cpu" "r3000")) - ;; 2 0) - ;; - ;; (define_function_unit "memory" 1 0 (eq_attr "type" "store") 1 0) - ;; - ;; (define_function_unit "transfer" 1 0 (eq_attr "type" "xfer") 2 0) - ;; (define_function_unit "transfer" 1 0 (eq_attr "type" "hilo") 3 0) - ;; - ;; (define_function_unit "imuldiv" 1 1 - ;; (and (eq_attr "type" "imul") (eq_attr "cpu" "!r3000,r4000")) - ;; 17 34) - ;; - ;; (define_function_unit "imuldiv" 1 1 - ;; (and (eq_attr "type" "imul") (eq_attr "cpu" "r3000")) - ;; 12 24) - ;; - ;; (define_function_unit "imuldiv" 1 1 - ;; (and (eq_attr "type" "imul") (eq_attr "cpu" "r4000")) - ;; 10 20) - ;; - ;; (define_function_unit "imuldiv" 1 1 - ;; (and (eq_attr "type" "idiv") (eq_attr "cpu" "!r3000,r4000")) - ;; 38 76) - ;; - ;; (define_function_unit "imuldiv" 1 1 - ;; (and (eq_attr "type" "idiv") (eq_attr "cpu" "r3000")) - ;; 35 70) - ;; - ;; (define_function_unit "imuldiv" 1 1 - ;; (and (eq_attr "type" "idiv") (eq_attr "cpu" "r4000")) - ;; 69 138) - ;; - ;; (define_function_unit "adder" 1 1 - ;; (and (eq_attr "type" "fadd") (eq_attr "cpu" "!r3000,r6000")) - ;; 4 8) - ;; - ;; (define_function_unit "adder" 1 1 - ;; (and (eq_attr "type" "fadd") (eq_attr "cpu" "r3000")) - ;; 2 4) - ;; - ;; (define_function_unit "adder" 1 1 - ;; (and (eq_attr "type" "fadd") (eq_attr "cpu" "r6000")) - ;; 3 6) - ;; - ;; (define_function_unit "fast" 1 1 - ;; (and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "!r3000")) - ;; 2 4) - ;; - ;; (define_function_unit "fast" 1 1 - ;; (and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "r3000")) - ;; 1 2) - ;; - ;; (define_function_unit "mult" 1 1 - ;; (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r3000,r6000"))) - ;; 7 14) - ;; - ;; (define_function_unit "mult" 1 1 - ;; (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r3000"))) - ;; 4 8) - ;; - ;; (define_function_unit "mult" 1 1 - ;; (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r6000"))) - ;; 5 10) - ;; - ;; (define_function_unit "mult" 1 1 - ;; (and (eq_attr "type" "fmul") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r3000,r6000"))) - ;; 8 16) - ;; - ;; (define_function_unit "mult" 1 1 - ;; (and (eq_attr "type" "fmul") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r3000"))) - ;; 5 10) - ;; - ;; (define_function_unit "mult" 1 1 - ;; (and (eq_attr "type" "fmul") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r6000"))) - ;; 6 12) - ;; - ;; (define_function_unit "divide" 1 1 - ;; (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r3000,r6000"))) - ;; 23 46) - ;; - ;; (define_function_unit "divide" 1 1 - ;; (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r3000"))) - ;; 12 24) - ;; - ;; (define_function_unit "divide" 1 1 - ;; (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r6000"))) - ;; 15 30) - ;; - ;; (define_function_unit "divide" 1 1 - ;; (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r3000,r6000"))) - ;; 36 72) - ;; - ;; (define_function_unit "divide" 1 1 - ;; (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r3000"))) - ;; 19 34) - ;; - ;; (define_function_unit "divide" 1 1 - ;; (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r6000"))) - ;; 16 32) - ;; - ;; (define_function_unit "sqrt" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "SF")) 54 108) - ;; (define_function_unit "sqrt" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "DF")) 112 224) ;; --- 123,235 ---- ;; Make the default case (PROCESSOR_DEFAULT) handle the worst case + (define_function_unit "memory" 1 0 + (and (eq_attr "type" "load,pic") (eq_attr "cpu" "!r3000")) + 3 0) + + (define_function_unit "memory" 1 0 + (and (eq_attr "type" "load,pic") (eq_attr "cpu" "r3000")) + 2 0) + + (define_function_unit "memory" 1 0 (eq_attr "type" "store") 1 0) + + (define_function_unit "transfer" 1 0 (eq_attr "type" "xfer") 2 0) + (define_function_unit "transfer" 1 0 (eq_attr "type" "hilo") 3 0) + + (define_function_unit "imuldiv" 1 1 + (and (eq_attr "type" "imul") (eq_attr "cpu" "!r3000,r4000")) + 17 34) + + (define_function_unit "imuldiv" 1 1 + (and (eq_attr "type" "imul") (eq_attr "cpu" "r3000")) + 12 24) + + (define_function_unit "imuldiv" 1 1 + (and (eq_attr "type" "imul") (eq_attr "cpu" "r4000")) + 10 20) + + (define_function_unit "imuldiv" 1 1 + (and (eq_attr "type" "idiv") (eq_attr "cpu" "!r3000,r4000")) + 38 76) + + (define_function_unit "imuldiv" 1 1 + (and (eq_attr "type" "idiv") (eq_attr "cpu" "r3000")) + 35 70) + + (define_function_unit "imuldiv" 1 1 + (and (eq_attr "type" "idiv") (eq_attr "cpu" "r4000")) + 69 138) + + (define_function_unit "adder" 1 1 + (and (eq_attr "type" "fadd") (eq_attr "cpu" "!r3000,r6000")) + 4 8) + + (define_function_unit "adder" 1 1 + (and (eq_attr "type" "fadd") (eq_attr "cpu" "r3000")) + 2 4) + + (define_function_unit "adder" 1 1 + (and (eq_attr "type" "fadd") (eq_attr "cpu" "r6000")) + 3 6) + + (define_function_unit "fast" 1 1 + (and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "!r3000")) + 2 4) + + (define_function_unit "fast" 1 1 + (and (eq_attr "type" "fabs,fneg") (eq_attr "cpu" "r3000")) + 1 2) + + (define_function_unit "mult" 1 1 + (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r3000,r6000"))) + 7 14) + + (define_function_unit "mult" 1 1 + (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r3000"))) + 4 8) + + (define_function_unit "mult" 1 1 + (and (eq_attr "type" "fmul") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r6000"))) + 5 10) + + (define_function_unit "mult" 1 1 + (and (eq_attr "type" "fmul") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r3000,r6000"))) + 8 16) + + (define_function_unit "mult" 1 1 + (and (eq_attr "type" "fmul") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r3000"))) + 5 10) + + (define_function_unit "mult" 1 1 + (and (eq_attr "type" "fmul") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r6000"))) + 6 12) + + (define_function_unit "divide" 1 1 + (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "!r3000,r6000"))) + 23 46) + + (define_function_unit "divide" 1 1 + (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r3000"))) + 12 24) + + (define_function_unit "divide" 1 1 + (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "SF") (eq_attr "cpu" "r6000"))) + 15 30) + + (define_function_unit "divide" 1 1 + (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "!r3000,r6000"))) + 36 72) + + (define_function_unit "divide" 1 1 + (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r3000"))) + 19 34) + + (define_function_unit "divide" 1 1 + (and (eq_attr "type" "fdiv") (and (eq_attr "mode" "DF") (eq_attr "cpu" "r6000"))) + 16 32) + + (define_function_unit "sqrt" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "SF")) 54 108) + (define_function_unit "sqrt" 1 1 (and (eq_attr "type" "fsqrt") (eq_attr "mode" "DF")) 112 224) + ;; *************** *** 517,522 **** [(set (match_dup 3) ! (lt:CC (subreg:SI (match_dup 1) 0) ! (subreg:SI (match_dup 2) 0))) (set (subreg:SI (match_dup 0) 0) --- 492,497 ---- [(set (match_dup 3) ! (ltu:CC (subreg:SI (match_dup 1) 0) ! (subreg:SI (match_dup 2) 0))) (set (subreg:SI (match_dup 0) 0) *************** *** 544,549 **** [(set (match_dup 3) ! (lt:CC (subreg:SI (match_dup 1) 1) ! (subreg:SI (match_dup 2) 1))) (set (subreg:SI (match_dup 0) 1) --- 519,524 ---- [(set (match_dup 3) ! (ltu:CC (subreg:SI (match_dup 1) 1) ! (subreg:SI (match_dup 2) 1))) (set (subreg:SI (match_dup 0) 1) *************** *** 1643,1654 **** ;; unaligned word moves generated by the block moves. - ;; We use (use (reg:SI 0)) to select this pattern rather than the - ;; normal movsi. Make these before the normal move patterns so they - ;; match first. (define_expand "movsi_unaligned" ! [(parallel [(set (match_operand:SI 0 "general_operand" "") ! (match_operand:SI 1 "general_operand" "")) ! (use (reg:SI 0))])] "" " --- 1618,1625 ---- ;; unaligned word moves generated by the block moves. (define_expand "movsi_unaligned" ! [(set (match_operand:SI 0 "general_operand" "") ! (unspec [(match_operand:SI 1 "general_operand" "")] 0))] "" " *************** *** 1679,1684 **** (define_insn "movsi_ulw" [(set (match_operand:SI 0 "register_operand" "=&d,&d,d,d") ! (match_operand:SI 1 "general_operand" "R,o,dIKL,M")) ! (use (reg:SI 0))] "" "* --- 1650,1654 ---- (define_insn "movsi_ulw" [(set (match_operand:SI 0 "register_operand" "=&d,&d,d,d") ! (unspec [(match_operand:SI 1 "general_operand" "R,o,dIKL,M")] 0))] "" "* *************** *** 1687,1691 **** enum rtx_code code; char *ret; ! int offset; rtx addr; rtx mem_addr; --- 1657,1661 ---- enum rtx_code code; char *ret; ! rtx offset; rtx addr; rtx mem_addr; *************** *** 1700,1708 **** to the faster lw if we are referencing an aligned stack location. */ ! offset = 0; addr = XEXP (operands[1], 0); mem_addr = eliminate_constant_term (addr, &offset); ! if ((offset & (UNITS_PER_WORD-1)) == 0 && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx)) ret = \"lw\\t%0,%1\"; --- 1670,1678 ---- to the faster lw if we are referencing an aligned stack location. */ ! offset = const0_rtx; addr = XEXP (operands[1], 0); mem_addr = eliminate_constant_term (addr, &offset); ! if ((INTVAL (offset) & (UNITS_PER_WORD-1)) == 0 && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx)) ret = \"lw\\t%0,%1\"; *************** *** 1731,1736 **** (define_insn "movsi_usw" [(set (match_operand:SI 0 "memory_operand" "=R,o") ! (match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")) ! (use (reg:SI 0))] "" "* --- 1701,1705 ---- (define_insn "movsi_usw" [(set (match_operand:SI 0 "memory_operand" "=R,o") ! (unspec [(match_operand:SI 1 "reg_or_0_operand" "dJ,dJ")] 0))] "" "* *************** *** 1737,1741 **** { extern rtx eliminate_constant_term (); ! int offset = 0; rtx addr = XEXP (operands[0], 0); rtx mem_addr = eliminate_constant_term (addr, &offset); --- 1706,1710 ---- { extern rtx eliminate_constant_term (); ! rtx offset = const0_rtx; rtx addr = XEXP (operands[0], 0); rtx mem_addr = eliminate_constant_term (addr, &offset); *************** *** 1747,1751 **** to the faster sw if we are referencing an aligned stack location. */ ! if ((offset & (UNITS_PER_WORD-1)) == 0 && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx)) return \"sw\\t%1,%0\"; --- 1716,1720 ---- to the faster sw if we are referencing an aligned stack location. */ ! if ((INTVAL (offset) & (UNITS_PER_WORD-1)) == 0 && (mem_addr == stack_pointer_rtx || mem_addr == frame_pointer_rtx)) return \"sw\\t%1,%0\"; *************** *** 1776,1786 **** (define_insn "movdi" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,R,o,*d,*f,*f,*f,*f,*R,*o,*d,*x") ! (match_operand:DI 1 "general_operand" "d,iF,R,o,d,d,*f,*d,*f,*R,*o,*f,*f,*x,*d"))] "" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,arith,load,load,store,store,xfer,xfer,move,load,load,store,store,hilo,hilo") ! (set_attr "mode" "DI,DI,DI,DI,DI,DI,DI,DI,DI,DI,DI,DI,DI,DI,DI") ! (set_attr "length" "2,4,2,4,2,4,2,2,1,2,4,2,4,2,2")]) (define_split --- 1745,1755 ---- (define_insn "movdi" ! [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,R,o,*d,*x") ! (match_operand:DI 1 "general_operand" "d,iF,R,o,d,d,*x,*d"))] "" "* return mips_move_2words (operands, insn); " ! [(set_attr "type" "move,arith,load,load,store,store,hilo,hilo") ! (set_attr "mode" "DI,DI,DI,DI,DI,DI,DI,DI") ! (set_attr "length" "2,4,2,4,2,4,2,2")]) (define_split *************** *** 2844,2847 **** --- 2813,2818 ---- case GTU: return \"%*bne%?\\t%z2,%.,%1\"; case LEU: return \"%*beq%?\\t%z2,%.,%1\"; + case GEU: return \"%*j\\t%1\"; + case LTU: return \"#%*bltuz\\t%z2,%1\"; } *************** *** 2868,2871 **** --- 2839,2844 ---- case GTU: return \"%*beq%?\\t%z2,%.,%1\"; case LEU: return \"%*bne\\t%z2,%.,%1\"; + case GEU: return \"#%*bgeuz\\t%z2,%1\"; + case LTU: return \"%*j\\t%1\"; } diff -rc2N gcc-2.0/config/mot3300.h gcc-2.1/config/mot3300.h *** gcc-2.0/config/mot3300.h Sat Feb 15 00:02:26 1992 --- gcc-2.1/config/mot3300.h Fri Mar 20 14:11:23 1992 *************** *** 62,65 **** --- 62,69 ---- #define TARGET_MEM_FUNCTIONS + / * size_t is unsigned int. */ + + #define SIZE_TYPE "unsigned int" + /* Every structure or union's size must be a multiple of 2 bytes. */ *************** *** 189,200 **** #define ASM_APP_OFF "" - /* We like aligned sources, and maybe our as will like them. */ - #undef TEXT_SECTION_ASM_OP ! #define TEXT_SECTION_ASM_OP "\ttext" #undef DATA_SECTION_ASM_OP ! #define DATA_SECTION_ASM_OP "\tdata" #undef ASCII_DATA_ASM_OP ! #define ASCII_DATA_ASM_OP "\tbyte" /* The file command should always begin the output. */ --- 193,202 ---- #define ASM_APP_OFF "" #undef TEXT_SECTION_ASM_OP ! #define TEXT_SECTION_ASM_OP "text" #undef DATA_SECTION_ASM_OP ! #define DATA_SECTION_ASM_OP "data" #undef ASCII_DATA_ASM_OP ! #define ASCII_DATA_ASM_OP "byte" /* The file command should always begin the output. */ *************** *** 388,392 **** { if (lp > 60) \ { lp = 0; \ ! fprintf ((FILE), "\n%s ", ASCII_DATA_ASM_OP); } \ else \ putc (',', (FILE)); \ --- 390,394 ---- { if (lp > 60) \ { lp = 0; \ ! fprintf ((FILE), "\n\t%s ", ASCII_DATA_ASM_OP); } \ else \ putc (',', (FILE)); \ *************** *** 408,412 **** '#' for an immediate operand prefix (# in MIT and Motorola syntax but & in SGS syntax). ! '!' for the cc register (used in an `and to cc' insn). '$' for the letter `s' in an op code, but only on the 68040. '&' for the letter `d' in an op code, but only on the 68040. --- 410,414 ---- '#' for an immediate operand prefix (# in MIT and Motorola syntax but & in SGS syntax). ! '!' for the fpcr register (used in some float-to-fixed conversions). '$' for the letter `s' in an op code, but only on the 68040. '&' for the letter `d' in an op code, but only on the 68040. *************** *** 430,434 **** else if (CODE == '+') fprintf (FILE, "(%%sp)+"); \ else if (CODE == '@') fprintf (FILE, "(%%sp)"); \ ! else if (CODE == '!') fprintf (FILE, "%%cc"); \ else if (CODE == '$') { if (TARGET_68040_ONLY) fprintf (FILE, "s"); } \ else if (CODE == '&') { if (TARGET_68040_ONLY) fprintf (FILE, "d"); } \ --- 432,436 ---- else if (CODE == '+') fprintf (FILE, "(%%sp)+"); \ else if (CODE == '@') fprintf (FILE, "(%%sp)"); \ ! else if (CODE == '!') fprintf (FILE, "%%fpcr"); \ else if (CODE == '$') { if (TARGET_68040_ONLY) fprintf (FILE, "s"); } \ else if (CODE == '&') { if (TARGET_68040_ONLY) fprintf (FILE, "d"); } \ *************** *** 644,647 **** --- 646,654 ---- { putc (*(PTR), (FILE)); ++(PTR); } \ fprintf ((FILE), ".w"); } \ + else if ((PTR)[0] == 's') \ + { \ + if (!strncmp ((PTR), "swap", 4)) \ + { fprintf ((FILE), "swap.w"); (PTR) += 4; } \ + } \ else if ((PTR)[0] == 'f') \ { \ *************** *** 669,674 **** && (PTR)[2] == 'v' && (PTR)[3] == 'e') \ { fprintf ((FILE), "mov"); (PTR) += 4; \ ! if ((PTR)[0] == 'q' || (PTR)[0] == 'a' || \ ! (PTR)[0] == 'c') (PTR)++; } \ /* SUB, SUBQ, SUBA, SUBI ==> SUB */ \ else if ((PTR)[0] == 's' && (PTR)[1] == 'u' \ --- 676,681 ---- && (PTR)[2] == 'v' && (PTR)[3] == 'e') \ { fprintf ((FILE), "mov"); (PTR) += 4; \ ! if ((PTR)[0] == 'q' || (PTR)[0] == 'a' \ ! || (PTR)[0] == 'c') (PTR)++; } \ /* SUB, SUBQ, SUBA, SUBI ==> SUB */ \ else if ((PTR)[0] == 's' && (PTR)[1] == 'u' \ *************** *** 675,680 **** && (PTR)[2] == 'b') \ { fprintf ((FILE), "sub"); (PTR) += 3; \ ! if ((PTR)[0] == 'q' || (PTR)[0] == 'i' || \ ! (PTR)[0] == 'a') (PTR)++; } \ /* CMP, CMPA, CMPI, CMPM ==> CMP */ \ else if ((PTR)[0] == 'c' && (PTR)[1] == 'm' \ --- 682,687 ---- && (PTR)[2] == 'b') \ { fprintf ((FILE), "sub"); (PTR) += 3; \ ! if ((PTR)[0] == 'q' || (PTR)[0] == 'i' \ ! || (PTR)[0] == 'a') (PTR)++; } \ /* CMP, CMPA, CMPI, CMPM ==> CMP */ \ else if ((PTR)[0] == 'c' && (PTR)[1] == 'm' \ *************** *** 681,686 **** && (PTR)[2] == 'p') \ { fprintf ((FILE), "cmp"); (PTR) += 3; \ ! if ((PTR)[0] == 'a' || (PTR)[0] == 'i' || \ ! (PTR)[0] == 'm') (PTR)++; } \ /* JMP to switch label */ \ else if (!strncmp((PTR), (SWITCH_JUMP_MATCH), sizeof(SWITCH_JUMP_MATCH) - 1)) \ --- 688,693 ---- && (PTR)[2] == 'p') \ { fprintf ((FILE), "cmp"); (PTR) += 3; \ ! if ((PTR)[0] == 'a' || (PTR)[0] == 'i' \ ! || (PTR)[0] == 'm') (PTR)++; } \ /* JMP to switch label */ \ else if (!strncmp((PTR), (SWITCH_JUMP_MATCH), sizeof(SWITCH_JUMP_MATCH) - 1)) \ diff -rc2N gcc-2.0/config/news.h gcc-2.1/config/news.h *** gcc-2.0/config/news.h Sun Feb 16 18:02:35 1992 --- gcc-2.1/config/news.h Fri Mar 20 14:12:11 1992 *************** *** 261,265 **** else if (CODE == '+') fprintf (FILE, "(sp)+"); \ else if (CODE == '@') fprintf (FILE, "(sp)"); \ ! else if (CODE == '!') fprintf (FILE, "ccr"); \ else if (CODE == '$') {if (TARGET_68040_ONLY) fprintf (FILE, "s");} \ else if (CODE == '&') {if (TARGET_68040_ONLY) fprintf (FILE, "d");} \ --- 261,265 ---- else if (CODE == '+') fprintf (FILE, "(sp)+"); \ else if (CODE == '@') fprintf (FILE, "(sp)"); \ ! else if (CODE == '!') fprintf (FILE, "fpcr"); \ else if (CODE == '$') {if (TARGET_68040_ONLY) fprintf (FILE, "s");} \ else if (CODE == '&') {if (TARGET_68040_ONLY) fprintf (FILE, "d");} \ diff -rc2N gcc-2.0/config/next.h gcc-2.1/config/next.h *** gcc-2.0/config/next.h Sun Feb 16 22:12:21 1992 --- gcc-2.1/config/next.h Sat Mar 21 17:46:57 1992 *************** *** 60,64 **** /* Wrap new method names in quotes so the assembler doesn't gag. ! Make Objective-C internal symbols local. */ #undef ASM_OUTPUT_LABELREF --- 60,64 ---- /* Wrap new method names in quotes so the assembler doesn't gag. ! Make Objective-C internal symbols local. */ #undef ASM_OUTPUT_LABELREF *************** *** 66,69 **** --- 66,71 ---- do { if (NAME[0] == '+' || NAME[0] == '-') fprintf (FILE, "\"%s\"", NAME); \ else if (!strncmp (NAME, "_OBJC_", 6)) fprintf (FILE, "L%s", NAME); \ + else if (!strncmp (NAME, ".objc_class_name_", 17)) \ + fprintf (FILE, "%s", NAME); \ else fprintf (FILE, "_%s", NAME); } while (0) *************** *** 88,91 **** --- 90,94 ---- !strcmp (STR, "segcreate") ? 3 : \ !strcmp (STR, "sectorder") ? 3 : \ + !strcmp (STR, "aux-info") ? 1 : \ 0) *************** *** 185,188 **** --- 188,192 ---- : fprintf (FILE, "#0r%.20g", (VALUE))) + #if 0 /* This is for system verson 3.0, which isn't out yet. */ #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ do { constructor_section (); \ *************** *** 198,201 **** --- 202,206 ---- assemble_name (FILE, NAME); \ fprintf (FILE, "\n"); } while (0) + #endif /* How to parse #pragma's */ *************** *** 413,417 **** /* Don't treat addresses involving labels differently from symbol names. ! Previsouly, references to labels generated pc-relative addressing modes while references to symbol names generated absolute addressing modes. */ --- 418,422 ---- /* Don't treat addresses involving labels differently from symbol names. ! Previously, references to labels generated pc-relative addressing modes while references to symbol names generated absolute addressing modes. */ *************** *** 420,424 **** { if (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) goto ADDR; } ! #define ALIGN_ASM_OP "\t.align" #undef ASM_OUTPUT_ALIGN --- 425,429 ---- { if (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) goto ADDR; } ! #define ALIGN_ASM_OP ".align" #undef ASM_OUTPUT_ALIGN *************** *** 425,429 **** #define ASM_OUTPUT_ALIGN(FILE,LOG) \ if ((LOG) != 0) \ ! fprintf (FILE, "%s %d\n", ALIGN_ASM_OP, (LOG)) /* The maximum alignment which the object file format can support. --- 430,434 ---- #define ASM_OUTPUT_ALIGN(FILE,LOG) \ if ((LOG) != 0) \ ! fprintf (FILE, "\t%s %d\n", ALIGN_ASM_OP, (LOG)) /* The maximum alignment which the object file format can support. diff -rc2N gcc-2.0/config/ns32k.c gcc-2.1/config/ns32k.c *** gcc-2.0/config/ns32k.c Tue Dec 24 10:38:27 1991 --- gcc-2.1/config/ns32k.c Mon Mar 23 16:20:38 1992 *************** *** 212,216 **** /* The expression to be build is BASE[INDEX:SCALE]. To recognize this, scale must be converted from an exponent (from ASHIFT) to a ! muliplier (for MULT). */ rtx gen_indexed_expr (base, index, scale) --- 212,216 ---- /* The expression to be build is BASE[INDEX:SCALE]. To recognize this, scale must be converted from an exponent (from ASHIFT) to a ! multiplier (for MULT). */ rtx gen_indexed_expr (base, index, scale) *************** *** 381,400 **** fprintf (file, "%s", reg_names[REGNO (x)]); else if (GET_CODE (x) == MEM) ! output_address (XEXP (x, 0)); else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) != DImode) ! if (GET_MODE (x) == DFmode) ! { ! union { double d; int i[2]; } u; ! u.i[0] = CONST_DOUBLE_LOW (x); u.i[1] = CONST_DOUBLE_HIGH (x); ! PUT_IMMEDIATE_PREFIX(file); ! fprintf (file, "0d%.20e", u.d); ! } ! else ! { ! union { double d; int i[2]; } u; ! u.i[0] = CONST_DOUBLE_LOW (x); u.i[1] = CONST_DOUBLE_HIGH (x); ! PUT_IMMEDIATE_PREFIX(file); ! fprintf (file, "0f%.20e", u.d); ! } else { --- 381,433 ---- fprintf (file, "%s", reg_names[REGNO (x)]); else if (GET_CODE (x) == MEM) ! { ! rtx tmp = XEXP (x, 0); ! #ifndef PC_RELATIVE ! if (GET_CODE (tmp) == SYMBOL_REF || GET_CODE (tmp) == LABEL_REF) ! { ! char *out = XSTR (tmp, 0); ! if (out[0] == '*') ! fprintf (file, "@%s", &out[1]); ! else ! ASM_OUTPUT_LABELREF (file, out); ! } ! else ! #endif ! output_address (XEXP (x, 0)); ! } else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) != DImode) ! { ! if (GET_MODE (x) == DFmode) ! { ! union { double d; int i[2]; } u; ! u.i[0] = CONST_DOUBLE_LOW (x); u.i[1] = CONST_DOUBLE_HIGH (x); ! PUT_IMMEDIATE_PREFIX(file); ! #ifdef SEQUENT_ASM ! /* Sequent likes it's floating point constants as integers */ ! fprintf (file, "0Dx%08x%08x", u.i[1], u.i[0])l ! #else ! #ifdef ENCORE_ASM ! fprintf (file, "0f%.20e", u.d); ! #else ! fprintf (file, "0d%.20e", u.d); ! #endif ! #endif ! } ! else ! { ! union { double d; int i[2]; } u; ! u.i[0] = CONST_DOUBLE_LOW (x); u.i[1] = CONST_DOUBLE_HIGH (x); ! PUT_IMMEDIATE_PREFIX(file); ! #ifdef SEQUENT_ASM ! { ! union { float f; long l; } uu; ! uu.f = u.d; ! fprintf (file, "0Fx%08x", uu.l); ! } ! #else ! fprintf (file, "0f%.20e", u.d); ! #endif ! } ! } else { *************** *** 500,515 **** /* now, offset, base and indexexp are set */ if (! base) - #ifdef PC_RELATIVE { ! if (GET_CODE (offset) == LABEL_REF || GET_CODE (offset) == SYMBOL_REF) ! ; ! else #endif PUT_ABSOLUTE_PREFIX (file); - #ifdef PC_RELATIVE } - #endif ! output_addr_const (file,offset); if (base) /* base can be (REG ...) or (MEM ...) */ switch (GET_CODE (base)) --- 533,545 ---- /* now, offset, base and indexexp are set */ if (! base) { ! #if defined (PC_RELATIVE) || defined (NO_ABSOLUTE_PREFIX_IF_SYMBOLIC) ! if (! (GET_CODE (offset) == LABEL_REF ! || GET_CODE (offset) == SYMBOL_REF)) #endif PUT_ABSOLUTE_PREFIX (file); } ! output_addr_const (file, offset); if (base) /* base can be (REG ...) or (MEM ...) */ switch (GET_CODE (base)) *************** *** 575,578 **** --- 605,609 ---- if (base) fprintf (file, "(%s)", reg_names[REGNO (base)]); + #ifdef BASE_REG_NEEDED else if (TARGET_SB) fprintf (file, "(sb)"); *************** *** 579,582 **** --- 610,614 ---- else abort (); + #endif fprintf (file, ")"); break; diff -rc2N gcc-2.0/config/ns32k.h gcc-2.1/config/ns32k.h *** gcc-2.0/config/ns32k.h Tue Jan 28 16:04:58 1992 --- gcc-2.1/config/ns32k.h Sat Mar 14 00:16:21 1992 *************** *** 120,124 **** #define WORDS_BIG_ENDIAN 0 ! /* Number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 120,124 ---- #define WORDS_BIG_ENDIAN 0 ! /* Number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 154,162 **** #define BIGGEST_ALIGNMENT 32 ! /* Define this if move instructions will actually fail to work when given unaligned data. National claims that the NS32032 works without strict alignment, but rumor has it that operands crossing a page boundary cause unpredictable results. */ ! #define STRICT_ALIGNMENT /* If bit field type is int, dont let it cross an int, --- 154,162 ---- #define BIGGEST_ALIGNMENT 32 ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. National claims that the NS32032 works without strict alignment, but rumor has it that operands crossing a page boundary cause unpredictable results. */ ! #define STRICT_ALIGNMENT 1 /* If bit field type is int, dont let it cross an int, *************** *** 712,719 **** asm ("movd 16(r2),tos"); \ asm ("movd 12(r2),r2"); \ ! asm ("ret"); \ } - - /* Addressing modes, and classification of registers for them. */ --- 712,717 ---- asm ("movd 16(r2),tos"); \ asm ("movd 12(r2),r2"); \ ! asm ("ret 0"); \ } /* Addressing modes, and classification of registers for them. */ diff -rc2N gcc-2.0/config/ns32k.md gcc-2.1/config/ns32k.md *** gcc-2.0/config/ns32k.md Wed Jan 8 06:12:04 1992 --- gcc-2.1/config/ns32k.md Sat Mar 21 15:06:07 1992 *************** *** 7,11 **** ;; Implement unsigned multiplication?? ! ;;- Machine descrption for GNU compiler ;;- ns32000 Version ;; Copyright (C) 1988 Free Software Foundation, Inc. --- 7,11 ---- ;; Implement unsigned multiplication?? ! ;;- Machine description for GNU compiler ;;- ns32000 Version ;; Copyright (C) 1988 Free Software Foundation, Inc. *************** *** 243,247 **** return \"movf %1,%0\"; } ! #if 0 #ifndef GAS_SYNTAX /* GAS understands floating constants in ordinary movd instructions --- 243,252 ---- return \"movf %1,%0\"; } ! #if 0 /* Someone suggested this for the Sequent. Is it needed? */ ! else if (GET_CODE (operands[1]) == CONST_DOUBLE) ! return \"movf %1,%0\"; ! #endif ! /* There was a #if 0 around this, but that was erroneous ! for anything bug GAS syntax -- rms. */ #ifndef GAS_SYNTAX /* GAS understands floating constants in ordinary movd instructions *************** *** 259,263 **** } #endif - #endif else return \"movd %1,%0\"; }") --- 264,267 ---- *************** *** 2180,2186 **** if (CONSTANT_ADDRESS_P (temp)) { operands[0] = temp; return \"bsr %0\"; ! #if 0 #ifdef GNX_V3 return \"bsr %0\"; --- 2184,2191 ---- if (CONSTANT_ADDRESS_P (temp)) { + #ifdef GAS_SYNTAX operands[0] = temp; return \"bsr %0\"; ! #else #ifdef GNX_V3 return \"bsr %0\"; *************** *** 2191,2196 **** } if (GET_CODE (XEXP (operands[0], 0)) == REG) return \"jsr %0\"; ! #if 0 return \"jsr %a0\"; #endif --- 2196,2202 ---- } if (GET_CODE (XEXP (operands[0], 0)) == REG) + #if defined (GNX_V3) || defined (GAS_SYNTAX) return \"jsr %0\"; ! #else return \"jsr %a0\"; #endif *************** *** 2213,2219 **** if (CONSTANT_ADDRESS_P (temp)) { operands[1] = temp; return \"bsr %1\"; ! #if 0 #ifdef GNX_V3 return \"bsr %1\"; --- 2219,2226 ---- if (CONSTANT_ADDRESS_P (temp)) { + #ifdef GAS_SYNTAX operands[1] = temp; return \"bsr %1\"; ! #else #ifdef GNX_V3 return \"bsr %1\"; *************** *** 2224,2229 **** } if (GET_CODE (XEXP (operands[1], 0)) == REG) return \"jsr %1\"; ! #if 0 return \"jsr %a1\"; #endif --- 2231,2237 ---- } if (GET_CODE (XEXP (operands[1], 0)) == REG) + #if defined (GNX_V3) || defined (GAS_SYNTAX) return \"jsr %1\"; ! #else return \"jsr %a1\"; #endif diff -rc2N gcc-2.0/config/nws3250v4.h gcc-2.1/config/nws3250v4.h *** gcc-2.0/config/nws3250v4.h --- gcc-2.1/config/nws3250v4.h Tue Mar 10 16:02:47 1992 *************** *** 0 **** --- 1,58 ---- + /* Definitions of target machine for GNU compiler. Sony RISC NEWS (mips) + Copyright (C) 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #define MIPS_NEWS + + #define CPP_PREDEFINES "-Dmips -Dhost_mips -Dsony -Dsonyrisc -Dunix \ + -DLANGUAGE_C -DMIPSEB -DSYSTYPE_SYSV" + + #define MD_STARTFILE_PREFIX "/usr/ccs/lib/" + + #define ASM_SPEC "\ + %{!mgas: \ + %{!mrnames: -nocpp} \ + %{pipe:%e:-pipe not supported} \ + %{EB} %{!EB:-EB} \ + %{EL: %e-EL not supported} \ + %{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3} \ + %{g} %{g1} %{g2} %{g3} %{g0} %{v} %{K}} \ + %{G*}" + + #define CPP_SPEC "\ + %{.cc: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ + %{.cxx: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ + %{.C: -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS} \ + %{.m: -D__LANGUAGE_OBJECTIVE_C -D_LANGUAGE_OBJECTIVE_C} \ + %{.S: -D__LANGUAGE_ASSEMBLY -D_LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ + %{!.S: -D__LANGUAGE_C -D_LANGUAGE_C %{!ansi:-DLANGUAGE_C}}" + + #define LINK_SPEC "\ + %{G*} \ + %{!mgas: \ + %{EB} %{!EB:-EB} \ + %{EL: %e-EL not supported} \ + %{bestGnum}}" + + #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} -lc crtn.o%s values-Xt.o%s" + + #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt1.o%s}}" + + #define MACHINE_TYPE "RISC NEWS-OS SVr4" + + #include "mips.h" diff -rc2N gcc-2.0/config/pbb.h gcc-2.1/config/pbb.h *** gcc-2.0/config/pbb.h --- gcc-2.1/config/pbb.h Wed Mar 11 18:05:20 1992 *************** *** 0 **** --- 1,154 ---- + /* Definitions of target machine for GNU compiler. + + Citicorp/TTI Unicom PBB version (using GAS with a %-register prefix) + + Copyright (C) 1987, 1988, 1990 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + /* Note: This config uses a version of gas with a postprocessing stage that + converts the output of gas to coff containing stab debug symbols. + (See vasta@apollo.com or mb@soldev.tti.com) */ + + #include "m68k.h" + + /* See m68k.h. 5 means 68020 without 68881. */ + + #define TARGET_DEFAULT 5 + + /* Every structure or union's size must be a multiple of 2 bytes. */ + #define STRUCTURE_SIZE_BOUNDARY 16 + + /* Define __HAVE_68881__ in preprocessor if -m68881 is specified. + This will control the use of inline 68881 insns in certain macros. */ + + #define CPP_SPEC "%{m68881:-D__HAVE_68881__}" + + /* Names to predefine in the preprocessor for this target machine. */ + + #define CPP_PREDEFINES "-Dm68k -Dunix -DUnicomPBB -Dmc68k -Dmc68020 -Dmc68k32" + + /* We want DBX format for use with gdb under COFF. */ + + #define DBX_DEBUGGING_INFO + + /* Generate calls to memcpy, memcmp and memset. */ + + #define TARGET_MEM_FUNCTIONS + + /* -m68000 requires special flags to the assembler. */ + + #define ASM_SPEC \ + " %{m68000:-mc68010}%{mc68000:-mc68010}" + + /* we use /lib/libp/lib* when profiling */ + + #define LIB_SPEC "%{p:-L/usr/lib/libp} %{pg:-L/usr/lib/libp} -lc" + + + /* Use crt1.o as a startup file and crtn.o as a closing file. */ + /* + * The loader directive file gcc.ifile defines how to merge the constructor + * sections into the data section. Also, since gas only puts out those + * sections in response to N_SETT stabs, and does not (yet) have a + * ".sections" directive, gcc.ifile also defines the list symbols + * __DTOR_LIST__ and __CTOR_LIST__. + * + * Finally, we must explicitly specify the file from libgcc.a that defines + * exit(), otherwise if the user specifies (for example) "-lc_s" on the + * command line, the wrong exit() will be used and global destructors will + * not get called . + */ + + #define STARTFILE_SPEC \ + "%{!r: gcc.ifile%s} %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} \ + %{!r:_exit.o%s}" + + #define ENDFILE_SPEC "crtn.o%s" + + /* cpp has to support a #sccs directive for the /usr/include files */ + + #define SCCS_DIRECTIVE + + /* GAS register prefix assembly syntax: */ + + /* User labels have no prefix */ + #undef USER_LABEL_PREFIX + #define USER_LABEL_PREFIX "" + + /* local labels are prefixed with ".L" */ + #undef LOCAL_LABEL_PREFIX + #define LOCAL_LABEL_PREFIX "." + + /* registers are prefixed with "%" */ + #undef REGISTER_PREFIX + #define REGISTER_PREFIX "%" + + #undef REGISTER_NAMES + #define REGISTER_NAMES \ + {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \ + "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \ + "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7"} + + #undef FUNCTION_EXTRA_EPILOGUE + #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) \ + { extern int current_function_returns_pointer; \ + if ((current_function_returns_pointer) && \ + ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \ + asm_fprintf (FILE, "\tmovl %Rd0,%Ra0\n"); } + + #define ASM_RETURN_CASE_JUMP return "jmp %%pc@(2,%0:w)" + + /* Although the gas we use can create .ctor and .dtor sections from N_SETT + stabs, it does not support section directives, so we need to have the loader + define the lists. + */ + #define CTOR_LISTS_DEFINED_EXTERNALLY + + /* similar to default, but allows for the table defined by ld with gcc.ifile. + nptrs is always 0. So we need to instead check that __DTOR_LIST__[1] != 0. + The old check is left in so that the same macro can be used if and when + a future version of gas does support section directives. */ + + #define DO_GLOBAL_DTORS_BODY {int nptrs = *(int *)__DTOR_LIST__; int i; \ + if (nptrs == -1 || (__DTOR_LIST__[0] == 0 && __DTOR_LIST__[1] != 0)) \ + for (nptrs = 0; __DTOR_LIST__[nptrs + 1] != 0; nptrs++); \ + for (i = nptrs; i >= 1; i--) \ + __DTOR_LIST__[i] (); } + + /* + * Here is an example gcc.ifile. I've tested it on PBB 68k and on sco 386 + * systems. The NEXT(0x200000) works on just about all 386 and m68k systems, + * but can be reduced to any power of 2 that is >= NBPS (0x10000 on a pbb). + + SECTIONS { + .text BIND(0x200200) BLOCK (0x200) : + { *(.init) *(.text) vfork = fork; *(.fini) } + + GROUP BIND( NEXT(0x200000) + ADDR(.text) + SIZEOF(.text)): + { .data : { __CTOR_LIST__ = . ; . += 4; *(.ctor) . += 4 ; + __DTOR_LIST__ = . ; . += 4; *(.dtor) . += 4 ; } + .bss : { } + } + } + */ + + /* + Local variables: + version-control: t + End: + */ diff -rc2N gcc-2.0/config/pbd.h gcc-2.1/config/pbd.h *** gcc-2.0/config/pbd.h Sun Dec 1 00:07:47 1991 --- gcc-2.1/config/pbd.h Wed Mar 11 18:10:14 1992 *************** *** 32,36 **** #define DBX_DEBUGGING_INFO - #define DBX_IN_COFF /* Generate calls to memcpy, memcmp and memset. */ --- 32,35 ---- *************** *** 41,59 **** #undef LIB_SPEC ! #define LIB_SPEC "%{!shlib:%{p:-L/lib/libp} %{pg:-L/lib/libp} -lc} \ ! %{shlib:-lc_s crtn.o%s }" - /* shared libraries need to use crt1.o */ ! #ifdef USE_GPLUS_IFILE ! #define STARTFILE_SPEC \ ! "g++.ifile%s %{!shlib:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\ ! %{shlib:crt1.o%s } " ! #else #define STARTFILE_SPEC \ ! "%{!shlib:%{pg:mcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\ ! %{shlib:crt1.o%s } " ! #endif /* cpp has to support a #sccs directive for the /usr/include files */ --- 40,66 ---- #undef LIB_SPEC ! #define LIB_SPEC "%{p:-L/usr/lib/libp} %{pg:-L/usr/lib/libp} -lc" ! /* Use crt1.o as a startup file and crtn.o as a closing file. */ ! /* ! * The loader directive file gcc.ifile defines how to merge the constructor ! * sections into the data section. Also, since gas only puts out those ! * sections in response to N_SETT stabs, and does not (yet) have a ! * ".sections" directive, gcc.ifile also defines the list symbols ! * __DTOR_LIST__ and __CTOR_LIST__. ! * ! * Finally, we must explicitly specify the file from libgcc.a that defines ! * exit(), otherwise if the user specifies (for example) "-lc_s" on the ! * command line, the wrong exit() will be used and global destructors will ! * not get called . ! */ ! #define STARTFILE_SPEC \ ! "%{!r: gcc.ifile%s} %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} \ ! %{!r:_exit.o%s}" + #define ENDFILE_SPEC "crtn.o%s" + /* cpp has to support a #sccs directive for the /usr/include files */ *************** *** 60,63 **** --- 67,108 ---- #define SCCS_DIRECTIVE + /* LINK_SPEC is needed only for Sunos 4. */ + + #undef LINK_SPEC + + /* Although the gas we use can create .ctor and .dtor sections from N_SETT + stabs, it does not support section directives, so we need to have the loader + define the lists. + */ + #define CTOR_LISTS_DEFINED_EXTERNALLY + + /* similar to default, but allows for the table defined by ld with gcc.ifile. + nptrs is always 0. So we need to instead check that __DTOR_LIST__[1] != 0. + The old check is left in so that the same macro can be used if and when + a future version of gas does support section directives. */ + + #define DO_GLOBAL_DTORS_BODY {int nptrs = *(int *)__DTOR_LIST__; int i; \ + if (nptrs == -1 || (__DTOR_LIST__[0] == 0 && __DTOR_LIST__[1] != 0)) \ + for (nptrs = 0; __DTOR_LIST__[nptrs + 1] != 0; nptrs++); \ + for (i = nptrs; i >= 1; i--) \ + __DTOR_LIST__[i] (); } + + /* + * Here is an example gcc.ifile. I've tested it on PBD sparc + * systems. The NEXT(0x200000) works on just about all 386 and m68k systems, + * but can be reduced to any power of 2 that is >= NBPS (0x40000 on a pbd). + + SECTIONS { + .text BIND(0x41000200) BLOCK (0x200) : + { *(.init) *(.text) vfork = fork; *(.fini) } + + GROUP BIND( NEXT(0x200000) + ADDR(.text) + SIZEOF(.text)): + { .data : { __CTOR_LIST__ = . ; . += 4; *(.ctor) . += 4 ; + __DTOR_LIST__ = . ; . += 4; *(.dtor) . += 4 ; } + .bss : { } + } + } + */ + #ifndef __GNUC__ #define USE_C_ALLOCA *************** *** 106,110 **** fprintf (FILE, "\t.word .L%d\n", VALUE) ! /* Underscores are not used on Unicom PBB coff systems. */ #define NO_UNDERSCORES --- 151,156 ---- fprintf (FILE, "\t.word .L%d\n", VALUE) ! /* Underscores are not used on Unicom PBD coff systems. */ ! /* This currently seems to only be needed for libgcc2.a */ #define NO_UNDERSCORES diff -rc2N gcc-2.0/config/pc532-mach.h gcc-2.1/config/pc532-mach.h *** gcc-2.0/config/pc532-mach.h --- gcc-2.1/config/pc532-mach.h Mon Mar 2 08:47:23 1992 *************** *** 0 **** --- 1,24 ---- + /* Definitions of target machine for GNU compiler. + PC532 with National 32532, running Mach 3.0. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #include "pc532.h" + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dns32532 -DPC532 -DMACH=1" diff -rc2N gcc-2.0/config/pc532-min.h gcc-2.1/config/pc532-min.h *** gcc-2.0/config/pc532-min.h --- gcc-2.1/config/pc532-min.h Mon Mar 23 14:41:19 1992 *************** *** 0 **** --- 1,40 ---- + /* Definitions of target machine for GNU compiler. + PC532 with National 32532, running Minix. + Works with pc532 Minix 1.5hybrid. + Copyright (C) 1990 Free Software Foundation, Inc. + + Derived from SEQUENT NS32000, written originally + by Bruce Culbertson , + hacked for easier fit in gcc by Jyrki Kuoppala . + + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #include "pc532.h" + + /* Minix has crtso.o instead of crt0.o */ + #undef STARTFILE_SPEC + #define STARTFILE_SPEC \ + "%{pg:gcrtso.o%s}%{!pg:%{p:mcrtso.o%s}%{!p:crtso.o%s}}" + + /* our setjmp doesn't save registers, so we must tell gcc to save + call-saved-regs in a function calling setjmp */ + + #define NON_SAVING_SETJMP (current_function_calls_setjmp) + + /* at least with estdio there's no _cleanup() but we have atexit() */ + + #define HAVE_ATEXIT diff -rc2N gcc-2.0/config/pc532.h gcc-2.1/config/pc532.h *** gcc-2.0/config/pc532.h --- gcc-2.1/config/pc532.h Mon Mar 23 16:22:17 1992 *************** *** 0 **** --- 1,72 ---- + /* Definitions of target machine for GNU compiler. + PC532 with National 32532. + Copyright (C) 1990 Free Software Foundation, Inc. + Contributed by Jukka Virtanen , Jyrki Kuoppala , + Tatu Yl|nen , Johannes Helander . + + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + #include "ns32k.h" + + /* Compile for the floating point unit & 32532 by default; + also presume SB is zero */ + + #define TARGET_DEFAULT 25 + + /* Write DBX debugging info for gdb to read */ + + #define DBX_DEBUGGING_INFO + + /* Use the re-entrant and potentially faster method */ + + #undef PCC_STATIC_STRUCT_RETURN + + /* 32-bit alignment for efficiency */ + #undef POINTER_BOUNDARY + #define POINTER_BOUNDARY 32 + + /* 32-bit alignment for efficiency */ + #undef FUNCTION_BOUNDARY + #define FUNCTION_BOUNDARY 32 + + /* 32532 spec says it can handle any alignment. Rumor from tm-ns32k.h + tells this might not be actually true (but it's for 32032, perhaps + National has fixed the bug for 32532). You might have to change this + if the bug still exists. */ + + #undef STRICT_ALIGNMENT + #define STRICT_ALIGNMENT 0 + + /* Maybe someone needs to know which processor we're running on */ + + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-Dns32000 -Dns32532 -Dpc532 -Dunix" + + /* Use pc relative addressing whenever possible, + it's more efficient than absolute (ns32k.c) + You have to fix a bug in gas 1.38.1 to make this work with gas, + patch available from jkp@cs.hut.fi. */ + + #define PC_RELATIVE + + /* This machine appears to use GAS syntax. */ + + #define GAS_SYNTAX + + /* Every address needs to use a base reg. */ + + #define BASE_REG_NEEDED diff -rc2N gcc-2.0/config/pyr.h gcc-2.1/config/pyr.h *** gcc-2.0/config/pyr.h Mon Jan 20 14:40:00 1992 --- gcc-2.1/config/pyr.h Sun Mar 22 17:25:42 1992 *************** *** 53,63 **** #define TARGET_UNIX_ASM (target_flags & 1) - /* Use the indexed addressing modes (were once not known to work). - Leaving this in means we can disable them and so find out what - they win us. */ - #define TARGET_INDEX (target_flags & 2) - /* Implement stdarg in the same fashion used on all other machines. */ ! #define TARGET_GNU_STDARG (target_flags & 4) /* Compile using RETD to pop off the args. --- 53,58 ---- #define TARGET_UNIX_ASM (target_flags & 1) /* Implement stdarg in the same fashion used on all other machines. */ ! #define TARGET_GNU_STDARG (target_flags & 2) /* Compile using RETD to pop off the args. *************** *** 67,71 **** do it yet. */ ! #define TARGET_RETD (target_flags & 8) /* Macros used in the machine description to test the flags. */ --- 62,66 ---- do it yet. */ ! #define TARGET_RETD (target_flags & 4) /* Macros used in the machine description to test the flags. */ *************** *** 77,83 **** An empty string NAME is used to identify the default VALUE. ! -mgnu will be useful if we ever have GAS on a pyramid. ! -mindex was used to enable indexing when I didn't understand ! how pyramid's indexing modes worked. */ #define TARGET_SWITCHES \ --- 72,76 ---- An empty string NAME is used to identify the default VALUE. ! -mgnu will be useful if we ever have GAS on a pyramid. */ #define TARGET_SWITCHES \ *************** *** 84,93 **** { {"unix", 1}, \ {"gnu", -1}, \ ! {"index", 2}, \ ! {"noindex", -2}, \ ! {"gnu-stdarg", 4}, \ ! {"nognu-stdarg", -4}, \ ! {"retd", 8}, \ ! {"no-retd", -8}, \ { "", TARGET_DEFAULT}} --- 77,84 ---- { {"unix", 1}, \ {"gnu", -1}, \ ! {"gnu-stdarg", 2}, \ ! {"nognu-stdarg", -2}, \ ! {"retd", 4}, \ ! {"no-retd", -4}, \ { "", TARGET_DEFAULT}} *************** *** 97,101 **** #ifndef TARGET_DEFAULT ! #define TARGET_DEFAULT (1 + 2 + 4) #endif --- 88,92 ---- #ifndef TARGET_DEFAULT ! #define TARGET_DEFAULT (1 + 2) #endif *************** *** 106,119 **** /*** Target machine storage layout ***/ ! /* Define this if most significant bit is lowest numbered ! in instructions that operate on numbered bit-fields. This is not true on the pyramid. */ #define BITS_BIG_ENDIAN 0 ! /* Define this if most significant byte of a word is the lowest numbered. */ #define BYTES_BIG_ENDIAN 1 ! /* Define this if most significant word of a multiword number is the lowest ! numbered. */ #define WORDS_BIG_ENDIAN 1 --- 97,111 ---- /*** Target machine storage layout ***/ ! /* Define this to non-zero if most significant bit is lowest ! numbered in instructions that operate on numbered bit-fields. This is not true on the pyramid. */ #define BITS_BIG_ENDIAN 0 ! /* Define this to non-zero if most significant byte of a word is ! the lowest numbered. */ #define BYTES_BIG_ENDIAN 1 ! /* Define this to non-zero if most significant word of a multiword ! number is the lowest numbered. */ #define WORDS_BIG_ENDIAN 1 *************** *** 146,149 **** --- 138,144 ---- #define EMPTY_FIELD_BOUNDARY 32 + /* Every structure's size must be a multiple of this. */ + #define STRUCTURE_SIZE_BOUNDARY 32 + /* No data type wants to be aligned rounder than this. */ #define BIGGEST_ALIGNMENT 32 *************** *** 151,155 **** /* Specified types of bitfields affect alignment of those fields and of the structure as a whole. */ ! #define PCC_BITFIELD_TYPE_MATTERS /* Make strings word-aligned so strcpy from constants will be faster. --- 146,150 ---- /* Specified types of bitfields affect alignment of those fields and of the structure as a whole. */ ! #define PCC_BITFIELD_TYPE_MATTERS 1 /* Make strings word-aligned so strcpy from constants will be faster. *************** *** 158,162 **** Newer pyrs have single insns that do strcmp() and strcpy(), so this may not actually win anything. */ - #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ (TREE_CODE (EXP) == STRING_CST \ --- 153,156 ---- *************** *** 169,175 **** && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT /*** Standard register usage. ***/ --- 163,169 ---- && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 1 /*** Standard register usage. ***/ *************** *** 253,258 **** and are not available for the register allocator. ! On the pyramid, these are LOGPSW, CFP, SP, PC, and all the other ! global regs. */ #define FIXED_REGISTERS \ --- 247,251 ---- and are not available for the register allocator. ! On the pyramid, these are LOGPSW, SP, and PC. */ #define FIXED_REGISTERS \ *************** *** 311,315 **** /* Base register for access to local variables of the function. Pyramid uses CFP (GR13) as both frame pointer and argument pointer. */ ! #define FRAME_POINTER_REGNUM 13 /* PYR_GREG(13) */ /* Value should be nonzero if functions must have frame pointers. --- 304,308 ---- /* Base register for access to local variables of the function. Pyramid uses CFP (GR13) as both frame pointer and argument pointer. */ ! #define FRAME_POINTER_REGNUM PYR_GREG(13) /* Value should be nonzero if functions must have frame pointers. *************** *** 330,333 **** --- 323,332 ---- #define STATIC_CHAIN_REGNUM PYR_TREG(12) + /* If register windows are used, STATIC_CHAIN_INCOMING_REGNUM + is the register number as seen by the called function, while + STATIC_CHAIN_REGNUM is the register number as seen by the calling + function. */ + #define STATIC_CHAIN_INCOMING_REGNUM PYR_PREG(12) + /* Register in which address to store a structure value is passed to a function. *************** *** 548,552 **** #define CUMULATIVE_ARGS int ! /* Define the number of registers that can hold paramters. This macro is used only in other macro definitions below. */ #define NPARM_REGS 12 --- 547,551 ---- #define CUMULATIVE_ARGS int ! /* Define the number of registers that can hold parameters. This macro is used only in other macro definitions below. */ #define NPARM_REGS 12 *************** *** 695,698 **** --- 694,729 ---- #endif /* !FRAME_POINTER_REQUIRED */ + /* the trampoline stuff was taken from convex.h - S.P. */ + + /* A C statement to output, on the stream FILE, assembler code for a + block of data that contains the constant parts of a trampoline. This + code should not include a label - the label is taken care of + automatically. + We use TR12/PR12 for the static chain. + movew $,pr12 # I2R + jump $ # S2R + */ + #define TRAMPOLINE_TEMPLATE(FILE) \ + { ASM_OUTPUT_INT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x2100001C)); \ + ASM_OUTPUT_INT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x00000000)); \ + ASM_OUTPUT_INT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x40000000)); \ + ASM_OUTPUT_INT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x00000000)); } + + #define TRAMPOLINE_SIZE 16 + #define TRAMPOLINE_ALIGNMENT 32 + + /* Emit RTL insns to initialize the variable parts of a trampoline. + FNADDR is an RTX for the address of the function's pure code. + CXT is an RTX for the static chain value for the function. */ + + #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ + { emit_move_insn (gen_rtx (MEM, Pmode, plus_constant (TRAMP, 4)), CXT); \ + emit_move_insn (gen_rtx (MEM, Pmode, plus_constant (TRAMP, 12)), FNADDR); \ + emit_call_insn (gen_call (gen_rtx (MEM, QImode, \ + gen_rtx (SYMBOL_REF, Pmode, \ + "__enable_execute_stack")), \ + const0_rtx)); \ + } + /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ *************** *** 729,736 **** || current_function_calls_alloca) \ ! /* If the memory address ADDR is relative to the frame pointer, ! correct it to be relative to the stack pointer instead. ! This is for when we don't use a frame pointer. ! ADDR should be a variable name. */ /*** Addressing modes, and classification of registers for them. ***/ --- 760,772 ---- || current_function_calls_alloca) \ ! /* Store in the variable DEPTH the initial difference between the ! frame pointer reg contents and the stack pointer reg contents, ! as of the start of the function body. This depends on the layout ! of the fixed parts of the stack frame and on how registers are saved. ! ! On the Pyramid, FRAME_POINTER_REQUIRED is always 1, so the definition ! of this macro doesn't matter. But it must be defined. */ ! ! #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) (DEPTH) = 0; /*** Addressing modes, and classification of registers for them. ***/ *************** *** 753,760 **** #define REGNO_OK_FOR_BASE_P(regno) \ ! ((0 < (regno) && (regno) < FIRST_PSEUDO_REGISTER) || reg_renumber[regno] > 0) #define REGNO_OK_FOR_INDEX_P(regno) \ ! ((0 < (regno) && (regno) < FIRST_PSEUDO_REGISTER) || reg_renumber[regno] > 0) /* Maximum number of registers that can appear in a valid memory address. */ --- 789,797 ---- #define REGNO_OK_FOR_BASE_P(regno) \ ! ((regno) < FIRST_PSEUDO_REGISTER || reg_renumber[regno] < FIRST_PSEUDO_REGISTER) #define REGNO_OK_FOR_INDEX_P(regno) \ ! ((unsigned) (regno) - 1 < FIRST_PSEUDO_REGISTER - 1 \ ! || (unsigned) reg_renumber[regno] - 1 < FIRST_PSEUDO_REGISTER - 1) /* Maximum number of registers that can appear in a valid memory address. */ *************** *** 788,792 **** /* Nonzero if X is a hard reg that can be used as an index or if it is a pseudo reg. */ ! #define REG_OK_FOR_INDEX_P(X) 1 /* Nonzero if X is a hard reg that can be used as a base reg or if it is a pseudo reg. */ --- 825,829 ---- /* Nonzero if X is a hard reg that can be used as an index or if it is a pseudo reg. */ ! #define REG_OK_FOR_INDEX_P(X) (REGNO (X) > 0) /* Nonzero if X is a hard reg that can be used as a base reg or if it is a pseudo reg. */ *************** *** 811,816 **** ! /* Go to ADDR if X is indexable -- ie, neither indexed nor offset. ! Note that X is indexable iff x is offset. */ #define GO_IF_INDEXABLE_ADDRESS(X, ADDR) \ { register rtx xfoob = (X); \ --- 848,852 ---- ! /* Go to ADDR if X is indexable -- i.e., neither indexed nor offset. */ #define GO_IF_INDEXABLE_ADDRESS(X, ADDR) \ { register rtx xfoob = (X); \ *************** *** 877,881 **** { register rtx xone, xtwo, xfoo0, xfoo1; \ GO_IF_NONINDEXED_ADDRESS (X, ADDR); \ ! if (TARGET_INDEX && GET_CODE (X) == PLUS) \ { \ /* Handle
[index] represented with index-sum outermost */\ --- 913,917 ---- { register rtx xone, xtwo, xfoo0, xfoo1; \ GO_IF_NONINDEXED_ADDRESS (X, ADDR); \ ! if (GET_CODE (X) == PLUS) \ { \ /* Handle
[index] represented with index-sum outermost */\ *************** *** 1004,1007 **** --- 1040,1047 ---- case CONST_DOUBLE: \ return 6; + + /* A flag which says to swap the operands of certain insns + when they are output. */ + extern int swap_operands; /*** Condition Code Information ***/ diff -rc2N gcc-2.0/config/pyr.md gcc-2.1/config/pyr.md *** gcc-2.0/config/pyr.md Mon Nov 25 21:50:26 1991 --- gcc-2.1/config/pyr.md Sat Mar 14 01:39:56 1992 *************** *** 39,43 **** ;; * Make the jump tables contain branches, not addresses! This would ;; save us one instruction. ! ;; * Could the compilcated scheme for compares be simplyfied, if we had ;; no named cmpqi or cmphi patterns, and instead anonymous patterns for ;; the less-than-word compare cases pyr can handle??? --- 39,43 ---- ;; * Make the jump tables contain branches, not addresses! This would ;; save us one instruction. ! ;; * Could the complicated scheme for compares be simplified, if we had ;; no named cmpqi or cmphi patterns, and instead anonymous patterns for ;; the less-than-word compare cases pyr can handle??? *************** *** 679,683 **** ;; If the destination is a memory operand, indexed source operands are ;; disallowed. Big DImode constants are always loaded into a reg pair, ! ;; although offsetable memory addresses really could be dealt with. (define_insn "" --- 679,683 ---- ;; If the destination is a memory operand, indexed source operands are ;; disallowed. Big DImode constants are always loaded into a reg pair, ! ;; although offsettable memory addresses really could be dealt with. (define_insn "" *************** *** 1204,1207 **** --- 1204,1208 ---- "movdi_possible (operands)" "* + { output_asm_insn (\"# COMBINE movw %1,%0\", operands); output_asm_insn (\"# COMBINE movw %3,%2\", operands); *************** *** 1208,1215 **** movdi_possible (operands); if (CONSTANT_P (operands[1])) ! return (swap_operands) ? \"movl %3,%0\" : \"movl %1,%2\"; ! return (swap_operands) ? \"movl %1,%0\" : \"movl %3,%2\"; ! ") ;; Optimize certain tests after memory stores. --- 1209,1216 ---- movdi_possible (operands); if (CONSTANT_P (operands[1])) ! return (swap_operands ? \"movl %3,%0\" : \"movl %1,%2\"); ! return (swap_operands ? \"movl %1,%0\" : \"movl %3,%2\"); ! }") ;; Optimize certain tests after memory stores. *************** *** 1361,1364 **** --- 1362,1371 ---- return \"xorw %2,%0\"; }") + + ;; My version, modelled after Jonathan Stone's and "tablejump" - S.P. + (define_insn "indirect_jump" + [(set (pc) (match_operand:SI 0 "general_operand" "r"))] + "" + "jump (%0)") ;;- Local variables: diff -rc2N gcc-2.0/config/romp.c gcc-2.1/config/romp.c *** gcc-2.0/config/romp.c Wed Jan 15 17:07:53 1992 --- gcc-2.1/config/romp.c Sat Mar 14 00:16:30 1992 *************** *** 614,618 **** } ! /* Return 1 if this is a valid floating-point converstion that can be done as part of an operation by the RT floating-point routines. */ --- 614,618 ---- } ! /* Return 1 if this is a valid floating-point conversion that can be done as part of an operation by the RT floating-point routines. */ *************** *** 930,934 **** case '.': ! /* Output nothing. Used as delimeter in, e.g., "mc%B1%.3 " */ break; --- 930,934 ---- case '.': ! /* Output nothing. Used as delimiter in, e.g., "mc%B1%.3 " */ break; diff -rc2N gcc-2.0/config/romp.h gcc-2.1/config/romp.h *** gcc-2.0/config/romp.h Sun Feb 9 00:09:05 1992 --- gcc-2.1/config/romp.h Mon Mar 16 05:29:46 1992 *************** *** 71,75 **** #define TARGET_DEFAULT 3 ! /* Define this to change the optimizations peformed by default. This used to depend on the value of write_symbols, --- 71,75 ---- #define TARGET_DEFAULT 3 ! /* Define this to change the optimizations performed by default. This used to depend on the value of write_symbols, *************** *** 103,107 **** #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 103,107 ---- #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 151,157 **** && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT /* Standard register usage. */ --- 151,157 ---- && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 1 /* Standard register usage. */ *************** *** 1340,1348 **** /* Output before instructions and read-only data. */ ! #define TEXT_SECTION_ASM_OP "\t.text" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP "\t.data" /* How to refer to registers in assembler output. --- 1340,1348 ---- /* Output before instructions and read-only data. */ ! #define TEXT_SECTION_ASM_OP ".text" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP ".data" /* How to refer to registers in assembler output. diff -rc2N gcc-2.0/config/romp.md gcc-2.1/config/romp.md *** gcc-2.0/config/romp.md Tue Feb 18 07:47:20 1992 --- gcc-2.1/config/romp.md Wed Mar 11 07:06:49 1992 *************** *** 246,252 **** (define_expand "reload_outsi" ! [(set (match_operand:SI 0 "symbolic_memory_operand" "=m") ! (match_operand:SI 1 "" "r")) ! (match_operand:SI 2 "" "=&b")] "" "") --- 246,252 ---- (define_expand "reload_outsi" ! [(parallel [(set (match_operand:SI 0 "symbolic_memory_operand" "=m") ! (match_operand:SI 1 "" "r")) ! (clobber (match_operand:SI 2 "" "=&b"))])] "" "") diff -rc2N gcc-2.0/config/rs6000.c gcc-2.1/config/rs6000.c *** gcc-2.0/config/rs6000.c Sun Feb 9 14:26:21 1992 --- gcc-2.1/config/rs6000.c Sat Mar 14 00:16:33 1992 *************** *** 38,48 **** #define max(A,B) ((A) > (B) ? (A) : (B)) - /* Names of bss and data sections. These should be unique names for each - compilation unit. */ - - char *rs6000_bss_section_name; - char *rs6000_private_data_section_name; - char *rs6000_read_only_section_name; - /* Set to non-zero by "fix" operation to indicate that itrunc and uitrunc must be defined. */ --- 38,41 ---- *************** *** 592,596 **** used instead of %C, so the bits will be in different places. ! Return -1 if OP isn't a valid compaison for some reason. */ int --- 585,589 ---- used instead of %C, so the bits will be in different places. ! Return -1 if OP isn't a valid comparison for some reason. */ int *************** *** 836,840 **** case 'U': ! /* Print `u' is this has an auto-increment or auto-decremement. */ if (GET_CODE (x) == MEM && (GET_CODE (XEXP (x, 0)) == PRE_INC --- 829,833 ---- case 'U': ! /* Print `u' is this has an auto-increment or auto-decrement. */ if (GET_CODE (x) == MEM && (GET_CODE (XEXP (x, 0)) == PRE_INC *************** *** 1009,1014 **** case 'z': ! /* X is a SYMBOL_REF. Write out the name preceeded by a ! period and without any trailing data in backets. Used for function names. */ if (GET_CODE (x) != SYMBOL_REF) --- 1002,1007 ---- case 'z': ! /* X is a SYMBOL_REF. Write out the name preceded by a ! period and without any trailing data in brackets. Used for function names. */ if (GET_CODE (x) != SYMBOL_REF) *************** *** 1019,1022 **** --- 1012,1026 ---- return; + case 'A': + /* If X is a constant integer whose low-order 5 bits are zero, + write 'l'. Otherwise, write 'r'. This is a kludge to fix a bug + in the RS/6000 assembler where "sri" with a zero shift count + write a trash instruction. */ + if (GET_CODE (x) != CONST_INT && (INTVAL (x) & 31) == 0) + fprintf (file, "l"); + else + fprintf (file, "r"); + return; + case 0: if (GET_CODE (x) == REG) *************** *** 1277,1288 **** fprintf (file, "\tai 1,1,%d\n", total_size); ! /* Get the old lr if we saved it. To speed things up, copy it into ! lr here if we don't have to save more than 2 fp regs. */ if (regs_ever_live[65]) ! { ! fprintf (file, "\tl 0,8(1)\n"); ! if (first_fp_reg >= 62) ! fprintf (file, "\tmtlr 0\n"); ! } /* Get the old cr if we saved it. */ --- 1281,1287 ---- fprintf (file, "\tai 1,1,%d\n", total_size); ! /* Get the old lr if we saved it. */ if (regs_ever_live[65]) ! fprintf (file, "\tl 0,8(1)\n"); /* Get the old cr if we saved it. */ *************** *** 1290,1293 **** --- 1289,1296 ---- fprintf (file, "\tl 12,4(1)\n"); + /* Set LR here to try to overlap restores below. */ + if (regs_ever_live[65]) + fprintf (file, "\tmtlr 0\n"); + /* Restore gpr's. */ if (first_reg == 31) *************** *** 1297,1301 **** - (32 - first_reg) * 4 - (64 - first_fp_reg) * 8); ! /* Restore fpr's. */ if (first_fp_reg == 62) fprintf (file, "\tlfd 30,-16(1)\n\tlfd 31,-8(1)\n"); --- 1300,1304 ---- - (32 - first_reg) * 4 - (64 - first_fp_reg) * 8); ! /* Restore fpr's if we can do it without calling a function. */ if (first_fp_reg == 62) fprintf (file, "\tlfd 30,-16(1)\n\tlfd 31,-8(1)\n"); *************** *** 1302,1312 **** else if (first_fp_reg == 63) fprintf (file, "\tlfd 31,-8(1)\n"); - else if (first_fp_reg != 64) - fprintf (file, "\tbl ._restf%d\n\tcror 15,15,15\n", first_fp_reg - 32); - - /* If we used the link register, get it from r0 if we haven't - already. */ - if (regs_ever_live[65] && first_fp_reg < 62) - fprintf (file, "\tmtlr 0\n"); /* If we saved cr, restore it here. Just set cr2, cr3, and cr4. */ --- 1305,1308 ---- *************** *** 1314,1319 **** fprintf (file, "\tmtcrf 0x38,12\n"); ! fprintf (file, "\tbr\n"); } } --- 1310,1323 ---- fprintf (file, "\tmtcrf 0x38,12\n"); ! /* If we have to restore more than two FP registers, branch to the ! restore function. It will return to our caller. */ ! if (first_fp_reg < 62) ! fprintf (file, "\tb ._restf%d\n\tcror 15,15,15\n", first_fp_reg - 32); ! else ! fprintf (file, "\tbr\n"); } + + /* ??? Need to output a traceback table here when -g was given for complete + debugging output. */ } diff -rc2N gcc-2.0/config/rs6000.h gcc-2.1/config/rs6000.h *** gcc-2.0/config/rs6000.h Tue Feb 18 14:41:16 1992 --- gcc-2.1/config/rs6000.h Mon Mar 16 05:30:04 1992 *************** *** 31,37 **** #define TARGET_VERSION ; ! /* Tell the assembler to assume that all undefined names are external. Don't ! do this until the fixed IBM assembler is more generally available. */ /* #define ASM_SPEC "-u" */ --- 31,41 ---- #define TARGET_VERSION ; ! /* Tell the assembler to assume that all undefined names are external. + Don't do this until the fixed IBM assembler is more generally available. + When this becomes permanently defined, the ASM_OUTPUT_EXTERNAL, + ASM_OUTPUT_EXTERNAL_LIBCALL, and RS6000_OUTPUT_BASENAME macros will no + longer be needed. */ + /* #define ASM_SPEC "-u" */ *************** *** 117,121 **** #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 121,125 ---- #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 171,177 **** && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! /* #define STRICT_ALIGNMENT */ /* Standard register usage. */ --- 175,181 ---- && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ! /* Non-zero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 0 /* Standard register usage. */ *************** *** 1144,1152 **** the rest of the bigs in the register. */ #define BYTE_LOADS_ZERO_EXTEND ! /* We can't support any debugging info on the RS/6000 since it has its ! own format. */ ! /* #define DBX_DEBUGGING_INFO */ ! /* #define SDB_DEBUGGING_INFO */ /* We don't have GAS for the RS/6000 yet, so don't write out special --- 1148,1155 ---- the rest of the bigs in the register. */ #define BYTE_LOADS_ZERO_EXTEND + + /* The RS/6000 uses the XCOFF format. */ ! #define XCOFF_DEBUGGING_INFO /* We don't have GAS for the RS/6000 yet, so don't write out special *************** *** 1155,1166 **** #define FASCIST_ASSEMBLER - /* Do not break .stabs pseudos into continuations. */ - #define DBX_CONTIN_LENGTH 0 - - /* Don't try to use the `x' type-cross-reference character in DBX data. - Also has the consequence of putting each struct, union or enum - into a separate .stabs, containing only cross-refs to the others. */ - #define DBX_NO_XREFS - /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits is done just by pretending it is already truncated. */ --- 1158,1161 ---- *************** *** 1287,1299 **** .toc will be emitted. ! Also initialize the section names for the RS/6000 at this point. */ #define ASM_FILE_START(FILE) \ { \ ! rs6000_gen_section_name (&rs6000_bss_section_name, \ main_input_filename, ".bss_"); \ ! rs6000_gen_section_name (&rs6000_private_data_section_name, \ main_input_filename, ".rw_"); \ ! rs6000_gen_section_name (&rs6000_read_only_section_name, \ main_input_filename, ".ro_"); \ \ --- 1282,1297 ---- .toc will be emitted. ! Also initialize the section names for the RS/6000 at this point. ! ! Also, in order to output proper .bs/.es pairs, we need at least one static ! [RW] section emitted. */ #define ASM_FILE_START(FILE) \ { \ ! rs6000_gen_section_name (&xcoff_bss_section_name, \ main_input_filename, ".bss_"); \ ! rs6000_gen_section_name (&xcoff_private_data_section_name, \ main_input_filename, ".rw_"); \ ! rs6000_gen_section_name (&xcoff_read_only_section_name, \ main_input_filename, ".ro_"); \ \ *************** *** 1300,1303 **** --- 1298,1303 ---- toc_section (); \ bss_section (); \ + if (write_symbols != NO_DEBUG) \ + private_data_section (); \ } *************** *** 1314,1324 **** } - /* Names of bss and data sections. These should be unique names for each - compilation unit. */ - - extern char *rs6000_bss_section_name; - extern char *rs6000_private_data_section_name; - extern char *rs6000_read_only_section_name; - /* We define this to prevent the name mangler from putting dollar signs into function names. */ --- 1314,1317 ---- *************** *** 1332,1335 **** --- 1325,1332 ---- #define DOLLARS_IN_IDENTIFIERS 0 + /* Implicit library calls should use memcpy, not bcopy, etc. */ + + #define TARGET_MEM_FUNCTIONS + /* Define the extra sections we need. We define three: one is the read-only data section which is used for constants. This is a csect whose name is *************** *** 1358,1363 **** if (in_section != read_only_data) \ { \ ! fprintf (asm_out_file, "\t.csect\t%s[RO]\n", \ ! rs6000_read_only_section_name); \ in_section = read_only_data; \ } \ --- 1355,1360 ---- if (in_section != read_only_data) \ { \ ! fprintf (asm_out_file, "\t.csect %s[RO]\n", \ ! xcoff_read_only_section_name); \ in_section = read_only_data; \ } \ *************** *** 1370,1374 **** { \ fprintf (asm_out_file, "\t.csect %s[RW]\n", \ ! rs6000_private_data_section_name); \ \ in_section = private_data; \ --- 1367,1371 ---- { \ fprintf (asm_out_file, "\t.csect %s[RW]\n", \ ! xcoff_private_data_section_name); \ \ in_section = private_data; \ *************** *** 1381,1386 **** if (in_section != read_only_private_data) \ { \ ! fprintf (asm_out_file, "\t.csect\t%s[RO]\n", \ ! rs6000_private_data_section_name); \ in_section = read_only_private_data; \ } \ --- 1378,1383 ---- if (in_section != read_only_private_data) \ { \ ! fprintf (asm_out_file, "\t.csect %s[RO]\n", \ ! xcoff_private_data_section_name); \ in_section = read_only_private_data; \ } \ *************** *** 1401,1406 **** if (in_section != bss) \ { \ ! fprintf (asm_out_file, "\t.csect\t%s[BS]\n", \ ! rs6000_bss_section_name); \ in_section = bss; \ } \ --- 1398,1403 ---- if (in_section != bss) \ { \ ! fprintf (asm_out_file, "\t.csect %s[BS]\n", \ ! xcoff_bss_section_name); \ in_section = bss; \ } \ *************** *** 1415,1418 **** --- 1412,1417 ---- csect, however. */ + /* ??? What do the 16 and 044 in the .function line really mean? */ + #define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \ { if (TREE_PUBLIC (DECL)) \ *************** *** 1420,1425 **** fprintf (FILE, "\t.globl ."); \ RS6000_OUTPUT_BASENAME (FILE, NAME); \ ! fprintf (FILE,"\n"); \ } \ fprintf (FILE, "\t.csect "); \ RS6000_OUTPUT_BASENAME (FILE, NAME); \ --- 1419,1430 ---- fprintf (FILE, "\t.globl ."); \ RS6000_OUTPUT_BASENAME (FILE, NAME); \ ! fprintf (FILE, "\n"); \ } \ + else if (write_symbols == XCOFF_DEBUG) \ + { \ + fprintf (FILE, "\t.lglobl ."); \ + RS6000_OUTPUT_BASENAME (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } \ fprintf (FILE, "\t.csect "); \ RS6000_OUTPUT_BASENAME (FILE, NAME); \ *************** *** 1429,1436 **** fprintf (FILE, "\t.long ."); \ RS6000_OUTPUT_BASENAME (FILE, NAME); \ ! fprintf (FILE, ", TOC[tc0], 0\n"); \ fprintf (FILE, "\t.csect [PR]\n."); \ RS6000_OUTPUT_BASENAME (FILE, NAME); \ fprintf (FILE, ":\n"); \ } --- 1434,1454 ---- fprintf (FILE, "\t.long ."); \ RS6000_OUTPUT_BASENAME (FILE, NAME); \ ! fprintf (FILE, ", TOC[tc0], 0\n"); \ fprintf (FILE, "\t.csect [PR]\n."); \ RS6000_OUTPUT_BASENAME (FILE, NAME); \ fprintf (FILE, ":\n"); \ + if (write_symbols == XCOFF_DEBUG) \ + { \ + dbxout_symbol (DECL, 0); \ + fprintf (FILE, "\t.function ."); \ + RS6000_OUTPUT_BASENAME (FILE, NAME); \ + fprintf (FILE, ",."); \ + RS6000_OUTPUT_BASENAME (FILE, NAME); \ + fprintf (FILE, ",16,044,L..end_"); \ + RS6000_OUTPUT_BASENAME (FILE, NAME); \ + fprintf (FILE, "-."); \ + RS6000_OUTPUT_BASENAME (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } \ } *************** *** 1567,1575 **** /* Output before instructions. */ ! #define TEXT_SECTION_ASM_OP "\t.csect [PR]" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP "\t.csect .data[RW]" /* How to refer to registers in assembler output. --- 1585,1593 ---- /* Output before instructions. */ ! #define TEXT_SECTION_ASM_OP ".csect [PR]" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP ".csect .data[RW]" /* How to refer to registers in assembler output. *************** *** 1733,1737 **** #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ ! do { fputs (".comm ", (FILE)); \ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ fprintf ((FILE), ",%d\n", (SIZE)); } while (0) --- 1751,1756 ---- #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ ! do { bss_section (); \ ! fputs (".comm ", (FILE)); \ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ fprintf ((FILE), ",%d\n", (SIZE)); } while (0) *************** *** 1741,1747 **** #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE,ROUNDED) \ ! do { fputs (".lcomm ", (FILE)); \ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ ! fprintf ((FILE), ",%d,%s\n", (SIZE), rs6000_bss_section_name); \ } while (0) --- 1760,1767 ---- #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE,ROUNDED) \ ! do { bss_section (); \ ! fputs (".lcomm ", (FILE)); \ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ ! fprintf ((FILE), ",%d,%s\n", (SIZE), xcoff_bss_section_name); \ } while (0) diff -rc2N gcc-2.0/config/rs6000.md gcc-2.1/config/rs6000.md *** gcc-2.0/config/rs6000.md Wed Jan 29 21:56:27 1992 --- gcc-2.1/config/rs6000.md Sat Mar 14 00:16:40 1992 *************** *** 23,27 **** ;; Define an insn type attribute. This is used in function unit delay ;; computations. ! (define_attr "type" "load,integer,fp,compare,delayed_compare,fpcompare" (const_string "integer")) --- 23,27 ---- ;; Define an insn type attribute. This is used in function unit delay ;; computations. ! (define_attr "type" "load,integer,fp,compare,delayed_compare,fpcompare,mtlr" (const_string "integer")) *************** *** 41,44 **** --- 41,47 ---- ;; Floating-point comparisons take eight cycles. (define_function_unit "compare" 1 0 (eq_attr "type" "fpcompare") 8 0) + + ;; Branches on LR cannot be done until five cycles after LR is set. + (define_function_unit "branch" 1 0 (eq_attr "type" "mtlr") 5 0) ;; Start with fixed-point load and store insns. Here we put only the more *************** *** 266,271 **** DONE; } - else - operands[2] = force_reg (SImode, operands[2]); }") --- 269,272 ---- *************** *** 329,333 **** [(set (match_operand:SI 0 "gen_reg_operand" "=r") (if_then_else:SI (gt (match_operand:SI 1 "gen_reg_operand" "r") ! (match_operand:SI 2 "reg_or_short_operand" "r")) (const_int 0) (minus:SI (match_dup 2) (match_dup 1))))] --- 330,334 ---- [(set (match_operand:SI 0 "gen_reg_operand" "=r") (if_then_else:SI (gt (match_operand:SI 1 "gen_reg_operand" "r") ! (match_operand:SI 2 "reg_or_short_operand" "rI")) (const_int 0) (minus:SI (match_dup 2) (match_dup 1))))] *************** *** 339,343 **** (compare:CC (if_then_else:SI (gt (match_operand:SI 1 "gen_reg_operand" "r") ! (match_operand:SI 2 "reg_or_short_operand" "r")) (const_int 0) (minus:SI (match_dup 2) (match_dup 1))) --- 340,344 ---- (compare:CC (if_then_else:SI (gt (match_operand:SI 1 "gen_reg_operand" "r") ! (match_operand:SI 2 "reg_or_short_operand" "rI")) (const_int 0) (minus:SI (match_dup 2) (match_dup 1))) *************** *** 352,356 **** (compare:CC (if_then_else:SI (gt (match_operand:SI 1 "gen_reg_operand" "r") ! (match_operand:SI 2 "reg_or_short_operand" "r")) (const_int 0) (minus:SI (match_dup 2) (match_dup 1))) --- 353,357 ---- (compare:CC (if_then_else:SI (gt (match_operand:SI 1 "gen_reg_operand" "r") ! (match_operand:SI 2 "reg_or_short_operand" "rI")) (const_int 0) (minus:SI (match_dup 2) (match_dup 1))) *************** *** 1278,1281 **** --- 1279,1284 ---- [(set_attr "type" "delayed_compare")]) + ;; The RS/6000 assembler mis-handles "sri x,x,0", so write that case as + ;; "sli x,x,0". (define_insn "lshrsi3" [(set (match_operand:SI 0 "gen_reg_operand" "=r,r") *************** *** 1286,1290 **** "@ sre %0,%1,%2 ! sri %0,%1,%h2") (define_insn "" --- 1289,1293 ---- "@ sre %0,%1,%2 ! s%A2i %0,%1,%h2") (define_insn "" *************** *** 1298,1302 **** "@ sre. %3,%1,%2 ! sri. %3,%1,%h2" [(set_attr "type" "delayed_compare")]) --- 1301,1305 ---- "@ sre. %3,%1,%2 ! s%A2i. %3,%1,%h2" [(set_attr "type" "delayed_compare")]) *************** *** 1312,1316 **** "@ sre. %0,%1,%2 ! sri. %0,%1,%h2" [(set_attr "type" "delayed_compare")]) --- 1315,1319 ---- "@ sre. %0,%1,%2 ! s%A2i. %0,%1,%h2" [(set_attr "type" "delayed_compare")]) *************** *** 1937,1944 **** sl%I2q %L0,%L1,%h2\;sll%I2q %0,%1,%h2 sl%I2q %L0,%L1,%h2\;sll%I2q %0,%1,%h2 ! sl%I2q %L0,%L1,%h2\;sll%I2q %0,%1,%h2 ") (define_insn "lshrdi3" ! [(set (match_operand:DI 0 "gen_reg_operand" "=r,r,r,&r") (lshiftrt:DI (match_operand:DI 1 "gen_reg_operand" "r,r,0,r") (match_operand:SI 2 "reg_or_cint_operand" "M,i,r,r"))) --- 1940,1947 ---- sl%I2q %L0,%L1,%h2\;sll%I2q %0,%1,%h2 sl%I2q %L0,%L1,%h2\;sll%I2q %0,%1,%h2 ! sl%I2q %L0,%L1,%h2\;sll%I2q %0,%1,%h2") (define_insn "lshrdi3" ! [(set (match_operand:DI 0 "gen_reg_operand" "=&r,r,r,&r") (lshiftrt:DI (match_operand:DI 1 "gen_reg_operand" "r,r,0,r") (match_operand:SI 2 "reg_or_cint_operand" "M,i,r,r"))) *************** *** 1946,1953 **** "" "@ ! cal %0,0(0)\;sri %L0,%1,%h2 ! sr%I2q %L0,%L1,%2\;srl%I2q %0,%1,%2 ! sr%I2q %L0,%L1,%2\;srl%I2q %0,%1,%2 ! sr%I2q %L0,%L1,%2\;srl%I2q %0,%1,%2 ") ;; Shift by a variable amount is too complex to be worth open-coding. We --- 1949,1956 ---- "" "@ ! cal %0,0(0)\;s%A2i %L0,%1,%h2 ! s%A2%I2q %L0,%L1,%2\;srl%I2q %0,%1,%2 ! s%A2%I2q %L0,%L1,%2\;srl%I2q %0,%1,%2 ! s%A2%I2q %L0,%L1,%2\;srl%I2q %0,%1,%2") ;; Shift by a variable amount is too complex to be worth open-coding. We *************** *** 2008,2013 **** (define_insn "" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,m,r,r,r,*h") ! (match_operand:SI 1 "input_operand" "r,m,r,I,J,*h,r"))] "gen_reg_operand (operands[0], SImode) || gen_reg_operand (operands[1], SImode)" --- 2011,2016 ---- (define_insn "" ! [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,m,r,r,r,*c*q,*l") ! (match_operand:SI 1 "input_operand" "r,m,r,I,J,*h,r,r"))] "gen_reg_operand (operands[0], SImode) || gen_reg_operand (operands[1], SImode)" *************** *** 2019,2024 **** cau %0,0,%u1 mf%1 %0 mt%0 %1" ! [(set_attr "type" "*,load,*,*,*,*,*")]) (define_insn "" --- 2022,2028 ---- cau %0,0,%u1 mf%1 %0 + mt%0 %1 mt%0 %1" ! [(set_attr "type" "*,load,*,*,*,*,*,mtlr")]) (define_insn "" *************** *** 2774,2778 **** ;; ;; First, an insn to allocate new stack space for dynamic use (e.g., alloca). ! ;; We move the back-chain and decremement the stack pointer. This is slightly ;; less efficient than it needs to be for long constants, but that case ;; should be rare. --- 2778,2782 ---- ;; ;; First, an insn to allocate new stack space for dynamic use (e.g., alloca). ! ;; We move the back-chain and decrement the stack pointer. This is slightly ;; less efficient than it needs to be for long constants, but that case ;; should be rare. diff -rc2N gcc-2.0/config/seq386.h gcc-2.1/config/seq386.h *** gcc-2.0/config/seq386.h Thu Feb 13 18:08:54 1992 --- gcc-2.1/config/seq386.h Sat Mar 14 00:16:41 1992 *************** *** 89,93 **** fprintf (FILE, "\tmovl $LP%d,%%eax\n\tcall mcount\n", (LABELNO)); ! /* Assember pseudo-op for shared data segment. */ #define SHARED_SECTION_ASM_OP ".shdata" --- 89,93 ---- fprintf (FILE, "\tmovl $LP%d,%%eax\n\tcall mcount\n", (LABELNO)); ! /* Assembler pseudo-op for shared data segment. */ #define SHARED_SECTION_ASM_OP ".shdata" diff -rc2N gcc-2.0/config/seq386gas.h gcc-2.1/config/seq386gas.h *** gcc-2.0/config/seq386gas.h --- gcc-2.1/config/seq386gas.h Mon Mar 2 02:55:53 1992 *************** *** 0 **** --- 1,27 ---- + /* Definitions for Sequent Intel 386 using GAS. + Copyright (C) 1992 Free Software Foundation, Inc. + + /* Mostly it's like a Sequent 386 without GAS. */ + + #include "seq386.h" + + /* A C statement or statements which output an assembler instruction + opcode to the stdio stream STREAM. The macro-operand PTR is a + variable of type `char *' which points to the opcode name in its + "internal" form--the form that is written in the machine description. + + GAS version 1.38.1 doesn't understand the `repz' opcode mnemonic. + So use `repe' instead. */ + + #undef ASM_OUTPUT_OPCODE + #define ASM_OUTPUT_OPCODE(STREAM, PTR) \ + { \ + if ((PTR)[0] == 'r' \ + && (PTR)[1] == 'e' \ + && (PTR)[2] == 'p' \ + && (PTR)[3] == 'z') \ + { \ + fprintf (STREAM, "repe"); \ + (PTR) += 4; \ + } \ + } diff -rc2N gcc-2.0/config/sequent.h gcc-2.1/config/sequent.h *** gcc-2.0/config/sequent.h Sun Dec 1 00:07:43 1991 --- gcc-2.1/config/sequent.h Sat Mar 14 00:16:42 1992 *************** *** 19,26 **** the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - /* Two flags to control how addresses are printed in assembler insns. */ - #define SEQUENT_ADDRESS_BUG 1 - #define SEQUENT_BASE_REGS - #include "ns32k.h" --- 19,22 ---- *************** *** 34,38 **** #define DBX_CONTIN_LENGTH 0 ! #define TARGET_DEFAULT 9 /* 32332 with 32081 (guessing) */ /* Print subsidiary information on the compiler version in use. */ --- 30,34 ---- #define DBX_CONTIN_LENGTH 0 ! #define TARGET_DEFAULT 9 /* 32332 with 32081 (guessing). */ /* Print subsidiary information on the compiler version in use. */ *************** *** 52,56 **** #undef ASM_OUTPUT_ALIGN_CODE ! /* Assember pseudo-op for shared data segment. */ #define SHARED_SECTION_ASM_OP ".shdata" --- 48,52 ---- #undef ASM_OUTPUT_ALIGN_CODE ! /* Assembler pseudo-op for shared data segment. */ #define SHARED_SECTION_ASM_OP ".shdata" *************** *** 58,114 **** #define SEQUENT_ADJUST_STACK ! /* %$ means print the prefix for an immediate operand. ! On the sequent, no prefix is used for such. */ ! #undef PRINT_OPERAND ! #define PRINT_OPERAND(FILE, X, CODE) \ ! { if (CODE == '$') ; \ ! else if (CODE == '?'); \ ! else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ ! else if (GET_CODE (X) == MEM) \ ! { \ ! rtx xfoo; \ ! xfoo = XEXP (X, 0); \ ! switch (GET_CODE (xfoo)) \ ! { \ ! case MEM: \ ! if (GET_CODE (XEXP (xfoo, 0)) == REG) \ ! if (REGNO (XEXP (xfoo, 0)) == STACK_POINTER_REGNUM) \ ! fprintf (FILE, "0(0(sp))"); \ ! else fprintf (FILE, "0(0(%s))", \ ! reg_names[REGNO (XEXP (xfoo, 0))]); \ ! else \ ! { \ ! fprintf (FILE, "0("); \ ! output_address (xfoo); \ ! putc (')', FILE); \ ! } \ ! break; \ ! case REG: \ ! fprintf (FILE, "0(%s)", reg_names[REGNO (xfoo)]); \ ! break; \ ! case PRE_DEC: \ ! case POST_INC: \ ! fprintf (FILE, "tos"); \ ! break; \ ! case CONST_INT: \ ! fprintf (FILE, "@%d", INTVAL (xfoo)); \ ! break; \ ! default: \ ! output_address (xfoo); \ ! break; \ ! } \ ! } \ ! else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != DImode) \ ! if (GET_MODE (X) == DFmode) \ ! { union { double d; int i[2]; } u; \ ! u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ ! fprintf (FILE, "0d%.20e", u.d); } \ ! else { union { double d; int i[2]; } u; \ ! u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ ! fprintf (FILE, "0f%.20e", u.d); } \ ! else output_addr_const (FILE, X); } ! #undef PRINT_OPERAND_ADDRESS ! #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE, ADDR) --- 54,60 ---- #define SEQUENT_ADJUST_STACK ! #define NO_ABSOLUTE_PREFIX_IF_SYMBOLIC ! #define IMMEDIATE_PREFIX 0 ! #define SEQUENT_ASM diff -rc2N gcc-2.0/config/sparc.c gcc-2.1/config/sparc.c *** gcc-2.0/config/sparc.c Wed Jan 15 17:10:49 1992 --- gcc-2.1/config/sparc.c Sat Mar 21 21:54:46 1992 *************** *** 407,421 **** } - /* Return truth value of whether OP can be used as an operand in a two - address arithmetic insn (such as set 123456,%o4) of mode MODE. */ - - int - arith32_operand (op, mode) - rtx op; - enum machine_mode mode; - { - return (register_operand (op, mode) || GET_CODE (op) == CONST_INT); - } - /* Return truth value of whether OP is a register or a CONST_DOUBLE. */ --- 407,410 ---- *************** *** 621,625 **** if (reg == 0) { ! if (reload_in_progress) abort (); else --- 610,614 ---- if (reg == 0) { ! if (reload_in_progress || reload_completed) abort (); else *************** *** 632,641 **** in the address, so that these instructions can be optimized properly. */ ! rtx temp_reg = (reload_in_progress ? reg : gen_reg_rtx (Pmode)); emit_insn (gen_rtx (SET, VOIDmode, temp_reg, ! gen_rtx (HIGH, Pmode, orig))); emit_insn (gen_rtx (SET, VOIDmode, temp_reg, ! gen_rtx (LO_SUM, Pmode, temp_reg, orig))); address = temp_reg; } --- 621,641 ---- in the address, so that these instructions can be optimized properly. */ ! rtx temp_reg = ((reload_in_progress || reload_completed) ! ? reg : gen_reg_rtx (Pmode)); + /* Must put the SYMBOL_REF inside an UNSPEC here so that cse + won't get confused into thinking that these two instructions + are loading in the true address of the symbol. If in the + future a PIC rtx exists, that should be used instead. */ emit_insn (gen_rtx (SET, VOIDmode, temp_reg, ! gen_rtx (HIGH, Pmode, ! gen_rtx (UNSPEC, Pmode, ! gen_rtvec (1, orig), ! 0)))); emit_insn (gen_rtx (SET, VOIDmode, temp_reg, ! gen_rtx (LO_SUM, Pmode, temp_reg, ! gen_rtx (UNSPEC, Pmode, ! gen_rtvec (1, orig), ! 0)))); address = temp_reg; } *************** *** 665,669 **** if (reg == 0) { ! if (reload_in_progress) abort (); else --- 665,669 ---- if (reg == 0) { ! if (reload_in_progress || reload_completed) abort (); else *************** *** 685,689 **** if (SMALL_INT (offset)) return plus_constant_for_output (base, INTVAL (offset)); ! else if (! reload_in_progress) offset = force_reg (Pmode, offset); /* We can't create any new registers during reload, so use the --- 685,689 ---- if (SMALL_INT (offset)) return plus_constant_for_output (base, INTVAL (offset)); ! else if (! reload_in_progress && ! reload_completed) offset = force_reg (Pmode, offset); /* We can't create any new registers during reload, so use the *************** *** 1060,1073 **** /* Now see if we can trust the address to be 8-byte aligned. */ ! /* Trust global variables. */ ! if (GET_CODE (op2) == LO_SUM) { - operands[0] = op1; - operands[1] = op2; - if (final_sequence) abort (); ! return "ldd %1,%0"; } --- 1060,1070 ---- /* Now see if we can trust the address to be 8-byte aligned. */ ! /* Trust double-precision floats in global variables. */ ! if (GET_CODE (XEXP (op2, 0)) == LO_SUM && GET_MODE (op2) == DFmode) { if (final_sequence) abort (); ! return (op1 == operands[0] ? "ldd %1,%0" : "std %1,%0"); } *************** *** 1103,1107 **** && (CONSTANT_P (XEXP (operands[1], 0)) /* Let user ask for it anyway. */ ! || TARGET_ALIGN)) return "ldd %1,%0"; else if (GET_CODE (operands[0]) == MEM --- 1100,1104 ---- && (CONSTANT_P (XEXP (operands[1], 0)) /* Let user ask for it anyway. */ ! || TARGET_HOPE_ALIGN)) return "ldd %1,%0"; else if (GET_CODE (operands[0]) == MEM *************** *** 1108,1112 **** && GET_MODE (operands[0]) == DFmode && (CONSTANT_P (XEXP (operands[0], 0)) ! || TARGET_ALIGN)) return "std %1,%0"; } --- 1105,1109 ---- && GET_MODE (operands[0]) == DFmode && (CONSTANT_P (XEXP (operands[0], 0)) ! || TARGET_HOPE_ALIGN)) return "std %1,%0"; } *************** *** 1184,1188 **** /* Use ldd if known to be aligned. */ ! if (TARGET_ALIGN || (GET_CODE (addr) == PLUS && (((XEXP (addr, 0) == frame_pointer_rtx --- 1181,1185 ---- /* Use ldd if known to be aligned. */ ! if (TARGET_HOPE_ALIGN || (GET_CODE (addr) == PLUS && (((XEXP (addr, 0) == frame_pointer_rtx *************** *** 1216,1220 **** /* Use std if we can be sure it is well-aligned. */ ! if (TARGET_ALIGN || (GET_CODE (addr) == PLUS && (((XEXP (addr, 0) == frame_pointer_rtx --- 1213,1217 ---- /* Use std if we can be sure it is well-aligned. */ ! if (TARGET_HOPE_ALIGN || (GET_CODE (addr) == PLUS && (((XEXP (addr, 0) == frame_pointer_rtx *************** *** 1434,1443 **** xoperands[2] = temp1; ! /* We can't move more than this many bytes at a time ! because we have only one register to move them through. */ ! if (align > GET_MODE_SIZE (GET_MODE (temp1))) { ! align = GET_MODE_SIZE (GET_MODE (temp1)); ! alignrtx = gen_rtx (CONST_INT, VOIDmode, GET_MODE_SIZE (GET_MODE (temp1))); } --- 1431,1505 ---- xoperands[2] = temp1; ! /* We can't move more than this many bytes at a time because we have only ! one register, %g1, to move them through. */ ! if (align > UNITS_PER_WORD) ! { ! align = UNITS_PER_WORD; ! alignrtx = gen_rtx (CONST_INT, VOIDmode, UNITS_PER_WORD); ! } ! ! /* We consider 8 ld/st pairs, for a total of 16 inline insns to be ! reasonable here. (Actually will emit a maximum of 18 inline insns for ! the case of size == 31 and align == 4). */ ! ! if (GET_CODE (sizertx) == CONST_INT && (INTVAL (sizertx) / align) <= 8 ! && memory_address_p (QImode, plus_constant_for_output (xoperands[0], ! INTVAL (sizertx))) ! && memory_address_p (QImode, plus_constant_for_output (xoperands[1], ! INTVAL (sizertx)))) { ! int size = INTVAL (sizertx); ! int offset = 0; ! ! /* We will store different integers into this particular RTX. */ ! xoperands[2] = rtx_alloc (CONST_INT); ! PUT_MODE (xoperands[2], VOIDmode); ! ! /* This case is currently not handled. Abort instead of generating ! bad code. */ ! if (align > 4) ! abort (); ! ! if (align >= 4) ! { ! for (i = (size >> 2) - 1; i >= 0; i--) ! { ! INTVAL (xoperands[2]) = (i << 2) + offset; ! output_asm_insn ("ld [%a1+%2],%%g1\n\tst %%g1,[%a0+%2]", ! xoperands); ! } ! offset += (size & ~0x3); ! size = size & 0x3; ! if (size == 0) ! return ""; ! } ! ! if (align >= 2) ! { ! for (i = (size >> 1) - 1; i >= 0; i--) ! { ! INTVAL (xoperands[2]) = (i << 1) + offset; ! output_asm_insn ("lduh [%a1+%2],%%g1\n\tsth %%g1,[%a0+%2]", ! xoperands); ! } ! offset += (size & ~0x1); ! size = size & 0x1; ! if (size == 0) ! return ""; ! } ! ! if (align >= 1) ! { ! for (i = size - 1; i >= 0; i--) ! { ! INTVAL (xoperands[2]) = i + offset; ! output_asm_insn ("ldub [%a1+%2],%%g1\n\tstb %%g1,[%a0+%2]", ! xoperands); ! } ! return ""; ! } ! ! /* We should never reach here. */ ! abort (); } *************** *** 1458,1534 **** alignrtx = gen_rtx (CONST_INT, VOIDmode, align); - /* Recognize special cases of block moves. These occur - when GNU C++ is forced to treat something as BLKmode - to keep it in memory, when its mode could be represented - with something smaller. - - We cannot do this for global variables, since we don't know - what pages they don't cross. Sigh. */ - if (GET_CODE (sizertx) == CONST_INT && INTVAL (sizertx) <= 16) - { - int size = INTVAL (sizertx); - - if (align == 1) - { - if (memory_address_p (QImode, - plus_constant_for_output (xoperands[0], size)) - && memory_address_p (QImode, - plus_constant_for_output (xoperands[1], - size))) - { - /* We will store different integers into this particular RTX. */ - xoperands[2] = rtx_alloc (CONST_INT); - PUT_MODE (xoperands[2], VOIDmode); - for (i = size-1; i >= 0; i--) - { - INTVAL (xoperands[2]) = i; - output_asm_insn ("ldub [%a1+%2],%%g1\n\tstb %%g1,[%a0+%2]", - xoperands); - } - return ""; - } - } - else if (align == 2) - { - if (memory_address_p (HImode, - plus_constant_for_output (xoperands[0], size)) - && memory_address_p (HImode, - plus_constant_for_output (xoperands[1], - size))) - { - /* We will store different integers into this particular RTX. */ - xoperands[2] = rtx_alloc (CONST_INT); - PUT_MODE (xoperands[2], VOIDmode); - for (i = (size>>1)-1; i >= 0; i--) - { - INTVAL (xoperands[2]) = i<<1; - output_asm_insn ("lduh [%a1+%2],%%g1\n\tsth %%g1,[%a0+%2]", - xoperands); - } - return ""; - } - } - else - { - if (memory_address_p (SImode, - plus_constant_for_output (xoperands[0], size)) - && memory_address_p (SImode, - plus_constant_for_output (xoperands[1], - size))) - { - /* We will store different integers into this particular RTX. */ - xoperands[2] = rtx_alloc (CONST_INT); - PUT_MODE (xoperands[2], VOIDmode); - for (i = (size>>2)-1; i >= 0; i--) - { - INTVAL (xoperands[2]) = i<<2; - output_asm_insn ("ld [%a1+%2],%%g1\n\tst %%g1,[%a0+%2]", - xoperands); - } - return ""; - } - } - } - xoperands[3] = gen_rtx (CONST_INT, VOIDmode, movstrsi_label++); xoperands[4] = gen_rtx (CONST_INT, VOIDmode, align); --- 1520,1523 ---- *************** *** 1535,1542 **** xoperands[5] = gen_rtx (CONST_INT, VOIDmode, movstrsi_label++); ! /* This is the size of the transfer. ! Either use the register which already contains the size, ! or use a free register (used by no operands). ! Also emit code to decrement the size value by ALIGN. */ output_size_for_block_move (sizertx, temp1, alignrtx); --- 1524,1529 ---- xoperands[5] = gen_rtx (CONST_INT, VOIDmode, movstrsi_label++); ! /* This is the size of the transfer. Emit code to decrement the size ! value by ALIGN, and store the result in the temp1 register. */ output_size_for_block_move (sizertx, temp1, alignrtx); *************** *** 1548,1552 **** The SUN assembler complains about labels in branch delay slots, so we ! do this before outputing the load address, so that there will always be a harmless insn between the branch here and the next label emitted below. */ --- 1535,1539 ---- The SUN assembler complains about labels in branch delay slots, so we ! do this before outputting the load address, so that there will always be a harmless insn between the branch here and the next label emitted below. */ *************** *** 2048,2052 **** static char labelno[] = " %lX"; ! /* ??? FP branches can not be preceeded by another floating point insn. Because there is currently no concept of pre-delay slots, we can fix this only by always emitting a nop before a floating point branch. */ --- 2035,2039 ---- static char labelno[] = " %lX"; ! /* ??? FP branches can not be preceded by another floating point insn. Because there is currently no concept of pre-delay slots, we can fix this only by always emitting a nop before a floating point branch. */ *************** *** 2284,2303 **** gen_rtx (CONST_INT, VOIDmode, 4 * arcno))); register rtx profiler_reg = gen_reg_rtx (SImode); ! register rtx temp = gen_reg_rtx (Pmode); ! register rtx profiler_target = gen_rtx (MEM, SImode, ! gen_rtx (LO_SUM, Pmode, temp, ! profiler_target_addr)); ! /* The insns are emitted from last to first after the insn insert_after. ! Emit_insn_after is used because sometimes we want to put the ! instrumentation code after the last insn of the function. */ ! emit_insn_after (gen_rtx (SET, VOIDmode, profiler_target, profiler_reg), ! insert_after); ! emit_insn_after (gen_rtx (SET, VOIDmode, profiler_reg, ! gen_rtx (PLUS, SImode, profiler_reg, const1_rtx)), ! insert_after); ! emit_insn_after (gen_rtx (SET, VOIDmode, profiler_reg, profiler_target), ! insert_after); ! emit_insn_after (gen_rtx (SET, VOIDmode, temp, ! gen_rtx (HIGH, Pmode, profiler_target_addr)), insert_after); } --- 2271,2297 ---- gen_rtx (CONST_INT, VOIDmode, 4 * arcno))); register rtx profiler_reg = gen_reg_rtx (SImode); ! register rtx address_reg = gen_reg_rtx (Pmode); ! rtx mem_ref; ! ! insert_after = emit_insn_after (gen_rtx (SET, VOIDmode, address_reg, ! gen_rtx (HIGH, Pmode, ! profiler_target_addr)), ! insert_after); ! ! mem_ref = gen_rtx (MEM, SImode, gen_rtx (LO_SUM, Pmode, address_reg, ! profiler_target_addr)); ! insert_after = emit_insn_after (gen_rtx (SET, VOIDmode, profiler_reg, ! mem_ref), ! insert_after); ! ! insert_after = emit_insn_after (gen_rtx (SET, VOIDmode, profiler_reg, ! gen_rtx (PLUS, SImode, profiler_reg, ! const1_rtx)), ! insert_after); ! ! /* This is the same rtx as above, but it is not legal to share this rtx. */ ! mem_ref = gen_rtx (MEM, SImode, gen_rtx (LO_SUM, Pmode, address_reg, ! profiler_target_addr)); ! emit_insn_after (gen_rtx (SET, VOIDmode, mem_ref, profiler_reg), insert_after); } diff -rc2N gcc-2.0/config/sparc.h gcc-2.1/config/sparc.h *** gcc-2.0/config/sparc.h Mon Feb 3 22:42:12 1992 --- gcc-2.1/config/sparc.h Sun Mar 22 13:57:22 1992 *************** *** 24,30 **** #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} %{g:-lg}" ! /* Provide required defaults for linker -e and -d switches. ! Also, it is hard to debug with shared libraries, ! so don't use them if going to debug. */ #define LINK_SPEC "%{!e*:-e start} -dc -dp %{static:-Bstatic} %{assert*}" --- 24,28 ---- #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p} %{g:-lg}" ! /* Provide required defaults for linker -e and -d switches. */ #define LINK_SPEC "%{!e*:-e start} -dc -dp %{static:-Bstatic} %{assert*}" *************** *** 34,41 **** #define ASM_SPEC " %{pipe:-} %{fpic:-k} %{fPIC:-k}" ! /* Prevent error on `-dalign', `-sun4' and `-target sun4' options. */ ! /* Also, make it easy to specify interesting optimization options. */ ! #define CC1_SPEC "%{dalign:-malign} %{sun4:} %{target:}" #define PTRDIFF_TYPE "int" --- 32,40 ---- #define ASM_SPEC " %{pipe:-} %{fpic:-k} %{fPIC:-k}" ! /* Prevent error on `-sun4' and `-target sun4' options. */ ! /* This used to translate -dalign to -malign, but that is no good ! because it can't turn off the usual meaning of making debugging dumps. */ ! #define CC1_SPEC "%{sun4:} %{target:}" #define PTRDIFF_TYPE "int" *************** *** 44,48 **** #define WCHAR_TYPE_SIZE 16 ! /* Omit frame pointer and enable caller-saves at high optimization levels. */ #define OPTIMIZATION_OPTIONS(OPTIMIZE) \ --- 43,47 ---- #define WCHAR_TYPE_SIZE 16 ! /* Omit frame pointer at high optimization levels. */ #define OPTIMIZATION_OPTIONS(OPTIMIZE) \ *************** *** 51,55 **** { \ flag_omit_frame_pointer = 1; \ - flag_caller_saves = 1; \ } \ } --- 50,53 ---- *************** *** 60,64 **** (!strcmp (STR, "Tdata") || !strcmp (STR, "include") \ || !strcmp (STR, "imacros") || !strcmp (STR, "target") \ ! || !strcmp (STR, "assert")) /* Names to predefine in the preprocessor for this target machine. */ --- 58,62 ---- (!strcmp (STR, "Tdata") || !strcmp (STR, "include") \ || !strcmp (STR, "imacros") || !strcmp (STR, "target") \ ! || !strcmp (STR, "assert") || !strcmp (STR, "aux-info")) /* Names to predefine in the preprocessor for this target machine. */ *************** *** 89,96 **** #define TARGET_TAIL_CALL (target_flags & 8) ! /* Nonzero means that references to doublewords are guaranteed ! aligned...if not, its a bug in the users program! */ ! #define TARGET_ALIGN (target_flags & 16) /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, --- 87,98 ---- #define TARGET_TAIL_CALL (target_flags & 8) ! /* Nonzero means that reference doublewords as if they were guaranteed ! to be aligned...if they aren't, too bad for the user! ! Like -fast in Sun cc. */ ! #define TARGET_HOPE_ALIGN (target_flags & 16) + /* Nonzero means that make sure all doubles are on 8-byte boundaries. */ + #define TARGET_FORCE_ALIGN (target_flags & 32) + /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, *************** *** 105,110 **** {"no-epilogue", -2}, \ {"tail-call", 8}, \ ! {"align", 16}, \ ! { "", TARGET_DEFAULT}} #define TARGET_DEFAULT 3 --- 107,113 ---- {"no-epilogue", -2}, \ {"tail-call", 8}, \ ! {"hope-align", 16}, \ ! {"force-align", 48}, \ ! { "", TARGET_DEFAULT}} #define TARGET_DEFAULT 3 *************** *** 126,130 **** #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 129,133 ---- #define WORDS_BIG_ENDIAN 1 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 175,181 **** && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT /* Things that must be doubleword aligned cannot go in the text section, --- 178,184 ---- && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 1 /* Things that must be doubleword aligned cannot go in the text section, *************** *** 426,432 **** normally. */ #define REG_ALLOC_ORDER \ ! { 8, 9, 10, 11, 12, 13, 2, 15, \ ! 16, 17, 18, 19, 20, 21, 22, 23, \ ! 24, 25, 26, 27, 28, 29, 3, 31, \ 32, 33, 34, 35, 36, 37, 38, 39, \ 40, 41, 42, 43, 44, 45, 46, 47, \ --- 429,435 ---- normally. */ #define REG_ALLOC_ORDER \ ! { 8, 9, 10, 11, 12, 13, 2, 3, \ ! 15, 16, 17, 18, 19, 20, 21, 22, \ ! 23, 24, 25, 26, 27, 28, 29, 31, \ 32, 33, 34, 35, 36, 37, 38, 39, \ 40, 41, 42, 43, 44, 45, 46, 47, \ *************** *** 575,579 **** /* Keep the stack pointer constant throughout the function. ! This is both an optimization and a neccessity: longjmp doesn't behave itself when the stack pointer moves within the function! */ --- 578,582 ---- /* Keep the stack pointer constant throughout the function. ! This is both an optimization and a necessity: longjmp doesn't behave itself when the stack pointer moves within the function! */ *************** *** 643,647 **** #define ROUND_ADVANCE(SIZE) \ ! ((SIZE + UNITS_PER_WORD - 1)/UNITS_PER_WORD) /* Initialize a variable CUM of type CUMULATIVE_ARGS --- 646,657 ---- #define ROUND_ADVANCE(SIZE) \ ! ((SIZE + UNITS_PER_WORD - 1) / UNITS_PER_WORD) ! ! /* Round a register number up to a proper boundary for an arg of mode MODE. ! Note that we need an odd/even pair for a two-word arg, ! since that will become 8-byte aligned when stored in memory. */ ! #define ROUND_REG(X, MODE) \ ! (TARGET_FORCE_ALIGN && GET_MODE_UNIT_SIZE ((MODE)) > 4 \ ! ? ((X) + ! ((X) & 1)) : (X)) /* Initialize a variable CUM of type CUMULATIVE_ARGS *************** *** 659,665 **** #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ! ((CUM) += ((MODE) != BLKmode \ ! ? ROUND_ADVANCE (GET_MODE_SIZE (MODE)) \ ! : ROUND_ADVANCE (int_size_in_bytes (TYPE)))) /* Determine where to put an argument to a function. --- 669,676 ---- #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ! ((CUM) = (ROUND_REG ((CUM), (MODE)) \ ! + ((MODE) != BLKmode \ ! ? ROUND_ADVANCE (GET_MODE_SIZE (MODE)) \ ! : ROUND_ADVANCE (int_size_in_bytes (TYPE))))) /* Determine where to put an argument to a function. *************** *** 681,688 **** #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ! ((CUM) < NPARM_REGS \ && ((TYPE)==0 || ! TREE_ADDRESSABLE ((tree)(TYPE))) \ ! && ((TYPE)==0 || (MODE) != BLKmode || (TYPE_ALIGN ((TYPE)) % PARM_BOUNDARY == 0)) \ ! ? gen_rtx (REG, (MODE), BASE_PASSING_ARG_REG (MODE) + (CUM)) : 0) /* Define where a function finds its arguments. --- 692,702 ---- #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ! (ROUND_REG ((CUM), (MODE)) < NPARM_REGS \ && ((TYPE)==0 || ! TREE_ADDRESSABLE ((tree)(TYPE))) \ ! && ((TYPE)==0 || (MODE) != BLKmode \ ! || (TYPE_ALIGN ((TYPE)) % PARM_BOUNDARY == 0)) \ ! ? gen_rtx (REG, (MODE), \ ! (BASE_PASSING_ARG_REG (MODE) + ROUND_REG ((CUM), (MODE)))) \ ! : 0) /* Define where a function finds its arguments. *************** *** 690,697 **** #define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \ ! ((CUM) < NPARM_REGS \ && ((TYPE)==0 || ! TREE_ADDRESSABLE ((tree)(TYPE))) \ ! && ((MODE) != BLKmode || (TYPE_ALIGN ((TYPE)) % PARM_BOUNDARY == 0)) \ ! ? gen_rtx (REG, (MODE), BASE_INCOMING_ARG_REG (MODE) + (CUM)) : 0) /* For an arg passed partly in registers and partly in memory, --- 704,714 ---- #define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \ ! (ROUND_REG ((CUM), (MODE)) < NPARM_REGS \ && ((TYPE)==0 || ! TREE_ADDRESSABLE ((tree)(TYPE))) \ ! && ((TYPE)==0 || (MODE) != BLKmode \ ! || (TYPE_ALIGN ((TYPE)) % PARM_BOUNDARY == 0)) \ ! ? gen_rtx (REG, (MODE), \ ! (BASE_INCOMING_ARG_REG (MODE) + ROUND_REG ((CUM), (MODE)))) \ ! : 0) /* For an arg passed partly in registers and partly in memory, *************** *** 702,713 **** #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ ! (((CUM) < NPARM_REGS \ && ((TYPE)==0 || ! TREE_ADDRESSABLE ((tree)(TYPE))) \ ! && ((TYPE)==0 || (MODE) != BLKmode || (TYPE_ALIGN ((TYPE)) % PARM_BOUNDARY == 0))\ ! && ((CUM) \ + ((MODE) == BLKmode \ ? ROUND_ADVANCE (int_size_in_bytes (TYPE)) \ ! : ROUND_ADVANCE (GET_MODE_SIZE (MODE)))) - NPARM_REGS > 0) \ ! ? (NPARM_REGS - (CUM)) \ : 0) --- 719,731 ---- #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ ! ((ROUND_REG ((CUM), (MODE)) < NPARM_REGS \ && ((TYPE)==0 || ! TREE_ADDRESSABLE ((tree)(TYPE))) \ ! && ((TYPE)==0 || (MODE) != BLKmode \ ! || (TYPE_ALIGN ((TYPE)) % PARM_BOUNDARY == 0)) \ ! && (ROUND_REG ((CUM), (MODE)) \ + ((MODE) == BLKmode \ ? ROUND_ADVANCE (int_size_in_bytes (TYPE)) \ ! : ROUND_ADVANCE (GET_MODE_SIZE (MODE)))) - NPARM_REGS > 0) \ ! ? (NPARM_REGS - ROUND_REG ((CUM), (MODE))) \ : 0) *************** *** 714,722 **** /* The SPARC ABI stipulates passing struct arguments (of any size) by invisible reference. */ - /* Must pass by reference if this is a structure/union type, and this is not - target gnu or the address of this structure is needed somewhere. */ #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ (TYPE && (TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE (TYPE) == UNION_TYPE)) /* Define the information needed to generate branch and scc insns. This is stored from the compare operation. Note that we can't use "rtx" here --- 732,756 ---- /* The SPARC ABI stipulates passing struct arguments (of any size) by invisible reference. */ #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ (TYPE && (TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE (TYPE) == UNION_TYPE)) + /* If defined, a C expression that gives the alignment boundary, in + bits, of an argument with the specified mode and type. If it is + not defined, `PARM_BOUNDARY' is used for all arguments. + + This definition does nothing special unless TARGET_FORCE_ALIGN; + in that case, it aligns each arg to the natural boundary. */ + + #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ + (! TARGET_FORCE_ALIGN \ + ? PARM_BOUNDARY \ + : (((TYPE) != 0) \ + ? (TYPE_ALIGN (TYPE) <= PARM_BOUNDARY \ + ? PARM_BOUNDARY \ + : TYPE_ALIGN (TYPE)) \ + : (GET_MODE_ALIGNMENT (MODE) <= PARM_BOUNDARY \ + ? PARM_BOUNDARY \ + : GET_MODE_ALIGNMENT (MODE)))) + /* Define the information needed to generate branch and scc insns. This is stored from the compare operation. Note that we can't use "rtx" here *************** *** 1191,1194 **** --- 1225,1231 ---- #define Pmode SImode + /* Generate calls to memcpy, memcmp and memset. */ + #define TARGET_MEM_FUNCTIONS + /* Add any extra modes needed to represent the condition code. *************** *** 1395,1403 **** /* This is how to output an assembler line defining a `double' constant. */ #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ { \ if (REAL_VALUE_ISINF (VALUE)) \ ! fprintf (FILE, "\t.double 0r%s99e999\n", (VALUE) > 0 ? "" : "-"); \ ! else if (isnan (VALUE)) \ { \ union { double d; long l[2];} t; \ --- 1432,1444 ---- /* This is how to output an assembler line defining a `double' constant. */ + /* Assemblers (both gas 1.35 and as in 4.0.3) + seem to treat -0.0 as if it were 0.0. + They reject 99e9999, but accept inf. */ #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ { \ if (REAL_VALUE_ISINF (VALUE)) \ ! fprintf (FILE, "\t.double 0r%sinf\n", (VALUE) > 0 ? "" : "-"); \ ! else if (REAL_VALUE_ISNAN (VALUE) \ ! || REAL_VALUE_MINUS_ZERO (VALUE)) \ { \ union { double d; long l[2];} t; \ *************** *** 1414,1419 **** { \ if (REAL_VALUE_ISINF (VALUE)) \ ! fprintf (FILE, "\t.single 0r%s99e999\n", (VALUE) > 0 ? "" : "-"); \ ! else if (isnan (VALUE)) \ { \ union { float f; long l;} t; \ --- 1455,1461 ---- { \ if (REAL_VALUE_ISINF (VALUE)) \ ! fprintf (FILE, "\t.single 0r%sinf\n", (VALUE) > 0 ? "" : "-"); \ ! else if (REAL_VALUE_ISNAN (VALUE) \ ! || REAL_VALUE_MINUS_ZERO (VALUE)) \ { \ union { float f; long l;} t; \ diff -rc2N gcc-2.0/config/sparc.md gcc-2.1/config/sparc.md *** gcc-2.0/config/sparc.md Wed Feb 5 21:36:40 1992 --- gcc-2.1/config/sparc.md Sun Mar 15 16:41:07 1992 *************** *** 57,60 **** --- 57,62 ---- (const_int 1) (const_int 3)) + (eq_attr "type" "multi") (const_int 2) + (eq_attr "type" "move,unary") (if_then_else (ior (match_operand 1 "arith_operand" "") *************** *** 452,457 **** "" "subcc %%g0,%1,%%g0\;addx %2,-1,%0" ! [(set_attr "type" "unary") ! (set_attr "length" "2")]) ;; We can also do GEU and LTU directly, but these operate after a --- 454,458 ---- "" "subcc %%g0,%1,%%g0\;addx %2,-1,%0" ! [(set_attr "length" "2")]) ;; We can also do GEU and LTU directly, but these operate after a *************** *** 519,524 **** (match_operand:SI 2 "arith_operand" "rI"))))] "" ! "addx %1,%2,%0" ! [(set_attr "type" "binary")]) (define_insn "" --- 520,524 ---- (match_operand:SI 2 "arith_operand" "rI"))))] "" ! "addx %1,%2,%0") (define_insn "" *************** *** 537,542 **** (ltu:SI (reg:CC 0) (const_int 0))))] "" ! "subx %1,%2,%0" ! [(set_attr "type" "binary")]) (define_insn "" --- 537,541 ---- (ltu:SI (reg:CC 0) (const_int 0))))] "" ! "subx %1,%2,%0") (define_insn "" *************** *** 546,551 **** (match_operand:SI 2 "arith_operand" "rI"))))] "" ! "subx %1,%2,%0" ! [(set_attr "type" "binary")]) (define_insn "" --- 545,549 ---- (match_operand:SI 2 "arith_operand" "rI"))))] "" ! "subx %1,%2,%0") (define_insn "" *************** *** 573,577 **** "" "* return output_scc_insn (operands, insn); " ! [(set_attr "type" "multi")]) ;; These control RTL generation for conditional jump insns --- 571,576 ---- "" "* return output_scc_insn (operands, insn); " ! [(set_attr "type" "multi") ! (set_attr "length" "3")]) ;; These control RTL generation for conditional jump insns *************** *** 735,739 **** ;; We cannot combine the similar 'r' and 'f' constraints, because it causes ! ;; problems with register allocation. Reload might try to put an interger ;; in an fp register, or an fp number is an integer register. --- 734,738 ---- ;; We cannot combine the similar 'r' and 'f' constraints, because it causes ! ;; problems with register allocation. Reload might try to put an integer ;; in an fp register, or an fp number is an integer register. *************** *** 752,757 **** st %r1,%0 st %r1,[%%fp-4]\;ld [%%fp-4],%0" ! [(set_attr "type" "move,move,load,load,store,store,misc") ! (set_attr "length" "*,1,*,*,*,*,2")]) ;; Special pic pattern, for loading the address of a label into a register. --- 751,756 ---- st %r1,%0 st %r1,[%%fp-4]\;ld [%%fp-4],%0" ! [(set_attr "type" "move,move,load,load,store,store,multi") ! (set_attr "length" "*,1,*,*,*,*,*")]) ;; Special pic pattern, for loading the address of a label into a register. *************** *** 791,799 **** { operands[0] = operand_subword (op0, 1, 0, DImode); ! operands[1] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_HIGH (op1)); output_asm_insn (\"sethi %%hi(%a1),%0\", operands); operands[0] = operand_subword (op0, 0, 0, DImode); ! operands[1] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (op1)); output_asm_insn (singlemove_string (operands), operands); } --- 790,798 ---- { operands[0] = operand_subword (op0, 1, 0, DImode); ! operands[1] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (op1)); output_asm_insn (\"sethi %%hi(%a1),%0\", operands); operands[0] = operand_subword (op0, 0, 0, DImode); ! operands[1] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_HIGH (op1)); output_asm_insn (singlemove_string (operands), operands); } *************** *** 804,807 **** --- 803,816 ---- (set_attr "length" "2")]) + ;; For PIC, symbol_refs are put inside unspec so that the optimizer won't + ;; confuse them with real addresses. + (define_insn "" + [(set (match_operand:SI 0 "register_operand" "=r") + (high:SI (unspec:SI [(match_operand 1 "" "")] 0)))] + "check_pic (1)" + "sethi %%hi(%a1),%0" + [(set_attr "type" "move") + (set_attr "length" "1")]) + (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") *************** *** 825,829 **** (match_operand:DI 2 "immediate_operand" "in")))] "" ! "or %R1,%%lo(%a2),%R0" ;; Need to set length for this arith insn because operand2 ;; is not an "arith_operand". --- 834,857 ---- (match_operand:DI 2 "immediate_operand" "in")))] "" ! "* ! { ! /* Don't output a 64 bit constant, since we can't trust the assembler to ! handle it correctly. */ ! if (GET_CODE (operands[2]) == CONST_DOUBLE) ! operands[2] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (operands[2])); ! return \"or %R1,%%lo(%a2),%R0\"; ! }" ! ;; Need to set length for this arith insn because operand2 ! ;; is not an "arith_operand". ! [(set_attr "length" "1")]) ! ! ;; For PIC, symbol_refs are put inside unspec so that the optimizer won't ! ;; confuse them with real addresses. ! (define_insn "" ! [(set (match_operand:SI 0 "register_operand" "=r") ! (lo_sum:SI (match_operand:SI 1 "register_operand" "r") ! (unspec:SI [(match_operand:SI 2 "immediate_operand" "in")] 0)))] ! "" ! "or %1,%%lo(%a2),%0" ;; Need to set length for this arith insn because operand2 ;; is not an "arith_operand". *************** *** 938,942 **** [(parallel [(set (mem:BLK (match_operand:BLK 0 "general_operand" "")) (mem:BLK (match_operand:BLK 1 "general_operand" ""))) ! (use (match_operand:SI 2 "arith32_operand" "")) (use (match_operand:SI 3 "immediate_operand" "")) (clobber (match_dup 0)) --- 966,970 ---- [(parallel [(set (mem:BLK (match_operand:BLK 0 "general_operand" "")) (mem:BLK (match_operand:BLK 1 "general_operand" ""))) ! (use (match_operand:SI 2 "nonmemory_operand" "")) (use (match_operand:SI 3 "immediate_operand" "")) (clobber (match_dup 0)) *************** *** 948,954 **** " { ! if (GET_CODE (operands[2]) == CONST_INT ! && GET_CODE (operands[3]) == CONST_INT ! && INTVAL (operands[2]) / INTVAL (operands[3]) > 32) FAIL; --- 976,985 ---- " { ! /* If the size isn't known, don't emit inline code. output_block_move ! would output code that's much slower than the library function. ! Also don't output code for large blocks. */ ! if (GET_CODE (operands[2]) != CONST_INT ! || GET_CODE (operands[3]) != CONST_INT ! || INTVAL (operands[2]) / INTVAL (operands[3]) > 16) FAIL; *************** *** 961,965 **** [(set (mem:BLK (match_operand:SI 0 "register_operand" "r")) (mem:BLK (match_operand:SI 1 "register_operand" "r"))) ! (use (match_operand:SI 2 "arith32_operand" "rn")) (use (match_operand:SI 3 "immediate_operand" "i")) (clobber (match_dup 0)) --- 992,996 ---- [(set (mem:BLK (match_operand:SI 0 "register_operand" "r")) (mem:BLK (match_operand:SI 1 "register_operand" "r"))) ! (use (match_operand:SI 2 "nonmemory_operand" "rn")) (use (match_operand:SI 3 "immediate_operand" "i")) (clobber (match_dup 0)) *************** *** 970,974 **** "" "* return output_block_move (operands);" ! [(set_attr "type" "multi")]) ;; Floating point move insns --- 1001,1006 ---- "" "* return output_block_move (operands);" ! [(set_attr "type" "multi") ! (set_attr "length" "6")]) ;; Floating point move insns *************** *** 1065,1069 **** return output_move_double (operands); }" ! [(set_attr "type" "move,store,load,misc,multi,fp,fpload,multi,fpstore") (set_attr "length" "2,3,3,3,3,2,3,3,3")]) --- 1097,1101 ---- return output_move_double (operands); }" ! [(set_attr "type" "move,store,load,multi,multi,fp,fpload,multi,fpstore") (set_attr "length" "2,3,3,3,3,2,3,3,3")]) *************** *** 1093,1098 **** st %r1,%0 st %r1,%0" ! [(set_attr "type" "fp,move,multi,fpload,load,fpstore,store") ! (set_attr "length" "*,*,2,*,*,*,*")]) (define_insn "" --- 1125,1129 ---- st %r1,%0 st %r1,%0" ! [(set_attr "type" "fp,move,multi,fpload,load,fpstore,store")]) (define_insn "" *************** *** 1271,1274 **** --- 1302,1326 ---- [(set_attr "type" "load")]) + ;; Special pattern for optimizing bit-field compares. This is needed + ;; because combine uses this as a canonical form. + + (define_insn "" + [(set (reg:CC 0) + (compare:CC + (zero_extract:SI (match_operand:SI 0 "register_operand" "r") + (match_operand:SI 1 "small_int" "n") + (match_operand:SI 2 "small_int" "n")) + (const_int 0)))] + "INTVAL (operands[2]) > 19" + "* + { + int len = INTVAL (operands[1]); + int pos = 32 - INTVAL (operands[2]) - len; + unsigned mask = ((1 << len) - 1) << pos; + + operands[1] = gen_rtx (CONST_INT, VOIDmode, mask); + return \"andcc %0,%1,%%g0\"; + }") + ;; Conversions between float and double. *************** *** 1366,1371 **** rtx op2 = operands[2]; ! /* If constant is postive, upper bits zeroed, otherwise unchanged ! * give the assembler a chance to pick the move instruction. */ if (GET_CODE (op2) == CONST_INT) { --- 1418,1423 ---- rtx op2 = operands[2]; ! /* If constant is positive, upper bits zeroed, otherwise unchanged. ! Give the assembler a chance to pick the move instruction. */ if (GET_CODE (op2) == CONST_INT) { *************** *** 1424,1429 **** rtx op2 = operands[2]; ! /* If constant is postive, upper bits zeroed, otherwise unchanged ! * give the assembler a chance to pick the move instruction. */ if (GET_CODE (op2) == CONST_INT) { --- 1476,1481 ---- rtx op2 = operands[2]; ! /* If constant is positive, upper bits zeroed, otherwise unchanged. ! Give the assembler a chance to pick the move instruction. */ if (GET_CODE (op2) == CONST_INT) { *************** *** 1492,1497 **** rtx op2 = operands[2]; ! /* If constant is postive, upper bits zeroed, otherwise unchanged ! * give the assembler a chance to pick the move instruction. */ if (GET_CODE (op2) == CONST_INT) { --- 1544,1549 ---- rtx op2 = operands[2]; ! /* If constant is positive, upper bits zeroed, otherwise unchanged. ! Give the assembler a chance to pick the move instruction. */ if (GET_CODE (op2) == CONST_INT) { *************** *** 1552,1557 **** rtx op2 = operands[2]; ! /* If constant is postive, upper bits zeroed, otherwise unchanged ! * give the assembler a chance to pick the move instruction. */ if (GET_CODE (op2) == CONST_INT) { --- 1604,1609 ---- rtx op2 = operands[2]; ! /* If constant is positive, upper bits zeroed, otherwise unchanged. ! Give the assembler a chance to pick the move instruction. */ if (GET_CODE (op2) == CONST_INT) { *************** *** 1612,1617 **** rtx op2 = operands[2]; ! /* If constant is postive, upper bits zeroed, otherwise unchanged ! * give the assembler a chance to pick the move instruction. */ if (GET_CODE (op2) == CONST_INT) { --- 1664,1669 ---- rtx op2 = operands[2]; ! /* If constant is postive, upper bits zeroed, otherwise unchanged. ! Give the assembler a chance to pick the move instruction. */ if (GET_CODE (op2) == CONST_INT) { *************** *** 1998,2002 **** ;; Note that for the Sparc, by setting the annul bit on an unconditional ;; branch, the following insn is never executed. This saves us a nop, ! ;; but requires a debugger which can handle annuled branches. (define_insn "jump" [(set (pc) (label_ref (match_operand 0 "" "")))] --- 2050,2054 ---- ;; Note that for the Sparc, by setting the annul bit on an unconditional ;; branch, the following insn is never executed. This saves us a nop, ! ;; but requires a debugger which can handle annulled branches. (define_insn "jump" [(set (pc) (label_ref (match_operand 0 "" "")))] *************** *** 2257,2261 **** [(unspec_volatile [(const_int 0)] 0)] "" ! "ta 3") (define_insn "" --- 2309,2314 ---- [(unspec_volatile [(const_int 0)] 0)] "" ! "ta 3" ! [(set_attr "type" "misc")]) (define_insn "" *************** *** 2262,2266 **** [(unspec_volatile [(const_int 0)] 1)] "" ! "jmp %%o0+0\;restore") ;(define_insn "tail_call" ;; tail call --- 2315,2321 ---- [(unspec_volatile [(const_int 0)] 1)] "" ! "jmp %%o0+0\;restore" ! [(set_attr "type" "misc") ! (set_attr "length" "2")]) ;(define_insn "tail_call" ;; tail call *************** *** 2463,2468 **** "rtx_equal_p (operands[2], operands[0]) || rtx_equal_p (operands[2], operands[1])" ! "orcc %1,%%g0,%0" ! [(set_attr "type" "move")]) ;; Do {sign,zero}-extended compares somewhat more efficiently. --- 2518,2522 ---- "rtx_equal_p (operands[2], operands[0]) || rtx_equal_p (operands[2], operands[1])" ! "orcc %1,%%g0,%0") ;; Do {sign,zero}-extended compares somewhat more efficiently. *************** *** 2598,2602 **** (return)] "! TARGET_EPILOGUE" ! "ret\;fmovs %0,%%f0") ;; Now peepholes to go a call followed by a jump. --- 2652,2657 ---- (return)] "! TARGET_EPILOGUE" ! "ret\;fmovs %0,%%f0" ! [(set_attr "type" "multi")]) ;; Now peepholes to go a call followed by a jump. *************** *** 2632,2637 **** (set (reg:CC 0) (compare (match_dup 0) (const_int 0)))] "" ! "subxcc %r1,0,%0" ! [(set_attr "type" "compare")]) ;;- Local variables: --- 2687,2691 ---- (set (reg:CC 0) (compare (match_dup 0) (const_int 0)))] "" ! "subxcc %r1,0,%0") ;;- Local variables: diff -rc2N gcc-2.0/config/spur.h gcc-2.1/config/spur.h *** gcc-2.0/config/spur.h Fri Jan 3 19:16:51 1992 --- gcc-2.1/config/spur.h Sat Mar 14 00:16:50 1992 *************** *** 84,88 **** #define WORDS_BIG_ENDIAN 0 ! /* number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 84,88 ---- #define WORDS_BIG_ENDIAN 0 ! /* number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 118,124 **** #define BIGGEST_ALIGNMENT 64 ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT /* Standard register usage. */ --- 118,124 ---- #define BIGGEST_ALIGNMENT 64 ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 1 /* Standard register usage. */ diff -rc2N gcc-2.0/config/sun2.h gcc-2.1/config/sun2.h *** gcc-2.0/config/sun2.h Thu Dec 26 15:34:35 1991 --- gcc-2.1/config/sun2.h Sat Mar 21 17:46:53 1992 *************** *** 51,55 **** (!strcmp (STR, "Tdata") || !strcmp (STR, "include") \ || !strcmp (STR, "imacros") || !strcmp (STR, "target") \ ! || !strcmp (STR, "assert")) /* Specify what to link with. */ --- 51,55 ---- (!strcmp (STR, "Tdata") || !strcmp (STR, "include") \ || !strcmp (STR, "imacros") || !strcmp (STR, "target") \ ! || !strcmp (STR, "assert") || !strcmp (STR, "aux-info")) /* Specify what to link with. */ diff -rc2N gcc-2.0/config/sun2o4.h gcc-2.1/config/sun2o4.h *** gcc-2.0/config/sun2o4.h Thu Jan 30 15:57:06 1992 --- gcc-2.1/config/sun2o4.h Tue Mar 3 15:38:12 1992 *************** *** 93,97 **** #undef LINK_SPEC ! #define LINK_SPEC "%{!e*:-e start} -dc -dp %{g:-Bstatic} %{static:-Bstatic}" #undef ASM_OUTPUT_DOUBLE --- 93,97 ---- #undef LINK_SPEC ! #define LINK_SPEC "%{!e*:-e start} -dc -dp %{static:-Bstatic}" #undef ASM_OUTPUT_DOUBLE diff -rc2N gcc-2.0/config/sun3.h gcc-2.1/config/sun3.h *** gcc-2.0/config/sun3.h Thu Jan 30 15:58:00 1992 --- gcc-2.1/config/sun3.h Mon Mar 23 14:42:32 1992 *************** *** 44,66 **** #define CPP_SPEC \ "%{!msoft-float:%{mfpa:-D__HAVE_FPA__ }%{!mfpa:-D__HAVE_68881__ }}\ %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}" #else - #if TARGET_DEFAULT & 0100 - - /* -mfpa is the default */ - #define CPP_SPEC \ - "%{!msoft-float:%{m68881:-D__HAVE_68881__ }%{!m68881:-D__HAVE_FPA__ }}\ - %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}" - #else - /* -msoft-float is the default */ #define CPP_SPEC \ "%{m68881:-D__HAVE_68881__ }%{mfpa:-D__HAVE_FPA__ }\ %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}" #endif - #endif /* Prevent error on `-sun3' and `-target sun3' options. */ --- 44,59 ---- #define CPP_SPEC \ "%{!msoft-float:%{mfpa:-D__HAVE_FPA__ }%{!mfpa:-D__HAVE_68881__ }}\ + %{m68000:-D__mc68010__}%{mc68000:-D__mc68010__}%{!mc68000:%{!m68000:-D__mc68020__}} \ %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}" #else /* -msoft-float is the default */ #define CPP_SPEC \ "%{m68881:-D__HAVE_68881__ }%{mfpa:-D__HAVE_FPA__ }\ + %{m68000:-D__mc68010__}%{mc68000:-D__mc68010__}%{!mc68000:%{!m68000:-D__mc68020__}} \ %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}" #endif /* Prevent error on `-sun3' and `-target sun3' options. */ *************** *** 82,86 **** (!strcmp (STR, "Tdata") || !strcmp (STR, "include") \ || !strcmp (STR, "imacros") || !strcmp (STR, "target") \ ! || !strcmp (STR, "assert")) /* -m68000 requires special flags to the assembler. */ --- 75,79 ---- (!strcmp (STR, "Tdata") || !strcmp (STR, "include") \ || !strcmp (STR, "imacros") || !strcmp (STR, "target") \ ! || !strcmp (STR, "assert") || !strcmp (STR, "aux-info")) /* -m68000 requires special flags to the assembler. */ *************** *** 153,162 **** #endif ! /* Provide required defaults for linker -e and -d switches. ! Also, it is hard to debug with shared libraries, ! so don't use them if going to debug. */ ! #define LINK_SPEC "%{!e*:-e start} -dc -dp %{g:-Bstatic} %{static:-Bstatic} \ ! %{assert*}" /* Every structure or union's size must be a multiple of 2 bytes. */ --- 146,152 ---- #endif ! /* Provide required defaults for linker -e and -d switches. */ ! #define LINK_SPEC "%{!e*:-e start} -dc -dp %{static:-Bstatic} %{assert*}" /* Every structure or union's size must be a multiple of 2 bytes. */ *************** *** 171,174 **** --- 161,167 ---- #define REAL_INFINITY + /* Generate calls to memcpy, memcmp and memset. */ + #define TARGET_MEM_FUNCTIONS + /* This is how to output an assembler line defining a `double' constant. */ *************** *** 178,182 **** if (REAL_VALUE_ISINF (VALUE)) \ fprintf (FILE, "\t.double 0r%s99e999\n", (VALUE) > 0 ? "" : "-"); \ ! else if (isnan (VALUE)) \ { \ union { double d; long l[2];} t; \ --- 171,175 ---- if (REAL_VALUE_ISINF (VALUE)) \ fprintf (FILE, "\t.double 0r%s99e999\n", (VALUE) > 0 ? "" : "-"); \ ! else if (REAL_VALUE_ISNAN (VALUE)) \ { \ union { double d; long l[2];} t; \ *************** *** 195,199 **** if (REAL_VALUE_ISINF (VALUE)) \ fprintf (FILE, "\t.single 0r%s99e999\n", (VALUE) > 0 ? "" : "-"); \ ! else if (isnan (VALUE)) \ { \ union { float f; long l;} t; \ --- 188,192 ---- if (REAL_VALUE_ISINF (VALUE)) \ fprintf (FILE, "\t.single 0r%s99e999\n", (VALUE) > 0 ? "" : "-"); \ ! else if (REAL_VALUE_ISNAN (VALUE)) \ { \ union { float f; long l;} t; \ diff -rc2N gcc-2.0/config/sun386.h gcc-2.1/config/sun386.h *** gcc-2.0/config/sun386.h Sun Dec 8 16:23:26 1991 --- gcc-2.1/config/sun386.h Mon Mar 16 05:30:43 1992 *************** *** 93,101 **** /* Output before read-only data. */ ! #define TEXT_SECTION_ASM_OP "\t.text" /* Output before writable data. */ ! #define DATA_SECTION_ASM_OP "\t.data" /* Define the syntax of labels and symbol definitions/declarations. */ --- 93,103 ---- /* Output before read-only data. */ ! #undef TEXT_SECTION_ASM_OP ! #define TEXT_SECTION_ASM_OP ".text" /* Output before writable data. */ ! #undef DATA_SECTION_ASM_OP ! #define DATA_SECTION_ASM_OP ".data" /* Define the syntax of labels and symbol definitions/declarations. */ *************** *** 123,127 **** #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ ! sprintf ((BUF), ".%s%d", (PREFIX), (NUMBER)) /* This is how to output a reference to a user-level label named NAME. */ --- 125,129 ---- #define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ ! sprintf ((BUF), "*.%s%d", (PREFIX), (NUMBER)) /* This is how to output a reference to a user-level label named NAME. */ diff -rc2N gcc-2.0/config/svr3.h gcc-2.1/config/svr3.h *** gcc-2.0/config/svr3.h Thu Jan 23 13:32:58 1992 --- gcc-2.1/config/svr3.h Thu Mar 19 15:40:09 1992 *************** *** 173,195 **** USE_CONST_SECTION as 1. */ ! /* The support for constructors and destructors depends on two ! machine-specific macros that the individual tm.h file has to define: ! CTORS_SECTION_ASM_OP should be defined to concatenate ! the macro INIT_SECTION_ASM_OP, a newline, and a push instruction ! to push a word containing 0 (or some equivalent of that). ! ASM_OUTPUT_CONSTRUCTOR should be defined ! to push the address of the constructor. */ #define USE_CONST_SECTION 0 ! #define INIT_SECTION_ASM_OP "\t.section\t.init" #define FINI_SECTION_ASM_OP ".section .fini,\"x\"" ! #define CONST_SECTION_ASM_OP "\t.section\t.rodata, \"x\"" ! #define DTORS_SECTION_ASM_OP FINI_SECTION_ASM_OP ! /* CTORS_SECTION_ASM_OP is machine-dependent ! because it pushes on the stack. */ #define DO_GLOBAL_CTORS_BODY \ --- 173,195 ---- USE_CONST_SECTION as 1. */ ! /* Define a few machine-specific details of the implementation of ! constructors. ! The __CTORS_LIST__ goes in the .init section. Define CTOR_LIST_BEGIN ! and CTOR_LIST_END to contribute to the .init section an instruction to ! push a word containing 0 (or some equivalent of that). ! Define ASM_OUTPUT_CONSTRUCTOR to push the address of the constructor. */ #define USE_CONST_SECTION 0 ! #define INIT_SECTION_ASM_OP ".section\t.init" #define FINI_SECTION_ASM_OP ".section .fini,\"x\"" ! #define CONST_SECTION_ASM_OP ".section\t.rodata, \"x\"" ! #define CTORS_SECTION_ASM_OP INIT_SECTION_ASM_OP #define DTORS_SECTION_ASM_OP FINI_SECTION_ASM_OP ! ! /* CTOR_LIST_BEGIN and CTOR_LIST_END are machine-dependent ! because they push on the stack. */ #define DO_GLOBAL_CTORS_BODY \ diff -rc2N gcc-2.0/config/svr4.h gcc-2.1/config/svr4.h *** gcc-2.0/config/svr4.h Sat Feb 1 01:00:10 1992 --- gcc-2.1/config/svr4.h Sat Mar 21 17:46:51 1992 *************** *** 73,77 **** #define WORD_SWITCH_TAKES_ARG(STR) \ ! (!strcmp (STR, "include") || !strcmp (STR, "imacros")) /* You should redefine CPP_PREDEFINES in any file which includes this one. --- 73,78 ---- #define WORD_SWITCH_TAKES_ARG(STR) \ ! (!strcmp (STR, "include") || !strcmp (STR, "imacros") \ ! || !strcmp (STR, "aux-info")) /* You should redefine CPP_PREDEFINES in any file which includes this one. *************** *** 118,122 **** #define MD_STARTFILE_PREFIX "/usr/ccs/lib/" ! /* Provide a LIB_SPEC appropropriate for svr4. Here we tack on the default standard C library (unless we are building a shared library) followed by our own magical crtend.o file (see crtstuff.c) which provides part of --- 119,123 ---- #define MD_STARTFILE_PREFIX "/usr/ccs/lib/" ! /* Provide a LIB_SPEC appropriate for svr4. Here we tack on the default standard C library (unless we are building a shared library) followed by our own magical crtend.o file (see crtstuff.c) which provides part of *************** *** 155,163 **** #undef LINK_SPEC ! #define LINK_SPEC "%{z*} %{h*} %{V} %{v:%{!V:-V}} \ ! %{b} %{t} %{Wl,*:%*} \ %{static:-dn -Bstatic} \ %{shared:-G -dy} \ %{symbolic:-Bsymbolic -G -dy} \ %{YP,*} \ %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ --- 156,165 ---- #undef LINK_SPEC ! #define LINK_SPEC "%{h*} %{V} %{v:%{!V:-V}} \ ! %{b} %{Wl,*:%*} \ %{static:-dn -Bstatic} \ %{shared:-G -dy} \ %{symbolic:-Bsymbolic -G -dy} \ + %{G:-G} \ %{YP,*} \ %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ *************** *** 174,178 **** to decide how they should behave. Specifically, they decide (based upon the value of `_lib_version') if they will act in a strictly ANSI ! conformant manner or not. */ --- 176,180 ---- to decide how they should behave. Specifically, they decide (based upon the value of `_lib_version') if they will act in a strictly ANSI ! conforming manner or not. */ *************** *** 187,193 **** %{!traditional:values-Xa.o%s}}}} crtbegin.o%s" ! /* Attach a sepcial .ident directive to the end of the file to identify the version of GCC which compiled this code. The format of the ! .ident string is patterened after the ones produced by native svr4 C compilers. */ --- 189,195 ---- %{!traditional:values-Xa.o%s}}}} crtbegin.o%s" ! /* Attach a special .ident directive to the end of the file to identify the version of GCC which compiled this code. The format of the ! .ident string is patterned after the ones produced by native svr4 C compilers. */ *************** *** 249,252 **** --- 251,256 ---- #define WCHAR_TYPE_SIZE BITS_PER_WORD + #define MULTIBYTE_CHARS + #undef ASM_BYTE_OP #define ASM_BYTE_OP "\t.byte" *************** *** 303,307 **** to depend on their types. We do exactly that here. */ ! #define BSS_ASM_OP "\t.bss" #undef ASM_OUTPUT_ALIGNED_LOCAL --- 307,311 ---- to depend on their types. We do exactly that here. */ ! #define BSS_ASM_OP ".bss" #undef ASM_OUTPUT_ALIGNED_LOCAL *************** *** 308,312 **** #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ do { \ ! fprintf ((FILE), "%s\t%s,%u,%u\n", \ BSS_ASM_OP, (NAME), (SIZE), (ALIGN) / BITS_PER_UNIT); \ } while (0) --- 312,316 ---- #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ do { \ ! fprintf ((FILE), "\t%s\t%s,%u,%u\n", \ BSS_ASM_OP, (NAME), (SIZE), (ALIGN) / BITS_PER_UNIT); \ } while (0) *************** *** 316,320 **** assemblers. */ ! #define INT_ASM_OP "\t.long\t" /* This is the pseudo-op used to generate a contiguous sequence of byte --- 320,324 ---- assemblers. */ ! #define INT_ASM_OP ".long" /* This is the pseudo-op used to generate a contiguous sequence of byte *************** *** 335,341 **** #define USE_CONST_SECTION 1 ! #define CONST_SECTION_ASM_OP "\t.section\t.rodata" ! #define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"a\",@progbits\n" ! #define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"a\",@progbits\n" /* On svr4, we *do* have support for the .init section, and we can put --- 339,345 ---- #define USE_CONST_SECTION 1 ! #define CONST_SECTION_ASM_OP ".section\t.rodata" ! #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"a\",@progbits" ! #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"a\",@progbits" /* On svr4, we *do* have support for the .init section, and we can put *************** *** 345,349 **** for all know svr4 assemblers. */ ! #define INIT_SECTION_ASM_OP "\t.section\t.init" /* A default list of other sections which we might be "in" at any given --- 349,353 ---- for all know svr4 assemblers. */ ! #define INIT_SECTION_ASM_OP ".section\t.init" /* A default list of other sections which we might be "in" at any given *************** *** 409,413 **** do { \ ctors_section (); \ ! fprintf (FILE, "%s\t ", INT_ASM_OP); \ assemble_name (FILE, NAME); \ fprintf (FILE, "\n"); \ --- 413,417 ---- do { \ ctors_section (); \ ! fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ assemble_name (FILE, NAME); \ fprintf (FILE, "\n"); \ *************** *** 419,423 **** do { \ dtors_section (); \ ! fprintf (FILE, "%s\t ", INT_ASM_OP); \ assemble_name (FILE, NAME); \ fprintf (FILE, "\n"); \ --- 423,427 ---- do { \ dtors_section (); \ ! fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ assemble_name (FILE, NAME); \ fprintf (FILE, "\n"); \ *************** *** 465,470 **** file which includes this one. */ ! #define TYPE_ASM_OP "\t.type" ! #define SIZE_ASM_OP "\t.size" /* The following macro defines the format used to output the second --- 469,474 ---- file which includes this one. */ ! #define TYPE_ASM_OP ".type" ! #define SIZE_ASM_OP ".size" /* The following macro defines the format used to output the second *************** *** 484,488 **** #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do { \ ! fprintf (FILE, "%s\t ", TYPE_ASM_OP); \ assemble_name (FILE, NAME); \ putc (',', FILE); \ --- 488,492 ---- #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do { \ ! fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ assemble_name (FILE, NAME); \ putc (',', FILE); \ *************** *** 496,500 **** #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do { \ ! fprintf (FILE, "%s\t ", TYPE_ASM_OP); \ assemble_name (FILE, NAME); \ putc (',', FILE); \ --- 500,504 ---- #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do { \ ! fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ assemble_name (FILE, NAME); \ putc (',', FILE); \ *************** *** 503,507 **** if (!flag_inhibit_size_directive) \ { \ ! fprintf (FILE, "%s\t ", SIZE_ASM_OP); \ assemble_name (FILE, NAME); \ fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (decl))); \ --- 507,511 ---- if (!flag_inhibit_size_directive) \ { \ ! fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ assemble_name (FILE, NAME); \ fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (decl))); \ *************** *** 521,525 **** ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ ! fprintf (FILE, "%s\t ", SIZE_ASM_OP); \ assemble_name (FILE, (FNAME)); \ fprintf (FILE, ","); \ --- 525,529 ---- ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ ! fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ assemble_name (FILE, (FNAME)); \ fprintf (FILE, ","); \ *************** *** 559,563 **** limit. Note that at least some svr4 assemblers have a limit on the actual number of bytes in the double-quoted string, and that they ! count each chanacter in an escape sequence as one byte. Thus, an escape sequence like \377 would count as four bytes. --- 563,567 ---- limit. Note that at least some svr4 assemblers have a limit on the actual number of bytes in the double-quoted string, and that they ! count each character in an escape sequence as one byte. Thus, an escape sequence like \377 would count as four bytes. diff -rc2N gcc-2.0/config/t-convex gcc-2.1/config/t-convex *** gcc-2.0/config/t-convex Wed Jan 15 08:08:36 1992 --- gcc-2.1/config/t-convex Sat Mar 7 15:31:26 1992 *************** *** 1,5 **** # Use collect2 to link ! EXTRA_PARTS = ld ld : collect2 --- 1,5 ---- # Use collect2 to link ! EXTRA_PROGRAMS = ld ld : collect2 diff -rc2N gcc-2.0/config/t-i386isc gcc-2.1/config/t-i386isc *** gcc-2.0/config/t-i386isc --- gcc-2.1/config/t-i386isc Fri Mar 6 16:26:40 1992 *************** *** 0 **** --- 1,7 ---- + # The one that comes with the system is POSIX-compliant. + LIMITS_H = + + # For svr3 we build crtbegin.o and crtend.o which serve to add begin and + # end labels to the .ctors and .dtors section when we link using gcc. + + EXTRA_PARTS=crtbegin.o crtend.o diff -rc2N gcc-2.0/config/t-mips gcc-2.1/config/t-mips *** gcc-2.0/config/t-mips Sat Jan 4 03:22:47 1992 --- gcc-2.1/config/t-mips Tue Mar 17 14:04:21 1992 *************** *** 1,3 **** ! ALL = Makefile start.encap libgcc.a EXTRA_PASSES = mips-tfile mips-tdump ld CCLIBFLAGS = -O -G 0 --- 1,5 ---- ! # It is not a good idea for particlar targets to do peculiar things with ALL. ! # --rms. ! #ALL = Makefile start.encap libgcc.a EXTRA_PASSES = mips-tfile mips-tdump ld CCLIBFLAGS = -O -G 0 diff -rc2N gcc-2.0/config/t-next gcc-2.1/config/t-next *** gcc-2.0/config/t-next Sat Jan 18 01:45:54 1992 --- gcc-2.1/config/t-next Mon Mar 16 18:51:23 1992 *************** *** 1,2 **** # libgcc1.c is not needed, since the standard library has these functions. ! LIBGCC= --- 1,11 ---- # libgcc1.c is not needed, since the standard library has these functions. ! LIBGCC1= ! ! # Use collect2 to link, until system version 3.0. ! ! EXTRA_PROGRAMS = ld ! ! ld : collect2 ! rm -f ld ! ln collect2 ld ! diff -rc2N gcc-2.0/config/t-rs6000 gcc-2.1/config/t-rs6000 *** gcc-2.0/config/t-rs6000 --- gcc-2.1/config/t-rs6000 Mon Mar 23 16:36:54 1992 *************** *** 0 **** --- 1,7 ---- + EXTRA_PROGRAMS=ld + + # Build collect + + ld: collect2 + rm -f ld + ln collect2 ld diff -rc2N gcc-2.0/config/tahoe.c gcc-2.1/config/tahoe.c *** gcc-2.0/config/tahoe.c Fri May 31 15:51:06 1991 --- gcc-2.1/config/tahoe.c Sat Mar 14 00:16:53 1992 *************** *** 36,40 **** * Dale Wiles and Kevin Zachmann. * ! * Adaptions for HCX by Piet van Oostrum, * University of Utrecht, The Netherlands (piet@cs.ruu.nl) * --- 36,40 ---- * Dale Wiles and Kevin Zachmann. * ! * Changes for HCX by Piet van Oostrum, * University of Utrecht, The Netherlands (piet@cs.ruu.nl) * *************** *** 345,349 **** /* YUCK! Indexed addressing!! If the address is considered */ /* offsettable, go use the offset in the high part. Otherwise */ ! /* find what exactly is being added to the mutiplication. If */ /* it's a mem reference, increment that with the high part */ /* being unchanged to cause the shift. If it's a reg, do the */ --- 345,349 ---- /* YUCK! Indexed addressing!! If the address is considered */ /* offsettable, go use the offset in the high part. Otherwise */ ! /* find what exactly is being added to the multiplication. If */ /* it's a mem reference, increment that with the high part */ /* being unchanged to cause the shift. If it's a reg, do the */ diff -rc2N gcc-2.0/config/tahoe.h gcc-2.1/config/tahoe.h *** gcc-2.0/config/tahoe.h Sun Dec 1 00:07:17 1991 --- gcc-2.1/config/tahoe.h Sat Mar 14 00:16:55 1992 *************** *** 129,133 **** /* tahoe is picky about data alignment */ ! #define STRICT_ALIGNMENT /* keep things standard with pcc */ --- 129,133 ---- /* tahoe is picky about data alignment */ ! #define STRICT_ALIGNMENT 1 /* keep things standard with pcc */ *************** *** 168,172 **** #define FIXED_REGISTERS {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0} ! /* lots of regs aren't guarenteed to return from a call. The FPP reg */ /* must be included in these since it can't be saved by the reg mask */ --- 168,172 ---- #define FIXED_REGISTERS {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0} ! /* lots of regs aren't guaranteed to return from a call. The FPP reg */ /* must be included in these since it can't be saved by the reg mask */ *************** *** 265,269 **** #define INDEX_REG_CLASS GENERAL_REGS ! /* 'a' as a contraint in the md file means the FFP_REG class */ #define REG_CLASS_FROM_LETTER(C) (C == 'a' ? FPP_REG : NO_REGS) --- 265,269 ---- #define INDEX_REG_CLASS GENERAL_REGS ! /* 'a' as a constraint in the md file means the FFP_REG class */ #define REG_CLASS_FROM_LETTER(C) (C == 'a' ? FPP_REG : NO_REGS) *************** *** 455,459 **** /* The following is all the code for GO_IF_LEGITIMATE_ADDRESS */ /* most of this taken directly from the vax tm file since the */ ! /* tahoe and vax addressing modes are nearly identicle. */ /* Is x an indirectable address? */ --- 455,459 ---- /* The following is all the code for GO_IF_LEGITIMATE_ADDRESS */ /* most of this taken directly from the vax tm file since the */ ! /* tahoe and vax addressing modes are nearly identical. */ /* Is x an indirectable address? */ *************** *** 578,582 **** #define CASE_VECTOR_MODE HImode ! /* each of the table elements in a case are relative to the jump addess */ #define CASE_VECTOR_PC_RELATIVE --- 578,582 ---- #define CASE_VECTOR_MODE HImode ! /* each of the table elements in a case are relative to the jump address */ #define CASE_VECTOR_PC_RELATIVE *************** *** 799,803 **** sprintf (LABEL, "*%s%d", PREFIX, NUM) ! /* outputing a double is easy cause we only have one kind */ #ifdef HCX_UX --- 799,803 ---- sprintf (LABEL, "*%s%d", PREFIX, NUM) ! /* outputting a double is easy cause we only have one kind */ #ifdef HCX_UX diff -rc2N gcc-2.0/config/tahoe.md gcc-2.1/config/tahoe.md *** gcc-2.0/config/tahoe.md Mon Nov 25 21:50:40 1991 --- gcc-2.1/config/tahoe.md Sat Mar 14 00:16:57 1992 *************** *** 25,29 **** ; Dale Wiles and Kevin Zachmann. ; ! ; Piet van Oostrum (piet@cs.ruu.nl) made adaptions for HCX/UX, fixed ; some bugs and made some improvements (hopefully). ; --- 25,29 ---- ; Dale Wiles and Kevin Zachmann. ; ! ; Piet van Oostrum (piet@cs.ruu.nl) made changes for HCX/UX, fixed ; some bugs and made some improvements (hopefully). ; *************** *** 463,467 **** ; Subtraction from the sp (needed by the built in alloc funtion) needs ; to be different since the sp cannot be directly read on the tahoe. ! ; If it's a simple constant, you just use displacment. Otherwise, you ; push the sp, and then do the subtraction off the stack. --- 463,467 ---- ; Subtraction from the sp (needed by the built in alloc funtion) needs ; to be different since the sp cannot be directly read on the tahoe. ! ; If it's a simple constant, you just use displacement. Otherwise, you ; push the sp, and then do the subtraction off the stack. diff -rc2N gcc-2.0/config/tower-as.h gcc-2.1/config/tower-as.h *** gcc-2.0/config/tower-as.h Mon Dec 23 22:56:14 1991 --- gcc-2.1/config/tower-as.h Fri Mar 20 14:13:00 1992 *************** *** 284,291 **** #undef TEXT_SECTION_ASM_OP ! #define TEXT_SECTION_ASM_OP "\ttext" #undef DATA_SECTION_ASM_OP ! #define DATA_SECTION_ASM_OP "\tdata" /* This says how to output an assembler line to define a global common symbol. --- 284,291 ---- #undef TEXT_SECTION_ASM_OP ! #define TEXT_SECTION_ASM_OP "text" #undef DATA_SECTION_ASM_OP ! #define DATA_SECTION_ASM_OP "data" /* This says how to output an assembler line to define a global common symbol. *************** *** 407,411 **** else if (CODE == '+') fprintf (FILE, "(%%sp)+"); \ else if (CODE == '@') fprintf (FILE, "(%%sp)"); \ ! else if (CODE == '!') fprintf (FILE, "%%cc"); \ else if (GET_CODE (X) == REG) \ fprintf (FILE, "%s", reg_names[REGNO (X)]); \ --- 407,411 ---- else if (CODE == '+') fprintf (FILE, "(%%sp)+"); \ else if (CODE == '@') fprintf (FILE, "(%%sp)"); \ ! else if (CODE == '!') fprintf (FILE, "%%fpcr"); \ else if (GET_CODE (X) == REG) \ fprintf (FILE, "%s", reg_names[REGNO (X)]); \ diff -rc2N gcc-2.0/config/vax.c gcc-2.1/config/vax.c *** gcc-2.0/config/vax.c Fri Feb 21 01:17:54 1992 --- gcc-2.1/config/vax.c Tue Mar 17 16:15:17 1992 *************** *** 30,57 **** #include "insn-attr.h" - /* Return 1 if the operand is a REG, a SUBREG, or a MEM that is does not - have an index. This is used when we are using an operand in a different - mode than the hardware expects. See jlbc/jlbs. - - This is nonimmedate_operand with a restriction on the type of MEM. */ - - int - reg_or_nxmem_operand (op, mode) - rtx op; - enum machine_mode mode; - { - if (! nonimmediate_operand (op, mode)) - return 0; - - if (GET_CODE (op) != MEM) - return 1; - - GO_IF_NONINDEXED_ADDRESS (XEXP (op, 0), nonidx); - - return 0; ! nonidx: ! return 1; ! } void --- 30,35 ---- #include "insn-attr.h" ! /* This is like nonimmediate_operand with a restriction on the type of MEM. */ void *************** *** 58,62 **** split_quadword_operands (operands, low, n) rtx *operands, *low; - int n; { int i; --- 36,39 ---- *************** *** 152,155 **** --- 129,137 ---- reg1 = XEXP (addr, 1); addr = XEXP (addr, 0); + } + else if (GET_CODE (XEXP (addr, 0)) == REG) + { + reg1 = XEXP (addr, 0); + addr = XEXP (addr, 1); } else diff -rc2N gcc-2.0/config/vax.h gcc-2.1/config/vax.h *** gcc-2.0/config/vax.h Tue Feb 11 23:30:44 1992 --- gcc-2.1/config/vax.h Sat Mar 14 00:16:59 1992 *************** *** 94,98 **** #define WORDS_BIG_ENDIAN 0 ! /* Number of bits in an addressible storage unit */ #define BITS_PER_UNIT 8 --- 94,98 ---- #define WORDS_BIG_ENDIAN 0 ! /* Number of bits in an addressable storage unit */ #define BITS_PER_UNIT 8 *************** *** 131,137 **** #define BIGGEST_FIELD_ALIGNMENT (TARGET_VAXC_ALIGNMENT ? 8 : 32) ! /* Define this if move instructions will actually fail to work when given unaligned data. */ ! /* #define STRICT_ALIGNMENT */ /* Standard register usage. */ --- 131,140 ---- #define BIGGEST_FIELD_ALIGNMENT (TARGET_VAXC_ALIGNMENT ? 8 : 32) ! /* Set this nonzero if move instructions will actually fail to work when given unaligned data. */ ! #define STRICT_ALIGNMENT 0 ! ! /* Let's keep the stack somewhat aligned. */ ! #define STACK_BOUNDARY 32 /* Standard register usage. */ *************** *** 284,287 **** --- 287,300 ---- : 0) + /* Optional extra constraints for this machine. + + For the VAX, `Q' means that OP is a MEM that does not have a mode-dependent + address. */ + + #define EXTRA_CONSTRAINT(OP, C) \ + ((C) == 'Q' \ + ? GET_CODE (OP) == MEM && ! mode_dependent_address_p (XEXP (OP, 0)) \ + : 0) + /* Given an rtx X being reloaded into a reg required to be in class CLASS, return the class of reg to actually use. *************** *** 868,872 **** /* Check a `double' value for validity for a particular machine mode. */ ! /* note that it is very hard to accidently create a number that fits in a double but not in a float, since their ranges are almost the same */ #define CHECK_FLOAT_VALUE(mode, d) \ --- 881,885 ---- /* Check a `double' value for validity for a particular machine mode. */ ! /* note that it is very hard to accidentally create a number that fits in a double but not in a float, since their ranges are almost the same */ #define CHECK_FLOAT_VALUE(mode, d) \ diff -rc2N gcc-2.0/config/vax.md gcc-2.1/config/vax.md *** gcc-2.0/config/vax.md Fri Feb 21 01:18:59 1992 --- gcc-2.1/config/vax.md Tue Mar 3 18:36:25 1992 *************** *** 1466,1471 **** ;; Recognize jbs, jlbs, jbc and jlbc instructions. Note that the operand ! ;; if this insn is SImode in the hardware. However, if it is memory, ! ;; we use QImode. So we can't allow the memory address to be indexed. (define_insn "" --- 1466,1472 ---- ;; Recognize jbs, jlbs, jbc and jlbc instructions. Note that the operand ! ;; of jlbs and jlbc insns are SImode in the hardware. However, if it is ! ;; memory, we use QImode in the insn. So we can't use those instructions ! ;; for mode-dependent addresses. (define_insn "" *************** *** 1472,1476 **** [(set (pc) (if_then_else ! (ne (zero_extract:SI (match_operand:QI 0 "reg_or_nxmem_operand" "g,g") (const_int 1) (match_operand:SI 1 "general_operand" "I,g")) --- 1473,1477 ---- [(set (pc) (if_then_else ! (ne (zero_extract:SI (match_operand:QI 0 "nonimmediate_operand" "rQ,g") (const_int 1) (match_operand:SI 1 "general_operand" "I,g")) *************** *** 1486,1490 **** [(set (pc) (if_then_else ! (eq (zero_extract:SI (match_operand:QI 0 "reg_or_nxmem_operand" "g,g") (const_int 1) (match_operand:SI 1 "general_operand" "I,g")) --- 1487,1491 ---- [(set (pc) (if_then_else ! (eq (zero_extract:SI (match_operand:QI 0 "nonimmediate_operand" "rQ,g") (const_int 1) (match_operand:SI 1 "general_operand" "I,g")) *************** *** 1534,1539 **** [(set (pc) (if_then_else ! (gt (match_operand:SI 0 "general_operand" "+g") ! (const_int 1)) (label_ref (match_operand 1 "" "")) (pc))) --- 1535,1541 ---- [(set (pc) (if_then_else ! (gt (plus:SI (match_operand:SI 0 "general_operand" "+g") ! (const_int -1)) ! (const_int 0)) (label_ref (match_operand 1 "" "")) (pc))) *************** *** 1547,1552 **** [(set (pc) (if_then_else ! (ge (match_operand:SI 0 "general_operand" "+g") ! (const_int 1)) (label_ref (match_operand 1 "" "")) (pc))) --- 1549,1555 ---- [(set (pc) (if_then_else ! (ge (plus:SI (match_operand:SI 0 "general_operand" "+g") ! (const_int -1)) ! (const_int 0)) (label_ref (match_operand 1 "" "")) (pc))) diff -rc2N gcc-2.0/config/vms.h gcc-2.1/config/vms.h *** gcc-2.0/config/vms.h Thu Feb 20 02:34:20 1992 --- gcc-2.1/config/vms.h Sat Mar 21 20:58:14 1992 *************** *** 36,42 **** /* Predefine this in CPP because VMS limits the size of command options and GNU CPP is not used on VMS except with GNU C. */ ! /* ??? __GNU__ is probably obsolete; delete it for 2.1. */ ! #define CPP_PREDEFINES "-Dvax -Dvms -DVMS -D__GNU__ -D__GNUC__=2" /* Strictly speaking, VMS does not use DBX at all, but the interpreter built into gas only speaks straight DBX. */ --- 36,50 ---- /* Predefine this in CPP because VMS limits the size of command options and GNU CPP is not used on VMS except with GNU C. */ ! #define CPP_PREDEFINES "-Dvax -Dvms -DVMS -D__GNUC__=2" + /* These match the definitions used in VAXCRTL, the VMS C run-time library */ + + #define SIZE_TYPE "unsigned int" + #define PTRDIFF_TYPE "int" + #define WCHAR_TYPE "unsigned int" + + /* Use memcpy for structure copying, and so forth. */ + #define TARGET_MEM_FUNCTIONS + /* Strictly speaking, VMS does not use DBX at all, but the interpreter built into gas only speaks straight DBX. */ *************** *** 163,167 **** fputs (".comm ", (FILE)), \ assemble_name ((FILE), (NAME)), \ ! fprintf ((FILE), ",%u\n", (ROUNDED))) /* We define this to prevent the name mangler from putting dollar signs into --- 171,175 ---- fputs (".comm ", (FILE)), \ assemble_name ((FILE), (NAME)), \ ! fprintf ((FILE), ",%u\n", (SIZE))) /* We define this to prevent the name mangler from putting dollar signs into *************** *** 173,177 **** #define NO_DOLLAR_IN_LABEL ! /* Add a "const" section. This is viewed by the assember as being nearly the same as the "data" section, with the only difference being that a flag is set for variables declared while in the const section. This --- 181,185 ---- #define NO_DOLLAR_IN_LABEL ! /* Add a "const" section. This is viewed by the assembler as being nearly the same as the "data" section, with the only difference being that a flag is set for variables declared while in the const section. This *************** *** 256,260 **** #ifdef L__main - #include #define __CTOR_LIST__ __gxx_init_0 --- 264,267 ---- *************** *** 271,275 **** extern func_ptr __CTOR_LIST_SHR__[1]; \ extern func_ptr __CTOR_LIST_SHR_END__[1]; \ - fflush(stdout); \ if( &__CTOR_LIST_SHR__[0] != &__CTOR_LIST__[1]) \ for (p = __CTOR_LIST_SHR__ + 1; p < __CTOR_LIST_SHR_END__ ; p++ ) \ --- 278,281 ---- diff -rc2N gcc-2.0/config/x-decrose gcc-2.1/config/x-decrose *** gcc-2.0/config/x-decrose Wed Dec 18 15:03:22 1991 --- gcc-2.1/config/x-decrose Tue Mar 17 10:36:31 1992 *************** *** 7,11 **** BUILD = CC = $(OLDCC) ! CLIB = -lld X_CFLAGS = $(DEB_OPT) $(MSTATS) $(SHLIB) X_CFLAGS_NODEBUG = $(NO_DEBUG) $(MSTATS) $(OPT) $(PROFILE) $(SHLIB) $(XCFLAGS) --- 7,11 ---- BUILD = CC = $(OLDCC) ! CLIB = -lbsd -lld X_CFLAGS = $(DEB_OPT) $(MSTATS) $(SHLIB) X_CFLAGS_NODEBUG = $(NO_DEBUG) $(MSTATS) $(OPT) $(PROFILE) $(SHLIB) $(XCFLAGS) diff -rc2N gcc-2.0/config/x-decstatn gcc-2.1/config/x-decstatn *** gcc-2.0/config/x-decstatn --- gcc-2.1/config/x-decstatn Mon Mar 16 17:13:38 1992 *************** *** 0 **** --- 1,17 ---- + # Define CC and OLDCC as the same, so that the tests: + # if [ x"$(OLDCC)" = x"$(CC)" ] ... + # + # will succeed (if OLDCC != CC, it is assumed that GCC is + # being used in secondary stage builds). We need to pass + # the -Wf,-XNg1500 option so the compiler can compile the + # G++ file cp-parse.c. Otherwise it complains about + # too many case statements. Down with fixed size tables! + + CC = $(OLDCC) + OLDCC = cc -Wf,-XNg1500 + + X_CFLAGS = -O1 + + # The bison output files are machine-indep, + # so different flags for a particular machine are not useful. + #BISONFLAGS = -l diff -rc2N gcc-2.0/config/x-encrose gcc-2.1/config/x-encrose *** gcc-2.0/config/x-encrose Tue Jan 28 16:07:05 1992 --- gcc-2.1/config/x-encrose Tue Mar 17 10:42:35 1992 *************** *** 7,11 **** BUILD = CC = $(OLDCC) ! CLIB = -lld X_CFLAGS = $(DEB_OPT) $(MSTATS) $(SHLIB) X_CFLAGS_NODEBUG = $(NO_DEBUG) $(MSTATS) $(OPT) $(PROFILE) $(SHLIB) $(XCFLAGS) --- 7,11 ---- BUILD = CC = $(OLDCC) ! CLIB = -lbsd -lld X_CFLAGS = $(DEB_OPT) $(MSTATS) $(SHLIB) X_CFLAGS_NODEBUG = $(NO_DEBUG) $(MSTATS) $(OPT) $(PROFILE) $(SHLIB) $(XCFLAGS) diff -rc2N gcc-2.0/config/x-hp320g gcc-2.1/config/x-hp320g *** gcc-2.0/config/x-hp320g Tue Jan 28 23:41:39 1992 --- gcc-2.1/config/x-hp320g Sat Mar 7 17:08:15 1992 *************** *** 19,22 **** --- 19,24 ---- # We can only guess. AR=/usr/local/gnubin/ar + RANLIB=/usr/local/gnubin/ranlib + RANLIB_TEST = [ -f /usr/local/gnubin/ranlib ] LIBCONVERT=/usr/local/bin/hpxt diff -rc2N gcc-2.0/config/x-hp800hpux gcc-2.1/config/x-hp800hpux *** gcc-2.0/config/x-hp800hpux --- gcc-2.1/config/x-hp800hpux Thu Mar 12 13:20:31 1992 *************** *** 0 **** --- 1 ---- + ALLOCA=alloca.o diff -rc2N gcc-2.0/config/x-i386rose gcc-2.1/config/x-i386rose *** gcc-2.0/config/x-i386rose Wed Dec 18 15:04:04 1991 --- gcc-2.1/config/x-i386rose Tue Mar 17 10:42:51 1992 *************** *** 7,11 **** BUILD = CC = $(OLDCC) ! CLIB = -lld X_CFLAGS = $(DEB_OPT) $(MSTATS) $(SHLIB) X_CFLAGS_NODEBUG = $(NO_DEBUG) $(MSTATS) $(OPT) $(PROFILE) $(SHLIB) $(XCFLAGS) --- 7,11 ---- BUILD = CC = $(OLDCC) ! CLIB = -lbsd -lld X_CFLAGS = $(DEB_OPT) $(MSTATS) $(SHLIB) X_CFLAGS_NODEBUG = $(NO_DEBUG) $(MSTATS) $(OPT) $(PROFILE) $(SHLIB) $(XCFLAGS) diff -rc2N gcc-2.0/config/x-i386sco gcc-2.1/config/x-i386sco *** gcc-2.0/config/x-i386sco Tue Nov 26 16:21:26 1991 --- gcc-2.1/config/x-i386sco Fri Mar 13 14:33:25 1992 *************** *** 2,5 **** RANLIB = : RANLIB_TEST = false ! CC = rcc -Di386 ! OLDCC = rcc -Di386 --- 2,8 ---- RANLIB = : RANLIB_TEST = false ! CC = rcc ! OLDCC = rcc ! RCCFLAGS = -Dunix -Di386 -DM_UNIX -DM_I386 ! XCFLAGS = $(RCCFLAGS) ! CLIB = -lPW diff -rc2N gcc-2.0/config/x-i860v4 gcc-2.1/config/x-i860v4 *** gcc-2.0/config/x-i860v4 Thu Jan 30 03:05:02 1992 --- gcc-2.1/config/x-i860v4 Sat Mar 14 00:17:01 1992 *************** *** 28,32 **** # the system's process size limit. To avoid this problem (which can # arise when a stage1 gcc is being used to build a stage2 gcc) you ! # *must* link in the C langauge version of alloca() which is supplied # with gcc to your stage1 version of gcc. The following definition # forces that to happen. --- 28,32 ---- # the system's process size limit. To avoid this problem (which can # arise when a stage1 gcc is being used to build a stage2 gcc) you ! # *must* link in the C language version of alloca() which is supplied # with gcc to your stage1 version of gcc. The following definition # forces that to happen. diff -rc2N gcc-2.0/config/x-iris gcc-2.1/config/x-iris *** gcc-2.0/config/x-iris Wed Mar 21 14:26:49 1990 --- gcc-2.1/config/x-iris Sat Mar 21 14:55:44 1992 *************** *** 1 **** ! CCLIBFLAGS=-O -Olimit 1000 --- 1,23 ---- ! # Define CC and OLDCC as the same, so that the tests: ! # if [ x"$(OLDCC)" = x"$(CC)" ] ... ! # ! # will succeed (if OLDCC != CC, it is assumed that GCC is ! # being used in secondary stage builds). We need to pass ! # the -Wf,-XNg1500 option so the compiler can compile the ! # G++ file cp-parse.c. Otherwise it complains about ! # too many case statements. Down with fixed size tables! ! ! CC = $(OLDCC) ! OLDCC = cc -Wf,-XNg1500 ! ! X_CFLAGS = -O1 ! ! # The bison output files are machine-indep, ! # so different flags for a particular machine are not useful. ! #BISONFLAGS = -l ! ! # This is so we can link collect2 running native. ! CLIB = -lmld ! ! # Show we need to use the C version of ALLOCA ! ALLOCA = alloca.o diff -rc2N gcc-2.0/config/x-m88kdolph gcc-2.1/config/x-m88kdolph *** gcc-2.0/config/x-m88kdolph --- gcc-2.1/config/x-m88kdolph Thu Mar 12 10:54:20 1992 *************** *** 0 **** --- 1,6 ---- + INSTALL = cp + + # Green Hills C on Dolphin UNIX System V/88 Release 3.2 Version 3.5/5.60 does + # not proviede alloca. + + ALLOCA=alloca.o diff -rc2N gcc-2.0/config/x-mips gcc-2.1/config/x-mips *** gcc-2.0/config/x-mips Mon Jan 6 17:27:54 1992 --- gcc-2.1/config/x-mips Sat Mar 14 00:41:35 1992 *************** *** 16,17 **** --- 16,20 ---- # so different flags for a particular machine are not useful. #BISONFLAGS = -l + + # This is so we can link collect2 running native. + CLIB = -lmld diff -rc2N gcc-2.0/config/x-mipsv gcc-2.1/config/x-mipsv *** gcc-2.0/config/x-mipsv --- gcc-2.1/config/x-mipsv Thu Mar 12 17:14:16 1992 *************** *** 0 **** --- 1,20 ---- + # Define CC and OLDCC as the same, so that the tests: + # if [ x"$(OLDCC)" = x"$(CC)" ] ... + # + # will succeed (if OLDCC != CC, it is assumed that GCC is + # being used in secondary stage builds). We need to pass + # the -Wf,-XNg1500 option so the compiler can compile the + # G++ file cp-parse.c. Otherwise it complains about + # too many case statements. Down with fixed size tables! + + CC = $(OLDCC) + OLDCC = cc -Wf,-XNg1500 + + X_CFLAGS = -O1 + + # The bison output files are machine-indep, + # so different flags for a particular machine are not useful. + #BISONFLAGS = -l + + # This enables collect2 to link. + CLIB= -L/usr/lib/cmplrs/cc2.11 -lmld diff -rc2N gcc-2.0/config/x-nws3250v4 gcc-2.1/config/x-nws3250v4 *** gcc-2.0/config/x-nws3250v4 --- gcc-2.1/config/x-nws3250v4 Tue Mar 10 16:01:22 1992 *************** *** 0 **** --- 1,19 ---- + # Define CC and OLDCC as the same, so that the tests: + # if [ x"$(OLDCC)" = x"$(CC)" ] ... + # + # will succeed (if OLDCC != CC, it is assumed that GCC is + # being used in secondary stage builds). We need to pass + # the -Wf,-XNg1500 option so the compiler can compile the + # G++ file cp-parse.c. Otherwise it complains about + # too many case statements. Down with fixed size tables! + + CC = $(OLDCC) + OLDCC = cc -Wf,-XNg1500 + CCLIBFLAGS = -G 0 + + ALLOCA = alloca.o + + # The bison output files are machine-indep, + # so different flags for a particular machine are not useful. + #BISONFLAGS = -l + diff -rc2N gcc-2.0/config/x-rs6000 gcc-2.1/config/x-rs6000 *** gcc-2.0/config/x-rs6000 Mon Jan 13 19:12:01 1992 --- gcc-2.1/config/x-rs6000 Wed Mar 11 18:56:28 1992 *************** *** 10,12 **** # For some reason, we need -lm for cc1. ! CLIB=-lm --- 10,15 ---- # For some reason, we need -lm for cc1. ! # We need -lld for collect2 (actually this only matters ! # for a native compiler, but this is as good a place as any ! # to define the symbol). ! CLIB=-lm -lld diff -rc2N gcc-2.0/config/x-sparcv4 gcc-2.1/config/x-sparcv4 *** gcc-2.0/config/x-sparcv4 --- gcc-2.1/config/x-sparcv4 Sun Mar 15 23:26:22 1992 *************** *** 0 **** --- 1,3 ---- + X_CFLAGS=-Bstatic -dn -DSVR4 + INSTALL=cp + ALLOCA=alloca.o diff -rc2N gcc-2.0/config/xm-hp320.h gcc-2.1/config/xm-hp320.h *** gcc-2.0/config/xm-hp320.h Fri Mar 23 15:29:14 1990 --- gcc-2.1/config/xm-hp320.h Fri Mar 20 22:06:04 1992 *************** *** 12,13 **** --- 12,16 ---- #define USE_C_ALLOCA #endif + + /* Don't try to use sys_siglist. */ + #define NO_SYS_SIGLIST diff -rc2N gcc-2.0/config/xm-hp800.h gcc-2.1/config/xm-hp800.h *** gcc-2.0/config/xm-hp800.h Wed Jan 29 00:45:53 1992 --- gcc-2.1/config/xm-hp800.h Mon Mar 16 14:03:48 1992 *************** *** 32,35 **** --- 32,36 ---- #else /* hpux */ + #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) extern int errno; #endif /* hpux */ diff -rc2N gcc-2.0/config/xm-i386isc.h gcc-2.1/config/xm-i386isc.h *** gcc-2.0/config/xm-i386isc.h --- gcc-2.1/config/xm-i386isc.h Wed Mar 11 02:54:11 1992 *************** *** 0 **** --- 1,4 ---- + #define REAL_VALUE_ATOF(x) strtod ((x), (char **)0) + extern double strtod (); + + #include "xm-i386v.h" diff -rc2N gcc-2.0/config/xm-i386sco.h gcc-2.1/config/xm-i386sco.h *** gcc-2.0/config/xm-i386sco.h --- gcc-2.1/config/xm-i386sco.h Mon Mar 2 03:04:19 1992 *************** *** 0 **** --- 1,7 ---- + /* Configuration for GCC for Intel i386 running SCO. */ + + #include "xm-i386v.h" + + /* On SCO 3.2.1, ldexp rejects values outside [0.5, 1). */ + + #define BROKEN_LDEXP diff -rc2N gcc-2.0/config/xm-mips.h gcc-2.1/config/xm-mips.h *** gcc-2.0/config/xm-mips.h Fri Feb 7 00:00:47 1992 --- gcc-2.1/config/xm-mips.h Sat Mar 21 18:59:23 1992 *************** *** 77,79 **** --- 77,83 ---- #if defined(__OSF1__) || defined(__OSF__) #define HAVE_VFPRINTF + #define HAVE_PUTENV + + #else + #define NO_STAB_H /* mips doesn't typically have stab.h */ #endif diff -rc2N gcc-2.0/config/xm-mipsnews.h gcc-2.1/config/xm-mipsnews.h *** gcc-2.0/config/xm-mipsnews.h --- gcc-2.1/config/xm-mipsnews.h Sat Mar 14 17:46:12 1992 *************** *** 0 **** --- 1,6 ---- + /* This file is for the Sony Mips News running "NewsOS Version 5", + which is really System V. */ + #include "xm-umips.h" + + /* Sony has a funny name for this symbol. */ + #define sys_siglist _sys_siglist diff -rc2N gcc-2.0/config/xm-nws3250v4.h gcc-2.1/config/xm-nws3250v4.h *** gcc-2.0/config/xm-nws3250v4.h --- gcc-2.1/config/xm-nws3250v4.h Tue Mar 10 16:03:32 1992 *************** *** 0 **** --- 1,9 ---- + #define USG + + #include "xm-mips.h" + + /* If compiling with mips compiler, we are probably using alloca.c, + so help it work right. */ + #ifndef __GNUC__ + #define USE_C_ALLOCA + #endif diff -rc2N gcc-2.0/config/xm-pc532-min.h gcc-2.1/config/xm-pc532-min.h *** gcc-2.0/config/xm-pc532-min.h --- gcc-2.1/config/xm-pc532-min.h Mon Mar 2 08:48:56 1992 *************** *** 0 **** --- 1,33 ---- + /* Configuration for GNU C-compiler for PC532 running Minix + Copyright (C) 1987,1990 Free Software Foundation, Inc. + Contributed by Jyrki Kuoppala , August 1990 + + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + /* We have USG-style include files and time functions */ + + #define USG + + #include "xm-ns32k.h" + + #ifndef HZ + #define HZ 60 + #endif + + #ifndef MAXPATHLEN + #define MAXPATHLEN 1024 + #endif diff -rc2N gcc-2.0/config/xm-sparcv4.h gcc-2.1/config/xm-sparcv4.h *** gcc-2.0/config/xm-sparcv4.h --- gcc-2.1/config/xm-sparcv4.h Sun Mar 15 23:25:19 1992 *************** *** 0 **** --- 1,52 ---- + /* Configuration for GNU C-compiler for Sun Sparc running System V.4. + Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Ron Guilmette (rfg@ncd.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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + + /* #defines that need visibility everywhere. */ + #define FALSE 0 + #define TRUE 1 + + /* This describes the machine the compiler is hosted on. */ + #define HOST_BITS_PER_CHAR 8 + #define HOST_BITS_PER_SHORT 16 + #define HOST_BITS_PER_INT 32 + #define HOST_BITS_PER_LONG 32 + #define HOST_BITS_PER_LONGLONG 64 + + /* Doubles are stored in memory with the high order word first. This + matters when cross-compiling. */ + #define HOST_WORDS_BIG_ENDIAN 1 + + /* target machine dependencies. + tm.h is a symbolic link to the actual target specific file. */ + #include "tm.h" + + /* Arguments to use with `exit'. */ + #define SUCCESS_EXIT_CODE 0 + #define FATAL_EXIT_CODE 33 + + /* If compiled with GNU C, use the built-in alloca. */ + #ifdef __GNUC__ + /* Use an arg in this macro because that's what some other + system does--let's avoid conflict. */ + #define alloca(x) __builtin_alloca(x) + #endif + + #include "xm-svr4.h" diff -rc2N gcc-2.0/config/xm-tahoe.h gcc-2.1/config/xm-tahoe.h *** gcc-2.0/config/xm-tahoe.h Tue Jul 23 13:15:13 1991 --- gcc-2.1/config/xm-tahoe.h Sat Mar 14 00:17:02 1992 *************** *** 24,28 **** * Dale Wiles and Kevin Zachmann. * ! * Adaptions for HCX by Piet van Oostrum, * University of Utrecht, The Netherlands (piet@cs.ruu.nl) * --- 24,28 ---- * Dale Wiles and Kevin Zachmann. * ! * Changes for HCX by Piet van Oostrum, * University of Utrecht, The Netherlands (piet@cs.ruu.nl) * diff -rc2N gcc-2.0/config/xm-vms.h gcc-2.1/config/xm-vms.h *** gcc-2.0/config/xm-vms.h Mon Nov 25 14:50:46 1991 --- gcc-2.1/config/xm-vms.h Sat Mar 14 00:17:03 1992 *************** *** 76,80 **** macro is used to help compare filenames in cp-lex.c. ! We also need to make sure that the names are all lower case, becuse we must be able to compare filenames to determine if a file implements a class. */ --- 76,80 ---- macro is used to help compare filenames in cp-lex.c. ! We also need to make sure that the names are all lower case, because we must be able to compare filenames to determine if a file implements a class. */ diff -rc2N gcc-2.0/config.sub gcc-2.1/config.sub *** gcc-2.0/config.sub Wed Feb 12 17:59:22 1992 --- gcc-2.1/config.sub Wed Mar 18 18:58:40 1992 *************** *** 60,64 **** -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -osf* | \ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ ! -harris) os= basic_machine=$1 --- 60,64 ---- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -osf* | \ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ ! -harris | -dolphin) os= basic_machine=$1 *************** *** 78,82 **** # Recognize the basic CPU types with without company name. # Some are omitted here because they have special meanings below. ! tahoe | i386 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \ | tron | a29k | 580 | i960 | h8300 | hppa) basic_machine=$basic_machine-unknown --- 78,82 ---- # Recognize the basic CPU types with without company name. # Some are omitted here because they have special meanings below. ! tahoe | i[34]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \ | tron | a29k | 580 | i960 | h8300 | hppa) basic_machine=$basic_machine-unknown *************** *** 171,175 **** ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) ! basic_machine=m68k-att ;; delta | 3300 | motorola-3300 | motorola-delta \ --- 171,175 ---- ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) ! basic_machine=m68000-att ;; delta | 3300 | motorola-3300 | motorola-delta \ *************** *** 222,227 **** ;; pbd) ! basic_machine=sparc-unicom ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun --- 222,230 ---- ;; pbd) ! basic_machine=sparc-tti ;; + pbb) + basic_machine=m68k-tti + ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun *************** *** 431,435 **** | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos* | -hpux* \ | -unos* | -osf* | -luna* | -dgux* | -solari* | -sym* | -amix* \ ! | -amigados* | -msdos* | -unicos* \ | -nindy* | -vxworks* | -ebmon* | -hds* | -m88kbcs*) ;; --- 434,438 ---- | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos* | -hpux* \ | -unos* | -osf* | -luna* | -dgux* | -solari* | -sym* | -amix* \ ! | -amigados* | -msdos* | -unicos* | -aos* \ | -nindy* | -vxworks* | -ebmon* | -hds* | -m88kbcs*) ;; *************** *** 446,451 **** os=-bsd ;; ! -aos*) ! os=-bsd ;; -ctix* | -uts*) --- 449,454 ---- os=-bsd ;; ! -acis*) ! os=-aos ;; -ctix* | -uts*) *************** *** 452,455 **** --- 455,464 ---- os=-sysv ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; -svr4) os=-sysv4 *************** *** 483,492 **** # os=-sunos4 ;; sparc-* | *-sun) os=-sunos411 ;; - romp-*) - os=-bsd - ;; *-ibm) os=-aix --- 492,501 ---- # os=-sunos4 ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; sparc-* | *-sun) os=-sunos411 ;; *-ibm) os=-aix *************** *** 503,506 **** --- 512,518 ---- *-dg) os=-dgux + ;; + *-dolphin) + os=-sysv3 ;; m88k-omron*) diff -rc2N gcc-2.0/configure gcc-2.1/configure *** gcc-2.0/configure Sun Feb 16 04:13:10 1992 --- gcc-2.1/configure Mon Mar 23 14:38:23 1992 *************** *** 1,5 **** #!/bin/sh # Configuration script for GNU CC ! # Copyright (C) 1988, 1990, 1991 Free Software Foundation, Inc. #This file is part of GNU CC. --- 1,5 ---- #!/bin/sh # Configuration script for GNU CC ! # Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc. #This file is part of GNU CC. *************** *** 43,46 **** --- 43,47 ---- hard_link=ln symbolic_link='ln -s' + copy=cp # Record all the arguments, to write them in config.status. *************** *** 57,62 **** if [ x$next_srcdir = xyes ] then srcdir=$arg; next_srcdir=; - else if [ x$next_objdir = xyes ] - then objdir=$arg; next_objdir=; # Handle -host, etc, with space between it and argument. else if [ x$next_host = xyes ] --- 58,61 ---- *************** *** 72,81 **** next_srcdir=yes ;; - -objdir=* | --objdir=* | --objdi=* | --objd=* | --obj=* | --ob=* | --o=*) - objdir=`echo $arg | sed 's/-*o[a-z]*=//'` - ;; - -objdir | --objdir | --objdi | --objd | --obj | --ob | --o) - next_objdir=yes - ;; -host | --host | --hos | --ho | --h) next_host=yes --- 71,74 ---- *************** *** 96,99 **** --- 89,93 ---- nfp=yes ;; + -x | --x) ;; # ignored *) # Allow configure HOST TARGET *************** *** 105,109 **** ;; esac ! fi; fi; fi; fi done --- 99,103 ---- ;; esac ! fi; fi; fi done *************** *** 123,129 **** if [ x$srcdirdefaulted = x ] then ! echo "$progname: Can't find compiler sources in \`${srcdir}'." 1>&2 else ! echo "$progname: Can't find compiler sources in \`.' or \`..'." 1>&2 fi exit 1 --- 117,123 ---- if [ x$srcdirdefaulted = x ] then ! echo "$progname: Can't find compiler sources in \`${srcdir}'" 1>&2 else ! echo "$progname: Can't find compiler sources in \`.' or \`..'" 1>&2 fi exit 1 *************** *** 130,142 **** fi ! # If the directory for object files was specified, ! # go to that directory and do the configuring there. ! # Replace srcdir with an absolute file name ! # so that changing working directory does not invalidate it. ! if [ x$objdir = x ] ! then true ! else ! srcdir=`(cd $srcdir; pwd)` ! cd $objdir fi --- 124,131 ---- fi ! if [ -r ${srcdir}/config.status ] && [ x$srcdir != x. ] ! then ! echo "$progname: \`configure' has been run in \`${srcdir}'" 1>&2 ! exit 1 fi *************** *** 144,154 **** if [ x$target = x ] then ! echo "No target specified." ! echo "Usage: $progname [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] TARGET" ! echo -n "Where HOST and TARGET are something like " ! echo "\`vax', \`sun3', \`encore', etc." if [ -r config.status ] then ! cat config.status fi exit 1 --- 133,143 ---- if [ x$target = x ] then ! echo "No target specified." 1>&2 ! echo "Usage: $progname [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] TARGET" 1>&2 ! echo -n "Where HOST and TARGET are something like " 1>&2 ! echo "\`vax', \`sun3', \`encore', etc." 1>&2 if [ -r config.status ] then ! cat config.status 1>&2 fi exit 1 *************** *** 220,224 **** i386-sequent-bsd*) # 80386 from Sequent xm_file=xm-i386.h ! tm_file=seq386.h ;; i386-*-mach*) --- 209,223 ---- i386-sequent-bsd*) # 80386 from Sequent xm_file=xm-i386.h ! if [ x$gas = xyes ] ! then ! tm_file=seq386gas.h ! else ! tm_file=seq386.h ! fi ! ;; ! i386-*-bsd) ! xm_file=xm-i386.h ! tm_file=i386bsd.h ! tmake_file=t-libc-ok ;; i386-*-mach*) *************** *** 228,232 **** ;; i386-*-sco*) # 80386 running SCO system ! xm_file=xm-i386v.h tm_file=i386sco.h xmake_file=x-i386sco --- 227,231 ---- ;; i386-*-sco*) # 80386 running SCO system ! xm_file=xm-i386sco.h tm_file=i386sco.h xmake_file=x-i386sco *************** *** 234,240 **** ;; i386-*-isc*) # 80386 running ISC system ! xm_file=xm-i386v.h tm_file=i386isc.h xmake_file=x-i386isc ;; i386-ibm-aix*) # IBM PS/2 running AIX --- 233,240 ---- ;; i386-*-isc*) # 80386 running ISC system ! xm_file=xm-i386isc.h tm_file=i386isc.h xmake_file=x-i386isc + tmake_file=t-i386isc ;; i386-ibm-aix*) # IBM PS/2 running AIX *************** *** 297,301 **** fi ;; ! sparc-unicom-*) tm_file=pbd.h xm_file=xm-pbd.h --- 297,301 ---- fi ;; ! sparc-tti-*) tm_file=pbd.h xm_file=xm-pbd.h *************** *** 308,324 **** ;; sparc-*-sysv4*) ! tm_file=sparc.h tmake_file=t-svr4 ! ;; ! m68k-tti-*) ! tm_file=tti68k.h ;; - # This has not been updated in a while. I don't think it will be. - # mab@tticda.tti.com might be able to say more. If it does not get - # updated, the newpbb.h file can be yanked, as it is not for a - # general machine. Mike Stump . - # m68k-tti2-*) - # tm_file=newpbb.h - # ;; m68k-*-amix*) # Commodore variant of V.4. tm_file=amix.h --- 308,316 ---- ;; sparc-*-sysv4*) ! xm_file=xm-sparcv4.h ! tm_file=sparcv4.h tmake_file=t-svr4 ! xmake_file=x-sparcv4 ;; m68k-*-amix*) # Commodore variant of V.4. tm_file=amix.h *************** *** 337,341 **** out_file=next.c xm_file=xm-next.h ! tmake_file=t-libc-ok ;; m68k-sun-sunos3*) --- 329,333 ---- out_file=next.c xm_file=xm-next.h ! tmake_file=t-next ;; m68k-sun-sunos3*) *************** *** 347,354 **** fi ;; ! m68k-sun-mach*) ! tm_file=sun3mach.h ! ;; ! m68k-sun-sunos4*) if [ x$nfp = xyes ] then --- 339,343 ---- fi ;; ! m68k-sun-sunos*) # For Sunos 4 (the default). if [ x$nfp = xyes ] then *************** *** 358,361 **** --- 347,357 ---- fi ;; + m68k-sun-mach*) + tm_file=sun3mach.h + ;; + m68k-tti-*) + tm_file=pbb.h + xm_file=xm-m68kv.h + ;; m68k-hp-hpux*) # HP 9000 series 300 xm_file=xm-hp320.h *************** *** 476,479 **** --- 472,482 ---- tm_file=merlin.h ;; + ns32k-pc532-mach*) + tm_file=pc532-mach.h + ;; + ns32k-pc532-minix*) + tm_file=pc532-min.h + xm_file=xm-pc532-min.h + ;; m88k-*-luna*) tm_file=m88kluna.h *************** *** 491,494 **** --- 494,502 ---- tm_file=m88kv4.h ;; + m88k-dolphin-sysv3*) + tm_file=m88kdolph.h + xm_file=xm-m88kv3.h + xmake_file=x-m88kdolph + ;; m88k-*-sysv3*) tm_file=m88kv3.h *************** *** 495,502 **** xm_file=xm-m88kv3.h ;; - m88k-*) - tm_file=m88k.h - xm_file=xm-m88k.h - ;; # This hasn't been upgraded to GCC 2. # fx80-alliant-*) # Alliant FX/80 --- 503,506 ---- *************** *** 530,542 **** xm_file=xm-irix4.h install_with_cp=yes ;; ! mips-sgi-irix*) # Mostly like a MIPS. tm_file=iris.h xm_file=xm-iris.h install_with_cp=yes ;; ! mips-*-sysv) # MIPS System V. tm_file=mips-sysv.h xm_file=xm-umips.h ;; mips-mips-*) # Default MIPS environment. --- 534,554 ---- xm_file=xm-irix4.h install_with_cp=yes + xmake_file=x-iris ;; ! mips-sgi*) # Mostly like a MIPS. tm_file=iris.h xm_file=xm-iris.h install_with_cp=yes + xmake_file=x-iris + ;; + mips-*-sysv4*) # MIPS System V.4. + tm_file=mips-svr4.h + xm_file=xm-umips.h + xmake_file=x-mipsv ;; ! mips-*-sysv*) # MIPS System V. tm_file=mips-sysv.h xm_file=xm-umips.h + xmake_file=x-mipsv ;; mips-mips-*) # Default MIPS environment. *************** *** 546,551 **** tm_file=decstatn.h tmake_file=t-decstatn ;; ! mips-dec-osf*) # Decstation with OSF/1. tm_file=decrose.h xmake_file=x-decrose --- 558,564 ---- tm_file=decstatn.h tmake_file=t-decstatn + xmake_file=x-decstatn ;; ! mips-dec-osf*) # Decstation running OSF/1 reference port with OSF/rose. tm_file=decrose.h xmake_file=x-decrose *************** *** 552,562 **** tmake_file=t-decrose ;; ! mips-sony-bsd*) # Sony NEWS 3600 or risc/news. tm_file=mips-news.h ;; ! mips-*-bsd*) # BSD 4.3 variant of MIPS system. tm_file=mips-bsd.h ;; ! # This hasn't been upgraded to GCC 2. # pyramid | pyramid-* | pyramid-*) # cpu_type=pyr --- 565,582 ---- tmake_file=t-decrose ;; ! mips-sony-bsd*) # Sony NEWS 3600 or risc/news. tm_file=mips-news.h ;; ! mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0. ! # That is based on svr4. ! # t-svr4 is not right because this system doesn't use ELF. ! tm_file=mips-news5.h ! xm_file=xm-mipsnews.h ! ;; ! mips-*-bsd*) # BSD 4.3 variant of MIPS system. tm_file=mips-bsd.h ;; ! # This port has been upgraded and is almost working. ! # Turn it back on if you would like to help debug it. # pyramid | pyramid-* | pyramid-*) # cpu_type=pyr *************** *** 573,577 **** xmake_file=x-a29kunix ;; ! romp-*-bsd*) xm_file=xm-romp.h tm_file=romp.h --- 593,597 ---- xmake_file=x-a29kunix ;; ! romp-*-aos*) xm_file=xm-romp.h tm_file=romp.h *************** *** 585,588 **** --- 605,609 ---- xm_file=xm-rs6k-m.h tm_file=rs6000-mach.h + tmake_file=t-rs6000 ;; rs6000-*) *************** *** 589,594 **** xm_file=xm-rs6000.h tm_file=rs6000.h ;; ! hp800-*-* | hp700-*-*) cpu_type=hp800 xm_file=xm-hp800.h --- 610,616 ---- xm_file=xm-rs6000.h tm_file=rs6000.h + tmake_file=t-rs6000 ;; ! hp800-*-bsd* | hp700-*-bsd*) cpu_type=hp800 xm_file=xm-hp800.h *************** *** 595,598 **** --- 617,630 ---- tm_file=hp800.h ;; + hp800-*-hpux* | hp700-*-hpux*) + cpu_type=hp800 + xm_file=xm-hp800.h + tm_file=hp800hpux.h + xmake_file=x-hp800hpux + ;; + *) + echo "Configuration $machine not recognized" 1>&2 + exit 1 + ;; esac *************** *** 659,663 **** then echo "$progname: cannot create a link \`$link'," 1>&2 ! echo "since the file \`config/$file' does not exist." 1>&2 exit 1 fi --- 691,695 ---- then echo "$progname: cannot create a link \`$link'," 1>&2 ! echo "since the file \`config/$file' does not exist" 1>&2 exit 1 fi *************** *** 666,677 **** rm -f config.status # Make a symlink if possible, otherwise try a hard link ! $symbolic_link ${srcdir}/config/$file $link 2>/dev/null || $hard_link ${srcdir}/config/$file $link if [ ! -r $link ] then ! echo "$progname: unable to link \`$link' to \`${srcdir}/config/$file'." 1>&2 exit 1 fi ! echo "Linked \`$link' to \`${srcdir}/config/$file'." done --- 698,709 ---- rm -f config.status # Make a symlink if possible, otherwise try a hard link ! $symbolic_link ${srcdir}/config/$file $link 2>/dev/null || $hard_link ${srcdir}/config/$file $link || $copy ${srcdir}/config/$file $link if [ ! -r $link ] then ! echo "$progname: unable to link \`$link' to \`${srcdir}/config/$file'" 1>&2 exit 1 fi ! echo "Linked \`$link' to \`${srcdir}/config/$file'" done diff -rc2N gcc-2.0/cp-call.c gcc-2.1/cp-call.c *** gcc-2.0/cp-call.c Mon Feb 17 01:03:15 1992 --- gcc-2.1/cp-call.c Sun Mar 22 16:39:23 1992 *************** *** 36,43 **** --- 36,53 ---- extern int xmalloc (); extern void free (); + extern void sorry (); + extern tree build_function_call_maybe (); + + extern int inhibit_warnings; + extern int flag_assume_nonnull_objects; + extern tree ctor_label, dtor_label; + /* See cp-decl.c for comment of this variable. */ extern int flag_int_enum_equivalence; + /* From cp-typeck.c: */ + extern tree unary_complex_lvalue (); + /* Compute the ease with which a conversion can be performed between an expected and the given type. */ *************** *** 137,141 **** { static int explained; - extern void sorry (); if (CONTRAVARIANT_HARSHNESS (new_harshness)) message_2_types (sorry, "cannot cast `%d' to `%d' at function call site", p2, p1); --- 147,150 ---- *************** *** 207,211 **** else return 1; ! /* Now test the OFFSET_TYPE's target compatability. */ type = TREE_TYPE (type); parmtype = TREE_TYPE (parmtype); --- 216,220 ---- else return 1; ! /* Now test the OFFSET_TYPE's target compatibility. */ type = TREE_TYPE (type); parmtype = TREE_TYPE (parmtype); *************** *** 307,311 **** return INT_TO_BD_HARSHNESS (0); ! if (IS_AGGR_TYPE_2 (ttl, ttr)) { int b_or_d = get_base_distance (ttl, ttr, 0, 0); --- 316,320 ---- return INT_TO_BD_HARSHNESS (0); ! if (TREE_CODE (ttl) == RECORD_TYPE && TREE_CODE (ttr) == RECORD_TYPE) { int b_or_d = get_base_distance (ttl, ttr, 0, 0); *************** *** 437,441 **** derived to base, allow it. Otherwise, types must be compatible in the strong sense. */ ! if (IS_AGGR_TYPE_2 (ttl, ttr)) { int b_or_d = get_base_distance (ttl, ttr, 0, 0); --- 446,450 ---- derived to base, allow it. Otherwise, types must be compatible in the strong sense. */ ! if (TREE_CODE (ttl) == RECORD_TYPE && TREE_CODE (ttr) == RECORD_TYPE) { int b_or_d = get_base_distance (ttl, ttr, 0, 0); *************** *** 474,478 **** } ! /* Algorithm: Start out with no stikes against. For each argument which requires a (subjective) hard conversion (such as between floating point and integer), issue a strike. If there are the same --- 483,487 ---- } ! /* Algorithm: Start out with no strikes against. For each argument which requires a (subjective) hard conversion (such as between floating point and integer), issue a strike. If there are the same *************** *** 487,491 **** Conversions between builtin and user-defined types are allowed, but ! no function involving such a conversion is prefered to one which does not require such a conversion. Furthermore, such conversions must be unique. */ --- 496,500 ---- Conversions between builtin and user-defined types are allowed, but ! no function involving such a conversion is preferred to one which does not require such a conversion. Furthermore, such conversions must be unique. */ *************** *** 534,538 **** /* Keep quiet about possible contravariance violations. */ - extern int inhibit_warnings; int old_inhibit_warnings = inhibit_warnings; inhibit_warnings = 1; --- 543,546 ---- *************** *** 734,738 **** /* Calling a non-const member function from a const member function is probably invalid, but for now we let it only draw a warning. ! We indicate that such a mismatch has occured by setting the harshness to a maximum value. */ if (TREE_CODE (TREE_TYPE (TREE_VALUE (tta_in))) == POINTER_TYPE --- 742,746 ---- /* Calling a non-const member function from a const member function is probably invalid, but for now we let it only draw a warning. ! We indicate that such a mismatch has occurred by setting the harshness to a maximum value. */ if (TREE_CODE (TREE_TYPE (TREE_VALUE (tta_in))) == POINTER_TYPE *************** *** 753,757 **** BASETYPE is the context from which we start method resolution or NULL if we are comparing overloaded functions. ! CANDIDATES is the array of canidates we have to choose from. N_CANDIDATES is the length of CANDIDATES. PARMS is a TREE_LIST of parameters to the function we'll ultimately --- 761,765 ---- BASETYPE is the context from which we start method resolution or NULL if we are comparing overloaded functions. ! CANDIDATES is the array of candidates we have to choose from. N_CANDIDATES is the length of CANDIDATES. PARMS is a TREE_LIST of parameters to the function we'll ultimately *************** *** 855,866 **** if (USER_HARSHNESS (cp[i].harshness[index])) { ! TREE_VALUE (tta) ! = build_type_conversion (CALL_EXPR, TREE_VALUE (ttf), TREE_PURPOSE (tta), 2); ! if (TREE_VALUE (tta)) { ! if (TREE_CODE (TREE_VALUE (tta)) != CONVERT_EXPR ! && (TREE_CODE (TREE_VALUE (tta)) != NOP_EXPR ! || comp_target_types (TREE_TYPE (TREE_VALUE (tta)), ! TREE_TYPE (TREE_OPERAND (TREE_VALUE (tta), 0)), 1))) exact_conversions += 1; } --- 863,875 ---- if (USER_HARSHNESS (cp[i].harshness[index])) { ! tree this_parm = build_type_conversion (CALL_EXPR, TREE_VALUE (ttf), TREE_PURPOSE (tta), 2); ! if (basetype != NULL_TREE) ! TREE_VALUE (tta) = this_parm; ! if (this_parm) { ! if (TREE_CODE (this_parm) != CONVERT_EXPR ! && (TREE_CODE (this_parm) != NOP_EXPR ! || comp_target_types (TREE_TYPE (this_parm), ! TREE_TYPE (TREE_OPERAND (this_parm, 0)), 1))) exact_conversions += 1; } *************** *** 997,1001 **** { char *buf = (char *)alloca (8192); ! error ("ambiguous request for function from distinct base classes of type `%s'", TYPE_NAME_STRING (basetype)); error ("first candidate is `%s'", fndecl_as_string (0, candidates[best].function, 1)); --- 1006,1010 ---- { char *buf = (char *)alloca (8192); ! error_with_aggr_type (basetype, "ambiguous request for function from distinct base classes of type `%s'"); error ("first candidate is `%s'", fndecl_as_string (0, candidates[best].function, 1)); *************** *** 1117,1121 **** { tree rval; - extern int flag_assume_nonnull_objects; int old_assume_nonnull_objects = flag_assume_nonnull_objects; --- 1126,1129 ---- *************** *** 1326,1330 **** /* Because this syntactic form does not allow a pointer to a base class to be `stolen', ! we need not protect the drived->base conversion that happens here. --- 1334,1338 ---- /* Because this syntactic form does not allow a pointer to a base class to be `stolen', ! we need not protect the derived->base conversion that happens here. *************** *** 1599,1603 **** if (typedef_name && TREE_CODE (typedef_name) == TYPE_DECL) { ! /* Cannonicalize the typedef name. */ basetype = TREE_TYPE (typedef_name); name = TYPE_IDENTIFIER (basetype); --- 1607,1611 ---- if (typedef_name && TREE_CODE (typedef_name) == TYPE_DECL) { ! /* Canonicalize the typedef name. */ basetype = TREE_TYPE (typedef_name); name = TYPE_IDENTIFIER (basetype); *************** *** 1632,1637 **** else if (instance == C_C_D || instance == current_class_decl) { - extern tree ctor_label, dtor_label; - /* When doing initialization, we side-effect the TREE_TYPE of C_C_D, hence we cannot set up BASETYPE from CURRENT_CLASS_TYPE. */ --- 1640,1643 ---- *************** *** 1688,1694 **** tree inst_ptr_basetype; - /* from the file "cp-typeck.c". */ - extern tree unary_complex_lvalue (); - static_call_context = (TREE_CODE (instance) == NOP_EXPR && TREE_OPERAND (instance, 0) == error_mark_node); --- 1694,1697 ---- *************** *** 1763,1767 **** basetype = inst_ptr_basetype; else ! instance_ptr = convert (TYPE_POINTER_TO (basetype), instance_ptr); } else --- 1766,1774 ---- basetype = inst_ptr_basetype; else ! { ! instance_ptr = convert (TYPE_POINTER_TO (basetype), instance_ptr); ! if (instance_ptr == error_mark_node) ! return error_mark_node; ! } } else *************** *** 1873,1877 **** } ! if (flag_this_is_variable) { constp = 0; --- 1880,1884 ---- } ! if (flag_this_is_variable > 0) { constp = 0; *************** *** 1981,1986 **** fakes out `build_decl_overload' into doing the right thing. */ TREE_CHAIN (last) = void_list_node; ! method_name = build_decl_overload (IDENTIFIER_POINTER (name), ! parmtypes, 1 + (name == constructor_name (save_basetype))); TREE_CHAIN (last) = NULL_TREE; --- 1988,1992 ---- fakes out `build_decl_overload' into doing the right thing. */ TREE_CHAIN (last) = void_list_node; ! method_name = build_decl_overload (name, parmtypes, 1 + (name == constructor_name (save_basetype))); TREE_CHAIN (last) = NULL_TREE; *************** *** 2063,2067 **** basetype = BINFO_TYPE (basetypes); ! /* Cast the instance variable to the approriate type. */ TREE_VALUE (parmtypes) = TYPE_POINTER_TO (basetype); --- 2069,2073 ---- basetype = BINFO_TYPE (basetypes); ! /* Cast the instance variable to the appropriate type. */ TREE_VALUE (parmtypes) = TYPE_POINTER_TO (basetype); *************** *** 2590,2594 **** int used, size; ! /* Count the number of bytes of arguements to operator->(), not to the method itself. In the tally, don't count bytes for pointer to member function or for the bytecount. */ --- 2596,2600 ---- int used, size; ! /* Count the number of bytes of arguments to operator->(), not to the method itself. In the tally, don't count bytes for pointer to member function or for the bytecount. */ *************** *** 2636,2641 **** else { ! if (TREE_EXTERNAL (function)) ! assemble_external (function); TREE_USED (function) = 1; function = default_conversion (function); --- 2642,2646 ---- else { ! assemble_external (function); TREE_USED (function) = 1; function = default_conversion (function); *************** *** 2682,2687 **** int buildxxx; { - extern tree build_function_call_maybe (); - /* must check for overloading here */ tree overload_name, functions, function, parm; --- 2687,2690 ---- *************** *** 2726,2730 **** else parmtypes = void_list_node; ! overload_name = build_decl_overload (IDENTIFIER_POINTER (fnname), parmtypes, 0); /* Now check to see whether or not we can win. --- 2729,2733 ---- else parmtypes = void_list_node; ! overload_name = build_decl_overload (fnname, parmtypes, 0); /* Now check to see whether or not we can win. diff -rc2N gcc-2.0/cp-class.c gcc-2.1/cp-class.c *** gcc-2.0/cp-class.c Mon Feb 17 01:03:21 1992 --- gcc-2.1/cp-class.c Sun Mar 22 16:39:26 1992 *************** *** 90,94 **** tree the_null_vtable_entry; ! /* Way of stacking langauge names. */ tree *current_lang_base, *current_lang_stack; static int current_lang_stacksize; --- 90,94 ---- tree the_null_vtable_entry; ! /* Way of stacking language names. */ tree *current_lang_base, *current_lang_stack; static int current_lang_stacksize; *************** *** 257,261 **** /* A pointer to a virtual base member of a non-null object is non-null. Therefore, we only need to test for zeroness once. ! Make EXPR the cannonical expression to deal with here. */ if (null_expr) { --- 257,261 ---- /* A pointer to a virtual base member of a non-null object is non-null. Therefore, we only need to test for zeroness once. ! Make EXPR the canonical expression to deal with here. */ if (null_expr) { *************** *** 303,307 **** it will be zero, or initialized to some legal value to which we may add. */ ! if (nonnull == 0 && (alias_this == 0 || flag_this_is_variable)) { if (null_expr) --- 303,307 ---- it will be zero, or initialized to some legal value to which we may add. */ ! if (nonnull == 0 && (alias_this == 0 || flag_this_is_variable > 0)) { if (null_expr) *************** *** 369,375 **** build_tree_list (NULL_TREE, pfn))); tree entry = build (CONSTRUCTOR, vtable_entry_type, NULL_TREE, elems); - if (! int_fits_type_p (delta, short_integer_type_node)) - sorry ("object size exceedes built-in limit for virtual function table implementation"); TREE_CONSTANT (entry) = 1; TREE_STATIC (entry) = 1; --- 369,384 ---- build_tree_list (NULL_TREE, pfn))); tree entry = build (CONSTRUCTOR, vtable_entry_type, NULL_TREE, elems); + /* DELTA is constructed by `size_int', which means it may be an + unsigned quantity on some platforms. Therefore, we cannot use + `int_fits_type_p', because when DELTA is really negative, + `force_fit_type' will make it look like a very large number. */ + + if ((TREE_INT_CST_LOW (TYPE_MAX_VALUE (short_integer_type_node)) + < TREE_INT_CST_LOW (delta)) + || (TREE_INT_CST_LOW (delta) + < TREE_INT_CST_LOW (TYPE_MIN_VALUE (short_integer_type_node)))) + sorry ("object size exceeds built-in limit for virtual function table implementation"); + TREE_CONSTANT (entry) = 1; TREE_STATIC (entry) = 1; *************** *** 461,467 **** /* Build a virtual function for type TYPE. ! If BINFO is non-NULL, build the vtable starting with the intial approximation that it is the same as the one which is the head of ! the assocation list. */ static tree build_vtable (binfo, type) --- 470,476 ---- /* Build a virtual function for type TYPE. ! If BINFO is non-NULL, build the vtable starting with the initial approximation that it is the same as the one which is the head of ! the association list. */ static tree build_vtable (binfo, type) *************** *** 1123,1127 **** { obstack_blank (ob, sizeof (struct tree_common) ! + tree_code_length[TREE_VEC] * sizeof (char *) + len * sizeof (tree)); tmp_vec = (tree) obstack_base (ob); --- 1132,1137 ---- { obstack_blank (ob, sizeof (struct tree_common) ! + tree_code_length[(int) TREE_VEC] ! * sizeof (char *) + len * sizeof (tree)); tmp_vec = (tree) obstack_base (ob); *************** *** 1128,1132 **** bcopy (method_vec, tmp_vec, (sizeof (struct tree_common) ! + tree_code_length[TREE_VEC] * sizeof (char *) + (len-1) * sizeof (tree))); method_vec = tmp_vec; --- 1138,1142 ---- bcopy (method_vec, tmp_vec, (sizeof (struct tree_common) ! + tree_code_length[(int) TREE_VEC] * sizeof (char *) + (len-1) * sizeof (tree))); method_vec = tmp_vec; *************** *** 2081,2084 **** --- 2091,2095 ---- CLASSTYPE_INTERFACE_ONLY (t) = interface_only; CLASSTYPE_INTERFACE_UNKNOWN (t) = interface_unknown; + CLASSTYPE_VBASE_SIZE (t) = integer_zero_node; TYPE_REDEFINED (t) = 1; } *************** *** 2136,2140 **** Class A's vtbl: Class B's vtbl: -------------------------------------------------------------------- ! | A's virtual functions| | B's virtual funcitions | | | | (may inherit some from A). | -------------------------------------------------------------------- --- 2147,2151 ---- Class A's vtbl: Class B's vtbl: -------------------------------------------------------------------- ! | A's virtual functions| | B's virtual functions | | | | (may inherit some from A). | -------------------------------------------------------------------- *************** *** 2150,2154 **** this allows the program to make references to any function, virtual ! or otherwise in a type-consistant manner. */ tree --- 2161,2165 ---- this allows the program to make references to any function, virtual ! or otherwise in a type-consistent manner. */ tree *************** *** 2351,2362 **** && TREE_CODE (TREE_TYPE (x)) == RECORD_TYPE) { ! /* @@ Um. This doesn't seem to be handled properly, at ! least in my PT test cases. Not sure if it's really ! supposed to work for non-PT cases. Let's find out. */ static tree t, d; d = DECL_NAME (x); t = DECL_NAME (TYPE_NAME (TREE_TYPE (x))); ! if (d == t) continue; ! assert (IDENTIFIER_TEMPLATE (t) != NULL_TREE); t = DECL_NAME (TREE_PURPOSE (IDENTIFIER_TEMPLATE (t))); assert (t == d); --- 2362,2373 ---- && TREE_CODE (TREE_TYPE (x)) == RECORD_TYPE) { ! /* @@ Um. This doesn't seem to be handled properly, at ! least in my PT test cases. Not sure if it's really ! supposed to work for non-PT cases. Let's find out. */ static tree t, d; d = DECL_NAME (x); t = DECL_NAME (TYPE_NAME (TREE_TYPE (x))); ! if (d == t) continue; ! assert (IDENTIFIER_TEMPLATE (t) != NULL_TREE); t = DECL_NAME (TREE_PURPOSE (IDENTIFIER_TEMPLATE (t))); assert (t == d); *************** *** 2728,2732 **** method_vec = 0; ! /* Just in case these got accidently filled in by syntax errors. */ TYPE_HAS_CONSTRUCTOR (t) = 0; --- 2739,2743 ---- method_vec = 0; ! /* Just in case these got accidentally filled in by syntax errors. */ TYPE_HAS_CONSTRUCTOR (t) = 0; *************** *** 3335,3339 **** /* If the type has methods, we want to think about cutting down ! the amout of symbol table stuff we output. The value stored in the TYPE_DECL's DECL_IGNORED_P slot is a first approximation. For example, if a member function is seen and we decide to --- 3346,3350 ---- /* If the type has methods, we want to think about cutting down ! the amount of symbol table stuff we output. The value stored in the TYPE_DECL's DECL_IGNORED_P slot is a first approximation. For example, if a member function is seen and we decide to *************** *** 3360,3365 **** /* Finish debugging output for this type. */ ! if (! DECL_IGNORED_P (TYPE_NAME (t))) ! rest_of_type_compilation (t, global_bindings_p ()); return t; --- 3371,3375 ---- /* Finish debugging output for this type. */ ! rest_of_type_compilation (t, global_bindings_p ()); return t; *************** *** 3371,3375 **** *NONNULL is set iff INSTANCE can be known to be nonnull, regardless ! of our knownledge of its type. */ int resolves_to_fixed_type_p (instance, nonnull) --- 3381,3385 ---- *NONNULL is set iff INSTANCE can be known to be nonnull, regardless ! of our knowledge of its type. */ int resolves_to_fixed_type_p (instance, nonnull) *************** *** 3461,3465 **** { if (instance == current_class_decl ! && ! flag_this_is_variable) { /* Some people still use `this = 0' inside destructors. */ --- 3471,3475 ---- { if (instance == current_class_decl ! && flag_this_is_variable <= 0) { /* Some people still use `this = 0' inside destructors. */ *************** *** 3466,3474 **** *nonnull = ! DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (current_function_decl)); /* In a constructor, we know our type. */ ! if (DECL_CONSTRUCTOR_P (current_function_decl)) return 1; } else if (TREE_CODE (TREE_TYPE (instance)) == REFERENCE_TYPE) ! /* Reference variables should be refernces to objects. */ *nonnull = 1; } --- 3476,3484 ---- *nonnull = ! DESTRUCTOR_NAME_P (DECL_ASSEMBLER_NAME (current_function_decl)); /* In a constructor, we know our type. */ ! if (flag_this_is_variable < 0) return 1; } else if (TREE_CODE (TREE_TYPE (instance)) == REFERENCE_TYPE) ! /* Reference variables should be references to objects. */ *nonnull = 1; } *************** *** 3629,3636 **** unuse_fields (type); ! tags = CLASSTYPE_TAGS (type); ! while (tags) { TREE_NONLOCAL_FLAG (TREE_VALUE (tags)) = 1; pushtag (TREE_PURPOSE (tags), TREE_VALUE (tags)); if (IDENTIFIER_CLASS_VALUE (TREE_PURPOSE (tags)) == NULL_TREE --- 3639,3647 ---- unuse_fields (type); ! for (tags = CLASSTYPE_TAGS (type); tags; tags = TREE_CHAIN (tags)) { TREE_NONLOCAL_FLAG (TREE_VALUE (tags)) = 1; + if (! TREE_PURPOSE (tags)) + continue; pushtag (TREE_PURPOSE (tags), TREE_VALUE (tags)); if (IDENTIFIER_CLASS_VALUE (TREE_PURPOSE (tags)) == NULL_TREE *************** *** 3638,3642 **** IDENTIFIER_CLASS_VALUE (TREE_PURPOSE (tags)) = TYPE_NAME (TREE_VALUE (tags)); - tags = TREE_CHAIN (tags); } --- 3649,3652 ---- *************** *** 3693,3697 **** { TREE_NONLOCAL_FLAG (TREE_VALUE (tags)) = 0; ! IDENTIFIER_CLASS_VALUE (TREE_PURPOSE (tags)) = NULL_TREE; tags = TREE_CHAIN (tags); } --- 3703,3708 ---- { TREE_NONLOCAL_FLAG (TREE_VALUE (tags)) = 0; ! if (TREE_PURPOSE (tags)) ! IDENTIFIER_CLASS_VALUE (TREE_PURPOSE (tags)) = NULL_TREE; tags = TREE_CHAIN (tags); } *************** *** 3827,3831 **** /* This should really only be used when attempting to distinguish what sort of a pointer to function we have. For now, any ! arithmethic operation which is not supported on pointers is rejected as an error. */ --- 3838,3842 ---- /* This should really only be used when attempting to distinguish what sort of a pointer to function we have. For now, any ! arithmetic operation which is not supported on pointers is rejected as an error. */ diff -rc2N gcc-2.0/cp-class.h gcc-2.1/cp-class.h *** gcc-2.0/cp-class.h Tue Feb 4 10:17:12 1992 --- gcc-2.1/cp-class.h Sat Mar 14 00:02:45 1992 *************** *** 71,75 **** the function (if a member function). */ int bad_arg; /* the index of the first bad argument: ! 0 if no bad arguements > 0 is first bad argument -1 if extra actual arguments --- 71,75 ---- the function (if a member function). */ int bad_arg; /* the index of the first bad argument: ! 0 if no bad arguments > 0 is first bad argument -1 if extra actual arguments diff -rc2N gcc-2.0/cp-cvt.c gcc-2.1/cp-cvt.c *** gcc-2.0/cp-cvt.c Mon Feb 10 05:41:17 1992 --- gcc-2.1/cp-cvt.c Sun Mar 22 16:39:28 1992 *************** *** 78,82 **** if (TYPE_MAIN_VARIANT (type) != intype ! && IS_AGGR_TYPE_2 (TREE_TYPE (type), TREE_TYPE (intype))) { enum tree_code code = PLUS_EXPR; --- 78,83 ---- if (TYPE_MAIN_VARIANT (type) != intype ! && TREE_CODE (TREE_TYPE (type)) == RECORD_TYPE ! && TREE_CODE (TREE_TYPE (intype)) == RECORD_TYPE) { enum tree_code code = PLUS_EXPR; *************** *** 165,169 **** if (TYPE_MAIN_VARIANT (type) != intype ! && IS_AGGR_TYPE_2 (TREE_TYPE (type), TREE_TYPE (intype))) { enum tree_code code = PLUS_EXPR; --- 166,171 ---- if (TYPE_MAIN_VARIANT (type) != intype ! && TREE_CODE (TREE_TYPE (type)) == RECORD_TYPE ! && TREE_CODE (TREE_TYPE (intype)) == RECORD_TYPE) { enum tree_code code = PLUS_EXPR; *************** *** 967,971 **** parmtypes = tree_cons (NULL_TREE, TYPE_POINTER_TO (basetype), parmtypes); ! method_name = build_decl_overload (IDENTIFIER_POINTER (name), parmtypes, 1); /* constructors are up front. */ --- 969,973 ---- parmtypes = tree_cons (NULL_TREE, TYPE_POINTER_TO (basetype), parmtypes); ! method_name = build_decl_overload (name, parmtypes, 1); /* constructors are up front. */ *************** *** 1295,1299 **** /* Conversion between aggregate types. New C++ semantics allow objects of derived type to be cast to objects of base type. ! Old semantics only allowed this bwteen pointers. There may be some ambiguity between using a constructor --- 1297,1301 ---- /* Conversion between aggregate types. New C++ semantics allow objects of derived type to be cast to objects of base type. ! Old semantics only allowed this between pointers. There may be some ambiguity between using a constructor *************** *** 1722,1730 **** else break; } ! if (! not_again && type == integer_type_node) { ! typename = build_typename_overload (long_integer_type_node); ! not_again = 1; ! goto again; } } --- 1724,1741 ---- else break; } ! if (! not_again) { ! if (type == integer_type_node) ! { ! typename = build_typename_overload (long_integer_type_node); ! not_again = 1; ! goto again; ! } ! else ! { ! typename = build_typename_overload (integer_type_node); ! not_again = 1; ! goto again; ! } } } *************** *** 1796,1803 **** tree decl = typedecl_for_tag (type1); if (decl) ! error ("type conversion nonexistant for type `%s'", IDENTIFIER_POINTER (DECL_NAME (decl))); else ! error ("type conversion nonexistant for non-C++ type"); return 0; } --- 1807,1814 ---- tree decl = typedecl_for_tag (type1); if (decl) ! error ("type conversion nonexistent for type `%s'", IDENTIFIER_POINTER (DECL_NAME (decl))); else ! error ("type conversion nonexistent for non-C++ type"); return 0; } *************** *** 1806,1813 **** tree decl = typedecl_for_tag (type2); if (decl) ! error ("type conversion nonexistant for type `%s'", IDENTIFIER_POINTER (decl)); else ! error ("type conversion nonexistant for non-C++ type"); return 0; } --- 1817,1824 ---- tree decl = typedecl_for_tag (type2); if (decl) ! error ("type conversion nonexistent for type `%s'", IDENTIFIER_POINTER (decl)); else ! error ("type conversion nonexistent for non-C++ type"); return 0; } diff -rc2N gcc-2.0/cp-decl.c gcc-2.1/cp-decl.c *** gcc-2.0/cp-decl.c Mon Feb 17 01:03:34 1992 --- gcc-2.1/cp-decl.c Tue Mar 24 05:35:19 1992 *************** *** 124,128 **** define_function (NAME, TYPE, CODE, (void (*)())pushdecl, LIBNAME) #define auto_function(NAME, TYPE, CODE) \ ! define_function (NAME, TYPE, CODE, (void (*)())push_overloaded_decl_1, 0) /* static */ void grokclassfn (); --- 124,134 ---- define_function (NAME, TYPE, CODE, (void (*)())pushdecl, LIBNAME) #define auto_function(NAME, TYPE, CODE) \ ! do { \ ! tree __name = NAME; \ ! tree __type = TYPE; \ ! define_function (IDENTIFIER_POINTER (__name), __type, CODE, \ ! (void (*)())push_overloaded_decl_1, \ ! IDENTIFIER_POINTER (build_decl_overload (__name, TYPE_ARG_TYPES (__type), 0)));\ ! } while (0) /* static */ void grokclassfn (); *************** *** 241,248 **** tree maybe_gc_cleanup; - /* Function type `void * (long)', 'void (void *)' */ - tree ptr_ftype_long, void_ftype_ptr; - tree ptr_ftype_ptr_int_int_ptr, void_ftype_ptr_int_int_ptr_int_int; - /* Used for virtual function tables. */ tree vtbl_mask; --- 247,250 ---- *************** *** 277,281 **** /* A FUNCTION_DECL which can call `unhandled_exception'. ! Not neccessarily the one that the user will declare, but sufficient to be called by routines that want to abort the program. */ --- 279,283 ---- /* A FUNCTION_DECL which can call `unhandled_exception'. ! Not necessarily the one that the user will declare, but sufficient to be called by routines that want to abort the program. */ *************** *** 282,286 **** tree unhandled_exception_fndecl; ! /* A FUNCTION_DECL which can call `abort'. Not neccessarily the one that the user will declare, but sufficient to be called by routines that want to abort the program. */ --- 284,288 ---- tree unhandled_exception_fndecl; ! /* A FUNCTION_DECL which can call `abort'. Not necessarily the one that the user will declare, but sufficient to be called by routines that want to abort the program. */ *************** *** 416,420 **** static int warn_about_return_type; ! /* Nonzero when starting a function delcared `extern inline'. */ static int current_extern_inline; --- 418,422 ---- static int warn_about_return_type; ! /* Nonzero when starting a function declared `extern inline'. */ static int current_extern_inline; *************** *** 1449,1452 **** --- 1451,1458 ---- current_class_name = s->class_name; current_class_type = s->class_type; + if (current_class_type) + C_C_D = CLASSTYPE_INST_VAR (current_class_type); + else + C_C_D = NULL_TREE; current_class_decl = s->class_decl; current_function_decl = s->function_decl; *************** *** 1465,1469 **** C++ gratuitously puts all these tags in the name space. */ ! /* When setting the IDENTIFER_TYPE_VALUE field of an identifier ID, record the shadowed value for this binding contour. TYPE is the type that ID maps to. */ --- 1471,1475 ---- C++ gratuitously puts all these tags in the name space. */ ! /* When setting the IDENTIFIER_TYPE_VALUE field of an identifier ID, record the shadowed value for this binding contour. TYPE is the type that ID maps to. */ *************** *** 1537,1540 **** --- 1543,1577 ---- } + #if 0 /* not yet, should get fixed properly later */ + /* Create a TYPE_DECL node with the correct DECL_ASSEMBLER_NAME. + Other routines shouldn't use build_decl directly; they'll produce + incorrect results with `-g' unless they duplicate this code. + + This is currently needed mainly for dbxout.c, but we can make + use of it in cp-method.c later as well. */ + tree + make_type_decl (name, type) + tree name, type; + { + tree decl, id; + decl = build_decl (TYPE_DECL, name, type); + if (TYPE_NAME (type) == name) + /* Class/union/enum definition, or a redundant typedef for same. */ + { + id = get_identifier (build_overload_name (type, 1, 1)); + DECL_ASSEMBLER_NAME (decl) = id; + } + else if (TYPE_NAME (type) != NULL_TREE) + /* Explicit typedef, or implicit typedef for template expansion. */ + DECL_ASSEMBLER_NAME (decl) = DECL_ASSEMBLER_NAME (TYPE_NAME (type)); + else + { + /* Typedef for unnamed struct; some other situations. + TYPE_NAME is null; what's right here? */ + } + return decl; + } + + #endif void pushtag (name, type) *************** *** 1557,1561 **** if (TYPE_NAME (type) == 0) TYPE_NAME (type) = name; ! if (b == global_binding_level) b->tags = perm_tree_cons (name, type, b->tags); --- 1594,1598 ---- if (TYPE_NAME (type) == 0) TYPE_NAME (type) = name; ! if (b == global_binding_level) b->tags = perm_tree_cons (name, type, b->tags); *************** *** 1580,1584 **** --- 1617,1626 ---- if (d == NULL_TREE) { + #if 0 /* not yet, should get fixed properly later */ + d = make_type_decl (name, type); + DECL_ASSEMBLER_NAME (d) = get_identifier (build_overload_name (type, 1, 1)); + #else d = build_decl (TYPE_DECL, name, type); + #endif set_identifier_type_value (name, type); } *************** *** 1655,1659 **** --- 1697,1705 ---- the tagged type. */ + #if 0 /* not yet, should get fixed properly later */ + TYPE_STUB_DECL (type) = pushdecl (make_type_decl (NULL, type)); + #else TYPE_STUB_DECL (type) = pushdecl (build_decl (TYPE_DECL, NULL, type)); + #endif } } *************** *** 2252,2256 **** --- 2298,2306 ---- { register tree t; + #if 0 /* not yet, should get fixed properly later */ + register tree name; + #else register tree name = DECL_ASSEMBLER_NAME (x); + #endif register struct binding_level *b = current_binding_level; *************** *** 2265,2268 **** --- 2315,2328 ---- #endif + #if 0 /* not yet, should get fixed properly later */ + /* For functions and class static data, we currently look up the encoded + form of the name. For types, we want the real name. The former will + probably be changed soon, according to MDT. */ + if (TREE_CODE (x) == FUNCTION_DECL || TREE_CODE (x) == VAR_DECL) + name = DECL_ASSEMBLER_NAME (x); + else + name = DECL_NAME (x); + + #endif if (name) { *************** *** 2742,2746 **** error_with_decl (decl, "conflicts with function declaration `%s'"); } ! glob = tree_cons (DECL_ASSEMBLER_NAME (glob), glob, NULL_TREE); glob = tree_cons (TREE_PURPOSE (glob), decl, glob); IDENTIFIER_GLOBAL_VALUE (orig_name) = glob; --- 2802,2806 ---- error_with_decl (decl, "conflicts with function declaration `%s'"); } ! glob = tree_cons (orig_name, glob, NULL_TREE); glob = tree_cons (TREE_PURPOSE (glob), decl, glob); IDENTIFIER_GLOBAL_VALUE (orig_name) = glob; *************** *** 2941,2946 **** } if (decl != 0) ! return decl; decl = build_decl (LABEL_DECL, id, void_type_node); --- 3001,3013 ---- } + /* Use a label already defined or ref'd with this name. */ if (decl != 0) ! { ! /* But not if it is inherited and wasn't declared to be inheritable. */ ! if (DECL_CONTEXT (decl) != current_function_decl ! && ! C_DECLARED_LABEL_FLAG (decl)) ! return shadow_label (id); ! return decl; ! } decl = build_decl (LABEL_DECL, id, void_type_node); *************** *** 2964,2967 **** --- 3031,3058 ---- } + /* Make a label named NAME in the current function, + shadowing silently any that may be inherited from containing functions + or containing scopes. + + Note that valid use, if the label being shadowed + comes from another scope in the same function, + requires calling declare_nonlocal_label right away. */ + + tree + shadow_label (name) + tree name; + { + register tree decl = IDENTIFIER_LABEL_VALUE (name); + + if (decl != 0) + { + shadowed_labels = tree_cons (NULL_TREE, decl, shadowed_labels); + SET_IDENTIFIER_LABEL_VALUE (name, 0); + SET_IDENTIFIER_LABEL_VALUE (decl, 0); + } + + return lookup_label (name); + } + /* Define a label, specifying the location in the source file. Return the LABEL_DECL node for the label, if the definition is valid. *************** *** 2980,2983 **** --- 3071,3082 ---- current_binding_level->more_cleanups_ok = 0; + /* If label with this name is known from an outer context, shadow it. */ + if (decl != 0 && DECL_CONTEXT (decl) != current_function_decl) + { + shadowed_labels = tree_cons (NULL_TREE, decl, shadowed_labels); + SET_IDENTIFIER_LABEL_VALUE (name, 0); + decl = lookup_label (name); + } + if (DECL_INITIAL (decl) != 0) { *************** *** 3128,3151 **** { register tree tail; ! for (tail = level->tags; tail; tail = TREE_CHAIN (tail)) ! { ! if (TREE_PURPOSE (tail) == name) ! { ! enum tree_code code = TREE_CODE (TREE_VALUE (tail)); ! /* Should tighten this up; it'll probably permit ! UNION_TYPE and a struct template, for example. */ ! if (code != form ! && !(form != ENUMERAL_TYPE ! && (code == TEMPLATE_DECL ! || code == UNINSTANTIATED_P_TYPE))) ! ! { ! /* Definition isn't the kind we were looking for. */ ! error ("`%s' defined as wrong kind of tag", ! IDENTIFIER_POINTER (name)); ! } return TREE_VALUE (tail); ! } ! } if (thislevel_only && ! level->tag_transparent) return NULL_TREE; --- 3227,3259 ---- { register tree tail; ! if (ANON_AGGRNAME_P (name)) ! for (tail = level->tags; tail; tail = TREE_CHAIN (tail)) ! { ! /* There's no need for error checking here, because ! anon names are unique throughout the compilation. */ ! if (DECL_NAME (TYPE_NAME (TREE_VALUE (tail))) == name) return TREE_VALUE (tail); ! } ! else ! for (tail = level->tags; tail; tail = TREE_CHAIN (tail)) ! { ! if (TREE_PURPOSE (tail) == name) ! { ! enum tree_code code = TREE_CODE (TREE_VALUE (tail)); ! /* Should tighten this up; it'll probably permit ! UNION_TYPE and a struct template, for example. */ ! if (code != form ! && !(form != ENUMERAL_TYPE ! && (code == TEMPLATE_DECL ! || code == UNINSTANTIATED_P_TYPE))) ! ! { ! /* Definition isn't the kind we were looking for. */ ! error ("`%s' defined as wrong kind of tag", ! IDENTIFIER_POINTER (name)); ! } ! return TREE_VALUE (tail); ! } ! } if (thislevel_only && ! level->tag_transparent) return NULL_TREE; *************** *** 3162,3178 **** { tree these_tags = CLASSTYPE_TAGS (context); ! while (these_tags) ! { ! if (TREE_PURPOSE (these_tags) == name) ! { ! if (TREE_CODE (TREE_VALUE (these_tags)) != form) ! { ! error ("`%s' defined as wrong kind of tag in class scope", ! IDENTIFIER_POINTER (name)); ! } return TREE_VALUE (tail); ! } ! these_tags = TREE_CHAIN (these_tags); ! } /* If this type is not yet complete, then don't look at its context. */ --- 3270,3295 ---- { tree these_tags = CLASSTYPE_TAGS (context); ! if (ANON_AGGRNAME_P (name)) ! while (these_tags) ! { ! if (DECL_NAME (TYPE_NAME (TREE_VALUE (these_tags))) ! == name) return TREE_VALUE (tail); ! these_tags = TREE_CHAIN (these_tags); ! } ! else ! while (these_tags) ! { ! if (TREE_PURPOSE (these_tags) == name) ! { ! if (TREE_CODE (TREE_VALUE (these_tags)) != form) ! { ! error ("`%s' defined as wrong kind of tag in class scope", ! IDENTIFIER_POINTER (name)); ! } ! return TREE_VALUE (tail); ! } ! these_tags = TREE_CHAIN (these_tags); ! } /* If this type is not yet complete, then don't look at its context. */ *************** *** 3235,3239 **** /* Given type TYPE which was not declared in C++ language context, ! attempt to find a name by which it is refered. */ tree typedecl_for_tag (tag) --- 3352,3356 ---- /* Given type TYPE which was not declared in C++ language context, ! attempt to find a name by which it is referred. */ tree typedecl_for_tag (tag) *************** *** 3262,3266 **** /* Called when we must retroactively globalize a type we previously ! thought needed to be nested. This happenes, for example, when a `friend class' declaration is seen for an undefined type. */ --- 3379,3383 ---- /* Called when we must retroactively globalize a type we previously ! thought needed to be nested. This happens, for example, when a `friend class' declaration is seen for an undefined type. */ *************** *** 3513,3517 **** tree tdecl; ! if (rid_index < RID_MAX) rname = ridpointers[(int) rid_index]; if (name) --- 3630,3634 ---- tree tdecl; ! if ((int) rid_index < (int) RID_MAX) rname = ridpointers[(int) rid_index]; if (name) *************** *** 3520,3527 **** if (tname) { tdecl = pushdecl (build_decl (TYPE_DECL, tname, type)); DECL_IGNORED_P (TYPE_NAME (type)) = 0; set_identifier_type_value (tname, NULL_TREE); ! if (rid_index < RID_MAX) IDENTIFIER_GLOBAL_VALUE (tname) = tdecl; } --- 3637,3648 ---- if (tname) { + #if 0 /* not yet, should get fixed properly later */ + tdecl = pushdecl (make_type_decl (tname, type)); + #else tdecl = pushdecl (build_decl (TYPE_DECL, tname, type)); + #endif DECL_IGNORED_P (TYPE_NAME (type)) = 0; set_identifier_type_value (tname, NULL_TREE); ! if ((int) rid_index < (int) RID_MAX) IDENTIFIER_GLOBAL_VALUE (tname) = tdecl; } *************** *** 3535,3539 **** --- 3656,3664 ---- else { + #if 0 /* not yet, should get fixed properly later */ + tdecl = pushdecl (make_type_decl (rname, type)); + #else tdecl = pushdecl (build_decl (TYPE_DECL, rname, type)); + #endif set_identifier_type_value (rname, NULL_TREE); } *************** *** 3857,3880 **** endlink)))); - ptr_ftype_long /* builtin new prototype */ - = build_function_type (ptr_type_node, TYPE_ARG_TYPES (long_ftype_long)); - - ptr_ftype_ptr_int_int_ptr /* builtin vec new prototype */ - = build_function_type (ptr_type_node, - tree_cons (NULL_TREE, ptr_type_node, - tree_cons (NULL_TREE, integer_type_node, - tree_cons (NULL_TREE, integer_type_node, - ptr_endlink)))); - - void_ftype_ptr /* builtin deleted prototype */ - = build_function_type (void_type_node, ptr_endlink); - - void_ftype_ptr_int_int_ptr_int_int /* builtin vec delete prototype */ - = build_function_type (void_type_node, - tree_cons (NULL_TREE, ptr_type_node, - tree_cons (NULL_TREE, integer_type_node, - tree_cons (NULL_TREE, integer_type_node, - TYPE_ARG_TYPES (void_ftype_ptr_int_int))))); - #ifdef VTABLE_USES_MASK /* This is primarily for virtual function definition. We --- 3982,3985 ---- *************** *** 3916,3919 **** --- 4021,4025 ---- builtin_function ("__builtin_labs", long_ftype_long, BUILT_IN_LABS, 0); builtin_function ("__builtin_ffs", int_ftype_int, BUILT_IN_FFS, 0); + builtin_function ("__builtin_fsqrt", double_ftype_double, BUILT_IN_FSQRT, 0); #if 0 /* This does not work well with libg++. */ *************** *** 3965,3969 **** builtin_function ("__builtin_frem", double_ftype_double_double, BUILT_IN_FREM, 0); builtin_function ("__builtin_memset", ptr_ftype_ptr_int_int, BUILT_IN_MEMSET, 0); - builtin_function ("__builtin_fsqrt", double_ftype_double, BUILT_IN_FSQRT, 0); builtin_function ("__builtin_getexp", double_ftype_double, BUILT_IN_GETEXP, 0); builtin_function ("__builtin_getman", double_ftype_double, BUILT_IN_GETMAN, 0); --- 4071,4074 ---- *************** *** 3973,3979 **** --- 4078,4089 ---- unknown_type_node = make_node (UNKNOWN_TYPE); + #if 0 /* not yet, should get fixed properly later */ + pushdecl (make_type_decl (get_identifier ("unknown type"), + unknown_type_node)); + #else pushdecl (build_decl (TYPE_DECL, get_identifier ("unknown type"), unknown_type_node)); + #endif TYPE_SIZE (unknown_type_node) = TYPE_SIZE (void_type_node); TYPE_ALIGN (unknown_type_node) = 1; *************** *** 4159,4164 **** } ! auto_function ("__builtin_new", ptr_ftype_long, NOT_BUILT_IN); ! auto_function ("__builtin_delete", void_ftype_ptr, NOT_BUILT_IN); abort_fndecl --- 4269,4282 ---- } ! auto_function (ansi_opname[(int) NEW_EXPR], ! build_function_type (ptr_type_node, ! tree_cons (NULL_TREE, sizetype, ! void_list_node)), ! NOT_BUILT_IN); ! auto_function (ansi_opname[(int) DELETE_EXPR], ! build_function_type (void_type_node, ! tree_cons (NULL_TREE, ptr_type_node, ! void_list_node)), ! NOT_BUILT_IN); abort_fndecl *************** *** 4435,4448 **** if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE) { ! tree t = TREE_TYPE (decl); /* method type */ tree decl; t = TYPE_METHOD_BASETYPE (t); /* type method belongs to */ ! t = build_pointer_type (t); /* base type of `this' */ ! t = build_type_variant (t, !flag_this_is_variable, ! 0); /* type of `this' */ ! t = build (PARM_DECL, t, this_identifier); ! TREE_CHAIN (t) = args; ! args = t; } DECL_ARGUMENTS (decl) = args; --- 4553,4569 ---- if (TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE) { ! tree t = TREE_TYPE (decl); tree decl; t = TYPE_METHOD_BASETYPE (t); /* type method belongs to */ ! if (TREE_CODE (t) != UNINSTANTIATED_P_TYPE) ! { ! t = build_pointer_type (t); /* base type of `this' */ ! t = build_type_variant (t, flag_this_is_variable <= 0, ! 0); /* type of `this' */ ! t = build (PARM_DECL, t, this_identifier); ! TREE_CHAIN (t) = args; ! args = t; ! } } DECL_ARGUMENTS (decl) = args; *************** *** 4635,4639 **** else if (TREE_CODE (result) == FUNCTION_DECL) tem = push_overloaded_decl (tem, 0); ! else if (TREE_CODE (result) == VAR_DECL) { sorry ("non-function templates not yet supported"); --- 4756,4761 ---- else if (TREE_CODE (result) == FUNCTION_DECL) tem = push_overloaded_decl (tem, 0); ! else if (TREE_CODE (result) == VAR_DECL ! || TREE_CODE (result) == TYPE_DECL) { sorry ("non-function templates not yet supported"); *************** *** 4852,4856 **** } ! /* In the case of initialization, it is permissable to assign one reference to another. */ this_ptr_type = build_pointer_type (TREE_TYPE (type)); --- 4974,4978 ---- } ! /* In the case of initialization, it is permissible to assign one reference to another. */ this_ptr_type = build_pointer_type (TREE_TYPE (type)); *************** *** 4938,4942 **** the normal rules. ! For functions that take defualt parameters, DECL points to its "maximal" instantiation. finish_decl must then also declared its subsequently lower and lower forms of instantiation, checking for --- 5060,5064 ---- the normal rules. ! For functions that take default parameters, DECL points to its "maximal" instantiation. finish_decl must then also declared its subsequently lower and lower forms of instantiation, checking for *************** *** 5436,5442 **** tree parmtypes = TYPE_ARG_TYPES (type); tree prev = NULL_TREE; ! char *original_name = IDENTIFIER_POINTER (DECL_NAME (decl)); struct lang_decl *tmp_lang_decl = DECL_LANG_SPECIFIC (decl); ! /* All variants will share an uncollectable lang_decl. */ copy_decl_lang_specific (decl); --- 5558,5564 ---- tree parmtypes = TYPE_ARG_TYPES (type); tree prev = NULL_TREE; ! tree original_name = DECL_NAME (decl); struct lang_decl *tmp_lang_decl = DECL_LANG_SPECIFIC (decl); ! /* All variants will share an uncollectible lang_decl. */ copy_decl_lang_specific (decl); *************** *** 5636,5640 **** /* Make TYPE a complete type based on INITIAL_VALUE. ! Return 0 if successful, 1 if INITIAL_VALUE can't be decyphered, 2 if there was no information (in which case assume 1 if DO_DEFAULT). */ --- 5758,5762 ---- /* Make TYPE a complete type based on INITIAL_VALUE. ! Return 0 if successful, 1 if INITIAL_VALUE can't be deciphered, 2 if there was no information (in which case assume 1 if DO_DEFAULT). */ *************** *** 5783,5787 **** IDENTIFIER_GLOBAL_VALUE (DECL_ASSEMBLER_NAME (decl)) = decl; else if (TREE_CODE (tmp) != TREE_CODE (decl)) ! error_with_decl (decl, "inconsistant declarations for `%s'"); else { --- 5905,5909 ---- IDENTIFIER_GLOBAL_VALUE (DECL_ASSEMBLER_NAME (decl)) = decl; else if (TREE_CODE (tmp) != TREE_CODE (decl)) ! error_with_decl (decl, "inconsistent declarations for `%s'"); else { *************** *** 5824,5828 **** IDENTIFIER_GLOBAL_VALUE (DECL_ASSEMBLER_NAME (decl)) = decl; else if (TREE_CODE (tmp) != TREE_CODE (decl)) ! error_with_decl (decl, "inconsistant declarations for `%s'"); else { --- 5946,5950 ---- IDENTIFIER_GLOBAL_VALUE (DECL_ASSEMBLER_NAME (decl)) = decl; else if (TREE_CODE (tmp) != TREE_CODE (decl)) ! error_with_decl (decl, "inconsistent declarations for `%s'"); else { *************** *** 5940,5943 **** --- 6062,6067 ---- error ("redeclaration of type for `%s'", IDENTIFIER_POINTER (declarator)); + else if (TYPE_SIZE (o_type) != NULL_TREE) + TREE_TYPE (field) = type; } else if (f_type != o_type) *************** *** 6020,6024 **** This function is where the complicated C meanings of `static' ! and `extern' are intrepreted. For C++, if there is any monkey business to do, the function which --- 6144,6148 ---- This function is where the complicated C meanings of `static' ! and `extern' are interpreted. For C++, if there is any monkey business to do, the function which *************** *** 6029,6033 **** which does not belong to that class. ! Execpt in the case where SCOPE_REFs are implicitly known (such as methods within a class being redundantly qualified), declarations which involve SCOPE_REFs are returned as SCOPE_REFs --- 6153,6157 ---- which does not belong to that class. ! Except in the case where SCOPE_REFs are implicitly known (such as methods within a class being redundantly qualified), declarations which involve SCOPE_REFs are returned as SCOPE_REFs *************** *** 6035,6039 **** If a constructor or destructor is seen, and the context is FIELD, ! then the type gains the attribtue TREE_HAS_x. If such a declaration is erroneous, NULL_TREE is returned. --- 6159,6163 ---- If a constructor or destructor is seen, and the context is FIELD, ! then the type gains the attribute TREE_HAS_x. If such a declaration is erroneous, NULL_TREE is returned. *************** *** 6854,6858 **** --- 6978,6986 ---- if (ctype != NULL_TREE) { + #if 0 /* not yet, should get fixed properly later */ + tree dummy = make_type_decl (NULL_TREE, type); + #else tree dummy = build_decl (TYPE_DECL, NULL_TREE, type); + #endif ctype = grok_method_quals (ctype, dummy, quals); type = TREE_TYPE (dummy); *************** *** 7207,7213 **** if (IS_AGGR_TYPE (type)) build_pointer_type (type); } - constp = 0; - volatilep = 0; if (TREE_CODE (declarator) == ADDR_EXPR) --- 7335,7341 ---- if (IS_AGGR_TYPE (type)) build_pointer_type (type); + constp = 0; + volatilep = 0; } if (TREE_CODE (declarator) == ADDR_EXPR) *************** *** 7306,7312 **** if (ctype == current_class_type || friendp) if (TREE_CODE (type) == FUNCTION_TYPE) ! type = build_cplus_method_type (ctype, TREE_TYPE (type), TYPE_ARG_TYPES (type)); else ! type = build_member_type (ctype, type); else if (TYPE_SIZE (ctype) != 0 || (specbits & (1<<(int)RID_TYPEDEF))) --- 7434,7441 ---- if (ctype == current_class_type || friendp) if (TREE_CODE (type) == FUNCTION_TYPE) ! type = build_cplus_method_type (build_type_variant (ctype, constp, volatilep), ! TREE_TYPE (type), TYPE_ARG_TYPES (type)); else ! type = build_offset_type (ctype, type); else if (TYPE_SIZE (ctype) != 0 || (specbits & (1<<(int)RID_TYPEDEF))) *************** *** 7353,7359 **** } if (TREE_CODE (type) == FUNCTION_TYPE) ! type = build_cplus_method_type (ctype, TREE_TYPE (type), TYPE_ARG_TYPES (type)); else ! type = build_member_type (ctype, type); } else if (uses_template_parms (ctype)) --- 7482,7489 ---- } if (TREE_CODE (type) == FUNCTION_TYPE) ! type = build_cplus_method_type (build_type_variant (ctype, constp, volatilep), ! TREE_TYPE (type), TYPE_ARG_TYPES (type)); else ! type = build_offset_type (ctype, type); } else if (uses_template_parms (ctype)) *************** *** 7363,7367 **** if (TREE_CODE (type) == FUNCTION_TYPE) { ! type = build_cplus_method_type (ctype, TREE_TYPE (type), TYPE_ARG_TYPES (type)); --- 7493,7497 ---- if (TREE_CODE (type) == FUNCTION_TYPE) { ! type = build_cplus_method_type (build_type_variant (ctype, constp, volatilep), TREE_TYPE (type), TYPE_ARG_TYPES (type)); *************** *** 7408,7414 **** { if (TREE_CODE (type) == FUNCTION_TYPE) ! type = build_cplus_method_type (ctype, TREE_TYPE (type), TYPE_ARG_TYPES (type)); else ! type = build_member_type (ctype, type); } } --- 7538,7544 ---- { if (TREE_CODE (type) == FUNCTION_TYPE) ! type = build_cplus_method_type (build_type_variant (ctype, constp, volatilep), TREE_TYPE (type), TYPE_ARG_TYPES (type)); else ! type = build_offset_type (ctype, type); } } *************** *** 7485,7489 **** --- 7615,7623 ---- } + #if 0 /* not yet, should get fixed properly later */ + decl = make_type_decl (declarator, type); + #else decl = build_decl (TYPE_DECL, declarator, type); + #endif if (quals) { *************** *** 7537,7541 **** --- 7671,7679 ---- else if (quals) { + #if 0 /* not yet, should get fixed properly later */ + tree dummy = make_type_decl (declarator, type); + #else tree dummy = build_decl (TYPE_DECL, declarator, type); + #endif if (ctype == NULL_TREE) { *************** *** 7651,7657 **** METHOD_TYPE; they remain FUNCTION_TYPEs. */ if (staticp < 2 ! && declarator != ansi_opname[NEW_EXPR] ! && declarator != ansi_opname[DELETE_EXPR]) ! type = build_cplus_method_type (ctype, TREE_TYPE (type), TYPE_ARG_TYPES (type)); } decl = grokfndecl (ctype, type, declarator, virtualp, flags, quals, raises, friendp ? -1 : 0); --- 7789,7796 ---- METHOD_TYPE; they remain FUNCTION_TYPEs. */ if (staticp < 2 ! && declarator != ansi_opname[(int) NEW_EXPR] ! && declarator != ansi_opname[(int) DELETE_EXPR]) ! type = build_cplus_method_type (build_type_variant (ctype, constp, volatilep), ! TREE_TYPE (type), TYPE_ARG_TYPES (type)); } decl = grokfndecl (ctype, type, declarator, virtualp, flags, quals, raises, friendp ? -1 : 0); *************** *** 7781,7785 **** { /* Plain overloading: will not be grok'd by grokclassfn. */ ! declarator = build_decl_overload (name, TYPE_ARG_TYPES (type), 0); was_overloaded = 1; } --- 7920,7924 ---- { /* Plain overloading: will not be grok'd by grokclassfn. */ ! declarator = build_decl_overload (dname, TYPE_ARG_TYPES (type), 0); was_overloaded = 1; } *************** *** 7786,7790 **** } else if (TREE_CODE (type) == FUNCTION_TYPE && staticp < 2) ! type = build_cplus_method_type (ctype, TREE_TYPE (type), TYPE_ARG_TYPES (type)); decl = grokfndecl (ctype, type, original_name, virtualp, flags, quals, raises, --- 7925,7930 ---- } else if (TREE_CODE (type) == FUNCTION_TYPE && staticp < 2) ! type = build_cplus_method_type (build_type_variant (ctype, constp, volatilep), ! TREE_TYPE (type), TYPE_ARG_TYPES (type)); decl = grokfndecl (ctype, type, original_name, virtualp, flags, quals, raises, *************** *** 8002,8006 **** by store_parm_decls so that ultimately it is always a chain of decls. ! Note that in C++, paramters can take default values. These default values are in the TREE_PURPOSE field of the TREE_LIST. It is an error to specify default values which are followed by parameters --- 8142,8146 ---- by store_parm_decls so that ultimately it is always a chain of decls. ! Note that in C++, parameters can take default values. These default values are in the TREE_PURPOSE field of the TREE_LIST. It is an error to specify default values which are followed by parameters *************** *** 8241,8245 **** if (DECL_STATIC_FUNCTION_P (decl)) { ! if (DECL_NAME (decl) == ansi_opname[NEW_EXPR]) { /* Take care of function decl if we had syntax errors. */ --- 8381,8385 ---- if (DECL_STATIC_FUNCTION_P (decl)) { ! if (DECL_NAME (decl) == ansi_opname[(int) NEW_EXPR]) { /* Take care of function decl if we had syntax errors. */ *************** *** 8248,8252 **** hash_tree_chain (integer_type_node, void_list_node)); } ! else if (DECL_NAME (decl) == ansi_opname[DELETE_EXPR]) { if (argtypes == NULL_TREE) --- 8388,8392 ---- hash_tree_chain (integer_type_node, void_list_node)); } ! else if (DECL_NAME (decl) == ansi_opname[(int) DELETE_EXPR]) { if (argtypes == NULL_TREE) *************** *** 8257,8261 **** error_with_decl (decl, "`%s' cannot be a static member function"); } ! else if (DECL_NAME (decl) == ansi_opname[MODIFY_EXPR]) { tree parmtypes = TREE_CHAIN (argtypes); --- 8397,8401 ---- error_with_decl (decl, "`%s' cannot be a static member function"); } ! else if (DECL_NAME (decl) == ansi_opname[(int) MODIFY_EXPR]) { tree parmtypes = TREE_CHAIN (argtypes); *************** *** 9057,9061 **** TYPE_ARG_TYPES (fntype)); else ! fntype = build_cplus_method_type (TYPE_METHOD_BASETYPE (fntype), integer_type_node, TYPE_ARG_TYPES (fntype)); --- 9197,9201 ---- TYPE_ARG_TYPES (fntype)); else ! fntype = build_cplus_method_type (build_type_variant (TYPE_METHOD_BASETYPE (fntype), TREE_READONLY (decl1), TREE_SIDE_EFFECTS (decl1)), integer_type_node, TYPE_ARG_TYPES (fntype)); *************** *** 9108,9112 **** if (ctype) TREE_TYPE (decl1) ! = build_cplus_method_type (ctype, void_type_node, FUNCTION_ARG_CHAIN (decl1)); --- 9248,9252 ---- if (ctype) TREE_TYPE (decl1) ! = build_cplus_method_type (build_type_variant (ctype, TREE_READONLY (decl1), TREE_SIDE_EFFECTS (decl1)), void_type_node, FUNCTION_ARG_CHAIN (decl1)); *************** *** 9445,9449 **** if (flag_handle_exceptions) { ! /* Make the throw decl visibile at this level, just not in the way of the parameters. */ pushdecl (eh_decl); --- 9585,9589 ---- if (flag_handle_exceptions) { ! /* Make the throw decl visible at this level, just not in the way of the parameters. */ pushdecl (eh_decl); *************** *** 9495,9499 **** if (pedantic) ! /* Give this error as many times as there are occurences, so that users can use Emacs compilation buffers to find and fix all such places. */ --- 9635,9639 ---- if (pedantic) ! /* Give this error as many times as there are occurrences, so that users can use Emacs compilation buffers to find and fix all such places. */ *************** *** 9764,9768 **** /* This NOP_EXPR means we are in a static call context. */ exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node), ! ansi_opname[DELETE_EXPR], build_tree_list (NULL_TREE, current_class_decl), NULL_TREE, LOOKUP_NORMAL); --- 9904,9908 ---- /* This NOP_EXPR means we are in a static call context. */ exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node), ! ansi_opname[(int) DELETE_EXPR], build_tree_list (NULL_TREE, current_class_decl), NULL_TREE, LOOKUP_NORMAL); *************** *** 9857,9861 **** DECL_RETURNS_FIRST_ARG (fndecl) = 1; ! if (flag_this_is_variable) { cond = build_binary_op (EQ_EXPR, current_class_decl, integer_zero_node); --- 9997,10001 ---- DECL_RETURNS_FIRST_ARG (fndecl) = 1; ! if (flag_this_is_variable > 0) { cond = build_binary_op (EQ_EXPR, current_class_decl, integer_zero_node); *************** *** 9892,9896 **** /* Just check visibility here. */ build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node), ! ansi_opname[NEW_EXPR], build_tree_list (NULL_TREE, integer_zero_node), NULL_TREE, LOOKUP_NORMAL); --- 10032,10036 ---- /* Just check visibility here. */ build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node), ! ansi_opname[(int) NEW_EXPR], build_tree_list (NULL_TREE, integer_zero_node), NULL_TREE, LOOKUP_NORMAL); *************** *** 9904,9908 **** mark = get_last_insn (); ! if (flag_this_is_variable) { expand_start_cond (cond, 0); --- 10044,10048 ---- mark = get_last_insn (); ! if (flag_this_is_variable > 0) { expand_start_cond (cond, 0); *************** *** 10027,10031 **** if (cleanup_label) ! /* Emit label at beginning of cleanup code for parmeters. */ emit_label (cleanup_label); --- 10167,10171 ---- if (cleanup_label) ! /* Emit label at beginning of cleanup code for parameters. */ emit_label (cleanup_label); *************** *** 10044,10048 **** expand_end_bindings (0, 0, 0); ! /* Get return value into reigster if that's where it's supposed to be. */ if (original_result_rtx) fixup_result_decl (DECL_RESULT (fndecl), original_result_rtx); --- 10184,10188 ---- expand_end_bindings (0, 0, 0); ! /* Get return value into register if that's where it's supposed to be. */ if (original_result_rtx) fixup_result_decl (DECL_RESULT (fndecl), original_result_rtx); *************** *** 10050,10053 **** --- 10190,10195 ---- /* Finish building code that will trigger warnings if users forget to make their functions return values. */ + if (no_return_label || cleanup_label) + emit_jump (return_label); if (no_return_label) { *************** *** 10055,10059 **** don't need any cleanups here--this path of code is only for error checking purposes. */ - emit_jump (return_label); expand_label (no_return_label); } --- 10197,10200 ---- *************** *** 10487,10491 **** if (TREE_CODE (exp) == FUNCTION_DECL) ! warning_with_decl (exp, "reference, not call, to function `%s'"); if (TREE_RAISES (exp)) { --- 10628,10635 ---- if (TREE_CODE (exp) == FUNCTION_DECL) ! { ! warning_with_decl (exp, "reference, not call, to function `%s'"); ! warning ("at this point in file"); ! } if (TREE_RAISES (exp)) { diff -rc2N gcc-2.0/cp-decl2.c gcc-2.1/cp-decl2.c *** gcc-2.0/cp-decl2.c Mon Feb 17 01:03:37 1992 --- gcc-2.1/cp-decl2.c Tue Mar 24 05:35:24 1992 *************** *** 1,3 **** - #define NEW_OVERLOAD_SCHEME /* only if you don't care about compatibility */ /* Process declarations and variables for C compiler. Copyright (C) 1988, 1992 Free Software Foundation, Inc. --- 1,2 ---- *************** *** 185,189 **** /* Zero means that `this' is a *const. This gives nice behavior in the ! 2.0 world. 1 gives 1.2-compatible behavior. 2 gives Spring behavior. */ int flag_this_is_variable; --- 184,189 ---- /* Zero means that `this' is a *const. This gives nice behavior in the ! 2.0 world. 1 gives 1.2-compatible behavior. 2 gives Spring behavior. ! -2 means we're constructing an object and it has fixed type. */ int flag_this_is_variable; *************** *** 322,326 **** flag_traditional = 1, dollars_in_ident = 1, flag_writable_strings = 1, flag_this_is_variable = 1; ! /* The +e options are for cfront compatability. */ else if (p[0] == '+' && p[1] == 'e') { --- 322,326 ---- flag_traditional = 1, dollars_in_ident = 1, flag_writable_strings = 1, flag_this_is_variable = 1; ! /* The +e options are for cfront compatibility. */ else if (p[0] == '+' && p[1] == 'e') { *************** *** 542,546 **** as a second parameter. There is some hair associated with the fact that we must "declare" this variable in the manner consistent with the ! way the rest of the arguements were declared. If FUNCTION is a constructor, and we are doing SOS hacks for dynamic --- 542,546 ---- as a second parameter. There is some hair associated with the fact that we must "declare" this variable in the manner consistent with the ! way the rest of the arguments were declared. If FUNCTION is a constructor, and we are doing SOS hacks for dynamic *************** *** 610,617 **** DECL_ARG_TYPE (parm) = type; /* We can make this a register, so long as we don't ! accidently complain if someone tries to take its address. */ TREE_REGDECL (parm) = 1; if (flags != DTOR_FLAG ! && (!flag_this_is_variable || TYPE_READONLY (type))) TREE_READONLY (parm) = 1; TREE_CHAIN (parm) = last_function_parms; --- 610,617 ---- DECL_ARG_TYPE (parm) = type; /* We can make this a register, so long as we don't ! accidentally complain if someone tries to take its address. */ TREE_REGDECL (parm) = 1; if (flags != DTOR_FLAG ! && (flag_this_is_variable <= 0 || TYPE_READONLY (type))) TREE_READONLY (parm) = 1; TREE_CHAIN (parm) = last_function_parms; *************** *** 651,655 **** flags == WRAPPER_FLAG ? WRAPPER_DECL_FORMAT : ANTI_WRAPPER_DECL_FORMAT, IDENTIFIER_POINTER (cname)); ! DECL_ASSEMBLER_NAME (function) = build_decl_overload (name, arg_types, 1); sprintf (name, flags == WRAPPER_FLAG ? WRAPPER_NAME_FORMAT : ANTI_WRAPPER_NAME_FORMAT, IDENTIFIER_POINTER (cname)); --- 651,655 ---- flags == WRAPPER_FLAG ? WRAPPER_DECL_FORMAT : ANTI_WRAPPER_DECL_FORMAT, IDENTIFIER_POINTER (cname)); ! DECL_ASSEMBLER_NAME (function) = build_decl_overload (get_identifier (name), arg_types, 1); sprintf (name, flags == WRAPPER_FLAG ? WRAPPER_NAME_FORMAT : ANTI_WRAPPER_NAME_FORMAT, IDENTIFIER_POINTER (cname)); *************** *** 662,666 **** + IDENTIFIER_LENGTH (cname) + 2); sprintf (name, WRAPPER_PRED_DECL_FORMAT, IDENTIFIER_POINTER (cname)); ! DECL_ASSEMBLER_NAME (function) = build_decl_overload (name, arg_types, 1); sprintf (name, WRAPPER_PRED_NAME_FORMAT, IDENTIFIER_POINTER (cname)); DECL_NAME (function) = fn_name = get_identifier (name); --- 662,666 ---- + IDENTIFIER_LENGTH (cname) + 2); sprintf (name, WRAPPER_PRED_DECL_FORMAT, IDENTIFIER_POINTER (cname)); ! DECL_ASSEMBLER_NAME (function) = build_decl_overload (get_identifier (name), arg_types, 1); sprintf (name, WRAPPER_PRED_NAME_FORMAT, IDENTIFIER_POINTER (cname)); DECL_NAME (function) = fn_name = get_identifier (name); *************** *** 694,699 **** DECL_ASSEMBLER_NAME (function) ! = build_decl_overload (IDENTIFIER_POINTER (fn_name), ! these_arg_types, 1 + DECL_CONSTRUCTOR_P (function)); #if 0 --- 694,698 ---- DECL_ASSEMBLER_NAME (function) ! = build_decl_overload (fn_name, these_arg_types, 1 + DECL_CONSTRUCTOR_P (function)); #if 0 *************** *** 753,757 **** } ! if (fn_name == ansi_opname[TYPE_EXPR]) { if (TYPE_HAS_CONVERSION (ctype)) --- 752,756 ---- } ! if (fn_name == ansi_opname[(int) TYPE_EXPR]) { if (TYPE_HAS_CONVERSION (ctype)) *************** *** 934,945 **** char *buf, *buf2; - #ifdef NEW_OVERLOAD_SCHEME buf2 = build_overload_name (current_class_type, 1, 1); - #else - if (IDENTIFIER_TEMPLATE (current_class_name)) - buf2 = build_overload_name (current_class_type, 1, 1); - else - buf2 = current_class_name; - #endif buf = (char *)alloca (IDENTIFIER_LENGTH (DECL_NAME (value)) + sizeof (STATIC_NAME_FORMAT) --- 933,937 ---- *************** *** 1340,1344 **** } ! /* When a function is declared with an initialializer, do the right thing. Currently, there are two possibilities: --- 1332,1336 ---- } ! /* When a function is declared with an initializer, do the right thing. Currently, there are two possibilities: *************** *** 1644,1648 **** If there are static members, then all members are static, and must be laid out together. If the ! union is an anonymous union, we arrage for that as well. PUBLICP is nonzero if this union is not declared static. */ --- 1636,1640 ---- If there are static members, then all members are static, and must be laid out together. If the ! union is an anonymous union, we arrange for that as well. PUBLICP is nonzero if this union is not declared static. */ *************** *** 1652,1656 **** { tree type = TREE_TYPE (anon_union_decl); ! tree field, decl; tree elems = NULL_TREE; int public_p = TREE_PUBLIC (anon_union_decl); --- 1644,1648 ---- { tree type = TREE_TYPE (anon_union_decl); ! tree field, main_decl = NULL_TREE; tree elems = NULL_TREE; int public_p = TREE_PUBLIC (anon_union_decl); *************** *** 1666,1670 **** while (field) { ! decl = build_decl (VAR_DECL, DECL_NAME (field), TREE_TYPE (field)); /* tell `pushdecl' that this is not tentative. */ DECL_INITIAL (decl) = error_mark_node; --- 1658,1662 ---- while (field) { ! tree decl = build_decl (VAR_DECL, DECL_NAME (field), TREE_TYPE (field)); /* tell `pushdecl' that this is not tentative. */ DECL_INITIAL (decl) = error_mark_node; *************** *** 1673,1676 **** --- 1665,1683 ---- TREE_EXTERNAL (decl) = external_p; decl = pushdecl (decl); + + /* Only write out one anon union element--choose the one that + can hold them all. */ + if (main_decl == NULL_TREE + && DECL_SIZE (decl) == DECL_SIZE (anon_union_decl)) + { + main_decl = decl; + } + else + { + /* ??? This causes there to be no debug info written out + about this decl. */ + TREE_ASM_WRITTEN (decl) = 1; + } + DECL_INITIAL (decl) = NULL_TREE; /* If there's a cleanup to do, it belongs in the *************** *** 1681,1685 **** } if (static_p) ! make_decl_rtl (decl, 0, global_bindings_p ()); /* The following call assumes that there are never any cleanups --- 1688,1695 ---- } if (static_p) ! { ! make_decl_rtl (main_decl, 0, global_bindings_p ()); ! DECL_RTL (anon_union_decl) = DECL_RTL (main_decl); ! } /* The following call assumes that there are never any cleanups *************** *** 1688,1692 **** if (flag_cadillac) ! cadillac_finish_anon_union (decl); } --- 1698,1702 ---- if (flag_cadillac) ! cadillac_finish_anon_union (anon_union_decl); } *************** *** 1788,1796 **** TYPE_ALIGN (type) = TYPE_ALIGN (align_type); layout_type (type); TYPE_NAME (type) = build_decl (TYPE_DECL, get_identifier (name), type); layout_decl (TYPE_NAME (type), 0); } ! /* Auxilliary functions to make type signatures for `operator new' and `operator delete' correspond to what compiler will be expecting. */ --- 1798,1810 ---- TYPE_ALIGN (type) = TYPE_ALIGN (align_type); layout_type (type); + #if 0 /* not yet, should get fixed properly later */ + TYPE_NAME (type) = make_type_decl (get_identifier (name), type); + #else TYPE_NAME (type) = build_decl (TYPE_DECL, get_identifier (name), type); + #endif layout_decl (TYPE_NAME (type), 0); } ! /* Auxiliary functions to make type signatures for `operator new' and `operator delete' correspond to what compiler will be expecting. */ *************** *** 2018,2022 **** /* Bad parse errors. Just forget about it. */ ! if (! global_bindings_p ()) return; --- 2032,2036 ---- /* Bad parse errors. Just forget about it. */ ! if (! global_bindings_p () || current_class_type) return; *************** *** 2443,2447 **** --- 2457,2465 ---- /* Make last thing in global scope not be a virtual function table. */ + #if 0 /* not yet, should get fixed properly later */ + vars = make_type_decl (get_identifier (" @%$#@!"), integer_type_node); + #else vars = build_decl (TYPE_DECL, get_identifier (" @%$#@!"), integer_type_node); + #endif pushdecl (vars); diff -rc2N gcc-2.0/cp-dem.c gcc-2.1/cp-dem.c *** gcc-2.0/cp-dem.c Fri Jan 17 17:51:01 1992 --- gcc-2.1/cp-dem.c Sat Mar 14 00:03:00 1992 *************** *** 24,28 **** Modified for g++ 1.90.06 (December 31 version). ! Modified for g++ 1.95.03 (November 13 verison). */ /* This file exports one function --- 24,28 ---- Modified for g++ 1.90.06 (December 31 version). ! Modified for g++ 1.95.03 (November 13 version). */ /* This file exports one function *************** *** 166,169 **** --- 166,170 ---- "cm", ",", /* ansi */ "nop", "", /* old (for operator=) */ + "as", "=", /* ansi */ }; diff -rc2N gcc-2.0/cp-expr.c gcc-2.1/cp-expr.c *** gcc-2.0/cp-expr.c Mon Jan 20 01:59:28 1992 --- gcc-2.1/cp-expr.c Sat Mar 14 00:03:01 1992 *************** *** 148,152 **** init = build (RTL_EXPR, return_type, 0, call_target); ! /* We got back a reference to the type we want. Now intialize target with that. */ expand_aggr_init (slot, init, 0); --- 148,152 ---- init = build (RTL_EXPR, return_type, 0, call_target); ! /* We got back a reference to the type we want. Now initialize target with that. */ expand_aggr_init (slot, init, 0); diff -rc2N gcc-2.0/cp-gc.c gcc-2.1/cp-gc.c *** gcc-2.0/cp-gc.c Mon Jan 20 01:58:45 1992 --- gcc-2.1/cp-gc.c Wed Mar 4 02:18:37 1992 *************** *** 25,28 **** --- 25,29 ---- #include "flags.h" #include "assert.h" + #define NULL 0 diff -rc2N gcc-2.0/cp-hash.h gcc-2.1/cp-hash.h *** gcc-2.0/cp-hash.h Thu Dec 5 01:06:21 1991 --- gcc-2.1/cp-hash.h Sun Mar 22 16:39:38 1992 *************** *** 1,13 **** /* C code produced by gperf version 2.5 (GNU C++ version) */ /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,7,$ ./gplus.gperf */ ! /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,$ gplus.gperf */ struct resword { char *name; short token; enum rid rid;}; ! #define TOTAL_KEYWORDS 79 #define MIN_WORD_LENGTH 2 #define MAX_WORD_LENGTH 13 #define MIN_HASH_VALUE 4 ! #define MAX_HASH_VALUE 183 ! /* maximum key range = 180, duplicates = 0 */ #ifdef __GNUC__ --- 1,13 ---- /* C code produced by gperf version 2.5 (GNU C++ version) */ /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,7,$ ./gplus.gperf */ ! /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf */ struct resword { char *name; short token; enum rid rid;}; ! #define TOTAL_KEYWORDS 81 #define MIN_WORD_LENGTH 2 #define MAX_WORD_LENGTH 13 #define MIN_HASH_VALUE 4 ! #define MAX_HASH_VALUE 199 ! /* maximum key range = 196, duplicates = 0 */ #ifdef __GNUC__ *************** *** 21,37 **** static unsigned char asso_values[] = { ! 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, ! 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, ! 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, ! 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, ! 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, ! 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, ! 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, ! 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, ! 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, ! 184, 184, 184, 184, 184, 0, 184, 22, 2, 61, ! 32, 0, 14, 25, 16, 47, 184, 3, 2, 4, ! 35, 1, 26, 184, 38, 0, 4, 20, 4, 39, ! 184, 11, 184, 184, 184, 184, 184, 184, }; register int hval = len; --- 21,37 ---- static unsigned char asso_values[] = { ! 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, ! 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, ! 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, ! 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, ! 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, ! 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, ! 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, ! 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, ! 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, ! 200, 200, 200, 200, 200, 0, 200, 35, 1, 52, ! 53, 0, 5, 11, 44, 21, 200, 13, 35, 36, ! 21, 0, 9, 200, 30, 0, 8, 49, 5, 64, ! 0, 34, 200, 200, 200, 200, 200, 200, }; register int hval = len; *************** *** 67,165 **** {"else", ELSE, NORID,}, {"",}, {"",}, ! {"__asm__", ASM, NORID}, {"this", THIS, NORID,}, ! {"__asm", ASM, NORID}, {"except", EXCEPT, NORID /* Extension */,}, ! {"__headof__", HEADOF, NORID}, ! {"enum", ENUM, NORID,}, ! {"__classof__", CLASSOF, NORID}, {"__const__", TYPE_QUAL, RID_CONST}, {"__volatile", TYPE_QUAL, RID_VOLATILE}, ! {"__const", TYPE_QUAL, RID_CONST}, {"__volatile__", TYPE_QUAL, RID_VOLATILE}, ! {"try", TRY, NORID /* Extension */,}, ! {"virtual", SCSPEC, RID_VIRTUAL,}, ! {"sizeof", SIZEOF, NORID,}, {"",}, ! {"__typeof__", TYPEOF, NORID}, ! {"__headof", HEADOF, NORID}, ! {"typeof", TYPEOF, NORID,}, ! {"__classof", CLASSOF, NORID}, ! {"switch", SWITCH, NORID,}, ! {"all", ALL, NORID /* Extension */,}, ! {"auto", SCSPEC, RID_AUTO,}, ! {"asm", ASM, NORID,}, ! {"struct", AGGR, RID_RECORD,}, ! {"goto", GOTO, NORID,}, ! {"break", BREAK, NORID,}, {"",}, - {"__typeof", TYPEOF, NORID}, - {"do", DO, NORID,}, - {"volatile", TYPE_QUAL, RID_VOLATILE,}, - {"private", VISSPEC, RID_PRIVATE,}, - {"delete", DELETE, NORID,}, {"typedef", SCSPEC, RID_TYPEDEF,}, ! {"double", TYPESPEC, RID_DOUBLE,}, {"extern", SCSPEC, RID_EXTERN,}, {"template", TEMPLATE, NORID,}, {"raise", RAISE, NORID /* Extension */,}, {"raises", RAISES, NORID /* Extension */,}, - {"float", TYPESPEC, RID_FLOAT,}, - {"while", WHILE, NORID,}, - {"short", TYPESPEC, RID_SHORT,}, - {"__alignof__", ALIGNOF, NORID}, - {"throw", THROW, NORID /* Extension */,}, - {"",}, {"",}, - {"friend", SCSPEC, RID_FRIEND,}, {"",}, - {"int", TYPESPEC, RID_INT,}, {"for", FOR, NORID,}, ! {"long", TYPESPEC, RID_LONG,}, ! {"__signed__", TYPESPEC, RID_SIGNED}, ! {"",}, {"",}, ! {"__alignof", ALIGNOF, NORID}, ! {"union", AGGR, RID_UNION,}, {"__attribute", ATTRIBUTE, NORID}, ! {"if", IF, NORID,}, {"__attribute__", ATTRIBUTE, NORID}, {"case", CASE, NORID,}, {"class", AGGR, RID_CLASS,}, ! {"reraise", RERAISE, NORID /* Extension */,}, ! {"headof", HEADOF, NORID,}, ! {"default", DEFAULT, NORID,}, {"const", TYPE_QUAL, RID_CONST,}, {"static", SCSPEC, RID_STATIC,}, ! {"void", TYPESPEC, RID_VOID,}, ! {"signed", TYPESPEC, RID_SIGNED,}, {"",}, ! {"protected", VISSPEC, RID_PROTECTED,}, {"",}, ! {"new", NEW, NORID,}, ! {"__inline", SCSPEC, RID_INLINE}, {"",}, - {"__inline__", SCSPEC, RID_INLINE}, - {"",}, {"",}, {"",}, {"",}, {"",}, - {"operator", OPERATOR, NORID,}, {"__signed", TYPESPEC, RID_SIGNED}, {"",}, {"",}, {"",}, ! {"exception", AGGR, RID_EXCEPTION /* Extension */,}, {"",}, ! {"continue", CONTINUE, NORID,}, {"",}, - {"public", VISSPEC, RID_PUBLIC,}, - {"classof", CLASSOF, NORID,}, - {"",}, {"",}, {"return", RETURN, NORID,}, ! {"inline", SCSPEC, RID_INLINE,}, {"overload", OVERLOAD, NORID,}, ! {"",}, {"",}, {"",}, {"",}, {"",}, {"unsigned", TYPESPEC, RID_UNSIGNED,}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, ! {"",}, {"",}, {"",}, {"",}, {"",}, ! {"register", SCSPEC, RID_REGISTER,}, ! {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, ! {"char", TYPESPEC, RID_CHAR,}, ! {"",}, {"catch", CATCH, NORID,}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, --- 67,172 ---- {"else", ELSE, NORID,}, {"",}, {"",}, ! {"__asm__", ASM_KEYWORD, NORID}, ! {"",}, {"",}, ! {"__headof__", HEADOF, NORID}, ! {"sizeof", SIZEOF, NORID,}, {"this", THIS, NORID,}, ! {"__headof", HEADOF, NORID}, {"except", EXCEPT, NORID /* Extension */,}, ! {"goto", GOTO, NORID,}, ! {"",}, {"__const__", TYPE_QUAL, RID_CONST}, {"__volatile", TYPE_QUAL, RID_VOLATILE}, ! {"typeof", TYPEOF, NORID,}, {"__volatile__", TYPE_QUAL, RID_VOLATILE}, ! {"private", VISSPEC, RID_PRIVATE,}, {"",}, ! {"__const", TYPE_QUAL, RID_CONST}, {"",}, {"typedef", SCSPEC, RID_TYPEDEF,}, ! {"",}, {"extern", SCSPEC, RID_EXTERN,}, + {"if", IF, NORID,}, + {"",}, {"",}, + {"__signed__", TYPESPEC, RID_SIGNED}, + {"int", TYPESPEC, RID_INT,}, {"template", TEMPLATE, NORID,}, + {"__extension__", EXTENSION, NORID}, {"raise", RAISE, NORID /* Extension */,}, {"raises", RAISES, NORID /* Extension */,}, {"",}, {"for", FOR, NORID,}, ! {"auto", SCSPEC, RID_AUTO,}, {"__attribute", ATTRIBUTE, NORID}, ! {"__asm", ASM_KEYWORD, NORID}, {"__attribute__", ATTRIBUTE, NORID}, + {"short", TYPESPEC, RID_SHORT,}, + {"__typeof__", TYPEOF, NORID}, + {"try", TRY, NORID /* Extension */,}, + {"__classof__", CLASSOF, NORID}, + {"__typeof", TYPEOF, NORID}, + {"inline", SCSPEC, RID_INLINE,}, + {"__classof", CLASSOF, NORID}, + {"__inline", SCSPEC, RID_INLINE}, + {"exception", AGGR, RID_EXCEPTION /* Extension */,}, + {"__inline__", SCSPEC, RID_INLINE}, + {"float", TYPESPEC, RID_FLOAT,}, + {"break", BREAK, NORID,}, + {"do", DO, NORID,}, {"case", CASE, NORID,}, {"class", AGGR, RID_CLASS,}, ! {"switch", SWITCH, NORID,}, ! {"delete", DELETE, NORID,}, ! {"double", TYPESPEC, RID_DOUBLE,}, ! {"long", TYPESPEC, RID_LONG,}, ! {"",}, ! {"struct", AGGR, RID_RECORD,}, ! {"friend", SCSPEC, RID_FRIEND,}, {"const", TYPE_QUAL, RID_CONST,}, {"static", SCSPEC, RID_STATIC,}, ! {"__alignof__", ALIGNOF, NORID}, ! {"operator", OPERATOR, NORID,}, ! {"classof", CLASSOF, NORID,}, ! {"__alignof", ALIGNOF, NORID}, {"",}, ! {"reraise", RERAISE, NORID /* Extension */,}, ! {"all", ALL, NORID /* Extension */,}, ! {"asm", ASM_KEYWORD, NORID,}, ! {"union", AGGR, RID_UNION,}, ! {"enum", ENUM, NORID,}, ! {"throw", THROW, NORID /* Extension */,}, {"",}, ! {"__label__", LABEL, NORID}, ! {"signed", TYPESPEC, RID_SIGNED,}, {"",}, {"__signed", TYPESPEC, RID_SIGNED}, + {"volatile", TYPE_QUAL, RID_VOLATILE,}, {"",}, {"",}, {"",}, ! {"protected", VISSPEC, RID_PROTECTED,}, ! {"new", NEW, NORID,}, ! {"register", SCSPEC, RID_REGISTER,}, ! {"virtual", SCSPEC, RID_VIRTUAL,}, ! {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, ! {"",}, {"",}, ! {"public", VISSPEC, RID_PUBLIC,}, {"",}, ! {"while", WHILE, NORID,}, {"",}, {"return", RETURN, NORID,}, ! {"",}, ! {"headof", HEADOF, NORID,}, ! {"",}, {"",}, ! {"default", DEFAULT, NORID,}, ! {"",}, {"",}, {"",}, ! {"void", TYPESPEC, RID_VOID,}, ! {"char", TYPESPEC, RID_CHAR,}, ! {"continue", CONTINUE, NORID,}, ! {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"overload", OVERLOAD, NORID,}, ! {"",}, {"",}, {"",}, {"",}, {"unsigned", TYPESPEC, RID_UNSIGNED,}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, ! {"",}, {"",}, {"",}, {"catch", CATCH, NORID,}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, *************** *** 167,171 **** {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, ! {"",}, {"",}, {"",}, {"dynamic", DYNAMIC, NORID,}, }; --- 174,180 ---- {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, ! {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, ! ! {"dynamic", DYNAMIC, NORID,}, }; diff -rc2N gcc-2.0/cp-init.c gcc-2.1/cp-init.c *** gcc-2.0/cp-init.c Mon Feb 17 01:03:41 1992 --- gcc-2.1/cp-init.c Sun Mar 22 16:39:42 1992 *************** *** 82,94 **** tree fields[2]; ! BIN = default_conversion (TREE_VALUE (lookup_name (get_identifier ("__builtin_new"), 0))); TREE_USED (TREE_OPERAND (BIN, 0)) = 0; ! BID = default_conversion (TREE_VALUE (lookup_name (get_identifier ("__builtin_delete"), 0))); TREE_USED (TREE_OPERAND (BID, 0)) = 0; minus_one = build_int_2 (-1, -1); ! op_id = ansi_opname[NEW_EXPR]; IDENTIFIER_GLOBAL_VALUE (op_id) = BIN; ! op_id = ansi_opname[DELETE_EXPR]; IDENTIFIER_GLOBAL_VALUE (op_id) = BID; --- 82,95 ---- tree fields[2]; ! /* Define implicit `operator new' and `operator delete' functions. */ ! BIN = default_conversion (TREE_VALUE (IDENTIFIER_GLOBAL_VALUE (ansi_opname[(int) NEW_EXPR]))); TREE_USED (TREE_OPERAND (BIN, 0)) = 0; ! BID = default_conversion (TREE_VALUE (IDENTIFIER_GLOBAL_VALUE (ansi_opname[(int) DELETE_EXPR]))); TREE_USED (TREE_OPERAND (BID, 0)) = 0; minus_one = build_int_2 (-1, -1); ! op_id = ansi_opname[(int) NEW_EXPR]; IDENTIFIER_GLOBAL_VALUE (op_id) = BIN; ! op_id = ansi_opname[(int) DELETE_EXPR]; IDENTIFIER_GLOBAL_VALUE (op_id) = BID; *************** *** 341,345 **** { /* If there are virtual baseclasses without initialization ! specified, and this is a default X(X&) construcotr, build the initialization list so that each virtual baseclass of the new object is initialized from the virtual baseclass --- 342,346 ---- { /* If there are virtual baseclasses without initialization ! specified, and this is a default X(X&) constructor, build the initialization list so that each virtual baseclass of the new object is initialized from the virtual baseclass *************** *** 596,600 **** TYPE is the exact type that DECL is supposed to be. In ! muliple inheritance, this might mean "C's A" if C : A, B. */ tree build_virtual_init (main_binfo, binfo, decl) --- 597,601 ---- TYPE is the exact type that DECL is supposed to be. In ! multiple inheritance, this might mean "C's A" if C : A, B. */ tree build_virtual_init (main_binfo, binfo, decl) *************** *** 628,637 **** vtbl = BINFO_VTABLE (main_binfo); #endif /* 1 */ ! if (TREE_USED (vtbl) == 0) ! { ! if (TREE_EXTERNAL (vtbl)) ! assemble_external (vtbl); ! TREE_USED (vtbl) = 1; ! } vtbl = build1 (ADDR_EXPR, TYPE_POINTER_TO (TREE_TYPE (vtbl)), vtbl); } --- 629,634 ---- vtbl = BINFO_VTABLE (main_binfo); #endif /* 1 */ ! assemble_external (vtbl); ! TREE_USED (vtbl) = 1; vtbl = build1 (ADDR_EXPR, TYPE_POINTER_TO (TREE_TYPE (vtbl)), vtbl); } *************** *** 991,995 **** to go to a constructor, which will operate on EXP. If `init' is a CONSTRUCTOR, then we emit a warning message, ! explaining that such initializaitions are illegal. ALIAS_THIS is nonzero iff we are initializing something which is --- 988,992 ---- to go to a constructor, which will operate on EXP. If `init' is a CONSTRUCTOR, then we emit a warning message, ! explaining that such initializations are illegal. ALIAS_THIS is nonzero iff we are initializing something which is *************** *** 1167,1171 **** ) { ! /* A CALL_EXPR is a legitmate form of initialization, so we should not print this warning message. */ #if 0 --- 1164,1168 ---- ) { ! /* A CALL_EXPR is a legitimate form of initialization, so we should not print this warning message. */ #if 0 *************** *** 1572,1577 **** if (! IS_AGGR_TYPE (type)) { ! fatal ("type `%s' is of non-aggregate type", ! IDENTIFIER_POINTER (name)); return 0; } --- 1569,1575 ---- if (! IS_AGGR_TYPE (type)) { ! if (or_else) ! error ("type `%s' is of non-aggregate type", ! IDENTIFIER_POINTER (name)); return 0; } *************** *** 1766,1769 **** --- 1764,1780 ---- return error_mark_node; + if (current_class_type == 0 + || get_base_distance (type, current_class_type, 0, &basetypes) == -1) + { + basetypes = TYPE_BINFO (type); + decl = build1 (NOP_EXPR, + IDENTIFIER_TYPE_VALUE (cname), + error_mark_node); + } + else if (current_class_decl == 0) + decl = build1 (NOP_EXPR, TREE_TYPE (TREE_TYPE (cname)), + error_mark_node); + else decl = C_C_D; + if (fnfields) { *************** *** 1817,1821 **** } assemble_external (t); ! return build (OFFSET_REF, TREE_TYPE (t), NULL_TREE, t); } --- 1828,1832 ---- } assemble_external (t); ! return build (OFFSET_REF, TREE_TYPE (t), decl, t); } *************** *** 1843,1847 **** fnfields = copy_list (fnfields); t = build_tree_list (error_mark_node, fnfields); ! TREE_TYPE (t) = build_member_type (type, unknown_type_node); return t; } --- 1854,1858 ---- fnfields = copy_list (fnfields); t = build_tree_list (error_mark_node, fnfields); ! TREE_TYPE (t) = build_offset_type (type, unknown_type_node); return t; } *************** *** 1852,1868 **** error message. */ - if (current_class_type == 0 - || get_base_distance (type, current_class_type, 0, &basetypes) == -1) - { - basetypes = TYPE_BINFO (type); - decl = build1 (NOP_EXPR, - IDENTIFIER_TYPE_VALUE (cname), - error_mark_node); - } - else if (current_class_decl == 0) - decl = build1 (NOP_EXPR, TREE_TYPE (TREE_TYPE (cname)), - error_mark_node); - else decl = C_C_D; - t = lookup_field (basetypes, name, 1); --- 1863,1866 ---- *************** *** 1874,1878 **** char *print_name; ! if (name == ansi_opname[TYPE_EXPR]) { error ("type conversion operator not a member of type `%s'", --- 1872,1876 ---- char *print_name; ! if (name == ansi_opname[(int) TYPE_EXPR]) { error ("type conversion operator not a member of type `%s'", *************** *** 1912,1916 **** /* In member functions, the form `cname::name' is no longer equivalent to `this->cname::name'. */ ! return build (OFFSET_REF, build_member_type (type, TREE_TYPE (t)), decl, t); } --- 1910,1914 ---- /* In member functions, the form `cname::name' is no longer equivalent to `this->cname::name'. */ ! return build (OFFSET_REF, build_offset_type (type, TREE_TYPE (t)), decl, t); } *************** *** 1971,1975 **** /* This is really hairy: if the function pointer is a pointer to a non-virtual member function, then we can't go mucking ! with the `this' pointer (any more than we aleady have to this point). If it is a pointer to a virtual member function, then we have to adjust the `this' pointer according to --- 1969,1973 ---- /* This is really hairy: if the function pointer is a pointer to a non-virtual member function, then we can't go mucking ! with the `this' pointer (any more than we already have to this point). If it is a pointer to a virtual member function, then we have to adjust the `this' pointer according to *************** *** 2025,2029 **** } ! if (TREE_STATIC (member)) { /* These were static members. */ --- 2023,2028 ---- } ! if (TREE_CODE (member) == VAR_DECL ! || TREE_CODE (TREE_TYPE (member)) == FUNCTION_TYPE) { /* These were static members. */ *************** *** 2080,2088 **** abort (); } /* If this is a reference to a member function, then return the address of the member function (which may involve going through the object's vtable), otherwise, return an expression ! for the derefernced pointer-to-member construct. */ addr = build_unary_op (ADDR_EXPR, base, 0); if (TREE_CODE (TREE_TYPE (member)) == METHOD_TYPE) { --- 2079,2089 ---- abort (); } + /* If this is a reference to a member function, then return the address of the member function (which may involve going through the object's vtable), otherwise, return an expression ! for the dereferenced pointer-to-member construct. */ addr = build_unary_op (ADDR_EXPR, base, 0); + if (TREE_CODE (TREE_TYPE (member)) == METHOD_TYPE) { *************** *** 2243,2247 **** = tree_cons (DECL_NAME (decl), build_tree_list (error_mark_node, decl), DECL_FRIENDLIST (typedecl)); ! if (DECL_NAME (decl) == ansi_opname[MODIFY_EXPR]) { tree parmtypes = TYPE_ARG_TYPES (TREE_TYPE (decl)); --- 2244,2248 ---- = tree_cons (DECL_NAME (decl), build_tree_list (error_mark_node, decl), DECL_FRIENDLIST (typedecl)); ! if (DECL_NAME (decl) == ansi_opname[(int) MODIFY_EXPR]) { tree parmtypes = TYPE_ARG_TYPES (TREE_TYPE (decl)); *************** *** 2298,2303 **** DECL_FRIENDLIST (typedecl)); if (! strncmp (IDENTIFIER_POINTER (name), ! IDENTIFIER_POINTER (ansi_opname[MODIFY_EXPR]), ! strlen (IDENTIFIER_POINTER (ansi_opname[MODIFY_EXPR])))) { TYPE_HAS_ASSIGNMENT (TREE_TYPE (typedecl)) = 1; --- 2299,2304 ---- DECL_FRIENDLIST (typedecl)); if (! strncmp (IDENTIFIER_POINTER (name), ! IDENTIFIER_POINTER (ansi_opname[(int) MODIFY_EXPR]), ! strlen (IDENTIFIER_POINTER (ansi_opname[(int) MODIFY_EXPR])))) { TYPE_HAS_ASSIGNMENT (TREE_TYPE (typedecl)) = 1; *************** *** 2491,2496 **** in their scope, their friend wind up in top-level scope as well. */ DECL_ASSEMBLER_NAME (decl) ! = build_decl_overload (IDENTIFIER_POINTER (declarator), ! TYPE_ARG_TYPES (TREE_TYPE (decl)), TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE); DECL_ARGUMENTS (decl) = parmdecls; --- 2492,2496 ---- in their scope, their friend wind up in top-level scope as well. */ DECL_ASSEMBLER_NAME (decl) ! = build_decl_overload (declarator, TYPE_ARG_TYPES (TREE_TYPE (decl)), TREE_CODE (TREE_TYPE (decl)) == METHOD_TYPE); DECL_ARGUMENTS (decl) = parmdecls; *************** *** 2611,2619 **** tree rval = build (CALL_EXPR, type, node, arglist, 0); TREE_SIDE_EFFECTS (rval) = 1; ! if (! TREE_USED (TREE_OPERAND (node, 0))) ! { ! assemble_external (TREE_OPERAND (node, 0)); ! TREE_USED (TREE_OPERAND (node, 0)) = 1; ! } return rval; } --- 2611,2616 ---- tree rval = build (CALL_EXPR, type, node, arglist, 0); TREE_SIDE_EFFECTS (rval) = 1; ! assemble_external (TREE_OPERAND (node, 0)); ! TREE_USED (TREE_OPERAND (node, 0)) = 1; return rval; } *************** *** 2627,2631 **** For types with constructors, the data returned is initialized ! by the approriate constructor. Whether the type has a constructor or not, if it has a pointer --- 2624,2628 ---- For types with constructors, the data returned is initialized ! by the appropriate constructor. Whether the type has a constructor or not, if it has a pointer *************** *** 2776,2781 **** while (TREE_CODE (type) == ARRAY_TYPE) { ! tree this_nelts = build_binary_op (PLUS_EXPR, integer_one_node, ! TYPE_MAX_VALUE (TYPE_DOMAIN (type))); if (nelts == integer_one_node) { --- 2773,2777 ---- while (TREE_CODE (type) == ARRAY_TYPE) { ! tree this_nelts = array_type_nelts_top (type); if (nelts == integer_one_node) { *************** *** 2915,2919 **** rval = convert (TYPE_POINTER_TO (true_type), rval); } ! else if (flag_this_is_variable && TYPE_HAS_CONSTRUCTOR (true_type) && init != void_type_node) { --- 2911,2915 ---- rval = convert (TYPE_POINTER_TO (true_type), rval); } ! else if (flag_this_is_variable > 0 && TYPE_HAS_CONSTRUCTOR (true_type) && init != void_type_node) { *************** *** 3221,3227 **** } - while (TREE_CODE (type) == ARRAY_TYPE) - type = TREE_TYPE (type); - size = size_in_bytes (type); --- 3217,3220 ---- *************** *** 3228,3232 **** /* Set to zero in case size is <= 0. Optimizer will delete this if it is not needed. */ ! rval = get_temp_regvar (TYPE_POINTER_TO (type), null_pointer_node); base = default_conversion (base); base = convert (TYPE_POINTER_TO (type), base); --- 3221,3226 ---- /* Set to zero in case size is <= 0. Optimizer will delete this if it is not needed. */ ! rval = get_temp_regvar (TYPE_POINTER_TO (type), convert (TYPE_POINTER_TO (type), ! null_pointer_node)); base = default_conversion (base); base = convert (TYPE_POINTER_TO (type), base); *************** *** 3634,3638 **** else { ! /* This can get visibilties wrong. */ tree binfos = BINFO_BASETYPES (TYPE_BINFO (type)); int i, n_baseclasses = binfos ? TREE_VEC_LENGTH (binfos) : 0; --- 3628,3632 ---- else { ! /* This can get visibilities wrong. */ tree binfos = BINFO_BASETYPES (TYPE_BINFO (type)); int i, n_baseclasses = binfos ? TREE_VEC_LENGTH (binfos) : 0; *************** *** 3781,3785 **** tree rval; /* Temporary variables used by the loop. */ ! tree tbase, size_exp; /* This is the body of the loop that implements the deletion of a --- 3775,3779 ---- tree rval; /* Temporary variables used by the loop. */ ! tree tbase, size_exp, tbase_init; /* This is the body of the loop that implements the deletion of a *************** *** 3787,3791 **** tree body; ! /* This is the LOOP_EXPR that governs the deletetion of the elements. */ tree loop; --- 3781,3785 ---- tree body; ! /* This is the LOOP_EXPR that governs the deletion of the elements. */ tree loop; *************** *** 3817,3839 **** else if (TREE_CODE (ptype) == ARRAY_TYPE) { ! /* If we're passed an array, the maxindex we're passed is for the ! first dimension we'll be looking at. So start our loop on the ! second dimension (if any). ! ! We could as easily extract it by calling array_type_nelts here, ! and eliminating maxindex as an argument to this function. */ ! assert (array_type_nelts (ptype) == maxindex); ! maxindex = fold (build (PLUS_EXPR, integer_type_node, ! maxindex, integer_one_node)); ! ptype = TREE_TYPE (ptype); while (TREE_CODE (ptype) == ARRAY_TYPE) ! { ! /* array_type_nelts actually returns ! the max index, so add 1. */ ! tree n = fold (build (PLUS_EXPR, integer_type_node, ! array_type_nelts (ptype), integer_one_node)); ! maxindex = fold (build (MULT_EXPR, integer_type_node, maxindex, n)); ! ptype = TREE_TYPE (ptype); ! } base = build_unary_op (ADDR_EXPR, base, 1); } --- 3811,3818 ---- else if (TREE_CODE (ptype) == ARRAY_TYPE) { ! /* get the total number of things in the array, maxindex is a bad name */ ! maxindex = array_type_nelts_total (ptype); while (TREE_CODE (ptype) == ARRAY_TYPE) ! ptype = TREE_TYPE (ptype); base = build_unary_op (ADDR_EXPR, base, 1); } *************** *** 3854,3862 **** size_exp = size_in_bytes (type); tbase = build_decl (VAR_DECL, NULL_TREE, ptype); TREE_REGDECL (tbase) = 1; - DECL_INITIAL (tbase) = fold (build (PLUS_EXPR, ptype, base, - size_binop (MULT_EXPR, size_exp, - maxindex))); - controller = build (BIND_EXPR, void_type_node, tbase, 0, 0); TREE_SIDE_EFFECTS (controller) = 1; --- 3833,3843 ---- size_exp = size_in_bytes (type); tbase = build_decl (VAR_DECL, NULL_TREE, ptype); + tbase_init = build_modify_expr (tbase, NOP_EXPR, + fold (build (PLUS_EXPR, ptype, + base, + size_binop (MULT_EXPR, + size_exp, + maxindex)))); TREE_REGDECL (tbase) = 1; controller = build (BIND_EXPR, void_type_node, tbase, 0, 0); TREE_SIDE_EFFECTS (controller) = 1; *************** *** 3897,3900 **** --- 3878,3885 ---- loop = build (LOOP_EXPR, void_type_node, build_compound_expr (body)); + loop = tree_cons (NULL_TREE, tbase_init, + tree_cons (NULL_TREE, loop, NULL_TREE)); + loop = build_compound_expr (loop); + no_destructor: /* If the delete flag is one, or anything else with the low bit set, *************** *** 3930,3933 **** --- 3915,3923 ---- else body = loop; + + /* Outermost wrapper: If pointer is null, punt. */ + body = build (COND_EXPR, void_type_node, + build (NE_EXPR, integer_type_node, base, integer_zero_node), + body, integer_zero_node); if (controller) diff -rc2N gcc-2.0/cp-lex.c gcc-2.1/cp-lex.c *** gcc-2.0/cp-lex.c Mon Feb 17 01:03:46 1992 --- gcc-2.1/cp-lex.c Tue Mar 24 05:35:31 1992 *************** *** 407,411 **** ansi_opname[0] = get_identifier (""); ! for (i = 0; i < LAST_CPLUS_TREE_CODE; i++) { ansi_opname[i] = ansi_opname[0]; --- 407,411 ---- ansi_opname[0] = get_identifier (""); ! for (i = 0; i < (int) LAST_CPLUS_TREE_CODE; i++) { ansi_opname[i] = ansi_opname[0]; *************** *** 413,532 **** } ! ansi_opname[MULT_EXPR] = get_identifier ("__ml"); ! IDENTIFIER_OPNAME_P (ansi_opname[MULT_EXPR]) = 1; ! ansi_opname[INDIRECT_REF] = ansi_opname[MULT_EXPR]; ! ansi_assopname[MULT_EXPR] = get_identifier ("__aml"); ! IDENTIFIER_OPNAME_P (ansi_assopname[MULT_EXPR]) = 1; ! ansi_assopname[INDIRECT_REF] = ansi_assopname[MULT_EXPR]; ! ansi_opname[TRUNC_MOD_EXPR] = get_identifier ("__md"); ! IDENTIFIER_OPNAME_P (ansi_opname[TRUNC_MOD_EXPR]) = 1; ! ansi_assopname[TRUNC_MOD_EXPR] = get_identifier ("__amd"); ! IDENTIFIER_OPNAME_P (ansi_assopname[TRUNC_MOD_EXPR]) = 1; ! ansi_opname[CEIL_MOD_EXPR] = ansi_opname[TRUNC_MOD_EXPR]; ! ansi_opname[FLOOR_MOD_EXPR] = ansi_opname[TRUNC_MOD_EXPR]; ! ansi_opname[ROUND_MOD_EXPR] = ansi_opname[TRUNC_MOD_EXPR]; ! ansi_opname[MINUS_EXPR] = get_identifier ("__mi"); ! IDENTIFIER_OPNAME_P (ansi_opname[MINUS_EXPR]) = 1; ! ansi_opname[NEGATE_EXPR] = ansi_opname[MINUS_EXPR]; ! ansi_assopname[MINUS_EXPR] = get_identifier ("__ami"); ! IDENTIFIER_OPNAME_P (ansi_assopname[MINUS_EXPR]) = 1; ! ansi_assopname[NEGATE_EXPR] = ansi_assopname[MINUS_EXPR]; ! ansi_opname[RSHIFT_EXPR] = get_identifier ("__rs"); ! IDENTIFIER_OPNAME_P (ansi_opname[RSHIFT_EXPR]) = 1; ! ansi_assopname[RSHIFT_EXPR] = get_identifier ("__ars"); ! IDENTIFIER_OPNAME_P (ansi_assopname[RSHIFT_EXPR]) = 1; ! ansi_opname[NE_EXPR] = get_identifier ("__ne"); ! IDENTIFIER_OPNAME_P (ansi_opname[NE_EXPR]) = 1; ! ansi_opname[GT_EXPR] = get_identifier ("__gt"); ! IDENTIFIER_OPNAME_P (ansi_opname[GT_EXPR]) = 1; ! ansi_opname[GE_EXPR] = get_identifier ("__ge"); ! IDENTIFIER_OPNAME_P (ansi_opname[GE_EXPR]) = 1; ! ansi_opname[BIT_IOR_EXPR] = get_identifier ("__or"); ! IDENTIFIER_OPNAME_P (ansi_opname[BIT_IOR_EXPR]) = 1; ! ansi_assopname[BIT_IOR_EXPR] = get_identifier ("__aor"); ! IDENTIFIER_OPNAME_P (ansi_assopname[BIT_IOR_EXPR]) = 1; ! ansi_opname[TRUTH_ANDIF_EXPR] = get_identifier ("__aa"); ! IDENTIFIER_OPNAME_P (ansi_opname[TRUTH_ANDIF_EXPR]) = 1; ! ansi_opname[TRUTH_NOT_EXPR] = get_identifier ("__nt"); ! IDENTIFIER_OPNAME_P (ansi_opname[TRUTH_NOT_EXPR]) = 1; ! ansi_opname[PREINCREMENT_EXPR] = get_identifier ("__pp"); ! IDENTIFIER_OPNAME_P (ansi_opname[PREINCREMENT_EXPR]) = 1; ! ansi_opname[POSTINCREMENT_EXPR] = ansi_opname[PREINCREMENT_EXPR]; ! ansi_opname[MODIFY_EXPR] = get_identifier ("__as"); ! IDENTIFIER_OPNAME_P (ansi_opname[MODIFY_EXPR]) = 1; ! ansi_assopname[NOP_EXPR] = ansi_opname[MODIFY_EXPR]; ! ansi_opname[COMPOUND_EXPR] = get_identifier ("__cm"); ! IDENTIFIER_OPNAME_P (ansi_opname[COMPOUND_EXPR]) = 1; ! ansi_opname[EXACT_DIV_EXPR] = get_identifier ("__dv"); ! IDENTIFIER_OPNAME_P (ansi_opname[EXACT_DIV_EXPR]) = 1; ! ansi_assopname[EXACT_DIV_EXPR] = get_identifier ("__adv"); ! IDENTIFIER_OPNAME_P (ansi_assopname[EXACT_DIV_EXPR]) = 1; ! ansi_opname[TRUNC_DIV_EXPR] = ansi_opname[EXACT_DIV_EXPR]; ! ansi_opname[CEIL_DIV_EXPR] = ansi_opname[EXACT_DIV_EXPR]; ! ansi_opname[FLOOR_DIV_EXPR] = ansi_opname[EXACT_DIV_EXPR]; ! ansi_opname[ROUND_DIV_EXPR] = ansi_opname[EXACT_DIV_EXPR]; ! ansi_opname[PLUS_EXPR] = get_identifier ("__pl"); ! ansi_assopname[TRUNC_DIV_EXPR] = ansi_assopname[EXACT_DIV_EXPR]; ! ansi_assopname[CEIL_DIV_EXPR] = ansi_assopname[EXACT_DIV_EXPR]; ! ansi_assopname[FLOOR_DIV_EXPR] = ansi_assopname[EXACT_DIV_EXPR]; ! ansi_assopname[ROUND_DIV_EXPR] = ansi_assopname[EXACT_DIV_EXPR]; ! ansi_opname[PLUS_EXPR] = get_identifier ("__pl"); ! IDENTIFIER_OPNAME_P (ansi_opname[PLUS_EXPR]) = 1; ! ansi_assopname[PLUS_EXPR] = get_identifier ("__apl"); ! IDENTIFIER_OPNAME_P (ansi_assopname[PLUS_EXPR]) = 1; ! ansi_opname[CONVERT_EXPR] = ansi_opname[PLUS_EXPR]; ! ansi_assopname[CONVERT_EXPR] = ansi_assopname[PLUS_EXPR]; ! ansi_opname[LSHIFT_EXPR] = get_identifier ("__ls"); ! IDENTIFIER_OPNAME_P (ansi_opname[LSHIFT_EXPR]) = 1; ! ansi_assopname[LSHIFT_EXPR] = get_identifier ("__als"); ! IDENTIFIER_OPNAME_P (ansi_assopname[LSHIFT_EXPR]) = 1; ! ansi_opname[EQ_EXPR] = get_identifier ("__eq"); ! IDENTIFIER_OPNAME_P (ansi_opname[EQ_EXPR]) = 1; ! ansi_opname[LT_EXPR] = get_identifier ("__lt"); ! IDENTIFIER_OPNAME_P (ansi_opname[LT_EXPR]) = 1; ! ansi_opname[LE_EXPR] = get_identifier ("__le"); ! IDENTIFIER_OPNAME_P (ansi_opname[LE_EXPR]) = 1; ! ansi_opname[BIT_AND_EXPR] = get_identifier ("__ad"); ! IDENTIFIER_OPNAME_P (ansi_opname[BIT_AND_EXPR]) = 1; ! ansi_assopname[BIT_AND_EXPR] = get_identifier ("__aad"); ! IDENTIFIER_OPNAME_P (ansi_assopname[BIT_AND_EXPR]) = 1; ! ansi_opname[ADDR_EXPR] = ansi_opname[BIT_AND_EXPR]; ! ansi_assopname[ADDR_EXPR] = ansi_assopname[BIT_AND_EXPR]; ! ansi_opname[BIT_XOR_EXPR] = get_identifier ("__er"); ! IDENTIFIER_OPNAME_P (ansi_opname[BIT_XOR_EXPR]) = 1; ! ansi_assopname[BIT_XOR_EXPR] = get_identifier ("__aer"); ! IDENTIFIER_OPNAME_P (ansi_assopname[BIT_XOR_EXPR]) = 1; ! ansi_opname[TRUTH_ORIF_EXPR] = get_identifier ("__oo"); ! IDENTIFIER_OPNAME_P (ansi_opname[TRUTH_ORIF_EXPR]) = 1; ! ansi_opname[BIT_NOT_EXPR] = get_identifier ("__co"); ! IDENTIFIER_OPNAME_P (ansi_opname[BIT_NOT_EXPR]) = 1; ! ansi_opname[PREDECREMENT_EXPR] = get_identifier ("__mm"); ! IDENTIFIER_OPNAME_P (ansi_opname[PREDECREMENT_EXPR]) = 1; ! ansi_opname[POSTDECREMENT_EXPR] = ansi_opname[PREDECREMENT_EXPR]; ! ansi_opname[COMPONENT_REF] = get_identifier ("__rf"); ! IDENTIFIER_OPNAME_P (ansi_opname[COMPONENT_REF]) = 1; ! ansi_opname[MEMBER_REF] = get_identifier ("__rm"); ! IDENTIFIER_OPNAME_P (ansi_opname[MEMBER_REF]) = 1; ! ansi_opname[CALL_EXPR] = get_identifier ("__cl"); ! IDENTIFIER_OPNAME_P (ansi_opname[CALL_EXPR]) = 1; ! ansi_opname[ARRAY_REF] = get_identifier ("__vc"); ! IDENTIFIER_OPNAME_P (ansi_opname[ARRAY_REF]) = 1; ! ansi_opname[NEW_EXPR] = get_identifier ("__nw"); ! IDENTIFIER_OPNAME_P (ansi_opname[NEW_EXPR]) = 1; ! ansi_opname[DELETE_EXPR] = get_identifier ("__dl"); ! IDENTIFIER_OPNAME_P (ansi_opname[DELETE_EXPR]) = 1; ! ansi_opname[TYPE_EXPR] = get_identifier ("__op"); ! IDENTIFIER_OPNAME_P (ansi_opname[TYPE_EXPR]) = 1; /* This is not true: these operators are not defined in ANSI, but we need them anyway. */ ! ansi_opname[MIN_EXPR] = get_identifier ("__mn"); ! IDENTIFIER_OPNAME_P (ansi_opname[MIN_EXPR]) = 1; ! ansi_opname[MAX_EXPR] = get_identifier ("__mx"); ! IDENTIFIER_OPNAME_P (ansi_opname[MAX_EXPR]) = 1; ! ansi_opname[COND_EXPR] = get_identifier ("__cn"); ! IDENTIFIER_OPNAME_P (ansi_opname[COND_EXPR]) = 1; ! ansi_opname[METHOD_CALL_EXPR] = get_identifier ("__wr"); ! IDENTIFIER_OPNAME_P (ansi_opname[METHOD_CALL_EXPR]) = 1; init_method (); --- 413,532 ---- } ! ansi_opname[(int) MULT_EXPR] = get_identifier ("__ml"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) MULT_EXPR]) = 1; ! ansi_opname[(int) INDIRECT_REF] = ansi_opname[(int) MULT_EXPR]; ! ansi_assopname[(int) MULT_EXPR] = get_identifier ("__aml"); ! IDENTIFIER_OPNAME_P (ansi_assopname[(int) MULT_EXPR]) = 1; ! ansi_assopname[(int) INDIRECT_REF] = ansi_assopname[(int) MULT_EXPR]; ! ansi_opname[(int) TRUNC_MOD_EXPR] = get_identifier ("__md"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) TRUNC_MOD_EXPR]) = 1; ! ansi_assopname[(int) TRUNC_MOD_EXPR] = get_identifier ("__amd"); ! IDENTIFIER_OPNAME_P (ansi_assopname[(int) TRUNC_MOD_EXPR]) = 1; ! ansi_opname[(int) CEIL_MOD_EXPR] = ansi_opname[(int) TRUNC_MOD_EXPR]; ! ansi_opname[(int) FLOOR_MOD_EXPR] = ansi_opname[(int) TRUNC_MOD_EXPR]; ! ansi_opname[(int) ROUND_MOD_EXPR] = ansi_opname[(int) TRUNC_MOD_EXPR]; ! ansi_opname[(int) MINUS_EXPR] = get_identifier ("__mi"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) MINUS_EXPR]) = 1; ! ansi_opname[(int) NEGATE_EXPR] = ansi_opname[(int) MINUS_EXPR]; ! ansi_assopname[(int) MINUS_EXPR] = get_identifier ("__ami"); ! IDENTIFIER_OPNAME_P (ansi_assopname[(int) MINUS_EXPR]) = 1; ! ansi_assopname[(int) NEGATE_EXPR] = ansi_assopname[(int) MINUS_EXPR]; ! ansi_opname[(int) RSHIFT_EXPR] = get_identifier ("__rs"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) RSHIFT_EXPR]) = 1; ! ansi_assopname[(int) RSHIFT_EXPR] = get_identifier ("__ars"); ! IDENTIFIER_OPNAME_P (ansi_assopname[(int) RSHIFT_EXPR]) = 1; ! ansi_opname[(int) NE_EXPR] = get_identifier ("__ne"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) NE_EXPR]) = 1; ! ansi_opname[(int) GT_EXPR] = get_identifier ("__gt"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) GT_EXPR]) = 1; ! ansi_opname[(int) GE_EXPR] = get_identifier ("__ge"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) GE_EXPR]) = 1; ! ansi_opname[(int) BIT_IOR_EXPR] = get_identifier ("__or"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) BIT_IOR_EXPR]) = 1; ! ansi_assopname[(int) BIT_IOR_EXPR] = get_identifier ("__aor"); ! IDENTIFIER_OPNAME_P (ansi_assopname[(int) BIT_IOR_EXPR]) = 1; ! ansi_opname[(int) TRUTH_ANDIF_EXPR] = get_identifier ("__aa"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) TRUTH_ANDIF_EXPR]) = 1; ! ansi_opname[(int) TRUTH_NOT_EXPR] = get_identifier ("__nt"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) TRUTH_NOT_EXPR]) = 1; ! ansi_opname[(int) PREINCREMENT_EXPR] = get_identifier ("__pp"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) PREINCREMENT_EXPR]) = 1; ! ansi_opname[(int) POSTINCREMENT_EXPR] = ansi_opname[(int) PREINCREMENT_EXPR]; ! ansi_opname[(int) MODIFY_EXPR] = get_identifier ("__as"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) MODIFY_EXPR]) = 1; ! ansi_assopname[(int) NOP_EXPR] = ansi_opname[(int) MODIFY_EXPR]; ! ansi_opname[(int) COMPOUND_EXPR] = get_identifier ("__cm"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) COMPOUND_EXPR]) = 1; ! ansi_opname[(int) EXACT_DIV_EXPR] = get_identifier ("__dv"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) EXACT_DIV_EXPR]) = 1; ! ansi_assopname[(int) EXACT_DIV_EXPR] = get_identifier ("__adv"); ! IDENTIFIER_OPNAME_P (ansi_assopname[(int) EXACT_DIV_EXPR]) = 1; ! ansi_opname[(int) TRUNC_DIV_EXPR] = ansi_opname[(int) EXACT_DIV_EXPR]; ! ansi_opname[(int) CEIL_DIV_EXPR] = ansi_opname[(int) EXACT_DIV_EXPR]; ! ansi_opname[(int) FLOOR_DIV_EXPR] = ansi_opname[(int) EXACT_DIV_EXPR]; ! ansi_opname[(int) ROUND_DIV_EXPR] = ansi_opname[(int) EXACT_DIV_EXPR]; ! ansi_opname[(int) PLUS_EXPR] = get_identifier ("__pl"); ! ansi_assopname[(int) TRUNC_DIV_EXPR] = ansi_assopname[(int) EXACT_DIV_EXPR]; ! ansi_assopname[(int) CEIL_DIV_EXPR] = ansi_assopname[(int) EXACT_DIV_EXPR]; ! ansi_assopname[(int) FLOOR_DIV_EXPR] = ansi_assopname[(int) EXACT_DIV_EXPR]; ! ansi_assopname[(int) ROUND_DIV_EXPR] = ansi_assopname[(int) EXACT_DIV_EXPR]; ! ansi_opname[(int) PLUS_EXPR] = get_identifier ("__pl"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) PLUS_EXPR]) = 1; ! ansi_assopname[(int) PLUS_EXPR] = get_identifier ("__apl"); ! IDENTIFIER_OPNAME_P (ansi_assopname[(int) PLUS_EXPR]) = 1; ! ansi_opname[(int) CONVERT_EXPR] = ansi_opname[(int) PLUS_EXPR]; ! ansi_assopname[(int) CONVERT_EXPR] = ansi_assopname[(int) PLUS_EXPR]; ! ansi_opname[(int) LSHIFT_EXPR] = get_identifier ("__ls"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) LSHIFT_EXPR]) = 1; ! ansi_assopname[(int) LSHIFT_EXPR] = get_identifier ("__als"); ! IDENTIFIER_OPNAME_P (ansi_assopname[(int) LSHIFT_EXPR]) = 1; ! ansi_opname[(int) EQ_EXPR] = get_identifier ("__eq"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) EQ_EXPR]) = 1; ! ansi_opname[(int) LT_EXPR] = get_identifier ("__lt"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) LT_EXPR]) = 1; ! ansi_opname[(int) LE_EXPR] = get_identifier ("__le"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) LE_EXPR]) = 1; ! ansi_opname[(int) BIT_AND_EXPR] = get_identifier ("__ad"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) BIT_AND_EXPR]) = 1; ! ansi_assopname[(int) BIT_AND_EXPR] = get_identifier ("__aad"); ! IDENTIFIER_OPNAME_P (ansi_assopname[(int) BIT_AND_EXPR]) = 1; ! ansi_opname[(int) ADDR_EXPR] = ansi_opname[(int) BIT_AND_EXPR]; ! ansi_assopname[(int) ADDR_EXPR] = ansi_assopname[(int) BIT_AND_EXPR]; ! ansi_opname[(int) BIT_XOR_EXPR] = get_identifier ("__er"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) BIT_XOR_EXPR]) = 1; ! ansi_assopname[(int) BIT_XOR_EXPR] = get_identifier ("__aer"); ! IDENTIFIER_OPNAME_P (ansi_assopname[(int) BIT_XOR_EXPR]) = 1; ! ansi_opname[(int) TRUTH_ORIF_EXPR] = get_identifier ("__oo"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) TRUTH_ORIF_EXPR]) = 1; ! ansi_opname[(int) BIT_NOT_EXPR] = get_identifier ("__co"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) BIT_NOT_EXPR]) = 1; ! ansi_opname[(int) PREDECREMENT_EXPR] = get_identifier ("__mm"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) PREDECREMENT_EXPR]) = 1; ! ansi_opname[(int) POSTDECREMENT_EXPR] = ansi_opname[(int) PREDECREMENT_EXPR]; ! ansi_opname[(int) COMPONENT_REF] = get_identifier ("__rf"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) COMPONENT_REF]) = 1; ! ansi_opname[(int) MEMBER_REF] = get_identifier ("__rm"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) MEMBER_REF]) = 1; ! ansi_opname[(int) CALL_EXPR] = get_identifier ("__cl"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) CALL_EXPR]) = 1; ! ansi_opname[(int) ARRAY_REF] = get_identifier ("__vc"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) ARRAY_REF]) = 1; ! ansi_opname[(int) NEW_EXPR] = get_identifier ("__nw"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) NEW_EXPR]) = 1; ! ansi_opname[(int) DELETE_EXPR] = get_identifier ("__dl"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) DELETE_EXPR]) = 1; ! ansi_opname[(int) TYPE_EXPR] = get_identifier ("__op"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) TYPE_EXPR]) = 1; /* This is not true: these operators are not defined in ANSI, but we need them anyway. */ ! ansi_opname[(int) MIN_EXPR] = get_identifier ("__mn"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) MIN_EXPR]) = 1; ! ansi_opname[(int) MAX_EXPR] = get_identifier ("__mx"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) MAX_EXPR]) = 1; ! ansi_opname[(int) COND_EXPR] = get_identifier ("__cn"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) COND_EXPR]) = 1; ! ansi_opname[(int) METHOD_CALL_EXPR] = get_identifier ("__wr"); ! IDENTIFIER_OPNAME_P (ansi_opname[(int) METHOD_CALL_EXPR]) = 1; init_method (); *************** *** 732,736 **** { /* Easiest way to not recognize exception ! handling extentions... */ UNSET_RESERVED_WORD ("all"); UNSET_RESERVED_WORD ("except"); --- 732,736 ---- { /* Easiest way to not recognize exception ! handling extensions... */ UNSET_RESERVED_WORD ("all"); UNSET_RESERVED_WORD ("except"); *************** *** 745,749 **** { /* Easiest way to not recognize exception ! handling extentions... */ UNSET_RESERVED_WORD ("exception"); UNSET_RESERVED_WORD ("all"); --- 745,749 ---- { /* Easiest way to not recognize exception ! handling extensions... */ UNSET_RESERVED_WORD ("exception"); UNSET_RESERVED_WORD ("all"); *************** *** 3650,3653 **** --- 3650,3662 ---- else abort (); + #if 0 /* not yet, should get fixed properly later */ + if (code == TYPE_DECL) + { + tree id; + id = get_identifier (build_overload_name (type, 1, 1)); + DECL_ASSEMBLER_NAME (t) = id; + } + + #endif #ifdef GATHER_STATISTICS tree_node_counts[(int)lang_decl] += 1; *************** *** 3669,3672 **** --- 3678,3690 ---- register int i = sizeof (struct lang_decl_flags) / sizeof (int); register int *pi; + #if 0 /* not yet, should get fixed properly later */ + + if (code == TYPE_DECL) + { + tree id; + id = get_identifier (build_overload_name (type, 1, 1)); + DECL_ASSEMBLER_NAME (t) = id; + } + #endif if (! TREE_PERMANENT (t)) diff -rc2N gcc-2.0/cp-method.c gcc-2.1/cp-method.c *** gcc-2.0/cp-method.c Mon Feb 17 01:03:48 1992 --- gcc-2.1/cp-method.c Tue Mar 24 05:35:35 1992 *************** *** 1,4 **** /* Handle the hair of processing (but not expanding) inline functions. ! Also manage function and varaible name overloading. Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) --- 1,4 ---- /* Handle the hair of processing (but not expanding) inline functions. ! Also manage function and variable name overloading. Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) *************** *** 153,158 **** --- 153,163 ---- if (TREE_CODE (name) == TYPE_DECL) { + #if 0 /* not yet, should get fixed properly later */ + if (DECL_CONTEXT (name)) + context_string = TYPE_NAME_STRING (DECL_CONTEXT (name)); + #else if (DECL_LANG_SPECIFIC (name) && DECL_CLASS_CONTEXT (name)) context_string = TYPE_NAME_STRING (DECL_CLASS_CONTEXT (name)); + #endif name = DECL_NAME (name); } *************** *** 162,166 **** if (context_string) { ! obstack_grow (&scratch_obstack, context_string, strlen (context_string)-1); OB_PUTC2 (':', ':'); } --- 167,171 ---- if (context_string) { ! obstack_grow (&scratch_obstack, context_string, strlen (context_string)); OB_PUTC2 (':', ':'); } *************** *** 632,636 **** case IDENTIFIER_NODE: ! if (t == ansi_opname[TYPE_EXPR]) { OB_PUTS ("operator "); --- 637,641 ---- case IDENTIFIER_NODE: ! if (t == ansi_opname[(int) TYPE_EXPR]) { OB_PUTS ("operator "); *************** *** 902,906 **** case INDIRECT_REF: ! dump_unary_op ("*", t, 1); return; --- 907,921 ---- case INDIRECT_REF: ! if (TREE_HAS_CONSTRUCTOR (t)) ! { ! t = TREE_OPERAND (t, 0); ! assert (TREE_CODE (t) == CALL_EXPR); ! dump_init (TREE_OPERAND (t, 0)); ! OB_PUTC ('('); ! dump_init_list (TREE_CHAIN (TREE_OPERAND (t, 1))); ! OB_PUTC (')'); ! } ! else ! dump_unary_op ("*", t, 1); return; *************** *** 1137,1141 **** } ! /* Move inline function defintions out of structure so that they can be processed normally. CNAME is the name of the class we are working from, METHOD_LIST is the list of method lists --- 1152,1156 ---- } ! /* Move inline function definitions out of structure so that they can be processed normally. CNAME is the name of the class we are working from, METHOD_LIST is the list of method lists *************** *** 1274,1278 **** enum tree_code code = TREE_CODE (TREE_TYPE (TREE_VALUE (tta))); if (code == ERROR_MARK) ! OB_PUTS ("(failed type instatiation)"); else { --- 1289,1293 ---- enum tree_code code = TREE_CODE (TREE_TYPE (TREE_VALUE (tta))); if (code == ERROR_MARK) ! OB_PUTS ("(failed type instantiation)"); else { *************** *** 1300,1304 **** static int maxtype; ! /* Number of occurances of last type seen. */ static int nrepeats; --- 1315,1319 ---- static int maxtype; ! /* Number of occurrences of last type seen. */ static int nrepeats; *************** *** 1631,1637 **** OB_PUTC ('A'); ! length = array_type_nelts (parmtype); ! if (TREE_CODE (length) == INTEGER_CST) ! icat (TREE_INT_CST_LOW (length) + 1); OB_PUTC ('_'); goto more; --- 1646,1660 ---- OB_PUTC ('A'); ! if (TYPE_DOMAIN (parmtype) == NULL_TREE) ! { ! error ("parameter type with unspecified array bounds invalid"); ! icat (1); ! } ! else ! { ! length = array_type_nelts (parmtype); ! if (TREE_CODE (length) == INTEGER_CST) ! icat (TREE_INT_CST_LOW (length) + 1); ! } OB_PUTC ('_'); goto more; *************** *** 1685,1689 **** OB_PUTC ('V'); ! /* For cfront 2.0 compatability. */ OB_PUTC ('F'); --- 1708,1712 ---- OB_PUTC ('V'); ! /* For cfront 2.0 compatibility. */ OB_PUTC ('F'); *************** *** 1883,1891 **** this overload is being performed for a constructor. */ tree ! build_decl_overload (name, parms, for_method) ! char *name; tree parms; int for_method; { OB_INIT (); if (for_method != 2) --- 1906,1929 ---- this overload is being performed for a constructor. */ tree ! build_decl_overload (dname, parms, for_method) ! tree dname; tree parms; int for_method; { + char *name = IDENTIFIER_POINTER (dname); + + if (dname == ansi_opname[(int) NEW_EXPR] + && parms != NULL_TREE + && TREE_CODE (parms) == TREE_LIST + && TREE_VALUE (parms) == sizetype + && TREE_CHAIN (parms) == void_list_node) + return get_identifier ("__builtin_new"); + else if (dname == ansi_opname[(int) DELETE_EXPR] + && parms != NULL_TREE + && TREE_CODE (parms) == TREE_LIST + && TREE_VALUE (parms) == ptr_type_node + && TREE_CHAIN (parms) == void_list_node) + return get_identifier ("__builtin_delete"); + OB_INIT (); if (for_method != 2) *************** *** 1939,1943 **** { OB_INIT (); ! OB_PUTID (ansi_opname[TYPE_EXPR]); #if 0 --- 1977,1981 ---- { OB_INIT (); ! OB_PUTID (ansi_opname[(int) TYPE_EXPR]); #if 0 *************** *** 1980,1984 **** *p = tolower (*p); } ! /* If there's no change, we have an innappropriate T_DESC_FORMAT. */ assert (changed != 0); } --- 2018,2022 ---- *p = tolower (*p); } ! /* If there's no change, we have an inappropriate T_DESC_FORMAT. */ assert (changed != 0); } *************** *** 1991,1995 **** /* Top-level interface to explicit overload requests. Allow NAME to be overloaded. Error if NAME is already declared for the current ! scope. Warning if function is redundanly overloaded. */ void --- 2029,2033 ---- /* Top-level interface to explicit overload requests. Allow NAME to be overloaded. Error if NAME is already declared for the current ! scope. Warning if function is redundantly overloaded. */ void *************** *** 2130,2134 **** allocating for that constructor's (destructor's) type. */ ! fnname = ansi_opname[NEW_EXPR]; if (flags & LOOKUP_GLOBAL) return build_overload_call (fnname, tree_cons (NULL_TREE, xarg2, arg3), --- 2168,2172 ---- allocating for that constructor's (destructor's) type. */ ! fnname = ansi_opname[(int) NEW_EXPR]; if (flags & LOOKUP_GLOBAL) return build_overload_call (fnname, tree_cons (NULL_TREE, xarg2, arg3), *************** *** 2157,2161 **** /* See comment above. */ ! fnname = ansi_opname[DELETE_EXPR]; if (flags & LOOKUP_GLOBAL) return build_overload_call (fnname, build_tree_list (NULL_TREE, xarg1), --- 2195,2199 ---- /* See comment above. */ ! fnname = ansi_opname[(int) DELETE_EXPR]; if (flags & LOOKUP_GLOBAL) return build_overload_call (fnname, build_tree_list (NULL_TREE, xarg1), *************** *** 2259,2263 **** fnname = ansi_assopname[(int)arg3]; else ! fnname = ansi_opname[code]; global_fn = IDENTIFIER_GLOBAL_VALUE (fnname); --- 2297,2301 ---- fnname = ansi_assopname[(int)arg3]; else ! fnname = ansi_opname[(int) code]; global_fn = IDENTIFIER_GLOBAL_VALUE (fnname); *************** *** 2278,2282 **** operators will succeed. */ ! /* This argument may be an uncommited OFFSET_REF. This is the case for example when dealing with static class members which are referenced from their class name rather than --- 2316,2320 ---- operators will succeed. */ ! /* This argument may be an uncommitted OFFSET_REF. This is the case for example when dealing with static class members which are referenced from their class name rather than *************** *** 2466,2471 **** if (TREE_CODE (value) == VAR_DECL && ! TREE_USED (value)) { ! if (TREE_EXTERNAL (value)) ! assemble_external (value); TREE_USED (value) = 1; } --- 2504,2508 ---- if (TREE_CODE (value) == VAR_DECL && ! TREE_USED (value)) { ! assemble_external (value); TREE_USED (value) = 1; } diff -rc2N gcc-2.0/cp-parse.h gcc-2.1/cp-parse.h *** gcc-2.0/cp-parse.h Mon Feb 17 03:11:42 1992 --- gcc-2.1/cp-parse.h Sun Mar 22 22:01:38 1992 *************** *** 1,3 **** ! typedef union {long itype; tree ttype; enum tree_code code; } YYSTYPE; #define IDENTIFIER 258 #define TYPENAME 259 --- 1,3 ---- ! typedef union {long itype; tree ttype; char *strtype; enum tree_code code; } YYSTYPE; #define IDENTIFIER 258 #define TYPENAME 259 *************** *** 23,27 **** #define RETURN 279 #define GOTO 280 ! #define ASM 281 #define TYPEOF 282 #define ALIGNOF 283 --- 23,27 ---- #define RETURN 279 #define GOTO 280 ! #define ASM_KEYWORD 281 #define TYPEOF 282 #define ALIGNOF 283 *************** *** 29,83 **** #define CLASSOF 285 #define ATTRIBUTE 286 ! #define AGGR 287 ! #define VISSPEC 288 ! #define DELETE 289 ! #define NEW 290 ! #define OVERLOAD 291 ! #define THIS 292 ! #define OPERATOR 293 ! #define DYNAMIC 294 ! #define POINTSAT_LEFT_RIGHT 295 ! #define LEFT_RIGHT 296 ! #define TEMPLATE 297 ! #define SCOPE 298 ! #define START_DECLARATOR 299 ! #define EMPTY 300 ! #define TYPENAME_COLON 301 ! #define ASSIGN 302 ! #define RANGE 303 ! #define OROR 304 ! #define ANDAND 305 ! #define MIN_MAX 306 ! #define EQCOMPARE 307 ! #define ARITHCOMPARE 308 ! #define LSHIFT 309 ! #define RSHIFT 310 ! #define UNARY 311 ! #define PLUSPLUS 312 ! #define MINUSMINUS 313 ! #define HYPERUNARY 314 ! #define PAREN_STAR_PAREN 315 ! #define POINTSAT 316 ! #define POINTSAT_STAR 317 ! #define DOT_STAR 318 ! #define RAISE 319 ! #define RAISES 320 ! #define RERAISE 321 ! #define TRY 322 ! #define EXCEPT 323 ! #define CATCH 324 ! #define THROW 325 ! #define ANSI_TRY 326 ! #define ANSI_THROW 327 ! #define TYPENAME_ELLIPSIS 328 ! #define PTYPENAME 329 ! #define PRE_PARSED_FUNCTION_DECL 330 ! #define EXTERN_LANG_STRING 331 ! #define ALL 332 ! #define PRE_PARSED_CLASS_DECL 333 ! #define TYPENAME_DEFN 334 ! #define IDENTIFIER_DEFN 335 ! #define PTYPENAME_DEFN 336 ! #define END_OF_SAVED_INPUT 337 --- 29,85 ---- #define CLASSOF 285 #define ATTRIBUTE 286 ! #define EXTENSION 287 ! #define LABEL 288 ! #define AGGR 289 ! #define VISSPEC 290 ! #define DELETE 291 ! #define NEW 292 ! #define OVERLOAD 293 ! #define THIS 294 ! #define OPERATOR 295 ! #define DYNAMIC 296 ! #define POINTSAT_LEFT_RIGHT 297 ! #define LEFT_RIGHT 298 ! #define TEMPLATE 299 ! #define SCOPE 300 ! #define START_DECLARATOR 301 ! #define EMPTY 302 ! #define TYPENAME_COLON 303 ! #define ASSIGN 304 ! #define RANGE 305 ! #define OROR 306 ! #define ANDAND 307 ! #define MIN_MAX 308 ! #define EQCOMPARE 309 ! #define ARITHCOMPARE 310 ! #define LSHIFT 311 ! #define RSHIFT 312 ! #define UNARY 313 ! #define PLUSPLUS 314 ! #define MINUSMINUS 315 ! #define HYPERUNARY 316 ! #define PAREN_STAR_PAREN 317 ! #define POINTSAT 318 ! #define POINTSAT_STAR 319 ! #define DOT_STAR 320 ! #define RAISE 321 ! #define RAISES 322 ! #define RERAISE 323 ! #define TRY 324 ! #define EXCEPT 325 ! #define CATCH 326 ! #define THROW 327 ! #define ANSI_TRY 328 ! #define ANSI_THROW 329 ! #define TYPENAME_ELLIPSIS 330 ! #define PTYPENAME 331 ! #define PRE_PARSED_FUNCTION_DECL 332 ! #define EXTERN_LANG_STRING 333 ! #define ALL 334 ! #define PRE_PARSED_CLASS_DECL 335 ! #define TYPENAME_DEFN 336 ! #define IDENTIFIER_DEFN 337 ! #define PTYPENAME_DEFN 338 ! #define END_OF_SAVED_INPUT 339 diff -rc2N gcc-2.0/cp-parse.y gcc-2.1/cp-parse.y *** gcc-2.0/cp-parse.y Sat Feb 22 03:35:51 1992 --- gcc-2.1/cp-parse.y Sun Mar 22 16:39:50 1992 *************** *** 108,112 **** %start program ! %union {long itype; tree ttype; enum tree_code code; } /* All identifiers that are not reserved words --- 108,112 ---- %start program ! %union {long itype; tree ttype; char *strtype; enum tree_code code; } /* All identifiers that are not reserved words *************** *** 146,152 **** /* the reserved words */ %token SIZEOF ENUM /* STRUCT UNION */ IF ELSE WHILE DO FOR SWITCH CASE DEFAULT ! %token BREAK CONTINUE RETURN GOTO ASM TYPEOF ALIGNOF HEADOF CLASSOF ! %token ATTRIBUTE /* the reserved words... C++ extensions */ --- 146,153 ---- /* the reserved words */ + /* SCO include files test "ASM", so use something else. */ %token SIZEOF ENUM /* STRUCT UNION */ IF ELSE WHILE DO FOR SWITCH CASE DEFAULT ! %token BREAK CONTINUE RETURN GOTO ASM_KEYWORD TYPEOF ALIGNOF HEADOF CLASSOF ! %token ATTRIBUTE EXTENSION LABEL /* the reserved words... C++ extensions */ *************** *** 222,225 **** --- 223,227 ---- %type typename absdcl absdcl1 type_quals abs_or_notype_decl %type xexpr see_typename parmlist parms parm bad_parm + %type identifiers identifiers_or_typenames /* C++ extensions */ *************** *** 256,259 **** --- 258,263 ---- %type identifier_defn IDENTIFIER_DEFN TYPENAME_DEFN PTYPENAME_DEFN + %type .pushlevel + /* cp-spew.c depends on this being the last token. Define any new tokens before this one! */ *************** *** 285,288 **** --- 289,297 ---- int yylex (); + static + #ifdef __GNUC__ + __inline + #endif + void yyprint (); #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) %} *************** *** 321,325 **** { if (pending_inlines) do_pending_inlines (); } | overloaddef ! | ASM '(' string ')' ';' { if (pedantic) warning ("ANSI C forbids use of `asm' keyword"); --- 330,334 ---- { if (pending_inlines) do_pending_inlines (); } | overloaddef ! | ASM_KEYWORD '(' string ')' ';' { if (pedantic) warning ("ANSI C forbids use of `asm' keyword"); *************** *** 366,370 **** aggr identifier { ! if ((enum tag_types) TREE_INT_CST_LOW ($1) != class_type) error ("template type parameter must use keyword `class'"); $$ = build_tree_list ($2, NULL_TREE); --- 375,379 ---- aggr identifier { ! if ($1 != class_type_node) error ("template type parameter must use keyword `class'"); $$ = build_tree_list ($2, NULL_TREE); *************** *** 372,376 **** | aggr identifier_defn ':' base_class.1 { ! if ((enum tag_types) TREE_INT_CST_LOW ($1) != class_type) error ("template type parameter must use keyword `class'"); warning ("restricted template type parameters not yet implemented"); --- 381,385 ---- | aggr identifier_defn ':' base_class.1 { ! if ($1 != class_type_node) error ("template type parameter must use keyword `class'"); warning ("restricted template type parameters not yet implemented"); *************** *** 379,383 **** | aggr TYPENAME_COLON base_class.1 { ! if ((enum tag_types) TREE_INT_CST_LOW ($1) != class_type) error ("template type parameter must use keyword `class'"); warning ("restricted template type parameters not yet implemented"); --- 388,392 ---- | aggr TYPENAME_COLON base_class.1 { ! if ($1 != class_type_node) error ("template type parameter must use keyword `class'"); warning ("restricted template type parameters not yet implemented"); *************** *** 437,441 **** tree d; int momentary; - /* current_declspecs = $0;*/ momentary = suspend_momentary (); d = start_decl ($2, /*current_declspecs*/0, 0, $3); --- 446,449 ---- *************** *** 483,486 **** --- 491,497 ---- reinit_parse_for_template ($4, $1, d); } + /* Try to recover from syntax errors in templates. */ + | template_header error '}' { end_template_decl ($1, 0, 0); } + | template_header error ';' { end_template_decl ($1, 0, 0); } ; *************** *** 769,772 **** --- 780,787 ---- | identifier LEFT_RIGHT { expand_member_init (C_C_D, $$, void_type_node); } + | template_type_name '(' nonnull_exprlist ')' + { expand_member_init (C_C_D, $$, $3); } + | template_type_name LEFT_RIGHT + { expand_member_init (C_C_D, $$, void_type_node); } | scoped_id identifier '(' nonnull_exprlist ')' { *************** *** 957,960 **** --- 972,982 ---- $$ = build_component_type_expr (C_C_D, $$, NULL_TREE, 1); } + /* __extension__ turns off -pedantic for following primary. */ + | EXTENSION + { $1 = pedantic; + pedantic = 0; } + cast_expr %prec UNARY + { $$ = $3; + pedantic = $1; } | '*' cast_expr %prec UNARY { $$ = build_x_indirect_ref ($2, "unary *"); } *************** *** 1718,1722 **** /* empty */ { $$ = NULL_TREE; } ! | ASM '(' string ')' { if (TREE_CHAIN ($3)) $3 = combine_strings ($3); $$ = $3; --- 1740,1744 ---- /* empty */ { $$ = NULL_TREE; } ! | ASM_KEYWORD '(' string ')' { if (TREE_CHAIN ($3)) $3 = combine_strings ($3); $$ = $3; *************** *** 1801,1809 **** ; identifiers: IDENTIFIER ! { } | identifiers ',' IDENTIFIER ! { } ; --- 1823,1840 ---- ; + /* A nonempty list of identifiers. */ identifiers: IDENTIFIER ! { $$ = build_tree_list (NULL_TREE, $1); } | identifiers ',' IDENTIFIER ! { $$ = chainon ($1, build_tree_list (NULL_TREE, $3)); } ! ; ! ! /* A nonempty list of identifiers, including typenames. */ ! identifiers_or_typenames: ! identifier ! { $$ = build_tree_list (NULL_TREE, $1); } ! | identifiers_or_typenames ',' identifier ! { $$ = chainon ($1, build_tree_list (NULL_TREE, $3)); } ; *************** *** 2055,2059 **** $$ = visibility_public_virtual; } ! else /* $2 == visibility_priavte */ { if ($1 == visibility_public) --- 2086,2090 ---- $$ = visibility_public_virtual; } ! else /* $2 == visibility_private */ { if ($1 == visibility_public) *************** *** 2317,2321 **** /* These rules must follow the rules for function declarations ! and component declarations. That way, longer rules are prefered. */ /* An expression which will not live on the momentary obstack. */ --- 2348,2352 ---- /* These rules must follow the rules for function declarations ! and component declarations. That way, longer rules are preferred. */ /* An expression which will not live on the momentary obstack. */ *************** *** 2467,2471 **** scoped_id: TYPENAME_SCOPE ! { $$ = resolve_scope_to_name (NULL_TREE, $$); } | template_type SCOPE try_for_typename %prec EMPTY { --- 2498,2508 ---- scoped_id: TYPENAME_SCOPE ! { $$ = resolve_scope_to_name (NULL_TREE, $$); ! if ($$ == NULL_TREE) ! { ! error ("undefined explicitly scoped type"); ! $$ = error_mark_node; ! } ! } | template_type SCOPE try_for_typename %prec EMPTY { *************** *** 2475,2478 **** --- 2512,2520 ---- { $$ = resolve_scope_to_name (NULL_TREE, TYPE_IDENTIFIER ($$)); + if ($$ == NULL_TREE) + { + error ("undefined explicitly scoped type"); + $$ = error_mark_node; + } } if ($3) popclass (1); *************** *** 2600,2604 **** .pushlevel: /* empty */ ! { pushlevel (0); clear_last_expr (); --- 2642,2646 ---- .pushlevel: /* empty */ ! { emit_line_note (input_filename, lineno); pushlevel (0); clear_last_expr (); *************** *** 2605,2609 **** push_momentary (); expand_start_bindings (0); ! stmt_decl_msg = 0; } ; --- 2647,2677 ---- push_momentary (); expand_start_bindings (0); ! $$ = stmt_decl_msg; ! stmt_decl_msg = 0; } ! ; ! ! /* Read zero or more forward-declarations for labels ! that nested functions can jump to. */ ! maybe_label_decls: ! /* empty */ ! | label_decls ! { if (pedantic) ! pedwarn ("ANSI C forbids label declarations"); } ! ; ! ! label_decls: ! label_decl ! | label_decls label_decl ! ; ! ! label_decl: ! LABEL identifiers_or_typenames ';' ! { tree link; ! for (link = $2; link; link = TREE_CHAIN (link)) ! { ! tree label = shadow_label (TREE_VALUE (link)); ! C_DECLARED_LABEL_FLAG (label) = 1; ! declare_nonlocal_label (label); ! } } ; *************** *** 2619,2629 **** compstmt: '{' '}' { $$ = convert (void_type_node, integer_zero_node); } ! | '{' .pushlevel stmts '}' { pop_implicit_try_blocks (NULL_TREE); expand_end_bindings (getdecls (), kept_level_p (), 1); $$ = poplevel (kept_level_p (), 1, 0); pop_momentary (); } ! | '{' .pushlevel error '}' { pop_implicit_try_blocks (NULL_TREE); expand_end_bindings (getdecls (), kept_level_p (), 1); $$ = poplevel (kept_level_p (), 0, 0); --- 2687,2699 ---- compstmt: '{' '}' { $$ = convert (void_type_node, integer_zero_node); } ! | '{' .pushlevel maybe_label_decls stmts '}' { pop_implicit_try_blocks (NULL_TREE); + stmt_decl_msg = $2; expand_end_bindings (getdecls (), kept_level_p (), 1); $$ = poplevel (kept_level_p (), 1, 0); pop_momentary (); } ! | '{' .pushlevel maybe_label_decls error '}' { pop_implicit_try_blocks (NULL_TREE); + stmt_decl_msg = $2; expand_end_bindings (getdecls (), kept_level_p (), 1); $$ = poplevel (kept_level_p (), 0, 0); *************** *** 2926,2930 **** finish_stmt (); } ! | ASM maybe_type_qual '(' string ')' ';' { if (TREE_CHAIN ($4)) $4 = combine_strings ($4); emit_line_note (input_filename, lineno); --- 2996,3000 ---- finish_stmt (); } ! | ASM_KEYWORD maybe_type_qual '(' string ')' ';' { if (TREE_CHAIN ($4)) $4 = combine_strings ($4); emit_line_note (input_filename, lineno); *************** *** 2933,2937 **** } /* This is the case with just output operands. */ ! | ASM maybe_type_qual '(' string ':' asm_operands ')' ';' { if (TREE_CHAIN ($4)) $4 = combine_strings ($4); emit_line_note (input_filename, lineno); --- 3003,3007 ---- } /* This is the case with just output operands. */ ! | ASM_KEYWORD maybe_type_qual '(' string ':' asm_operands ')' ';' { if (TREE_CHAIN ($4)) $4 = combine_strings ($4); emit_line_note (input_filename, lineno); *************** *** 2942,2946 **** } /* This is the case with input operands as well. */ ! | ASM maybe_type_qual '(' string ':' asm_operands ':' asm_operands ')' ';' { if (TREE_CHAIN ($4)) $4 = combine_strings ($4); emit_line_note (input_filename, lineno); --- 3012,3016 ---- } /* This is the case with input operands as well. */ ! | ASM_KEYWORD maybe_type_qual '(' string ':' asm_operands ':' asm_operands ')' ';' { if (TREE_CHAIN ($4)) $4 = combine_strings ($4); emit_line_note (input_filename, lineno); *************** *** 2951,2955 **** } /* This is the case with clobbered registers as well. */ ! | ASM maybe_type_qual '(' string ':' asm_operands ':' asm_operands ':' asm_clobbers ')' ';' { if (TREE_CHAIN ($4)) $4 = combine_strings ($4); --- 3021,3025 ---- } /* This is the case with clobbered registers as well. */ ! | ASM_KEYWORD maybe_type_qual '(' string ':' asm_operands ':' asm_operands ':' asm_clobbers ')' ';' { if (TREE_CHAIN ($4)) $4 = combine_strings ($4); *************** *** 2975,2979 **** { finish_stmt (); } ! /* Exception handling extentions. */ | ANSI_THROW ';' { cplus_expand_throw (NULL_TREE); } | ANSI_THROW expr ';' { cplus_expand_throw ($2); } --- 3045,3049 ---- { finish_stmt (); } ! /* Exception handling extensions. */ | ANSI_THROW ';' { cplus_expand_throw (NULL_TREE); } | ANSI_THROW expr ';' { cplus_expand_throw ($2); } *************** *** 3730,3733 **** --- 3800,3809 ---- %% + tree + get_current_declspecs () + { + return current_declspecs; + } + #if YYDEBUG != 0 db_yyerror (s, yyps, yychar) *************** *** 3942,3946 **** ! /* Sets the value of the 'yydebug' varable to VALUE. This is a function so we don't have to have YYDEBUG defined in order to build the compiler. */ --- 4018,4022 ---- ! /* Sets the value of the 'yydebug' variable to VALUE. This is a function so we don't have to have YYDEBUG defined in order to build the compiler. */ diff -rc2N gcc-2.0/cp-pt.c gcc-2.1/cp-pt.c *** gcc-2.0/cp-pt.c Tue Feb 4 10:30:31 1992 --- gcc-2.1/cp-pt.c Tue Mar 24 05:35:39 1992 *************** *** 933,942 **** assert (TREE_CODE (t1) == TEMPLATE_DECL); if (DECL_TEMPLATE_INFO (t1)->text == 0) ! { ! error ("template `%s' declared but not defined", ! IDENTIFIER_POINTER (DECL_NAME (t1))); ! return error_mark_node; ! } #ifdef DEBUG_CP_BINDING_LEVELS --- 933,941 ---- assert (TREE_CODE (t1) == TEMPLATE_DECL); + /* If a template is declared but not defined, accept it; don't crash. + Later uses requiring the definition will be flagged as errors by + other code. Thanks to niklas@appli.se for this bug fix. */ if (DECL_TEMPLATE_INFO (t1)->text == 0) ! setup_parse = 0; #ifdef DEBUG_CP_BINDING_LEVELS *************** *** 946,956 **** #endif if (setup_parse) { - push_to_top_level (); - push_template_decls (DECL_TEMPLATE_PARMS (TREE_PURPOSE (template)), - TREE_VALUE (template), 0); - set_current_level_tags_transparency (1); - template_info = DECL_TEMPLATE_INFO (t1); feed_input (template_info->text, template_info->length, (struct obstack *)0); lineno = template_info->lineno; --- 945,955 ---- #endif + push_to_top_level (); + push_template_decls (DECL_TEMPLATE_PARMS (TREE_PURPOSE (template)), + TREE_VALUE (template), 0); + set_current_level_tags_transparency (1); + template_info = DECL_TEMPLATE_INFO (t1); if (setup_parse) { feed_input (template_info->text, template_info->length, (struct obstack *)0); lineno = template_info->lineno; *************** *** 967,975 **** tree t, decl, id, tmpl; - push_to_top_level (); - push_template_decls (DECL_TEMPLATE_PARMS (TREE_PURPOSE (template)), - TREE_VALUE (template), 0); - set_current_level_tags_transparency (1); - template_info = DECL_TEMPLATE_INFO (t1); id = classname; tmpl = TREE_PURPOSE (IDENTIFIER_TEMPLATE (id)); --- 966,969 ---- *************** *** 1124,1129 **** { r = DECL_NAME (t); ! r = build_decl_overload (IDENTIFIER_POINTER (r), ! TYPE_VALUES (type), DECL_CONTEXT (t) != NULL_TREE); r = build_lang_decl (FUNCTION_DECL, r, type); --- 1118,1122 ---- { r = DECL_NAME (t); ! r = build_decl_overload (r, TYPE_VALUES (type), DECL_CONTEXT (t) != NULL_TREE); r = build_lang_decl (FUNCTION_DECL, r, type); *************** *** 1371,1385 **** fndecl = tsubst (DECL_RESULT (tmpl), targ_ptr, TREE_VEC_LENGTH (targs)); - p = (struct pending_inline *) permalloc (sizeof (struct pending_inline)); t = DECL_TEMPLATE_INFO (tmpl); ! p->parm_vec = t->parm_vec; ! p->bindings = targs; ! p->can_free = 0; ! p->deja_vu = 0; ! p->lineno = t->lineno; ! p->filename = t->filename; ! p->buf = t->text; ! p->len = t->length; ! p->fndecl = fndecl; DECL_TEMPLATE_INSTANTIATIONS (tmpl) = --- 1364,1383 ---- fndecl = tsubst (DECL_RESULT (tmpl), targ_ptr, TREE_VEC_LENGTH (targs)); t = DECL_TEMPLATE_INFO (tmpl); ! if (t->text) ! { ! p = (struct pending_inline *) permalloc (sizeof (struct pending_inline)); ! p->parm_vec = t->parm_vec; ! p->bindings = targs; ! p->can_free = 0; ! p->deja_vu = 0; ! p->lineno = t->lineno; ! p->filename = t->filename; ! p->buf = t->text; ! p->len = t->length; ! p->fndecl = fndecl; ! } ! else ! p = 0; DECL_TEMPLATE_INSTANTIATIONS (tmpl) = *************** *** 1389,1393 **** pop_obstacks (); ! if (fndecl == error_mark_node) { /* do nothing */ --- 1387,1391 ---- pop_obstacks (); ! if (fndecl == error_mark_node || p == 0) { /* do nothing */ *************** *** 1424,1428 **** #endif ! poplevel (0,0,0); if (!classlevel) poplevel (0, 0, 0); --- 1422,1428 ---- #endif ! #if 0 /* not yet, should get fixed properly later */ ! poplevel (0, 0, 0); ! #endif if (!classlevel) poplevel (0, 0, 0); *************** *** 1478,1481 **** --- 1478,1485 ---- pushdecl_class_level (decl); else + #if 0 /* not yet, should get fixed properly later */ + pushdecl (decl); + pushlevel (1); + #else { pushdecl (decl); *************** *** 1483,1487 **** IDENTIFIER_LOCAL_VALUE (template) = decl; } ! pushlevel(1); #ifdef DEBUG_CP_BINDING_LEVELS --- 1487,1491 ---- IDENTIFIER_LOCAL_VALUE (template) = decl; } ! #endif #ifdef DEBUG_CP_BINDING_LEVELS diff -rc2N gcc-2.0/cp-search.c gcc-2.1/cp-search.c *** gcc-2.0/cp-search.c Mon Jan 20 01:41:49 1992 --- gcc-2.1/cp-search.c Tue Mar 24 05:35:45 1992 *************** *** 53,57 **** push_stack_level (obstack, tp, size) struct obstack *obstack; ! void *tp; int size; { --- 53,57 ---- push_stack_level (obstack, tp, size) struct obstack *obstack; ! char *tp; /* Sony NewsOS 5.0 compiler doesn't like void * here. */ int size; { *************** *** 1566,1569 **** --- 1566,1572 ---- int index = lookup_fnfields_1 (type, name); + /* ??? This code is broken. If CONTEXT is not the leftmost + baseclass, it makes all of its baseclasses appear to be + unrelated. */ if (index >= 0 && binfo != get_binfo (type, context, 0)) { *************** *** 1797,1801 **** if (tmp) { ! DECL_CONTEXT (fndecl) = DECL_CONTEXT (tmp); return tmp; } --- 1800,1806 ---- if (tmp) { ! if (get_base_distance (DECL_CONTEXT (tmp), ! DECL_CONTEXT (fndecl), 0, 0) > 0) ! DECL_CONTEXT (fndecl) = DECL_CONTEXT (tmp); return tmp; } *************** *** 1869,1873 **** && best == NULL_TREE && warn_overloaded_virtual) { ! error_with_decl (fndecl, "conficting specification deriving virtual function `%s'"); SET_IDENTIFIER_ERROR_LOCUS (name, basetype); } --- 1874,1878 ---- && best == NULL_TREE && warn_overloaded_virtual) { ! error_with_decl (fndecl, "conflicting specification deriving virtual function `%s'"); SET_IDENTIFIER_ERROR_LOCUS (name, basetype); } *************** *** 2340,2344 **** int old_flag = flag_this_is_variable; tree binfo = TYPE_BINFO (type); ! flag_this_is_variable = 0; vbase_types = CLASSTYPE_VBASECLASSES (type); vbase_decl_ptr = decl_ptr; --- 2345,2349 ---- int old_flag = flag_this_is_variable; tree binfo = TYPE_BINFO (type); ! flag_this_is_variable = -2; vbase_types = CLASSTYPE_VBASECLASSES (type); vbase_decl_ptr = decl_ptr; *************** *** 2384,2388 **** vbase_decl_ptr = true_exp ? build_unary_op (ADDR_EXPR, true_exp, 0) : decl_ptr; vbase_decl = true_exp ? true_exp : build_indirect_ref (decl_ptr, 0); ! flag_this_is_variable = 0; if (ctor_p) --- 2389,2393 ---- vbase_decl_ptr = true_exp ? build_unary_op (ADDR_EXPR, true_exp, 0) : decl_ptr; vbase_decl = true_exp ? true_exp : build_indirect_ref (decl_ptr, 0); ! flag_this_is_variable = -2; if (ctor_p) *************** *** 3113,3117 **** --- 3118,3126 ---- tag = xref_tag (code_type_node, TREE_PURPOSE (tags), TYPE_BINFO_BASETYPE (TREE_VALUE (tags), 0)); + #if 0 /* not yet, should get fixed properly later */ + pushdecl (make_type_decl (TREE_PURPOSE (tags), TREE_VALUE (tags))); + #else pushdecl (build_decl (TYPE_DECL, TREE_PURPOSE (tags), TREE_VALUE (tags))); + #endif } #endif diff -rc2N gcc-2.0/cp-spew.c gcc-2.1/cp-spew.c *** gcc-2.0/cp-spew.c Fri Jan 17 17:57:54 1992 --- gcc-2.1/cp-spew.c Sat Mar 14 00:03:18 1992 *************** *** 71,76 **** #endif ! static char follows_typename[END_OF_SAVED_INPUT]; ! static char follows_identifier[END_OF_SAVED_INPUT]; /* Initialize token_obstack. Called once, from init_lex. */ --- 71,76 ---- #endif ! static char follows_typename[END_OF_SAVED_INPUT+1]; ! static char follows_identifier[END_OF_SAVED_INPUT+1]; /* Initialize token_obstack. Called once, from init_lex. */ *************** *** 86,90 **** POINTSAT_STAR, DOT_STAR, CONSTANT, STRING, SIZEOF, ENUM, IF, ELSE, WHILE, DO, FOR, SWITCH, CASE, DEFAULT, BREAK, CONTINUE, ! RETURN, GOTO, ASM, TYPEOF, ALIGNOF, HEADOF, CLASSOF, ATTRIBUTE, AGGR, VISSPEC, DELETE, RAISE, RERAISE, TRY, EXCEPT, CATCH, THROW, ANSI_TRY, ANSI_THROW, EXTERN_LANG_STRING, ALL, --- 86,90 ---- POINTSAT_STAR, DOT_STAR, CONSTANT, STRING, SIZEOF, ENUM, IF, ELSE, WHILE, DO, FOR, SWITCH, CASE, DEFAULT, BREAK, CONTINUE, ! RETURN, GOTO, ASM_KEYWORD, TYPEOF, ALIGNOF, HEADOF, CLASSOF, ATTRIBUTE, AGGR, VISSPEC, DELETE, RAISE, RERAISE, TRY, EXCEPT, CATCH, THROW, ANSI_TRY, ANSI_THROW, EXTERN_LANG_STRING, ALL, *************** *** 307,312 **** { /* if not, grab the next one and think about it */ ! tmp_token.yychar = real_yylex(); tmp_token.yylval = yylval; add_token(&tmp_token); } --- 307,313 ---- { /* if not, grab the next one and think about it */ ! tmp_token.yychar = real_yylex (); tmp_token.yylval = yylval; + tmp_token.end_of_file = end_of_file; add_token(&tmp_token); } *************** *** 668,672 **** /* If we hit an undefined identifier, assume ! the decl in aribtration is its type specifier. */ if (ith_yychar == IDENTIFIER && lookup_name (nth_token (2+i)->yylval.ttype, 0) == 0) --- 669,673 ---- /* If we hit an undefined identifier, assume ! the decl in arbitration is its type specifier. */ if (ith_yychar == IDENTIFIER && lookup_name (nth_token (2+i)->yylval.ttype, 0) == 0) *************** *** 840,844 **** for (i=0; i Base class construction: ! Base class initialization: Whole type: . */ #define CLASSTYPE_BASE_INIT_LIST(NODE) (TYPE_LANG_SPECIFIC(NODE)->base_init_list) --- 733,737 ---- Member initialization: Base class construction: ! Base class initialization: Whole type: . */ #define CLASSTYPE_BASE_INIT_LIST(NODE) (TYPE_LANG_SPECIFIC(NODE)->base_init_list) *************** *** 975,979 **** in) as a member in a RECORD_TYPE or UNION_TYPE node. It is also for detecting circularity in case members are multiply defined. In the ! case of a VAR_DECL, it is also used to determince how program storage should be allocated. */ #define DECL_IN_AGGR_P(NODE) (DECL_LANG_FLAG_3(NODE)) --- 979,983 ---- in) as a member in a RECORD_TYPE or UNION_TYPE node. It is also for detecting circularity in case members are multiply defined. In the ! case of a VAR_DECL, it is also used to determine how program storage should be allocated. */ #define DECL_IN_AGGR_P(NODE) (DECL_LANG_FLAG_3(NODE)) *************** *** 1072,1075 **** --- 1076,1083 ---- #define C_TYPEDEF_EXPLICITLY_SIGNED(exp) DECL_LANG_FLAG_1 ((exp)) + /* 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. */ *************** *** 1134,1138 **** table (so that variables of this type can initialize their virtual function table pointers by name). When such thievery ! is commited, know exactly which base class's virtual function table is the one being stolen. This effectively computes the transitive closure. */ --- 1142,1146 ---- table (so that variables of this type can initialize their virtual function table pointers by name). When such thievery ! is committed, know exactly which base class's virtual function table is the one being stolen. This effectively computes the transitive closure. */ *************** *** 1308,1311 **** --- 1316,1321 ---- extern tree get_decl_list (); extern tree break_out_cleanups (); + extern tree array_type_nelts_total (); + extern tree array_type_nelts_top (); /* in cp-except.c */ *************** *** 1382,1386 **** /* Cannot use '$' up front, because this confuses gdb. Note that any format of this kind *must* make the ! format for `this' lexicgraphically less than any other parameter name, i.e. "$this" is less than anything else can be. --- 1392,1396 ---- /* Cannot use '$' up front, because this confuses gdb. Note that any format of this kind *must* make the ! format for `this' lexicographically less than any other parameter name, i.e. "$this" is less than anything else can be. *************** *** 1558,1562 **** extern int flag_all_virtual; ! /* Nonzero means that we cannot make optimizing assumptions about `this'. */ extern int flag_this_is_variable; --- 1568,1573 ---- extern int flag_all_virtual; ! /* Positive values means that we cannot make optimizing assumptions about ! `this'. Negative values means we know `this' to be of static type. */ extern int flag_this_is_variable; *************** *** 1619,1623 **** in the parameter list. LOOKUP_PROTECTED_OK means that even if the constructor we find appears ! to be non-visibile to current scope, call it anyway. LOOKUP_DYNAMIC means call dynamic functions, a la SOS. LOOKUP_NO_CONVERSION means that user-defined conversions are not --- 1630,1634 ---- in the parameter list. LOOKUP_PROTECTED_OK means that even if the constructor we find appears ! to be non-visible to current scope, call it anyway. LOOKUP_DYNAMIC means call dynamic functions, a la SOS. LOOKUP_NO_CONVERSION means that user-defined conversions are not diff -rc2N gcc-2.0/cp-type2.c gcc-2.1/cp-type2.c *** gcc-2.0/cp-type2.c Fri Jan 17 17:58:13 1992 --- gcc-2.1/cp-type2.c Sun Mar 22 16:40:01 1992 *************** *** 809,813 **** continue; ! /* Does this field have a default initializtion? */ if (DECL_INITIAL (field)) { --- 809,813 ---- continue; ! /* Does this field have a default initialization? */ if (DECL_INITIAL (field)) { *************** *** 1129,1133 **** else type = exp; ! /* Prepare to evaluate as a call to a consructor. If this expression is actually used, for example, --- 1129,1133 ---- else type = exp; ! /* Prepare to evaluate as a call to a constructor. If this expression is actually used, for example, *************** *** 1232,1236 **** { type = BINFO_TYPE (TREE_VEC_ELT (binfos, 0)); ! binfos = BINFO_BASETYPES (binfos); } if (TYPE_HAS_CONSTRUCTOR (type)) --- 1232,1236 ---- { type = BINFO_TYPE (TREE_VEC_ELT (binfos, 0)); ! binfos = TYPE_BINFO_BASETYPES (type); } if (TYPE_HAS_CONSTRUCTOR (type)) *************** *** 1276,1281 **** --- 1276,1288 ---- if (expr_as_ctor && expr_as_ctor != error_mark_node) { + #if 0 + /* mrs Mar 12, 1992 I claim that if it is a constructor, it is + impossible to be a expr_as_method, without being a + constructor call. */ if (expr_as_method || (expr_as_fncall && expr_as_fncall != error_mark_node)) + #else + if (expr_as_fncall && expr_as_fncall != error_mark_node) + #endif { error ("ambiguity between constructor for `%s' and function call", *************** *** 1289,1296 **** return error_mark_node; } } - - if (expr_as_ctor && expr_as_ctor != error_mark_node) - return build_cplus_new (type, expr_as_ctor, 1); /* If it didn't work going through constructor, try type conversion. */ --- 1296,1310 ---- return error_mark_node; } + if (current_function_decl) + return build_cplus_new (type, expr_as_ctor, 1); + /* Initializers for static variables and parameters have + to handle doing the initialization and cleanup themselves. */ + assert (TREE_CODE (expr_as_ctor) == CALL_EXPR); + assert (TREE_CALLS_NEW (TREE_VALUE (TREE_OPERAND (expr_as_ctor, 1)))); + TREE_VALUE (TREE_OPERAND (expr_as_ctor, 1)) = NULL_TREE; + expr_as_ctor = build_indirect_ref (expr_as_ctor, 0); + TREE_HAS_CONSTRUCTOR (expr_as_ctor) = 1; + return expr_as_ctor; } /* If it didn't work going through constructor, try type conversion. */ diff -rc2N gcc-2.0/cp-typeck.c gcc-2.1/cp-typeck.c *** gcc-2.0/cp-typeck.c Mon Feb 17 01:04:03 1992 --- gcc-2.1/cp-typeck.c Sun Mar 22 16:40:04 1992 *************** *** 417,421 **** { tree basetype = TYPE_OFFSET_BASETYPE (t1); ! return build_member_type (basetype, common_type (TREE_TYPE (t1), TREE_TYPE (t2))); } --- 417,421 ---- { tree basetype = TYPE_OFFSET_BASETYPE (t1); ! return build_offset_type (basetype, common_type (TREE_TYPE (t1), TREE_TYPE (t2))); } *************** *** 481,485 **** can be mixed as legal: i.e. a pointer to a base class may be assigned to a pointer to one of its derived classes, as per C++. A pointer to ! a derived class may be passed as a paramter to a function expecting a pointer to a base classes. These allowances do not commute. In this case, TYPE1 is assumed to be the base class, and TYPE2 is assumed to --- 481,485 ---- can be mixed as legal: i.e. a pointer to a base class may be assigned to a pointer to one of its derived classes, as per C++. A pointer to ! a derived class may be passed as a parameter to a function expecting a pointer to a base classes. These allowances do not commute. In this case, TYPE1 is assumed to be the base class, and TYPE2 is assumed to *************** *** 568,572 **** if (strict <= 0) { ! if (IS_AGGR_TYPE_2 (t1, t2)) { int rval; --- 568,572 ---- if (strict <= 0) { ! if (TREE_CODE (t1) == RECORD_TYPE && TREE_CODE (t2) == RECORD_TYPE) { int rval; *************** *** 1117,1123 **** if (TREE_CODE (exp) == CONST_DECL) exp = DECL_INITIAL (exp); ! /* Replace a nonvolatile const static variable with its value. ! But not if that would certainly cause multiple copies to be ! assembled separately for each use. */ else if (TREE_READONLY_DECL_P (exp) && DECL_MODE (exp) != BLKmode) { --- 1117,1121 ---- if (TREE_CODE (exp) == CONST_DECL) exp = DECL_INITIAL (exp); ! /* Replace a nonvolatile const static variable with its value. */ else if (TREE_READONLY_DECL_P (exp) && DECL_MODE (exp) != BLKmode) { *************** *** 1434,1438 **** } ! if (component == ansi_opname[TYPE_EXPR]) error ("%s has no such type conversion operator", code == RECORD_TYPE ? "structure" : "union"); --- 1432,1436 ---- } ! if (component == ansi_opname[(int) TYPE_EXPR]) error ("%s has no such type conversion operator", code == RECORD_TYPE ? "structure" : "union"); *************** *** 1449,1453 **** if (TREE_CODE (field) != FIELD_DECL) { ! if (TREE_EXTERNAL (field) && DECL_RTL (field) != 0) assemble_external (field); TREE_USED (field) = 1; --- 1447,1457 ---- if (TREE_CODE (field) != FIELD_DECL) { ! if (TREE_CODE (field) == TYPE_DECL) ! { ! error ("invalid use of type decl `%s' as expression", ! IDENTIFIER_POINTER (DECL_NAME (field))); ! return error_mark_node; ! } ! if (DECL_RTL (field) != 0) assemble_external (field); TREE_USED (field) = 1; *************** *** 1800,1804 **** { tree ctypeptr; ! /* Explcitly named method? */ if (TREE_CODE (function) == FUNCTION_DECL) ctypeptr = TYPE_POINTER_TO (DECL_CLASS_CONTEXT (function)); --- 1804,1808 ---- { tree ctypeptr; ! /* Explicitly named method? */ if (TREE_CODE (function) == FUNCTION_DECL) ctypeptr = TYPE_POINTER_TO (DECL_CLASS_CONTEXT (function)); *************** *** 1857,1862 **** ? DECL_NAME (function) : DECL_NAME (TYPE_NAME (DECL_CLASS_CONTEXT (function))))); ! if (TREE_EXTERNAL (function)) ! assemble_external (function); fndecl = function; --- 1861,1865 ---- ? DECL_NAME (function) : DECL_NAME (TYPE_NAME (DECL_CLASS_CONTEXT (function))))); ! assemble_external (function); fndecl = function; *************** *** 2089,2092 **** --- 2092,2097 ---- } } + else if (TREE_CODE (val) == OFFSET_REF) + val = resolve_offset_ref (val); { *************** *** 2622,2626 **** /* Anything compares with void *. void * compares with anything. Otherwise, the targets must be the same. */ ! if (tt0 != tt1 && IS_AGGR_TYPE_2 (tt0, tt1)) { tree base = common_base_type (tt0, tt1); --- 2627,2632 ---- /* Anything compares with void *. void * compares with anything. Otherwise, the targets must be the same. */ ! if (tt0 != tt1 && TREE_CODE (tt0) == RECORD_TYPE ! && TREE_CODE (tt1) == RECORD_TYPE) { tree base = common_base_type (tt0, tt1); *************** *** 3718,3730 **** t = TREE_OPERAND (arg, 1); - if (TREE_OPERAND (arg, 0) - && (TREE_CODE (TREE_OPERAND (arg, 0)) != NOP_EXPR - || TREE_OPERAND (TREE_OPERAND (arg, 0), 0) != error_mark_node)) - { - /* Don't know if this should return address to just - _DECL, or actual address resolved in this expression. */ - sorry ("address of bound pointer-to-member expression"); - return error_mark_node; - } if (TREE_CODE (t) == FUNCTION_DECL) --- 3724,3727 ---- *************** *** 3751,3760 **** } if (TREE_CODE (t) == VAR_DECL) ! { ! if (TREE_STATIC (t)) ! offset = build_unary_op (ADDR_EXPR, t, 0); ! else ! return 0; ! } else { --- 3748,3752 ---- } if (TREE_CODE (t) == VAR_DECL) ! return build_unary_op (ADDR_EXPR, t, 0); else { *************** *** 3767,3770 **** --- 3759,3773 ---- return error_mark_node; } + + if (TREE_OPERAND (arg, 0) + && (TREE_CODE (TREE_OPERAND (arg, 0)) != NOP_EXPR + || TREE_OPERAND (TREE_OPERAND (arg, 0), 0) != error_mark_node)) + { + /* Don't know if this should return address to just + _DECL, or actual address resolved in this expression. */ + sorry ("address of bound pointer-to-member expression"); + return error_mark_node; + } + return convert (build_pointer_type (TREE_TYPE (arg)), size_binop (EASY_DIV_EXPR, *************** *** 3790,3796 **** left_addr = build_unary_op (ADDR_EXPR, left, 0); ! return build (PLUS_EXPR, build_pointer_type (TREE_TYPE (arg)), ! build1 (NOP_EXPR, integer_type_node, left_addr), ! build1 (NOP_EXPR, integer_type_node, right_addr)); } --- 3793,3799 ---- left_addr = build_unary_op (ADDR_EXPR, left, 0); ! return build (PLUS_EXPR, build_pointer_type (TREE_TYPE (arg)), ! build1 (NOP_EXPR, integer_type_node, left_addr), ! build1 (NOP_EXPR, integer_type_node, right_addr)); } *************** *** 4408,4412 **** otype = TREE_TYPE (value); ! /* Optionally warn about potentially worrysome casts. */ if (warn_cast_qual --- 4411,4415 ---- otype = TREE_TYPE (value); ! /* Optionally warn about potentially worrisome casts. */ if (warn_cast_qual *************** *** 4423,4428 **** /* Warn about possible alignment problems. */ ! #ifdef STRICT_ALIGNMENT ! if (warn_cast_align && TREE_CODE (type) == POINTER_TYPE && TREE_CODE (otype) == POINTER_TYPE --- 4426,4430 ---- /* Warn about possible alignment problems. */ ! if (STRICT_ALIGNMENT && warn_cast_align && TREE_CODE (type) == POINTER_TYPE && TREE_CODE (otype) == POINTER_TYPE *************** *** 4431,4435 **** && TYPE_ALIGN (TREE_TYPE (type)) > TYPE_ALIGN (TREE_TYPE (otype))) warning ("cast increases required alignment of target type"); - #endif value = convert_force (type, value); --- 4433,4436 ---- *************** *** 4665,4669 **** result = build_modify_expr (lhs, modifycode, newrhs); /* ARRAY_TYPEs cannot be converted to anything meaningful, ! and leaving it there screws up `build_compond_exr' when it tries to defaultly convert everything. */ if (TREE_CODE (TREE_TYPE (result)) == ARRAY_TYPE) --- 4666,4670 ---- result = build_modify_expr (lhs, modifycode, newrhs); /* ARRAY_TYPEs cannot be converted to anything meaningful, ! and leaving it there screws up `build_compound_expr' when it tries to defaultly convert everything. */ if (TREE_CODE (TREE_TYPE (result)) == ARRAY_TYPE) *************** *** 4707,4710 **** --- 4708,4732 ---- switch (TREE_CODE (lhs)) { + /* Handle --foo = 5; as these are valid constructs in c++ */ + case PREDECREMENT_EXPR: + case PREINCREMENT_EXPR: + if (TREE_SIDE_EFFECTS (TREE_OPERAND (lhs, 0))) + lhs = build (TREE_CODE (lhs), TREE_TYPE (lhs), + stabilize_reference (TREE_OPERAND (lhs, 0))); + return build (COMPOUND_EXPR, lhstype, + lhs, + build_modify_expr (TREE_OPERAND (lhs, 0), + modifycode, rhs)); + + case POSTDECREMENT_EXPR: + case POSTINCREMENT_EXPR: + if (TREE_SIDE_EFFECTS (TREE_OPERAND (lhs, 0))) + lhs = build (TREE_CODE (lhs), TREE_TYPE (lhs), + stabilize_reference (TREE_OPERAND (lhs, 0))); + return build (COMPOUND_EXPR, lhstype, + build_modify_expr (TREE_OPERAND (lhs, 0), + modifycode, rhs), + lhs); + /* Handle (a, b) used as an "lvalue". */ case COMPOUND_EXPR: *************** *** 4909,4913 **** if (lhs == current_class_decl) { ! if (flag_this_is_variable && DECL_NAME (current_function_decl) != NULL_TREE && current_class_name != DECL_NAME (current_function_decl)) --- 4931,4935 ---- if (lhs == current_class_decl) { ! if (flag_this_is_variable > 0 && DECL_NAME (current_function_decl) != NULL_TREE && current_class_name != DECL_NAME (current_function_decl)) *************** *** 4991,4995 **** && TREE_CODE (newrhs) != TARGET_EXPR && TREE_CODE (newrhs) != WITH_CLEANUP_EXPR) ! newrhs = save_expr (newrhs); rhs_addr = build_unary_op (ADDR_EXPR, newrhs); --- 5013,5021 ---- && TREE_CODE (newrhs) != TARGET_EXPR && TREE_CODE (newrhs) != WITH_CLEANUP_EXPR) ! /* Call `break_out_cleanups' on NEWRHS in case there are cleanups. ! If NEWRHS is a CALL_EXPR that needs a cleanup, failure to do so ! will result in expand_expr expanding the call without knowing ! that it should run the cleanup. */ ! newrhs = save_expr (break_out_cleanups (newrhs)); rhs_addr = build_unary_op (ADDR_EXPR, newrhs); *************** *** 5118,5123 **** return error_mark_node; ! result = build (modifycode == NOP_EXPR ? MODIFY_EXPR : INIT_EXPR, ! lhstype, lhs, newrhs); TREE_SIDE_EFFECTS (result) = 1; --- 5144,5186 ---- return error_mark_node; ! if (TREE_CODE (newrhs) == COND_EXPR) ! { ! tree cond = TREE_OPERAND (newrhs, 0); ! ! if (TREE_SIDE_EFFECTS (lhs)) ! cond = build_compound_expr (tree_cons (NULL_TREE, lhs, ! build_tree_list (NULL_TREE, cond))); ! result = build (COND_EXPR, TREE_TYPE (newrhs), ! cond, ! build_modify_expr (lhs, modifycode, TREE_OPERAND (newrhs, 1)), ! build_modify_expr (lhs, modifycode, TREE_OPERAND (newrhs, 2))); ! } ! else if (modifycode != INIT_EXPR && TREE_CODE (newrhs) == WITH_CLEANUP_EXPR) ! { ! tree cleanup = TREE_OPERAND (newrhs, 2); ! tree slot; ! ! /* Finish up by running cleanups and having the "value" of the lhs. */ ! tree exprlist = tree_cons (NULL_TREE, cleanup, ! build_tree_list (NULL_TREE, lhs)); ! newrhs = TREE_OPERAND (newrhs, 0); ! if (TREE_CODE (newrhs) == TARGET_EXPR) ! { ! slot = TREE_OPERAND (newrhs, 0); ! } ! else abort (); ! ! /* Copy the value computed in SLOT into LHS. */ ! exprlist = tree_cons (NULL_TREE, ! build_modify_expr (lhs, modifycode, slot), ! exprlist); ! /* Evaluate the expression that needs CLEANUP. This will ! compute the value into SLOT. */ ! exprlist = tree_cons (NULL_TREE, newrhs, exprlist); ! result = convert (lhstype, build_compound_expr (exprlist)); ! } ! else ! result = build (modifycode == NOP_EXPR ? MODIFY_EXPR : INIT_EXPR, ! lhstype, lhs, newrhs); TREE_SIDE_EFFECTS (result) = 1; *************** *** 5283,5287 **** can give better error messages, and save some work as well. */ ! if (IS_AGGR_TYPE_2 (ttl, ttr)) { tree binfo; --- 5346,5350 ---- can give better error messages, and save some work as well. */ ! if (TREE_CODE (ttl) == RECORD_TYPE && TREE_CODE (ttr) == RECORD_TYPE) { tree binfo; *************** *** 5491,5495 **** return error_mark_node; ! /* This should no longer happen. References are initialzed via `convert_for_initialization'. They should otherwise be bashed before coming here. */ --- 5554,5558 ---- return error_mark_node; ! /* This should no longer happen. References are initialized via `convert_for_initialization'. They should otherwise be bashed before coming here. */ *************** *** 5645,5648 **** --- 5708,5725 ---- { rhs = build_cplus_new (type, rhs, 0); + return rhs; + } + /* Handle the case of default parameter initialization and + initialization of static variables. */ + else if (TREE_CODE (rhs) == INDIRECT_REF && TREE_HAS_CONSTRUCTOR (rhs)) + { + assert (TREE_CODE (TREE_OPERAND (rhs, 0)) == CALL_EXPR); + if (exp) + { + assert (TREE_VALUE (TREE_OPERAND (TREE_OPERAND (rhs, 0), 1)) == NULL_TREE); + TREE_VALUE (TREE_OPERAND (TREE_OPERAND (rhs, 0), 1)) = build_unary_op (ADDR_EXPR, exp, 0); + } + else + rhs = build_cplus_new (type, TREE_OPERAND (rhs, 0), 0); return rhs; } diff -rc2N gcc-2.0/cp-xref.c gcc-2.1/cp-xref.c *** gcc-2.0/cp-xref.c Fri Jan 17 17:58:44 1992 --- gcc-2.1/cp-xref.c Fri Mar 20 17:33:32 1992 *************** *** 35,38 **** --- 35,40 ---- #endif + char *getpwd (); + /* The character(s) used to join a directory specification (obtained with getwd or equivalent) with a non-absolute file name. */ *************** *** 74,78 **** ! #define SALLOC(str) ((String) ((str == NULL) ? NULL : (strcpy((String)malloc(strlen(str)+1),str)))) #define SFREE(str) (str != NULL && (free(str),0)) --- 76,83 ---- ! /* Return a malloc'd copy of STR. */ ! #define SALLOC(str) \ ! ((String) ((str) == NULL ? NULL \ ! : strcpy ((String) malloc (strlen ((str)) + 1), (str)))) #define SFREE(str) (str != NULL && (free(str),0)) *************** *** 207,211 **** { XREF_FILE xf; - char wdbuf[1024],nmbuf[2048]; if (!doing_xref || name == NULL) return; --- 212,215 ---- *************** *** 229,248 **** if (wd_name == NULL) ! { ! #if defined(USG) || defined(VMS) ! getcwd(wdbuf, sizeof(wdbuf)); ! #else ! getwd(wdbuf); ! #endif ! wd_name = SALLOC (wdbuf); ! } ! if (FILE_NAME_ABSOLUTE_P (name)) xf->outname = xf->name; else { ! sprintf (nmbuf,"%s%s%s", wd_name, FILE_NAME_JOINER, name); name = nmbuf; ! xf->outname = SALLOC (name); } --- 233,248 ---- if (wd_name == NULL) ! wd_name = getpwd (); ! if (FILE_NAME_ABSOLUTE_P (name) || ! wd_name) xf->outname = xf->name; else { ! char *nmbuf ! = (char *) malloc (strlen (wd_name) + strlen (FILE_NAME_JOINER) ! + strlen (name) + 1); ! sprintf (nmbuf, "%s%s%s", wd_name, FILE_NAME_JOINER, name); name = nmbuf; ! xf->outname = nmbuf; } *************** *** 249,254 **** fprintf (xref_file, "FIL %s %s 0\n", name, wd_name); ! filename(xf); ! fctname(NULL); } --- 249,254 ---- fprintf (xref_file, "FIL %s %s 0\n", name, wd_name); ! filename (xf); ! fctname (NULL); } diff -rc2N gcc-2.0/cpp.texi gcc-2.1/cpp.texi *** gcc-2.0/cpp.texi Tue Feb 4 16:12:11 1992 --- gcc-2.1/cpp.texi Fri Mar 6 18:35:42 1992 *************** *** 450,454 **** execution of the contents. ! @samp{#include} is obsolete because it is not a well-designed feature. It requires the users of a header file---the applications programmers---to know that a certain header file should only be included --- 450,454 ---- execution of the contents. ! @samp{#import} is obsolete because it is not a well-designed feature. It requires the users of a header file---the applications programmers---to know that a certain header file should only be included *************** *** 477,482 **** @file{sys/signal.h}, but the version of @file{/usr/include/sys/signal.h} on a particular system doesn't do what the application program expects. ! It would be convenient to define a ``local'' version ! @file{/usr/local/include/sys/signal.h} to override or add to the one supplied by the system. --- 477,482 ---- @file{sys/signal.h}, but the version of @file{/usr/include/sys/signal.h} on a particular system doesn't do what the application program expects. ! It might be convenient to define a ``local'' version, perhaps ! @file{/usr/local/include/sys/signal.h}, to override or add to the one supplied by the system. *************** *** 497,501 **** @findex #include_next ! The clean way to solve this problem is to use the directive @samp{#include_next}, which means, ``Include the @emph{next} file with this name.'' This command works like @samp{#include} except in --- 497,501 ---- @findex #include_next ! The clean way to solve this problem is to use @samp{#include_next}, which means, ``Include the @emph{next} file with this name.'' This command works like @samp{#include} except in *************** *** 504,513 **** was found. ! Thus, suppose the list of directories to search contains ! @file{/usr/local/include} and @file{/usr/include}, and both directories ! contain a file named @file{sys/signal.h}. Ordinary @samp{#include ! } finds the file under @file{/usr/local/include}. If that ! file contains @samp{#include_next }, it starts searching ! after that directory, and finds the file in @file{/usr/include}. @node Macros, Conditionals, Header Files, Top --- 504,514 ---- was found. ! Suppose you specify @samp{-I /usr/local/include}, and the list of ! directories to search also includes @file{/usr/include}; and suppose that ! both directories contain a file named @file{sys/signal.h}. Ordinary ! @samp{#include } finds the file under ! @file{/usr/local/include}. If that file contains @samp{#include_next ! }, it starts searching after that directory, and finds the ! file in @file{/usr/include}. @node Macros, Conditionals, Header Files, Top *************** *** 826,829 **** --- 827,837 ---- if a @samp{#line} command is used. @xref{Combining Sources}. + @item __INCLUDE_LEVEL__ + @findex __INCLUDE_LEVEL_ + This macro expands to a decimal integer constant that represents the + depth of nesting in include files. The value of this macro is + incremented on every @samp{#include} command and decremented at every + end of file. + @item __DATE__ @findex __DATE__ *************** *** 1910,1914 **** The text following the @samp{#elif} is processed only if the original ! @samp{#if}-condition failed and the @samp{#elif} condition succeeeds. More than one @samp{#elif} can go in the same @samp{#if}-@samp{#endif} group. Then the text after each @samp{#elif} is processed only if the @samp{#elif} --- 1918,1922 ---- The text following the @samp{#elif} is processed only if the original ! @samp{#if}-condition failed and the @samp{#elif} condition succeeds. More than one @samp{#elif} can go in the same @samp{#if}-@samp{#endif} group. Then the text after each @samp{#elif} is processed only if the @samp{#elif} diff -rc2N gcc-2.0/cross-make gcc-2.1/cross-make *** gcc-2.0/cross-make Tue Jan 21 20:35:30 1992 --- gcc-2.1/cross-make Thu Mar 5 18:31:47 1992 *************** *** 1,4 **** ! # Don't really put anything in libgcc1. ! LIBGCC1 = libgcc1.null # Specify tools and options for manipulating libraries for the target machine. --- 1,4 ---- ! # Don't build or use libgcc1. ! LIBGCC1 = # Specify tools and options for manipulating libraries for the target machine. diff -rc2N gcc-2.0/crtstuff.c gcc-2.1/crtstuff.c *** gcc-2.0/crtstuff.c Tue Jan 21 20:44:51 1992 --- gcc-2.1/crtstuff.c Fri Mar 20 14:06:07 1992 *************** *** 54,61 **** #ifndef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"a\",@progbits" #endif #ifndef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"a\",@progbits" #endif --- 54,61 ---- #ifndef CTORS_SECTION_ASM_OP ! #define CTORS_SECTION_ASM_OP ".section\t.ctors,\"a\",@progbits" #endif #ifndef DTORS_SECTION_ASM_OP ! #define DTORS_SECTION_ASM_OP ".section\t.dtors,\"a\",@progbits" #endif *************** *** 62,66 **** #include "gbl-ctors.h" ! #ifndef ON_EXIT /* DO_GLOBAL_CTORS_BODY uses ON_EXIT */ #define ON_EXIT(a, b) #endif --- 62,66 ---- #include "gbl-ctors.h" ! #ifndef ON_EXIT #define ON_EXIT(a, b) #endif *************** *** 70,78 **** #ifdef INIT_SECTION_ASM_OP ! /* Force cc1 to switch to .text section. */ ! static void force_to_text () { } asm (INIT_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ /* A routine to invoke all of the global constructors upon entry to the program. We put this into the .init section (for systems that have --- 70,94 ---- #ifdef INIT_SECTION_ASM_OP ! /* The function __do_global_ctors_aux is compiled twice (once in crtbegin.o ! and once in crtend.o). It must be declared static to aviod a link ! error. Here, we define __do_global_ctors as an externally callable ! function. It is externally callable so that __main can invoke it when ! INVOKE__main is defined. This has the additional effect of forcing cc1 ! to switch to the .text section. */ ! static void __do_global_ctors_aux (); ! void __do_global_ctors () { __do_global_ctors_aux (); } asm (INIT_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ + /* On some svr4 systems, the .init section preamble code provided in + crti.o may do some evil things which we have to undo before we reach + the function prologue code for __do_global_ctors (directly below). + For such systems, define the macro INIT_SECTION_PREAMBLE to + expand into the code needed to undo the actions of the crti.o file. */ + + #ifdef INIT_SECTION_PREAMBLE + INIT_SECTION_PREAMBLE; + #endif + /* A routine to invoke all of the global constructors upon entry to the program. We put this into the .init section (for systems that have *************** *** 81,88 **** static void ! __do_global_ctors () /* prologue goes in .init section */ { asm (TEXT_SECTION_ASM_OP); /* don't put epilogue and body in .init */ DO_GLOBAL_CTORS_BODY; } --- 97,105 ---- static void ! __do_global_ctors_aux () /* prologue goes in .init section */ { asm (TEXT_SECTION_ASM_OP); /* don't put epilogue and body in .init */ DO_GLOBAL_CTORS_BODY; + ON_EXIT (__do_global_dtors, 0); } *************** *** 94,102 **** --- 111,127 ---- /* The -1 is a flag to __do_global_[cd]tors indicating that this table does not start with a count of elements. */ + #ifdef CTOR_LIST_BEGIN + CTOR_LIST_BEGIN; + #else asm (CTORS_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) }; + #endif + #ifdef DTOR_LIST_BEGIN + DTOR_LIST_BEGIN; + #else asm (DTORS_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) }; + #endif #endif /* defined(CRT_BEGIN) */ *************** *** 119,126 **** static void ! __do_global_ctors () /* prologue goes in .text section */ { asm (INIT_SECTION_ASM_OP); DO_GLOBAL_CTORS_BODY; } /* epilogue and body go in .init section */ --- 144,152 ---- static void ! __do_global_ctors_aux () /* prologue goes in .text section */ { asm (INIT_SECTION_ASM_OP); DO_GLOBAL_CTORS_BODY; + ON_EXIT (__do_global_dtors, 0); } /* epilogue and body go in .init section */ *************** *** 130,138 **** --- 156,172 ---- static func_ptr force_to_data[0] = { }; + #ifdef CTOR_LIST_END + CTOR_LIST_END; + #else asm (CTORS_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ func_ptr __CTOR_END__[1] = { (func_ptr) 0 }; + #endif + #ifdef DTOR_LIST_END + DTOR_LIST_END; + #else asm (DTORS_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ func_ptr __DTOR_END__[1] = { (func_ptr) 0 }; + #endif #endif /* defined(CRT_END) */ diff -rc2N gcc-2.0/cse.c gcc-2.1/cse.c *** gcc-2.0/cse.c Fri Feb 7 07:33:57 1992 --- gcc-2.1/cse.c Tue Mar 24 17:20:30 1992 *************** *** 97,101 **** putting the constant in the hash table as is usual for non-regs. ! Whether a reg or a constant is prefered is determined by the configuration macro CONST_COSTS and will often depend on the constant value. In any event, expressions containing constants can be simplified, by fold_rtx. --- 97,101 ---- putting the constant in the hash table as is usual for non-regs. ! Whether a reg or a constant is preferred is determined by the configuration macro CONST_COSTS and will often depend on the constant value. In any event, expressions containing constants can be simplified, by fold_rtx. *************** *** 324,328 **** /* Vector mapping INSN_UIDs to cuids. ! The cuids are like uids but increase monononically always. We use them to see whether a reg is used outside a given basic block. */ --- 324,328 ---- /* Vector mapping INSN_UIDs to cuids. ! The cuids are like uids but increase monotonically always. We use them to see whether a reg is used outside a given basic block. */ *************** *** 606,609 **** --- 606,615 ---- total = 0; break; + case ASM_OPERANDS: + /* We don't want these to be used in substitutions because + we have no way of validating the resulting insn. So assign + anything containing an ASM_OPERANDS a very high cost. */ + total = 1000; + break; default: total = 2; *************** *** 1529,1533 **** next = p->next_same_hash; if (GET_CODE (p->exp) != REG && reg_mentioned_p (x, p->exp) ! && exp_equiv_p (p->exp, p->exp, 1) && i != (hash = safe_hash (p->exp, p->mode) % NBUCKETS)) { --- 1535,1539 ---- next = p->next_same_hash; if (GET_CODE (p->exp) != REG && reg_mentioned_p (x, p->exp) ! && exp_equiv_p (p->exp, p->exp, 1, 0) && i != (hash = safe_hash (p->exp, p->mode) % NBUCKETS)) { *************** *** 2755,2758 **** --- 2761,2767 ---- break; + case SQRT: + return 0; + default: abort (); *************** *** 2815,2818 **** --- 2824,2830 ---- break; + case SQRT: + return 0; + default: return 0; *************** *** 2867,2870 **** --- 2879,2885 ---- break; + case SQRT: + return 0; + default: abort (); *************** *** 3642,3650 **** { case PLUS: ! val = arg0 + arg1; break; case MINUS: ! val = arg0 - arg1; break; --- 3657,3665 ---- { case PLUS: ! val = arg0s + arg1s; break; case MINUS: ! val = arg0s - arg1s; break; *************** *** 4707,4710 **** --- 4722,4733 ---- break; + case 'o': + /* (lo_sum (high X) X) is simply X. */ + if (code == LO_SUM && const_arg0 != 0 + && GET_CODE (const_arg0) == HIGH + && rtx_equal_p (XEXP (const_arg0, 0), const_arg1)) + return const_arg1; + break; + case '3': case 'b': *************** *** 5497,5500 **** --- 5520,5566 ---- } + /* Another possibility is that we have an AND with a constant in + a mode narrower than a word. If so, it might have been generated + as part of an "if" which would narrow the AND. If we already + have done the AND in a wider mode, we can use a SUBREG of that + value. */ + + if (flag_expensive_optimizations && ! src_related + && GET_CODE (src) == AND && GET_CODE (XEXP (src, 1)) == CONST_INT + && GET_MODE_SIZE (mode) < UNITS_PER_WORD) + { + enum machine_mode tmode; + rtx new_and = gen_rtx (AND, VOIDmode, 0, XEXP (src, 1)); + + for (tmode = GET_MODE_WIDER_MODE (mode); + GET_MODE_SIZE (tmode) <= UNITS_PER_WORD; + tmode = GET_MODE_WIDER_MODE (tmode)) + { + rtx inner = gen_lowpart_if_possible (tmode, XEXP (src, 0)); + struct table_elt *larger_elt; + + if (inner) + { + PUT_MODE (new_and, tmode); + XEXP (new_and, 0) = inner; + larger_elt = lookup (new_and, HASH (new_and, tmode), tmode); + if (larger_elt == 0) + continue; + + for (larger_elt = larger_elt->first_same_value; + larger_elt; larger_elt = larger_elt->next_same_value) + if (GET_CODE (larger_elt->exp) == REG) + { + src_related + = gen_lowpart_if_possible (mode, larger_elt->exp); + break; + } + + if (src_related) + break; + } + } + } + if (src == src_folded) src_folded = 0; *************** *** 5727,5731 **** equivalent constant, we want to add a REG_NOTE. We don't want to write a REG_EQUAL note for a constant pseudo since verifying that ! that psuedo hasn't been eliminated is a pain. Such a note also won't help anything. */ if (n_sets == 1 && src_const && GET_CODE (dest) == REG --- 5793,5797 ---- equivalent constant, we want to add a REG_NOTE. We don't want to write a REG_EQUAL note for a constant pseudo since verifying that ! that pseudo hasn't been eliminated is a pain. Such a note also won't help anything. */ if (n_sets == 1 && src_const && GET_CODE (dest) == REG *************** *** 5897,5901 **** one if so. */ ! if (p != insn && GET_CODE (NEXT_INSN (p)) == BARRIER) delete_insn (NEXT_INSN (p)); --- 5963,5968 ---- one if so. */ ! if (p != insn && NEXT_INSN (p) != 0 ! && GET_CODE (NEXT_INSN (p)) == BARRIER) delete_insn (NEXT_INSN (p)); *************** *** 6754,6758 **** was specified, we haven't reached our maximum path length, there are insns following the target of the jump, this is the only use of the ! jump label, and the target label is preceeded by a BARRIER. */ else if (follow_jumps && path_size < PATHLENGTH - 1 && GET_CODE (p) == JUMP_INSN --- 6821,6825 ---- was specified, we haven't reached our maximum path length, there are insns following the target of the jump, this is the only use of the ! jump label, and the target label is preceded by a BARRIER. */ else if (follow_jumps && path_size < PATHLENGTH - 1 && GET_CODE (p) == JUMP_INSN *************** *** 7108,7112 **** /* See if it is ok to keep on going past the label which used to end our basic block. Remember that we incremented ! the count of that label, so we decremement it here. If we made a jump unconditional, TO_USAGE will be one; in that case, we don't want to count the use in that jump. */ --- 7175,7179 ---- /* See if it is ok to keep on going past the label which used to end our basic block. Remember that we incremented ! the count of that label, so we decrement it here. If we made a jump unconditional, TO_USAGE will be one; in that case, we don't want to count the use in that jump. */ *************** *** 7125,7129 **** following branches in this case. If TO was the last insn in the function, we are done. Similarly, if we deleted the ! insn after TO, it must have been because it was preceeded by a BARRIER. In that case, we are done with this block because it has no continuation. */ --- 7192,7196 ---- following branches in this case. If TO was the last insn in the function, we are done. Similarly, if we deleted the ! insn after TO, it must have been because it was preceded by a BARRIER. In that case, we are done with this block because it has no continuation. */ *************** *** 7259,7262 **** --- 7326,7330 ---- int *counts = (int *) alloca (nreg * sizeof (int)); rtx insn; + rtx tem; int i; *************** *** 7280,7283 **** --- 7348,7359 ---- ; + #ifdef HAVE_cc0 + else if (GET_CODE (SET_DEST (PATTERN (insn))) == CC0 + && ! side_effects_p (SET_SRC (PATTERN (insn))) + && ((tem = next_nonnote_insn (insn)) == 0 + || GET_RTX_CLASS (GET_CODE (tem)) != 'i' + || ! reg_referenced_p (cc0_rtx, PATTERN (tem)))) + ; + #endif else if (GET_CODE (SET_DEST (PATTERN (insn))) != REG || REGNO (SET_DEST (PATTERN (insn))) < FIRST_PSEUDO_REGISTER *************** *** 7297,7300 **** --- 7373,7384 ---- ; + #ifdef HAVE_cc0 + else if (GET_CODE (SET_DEST (elt)) == CC0 + && ! side_effects_p (SET_SRC (elt)) + && ((tem = next_nonnote_insn (insn)) == 0 + || GET_RTX_CLASS (GET_CODE (tem)) != 'i' + || ! reg_referenced_p (cc0_rtx, PATTERN (tem)))) + ; + #endif else if (GET_CODE (SET_DEST (elt)) != REG || REGNO (SET_DEST (elt)) < FIRST_PSEUDO_REGISTER diff -rc2N gcc-2.0/dbxout.c gcc-2.1/dbxout.c *** gcc-2.0/dbxout.c Fri Feb 21 02:06:52 1992 --- gcc-2.1/dbxout.c Tue Mar 24 05:49:21 1992 *************** *** 69,73 **** /* Include these first, because they may define MIN and MAX. */ #include - #include #include --- 69,72 ---- *************** *** 84,87 **** --- 83,90 ---- #endif + #ifdef XCOFF_DEBUGGING_INFO + #include "xcoffout.h" + #endif + #ifndef ASM_STABS_OP #define ASM_STABS_OP ".stabs" *************** *** 92,95 **** --- 95,114 ---- #endif + #ifndef DBX_DECL_STABS_CODE + #define DBX_DECL_STABS_CODE N_LSYM + #endif + + #ifndef DBX_STATIC_CONST_VAR_CODE + #define DBX_STATIC_CONST_VAR_CODE N_FUN + #endif + + #ifndef DBX_REGPARM_STABS_CODE + #define DBX_REGPARM_STABS_CODE N_RSYM + #endif + + #ifndef DBX_REGPARM_STABS_LETTER + #define DBX_REGPARM_STABS_LETTER 'P' + #endif + /* Nonzero means if the type has methods, only output debugging information if methods are actually written to the asm file. */ *************** *** 104,120 **** static int have_used_extensions = 0; ! /* Virtually every UN*X system now in common use (except for pre-4.3-tahoe ! BSD systems) now provides getcwd as called for by POSIX. Allow for ! the few exceptions to the general rule here. */ ! ! #if !(defined (USG) || defined (VMS)) ! extern char *getwd (); ! #define getcwd(buf,len) getwd(buf) ! #define GUESSPATHLEN (MAXPATHLEN + 1) ! #else /* (defined (USG) || defined (VMS)) */ ! extern char *getcwd (); ! /* We actually use this as a starting point, not a limit. */ ! #define GUESSPATHLEN 100 ! #endif /* (defined (USG) || defined (VMS)) */ /* Typical USG systems don't have stab.h, and they also have --- 123,127 ---- static int have_used_extensions = 0; ! char *getpwd (); /* Typical USG systems don't have stab.h, and they also have *************** *** 121,125 **** no use for DBX-format debugging info. */ ! #ifdef DBX_DEBUGGING_INFO #ifdef DEBUG_SYMS_TEXT --- 128,132 ---- no use for DBX-format debugging info. */ ! #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) #ifdef DEBUG_SYMS_TEXT *************** *** 129,133 **** #endif ! #if defined (USG) || defined (MIPS) #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */ #else --- 136,140 ---- #endif ! #if defined (USG) || defined (NO_STAB_H) #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */ #else *************** *** 175,179 **** static char *cwd; - static enum {not_gotten, gotten, error_getting} cwd_status = not_gotten; enum typestatus {TYPE_UNSEEN, TYPE_XREF, TYPE_DEFINED}; --- 182,185 ---- *************** *** 281,285 **** char *value; ! /* Copy the filename (possibly preceeded by the current working directory name) into the absolutization buffer. */ --- 287,291 ---- char *value; ! /* Copy the filename (possibly preceded by the current working directory name) into the absolutization buffer. */ *************** *** 299,303 **** if (endp[-1] == '/') *endp = '\0'; - } /* Now make a copy of abs_buffer into abs_buffer, shortening the --- 305,308 ---- *************** *** 386,424 **** /* Put the current working directory in an N_SO symbol. */ ! { ! int size; ! ! if (cwd_status == not_gotten) ! { ! char *value; ! ! /* Read the working directory, avoiding arbitrary limit. */ ! size = GUESSPATHLEN; ! while (1) ! { ! cwd = (char *) xmalloc (size); ! value = getcwd (cwd, size); ! if (value != 0 || errno != ERANGE) ! break; ! free (cwd); ! size *= 2; ! } ! ! if (value != 0) ! cwd_status = gotten; ! else ! cwd_status = error_getting; ! } ! ! if (cwd_status == gotten) ! { #ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY ! DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asmfile, cwd); #else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */ ! fprintf (asmfile, "%s \"%s/\",%d,0,0,%s\n", ASM_STABS_OP, ! cwd, N_SO, <ext_label_name[1]); #endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */ ! } ! } #ifdef DBX_OUTPUT_MAIN_SOURCE_FILENAME --- 391,409 ---- /* Put the current working directory in an N_SO symbol. */ ! #ifndef DBX_WORKING_DIRECTORY /* Only some versions of DBX want this, ! but GDB always does. */ ! if (use_gdb_dbx_extensions) ! #endif ! { ! if (cwd || (cwd = getpwd ())) ! { #ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY ! DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asmfile, cwd); #else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */ ! fprintf (asmfile, "%s \"%s/\",%d,0,0,%s\n", ASM_STABS_OP, ! cwd, N_SO, <ext_label_name[1]); #endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */ ! } ! } #ifdef DBX_OUTPUT_MAIN_SOURCE_FILENAME *************** *** 697,700 **** --- 682,686 ---- tree ctor_name; tree methods = TYPE_METHODS (type); + tree type_encoding; register tree fndecl; register tree last; *************** *** 705,709 **** --- 691,716 ---- ctor_name = DECL_NAME (TYPE_NAME (type)); + + /* C++: Template classes break some assumptions made by this code about + the class names, constructor names, and encodings for assembler + label names. For now, disable output of dbx info for them. */ + { + char *ptr = IDENTIFIER_POINTER (ctor_name); + /* Avoid strchr or index since those names aren't universal. */ + while (*ptr && *ptr != '<') ptr++; + if (*ptr != 0) + { + static int warned; + if (!warned) + { + warned = 1; + warning ("dbx info for template class methods not yet supported"); + } + return; + } + } + type_identifier_length = IDENTIFIER_LENGTH (ctor_name); + if (TREE_CODE (methods) == FUNCTION_DECL) fndecl = methods; *************** *** 880,883 **** --- 887,895 ---- CHARS (3); + #ifdef DBX_TYPE_DEFINED + if (DBX_TYPE_DEFINED (type)) + return; + #endif + /* If this type's definition has been output or is now being output, that is all. */ *************** *** 997,1001 **** /* Output a structure type. */ ! if ((TYPE_NAME (type) != 0 && !full) || TYPE_SIZE (type) == 0) { --- 1009,1019 ---- /* Output a structure type. */ ! if ((TYPE_NAME (type) != 0 ! #if 0 /* Tiemann says this creates output tha "confuses GDB". ! Too bad the info is so vague. Hope this doesn't lose. */ ! && ! (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL ! && DECL_IGNORED_P (TYPE_NAME (type))) ! #endif ! && !full) || TYPE_SIZE (type) == 0) { *************** *** 1009,1013 **** fprintf (asmfile, (TREE_CODE (type) == RECORD_TYPE) ? "xs" : "xu"); CHARS (3); ! #if 0 /* This assertion is legitimately false in C++. */ /* We shouldn't be outputting a reference to a type before its definition unless the type has a tag name. --- 1027,1031 ---- fprintf (asmfile, (TREE_CODE (type) == RECORD_TYPE) ? "xs" : "xu"); CHARS (3); ! #if 0 /* This assertion is legitimately false in C++. */ /* We shouldn't be outputting a reference to a type before its definition unless the type has a tag name. *************** *** 1077,1081 **** /* Write out the field declarations. */ dbxout_type_fields (type); ! if (use_gdb_dbx_extensions) { have_used_extensions = 1; --- 1095,1099 ---- /* Write out the field declarations. */ dbxout_type_fields (type); ! if (use_gdb_dbx_extensions && TYPE_METHODS (type) != NULL_TREE) { have_used_extensions = 1; *************** *** 1385,1394 **** || TREE_CODE (type) == UNION_TYPE) && (TYPE_NAME (type) == decl)) ! { ! putc ('T', asmfile); ! TREE_ASM_WRITTEN (TYPE_NAME (type)) = 1; ! } putc ('t', asmfile); ! current_sym_code = N_LSYM; dbxout_type (type, 1); --- 1403,1412 ---- || TREE_CODE (type) == UNION_TYPE) && (TYPE_NAME (type) == decl)) ! { ! putc ('T', asmfile); ! TREE_ASM_WRITTEN (TYPE_NAME (type)) = 1; ! } putc ('t', asmfile); ! current_sym_code = DBX_DECL_STABS_CODE; dbxout_type (type, 1); *************** *** 1405,1409 **** name = DECL_NAME (name); ! current_sym_code = N_LSYM; current_sym_value = 0; current_sym_addr = 0; --- 1423,1427 ---- name = DECL_NAME (name); ! current_sym_code = DBX_DECL_STABS_CODE; current_sym_value = 0; current_sym_addr = 0; *************** *** 1539,1543 **** /* This is not quite right, but it's the closest of all the codes that Unix defines. */ ! current_sym_code = N_FUN; else { --- 1557,1561 ---- /* This is not quite right, but it's the closest of all the codes that Unix defines. */ ! current_sym_code = DBX_STATIC_CONST_VAR_CODE; else { *************** *** 1617,1620 **** --- 1635,1656 ---- current_sym_value = DEBUGGER_AUTO_OFFSET (XEXP (DECL_RTL (decl), 0)); } + else if (GET_CODE (DECL_RTL (decl)) == MEM + && GET_CODE (XEXP (DECL_RTL (decl), 0)) == CONST) + { + /* Handle an obscure case which can arise when optimizing and + when there are few available registers. (This is *always* + the case for i386/i486 targets). The DECL_RTL looks like + (MEM (CONST ...)) even though this variable is a local `auto' + or a local `register' variable. In effect, what has happened + is that the reload pass has seen that all assignments and + references for one such a local variable can be replaced by + equivalent assignments and references to some static storage + variable, thereby avoiding the need for a register. In such + cases we're forced to lie to debuggers and tell them that + this variable was itself `static'. */ + current_sym_code = N_LCSYM; + letter = 'V'; + current_sym_addr = XEXP (XEXP (DECL_RTL (decl), 0), 0); + } else /* Address might be a MEM, when DECL is a variable-sized object. *************** *** 1625,1628 **** --- 1661,1669 ---- /* Ok, start a symtab entry and output the variable name. */ FORCE_TEXT; + + #ifdef DBX_STATIC_BLOCK_START + DBX_STATIC_BLOCK_START (asmfile, current_sym_code); + #endif + /* One slight hitch: if this is a VAR_DECL which is a static class member, we must put out the mangled name instead of the *************** *** 1650,1653 **** --- 1691,1698 ---- dbxout_type (type, 0); dbxout_finish_symbol (decl); + + #ifdef DBX_STATIC_BLOCK_END + DBX_STATIC_BLOCK_END (asmfile, current_sym_code); + #endif break; } *************** *** 1669,1672 **** --- 1714,1720 ---- tree sym; { + #ifdef DBX_FINISH_SYMBOL + DBX_FINISH_SYMBOL (sym); + #else int line = 0; #ifdef WINNING_GDB *************** *** 1674,1677 **** --- 1722,1726 ---- line = DECL_SOURCE_LINE (sym); #endif + fprintf (asmfile, "\",%d,0,%d,", current_sym_code, line); if (current_sym_addr) *************** *** 1680,1683 **** --- 1729,1733 ---- fprintf (asmfile, "%d", current_sym_value); putc ('\n', asmfile); + #endif } *************** *** 1684,1688 **** /* Output definitions of all the decls in a chain. */ ! static void dbxout_syms (syms) tree syms; --- 1734,1738 ---- /* Output definitions of all the decls in a chain. */ ! void dbxout_syms (syms) tree syms; *************** *** 1707,1711 **** of all the parms in PARMS, which is a chain of PARM_DECL nodes. */ ! static void dbxout_parms (parms) tree parms; --- 1757,1761 ---- of all the parms in PARMS, which is a chain of PARM_DECL nodes. */ ! void dbxout_parms (parms) tree parms; *************** *** 1797,1803 **** { rtx best_rtl; /* Parm passed in registers and lives in registers or nowhere. */ ! current_sym_code = N_RSYM; current_sym_addr = 0; --- 1847,1855 ---- { rtx best_rtl; + char regparm_letter; /* Parm passed in registers and lives in registers or nowhere. */ ! current_sym_code = DBX_REGPARM_STABS_CODE; ! regparm_letter = DBX_REGPARM_STABS_LETTER; current_sym_addr = 0; *************** *** 1819,1824 **** { current_sym_nchars = 2 + IDENTIFIER_LENGTH (DECL_NAME (parms)); ! fprintf (asmfile, "%s \"%s:P", ASM_STABS_OP, ! IDENTIFIER_POINTER (DECL_NAME (parms))); } else --- 1871,1877 ---- { current_sym_nchars = 2 + IDENTIFIER_LENGTH (DECL_NAME (parms)); ! fprintf (asmfile, "%s \"%s:%c", ASM_STABS_OP, ! IDENTIFIER_POINTER (DECL_NAME (parms)), ! regparm_letter); } else *************** *** 1825,1829 **** { current_sym_nchars = 8; ! fprintf (asmfile, "%s \"(anon):P", ASM_STABS_OP); } --- 1878,1883 ---- { current_sym_nchars = 8; ! fprintf (asmfile, "%s \"(anon):%c", ASM_STABS_OP, ! regparm_letter); } *************** *** 1882,1886 **** PARMS is a chain of PARM_DECL nodes. */ ! static void dbxout_reg_parms (parms) tree parms; --- 1936,1940 ---- PARMS is a chain of PARM_DECL nodes. */ ! void dbxout_reg_parms (parms) tree parms; *************** *** 2134,2161 **** #endif } - - #else /* not DBX_DEBUGGING_INFO */ - - void - dbxout_init (asm_file, input_file_name) - FILE *asm_file; - char *input_file_name; - {} - - void - dbxout_symbol (decl, local) - tree decl; - int local; - {} - - void - dbxout_types (types) - register tree types; - {} - - void - dbxout_function (decl) - tree decl; - {} - #endif /* DBX_DEBUGGING_INFO */ --- 2188,2190 ---- diff -rc2N gcc-2.0/dbxstclass.h gcc-2.1/dbxstclass.h *** gcc-2.0/dbxstclass.h --- gcc-2.1/dbxstclass.h Wed Mar 11 17:25:54 1992 *************** *** 0 **** --- 1,17 ---- + /* Storage classes in XCOFF object file format designed for DBX's use. + This info is from the `Files Reference' manual for IBM's AIX version 3 + for the RS6000. */ + + #define C_GSYM 0x80 + #define C_LSYM 0x81 + #define C_PSYM 0x82 + #define C_RSYM 0x83 + #define C_RPSYM 0x84 + #define C_STSYM 0x85 + + #define C_BCOMM 0x87 + #define C_ECOML 0x88 + #define C_ECOMM 0x89 + #define C_DECL 0x8c + #define C_ENTRY 0x8d + #define C_FUN 0x8e diff -rc2N gcc-2.0/dwarfout.c gcc-2.1/dwarfout.c *** gcc-2.0/dwarfout.c Fri Feb 21 02:10:18 1992 --- gcc-2.1/dwarfout.c Fri Mar 20 17:22:06 1992 *************** *** 54,60 **** #include #define strrchr rindex - #define getcwd(s,len) getwd(s) #endif /* IMPORTANT NOTE: Please see the file README.DWARF for important details regarding the GNU implementation of Dwarf. */ --- 54,62 ---- #include #define strrchr rindex #endif + char *getpwd (); + + /* IMPORTANT NOTE: Please see the file README.DWARF for important details regarding the GNU implementation of Dwarf. */ *************** *** 306,325 **** #ifndef FILE_ASM_OP ! #define FILE_ASM_OP "\t.file" #endif #ifndef VERSION_ASM_OP ! #define VERSION_ASM_OP "\t.version" #endif #ifndef SECTION_ASM_OP ! #define SECTION_ASM_OP "\t.section" #endif #ifndef UNALIGNED_SHORT_ASM_OP ! #define UNALIGNED_SHORT_ASM_OP "\t.2byte" #endif #ifndef UNALIGNED_INT_ASM_OP ! #define UNALIGNED_INT_ASM_OP "\t.4byte" #endif #ifndef DEF_ASM_OP ! #define DEF_ASM_OP "\t.set" #endif --- 308,327 ---- #ifndef FILE_ASM_OP ! #define FILE_ASM_OP ".file" #endif #ifndef VERSION_ASM_OP ! #define VERSION_ASM_OP ".version" #endif #ifndef SECTION_ASM_OP ! #define SECTION_ASM_OP ".section" #endif #ifndef UNALIGNED_SHORT_ASM_OP ! #define UNALIGNED_SHORT_ASM_OP ".2byte" #endif #ifndef UNALIGNED_INT_ASM_OP ! #define UNALIGNED_INT_ASM_OP ".4byte" #endif #ifndef DEF_ASM_OP ! #define DEF_ASM_OP ".set" #endif *************** *** 485,489 **** #ifndef ASM_OUTPUT_SOURCE_FILENAME #define ASM_OUTPUT_SOURCE_FILENAME(FILE,NAME) \ ! fprintf ((FILE), "%s\t\"%s\"\n", FILE_ASM_OP, NAME) #endif --- 487,491 ---- #ifndef ASM_OUTPUT_SOURCE_FILENAME #define ASM_OUTPUT_SOURCE_FILENAME(FILE,NAME) \ ! fprintf ((FILE), "\t%s\t\"%s\"\n", FILE_ASM_OP, NAME) #endif *************** *** 490,494 **** #ifndef ASM_OUTPUT_DEF #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ ! do { fprintf ((FILE), "%s\t", DEF_ASM_OP); \ assemble_name (FILE, LABEL1); \ fprintf (FILE, ","); \ --- 492,496 ---- #ifndef ASM_OUTPUT_DEF #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ ! do { fprintf ((FILE), "\t%s\t", DEF_ASM_OP); \ assemble_name (FILE, LABEL1); \ fprintf (FILE, ","); \ *************** *** 570,574 **** #ifndef ASM_OUTPUT_DWARF_DELTA2 #define ASM_OUTPUT_DWARF_DELTA2(FILE,LABEL1,LABEL2) \ ! do { fprintf ((FILE), "%s\t", UNALIGNED_SHORT_ASM_OP); \ assemble_name (FILE, LABEL1); \ fprintf (FILE, "-"); \ --- 572,576 ---- #ifndef ASM_OUTPUT_DWARF_DELTA2 #define ASM_OUTPUT_DWARF_DELTA2(FILE,LABEL1,LABEL2) \ ! do { fprintf ((FILE), "\t%s\t", UNALIGNED_SHORT_ASM_OP); \ assemble_name (FILE, LABEL1); \ fprintf (FILE, "-"); \ *************** *** 580,584 **** #ifndef ASM_OUTPUT_DWARF_DELTA4 #define ASM_OUTPUT_DWARF_DELTA4(FILE,LABEL1,LABEL2) \ ! do { fprintf ((FILE), "%s\t", UNALIGNED_INT_ASM_OP); \ assemble_name (FILE, LABEL1); \ fprintf (FILE, "-"); \ --- 582,586 ---- #ifndef ASM_OUTPUT_DWARF_DELTA4 #define ASM_OUTPUT_DWARF_DELTA4(FILE,LABEL1,LABEL2) \ ! do { fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP); \ assemble_name (FILE, LABEL1); \ fprintf (FILE, "-"); \ *************** *** 590,594 **** #ifndef ASM_OUTPUT_DWARF_TAG #define ASM_OUTPUT_DWARF_TAG(FILE,TAG) \ ! fprintf ((FILE), "%s\t0x%x\t%s %s\n", UNALIGNED_SHORT_ASM_OP, \ (unsigned) TAG, ASM_COMMENT_START, tag_name (TAG)) #endif --- 592,596 ---- #ifndef ASM_OUTPUT_DWARF_TAG #define ASM_OUTPUT_DWARF_TAG(FILE,TAG) \ ! fprintf ((FILE), "\t%s\t0x%x\t%s %s\n", UNALIGNED_SHORT_ASM_OP, \ (unsigned) TAG, ASM_COMMENT_START, tag_name (TAG)) #endif *************** *** 596,600 **** #ifndef ASM_OUTPUT_DWARF_ATTRIBUTE #define ASM_OUTPUT_DWARF_ATTRIBUTE(FILE,ATTRIBUTE) \ ! fprintf ((FILE), "%s\t0x%x\t%s %s\n", UNALIGNED_SHORT_ASM_OP, \ (unsigned) ATTRIBUTE, ASM_COMMENT_START, attribute_name (ATTRIBUTE)) #endif --- 598,602 ---- #ifndef ASM_OUTPUT_DWARF_ATTRIBUTE #define ASM_OUTPUT_DWARF_ATTRIBUTE(FILE,ATTRIBUTE) \ ! fprintf ((FILE), "\t%s\t0x%x\t%s %s\n", UNALIGNED_SHORT_ASM_OP, \ (unsigned) ATTRIBUTE, ASM_COMMENT_START, attribute_name (ATTRIBUTE)) #endif *************** *** 608,612 **** #ifndef ASM_OUTPUT_DWARF_FUND_TYPE #define ASM_OUTPUT_DWARF_FUND_TYPE(FILE,FT) \ ! fprintf ((FILE), "%s\t0x%x\t%s %s\n", UNALIGNED_SHORT_ASM_OP, \ (unsigned) FT, ASM_COMMENT_START, fundamental_type_name (FT)) #endif --- 610,614 ---- #ifndef ASM_OUTPUT_DWARF_FUND_TYPE #define ASM_OUTPUT_DWARF_FUND_TYPE(FILE,FT) \ ! fprintf ((FILE), "\t%s\t0x%x\t%s %s\n", UNALIGNED_SHORT_ASM_OP, \ (unsigned) FT, ASM_COMMENT_START, fundamental_type_name (FT)) #endif *************** *** 626,630 **** #ifndef ASM_OUTPUT_DWARF_ADDR #define ASM_OUTPUT_DWARF_ADDR(FILE,LABEL) \ ! do { fprintf ((FILE), "%s\t", UNALIGNED_INT_ASM_OP); \ assemble_name (FILE, LABEL); \ fprintf (FILE, "\n"); \ --- 628,632 ---- #ifndef ASM_OUTPUT_DWARF_ADDR #define ASM_OUTPUT_DWARF_ADDR(FILE,LABEL) \ ! do { fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP); \ assemble_name (FILE, LABEL); \ fprintf (FILE, "\n"); \ *************** *** 634,638 **** #ifndef ASM_OUTPUT_DWARF_ADDR_CONST #define ASM_OUTPUT_DWARF_ADDR_CONST(FILE,RTX) \ ! fprintf ((FILE), "%s\t", UNALIGNED_INT_ASM_OP); \ output_addr_const ((FILE), (RTX)); \ fputc ('\n', (FILE)) --- 636,640 ---- #ifndef ASM_OUTPUT_DWARF_ADDR_CONST #define ASM_OUTPUT_DWARF_ADDR_CONST(FILE,RTX) \ ! fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP); \ output_addr_const ((FILE), (RTX)); \ fputc ('\n', (FILE)) *************** *** 641,645 **** #ifndef ASM_OUTPUT_DWARF_REF #define ASM_OUTPUT_DWARF_REF(FILE,LABEL) \ ! do { fprintf ((FILE), "%s\t", UNALIGNED_INT_ASM_OP); \ assemble_name (FILE, LABEL); \ fprintf (FILE, "\n"); \ --- 643,647 ---- #ifndef ASM_OUTPUT_DWARF_REF #define ASM_OUTPUT_DWARF_REF(FILE,LABEL) \ ! do { fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP); \ assemble_name (FILE, LABEL); \ fprintf (FILE, "\n"); \ *************** *** 654,658 **** #ifndef ASM_OUTPUT_DWARF_DATA2 #define ASM_OUTPUT_DWARF_DATA2(FILE,VALUE) \ ! fprintf ((FILE), "%s\t0x%x\n", UNALIGNED_SHORT_ASM_OP, (unsigned) VALUE) #endif --- 656,660 ---- #ifndef ASM_OUTPUT_DWARF_DATA2 #define ASM_OUTPUT_DWARF_DATA2(FILE,VALUE) \ ! fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_SHORT_ASM_OP, (unsigned) VALUE) #endif *************** *** 659,663 **** #ifndef ASM_OUTPUT_DWARF_DATA4 #define ASM_OUTPUT_DWARF_DATA4(FILE,VALUE) \ ! fprintf ((FILE), "%s\t0x%x\n", UNALIGNED_INT_ASM_OP, (unsigned) VALUE) #endif --- 661,665 ---- #ifndef ASM_OUTPUT_DWARF_DATA4 #define ASM_OUTPUT_DWARF_DATA4(FILE,VALUE) \ ! fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_INT_ASM_OP, (unsigned) VALUE) #endif *************** *** 667,677 **** if (WORDS_BIG_ENDIAN) \ { \ ! fprintf ((FILE), "%s\t0x%x\n", UNALIGNED_INT_ASM_OP, HIGH_VALUE); \ ! fprintf ((FILE), "%s\t0x%x\n", UNALIGNED_INT_ASM_OP, LOW_VALUE);\ } \ else \ { \ ! fprintf ((FILE), "%s\t0x%x\n", UNALIGNED_INT_ASM_OP, LOW_VALUE);\ ! fprintf ((FILE), "%s\t0x%x\n", UNALIGNED_INT_ASM_OP, HIGH_VALUE); \ } \ } while (0) --- 669,679 ---- if (WORDS_BIG_ENDIAN) \ { \ ! fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_INT_ASM_OP, HIGH_VALUE); \ ! fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_INT_ASM_OP, LOW_VALUE);\ } \ else \ { \ ! fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_INT_ASM_OP, LOW_VALUE);\ ! fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_INT_ASM_OP, HIGH_VALUE); \ } \ } while (0) *************** *** 1389,1393 **** /* Handle a special case. If we are about to output a location descriptor ! for a variable or parameter which has been optimized out of existance, don't do that. Instead we output a zero-length location descriptor value as part of the location attribute. Note that we cannot simply --- 1391,1395 ---- /* Handle a special case. If we are about to output a location descriptor ! for a variable or parameter which has been optimized out of existence, don't do that. Instead we output a zero-length location descriptor value as part of the location attribute. Note that we cannot simply *************** *** 1500,1503 **** --- 1502,1521 ---- ASM_OUTPUT_DWARF_ADDR_CONST (asm_out_file, rtl); break; + + case PLUS: + /* In cases where an inlined instance of an inline function is passed + the address of an `auto' variable (which is local to the caller) + we can get a situation where the DECL_RTL of the artificial + local variable (for the inlining) which acts as a stand-in for + the corresponding formal parameter (of the inline function) + will look like (plus:SI (reg:SI FRAME_PTR) (const_int ...)). + This is not exactly a compile-time constant expression, but it + isn't the address of the (artificial) local variable either. + Rather, it represents the *value* which the artificial local + variable always has during its lifetime. We currently have no + way to represent such quasi-constant values in Dwarf, so for now + we just punt and generate an AT_const_value attribute with form + FORM_BLOCK4 and a length of zero. */ + break; } *************** *** 1540,1552 **** describe the "passing" location. */ ! #if 0 /* This is probably right, but it leads to a lot of trouble. Fixing one problem has been exposing another, all of which seemed to have no ill effects before. ! Better to turn this off for now and try fix it later. */ rtl = (TREE_CODE (decl) == PARM_DECL) ? DECL_INCOMING_RTL (decl) : DECL_RTL (decl); ! #endif rtl = DECL_RTL (decl); if (rtl == NULL) --- 1558,1571 ---- describe the "passing" location. */ ! #if 1 /* This is probably right, but it leads to a lot of trouble. Fixing one problem has been exposing another, all of which seemed to have no ill effects before. ! Let's try it again for now. */ rtl = (TREE_CODE (decl) == PARM_DECL) ? DECL_INCOMING_RTL (decl) : DECL_RTL (decl); ! #else rtl = DECL_RTL (decl); + #endif if (rtl == NULL) *************** *** 1561,1564 **** --- 1580,1584 ---- case LABEL_REF: case CONST: + case PLUS: /* DECL_RTL could be (plus (reg ...) (const_int ...)) */ const_value_attribute (rtl); break; *************** *** 2565,2584 **** { ! register unsigned len = 1024; ! register char *dirname = (char *) xmalloc (len + 1); ! ! /* We don't know how much space the dirname needs, ! so try bigger and bigger buffers until it fits. */ ! while (1) ! { ! getcwd (dirname, len); /* Being conservative here. */ ! if (strlen (dirname) < len - 1) /* Being conservative here. */ ! break; ! len *= 2; ! dirname = (char *) xrealloc (dirname, len + 1); ! } ! ! comp_dir_attribute (dirname); ! free (dirname); } --- 2585,2591 ---- { ! char *wd = getpwd (); ! if (wd) ! comp_dir_attribute (wd); } *************** *** 3424,3428 **** /* WARNING! Kludge zone ahead! Here we have a special ! hack for svr4 SDB compatability. Instead of passing the current FUNCTION_DECL node as the second parameter (i.e. the `containing_scope' parameter) to `output_decl' (as --- 3431,3435 ---- /* WARNING! Kludge zone ahead! Here we have a special ! hack for svr4 SDB compatibility. Instead of passing the current FUNCTION_DECL node as the second parameter (i.e. the `containing_scope' parameter) to `output_decl' (as *************** *** 4046,4050 **** } ! fprintf (asm_out_file, "%s\t%u\t%s %s:%u\n", UNALIGNED_INT_ASM_OP, line, ASM_COMMENT_START, filename, line); --- 4053,4057 ---- } ! fprintf (asm_out_file, "\t%s\t%u\t%s %s:%u\n", UNALIGNED_INT_ASM_OP, line, ASM_COMMENT_START, filename, line); *************** *** 4068,4072 **** fputc ('\n', asm_out_file); ASM_DWARF_MACINFO_SECTION (asm_out_file); ! fprintf (asm_out_file, "%s\t%s\n", UNALIGNED_INT_ASM_OP, type_and_offset); ASM_OUTPUT_DWARF_STRING (asm_out_file, string); ASM_DWARF_POP_SECTION (asm_out_file); --- 4075,4079 ---- fputc ('\n', asm_out_file); ASM_DWARF_MACINFO_SECTION (asm_out_file); ! fprintf (asm_out_file, "\t%s\t%s\n", UNALIGNED_INT_ASM_OP, type_and_offset); ASM_OUTPUT_DWARF_STRING (asm_out_file, string); ASM_DWARF_POP_SECTION (asm_out_file); *************** *** 4229,4246 **** ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL); { ! register unsigned len = 1024; ! register char *dirname = (char *) xmalloc (len + 1); ! /* We don't know how much space the dirname needs, ! so try bigger and bigger buffers until it fits. */ ! for (;;) ! { ! getcwd (dirname, len); /* Being conservative here. */ ! if (strlen (dirname) < len - 1) /* Being conservative here. */ ! break; ! len *= 2; ! dirname = (char *) xrealloc (dirname, len + 1); ! } ! strcat (dirname, "/"); ASM_OUTPUT_DWARF_STRING (asm_out_file, dirname); free (dirname); --- 4236,4245 ---- ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL); { ! register char *pwd = getpwd (); ! register unsigned len = strlen (pwd); ! register char *dirname = (char *) xmalloc (len + 2); ! strcpy (dirname, pwd); ! strcpy (dirname + len, "/"); ASM_OUTPUT_DWARF_STRING (asm_out_file, dirname); free (dirname); diff -rc2N gcc-2.0/emit-rtl.c gcc-2.1/emit-rtl.c *** gcc-2.0/emit-rtl.c Fri Jan 17 17:59:22 1992 --- gcc-2.1/emit-rtl.c Sat Mar 14 00:03:44 1992 *************** *** 266,270 **** all such references point to the same frame pointer. This is used during frame pointer elimination to distinguish the explicit ! references to these registers from psuedos that happened to be assigned to them. --- 266,270 ---- all such references point to the same frame pointer. This is used during frame pointer elimination to distinguish the explicit ! references to these registers from pseudos that happened to be assigned to them. *************** *** 2605,2609 **** } ! const_tiny_rtx[i][VOIDmode] = gen_rtx (CONST_INT, VOIDmode, i); for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != VOIDmode; --- 2605,2609 ---- } ! const_tiny_rtx[i][(int) VOIDmode] = gen_rtx (CONST_INT, VOIDmode, i); for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != VOIDmode; diff -rc2N gcc-2.0/explow.c gcc-2.1/explow.c *** gcc-2.0/explow.c Thu Feb 13 17:58:38 1992 --- gcc-2.1/explow.c Wed Mar 11 17:26:55 1992 *************** *** 159,166 **** eliminate_constant_term (x, constptr) rtx x; ! int *constptr; { - int c; register rtx x0, x1; if (GET_CODE (x) != PLUS) --- 159,166 ---- eliminate_constant_term (x, constptr) rtx x; ! rtx *constptr; { register rtx x0, x1; + rtx tem; if (GET_CODE (x) != PLUS) *************** *** 168,191 **** /* First handle constants appearing at this level explicitly. */ ! if (GET_CODE (XEXP (x, 0)) == CONST_INT) { ! *constptr += INTVAL (XEXP (x, 0)); ! return eliminate_constant_term (XEXP (x, 1), constptr); ! } ! ! if (GET_CODE (XEXP (x, 1)) == CONST_INT) ! { ! *constptr += INTVAL (XEXP (x, 1)); return eliminate_constant_term (XEXP (x, 0), constptr); } ! c = 0; ! x0 = eliminate_constant_term (XEXP (x, 0), &c); ! x1 = eliminate_constant_term (XEXP (x, 1), &c); ! if (x1 != XEXP (x, 1) || x0 != XEXP (x, 0)) { ! *constptr += c; return gen_rtx (PLUS, GET_MODE (x), x0, x1); } return x; } --- 168,192 ---- /* First handle constants appearing at this level explicitly. */ ! if (GET_CODE (XEXP (x, 1)) == CONST_INT ! && 0 != (tem = simplify_binary_operation (PLUS, GET_MODE (x), *constptr, ! XEXP (x, 1))) ! && GET_CODE (tem) == CONST_INT) { ! *constptr = tem; return eliminate_constant_term (XEXP (x, 0), constptr); } ! tem = const0_rtx; ! x0 = eliminate_constant_term (XEXP (x, 0), &tem); ! x1 = eliminate_constant_term (XEXP (x, 1), &tem); ! if ((x1 != XEXP (x, 1) || x0 != XEXP (x, 0)) ! && 0 != (tem = simplify_binary_operation (PLUS, GET_MODE (x), ! *constptr, tem)) ! && GET_CODE (tem) == CONST_INT) { ! *constptr = tem; return gen_rtx (PLUS, GET_MODE (x), x0, x1); } + return x; } *************** *** 377,387 **** if (GET_CODE (x) == PLUS) { ! int constant_term = 0; rtx y = eliminate_constant_term (x, &constant_term); ! if (constant_term == 0 || ! memory_address_p (mode, y)) return force_operand (x, 0); ! y = plus_constant (copy_to_reg (y), constant_term); if (! memory_address_p (mode, y)) return force_operand (x, 0); --- 378,388 ---- if (GET_CODE (x) == PLUS) { ! rtx constant_term = const0_rtx; rtx y = eliminate_constant_term (x, &constant_term); ! if (constant_term == const0_rtx || ! memory_address_p (mode, y)) return force_operand (x, 0); ! y = gen_rtx (PLUS, GET_MODE (x), copy_to_reg (y), constant_term); if (! memory_address_p (mode, y)) return force_operand (x, 0); *************** *** 468,475 **** temp = copy_to_reg (temp); mem = gen_rtx (MEM, GET_MODE (x), temp); ! /* Mark returned memref with in_struct ! if it's in an array or structure. */ ! if (GET_CODE (addr) == PLUS || MEM_IN_STRUCT_P (x)) ! MEM_IN_STRUCT_P (mem) = 1; return mem; } --- 469,479 ---- temp = copy_to_reg (temp); mem = gen_rtx (MEM, GET_MODE (x), temp); ! ! /* Mark returned memref with in_struct if it's in an array or ! structure. Copy const and volatile from original memref. */ ! ! MEM_IN_STRUCT_P (mem) = MEM_IN_STRUCT_P (x) || GET_CODE (addr) == PLUS; ! RTX_UNCHANGING_P (mem) = RTX_UNCHANGING_P (x); ! MEM_VOLATILE_P (mem) = MEM_VOLATILE_P (x); return mem; } *************** *** 578,588 **** /* Copy X to TARGET (if it's nonzero and a reg) or to a new temp reg and return that reg. - If we need to make a temp reg, try getting the mode from - both X and TARGET. */ - rtx ! copy_to_suggested_reg (x, target) rtx x, target; { register rtx temp; --- 582,591 ---- /* Copy X to TARGET (if it's nonzero and a reg) or to a new temp reg and return that reg. + MODE is the mode to use for X in case it is a constant. */ rtx ! copy_to_suggested_reg (x, target, mode) rtx x, target; + enum machine_mode mode; { register rtx temp; *************** *** 591,602 **** temp = target; else ! { ! enum machine_mode mode = GET_MODE (x); ! ! if (mode == VOIDmode && target != 0) ! mode = GET_MODE (target); ! ! temp = gen_reg_rtx (mode); ! } emit_move_insn (temp, x); --- 594,598 ---- temp = target; else ! temp = gen_reg_rtx (mode); emit_move_insn (temp, x); diff -rc2N gcc-2.0/expmed.c gcc-2.1/expmed.c *** gcc-2.0/expmed.c Tue Feb 18 01:03:13 1992 --- gcc-2.1/expmed.c Sun Mar 22 21:16:03 1992 *************** *** 76,82 **** negate_cost = rtx_cost (gen_rtx (NEG, word_mode, reg)); mult_is_very_cheap = (rtx_cost (gen_rtx (MULT, word_mode, reg, ! gen_rtx (CONST_INT, VOIDmode, 128))) < rtx_cost (gen_rtx (LSHIFT, word_mode, reg, gen_rtx (CONST_INT, VOIDmode, 7)))); --- 76,83 ---- negate_cost = rtx_cost (gen_rtx (NEG, word_mode, reg)); + /* 999999 is chosen to avoid any plausible faster special case. */ mult_is_very_cheap = (rtx_cost (gen_rtx (MULT, word_mode, reg, ! gen_rtx (CONST_INT, VOIDmode, 999999))) < rtx_cost (gen_rtx (LSHIFT, word_mode, reg, gen_rtx (CONST_INT, VOIDmode, 7)))); *************** *** 91,97 **** { lea = gen_rtx (SET, VOIDmode, reg, ! gen_rtx (PLUS, word_mode, reg, gen_rtx (MULT, word_mode, reg, ! gen_rtx (CONST_INT, VOIDmode, i)))); /* Using 0 as second argument is not quite right, but what else is there to do? */ --- 92,99 ---- { lea = gen_rtx (SET, VOIDmode, reg, ! gen_rtx (PLUS, word_mode, gen_rtx (MULT, word_mode, reg, ! gen_rtx (CONST_INT, VOIDmode, i)), ! reg)); /* Using 0 as second argument is not quite right, but what else is there to do? */ *************** *** 1457,1461 **** } ! /* Subtract INC from TARGET. */ void --- 1459,1463 ---- } ! /* Subtract DEC from TARGET. */ void *************** *** 2247,2251 **** if (! can_clobber_op0) { ! adjusted_op0 = copy_to_suggested_reg (adjusted_op0, target); /* Copy op0 to a reg, since emit_cmp_insn will call emit_queue which will screw up mem refs for autoincrements. */ --- 2249,2254 ---- if (! can_clobber_op0) { ! adjusted_op0 = copy_to_suggested_reg (adjusted_op0, target, ! compute_mode); /* Copy op0 to a reg, since emit_cmp_insn will call emit_queue which will screw up mem refs for autoincrements. */ *************** *** 2267,2271 **** if (! can_clobber_op0) { ! adjusted_op0 = copy_to_suggested_reg (adjusted_op0, target); /* Copy op0 to a reg, since emit_cmp_insn will call emit_queue which will screw up mem refs for autoincrements. */ --- 2270,2275 ---- if (! can_clobber_op0) { ! adjusted_op0 = copy_to_suggested_reg (adjusted_op0, target, ! compute_mode); /* Copy op0 to a reg, since emit_cmp_insn will call emit_queue which will screw up mem refs for autoincrements. */ *************** *** 2285,2289 **** if (! can_clobber_op0) { ! adjusted_op0 = copy_to_suggested_reg (adjusted_op0, target); /* Copy op0 to a reg, since emit_cmp_insn will call emit_queue which will screw up mem refs for autoincrements. */ --- 2289,2294 ---- if (! can_clobber_op0) { ! adjusted_op0 = copy_to_suggested_reg (adjusted_op0, target, ! compute_mode); /* Copy op0 to a reg, since emit_cmp_insn will call emit_queue which will screw up mem refs for autoincrements. */ *************** *** 2317,2321 **** if (! can_clobber_op0) { ! adjusted_op0 = copy_to_suggested_reg (adjusted_op0, target); /* Copy op0 to a reg, since emit_cmp_insn will call emit_queue which will screw up mem refs for autoincrements. */ --- 2322,2327 ---- if (! can_clobber_op0) { ! adjusted_op0 = copy_to_suggested_reg (adjusted_op0, target, ! compute_mode); /* Copy op0 to a reg, since emit_cmp_insn will call emit_queue which will screw up mem refs for autoincrements. */ *************** *** 2545,2549 **** tree type = type_for_mode (mode, unsignedp); tree add_type = (GET_MODE (add) == VOIDmode ! ? type : type_for_mode (GET_MODE (add))); tree result = fold (build (PLUS_EXPR, type, fold (build (MULT_EXPR, type, --- 2551,2555 ---- tree type = type_for_mode (mode, unsignedp); tree add_type = (GET_MODE (add) == VOIDmode ! ? type : type_for_mode (GET_MODE (add), unsignedp)); tree result = fold (build (PLUS_EXPR, type, fold (build (MULT_EXPR, type, *************** *** 2885,2889 **** Two operations that can do the above actions are ABS and FFS, so try them. If that doesn't work, and MODE is smaller than a full word, ! we can use zero-extention to the wider mode (an unsigned conversion) as the operation. */ --- 2891,2895 ---- Two operations that can do the above actions are ABS and FFS, so try them. If that doesn't work, and MODE is smaller than a full word, ! we can use zero-extension to the wider mode (an unsigned conversion) as the operation. */ *************** *** 2914,2917 **** --- 2920,2926 ---- if (tem == 0 && (code == NE || BRANCH_COST > 1)) { + if (rtx_equal_p (subtarget, op0)) + subtarget = 0; + tem = expand_unop (mode, neg_optab, op0, subtarget, 0); tem = expand_binop (mode, ior_optab, tem, op0, subtarget, 0, diff -rc2N gcc-2.0/expr.c gcc-2.1/expr.c *** gcc-2.0/expr.c Sat Feb 22 03:36:14 1992 --- gcc-2.1/expr.c Mon Mar 16 17:53:41 1992 *************** *** 115,118 **** --- 115,124 ---- #endif #endif + + /* SLOW_UNALIGNED_ACCESS is non-zero if unaligned accesses are very slow. */ + + #ifndef SLOW_UNALIGNED_ACCESS + #define SLOW_UNALIGNED_ACCESS 0 + #endif /* This is run at the start of compiling a function. */ *************** *** 127,130 **** --- 133,137 ---- cleanups_this_call = 0; saveregs_value = 0; + forced_labels = 0; } *************** *** 143,146 **** --- 150,154 ---- p->cleanups_this_call = cleanups_this_call; p->saveregs_value = saveregs_value; + p->forced_labels = forced_labels; pending_stack_adjust = 0; *************** *** 148,151 **** --- 156,160 ---- cleanups_this_call = 0; saveregs_value = 0; + forced_labels = 0; } *************** *** 161,164 **** --- 170,174 ---- cleanups_this_call = p->cleanups_this_call; saveregs_value = p->saveregs_value; + forced_labels = p->forced_labels; } *************** *** 391,395 **** abort (); ! emit_library_call (libcall, 0, to_mode, 1, from, from_mode); emit_move_insn (to, hard_libcall_value (to_mode)); return; --- 401,405 ---- abort (); ! emit_library_call (libcall, 1, to_mode, 1, from, from_mode); emit_move_insn (to, hard_libcall_value (to_mode)); return; *************** *** 754,758 **** struct move_by_pieces data; rtx to_addr = XEXP (to, 0), from_addr = XEXP (from, 0); ! int max_size = 10000; data.offset = 0; --- 764,768 ---- struct move_by_pieces data; rtx to_addr = XEXP (to, 0), from_addr = XEXP (from, 0); ! int max_size = MOVE_MAX + 1; data.offset = 0; *************** *** 820,829 **** } ! #if defined (STRICT_ALIGNMENT) || defined (SLOW_UNALIGNED_ACCESS) ! if (align > MOVE_MAX || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT) align = MOVE_MAX; - #else - align = MOVE_MAX; - #endif /* First move what we can in the largest integer mode, then go to --- 830,836 ---- } ! if (! (STRICT_ALIGNMENT || SLOW_UNALIGNED_ACCESS) ! || align > MOVE_MAX || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT) align = MOVE_MAX; /* First move what we can in the largest integer mode, then go to *************** *** 867,878 **** { register int n_insns = 0; ! int max_size = 10000; ! #if defined (STRICT_ALIGNMENT) || defined (SLOW_UNALIGNED_ACCESS) ! if (align > MOVE_MAX || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT) align = MOVE_MAX; - #else - align = MOVE_MAX; - #endif while (max_size > 1) --- 874,882 ---- { register int n_insns = 0; ! int max_size = MOVE_MAX + 1; ! if (! (STRICT_ALIGNMENT || SLOW_UNALIGNED_ACCESS) ! || align > MOVE_MAX || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT) align = MOVE_MAX; while (max_size > 1) *************** *** 931,939 **** #ifdef HAVE_PRE_DECREMENT if (data->explicit_inc_to < 0) ! emit_insn (gen_sub2_insn (data->to_addr, ! gen_rtx (CONST_INT, VOIDmode, size))); if (data->explicit_inc_from < 0) ! emit_insn (gen_sub2_insn (data->from_addr, ! gen_rtx (CONST_INT, VOIDmode, size))); #endif --- 935,943 ---- #ifdef HAVE_PRE_DECREMENT if (data->explicit_inc_to < 0) ! emit_insn (gen_add2_insn (data->to_addr, ! gen_rtx (CONST_INT, VOIDmode, -size))); if (data->explicit_inc_from < 0) ! emit_insn (gen_add2_insn (data->from_addr, ! gen_rtx (CONST_INT, VOIDmode, -size))); #endif *************** *** 1051,1055 **** #ifdef TARGET_MEM_FUNCTIONS ! emit_library_call (memcpy_libfunc, 0, VOIDmode, 3, XEXP (x, 0), Pmode, XEXP (y, 0), Pmode, --- 1055,1059 ---- #ifdef TARGET_MEM_FUNCTIONS ! emit_library_call (memcpy_libfunc, 1, VOIDmode, 3, XEXP (x, 0), Pmode, XEXP (y, 0), Pmode, *************** *** 1056,1060 **** size, Pmode); #else ! emit_library_call (bcopy_libfunc, 0, VOIDmode, 3, XEXP (y, 0), Pmode, XEXP (x, 0), Pmode, --- 1060,1064 ---- size, Pmode); #else ! emit_library_call (bcopy_libfunc, 1, VOIDmode, 3, XEXP (y, 0), Pmode, XEXP (x, 0), Pmode, *************** *** 1160,1164 **** { #ifdef TARGET_MEM_FUNCTIONS ! emit_library_call (memset_libfunc, 0, VOIDmode, 3, XEXP (object, 0), Pmode, const0_rtx, Pmode, --- 1164,1168 ---- { #ifdef TARGET_MEM_FUNCTIONS ! emit_library_call (memset_libfunc, 1, VOIDmode, 3, XEXP (object, 0), Pmode, const0_rtx, Pmode, *************** *** 1165,1169 **** gen_rtx (CONST_INT, VOIDmode, size), Pmode); #else ! emit_library_call (bzero_libfunc, 0, VOIDmode, 2, XEXP (object, 0), Pmode, --- 1169,1173 ---- gen_rtx (CONST_INT, VOIDmode, size), Pmode); #else ! emit_library_call (bzero_libfunc, 1, VOIDmode, 2, XEXP (object, 0), Pmode, *************** *** 1412,1422 **** && (move_by_pieces_ninsns ((unsigned) INTVAL (size) - used, align) < MOVE_RATIO) - #if defined (STRICT_ALIGNMENT) || defined (SLOW_UNALIGNED_ACCESS) /* Here we avoid the case of a structure whose weak alignment forces many pushes of a small amount of data, and such small pushes do rounding that causes trouble. */ ! && (align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT || PUSH_ROUNDING (align) == align) - #endif && PUSH_ROUNDING (INTVAL (size)) == INTVAL (size)) { --- 1416,1425 ---- && (move_by_pieces_ninsns ((unsigned) INTVAL (size) - used, align) < MOVE_RATIO) /* Here we avoid the case of a structure whose weak alignment forces many pushes of a small amount of data, and such small pushes do rounding that causes trouble. */ ! && ((! STRICT_ALIGNMENT && ! SLOW_UNALIGNED_ACCESS) ! || align >= BIGGEST_ALIGNMENT / BITS_PER_UNIT || PUSH_ROUNDING (align) == align) && PUSH_ROUNDING (INTVAL (size)) == INTVAL (size)) { *************** *** 1535,1543 **** NO_DEFER_POP; #ifdef TARGET_MEM_FUNCTIONS ! emit_library_call (memcpy_libfunc, 0, VOIDmode, 3, temp, Pmode, XEXP (xinner, 0), Pmode, size, Pmode); #else ! emit_library_call (bcopy_libfunc, 0, VOIDmode, 3, XEXP (xinner, 0), Pmode, temp, Pmode, size, Pmode); --- 1538,1546 ---- NO_DEFER_POP; #ifdef TARGET_MEM_FUNCTIONS ! emit_library_call (memcpy_libfunc, 1, VOIDmode, 3, temp, Pmode, XEXP (xinner, 0), Pmode, size, Pmode); #else ! emit_library_call (bcopy_libfunc, 1, VOIDmode, 3, XEXP (xinner, 0), Pmode, temp, Pmode, size, Pmode); *************** *** 1975,1979 **** #ifdef TARGET_MEM_FUNCTIONS ! emit_library_call (memcpy_libfunc, 0, VOIDmode, 3, XEXP (to_rtx, 0), Pmode, XEXP (from_rtx, 0), Pmode, --- 1978,1982 ---- #ifdef TARGET_MEM_FUNCTIONS ! emit_library_call (memcpy_libfunc, 1, VOIDmode, 3, XEXP (to_rtx, 0), Pmode, XEXP (from_rtx, 0), Pmode, *************** *** 1980,1984 **** size, Pmode); #else ! emit_library_call (bcopy_libfunc, 0, VOIDmode, 3, XEXP (from_rtx, 0), Pmode, XEXP (to_rtx, 0), Pmode, --- 1983,1987 ---- size, Pmode); #else ! emit_library_call (bcopy_libfunc, 1, VOIDmode, 3, XEXP (from_rtx, 0), Pmode, XEXP (to_rtx, 0), Pmode, *************** *** 2121,2140 **** rtx size; ! emit_block_move (target, temp, ! gen_rtx (CONST_INT, VOIDmode, ! TREE_STRING_LENGTH (exp)), ! TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT); ! ! temp = plus_constant (XEXP (target, 0), TREE_STRING_LENGTH (exp)); ! size = plus_constant (expr_size (exp), - TREE_STRING_LENGTH (exp)); ! if (size != const0_rtx) { #ifdef TARGET_MEM_FUNCTIONS ! emit_library_call (memset_libfunc, 0, VOIDmode, 3, ! temp, Pmode, const0_rtx, Pmode, size, Pmode); #else ! emit_library_call (bzero_libfunc, 0, VOIDmode, 2, ! temp, Pmode, size, Pmode); #endif } } --- 2124,2189 ---- rtx size; ! /* Get the size of the data type of the string, ! which is actually the size of the target. */ ! size = expr_size (exp); ! if (GET_CODE (size) == CONST_INT ! && INTVAL (size) < TREE_STRING_LENGTH (exp)) ! emit_block_move (target, temp, size, ! TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT); ! else { + /* Compute the size of the data to copy from the string. */ + tree copy_size + = fold (build (MIN_EXPR, sizetype, + size_binop (CEIL_DIV_EXPR, + TYPE_SIZE (TREE_TYPE (exp)), + size_int (BITS_PER_UNIT)), + convert (sizetype, + build_int_2 (TREE_STRING_LENGTH (exp), 0)))); + rtx copy_size_rtx = expand_expr (copy_size, 0, VOIDmode, 0); + rtx label = 0; + + /* Copy that much. */ + emit_block_move (target, temp, copy_size_rtx, + TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT); + + /* Figure out how much is left in TARGET + that we have to clear. */ + if (GET_CODE (copy_size_rtx) == CONST_INT) + { + temp = plus_constant (XEXP (target, 0), + TREE_STRING_LENGTH (exp)); + size = plus_constant (size, + - TREE_STRING_LENGTH (exp)); + } + else + { + enum machine_mode size_mode = Pmode; + + temp = force_reg (Pmode, XEXP (target, 0)); + temp = expand_binop (size_mode, add_optab, temp, + copy_size_rtx, 0, 0, OPTAB_LIB_WIDEN); + + size = expand_binop (size_mode, sub_optab, size, + copy_size_rtx, 0, 0, OPTAB_LIB_WIDEN); + + emit_cmp_insn (size, const0_rtx, LT, 0, + GET_MODE (size), 0, 0); + label = gen_label_rtx (); + emit_jump_insn (gen_blt (label)); + } + + if (size != const0_rtx) + { #ifdef TARGET_MEM_FUNCTIONS ! emit_library_call (memset_libfunc, 1, VOIDmode, 3, ! temp, Pmode, const0_rtx, Pmode, size, Pmode); #else ! emit_library_call (bzero_libfunc, 1, VOIDmode, 2, ! temp, Pmode, size, Pmode); #endif + } + if (label) + emit_label (label); } } *************** *** 3509,3522 **** op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, modifier); op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, modifier); ! /* Put a sum last, to simplify what follows. */ ! #ifdef OLD_INDEXING ! if (GET_CODE (op1) == MULT) ! { ! temp = op0; ! op0 = op1; ! op1 = temp; ! } ! #endif ! #ifndef OLD_INDEXING /* Make sure any term that's a sum with a constant comes last. */ if (GET_CODE (op0) == PLUS --- 3558,3562 ---- op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, modifier); op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, modifier); ! /* Make sure any term that's a sum with a constant comes last. */ if (GET_CODE (op0) == PLUS *************** *** 3532,3558 **** && CONSTANT_P (XEXP (op1, 1))) { ! rtx tem; ! int constant_term = 0; - op0 = gen_rtx (PLUS, mode, XEXP (op1, 0), op0); /* Let's also eliminate constants from op0 if possible. */ ! tem = eliminate_constant_term (op0, &constant_term); ! if (GET_CODE (XEXP (op1, 1)) == CONST_INT) ! { ! if (constant_term != 0) ! return plus_constant (tem, INTVAL (XEXP (op1, 1)) + constant_term); ! else ! return plus_constant (op0, INTVAL (XEXP (op1, 1))); ! } else ! return gen_rtx (PLUS, mode, op0, XEXP (op1, 1)); } ! #endif ! /* Put a constant term last. */ ! if (CONSTANT_P (op0)) ! return gen_rtx (PLUS, mode, op1, op0); ! else ! return gen_rtx (PLUS, mode, op0, op1); case MINUS_EXPR: /* Handle difference of two symbolic constants, --- 3572,3605 ---- && CONSTANT_P (XEXP (op1, 1))) { ! rtx constant_term = const0_rtx; ! ! temp = simplify_binary_operation (PLUS, mode, XEXP (op1, 0), op0); ! if (temp != 0) ! op0 = temp; ! else ! op0 = gen_rtx (PLUS, mode, XEXP (op1, 0), op0); /* Let's also eliminate constants from op0 if possible. */ ! op0 = eliminate_constant_term (op0, &constant_term); ! ! /* CONSTANT_TERM and XEXP (op1, 1) are known to be constant, so ! their sum should be a constant. Form it into OP1, since the ! result we want will then be OP0 + OP1. */ ! ! temp = simplify_binary_operation (PLUS, mode, constant_term, ! XEXP (op1, 1)); ! if (temp != 0) ! op1 = temp; else ! op1 = gen_rtx (PLUS, mode, constant_term, XEXP (op1, 1)); } ! ! /* Put a constant term last and put a multiplication first. */ ! if (CONSTANT_P (op0) || GET_CODE (op1) == MULT) ! temp = op1, op1 = op0, op0 = temp; + temp = simplify_binary_operation (PLUS, mode, op0, op1); + return temp ? temp : gen_rtx (PLUS, mode, op0, op1); + case MINUS_EXPR: /* Handle difference of two symbolic constants, *************** *** 4427,4432 **** } ! /* Return the alignment of EXP, a pointer valued expression for the mem* ! builtin functions. Alignments greater than MAX_ALIGN are not significant. The alignment returned is, by default, the alignment of the thing that EXP points to (if it is not a POINTER_TYPE, 0 is returned). --- 4474,4479 ---- } ! /* Return the alignment in bits of EXP, a pointer valued expression. ! But don't return more than MAX_ALIGN no matter what. The alignment returned is, by default, the alignment of the thing that EXP points to (if it is not a POINTER_TYPE, 0 is returned). *************** *** 4470,4475 **** return align; ! while ((TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)) ! & (max_align - 1)) != 0) max_align >>= 1; --- 4517,4523 ---- return align; ! while (((TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)) * BITS_PER_UNIT) ! & (max_align - 1)) ! != 0) max_align >>= 1; *************** *** 4628,4631 **** --- 4676,4700 ---- abort (); + case BUILT_IN_FSQRT: + /* If not optimizing, call the library function. */ + if (!optimize) + break; + + if (arglist == 0 + /* Arg could be non-integer if user redeclared this fcn wrong. */ + || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != REAL_TYPE) + return const0_rtx; + + /* Compute the argument. */ + op0 = expand_expr (TREE_VALUE (arglist), subtarget, VOIDmode, 0); + /* Compute sqrt, into TARGET if possible. + Set TARGET to wherever the result comes back. */ + target = expand_unop (TYPE_MODE (TREE_TYPE (TREE_VALUE (arglist))), + sqrt_optab, op0, target, 1); + if (target == 0) + break; + return target; + + case BUILT_IN_SAVEREGS: /* Don't do __builtin_saveregs more than once in a function. *************** *** 5152,5160 **** Note whether OP0 is the actual lvalue or a copy of it: I believe it is a copy iff it is a register and insns were ! generated in computing it. */ temp = get_last_insn (); op0 = expand_expr (incremented, 0, VOIDmode, 0); ! if (temp != get_last_insn ()) ! op0_is_copy = (GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG); op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0); --- 5221,5230 ---- Note whether OP0 is the actual lvalue or a copy of it: I believe it is a copy iff it is a register and insns were ! generated in computing it or if it is a SUBREG (generated when ! the low-order field in a register was referenced). */ temp = get_last_insn (); op0 = expand_expr (incremented, 0, VOIDmode, 0); ! op0_is_copy = (GET_CODE (op0) == SUBREG ! || (GET_CODE (op0) == REG && temp != get_last_insn ())); op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0); *************** *** 5320,5325 **** { #ifdef EXIT_IGNORE_STACK ! if (!flag_omit_frame_pointer && EXIT_IGNORE_STACK ! && ! (TREE_INLINE (current_function_decl) && optimize) && ! flag_inline_functions) pending_stack_adjust = 0; --- 5390,5395 ---- { #ifdef EXIT_IGNORE_STACK ! if (! flag_omit_frame_pointer && EXIT_IGNORE_STACK ! && ! (TREE_INLINE (current_function_decl) && ! flag_no_inline) && ! flag_inline_functions) pending_stack_adjust = 0; *************** *** 6006,6019 **** arg1 = TREE_OPERAND (arg1, 0); - /* Put a constant second. */ - if (TREE_CODE (arg0) == REAL_CST || TREE_CODE (arg0) == INTEGER_CST) - { - tem = arg0; arg0 = arg1; arg1 = tem; - } - /* Get the rtx comparison code to use. We know that EXP is a comparison operation of some type. Some comparisons against 1 and -1 can be converted to comparisons with zero. Do so here so that the tests ! below will be aware that we have a comparison with zero. */ switch (TREE_CODE (exp)) --- 6076,6085 ---- arg1 = TREE_OPERAND (arg1, 0); /* Get the rtx comparison code to use. We know that EXP is a comparison operation of some type. Some comparisons against 1 and -1 can be converted to comparisons with zero. Do so here so that the tests ! below will be aware that we have a comparison with zero. These ! tests will not catch constants in the first operand, but constants ! are rarely passed as the first operand. */ switch (TREE_CODE (exp)) *************** *** 6053,6056 **** --- 6119,6129 ---- } + /* Put a constant second. */ + if (TREE_CODE (arg0) == REAL_CST || TREE_CODE (arg0) == INTEGER_CST) + { + tem = arg0; arg0 = arg1; arg1 = tem; + code = swap_condition (code); + } + /* If this is an equality or inequality test of a single bit, we can do this by shifting the bit being tested to the low-order bit and *************** *** 6160,6163 **** --- 6233,6237 ---- /* INDEX is the value being switched on, with the lowest value in the table already subtracted. + MODE is its expected mode (needed if INDEX is ever constant). RANGE is the length of the jump table. TABLE_LABEL is a CODE_LABEL rtx for the table itself. *************** *** 6167,6176 **** void ! do_tablejump (index, range, table_label, default_label) rtx index, range, table_label, default_label; { register rtx temp, vector; ! emit_cmp_insn (range, index, LTU, 0, GET_MODE (index), 0, 0); emit_jump_insn (gen_bltu (default_label)); /* If flag_force_addr were to affect this address --- 6241,6256 ---- void ! do_tablejump (index, mode, range, table_label, default_label) rtx index, range, table_label, default_label; + enum machine_mode mode; { register rtx temp, vector; ! /* Code below assumes that MODE is Pmode, ! but I think that is a mistake. Let's see if that is true. */ ! if (mode != Pmode) ! abort (); ! ! emit_cmp_insn (range, index, LTU, 0, mode, 0, 0); emit_jump_insn (gen_bltu (default_label)); /* If flag_force_addr were to affect this address diff -rc2N gcc-2.0/expr.h gcc-2.1/expr.h *** gcc-2.0/expr.h Tue Feb 4 14:21:39 1992 --- gcc-2.1/expr.h Fri Mar 13 14:13:44 1992 *************** *** 203,214 **** register. */ - #ifdef STRICT_ALIGNMENT #define MUST_PASS_IN_STACK_BAD_ALIGN(MODE,TYPE) \ ! (MODE == BLKmode \ && TYPE_ALIGN (TYPE) < (BIGGEST_ALIGNMENT < BITS_PER_WORD \ ? BIGGEST_ALIGNMENT : BITS_PER_WORD)) - #else - #define MUST_PASS_IN_STACK_BAD_ALIGN(MODE,TYPE) 0 - #endif /* Which padding can't be supported depends on the byte endianness. */ --- 203,210 ---- register. */ #define MUST_PASS_IN_STACK_BAD_ALIGN(MODE,TYPE) \ ! (STRICT_ALIGNMENT && MODE == BLKmode \ && TYPE_ALIGN (TYPE) < (BIGGEST_ALIGNMENT < BITS_PER_WORD \ ? BIGGEST_ALIGNMENT : BITS_PER_WORD)) /* Which padding can't be supported depends on the byte endianness. */ *************** *** 324,327 **** --- 320,324 ---- extern optab one_cmpl_optab; /* Bitwise not */ extern optab ffs_optab; /* Find first bit set */ + extern optab sqrt_optab; /* Square root */ /* Passed to expand_binop and expand_unop to say which options to try to use diff -rc2N gcc-2.0/extend.texi gcc-2.1/extend.texi *** gcc-2.0/extend.texi Sat Feb 8 15:21:36 1992 --- gcc-2.1/extend.texi Thu Feb 27 07:45:33 1992 *************** *** 523,527 **** This is quite different from what @code{(int)f = 1} would do---that would convert 1 to floating point and store it. Rather than cause this ! inconsistancy, we think it is better to prohibit use of @samp{&} on a cast. If you really do want an @code{int *} pointer with the address of --- 523,527 ---- This is quite different from what @code{(int)f = 1} would do---that would convert 1 to floating point and store it. Rather than cause this ! inconsistency, we think it is better to prohibit use of @samp{&} on a cast. If you really do want an @code{int *} pointer with the address of diff -rc2N gcc-2.0/final.c gcc-2.1/final.c *** gcc-2.0/final.c Sat Feb 8 18:20:40 1992 --- gcc-2.1/final.c Mon Mar 23 14:26:40 1992 *************** *** 64,69 **** /* Get N_SLINE and N_SOL from stab.h if we can expect the file to exist. */ ! #ifdef DBX_DEBUGGING_INFO ! #ifdef USG #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */ #else --- 64,69 ---- /* Get N_SLINE and N_SOL from stab.h if we can expect the file to exist. */ ! #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) ! #if defined (USG) || defined (NO_STAB_H) #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */ #else *************** *** 70,74 **** #include /* On BSD, use the system's stab.h. */ #endif /* not USG */ ! #endif /* DBX_DEBUGGING_INFO */ /* .stabd code for line number. */ --- 70,78 ---- #include /* On BSD, use the system's stab.h. */ #endif /* not USG */ ! #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */ ! ! #ifdef XCOFF_DEBUGGING_INFO ! #include "xcoffout.h" ! #endif /* .stabd code for line number. */ *************** *** 527,531 **** as the maximum branch anyway). So we only have to handle normal insns (actually, reorg never puts ASM insns in a delay slot, but ! we don't take advantage of that knowlege here). */ for (i = 0; i < XVECLEN (body, 0); i++) { --- 531,535 ---- as the maximum branch anyway). So we only have to handle normal insns (actually, reorg never puts ASM insns in a delay slot, but ! we don't take advantage of that knowledge here). */ for (i = 0; i < XVECLEN (body, 0); i++) { *************** *** 653,656 **** --- 657,667 ---- and other compilers don't do it.) */ last_linenum = NOTE_LINE_NUMBER (first); + #ifdef XCOFF_DEBUGGING_INFO + else if (write_symbols == XCOFF_DEBUG) + { + last_linenum = NOTE_LINE_NUMBER (first); + xcoffout_output_first_source_line (file, last_linenum); + } + #endif else output_source_line (file, first); *************** *** 674,679 **** #endif ! #ifdef SDB_DEBUGGING_INFO ! if (write_symbols == SDB_DEBUG) next_block_index = 1; #endif --- 685,690 ---- #endif ! #if defined (SDB_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) ! if (write_symbols == SDB_DEBUG || write_symbols == XCOFF_DEBUG) next_block_index = 1; #endif *************** *** 777,780 **** --- 788,796 ---- #endif + #ifdef XCOFF_DEBUGGING_INFO + if (write_symbols == XCOFF_DEBUG) + xcoffout_end_function (file, last_linenum); + #endif + #ifdef FUNCTION_EPILOGUE /* Finally, output the function epilogue: *************** *** 793,796 **** --- 809,817 ---- #endif + #ifdef XCOFF_DEBUGGING_INFO + if (write_symbols == XCOFF_DEBUG) + xcoffout_end_epilogue (file); + #endif + /* If FUNCTION_EPILOGUE is not defined, then the function body itself contains return instructions wherever needed. */ *************** *** 914,917 **** --- 935,942 ---- sdbout_begin_function (last_linenum); #endif + #ifdef XCOFF_DEBUGGING_INFO + if (write_symbols == XCOFF_DEBUG) + xcoffout_begin_function (file, last_linenum); + #endif break; } *************** *** 946,949 **** --- 971,978 ---- sdbout_begin_block (file, last_linenum, next_block_index); #endif + #ifdef XCOFF_DEBUGGING_INFO + if (write_symbols == XCOFF_DEBUG) + xcoffout_begin_block (file, last_linenum, next_block_index); + #endif #ifdef DBX_DEBUGGING_INFO if (write_symbols == DBX_DEBUG) *************** *** 966,969 **** --- 995,1002 ---- --block_depth; + #ifdef XCOFF_DEBUGGING_INFO + if (write_symbols == XCOFF_DEBUG && block_depth >= 0) + xcoffout_end_block (file, last_linenum, pending_blocks[block_depth]); + #endif #ifdef DBX_DEBUGGING_INFO if (write_symbols == DBX_DEBUG && block_depth >= 0) *************** *** 1564,1569 **** #endif ! #ifdef DBX_DEBUGGING_INFO ! if (write_symbols == DBX_DEBUG) { dbxout_source_file (file, filename); --- 1597,1602 ---- #endif ! #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) ! if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG) { dbxout_source_file (file, filename); *************** *** 1576,1580 **** #endif } ! #endif /* DBX_DEBUGGING_INFO */ #ifdef DWARF_DEBUGGING_INFO --- 1609,1613 ---- #endif } ! #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */ #ifdef DWARF_DEBUGGING_INFO *************** *** 2083,2086 **** --- 2116,2120 ---- %U prints the value of USER_LABEL_PREFIX. %I prints the value of IMMEDIATE_PREFIX. + %O runs ASM_OUTPUT_OPCODE to transform what follows in the string. Also supported are %d, %x, %s, %e, %f, %g and %%. */ *************** *** 2139,2142 **** --- 2173,2182 ---- break; + case 'O': + #ifdef ASM_OUTPUT_OPCODE + ASM_OUTPUT_OPCODE (asm_out_file, p); + #endif + break; + case 'R': #ifdef REGISTER_PREFIX *************** *** 2346,2350 **** newreg = REGNO (in_rtx); ! /* Don't try to renumber pseudo regs. It is possible for a psuedo reg to reach here as part of a REG_NOTE. */ if (newreg >= FIRST_PSEUDO_REGISTER) --- 2386,2390 ---- newreg = REGNO (in_rtx); ! /* Don't try to renumber pseudo regs. It is possible for a pseudo reg to reach here as part of a REG_NOTE. */ if (newreg >= FIRST_PSEUDO_REGISTER) diff -rc2N gcc-2.0/fixinc.svr4 gcc-2.1/fixinc.svr4 *** gcc-2.0/fixinc.svr4 Tue Feb 11 22:11:45 1992 --- gcc-2.1/fixinc.svr4 Tue Mar 17 18:43:07 1992 *************** *** 61,65 **** echo 'Building fixincludes in ' ${LIB} ! # Determine whether this system has symbolic links. if ln -s X $LIB/ShouldNotExist 2>/dev/null; then rm -f $LIB/ShouldNotExist --- 61,65 ---- echo 'Building fixincludes in ' ${LIB} ! # Determine whether this filesystem has symbolic links. if ln -s X $LIB/ShouldNotExist 2>/dev/null; then rm -f $LIB/ShouldNotExist *************** *** 149,154 **** # applies to bit fields. sed -e ' ! s%^[ ]*#else[ ][ ]*\([^/ ].*\)%#else /* \1 */% ! s%^[ ]*#endif[ ][ ]*\([^/ ].*\)%#endif /* \1 */% s/#lint(on)/defined(lint)/g s/#lint(off)/!defined(lint)/g --- 149,154 ---- # applies to bit fields. sed -e ' ! s%^\([ ]*#[ ]*endif[ ]*\)\([^/ ].*\)$%\1/* \2 */% ! s%^\([ ]*#[ ]*else[ ]*\)\([^/ ].*\)$%\1/* \2 */% s/#lint(on)/defined(lint)/g s/#lint(off)/!defined(lint)/g *************** *** 156,175 **** s/#system(\([^)]*\))/defined(__\1__)/g s/#cpu(\([^)]*\))/defined(__\1__)/g ! /#[a-z]*if.*[ (]m68k/ s/m68k/__m68k__/g ! /#[a-z]*if.*[ (]__i386/ s/__i386/__i386__/g ! /#[a-z]*if.*[ (]i386/ s/i386/__i386__/g ! /#[a-z]*if.*[ (]sparc/ s/sparc/__sparc__/g ! /#[a-z]*if.*[ (]mc68000/ s/mc68000/__mc68000__/g ! /#[a-z]*if.*[ (]vax/ s/vax/__vax__/g ! /#[a-z]*if.*[ (]sun3x/ s/sun3x/__sun3x__/g ! /#[a-z]*if.*[ (]sun3/ s/sun3/__sun3__/g ! /#[a-z]*if.*[ (]sun2/ s/sun2/__sun2__/g ! /#[a-z]*if.*[ (]sun4c/ s/sun4c/__sun4c__/g ! /#[a-z]*if.*[ (]sun4/ s/sun4/__sun4__/g ! /#[a-z]*if.*[ (]sun/ s/sun/__sun__/g ! /#[a-z]*if.*[ (]ns32000/ s/ns32000/__ns32000__/g ! /#[a-z]*if.*[ (]pyr/ s/pyr/__pyr__/g ! /#[a-z]*if.*[ (]is68k/ s/is68k/__is68k__/g ! /#[a-z]*if.*[ (]sun386/ s/sun386/__sun386__/g s/u_char\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/ s/u_short\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/ --- 156,170 ---- s/#system(\([^)]*\))/defined(__\1__)/g s/#cpu(\([^)]*\))/defined(__\1__)/g ! /#[a-z]*if.*[ (]m68k/ s/\([^_]\)m68k/\1__m68k__/g ! /#[a-z]*if.*[ (]__i386/ s/__i386/__i386__/g ! /#[a-z]*if.*[ (]i386/ s/\([^_]\)i386/\1__i386__/g ! /#[a-z]*if.*[ (]sparc/ s/\([^_]\)sparc/\1__sparc__/g ! /#[a-z]*if.*[ (]mc68000/ s/\([^_]\)mc68000/\1__mc68000__/g ! /#[a-z]*if.*[ (]vax/ s/\([^_]\)vax/\1__vax__/g ! /#[a-z]*if.*[ (]sun/ s/\([^_]\)\(sun[a-z0-9]*\)\([^a-z0-9_]\)/\1__\2__\3/g ! /#[a-z]*if.*[ (]sun/ s/\([^_]\)\(sun[a-z0-9]*\)$/\1__\2__/g ! /#[a-z]*if.*[ (]ns32000/ s/\([^_]\)ns32000/\1__ns32000__/g ! /#[a-z]*if.*[ (]pyr/ s/\([^_]\)pyr/\1__pyr__/g ! /#[a-z]*if.*[ (]is68k/ s/\([^_]\)is68k/\1__is68k__/g s/u_char\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/ s/u_short\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/ *************** *** 815,818 **** --- 810,884 ---- cp /tmp/$base ${LIB}/$file rm -f /tmp/$base + fi + fi + + # Sony NEWSOS 5.0 does not support the complete ANSI C standard. + + if [ -x /bin/sony ]; then + if /bin/sony; then + + # Change to not define __filbuf, __flsbuf, and __iob + + file=stdio.h + base=`basename $file` + if [ -r ${LIB}/$file ]; then + file_to_fix=${LIB}/$file + else + if [ -r ${INPUT}/$file ]; then + file_to_fix=${INPUT}/$file + else + file_to_fix="" + fi + fi + if [ \! -z "$file_to_fix" ]; then + echo Checking $file_to_fix + cp $file_to_fix /tmp/$base + chmod +w /tmp/$base + sed -e ' + s/__filbuf/_filbuf/g + s/__flsbuf/_flsbuf/g + s/__iob/_iob/g + ' /tmp/$base > /tmp/$base.sed + mv /tmp/$base.sed /tmp/$base + if cmp $file_to_fix /tmp/$base.sed >/dev/null 2>&1; then + echo No change needed in $file_to_fix + else + echo Fixed $file_to_fix + rm -f ${LIB}/$file + cp /tmp/$base ${LIB}/$file + fi + rm -f /tmp/$base + fi + + # Change to not define __ctype + + file=ctype.h + base=`basename $file` + if [ -r ${LIB}/$file ]; then + file_to_fix=${LIB}/$file + else + if [ -r ${INPUT}/$file ]; then + file_to_fix=${INPUT}/$file + else + file_to_fix="" + fi + fi + if [ \! -z "$file_to_fix" ]; then + echo Checking $file_to_fix + cp $file_to_fix /tmp/$base + chmod +w /tmp/$base + sed -e ' + s/__ctype/_ctype/g + ' /tmp/$base > /tmp/$base.sed + mv /tmp/$base.sed /tmp/$base + if cmp $file_to_fix /tmp/$base.sed >/dev/null 2>&1; then + echo No change needed in $file_to_fix + else + echo Fixed $file_to_fix + rm -f ${LIB}/$file + cp /tmp/$base ${LIB}/$file + fi + rm -f /tmp/$base + fi fi fi diff -rc2N gcc-2.0/fixincludes gcc-2.1/fixincludes *** gcc-2.0/fixincludes Sun Feb 16 22:43:11 1992 --- gcc-2.1/fixincludes Wed Mar 18 00:21:50 1992 *************** *** 3,8 **** # which are fixed to work correctly with ANSI C # and placed in a directory that GNU C will search. - # This works properly on a Sun in system version 3.4; - # for other versions, you had better check. # See README-fixinc for more information. --- 3,6 ---- *************** *** 46,54 **** echo 'Making directories:' cd ${INPUT} ! if $LINKS; then ! files=`ls -LR | sed -n s/:$//p` ! else ! files=`find . -type d -print | sed '/^.$/d'` ! fi for file in $files; do rm -rf $LIB/$file --- 44,50 ---- echo 'Making directories:' cd ${INPUT} ! # Find all directories and all symlinks that point to directories. ! files=` find . -type d -print | sed '/^.$/d' ! $LINKS && find . -type l -exec test -d '{}' \; -print` for file in $files; do rm -rf $LIB/$file *************** *** 113,118 **** --- 109,117 ---- # This call to egrep is essential, since checking a file with egrep # is much faster than actually trying to fix it. + # It is also essential that most files *not* match! + # Thus, matching every #endif is unacceptable. # But the argument to egrep must be kept small, or many versions of egrep # won't be able to handle it. + # rms: I removed `|#[el].*if.*[^/ ]' because it made egrep fail. if egrep '[ _]_IO|CTRL|#define.NULL|#[el]*if.*([0-9]|sparc|vax|sun|pyr)' $file > /dev/null; then echo Fixing $file *************** *** 121,124 **** --- 120,127 ---- || echo "Can't copy $file" chmod +w $2/$file + # Following two lines removed. + # s%^\([ ]*#[ ]*endif[ ]*\)\([^/ ].*\)$%\1/* \2 */% + # s%^\([ ]*#[ ]*else[ ]*\)\([^/ ].*\)$%\1/* \2 */% + sed -e ' :loop *************** *** 133,152 **** /#define._CTRL/ s/'\''c'\''/c/g /#define.BSD43_CTRL/ s/'\''c'\''/c/g ! /#[a-z]*if.*[ (]m68k/ s/m68k/__m68k__/g ! /#[a-z]*if.*[ (]__i386/ s/__i386/__i386__/g ! /#[a-z]*if.*[ (]i386/ s/i386/__i386__/g ! /#[a-z]*if.*[ (]sparc/ s/sparc/__sparc__/g ! /#[a-z]*if.*[ (]mc68000/ s/mc68000/__mc68000__/g ! /#[a-z]*if.*[ (]vax/ s/vax/__vax__/g ! /#[a-z]*if.*[ (]sun3x/ s/sun3x/__sun3x__/g ! /#[a-z]*if.*[ (]sun3/ s/sun3/__sun3__/g ! /#[a-z]*if.*[ (]sun2/ s/sun2/__sun2__/g ! /#[a-z]*if.*[ (]sun4c/ s/sun4c/__sun4c__/g ! /#[a-z]*if.*[ (]sun4/ s/sun4/__sun4__/g ! /#[a-z]*if.*[ (]sun/ s/sun/__sun__/g ! /#[a-z]*if.*[ (]ns32000/ s/ns32000/__ns32000__/g ! /#[a-z]*if.*[ (]pyr/ s/pyr/__pyr__/g ! /#[a-z]*if.*[ (]is68k/ s/is68k/__is68k__/g ! /#[a-z]*if.*[ (]sun386/ s/sun386/__sun386__/g /#define.NULL[ ]/ i\ #undef NULL --- 136,150 ---- /#define._CTRL/ s/'\''c'\''/c/g /#define.BSD43_CTRL/ s/'\''c'\''/c/g ! /#[a-z]*if.*[ (]m68k/ s/\([^_]\)m68k/\1__m68k__/g ! /#[a-z]*if.*[ (]__i386/ s/__i386/__i386__/g ! /#[a-z]*if.*[ (]i386/ s/\([^_]\)i386/\1__i386__/g ! /#[a-z]*if.*[ (]sparc/ s/\([^_]\)sparc/\1__sparc__/g ! /#[a-z]*if.*[ (]mc68000/ s/\([^_]\)mc68000/\1__mc68000__/g ! /#[a-z]*if.*[ (]vax/ s/\([^_]\)vax/\1__vax__/g ! /#[a-z]*if.*[ (]sun/ s/\([^_]\)\(sun[a-z0-9]*\)\([^a-z0-9_]\)/\1__\2__\3/g ! /#[a-z]*if.*[ (]sun/ s/\([^_]\)\(sun[a-z0-9]*\)$/\1__\2__/g ! /#[a-z]*if.*[ (]ns32000/ s/\([^_]\)ns32000/\1__ns32000__/g ! /#[a-z]*if.*[ (]pyr/ s/\([^_]\)pyr/\1__pyr__/g ! /#[a-z]*if.*[ (]is68k/ s/\([^_]\)is68k/\1__is68k__/g /#define.NULL[ ]/ i\ #undef NULL *************** *** 167,176 **** # Fix one other error in this file: a mismatched quote not inside a C comment. file=sundev/vuid_event.h ! if [ -r $file ]; then ! if [ ! -r ${LIB}/$file ]; then ! cp $file ${LIB}/$file >/dev/null 2>&1 \ ! || echo "Can't copy $file" ! chmod +w ${LIB}/$file ! fi fi --- 165,172 ---- # Fix one other error in this file: a mismatched quote not inside a C comment. file=sundev/vuid_event.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/sundev 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null fi *************** *** 188,208 **** # Fix this Sun file to avoid intefering with stddef.h. - file=sys/stdtypes.h ! if [ -r $file ]; then ! if [ ! -r ${LIB}/$file ]; then ! cp $file ${LIB}/$file >/dev/null 2>&1 \ ! || echo "Can't copy $file" ! chmod +w ${LIB}/$file ! fi fi if [ -r ${LIB}/$file ]; then ! echo Fixing $file comment ex ${LIB}/$file </dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null fi if [ -r ${LIB}/$file ]; then ! echo Fixing $file ex ${LIB}/$file </dev/null 2>&1 \ ! || echo "Can't copy $file" ! chmod +w ${LIB}/$file ! fi fi if [ -r ${LIB}/$file ]; then ! echo Fixing $file comment ex ${LIB}/$file </dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null fi if [ -r ${LIB}/$file ]; then ! echo Fixing $file ex ${LIB}/$file </dev/null 2>&1 \ ! || echo "Can't copy $file" ! chmod +w ${LIB}/$file ! fi fi --- 258,265 ---- # structure definition. file=rpcsvc/rstat.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/rpcsvc 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null fi *************** *** 293,302 **** # structure definition. file=netdnet/dnetdb.h ! if [ -r $file ]; then ! if [ ! -r ${LIB}/$file ]; then ! cp $file ${LIB}/$file >/dev/null 2>&1 \ ! || echo "Can't copy $file" ! chmod +w ${LIB}/$file ! fi fi --- 279,286 ---- # structure definition. file=netdnet/dnetdb.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/netdnet 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null fi *************** *** 314,326 **** # Check for bad #ifdef line (in Ultrix 4.1) - file=sys/file.h ! if [ -r $file ]; then ! if [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/rpcsvc 2>&- ! cp $file ${LIB}/$file >/dev/null 2>&1 \ ! || echo "Can't copy $file" ! chmod +w ${LIB}/$file ! fi fi --- 298,305 ---- # Check for bad #ifdef line (in Ultrix 4.1) file=sys/file.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null fi *************** *** 338,351 **** fi ! # Check for superfluous `static' (in Ultrix 4.2) file=machine/cpu.h ! if [ -r $file ]; then ! if [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/machine 2>&- ! cp $file ${LIB}/$file >/dev/null 2>&1 \ ! || echo "Can't copy $file" ! chmod +w ${LIB}/$file ! fi fi --- 317,344 ---- fi ! # Remove nested comments created by #endifs in a comment (Ultrix 4.1) ! # Only needed if commenting out junk after #endif. ! #file=signal.h ! #if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! # cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! # chmod +w ${LIB}/$file 2>/dev/null ! #fi ! # ! #if [ -r ${LIB}/$file ]; then ! # echo Fixing $file, nested comments ! # sed -e 's/#endif.*/#endif/' ${LIB}/$file > ${LIB}/${file}.sed ! # rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file ! # if cmp $file ${LIB}/$file >/dev/null 2>&1; then ! # echo Deleting ${LIB}/$file\; no fixes were needed. ! # rm -f ${LIB}/$file ! # fi ! #fi + # Check for superfluous `static' (in Ultrix 4.2) file=machine/cpu.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/machine 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null fi *************** *** 369,381 **** fi ! # Deal with yet another challenge, this in X11/Xmu.h file=X11/Xmu.h ! if [ -r $file ]; then ! if [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/X11 2>&- ! cp $file ${LIB}/$file >/dev/null 2>&1 \ ! || echo "Can't copy $file" ! chmod +w ${LIB}/$file ! fi fi --- 362,371 ---- fi ! # Incorrect sprintf declaration in X11/Xmu.h file=X11/Xmu.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/X11 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null fi *************** *** 397,417 **** # Check for missing ';' in struct - file=netinet/ip.h ! if [ -r $file ]; then ! if [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/netinet 2>&- ! sed -e '/^struct/,/^};/s/}$/};/' $file > ${LIB}/$file ! cmp $file ${LIB}/$file >/dev/null 2>&1 && rm -f ${LIB}/$file ! fi fi ! # Fix the CAT macro in memvar.h. file=pixrect/memvar.h ! if [ -r $file ]; then ! if [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/pixrect 2>&- ! sed -e '/^#define.CAT(a,b)/ i\ #ifdef __STDC__ \ #define CAT(a,b) a##b\ --- 387,418 ---- # Check for missing ';' in struct file=netinet/ip.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/netinet 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null fi ! if [ -r ${LIB}/$file ]; then ! echo Fixing $file ! sed -e '/^struct/,/^};/s/}$/};/' ${LIB}/$file > ${LIB}/${file}.sed ! rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file ! if cmp $file ${LIB}/$file >/dev/null 2>&1; then ! echo Deleting ${LIB}/$file\; no fixes were needed. ! rm -f ${LIB}/$file ! fi ! fi + # Fix the CAT macro in SunOS memvar.h. file=pixrect/memvar.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/pixrect 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null ! fi ! ! if [ -r ${LIB}/$file ]; then ! echo Fixing $file ! sed -e '/^#define.CAT(a,b)/ i\ #ifdef __STDC__ \ #define CAT(a,b) a##b\ *************** *** 419,424 **** /^#define.CAT(a,b)/ a\ #endif ! ' $file > ${LIB}/$file ! cmp $file ${LIB}/$file >/dev/null 2>&1 && rm -f ${LIB}/$file fi fi --- 420,428 ---- /^#define.CAT(a,b)/ a\ #endif ! ' ${LIB}/$file > ${LIB}/${file}.sed ! rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file ! if cmp $file ${LIB}/$file >/dev/null 2>&1; then ! echo Deleting ${LIB}/$file\; no fixes were needed. ! rm -f ${LIB}/$file fi fi *************** *** 425,435 **** # Check for yet more missing ';' in struct (in SunOS 4.0.x) - file=rpcsvc/rusers.h ! if [ -r $file ]; then ! if [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/rpcsvc 2>&- ! sed -e '/^struct/,/^};/s/_cnt$/_cnt;/' $file > ${LIB}/$file ! cmp $file ${LIB}/$file >/dev/null 2>&1 && rm -f ${LIB}/$file fi fi --- 429,446 ---- # Check for yet more missing ';' in struct (in SunOS 4.0.x) file=rpcsvc/rusers.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/rpcsvc 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null ! fi ! ! if [ -r ${LIB}/$file ]; then ! echo Fixing $file ! sed -e '/^struct/,/^};/s/_cnt$/_cnt;/' ${LIB}/$file > ${LIB}/${file}.sed ! rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file ! if cmp $file ${LIB}/$file >/dev/null 2>&1; then ! echo Deleting ${LIB}/$file\; no fixes were needed. ! rm -f ${LIB}/$file fi fi *************** *** 436,543 **** # Fix return type of exit and abort in on SunOS 4.1. - file=stdlib.h ! base=`basename $file` ! if [ -r ${LIB}/$file ]; then ! file_to_fix=${LIB}/$file ! else ! if [ -r ${INPUT}/$file ]; then ! file_to_fix=${INPUT}/$file ! else ! file_to_fix="" ! fi fi ! if [ \! -z "$file_to_fix" ]; then ! echo Checking $file_to_fix ! sed 's/int abort/void abort/g' $file_to_fix \ ! | sed 's/int exit/void exit/g' > /tmp/$base ! if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \ ! echo No change needed in $file_to_fix ! else ! echo Fixed $file_to_fix rm -f ${LIB}/$file - cp /tmp/$base ${LIB}/$file fi - rm -f /tmp/$base fi # Fix bogus comment in on SunOS 4.1. - file=locale.h ! base=`basename $file` ! if [ -r ${LIB}/$file ]; then ! file_to_fix=${LIB}/$file ! else ! if [ -r ${INPUT}/$file ]; then ! file_to_fix=${INPUT}/$file ! else ! file_to_fix="" ! fi fi ! if [ \! -z "$file_to_fix" ]; then ! echo Checking $file_to_fix ! sed 's%#endif / \*%#endif /\* %g' $file_to_fix > /tmp/$base ! if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \ ! echo No change needed in $file_to_fix ! else ! echo Fixed $file_to_fix rm -f ${LIB}/$file - cp /tmp/$base ${LIB}/$file fi - rm -f /tmp/$base fi # Fix bogus #ifdef in on SunOS 4.1. - file=hsfs/hsfs_spec.h ! base=`basename $file` if [ -r ${LIB}/$file ]; then ! file_to_fix=${LIB}/$file ! echo Checking $file_to_fix ! sed 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' $file_to_fix > /tmp/$base ! if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \ ! echo No change needed in $file_to_fix ! else ! echo Fixed $file_to_fix rm -f ${LIB}/$file - cp /tmp/$base ${LIB}/$file fi - rm -f /tmp/$base fi # Fix bogus #ifdef in on SunOS 4.1. - file=hsfs/hsnode.h ! base=`basename $file` if [ -r ${LIB}/$file ]; then ! file_to_fix=${LIB}/$file ! echo Checking $file_to_fix ! sed 's/\#ifdef __i386__ || __sun4c__/\#if __i386__ || __sun4c__/g' $file_to_fix > /tmp/$base ! if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \ ! echo No change needed in $file_to_fix ! else ! echo Fixed $file_to_fix rm -f ${LIB}/$file - cp /tmp/$base ${LIB}/$file fi - rm -f /tmp/$base fi # Fix bogus #ifdef in on SunOS 4.1. - file=hsfs/iso_spec.h ! base=`basename $file` if [ -r ${LIB}/$file ]; then ! file_to_fix=${LIB}/$file ! echo Checking $file_to_fix ! sed 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' $file_to_fix > /tmp/$base ! if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \ ! echo No change needed in $file_to_fix ! else ! echo Fixed $file_to_fix rm -f ${LIB}/$file - cp /tmp/$base ${LIB}/$file fi - rm -f /tmp/$base fi --- 447,578 ---- # Fix return type of exit and abort in on SunOS 4.1. file=stdlib.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null fi ! ! if [ -r ${LIB}/$file ]; then ! echo Fixing $file ! sed -e 's/int abort/void abort/g' \ ! -e 's/int exit/void exit/g' ${LIB}/$file > ${LIB}/${file}.sed ! rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file ! if cmp $file ${LIB}/$file >/dev/null 2>&1; then ! echo Deleting ${LIB}/$file\; no fixes were needed. rm -f ${LIB}/$file fi fi # Fix bogus comment in on SunOS 4.1. file=locale.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null fi ! ! if [ -r ${LIB}/$file ]; then ! echo Fixing $file ! sed -e 's%#endif / \*%#endif /\* %g' ${LIB}/$file > ${LIB}/${file}.sed ! rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file ! if cmp $file ${LIB}/$file >/dev/null 2>&1; then ! echo Deleting ${LIB}/$file\; no fixes were needed. rm -f ${LIB}/$file fi fi # Fix bogus #ifdef in on SunOS 4.1. file=hsfs/hsfs_spec.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/hsfs 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null ! fi ! if [ -r ${LIB}/$file ]; then ! echo Fixing $file ! sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' \ ! ${LIB}/$file > ${LIB}/${file}.sed ! rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file ! if cmp $file ${LIB}/$file >/dev/null 2>&1; then ! echo Deleting ${LIB}/$file\; no fixes were needed. rm -f ${LIB}/$file fi fi # Fix bogus #ifdef in on SunOS 4.1. file=hsfs/hsnode.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/hsfs 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null ! fi ! if [ -r ${LIB}/$file ]; then ! echo Fixing $file ! sed -e 's/\#ifdef __i386__ || __sun4c__/\#if __i386__ || __sun4c__/g' \ ! ${LIB}/$file > ${LIB}/${file}.sed ! rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file ! if cmp $file ${LIB}/$file >/dev/null 2>&1; then ! echo Deleting ${LIB}/$file\; no fixes were needed. rm -f ${LIB}/$file fi fi # Fix bogus #ifdef in on SunOS 4.1. file=hsfs/iso_spec.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/hsfs 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null ! fi ! if [ -r ${LIB}/$file ]; then ! echo Fixing $file ! sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' \ ! ${LIB}/$file > ${LIB}/${file}.sed ! rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file ! if cmp $file ${LIB}/$file >/dev/null 2>&1; then ! echo Deleting ${LIB}/$file\; no fixes were needed. ! rm -f ${LIB}/$file ! fi ! fi ! ! # Incorrect #include in Sony News-OS 3.2. ! file=machine/machparam.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/machine 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null ! fi ! ! if [ -r ${LIB}/$file ]; then ! echo Fixing $file, incorrect \#include ! sed -e 's@"../machine/endian.h"@@' \ ! ${LIB}/$file > ${LIB}/${file}.sed ! rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file ! if cmp $file ${LIB}/$file >/dev/null 2>&1; then ! echo Deleting ${LIB}/$file\; no fixes were needed. ! rm -f ${LIB}/$file ! fi ! fi ! ! # Multiline comment after typedef on IRIX 4.0.1. ! file=sys/types.h ! if [ -r $file ] && [ ! -r ${LIB}/$file ]; then ! mkdir ${LIB}/sys 2>/dev/null ! cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" ! chmod +w ${LIB}/$file 2>/dev/null ! fi ! ! if [ -r ${LIB}/$file ]; then ! echo Fixing $file, comment in the middle of \#ifdef ! sed -e 's@type of the result@type of the result */@' \ ! -e 's@of the sizeof@/* of the sizeof@' \ ! ${LIB}/$file > ${LIB}/${file}.sed ! rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file ! if cmp $file ${LIB}/$file >/dev/null 2>&1; then ! echo Deleting ${LIB}/$file\; no fixes were needed. rm -f ${LIB}/$file fi fi diff -rc2N gcc-2.0/flags.h gcc-2.1/flags.h *** gcc-2.0/flags.h Fri Jan 17 16:47:59 1992 --- gcc-2.1/flags.h Sat Mar 14 00:03:50 1992 *************** *** 26,30 **** DBX_DEBUG, /* Write BSD .stabs for DBX (using dbxout.c). */ SDB_DEBUG, /* Write COFF for (old) SDB (using sdbout.c). */ ! DWARF_DEBUG /* Write Dwarf debug info (using dwarfout.c). */ }; --- 26,31 ---- DBX_DEBUG, /* Write BSD .stabs for DBX (using dbxout.c). */ SDB_DEBUG, /* Write COFF for (old) SDB (using sdbout.c). */ ! DWARF_DEBUG, /* Write Dwarf debug info (using dwarfout.c). */ ! XCOFF_DEBUG /* Write IBM/Xcoff debug info (using dbxout.c). */ }; *************** *** 43,47 **** extern enum debug_info_level debug_info_level; ! #ifdef DBX_DEBUGGING_INFO /* Nonzero means use GDB-only extensions of DBX format. */ extern int use_gdb_dbx_extensions; --- 44,48 ---- extern enum debug_info_level debug_info_level; ! #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) /* Nonzero means use GDB-only extensions of DBX format. */ extern int use_gdb_dbx_extensions; *************** *** 243,247 **** extern int flag_syntax_only; ! /* Nonzero means we should save auxilliary info into a .X file. */ extern int flag_gen_aux_info; --- 244,248 ---- extern int flag_syntax_only; ! /* Nonzero means we should save auxiliary info into a .X file. */ extern int flag_gen_aux_info; diff -rc2N gcc-2.0/flow.c gcc-2.1/flow.c *** gcc-2.0/flow.c Tue Feb 11 17:35:04 1992 --- gcc-2.1/flow.c Wed Mar 11 19:23:42 1992 *************** *** 1282,1285 **** --- 1282,1290 ---- NOTE_SOURCE_FILE (insn) = 0; + /* CC0 is now known to be dead. Either this insn used it, + in which case it doesn't anymore, or clobbered it, + so the next insn can't use it. */ + cc0_live = 0; + /* If this insn is copying the return value from a library call, delete the entire library call. */ diff -rc2N gcc-2.0/fold-const.c gcc-2.1/fold-const.c *** gcc-2.0/fold-const.c Sun Feb 16 00:09:21 1992 --- gcc-2.1/fold-const.c Sun Mar 22 00:08:53 1992 *************** *** 739,742 **** --- 739,782 ---- } + /* Check whether an IEEE double precision number is a NaN. */ + + int + target_isnan (x) + REAL_VALUE_TYPE x; + { + /* The IEEE 64-bit double format. */ + union { + REAL_VALUE_TYPE d; + struct { + unsigned sign : 1; + unsigned exponent : 11; + unsigned mantissa1 : 20; + unsigned mantissa2; + } little_endian; + struct { + unsigned mantissa2; + unsigned mantissa1 : 20; + unsigned exponent : 11; + unsigned sign : 1; + } big_endian; + } u; + + u.d = dconstm1; + if (u.big_endian.sign == 1) + { + u.d = x; + return (u.big_endian.exponent == 2047 + && (u.big_endian.mantissa1 != 0 + || u.big_endian.mantissa2 != 0)); + } + else + { + u.d = x; + return (u.little_endian.exponent == 2047 + && (u.little_endian.mantissa1 != 0 + || u.little_endian.mantissa2 != 0)); + } + } + /* Check for minus zero in an IEEE double precision number. */ *************** *** 763,766 **** --- 803,815 ---- } + /* Let's assume other float formats don't have NaNs. + (This can be overridden by redefining REAL_VALUE_ISNAN.) */ + + target_isnan (x) + REAL_VALUE_TYPE x; + { + return 0; + } + /* Let's assume other float formats don't have minus zero. (This can be overridden by redefining REAL_VALUE_MINUS_ZERO.) */ *************** *** 1144,1149 **** #endif /* no REAL_ARITHMETIC */ set_float_handler (0); ! value = REAL_VALUE_TRUNCATE (TYPE_MODE (TREE_TYPE (arg1)), value); ! return build_real (TREE_TYPE (arg1), value); } #endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */ --- 1193,1198 ---- #endif /* no REAL_ARITHMETIC */ set_float_handler (0); ! return build_real (TREE_TYPE (arg1), ! REAL_VALUE_TRUNCATE (TYPE_MODE (TREE_TYPE (arg1)), value)); } #endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */ *************** *** 1409,1415 **** return 1; if (TREE_CODE (arg0) == TREE_CODE (arg1) && TREE_CODE (arg0) == REAL_CST ! && REAL_VALUES_EQUAL (TREE_REAL_CST (arg0), TREE_REAL_CST (arg1))) return 1; --- 1458,1468 ---- return 1; + /* Detect when real constants are equal. + But reject weird values because we can't be sure what to do with them. */ if (TREE_CODE (arg0) == TREE_CODE (arg1) && TREE_CODE (arg0) == REAL_CST ! && REAL_VALUES_EQUAL (TREE_REAL_CST (arg0), TREE_REAL_CST (arg1)) ! && !REAL_VALUE_ISINF (TREE_REAL_CST (arg0)) ! && !REAL_VALUE_ISNAN (TREE_REAL_CST (arg0))) return 1; *************** *** 1563,1568 **** /* For floating-point comparisons, it isn't safe to invert the condition. So just enclose a TRUTH_NOT_EXPR around what we have. */ ! if (TREE_CODE (type) == REAL_TYPE ! && TREE_CODE_CLASS (TREE_CODE (arg)) == '<') return build1 (TRUTH_NOT_EXPR, type, arg); --- 1616,1621 ---- /* For floating-point comparisons, it isn't safe to invert the condition. So just enclose a TRUTH_NOT_EXPR around what we have. */ ! if (TREE_CODE_CLASS (TREE_CODE (arg)) == '<' ! && TREE_CODE (TREE_TYPE (TREE_OPERAND (arg, 0))) == REAL_TYPE) return build1 (TRUTH_NOT_EXPR, type, arg); *************** *** 1625,1628 **** --- 1678,1685 ---- invert_truthvalue (TREE_OPERAND (arg, 2))); + case COMPOUND_EXPR: + return build (COMPOUND_EXPR, type, TREE_OPERAND (arg, 0), + invert_truthvalue (TREE_OPERAND (arg, 1))); + case NON_LVALUE_EXPR: return invert_truthvalue (TREE_OPERAND (arg, 0)); *************** *** 3294,3298 **** /* If what we want is other than LT or EQ, invert the result. */ ! if (code == GE_EXPR || code == LE_EXPR || code == NE_EXPR) TREE_INT_CST_LOW (t) ^= 1; TREE_TYPE (t) = type; --- 3351,3356 ---- /* If what we want is other than LT or EQ, invert the result. */ ! if ((code == GE_EXPR || code == LE_EXPR || code == NE_EXPR) ! && TREE_CODE (t) == INTEGER_CST) TREE_INT_CST_LOW (t) ^= 1; TREE_TYPE (t) = type; diff -rc2N gcc-2.0/function.c gcc-2.1/function.c *** gcc-2.0/function.c Fri Feb 21 01:59:57 1992 --- gcc-2.1/function.c Tue Mar 24 14:01:29 1992 *************** *** 554,569 **** alignment = align / BITS_PER_UNIT; - #if 0 /* Let's see if this is really needed--rms. */ - #ifdef STRICT_ALIGNMENT - /* Supposedly sub-word sized units may later be accessed - with word intructions. It's not certain this is really true. */ - if (mode != BLKmode && align == 0 && alignment < UNITS_PER_WORD) - alignment = UNITS_PER_WORD; - - /* This is in case we just made the alignment bigger than the size. */ - size = CEIL_ROUND (size, alignment); - #endif - #endif - /* Round frame offset to that alignment. We must be careful here, since FRAME_OFFSET might be negative and --- 554,557 ---- *************** *** 643,658 **** alignment = align / BITS_PER_UNIT; - #if 0 /* Let's see if this is really needed--rms. */ - #ifdef STRICT_ALIGNMENT - /* Sub-word sized units may later be accessed with word intructions. - This results from (SUBREG (MEM ...) ...). */ - if (mode != BLKmode && align == 0 && alignment < UNITS_PER_WORD) - alignment = UNITS_PER_WORD; - - /* This is in case we just made the alignment bigger than the size. */ - size = CEIL_ROUND (size, alignment); - #endif - #endif - /* Round frame offset to that alignment. */ #ifdef FRAME_GROWS_DOWNWARD --- 631,634 ---- *************** *** 1053,1057 **** /* We can not separate USE insns from the CALL_INSN that they belong to. If this is a CALL_INSN, insert ! the move insn before the USE insns preceeding it instead of immediately before the insn. */ if (GET_CODE (insn) == CALL_INSN) --- 1029,1033 ---- /* We can not separate USE insns from the CALL_INSN that they belong to. If this is a CALL_INSN, insert ! the move insn before the USE insns preceding it instead of immediately before the insn. */ if (GET_CODE (insn) == CALL_INSN) *************** *** 1929,1933 **** instantiate_virtual_regs_1 (&XEXP (DECL_RTL (decl), 0), valid_only ? DECL_RTL (decl) : 0, 0); ! #if 0 /* This is probably correct, but it seems to require fixes elsewhere in order to work. Let's fix them in 2.1. */ if (DECL_INCOMING_RTL (decl) --- 1905,1909 ---- instantiate_virtual_regs_1 (&XEXP (DECL_RTL (decl), 0), valid_only ? DECL_RTL (decl) : 0, 0); ! #if 1 /* This is probably correct, but it seems to require fixes elsewhere in order to work. Let's fix them in 2.1. */ if (DECL_INCOMING_RTL (decl) *************** *** 2192,2196 **** handled by our scan of regno_reg_rtx. The only special handling we need here is to make a copy of the rtx to ensure it isn't being ! shared if we have to change it to a psuedo. If the rtx is a simple reference to an address via a virtual register, --- 2168,2172 ---- handled by our scan of regno_reg_rtx. The only special handling we need here is to make a copy of the rtx to ensure it isn't being ! shared if we have to change it to a pseudo. If the rtx is a simple reference to an address via a virtual register, *************** *** 2235,2241 **** Note that we cannot pass X as the object in the recursive call since the insn being processed may not allow all valid ! addresses. */ ! if (instantiate_virtual_regs_1 (&XEXP (x, 0), object, 0)) return 1; --- 2211,2225 ---- Note that we cannot pass X as the object in the recursive call since the insn being processed may not allow all valid ! addresses. However, if we were not passed on object, we can ! only modify X without copying it if X will have a valid ! address. ! ! ??? Also note that this can still lose if OBJECT is an insn that ! has less restrictions on an address that some other insn. ! In that case, we will modify the shared address. This case ! doesn't seem very likely, though. */ ! if (instantiate_virtual_regs_1 (&XEXP (x, 0), ! object ? object : x, 0)) return 1; *************** *** 2803,2807 **** !optimize #else /* It's not clear why the following was replaced. */ ! /* Obsoleted by preceeding line. */ (obey_regdecls && ! TREE_REGDECL (parm) && ! TREE_INLINE (fndecl)) --- 2787,2791 ---- !optimize #else /* It's not clear why the following was replaced. */ ! /* Obsoleted by preceding line. */ (obey_regdecls && ! TREE_REGDECL (parm) && ! TREE_INLINE (fndecl)) *************** *** 2835,2839 **** /* Copy the value into the register. */ if (GET_MODE (parmreg) != GET_MODE (entry_parm)) ! convert_move (parmreg, validize_mem (entry_parm), 0); else emit_move_insn (parmreg, validize_mem (entry_parm)); --- 2819,2837 ---- /* Copy the value into the register. */ if (GET_MODE (parmreg) != GET_MODE (entry_parm)) ! { ! /* If ENTRY_PARM is a hard register, it might be in a register ! not valid for operating in its mode (e.g., an odd-numbered ! register for a DFmode). In that case, moves are the only ! thing valid, so we can't do a convert from there. This ! occurs when the calling sequence allow such misaligned ! usages. */ ! if (GET_CODE (entry_parm) == REG ! && REGNO (entry_parm) < FIRST_PSEUDO_REGISTER ! && ! HARD_REGNO_MODE_OK (REGNO (entry_parm), ! GET_MODE (entry_parm))) ! convert_move (parmreg, copy_to_reg (entry_parm)); ! else ! convert_move (parmreg, validize_mem (entry_parm), 0); ! } else emit_move_insn (parmreg, validize_mem (entry_parm)); *************** *** 2876,2882 **** if (passed_mode != nominal_mode) ! /* Conversion is required. */ ! entry_parm = convert_to_mode (nominal_mode, entry_parm, 0); if (entry_parm != stack_parm) { --- 2874,2887 ---- if (passed_mode != nominal_mode) ! { ! /* Conversion is required. */ ! if (GET_CODE (entry_parm) == REG ! && REGNO (entry_parm) < FIRST_PSEUDO_REGISTER ! && ! HARD_REGNO_MODE_OK (REGNO (entry_parm), passed_mode)) ! entry_parm = copy_to_reg (entry_parm); + entry_parm = convert_to_mode (nominal_mode, entry_parm, 0); + } + if (entry_parm != stack_parm) { *************** *** 3216,3219 **** --- 3221,3230 ---- && DECL_RTL (decl) != 0 && GET_CODE (DECL_RTL (decl)) == REG + /* If this variable came from an inline function, it must be + that it's life doesn't overlap the setjmp. If there was a + setjmp in the function, it would already be in memory. We + must exclude such variable because their DECL_RTL might be + set to strange things such as virtual_stack_vars_rtx. */ + && ! DECL_FROM_INLINE (decl) && ( #ifdef NON_SAVING_SETJMP *************** *** 3339,3342 **** --- 3350,3354 ---- #else displacement += (FIRST_PARM_OFFSET (context) - STARTING_FRAME_OFFSET); + base = lookup_static_chain (var); #endif } *************** *** 3626,3633 **** expand_main_function () { ! #ifndef INIT_SECTION_ASM_OP emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__main"), 0, VOIDmode, 0); ! #endif /* not INIT_SECTION_ASM_OP */ } --- 3638,3645 ---- expand_main_function () { ! #if !defined (INIT_SECTION_ASM_OP) || defined (INVOKE__main) emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__main"), 0, VOIDmode, 0); ! #endif /* not INIT_SECTION_ASM_OP or INVOKE__main */ } *************** *** 3848,3853 **** initializing trampolines. */ if (initial_trampoline == 0) ! initial_trampoline ! = gen_rtx (MEM, BLKmode, assemble_trampoline_template ()); /* Generate insns to initialize the trampoline. */ --- 3860,3869 ---- initializing trampolines. */ if (initial_trampoline == 0) ! { ! end_temporary_allocation (); ! initial_trampoline ! = gen_rtx (MEM, BLKmode, assemble_trampoline_template ()); ! resume_temporary_allocation (); ! } /* Generate insns to initialize the trampoline. */ diff -rc2N gcc-2.0/function.h gcc-2.1/function.h *** gcc-2.0/function.h Fri Jan 31 00:46:45 1992 --- gcc-2.1/function.h Thu Mar 5 15:20:59 1992 *************** *** 117,120 **** --- 117,121 ---- tree cleanups_this_call; rtx saveregs_value; + rtx forced_labels; /* For emit-rtl.c. */ diff -rc2N gcc-2.0/g++ gcc-2.1/g++ *** gcc-2.0/g++ Tue Feb 18 16:22:04 1992 --- gcc-2.1/g++ Wed Mar 11 18:17:19 1992 *************** *** 1,4 **** --- 1,5 ---- #!/bin/sh # Compile programs, treating .c files as C++. + : || exec /bin/sh -f $0 $argv:q newargs= diff -rc2N gcc-2.0/g++.1 gcc-2.1/g++.1 *** gcc-2.0/g++.1 Wed Jan 22 20:00:59 1992 --- gcc-2.1/g++.1 Fri Feb 28 13:38:30 1992 *************** *** 79,86 **** \&. .TP - .B \-dynamic - On systems that support dynamic linking, you can use this option to - request it explicitly. - .TP .B \-E Stop after the preprocessing stage; do not run the compiler proper. The --- 79,82 ---- diff -rc2N gcc-2.0/gbl-ctors.h gcc-2.1/gbl-ctors.h *** gcc-2.0/gbl-ctors.h Sun Feb 2 16:57:55 1992 --- gcc-2.1/gbl-ctors.h Sat Mar 14 00:03:55 1992 *************** *** 47,51 **** /* Declare the set of symbols use as begin and end markers for the lists ! of global object constructors and global object descructors. */ extern func_ptr __CTOR_LIST__[]; --- 47,51 ---- /* Declare the set of symbols use as begin and end markers for the lists ! of global object constructors and global object destructors. */ extern func_ptr __CTOR_LIST__[]; *************** *** 76,80 **** for (p = __CTOR_LIST__ + 1; *p; ) \ (*p++) (); \ - ON_EXIT (__do_global_dtors, 0); \ } while (0) #endif --- 76,79 ---- diff -rc2N gcc-2.0/gcc.1 gcc-2.1/gcc.1 *** gcc-2.0/gcc.1 Thu Feb 6 15:53:26 1992 --- gcc-2.1/gcc.1 Thu Mar 19 13:34:33 1992 *************** *** 181,186 **** .RI \-Wid\-clash\- len \-Wimplicit \-Wmissing\-prototypes ! \-Wno\-parentheses \-Wpointer\-arith \-Wreturn\-type --- 181,187 ---- .RI \-Wid\-clash\- len \-Wimplicit + \-Winline \-Wmissing\-prototypes ! \-Wparentheses \-Wpointer\-arith \-Wreturn\-type *************** *** 257,261 **** .TP .B Linker Options - \-dynamic .RI \-l library \-nostdlib --- 258,261 ---- *************** *** 388,391 **** --- 388,397 ---- \-G \fInum\fP + .I i386 Options + .br + \-m486 + \-mno486 + \-msoft\-float + .TP .B Code Generation Options *************** *** 759,794 **** situations: GNU C, traditional GNU C, other ANSI C compilers, and other old C compilers. - .TP - \ \ \ \(bu - In the preprocessor, comments convert to nothing at all, rather than - to a space. This allows traditional token concatenation. - .TP - \ \ \ \(bu - In the preprocessor, macro arguments are recognized within string - constants in a macro definition (and their values are stringified, - though without additional quote marks, when they appear in such a - context). The preprocessor always considers a string constant to end - at a newline. - .TP - \ \ \ \(bu - The preprocessor does not predefine the macro \c - .B __STDC__\c - \& when you use - `\|\c - .B \-traditional\c - \&\|', but still predefines\c - .B __GNUC__\c - \& (since the GNU extensions indicated by - .B __GNUC__\c - \& are not affected by - `\|\c - .B \-traditional\c - \&\|'). If you need to write header files that work - differently depending on whether `\|\c - .B \-traditional\c - \&\|' is in use, by - testing both of these predefined macros you can distinguish four - situations: GNU C, traditional GNU C, other ANSI C compilers, and - other old C compilers. .PP .TP --- 765,768 ---- *************** *** 1273,1280 **** to the linker. .TP - .B \-dynamic - On systems that support dynamic linking, you can use this option to - request it explicitly. - .TP .BI \-l library\c \& --- 1247,1250 ---- *************** *** 1446,1450 **** .B /usr/lib/gcc/\c \&\|' and `\|\c ! .B /usr/local/lib/gcc/\c \&\|'. If neither of those results in a file name that is found, the compiler driver --- 1416,1420 ---- .B /usr/lib/gcc/\c \&\|' and `\|\c ! .B /usr/local/lib/gcc-lib/\c \&\|'. If neither of those results in a file name that is found, the compiler driver *************** *** 1528,1534 **** warnings. .TP - .B \-Werror - Treat warnings as errors; abort compilation after any warning. - .TP .B \-W Print extra warning messages for these events: --- 1498,1501 ---- *************** *** 1633,1641 **** Warn if any trigraphs are encountered (assuming they are enabled). .TP - .B \-Waggregate\-return - Warn if any functions that return structures or unions are defined or - called. (In languages where you can return an array, this also elicits - a warning.) - .TP .B \-Wformat Check calls to \c --- 1600,1603 ---- *************** *** 1738,1752 **** \& all the functions you use that never return. .TP ! .B \-Wstrict\-prototypes ! Warn if a function is declared or defined without specifying the ! argument types. (An old-style function definition is permitted without ! a warning if preceded by a declaration which specifies the argument ! types.) ! .TP ! .B \-Wmissing\-prototypes ! Warn if a global function is defined without a previous prototype ! declaration. This warning is issued even if the definition itself ! provides a prototype. The aim is to detect global functions that fail ! to be declared in header files. .TP .B \-Wall --- 1700,1705 ---- \& all the functions you use that never return. .TP ! .B \-Wparentheses ! Warn if parentheses are omitted in certain contexts. .TP .B \-Wall *************** *** 1855,1858 **** --- 1808,1828 ---- except when the same as the default promotion. .TP + .B \-Waggregate\-return + Warn if any functions that return structures or unions are defined or + called. (In languages where you can return an array, this also elicits + a warning.) + .TP + .B \-Wstrict\-prototypes + Warn if a function is declared or defined without specifying the + argument types. (An old-style function definition is permitted without + a warning if preceded by a declaration which specifies the argument + types.) + .TP + .B \-Wmissing\-prototypes + Warn if a global function is defined without a previous prototype + declaration. This warning is issued even if the definition itself + provides a prototype. The aim is to detect global functions that fail + to be declared in header files. + .TP .B \-Wenum\-clash .I (C++ only.) *************** *** 1859,1865 **** Warn when converting between different enumeration types. .TP - .B \-Wno\-parentheses - Disable warnings that parentheses are suggested around an expression. - .TP .B \-Woverloaded\-virtual .I (C++ only.) --- 1829,1832 ---- *************** *** 1871,1874 **** --- 1838,1850 ---- virtual function in the base class, but with a type signature that doesn't match any virtual functions from the base class. + .TP + .B \-Winline + Warn if a function can not be inlined, and either it was declared as inline, + or else the + .B \-finline\-functions + option was given. + .TP + .B \-Werror + Treat warnings as errors; abort compilation after any warning. .PP *************** *** 3059,3063 **** to add normal debug information. This is the default for all platforms except for the OSF/1 reference platform, using the OSF/rose ! object format. If the any of the .BR \-ggdb , .BR \-gstabs , --- 3035,3039 ---- to add normal debug information. This is the default for all platforms except for the OSF/1 reference platform, using the OSF/rose ! object format. If any of the .BR \-ggdb , .BR \-gstabs , diff -rc2N gcc-2.0/gcc.c gcc-2.1/gcc.c *** gcc-2.0/gcc.c Sat Feb 22 02:09:34 1992 --- gcc-2.1/gcc.c Sat Mar 21 17:50:43 1992 *************** *** 112,115 **** --- 112,124 ---- static char *spec_machine = DEFAULT_TARGET_MACHINE; + /* Nonzero if cross-compiling. + When -b is used, the value comes from the `specs' file. */ + + #ifdef CROSS_COMPILE + static int cross_compile = 1; + #else + static int cross_compile = 0; + #endif + /* This is the obstack which we use to allocate many strings. */ *************** *** 116,119 **** --- 125,135 ---- static struct obstack obstack; + /* This is the obstack to build an environment variable to pass to + collect2 that describes all of the relavant switches of what to + pass the compiler in building the list of pointers to constructors + and destructors. */ + + static struct obstack collect_obstack; + extern char *version_string; *************** *** 229,232 **** --- 245,250 ---- %{.S:X} substitutes X, but only if processing a file with suffix S. %{!.S:X} substitutes X, but only if NOT processing a file with suffix S. + %(Spec) processes a specification defined in a specs file as *Spec: + %[Spec] as above, but put __ around -D arguments The conditional text X in a %{S:X} or %{!S:X} construct may contain *************** *** 344,348 **** #define WORD_SWITCH_TAKES_ARG(STR) \ (!strcmp (STR, "Tdata") || !strcmp (STR, "include") \ ! || !strcmp (STR, "imacros")) #endif --- 362,366 ---- #define WORD_SWITCH_TAKES_ARG(STR) \ (!strcmp (STR, "Tdata") || !strcmp (STR, "include") \ ! || !strcmp (STR, "imacros") || !strcmp (STR, "aux-info")) #endif *************** *** 386,394 **** %{traditional-cpp:-traditional}\ %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\ ! %i %{!M:%{!MM:%{!E:%{!pipe:%g.cpp}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\ ! %{!M:%{!MM:%{!E:cc1 %{!pipe:%g.cpp} %1 \ %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a}\ %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \ %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\ %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ --- 404,413 ---- %{traditional-cpp:-traditional}\ %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\ ! %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\ ! %{!M:%{!MM:%{!E:cc1 %{!pipe:%g.i} %1 \ %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a}\ %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \ %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\ + %{aux-info*}\ %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ *************** *** 417,422 **** %{traditional-cpp:-traditional}\ %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\ ! %i %{!M:%{!MM:%{!E:%{!pipe:%g.cpp}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\ ! %{!M:%{!MM:%{!E:cc1obj %{!pipe:%g.cpp} %1 \ %{!Q:-quiet} -dumpbase %b.m %{d*} %{m*} %{a}\ %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \ --- 436,441 ---- %{traditional-cpp:-traditional}\ %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\ ! %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\ ! %{!M:%{!MM:%{!E:cc1obj %{!pipe:%g.i} %1 \ %{!Q:-quiet} -dumpbase %b.m %{d*} %{m*} %{a}\ %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \ *************** *** 423,426 **** --- 442,446 ---- %{traditional} %{v:-version} %{pg:-p} %{p} %{f*} \ -lang-objc %{gen-decls} \ + %{aux-info*}\ %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ *************** *** 452,460 **** %{traditional-cpp:-traditional} %{trigraphs}\ %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\ ! %i %{!M:%{!MM:%{!E:%{!pipe:%g.cpp}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\ ! %{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.cpp} %1 %2\ %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\ %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} %{traditional}\ %{v:-version} %{pg:-p} %{p} %{f*}\ %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ --- 472,481 ---- %{traditional-cpp:-traditional} %{trigraphs}\ %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\ ! %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\ ! %{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.i} %1 %2\ %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\ %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} %{traditional}\ %{v:-version} %{pg:-p} %{p} %{f*}\ + %{aux-info*}\ %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ *************** *** 467,470 **** --- 488,492 ---- %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} %{traditional}\ %{v:-version} %{pg:-p} %{p} %{f*}\ + %{aux-info*}\ %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ *************** *** 476,479 **** --- 498,502 ---- %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} %{traditional}\ %{v:-version} %{pg:-p} %{p} %{f*}\ + %{aux-info*}\ %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ *************** *** 513,517 **** static char *link_command_spec = "\ %{!c:%{!M:%{!MM:%{!E:%{!S:ld %X %l %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \ ! %{r} %{T*} %{t} %{x} %{z}\ %{!A:%{!nostdlib:%S}} \ %{L*} %D %o %{!nostdlib:libgcc.a%s %L libgcc.a%s %{!A:%E}}\n }}}}}"; --- 536,540 ---- static char *link_command_spec = "\ %{!c:%{!M:%{!MM:%{!E:%{!S:ld %X %l %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \ ! %{r} %{s} %{T*} %{t} %{x} %{z}\ %{!A:%{!nostdlib:%S}} \ %{L*} %D %o %{!nostdlib:libgcc.a%s %L libgcc.a%s %{!A:%E}}\n }}}}}"; *************** *** 520,524 **** static char *link_command_spec = "\ %{!c:%{!M:%{!MM:%{!E:%{!S:ld %X %l %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \ ! %{r} %{T*} %{t} %{x} %{z}\ %{!A:%{!nostdlib:%S}} \ %{L*} %D %o %{!nostdlib:-lgcc %L -lgcc %{!A:%E}}\n }}}}}"; --- 543,547 ---- static char *link_command_spec = "\ %{!c:%{!M:%{!MM:%{!E:%{!S:ld %X %l %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \ ! %{r} %{s} %{T*} %{t} %{x} %{z}\ %{!A:%{!nostdlib:%S}} \ %{L*} %D %o %{!nostdlib:-lgcc %L -lgcc %{!A:%E}}\n }}}}}"; *************** *** 612,616 **** { while (*in && *in != '\n') in++; - if (*in) in++; } else --- 635,638 ---- *************** *** 670,674 **** /* Structure to keep track of the specs that have been defined so far. These ! are accessed using %Sspecname in a compiler or link spec. */ struct spec_list --- 692,696 ---- /* Structure to keep track of the specs that have been defined so far. These ! are accessed using %(specname) or %[specname] in a compiler or link spec. */ struct spec_list *************** *** 740,744 **** else if (! strcmp (name, "switches_need_spaces")) switches_need_spaces = sl->spec; ! /* Free the old spec */ if (old_spec) --- 762,767 ---- else if (! strcmp (name, "switches_need_spaces")) switches_need_spaces = sl->spec; ! else if (! strcmp (name, "cross_compile")) ! cross_compile = atoi (sl->spec); /* Free the old spec */ if (old_spec) *************** *** 801,808 **** static char *machine_suffix = 0; - /* Nonzero means don't bypass the machine_suffix. */ - - static int machine_explicit; - /* Default prefixes to attach to command names. */ --- 824,827 ---- *************** *** 813,817 **** #ifndef STANDARD_EXEC_PREFIX ! #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc/" #endif /* !defined STANDARD_EXEC_PREFIX */ --- 832,836 ---- #ifndef STANDARD_EXEC_PREFIX ! #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/" #endif /* !defined STANDARD_EXEC_PREFIX */ *************** *** 1041,1044 **** --- 1060,1160 ---- } + + /* Routine to add variables to the environment. We do this to pass + the pathname of the gcc driver, and the directories search to the + collect2 program, which is being run as ld. This way, we can be + sure of executing the right compiler when collect2 wants to build + constructors and destructors. Since the environment variables we + use come from an obstack, we don't have to worry about allocating + space for them. */ + + #ifndef HAVE_PUTENV + + putenv (str) + char *str; + { + #ifndef __MSDOS__ /* not sure about MS/DOS */ + #ifndef VMS /* nor about VMS */ + + extern char **environ; + char **old_environ = environ; + char **envp; + int num_envs = 0; + int name_len = 1; + int str_len = strlen (str); + char *p = str; + int ch; + + while ((ch = *p++) != '\0' && ch != '=') + name_len++; + + if (!ch) + abort (); + + /* Search for replacing an existing environment variable, and + count the number of total environment variables. */ + for (envp = old_environ; *envp; envp++) + { + num_envs++; + if (!strncmp (str, *envp, name_len)) + { + *envp = str; + return; + } + } + + /* Add a new environment variable */ + environ = (char **) xmalloc (sizeof (char *) * (num_envs+2)); + *environ = str; + bcopy (old_environ, environ+1, sizeof (char *) * (num_envs+1)); + + #endif /* VMS */ + #endif /* __MSDOS__ */ + } + + #endif /* HAVE_PUTENV */ + + + /* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables for collect. */ + + static void + putenv_from_prefixes (paths, env_var) + struct path_prefix *paths; + char *env_var; + { + int suffix_len = (machine_suffix) ? strlen (machine_suffix) : 0; + int first_time = TRUE; + struct prefix_list *pprefix; + + obstack_grow (&collect_obstack, env_var, strlen (env_var)); + + for (pprefix = paths->plist; pprefix != 0; pprefix = pprefix->next) + { + int len = strlen (pprefix->prefix); + + if (machine_suffix) + { + if (!first_time) + obstack_grow (&collect_obstack, ":", 1); + + first_time = FALSE; + obstack_grow (&collect_obstack, pprefix->prefix, len); + obstack_grow (&collect_obstack, machine_suffix, suffix_len); + } + + if (!pprefix->require_machine_suffix) + { + if (!first_time) + obstack_grow (&collect_obstack, ":", 1); + + first_time = FALSE; + obstack_grow (&collect_obstack, pprefix->prefix, len); + } + } + obstack_grow (&collect_obstack, "\0", 1); + putenv (obstack_finish (&collect_obstack)); + } + + /* Search for NAME using the prefix list PREFIXES. MODE is passed to access to check permissions. *************** *** 1052,1056 **** { char *temp; ! char *file_suffix = (mode & X_OK != 0 ? EXECUTABLE_SUFFIX : ""); struct prefix_list *pl; int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1; --- 1168,1172 ---- { char *temp; ! char *file_suffix = ((mode & X_OK) != 0 ? EXECUTABLE_SUFFIX : ""); struct prefix_list *pl; int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1; *************** *** 1100,1104 **** /* Certain prefixes can't be used without the machine suffix when the machine or version is explicitly specified. */ ! if (!machine_explicit || !pl->require_machine_suffix) { strcpy (temp, pl->prefix); --- 1216,1220 ---- /* Certain prefixes can't be used without the machine suffix when the machine or version is explicitly specified. */ ! if (!pl->require_machine_suffix) { strcpy (temp, pl->prefix); *************** *** 1694,1697 **** --- 1810,1814 ---- printf ("*signed_char:\n%s\n\n", signed_char_spec); printf ("*predefines:\n%s\n\n", cpp_predefines); + printf ("*cross_compile:\n%d\n\n", cross_compile); exit (0); *************** *** 1794,1816 **** add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 1, 0); ! /* Use the md prefixes only if not cross-compiling. */ ! if (!strcmp (spec_machine, DEFAULT_TARGET_MACHINE)) ! { ! #ifdef MD_EXEC_PREFIX ! add_prefix (&exec_prefix, md_exec_prefix, 0, 1, 0); ! add_prefix (&startfile_prefix, md_exec_prefix, 0, 1, 0); ! #endif ! ! #ifdef MD_STARTFILE_PREFIX ! add_prefix (&startfile_prefix, md_startfile_prefix, 0, 1, 0); ! #endif ! } - add_prefix (&startfile_prefix, standard_startfile_prefix, 0, 0, 0); - add_prefix (&startfile_prefix, standard_startfile_prefix_1, 0, 0, 0); - add_prefix (&startfile_prefix, standard_startfile_prefix_2, 0, 0, 0); - #if 0 /* Can cause surprises, and one can use -B./ instead. */ - add_prefix (&startfile_prefix, "./", 0, 1, 0); - #endif /* Then create the space for the vectors and scan again. */ --- 1911,1917 ---- add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 1, 0); ! /* More prefixes are enabled in main, after we read the specs file ! and determine whether this is cross-compilation or not. */ /* Then create the space for the vectors and scan again. */ *************** *** 2135,2139 **** } } ! if (!machine_explicit || !pl->require_machine_suffix) { if (is_linker_dir (pl->prefix, "")) --- 2236,2240 ---- } } ! if (!pl->require_machine_suffix) { if (is_linker_dir (pl->prefix, "")) *************** *** 2518,2521 **** --- 2619,2626 ---- } } + + /* Discard the closing paren or bracket. */ + if (*p) + p++; } break; *************** *** 2596,2599 **** --- 2701,2705 ---- { int found = (input_suffix != 0 + && strlen (input_suffix) == p - filter && strncmp (input_suffix, filter, p - filter) == 0); *************** *** 2631,2635 **** /* First see whether we have %*. */ substitution = 0; ! while (*r && *r == '}') { if (*r == '%' && r[1] == '*') --- 2737,2741 ---- /* First see whether we have %*. */ substitution = 0; ! while (r < q) { if (*r == '%' && r[1] == '*') *************** *** 2837,2840 **** --- 2943,2953 ---- obstack_init (&obstack); + /* Set up to remember the pathname of gcc and any options + needed for collect. */ + obstack_init (&collect_obstack); + obstack_grow (&collect_obstack, "COLLECT_GCC=", sizeof ("COLLECT_GCC=")-1); + obstack_grow (&collect_obstack, programname, strlen (programname)+1); + putenv (obstack_finish (&collect_obstack)); + /* Choose directory for temp files. */ *************** *** 2863,2866 **** --- 2976,3002 ---- read_specs (specs_file); + /* If not cross-compiling, look for startfiles in the standard places. */ + /* The fact that these are done here, after reading the specs file, + means that it cannot be found in these directories. + But that's okay. It should never be there anyway. */ + if (!cross_compile) + { + #ifdef MD_EXEC_PREFIX + add_prefix (&exec_prefix, md_exec_prefix, 0, 0, 0); + add_prefix (&startfile_prefix, md_exec_prefix, 0, 0, 0); + #endif + + #ifdef MD_STARTFILE_PREFIX + add_prefix (&startfile_prefix, md_startfile_prefix, 0, 0, 0); + #endif + + add_prefix (&startfile_prefix, standard_startfile_prefix, 0, 0, 0); + add_prefix (&startfile_prefix, standard_startfile_prefix_1, 0, 0, 0); + add_prefix (&startfile_prefix, standard_startfile_prefix_2, 0, 0, 0); + #if 0 /* Can cause surprises, and one can use -B./ instead. */ + add_prefix (&startfile_prefix, "./", 0, 1, 0); + #endif + } + /* Now we have the specs. Set the `valid' bits for switches that match anything in any spec. */ *************** *** 2969,2972 **** --- 3105,3142 ---- { int tmp = execution_count; + int i; + int first_time; + + /* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables + for collect. */ + putenv_from_prefixes (&exec_prefix, "COMPILER_PATH="); + putenv_from_prefixes (&startfile_prefix, "LIBRARY_PATH="); + + /* Build COLLECT_GCC_OPTIONS to have all of the options specified to + the compiler. */ + obstack_grow (&collect_obstack, "COLLECT_GCC_OPTIONS=", + sizeof ("COLLECT_GCC_OPTIONS=")-1); + + first_time = TRUE; + for (i = 0; i < n_switches; i++) + { + char **args; + if (!first_time) + obstack_grow (&collect_obstack, " ", 1); + + first_time = FALSE; + obstack_grow (&collect_obstack, "-", 1); + obstack_grow (&collect_obstack, switches[i].part1, + strlen (switches[i].part1)); + + for (args = switches[i].args; args && *args; args++) + { + obstack_grow (&collect_obstack, " ", 1); + obstack_grow (&collect_obstack, *args, strlen (*args)); + } + } + obstack_grow (&collect_obstack, "\0", 1); + putenv (obstack_finish (&collect_obstack)); + value = do_spec (link_command_spec); if (value < 0) *************** *** 3222,3225 **** --- 3392,3396 ---- register char *p; register char c; + struct spec_list *spec; for (comp = compilers; comp->spec; comp++) *************** *** 3226,3229 **** --- 3397,3410 ---- { p = comp->spec; + while (c = *p++) + if (c == '%' && *p == '{') + /* We have a switch spec. */ + validate_switches (p + 1); + } + + /* look through the linked list of extra specs read from the specs file */ + for (spec = specs ; spec ; spec = spec->next) + { + p = spec->spec; while (c = *p++) if (c == '%' && *p == '{') diff -rc2N gcc-2.0/gcc.texi gcc-2.1/gcc.texi *** gcc-2.0/gcc.texi Sun Feb 16 03:25:34 1992 --- gcc-2.1/gcc.texi Sun Mar 22 16:19:05 1992 *************** *** 17,20 **** --- 17,21 ---- @syncodeindex fn cp + @syncodeindex vr cp @ifinfo *************** *** 127,131 **** * RTL:: The intermediate representation that most passes work on. * Machine Desc:: How to write machine description instruction patterns. ! * Machine Macros:: How to write the machine description C macros. * Config:: Writing the @file{xm-@var{machine}.h} file. * Index:: Index of concepts and symbol names. --- 128,132 ---- * RTL:: The intermediate representation that most passes work on. * Machine Desc:: How to write machine description instruction patterns. ! * Target Macros:: How to write the machine description C macros. * Config:: Writing the @file{xm-@var{machine}.h} file. * Index:: Index of concepts and symbol names. *************** *** 551,555 **** @item The idea of using RTL and some of the optimization ideas came from the ! U. of Arizona Portable Optimizer, written by Jack Davidson and Christopher Fraser. See ``Register Allocation and Exhaustive Peephole Optimization'', Software Practice and Experience 14 (9), Sept. 1984, --- 552,556 ---- @item The idea of using RTL and some of the optimization ideas came from the ! program PO written at the University of Arizona by Jack Davidson and Christopher Fraser. See ``Register Allocation and Exhaustive Peephole Optimization'', Software Practice and Experience 14 (9), Sept. 1984, *************** *** 662,665 **** --- 663,671 ---- System V Release 4. He has also worked heavily on the Intel 386 and 860 support. + + @item + Torbjorn Granlund of the Swedish Institute of Computer Science + implemented multiply-by-constant optimization and better long long + support, and improved leaf function register allocation. @end itemize *************** *** 673,680 **** @end quotation ! Apple, Lotus and Xerox are trying to create a new form of ! legal monopoly: a copyright on a class of user interfaces. These ! monopolies would cause serious problems for users and developers of ! computer software and systems. Until a few years ago, the law seemed clear: no one could restrict --- 679,688 ---- @end quotation ! Apple and Lotus are trying to create a new form of legal monopoly: a ! copyright on a class of user interfaces. These monopolies would cause ! serious problems for users and developers of computer software and ! systems. Xerox, too, has tried to make a monopoly for itself on window ! systems; their suit against Apple was thrown out on a technicality, but ! Xerox has not said anything to indicate it wouldn't try again. Until a few years ago, the law seemed clear: no one could restrict *************** *** 694,699 **** in the marketplace---not even with a head start. ! If Xerox, Lotus, and Apple are permitted to make law through ! the courts, the precedent will hobble the software industry: @itemize @bullet --- 702,707 ---- in the marketplace---not even with a head start. ! If companies like Xerox, Lotus, and Apple are permitted to make law ! through the courts, the precedent will hobble the software industry: @itemize @bullet *************** *** 820,826 **** * 3B1 Install:: See below for installation on the 3B1. * VMS Install:: See below for installation on VMS. - * SCO Install:: See below for installation on SCO System V 3.2. - (This may also be a start on solving - the problems of installation on Xenix.) * Unos Install:: See below for installation on Unos (from CRDS). @end menu --- 828,831 ---- *************** *** 835,839 **** @item If you have built GNU CC previously in the same directory for a ! different target machine, do @samp{make cleanconfig} to delete all files that might be invalid. --- 840,844 ---- @item If you have built GNU CC previously in the same directory for a ! different target machine, do @samp{make distclean} to delete all files that might be invalid. *************** *** 872,878 **** For example, @samp{sun3} stands for @samp{m68k-sun}, so @samp{sun3-sunos4.1} is another way to specify a Sun 3. You can also ! use simply @samp{sun3-sunos}, since the version of Sunos is assumed by default to be version 4. @samp{sun3-bsd} also works, since ! @file{configure} knows that the only BSD variant on a Sun 3 is Sunos. You can specify a version number after any of the system types, and some --- 877,883 ---- For example, @samp{sun3} stands for @samp{m68k-sun}, so @samp{sun3-sunos4.1} is another way to specify a Sun 3. You can also ! use simply @samp{sun3-sunos}, since the version of SunOS is assumed by default to be version 4. @samp{sun3-bsd} also works, since ! @file{configure} knows that the only BSD variant on a Sun 3 is SunOS. You can specify a version number after any of the system types, and some *************** *** 889,895 **** @end quotation - Note that the type hppa currently works only with Berkeley systems, - not with HP/UX. - Here are the recognized company names. As you can see, customary abbreviations are used rather than the longer official names. --- 894,897 ---- *************** *** 913,917 **** @quotation bsd, sysv, mach, minix, genix, ! ultrix, vms, sco, esix, isc, aix, sunos, hpux, unos, luna, dgux, newsos, osfrose, osf, --- 915,919 ---- @quotation bsd, sysv, mach, minix, genix, ! ultrix, vms, sco, isc, aix, sunos, hpux, unos, luna, dgux, newsos, osfrose, osf, *************** *** 923,932 **** operating system from the CPU and company. ! Often a particular model of machine has a name. Many of these names are ! recognized as an alias for a CPU/company combination. The alias ! @samp{sun3}, mentioned above, is an example of this: it stands for ! @samp{m68k-sun}. Sometimes we accept a company name as a machine name, ! when the name is popularly used for a particular machine. Here is a ! table of the known machine names: @quotation --- 925,946 ---- operating system from the CPU and company. ! You can add a version number to the system type; this may or may not ! make a difference. For example, you can write @samp{bsd4.3} or ! @samp{bsd4.4} to distinguish versions of BSD. In practice, the version ! number is most needed for @samp{sysv3} and @samp{sysv4}, which are often ! treated differently. ! ! If you specify an impossible combination such as @samp{i860-dg-vms}, ! then you may get an error message from @file{configure}, or it may ! ignore part of the information and do the best it can with the rest. ! @file{configure} always prints the canonical name for the alternative ! that it used. ! ! Often a particular model of machine has a name. Many machine names are ! recognized as aliases for CPU/company combinations. Thus, the machine ! name @samp{sun3}, mentioned above, is an alias for @samp{m68k-sun}. ! Sometimes we accept a company name as a machine name, when the name is ! popularly used for a particular machine. Here is a table of the known ! machine names: @quotation *************** *** 945,953 **** @end quotation ! If you specify an impossible combination such as @samp{i860-dg-vms}, ! then you may get an error message from @file{configure}, or it may ! ignore part of the information and do the best it can with the rest. ! @file{configure} always prints the canonical name for the alternative ! that it used. On certain systems, you must specify whether you want GNU CC to work with --- 959,965 ---- @end quotation ! @noindent ! Remember that a machine name specifies both the cpu type and the company ! name. On certain systems, you must specify whether you want GNU CC to work with *************** *** 975,979 **** @file{xm-m68k-local.h}, @file{t-m68k-local}, and @file{x-m68k-local}. ! Here is a list of configurations that have special treatment: @table @samp --- 987,992 ---- @file{xm-m68k-local.h}, @file{t-m68k-local}, and @file{x-m68k-local}. ! Here is a list of configurations that have special treatment or special ! things you must know: @table @samp *************** *** 1002,1005 **** --- 1015,1027 ---- @end ignore + @item hppa-hp-hpux + HP precision architecture, running HP-UX. @samp{-g} does not work + on this configuration, since the system uses a peculiar debugging + format which GNU CC does not know about. + + @item i386-*-sco + Compilation with RCC is recommended, but it produces lots of spurious + warnings. They do not necessarily indicate that anything is wrong. + @item m68000-att AT&T 3b1, a.k.a. 7300 PC. Special procedures are needed to compile GNU *************** *** 1019,1027 **** @item m68k-hp-hpux ! HP 9000 series 200 or 300 running HPUX. GNU CC does not support the ! special symbol table used by HP's debugger, but you can debug programs ! with GDB if you specify @samp{--gas} to use the GNU tools instead. In ! order to use the GNU tools, you must install a library conversion ! program called @code{hpxt}. @item m68k-sun --- 1041,1051 ---- @item m68k-hp-hpux ! HP 9000 series 300 or 400 running HP-UX. HP-UX version 8.0 has a bug in ! the assembler that prevents compilation of GNU CC. To fix it, get patch ! PHCO_0800 from HP. ! ! In addition, @samp{--gas} does not currently work with this ! configuration. Changes in HP-UX have broken the library conversion tool ! and the linker. @item m68k-sun *************** *** 1039,1042 **** --- 1063,1073 ---- @end example + @item mips-mips-bsd + MIPS machines running the MIPS operating system in BSD mode. It's + possible that some old versions of the system lack the functions + @code{memcpy}, @code{memcmp}, and @code{memset}. If your system lacks + these, you must remove or undo the definition of + @code{TARGET_MEM_FUNCTIONS} in @file{mips-bsd.h}. + @item ns32k-encore Encore ns32000 system. Encore systems are supported only under BSD. *************** *** 1052,1059 **** binaries of GNU CC for bootstrapping. ! @item rs6000-ibm ! IBM PowerStation/6000 machines. Due to the nonstandard debugging ! information required for this machine, @samp{-g} is not available in ! this configuration. @item vax-dec-ultrix --- 1083,1089 ---- binaries of GNU CC for bootstrapping. ! @item pyramid ! The Pyramid C compler is reported to be unable to compile GNU CC. ! You must use an older version of GNU CC for bootstrapping. @item vax-dec-ultrix *************** *** 1232,1236 **** serious bug which you should investigate and report (@pxref{Bugs}). ! On systems that use COFF object files, bytes 5 to 8 will always be different, since it is a timestamp. On these systems, you can do the comparison as follows (in Bourne shell): --- 1262,1267 ---- serious bug which you should investigate and report (@pxref{Bugs}). ! On systems that use COFF object files, or an object file format that is ! a superset of COFF (such as ECOFF or XCOFF), bytes 5 to 8 will always be different, since it is a timestamp. On these systems, you can do the comparison as follows (in Bourne shell): *************** *** 1244,1257 **** @end example ! On MIPS machines, you need to use the shell script @file{ecoff-cmp} ! to compare two object files if you have built the compiler with ! the @samp{-mno-mips-tfile} option. Thus, do this: - @example - for file in *.o; do - ecoff-cmp $file stage2/$file - done - @end example - @item Install the compiler driver, the compiler's passes and run-time support. --- 1275,1281 ---- @end example ! If you have built the compiler with the @samp{-mno-mips-tfile} option on ! MIPS machines, you will not be able to compare the files. @item Install the compiler driver, the compiler's passes and run-time support. *************** *** 1268,1272 **** This copies the files @file{cc1}, @file{cpp} and @file{libgcc.a} to files @file{cc1}, @file{cpp} and @file{libgcc.a} in directory ! @file{/usr/local/lib/gcc/@var{target}/@var{version}}, which is where the compiler driver program looks for them. Here @var{target} is the target machine type specified when you ran @file{configure}, and @var{version} --- 1292,1296 ---- This copies the files @file{cc1}, @file{cpp} and @file{libgcc.a} to files @file{cc1}, @file{cpp} and @file{libgcc.a} in directory ! @file{/usr/local/lib/gcc-lib/@var{target}/@var{version}}, which is where the compiler driver program looks for them. Here @var{target} is the target machine type specified when you ran @file{configure}, and @var{version} *************** *** 1279,1286 **** @cindex @code{alloca} and SunOs ! @strong{Warning: there is a bug in @code{alloca} in the Sun library. ! To avoid this bug, install the binaries of GNU CC that were compiled ! by GNU CC. They use @code{alloca} as a built-in function and never ! the one in the library.} @item --- 1303,1315 ---- @cindex @code{alloca} and SunOs ! @strong{Warning: there is a bug in @code{alloca} in the Sun library. To ! avoid this bug, be sure to install the executables of GNU CC that were ! compiled by GNU CC. (That is, the executables from stage 2 or 3, not ! stage 1.) They use @code{alloca} as a built-in function and never the ! one in the library.} ! ! (It is usually better to install GNU CC executables from stage 2 or 3, ! since they usually run faster than the ones compiled with some other ! compiler.) @item *************** *** 1373,1377 **** @item ! Go to that directory before running @file{configure}: @example --- 1402,1415 ---- @item ! If you have ever run @file{configure} in the source directory, you must undo ! the configuration. Do this by running: ! ! @example ! make cleanconfig ! @end example ! ! @item ! Go to the directory in which you want to build the compiler before ! running @file{configure}: @example *************** *** 1434,1438 **** @end example ! @node 3b1 Install, SCO Install, Sun Install, Installation @section Installing GNU CC on the 3b1 @cindex 3b1 installation --- 1472,1476 ---- @end example ! @node 3b1 Install, Unos Install, Sun Install, Installation @section Installing GNU CC on the 3b1 @cindex 3b1 installation *************** *** 1476,1510 **** @end enumerate ! @node SCO Install, Unos Install, 3B1 Install, Installation ! @section Installing GNU CC on SCO System V 3.2 ! @cindex SCO installation ! @cindex installation on SCO systems ! ! The compiler that comes with this system does not work properly with ! @samp{-O}. Therefore, you should redefine the Make variable ! @code{CCLIBFLAGS} not to use @samp{-O}. ! ! In addition, the compiler produces incorrect output when compiling parts ! of GNU CC; the resulting executable @file{cc1} does not work properly ! when it is used with @samp{-O}. ! ! Therefore, what you must do after building the first stage ! is use GNU CC to compile itself without optimization. Here is how: ! ! @example ! make -k cc1 CC="./gcc -B./" ! @end example ! ! You can think of this as ``stage 1.1'' of the installation process. ! However, using this command has the effect of discarding the faulty ! stage 1 executable for @file{cc1} and replacing it with stage 1.1. You ! can then proceed with @samp{make stage1} and the rest of installation. ! ! On Xenix, the same thing is necessary; in addition, you may have to ! remove @samp{-g} from the options used with @code{cc}, and you may have ! to simplify complicated statements in the sources of GNU CC to get them ! to compile. ! ! @node Unos Install, VMS Install, SCO Install, Installation @section Installing GNU CC on Unos @cindex Unos installation --- 1514,1518 ---- @end enumerate ! @node Unos Install, VMS Install, 3b1 Install, Installation @section Installing GNU CC on Unos @cindex Unos installation *************** *** 1562,1567 **** @smallexample ! $ assign /super /system disk:[gcc.] gnu_cc ! $ assign /super /system disk:[gcc.include.] gnu_cc_include @end smallexample --- 1570,1577 ---- @smallexample ! $ assign /system /translation=concealed - ! disk:[gcc.] gnu_cc ! $ assign /system /translation=concealed - ! disk:[gcc.include.] gnu_cc_include @end smallexample *************** *** 1576,1580 **** @smallexample ! $ set command /table=sys$library:dcltables gnu_cc:[000000]gcc @end smallexample --- 1586,1592 ---- @smallexample ! $ set command /table=sys$common:[syslib]dcltables - ! /output=sys$common:[syslib]dcltables gnu_cc:[000000]gcc ! $ install replace sys$common:[syslib]dcltables @end smallexample *************** *** 1602,1606 **** @smallexample ! $ assign /super /system disk:[gcc.gxx_include.] gnu_gxx_include @end smallexample --- 1614,1619 ---- @smallexample ! $ assign /system /translation=concealed - ! disk:[gcc.gxx_include.] gnu_gxx_include @end smallexample *************** *** 1607,1612 **** @noindent with the appropriate disk and directory name. If you are going to be ! using libg++, you should place the libg++ header files in the directory ! that this logical name points to. @item --- 1620,1625 ---- @noindent with the appropriate disk and directory name. If you are going to be ! using libg++, this is where the libg++ install procedure will install ! the libg++ header files. @item *************** *** 1614,1628 **** directory that @file{gcc-cc1.exe} is kept. - @item - You will need several library functions which are used to call the - constructors and destructors for global objects. These functions are - part of the libg++ distribution, and you will automatically get them if - you install libg++. - - If you are not planning to install libg++, you will need to obtain the - files @file{gxx-startup-1.mar} and @file{gstart.cc} from the libg++ - distribution, compile them, and supply them to the linker whenever you - link a C++ program. - The GNU C++ compiler can be invoked with a command like @samp{gcc /plus /verbose file.cc}, which is equivalent to the command @samp{g++ -v -c --- 1627,1630 ---- *************** *** 1654,1658 **** @smallexample ! $ assign /super /system disk:[bison.] gnu_bison @end smallexample --- 1656,1661 ---- @smallexample ! $ assign /system /translation=concealed - ! disk:[bison.] gnu_bison @end smallexample *************** *** 1664,1668 **** @smallexample ! $ set command /table=sys$library:dcltables gnu_bison:[000000]bison @end smallexample --- 1667,1674 ---- @smallexample ! $ set command /table=sys$common:[syslib]dcltables - ! /output=sys$common:[syslib]dcltables - ! gnu_bison:[000000]bison ! $ install replace sys$common:[syslib]dcltables @end smallexample *************** *** 1674,1677 **** --- 1680,1707 ---- in the comments.@refill + @item + In order to use GCC, you need a library of functions which GCC compiled code + will call to perform certain tasks, and these functions are defined in the + file @file{libgcc2.c}. To compile this you should use the command procedure + @file{make-l2.com}, which will generate the library @file{libgcc2.olb}. + @file{libgcc2.olb} should be built using the compiler built from + the same distribution that @file{libgcc2.c} came from, and + @file{make-gcc.com} will automatically do all of this for you. + + To install the library, use the following commands:@refill + + @smallexample + $ lib gnu_cc:[000000]gcclib/delete=(new,eprintf) + $ lib libgcc2/extract=*/output=libgcc2.obj + $ lib gnu_cc:[000000]gcclib libgcc2.obj + @end smallexample + + The first command simply removes old modules that will be replaced with modules + from libgcc2. If the VMS librarian complains about those modules not being + present, simply ignore the message and continue on with the next command. + + Whenever you update the compiler on your system, you should also update the + library with the above procedure. + @strong{If you are building GNU CC with a previous version of GNU CC, you also should check to see that you have the newest version of the *************** *** 1734,1737 **** --- 1764,1788 ---- @item + If you encounter seemingly strange errors when trying to build the + compiler in a directory other than the source directory, make sure you + have done all the necessary preparations. @xref{Other Dir}. + + @item + In previous versions of GNU CC, the @code{gcc} driver program looked for + @code{as} and @code{ld} in various places such as files beginning with + @file{/usr/local/lib/gcc-}. GNU CC version 2 looks for them in the + directory @file{/usr/local/lib/gcc/@var{target}/@var{version}}. + + Thus, to use a version of @code{as} or @code{ld} that is not the system + default, for example @code{gas} or GNU @code{ld}, you must put them in + that directory (or make links to them from that directory). + + @item + Some commands executed when making the compiler may fail (return a + non-zero status) and be ignored by @code{make}. These failes, which are + often due to files that were not found, are expected, and can safely be + ignored. + + @item Cross compilation can run into trouble for certain machines because some target machines' assemblers require floating point numbers to be *************** *** 1816,1819 **** --- 1867,1884 ---- @item + Programs that use preprocessor directives in the middle of macro + arguments do not work with GNU CC. For example, a program like this + will not work: + + @example + foobar ( + #define luser + hack) + @end example + + ANSI C does not permit such a construct, and it does not seem worth the + trouble of implementing, given that it is not required. + + @item Certain local variables aren't recognized by debuggers when you compile with optimization. *************** *** 1828,1831 **** --- 1893,1907 ---- executable and your source code, when you use optimization. + @item + @code{-2147483648} is positive. + + This is because 2147483648 cannot fit in the type @code{int}, so + (following the ANSI C rules) its data type is @code{unsigned long int}. + Negating this value yields 2147483648 again. + + @item + The GNU assembler (GAS) does not support PIC. To generate PIC code, you + must use some other assembler, such as @file{/bin/as}. + @ignore @cindex @code{vfork}, for the Sun-4 *************** *** 1844,1861 **** @end ignore - @item - @code{-2147483648} is positive. - - This is because 2147483648 cannot fit in the type @code{int}, so - (following the ANSI C rules) its data type is @code{unsigned long int}. - Negating this value yields 2147483648 again. - @cindex @code{genflags}, crash on Sun 4 @item Sometimes on a Sun 4 you may observe a crash in the program ! @code{genflags} while building GCC. This is said to be due to a bug in ! @code{sh}. You can probably get around it by running @code{genflags} ! manually and then retrying the @code{make}. @item On some versions of Ultrix, the system supplied compiler cannot compile --- 1920,1943 ---- @end ignore @cindex @code{genflags}, crash on Sun 4 @item Sometimes on a Sun 4 you may observe a crash in the program ! @code{genflags} or @code{genoutput} while building GCC. This is said to ! be due to a bug in @code{sh}. You can probably get around it by running ! @code{genflags} or @code{genoutput} manually and then retrying the ! @code{make}. ! ! @item ! On a Sun, linking using GNU CC fails to find a shared library and ! reports that the library doesn't exist at all. ! ! This happens if you are using the GNU linker, because it does only ! static linking and looks only for unshared libraries. If you have a ! shared library with no unshared counterpart, the GNU linker won't find ! anything. + We hope to make a linker which supports Sun shared libraries, but please + don't ask when it will be finished---we don't know. + @item On some versions of Ultrix, the system supplied compiler cannot compile *************** *** 1869,1872 **** --- 1951,2004 ---- @item + On HP 9000 series 300 or 400 running HP-UX release 8.0, there is a bug + in the assembler that must be fixed before GNU CC can be built. This + bug manifests itself during the first stage of compilation, while + building @file{libgcc2.a}: + + @example + _floatdisf + cc1: warning: `-g' option not supported on this version of GCC + cc1: warning: `-g1' option not supported on this version of GCC + ./gcc: Internal compiler error: program as got fatal signal 11 + @end example + + A patched version of the assembler is available by anonymous ftp from + @code{altdorf.ai.mit.edu} as the file + @file{archive/cph/hpux-8.0-assembler}. If you have HP software support, + the patch can also be obtained directly from HP, as described in the + following note: + + @quotation + This is the patched assembler, to patch SR#1653-010439, where the + assembler aborts on floating point constants. + + The bug is not really in the assembler, but in the shared library + version of the function ``cvtnum(3c)''. The bug on ``cvtnum(3c)'' is + SR#4701-078451. Anyway, the attached assembler uses the archive + library version of ``cvtnum(3c)'' and thus does not exhibit the bug. + @end quotation + + This patch is also known as PHCO_0800. + + @item + The current version of the assembler (@file{/bin/as}) for the RS/6000 + has certain problems that prevent the @samp{-g} option in GCC from + working. + + IBM has produced a fixed version of the assembler. The replacement + assembler is not a standard component of either AIX 3.1.5 or AIX 3.2, + but is expected to become standard in a future distribution. This + assembler is available from IBM as APAR IX22829. See the file + @file{README.RS6000} for more details on how to obtain this assembler. + + @item + Sun forgot to include a static version of @file{libdl.a} with some + versions of SunOS (mainly 4.1). This results in undefined symbols when + linking static binaries (that is, if you use @samp{-static}). If you + see undefined symbols @code{_dlclose}, @code{_dlsym} or @code{_dlopen} + when linking, compile and link against the file + @file{mit/util/misc/dlsym.c} from the MIT version of X windows. + + @item On the IBM RS/6000, compiling code of the form *************** *** 1884,1887 **** --- 2016,2024 ---- bug because redefining an @code{extern} variable as @code{static} is undefined in ANSI C. + + @item + On VMS, GAS versions 1.38.1 and earlier may cause spurious warning + messages from the linker. These warning messages complain of mismatched + psect attributes. You can ignore them. @xref{VMS Install}. @end itemize *************** *** 2534,2538 **** in the same file as the called function, following the definition. The only way to check all calls reliably is to add a prototype for the ! function. But adding a prototype will eliminate the need for this feature. So the feature is not worthwhile. --- 2671,2675 ---- in the same file as the called function, following the definition. The only way to check all calls reliably is to add a prototype for the ! function. But adding a prototype eliminates the motivation for this feature. So the feature is not worthwhile. *************** *** 2550,2553 **** --- 2687,2699 ---- @item + Warning when a non-void function value is ignored. + + Coming as I do from a Lisp background, I balk at the idea that there is + something dangerous about discarding a value. There are functions that + return values which some callers may find useful; it makes no sense to + clutter the program with a cast to @code{void} whenever the value isn't + useful. + + @item Making bitfields unsigned by default on particular machines where ``the ABI standard'' says to do so. *************** *** 2573,2578 **** Both dialects are meaningful on every type of machine. Whether a particular object file was compiled using signed bitfields or unsigned ! is of no concern to functions in any other object file, even if they ! access the same bitfields in the same data structures. A given program is written in one or the other of these two dialects. --- 2719,2724 ---- Both dialects are meaningful on every type of machine. Whether a particular object file was compiled using signed bitfields or unsigned ! is of no concern to other object files, even if they access the same ! bitfields in the same data structures. A given program is written in one or the other of these two dialects. *************** *** 2596,2601 **** fashion on all types of machines (by default). (Of course, users strongly concerned about portability should indicate ! explicitly in each bitfield whether it is signed or not.) @item --- 2742,2753 ---- fashion on all types of machines (by default). + There are some arguments for making bitfields unsigned by default on all + machines. If, for example, this becomes a universal de facto standard, + it would make sense for GNU CC to go along with it. This is something + to be considered in the future. + (Of course, users strongly concerned about portability should indicate ! explicitly in each bitfield whether it is signed or not. In this way, ! they write programs which have the same meaning in both C dialects.) @item *************** *** 2623,2630 **** does not completely conform to the ANSI C standard somehow violates the standard. This is illogical. The standard is a standard for compilers ! that are supposed to conform. It says nothing about what any other ! compilers should do. Whatever the ANSI C standard says is relevant to ! the design of plain @samp{gcc} without @samp{-ansi} only for pragmatic ! reasons, not as a requirement. @item --- 2775,2782 ---- does not completely conform to the ANSI C standard somehow violates the standard. This is illogical. The standard is a standard for compilers ! that claim to support ANSI C, such as @samp{gcc -ansi}---not for other ! compilers such as plain @samp{gcc}. Whatever the ANSI C standard says ! is relevant to the design of plain @samp{gcc} without @samp{-ansi} only ! for pragmatic reasons, not as a requirement. @item *************** *** 2780,2796 **** @smallexample #ifdef __GNUC__ ! #define GLOBALREF(NAME) \ ! NAME asm("_$$PsectAttributes_GLOBALSYMBOL$$" #NAME ) ! #define GLOBALDEF(NAME,VALUE) \ ! NAME asm("_$$PsectAttributes_GLOBALSYMBOL$$" #NAME ) = VALUE ! #define GLOBALVALUEREF(NAME) \ ! const NAME [1] asm("_$$PsectAttributes_GLOBALVALUE$$" #NAME ) ! #define GLOBALVALUEDEF(NAME,VALUE) \ ! const NAME [1] asm("_$$PsectAttributes_GLOBALVALUE$$" #NAME ) = @{VALUE@} #else ! #define GLOBALREF(NAME) globalref NAME ! #define GLOBALDEF(NAME,VALUE) globaldef NAME = VALUE ! #define GLOBALVALUEDEF(NAME,VALUE) globalvalue NAME = VALUE ! #define GLOBALVALUEREF(NAME) globalvalue NAME #endif @end smallexample --- 2932,2958 ---- @smallexample #ifdef __GNUC__ ! #define GLOBALREF(TYPE,NAME) \ ! TYPE NAME \ ! asm ("_$$PsectAttributes_GLOBALSYMBOL$$" #NAME) ! #define GLOBALDEF(TYPE,NAME,VALUE) \ ! TYPE NAME \ ! asm ("_$$PsectAttributes_GLOBALSYMBOL$$" #NAME) \ ! = VALUE ! #define GLOBALVALUEREF(TYPE,NAME) \ ! const TYPE NAME[1] \ ! asm ("_$$PsectAttributes_GLOBALVALUE$$" #NAME) ! #define GLOBALVALUEDEF(TYPE,NAME,VALUE) \ ! const TYPE NAME[1] \ ! asm ("_$$PsectAttributes_GLOBALVALUE$$" #NAME) \ ! = @{VALUE@} #else ! #define GLOBALREF(TYPE,NAME) \ ! globalref TYPE NAME ! #define GLOBALDEF(TYPE,NAME,VALUE) \ ! globaldef TYPE NAME = VALUE ! #define GLOBALVALUEDEF(TYPE,NAME,VALUE) \ ! globalvalue TYPE NAME = VALUE ! #define GLOBALVALUEREF(TYPE,NAME) \ ! globalvalue TYPE NAME #endif @end smallexample *************** *** 2804,2809 **** @example ! int GLOBALREF (ijk); ! int GLOBALDEF (jkl, 0); @end example --- 2966,2971 ---- @example ! GLOBALREF (int, ijk); ! GLOBALDEF (int, jkl, 0); @end example *************** *** 2816,2820 **** @example typedef int intvector[10]; ! intvector GLOBALREF (foo); @end example --- 2978,2982 ---- @example typedef int intvector[10]; ! GLOBALREF (intvector, foo); @end example *************** *** 2832,2836 **** @example ! int GLOBALVALUEREF(ijk); @end example --- 2994,2998 ---- @example ! GLOBALVALUEREF(int, ijk); @end example *************** *** 2851,2856 **** @example ! int GLOBALVALUEREF (ss$_normal); ! int GLOBALVALUEDEF (xyzzy,123); #ifdef __GNUC__ #define ss$_normal ((int) ss$_normal) --- 3013,3018 ---- @example ! GLOBALVALUEREF (int, ss$_normal); ! GLOBALVALUEDEF (int, xyzzy,123); #ifdef __GNUC__ #define ss$_normal ((int) ss$_normal) *************** *** 2866,2873 **** @example #ifdef __GNUC__ ! int GLOBALDEF (color, 0); ! int GLOBALVALUEDEF (RED, 0); ! int GLOBALVALUEDEF (BLUE, 1); ! int GLOBALVALUEDEF (GREEN, 3); #else enum globaldef color @{RED, BLUE, GREEN = 3@}; --- 3028,3035 ---- @example #ifdef __GNUC__ ! GLOBALDEF (int, color, 0); ! GLOBALVALUEDEF (int, RED, 0); ! GLOBALVALUEDEF (int, BLUE, 1); ! GLOBALVALUEDEF (int, GREEN, 3); #else enum globaldef color @{RED, BLUE, GREEN = 3@}; *************** *** 3004,3008 **** GNU CC is normally configured to use the same function calling convention normally in use on the target system. This is done with the ! machine-description macros described (@pxref{Machine Macros}). @cindex unions, returning --- 3166,3170 ---- GNU CC is normally configured to use the same function calling convention normally in use on the target system. This is done with the ! machine-description macros described (@pxref{Target Macros}). @cindex unions, returning *************** *** 3540,3544 **** @ifset INTERNALS ! @node Config, Index, Machine Macros, Top @chapter The Configuration File @cindex configuration file --- 3702,3706 ---- @ifset INTERNALS ! @node Config, Index, Target Macros, Top @chapter The Configuration File @cindex configuration file *************** *** 3659,3662 **** --- 3821,3853 ---- handle converting a function value to a pointer-to-function when it is used in an expression. + + @findex HAVE_VPRINTF + @findex vprintf + @item HAVE_VPRINTF + Define this if the library function @code{vprintf} is available on your + system. + + @findex HAVE_PUTENV + @findex putenv + @item HAVE_PUTENV + Define this if the library function @code{putenv} is available on your + system. + + @findex NO_SYS_SIGLIST + @item NO_SYS_SIGLIST + Define this if your system @emph{does not} provide the variable + @code{sys_siglist}. + + @vindex sys_siglist + Some systems do provide this variable, but with a different name such + as @code{_sys_siglist}. On these systems, you can define + @code{sys_siglist} as a macro which expands into the name actually + provided. + + @findex NO_STAB_H + @item NO_STAB_H + Define this if your system does not have the include file + @file{stab.h}. If @samp{USG} is defined, @samp{NO_STAB_H} is + assumed. @end table diff -rc2N gcc-2.0/genattrtab.c gcc-2.1/genattrtab.c *** gcc-2.0/genattrtab.c Fri Jan 17 21:41:51 1992 --- gcc-2.1/genattrtab.c Sat Mar 14 00:03:58 1992 *************** *** 22,26 **** DEFINE_FUNCTION_UNIT definitions. ! It produces a series of functions call `get_attr_...', one for each attribute. Each of these is given the rtx for an insn and returns a member of the enum for the attribute. --- 22,26 ---- DEFINE_FUNCTION_UNIT definitions. ! It produces a series of functions named `get_attr_...', one for each insn attribute. Each of these is given the rtx for an insn and returns a member of the enum for the attribute. *************** *** 45,48 **** --- 45,55 ---- `get_attr_length'. + A special form of DEFINE_ATTR, where the expression for default value is a + CONST expression, indicates an attribute that is constant for a given run + of the compiler. The subroutine generated for these attributes has no + parameters as it does not depend on any particular insn. Constant + attributes are typically used to specify which variety of processor is + used. + Internal attributes are defined to handle DEFINE_DELAY and DEFINE_FUNCTION_UNIT. Special routines are output for these cases. *************** *** 67,73 **** Once optimization is complete, any required routines and definitions ! will be written. */ #include #include "config.h" #include "rtl.h" --- 74,89 ---- Once optimization is complete, any required routines and definitions ! will be written. + An optimization that is not yet implemented is to hoist the constant + expressions entirely out of the routines and definitions that are written. + A way to do this is to iterate over all possible combinations of values + for constant attributes and generate a set of functions for that given + combination. An initialization function would be written that evaluates + the attributes and installs the corresponding set of routines and + definitions (each would be accessed through a pointer). */ + #include + #include "gvarargs.h" #include "config.h" #include "rtl.h" *************** *** 134,137 **** --- 150,154 ---- struct attr_desc *next; /* Next attribute. */ int is_numeric; /* Values of this attribute are numeric. */ + int is_const; /* Attribute value constant for each run. */ int is_special; /* Don't call `write_attr_set'. */ struct attr_value *first_value; /* First value of this attribute. */ *************** *** 225,228 **** --- 242,248 ---- rtx frame_pointer_rtx, stack_pointer_rtx, arg_pointer_rtx; + static rtx attr_rtx (); + static char *attr_printf (); + static char *attr_string (); static rtx check_attr_test (); static void check_attr_value (); *************** *** 230,233 **** --- 250,254 ---- static rtx convert_set_attr (); static void check_defs (); + static rtx convert_const_symbol_ref (); static rtx make_canonical (); static struct attr_value *get_attr_value (); *************** *** 284,288 **** --- 305,606 ---- static void fatal (); + /* Hash table for sharing RTL and strings. */ + + /* Each hash table slot is a bucket containing a chain of these structures. + Strings are given negative hash codes; RTL expressions are given positive + hash codes. */ + + struct attr_hash + { + struct attr_hash *next; /* Next structure in the bucket. */ + int hashcode; /* Hash code of this rtx or string. */ + union + { + char *str; /* The string (negative hash codes) */ + rtx rtl; /* or the RTL recorded here. */ + } u; + }; + + /* Now here is the hash table. When recording an RTL, it is added to + the slot whose index is the hash code mod the table size. Note + that the hash table is used for several kinds of RTL (see attr_rtx) + and for strings. While all these live in the same table, they are + completely independent, and the hash code is computed differently + for each. */ + + #define RTL_HASH_SIZE 4093 + struct attr_hash *attr_hash_table[RTL_HASH_SIZE]; + + /* Here is how primitive or already-shared RTL's hash + codes are made. */ + #define RTL_HASH(RTL) ((int) (RTL) & 0777777) + + /* Add an entry to the hash table for RTL with hash code HASHCODE. */ + + static void + attr_hash_add_rtx (hashcode, rtl) + int hashcode; + rtx rtl; + { + register struct attr_hash *h; + + h = (struct attr_hash *) xmalloc (sizeof (struct attr_hash)); + h->hashcode = hashcode; + h->u.rtl = rtl; + h->next = attr_hash_table[hashcode % RTL_HASH_SIZE]; + attr_hash_table[hashcode % RTL_HASH_SIZE] = h; + } + + /* Add an entry to the hash table for STRING with hash code HASHCODE. */ + + static void + attr_hash_add_string (hashcode, str) + int hashcode; + char *str; + { + register struct attr_hash *h; + + h = (struct attr_hash *) xmalloc (sizeof (struct attr_hash)); + h->hashcode = -hashcode; + h->u.str = str; + h->next = attr_hash_table[hashcode % RTL_HASH_SIZE]; + attr_hash_table[hashcode % RTL_HASH_SIZE] = h; + } + + /* Generate an RTL expression, but allow sharing. Like gen_rtx, but the + mode is not used: + + rtx attr_rtx (code, [element1, ..., elementn]) */ + + /*VARARGS1*/ + static rtx + attr_rtx (va_alist) + va_dcl + { + va_list p; + enum rtx_code code; + register int i; /* Array indices... */ + register char *fmt; /* Current rtx's format... */ + register rtx rt_val; /* RTX to return to caller... */ + int hashcode; + register struct attr_hash *h; + + va_start (p); + code = va_arg (p, enum rtx_code); + + /* For each of several cases, search the hash table for an existing entry. + Use that entry if one is found; otherwise create a new RTL and add it + to the table. */ + + if (GET_RTX_CLASS (code) == '1') + { + rtx arg0 = va_arg (p, rtx); + + hashcode = (code + RTL_HASH (arg0)); + for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next) + if (h->hashcode == hashcode + && GET_CODE (h->u.rtl) == code + && XEXP (h->u.rtl, 0) == arg0) + goto found; + + if (h == 0) + { + rt_val = rtx_alloc (code); + XEXP (rt_val, 0) = arg0; + } + } + else if (GET_RTX_CLASS (code) == 'c' + || GET_RTX_CLASS (code) == '2' + || GET_RTX_CLASS (code) == '<') + { + rtx arg0 = va_arg (p, rtx); + rtx arg1 = va_arg (p, rtx); + + hashcode = (code + RTL_HASH (arg0) + RTL_HASH (arg1)); + for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next) + if (h->hashcode == hashcode + && GET_CODE (h->u.rtl) == code + && XEXP (h->u.rtl, 0) == arg0 + && XEXP (h->u.rtl, 1) == arg1) + goto found; + + if (h == 0) + { + rt_val = rtx_alloc (code); + XEXP (rt_val, 0) = arg0; + XEXP (rt_val, 1) = arg1; + } + } + else if (GET_RTX_LENGTH (code) == 1 + && GET_RTX_FORMAT (code)[0] == 's') + { + char * arg0 = va_arg (p, char *); + + hashcode = (code + RTL_HASH (arg0)); + for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next) + if (h->hashcode == hashcode + && GET_CODE (h->u.rtl) == code + && XSTR (h->u.rtl, 0) == arg0) + goto found; + + if (h == 0) + { + rt_val = rtx_alloc (code); + XSTR (rt_val, 0) = arg0; + } + } + else if (GET_RTX_LENGTH (code) == 2 + && GET_RTX_FORMAT (code)[0] == 's' + && GET_RTX_FORMAT (code)[1] == 's') + { + char * arg0 = va_arg (p, char *); + char * arg1 = va_arg (p, char *); + + hashcode = (code + RTL_HASH (arg0) + RTL_HASH (arg1)); + for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next) + if (h->hashcode == hashcode + && GET_CODE (h->u.rtl) == code + && XSTR (h->u.rtl, 0) == arg0 + && XSTR (h->u.rtl, 1) == arg1) + goto found; + + if (h == 0) + { + rt_val = rtx_alloc (code); + XSTR (rt_val, 0) = arg0; + XSTR (rt_val, 1) = arg1; + } + } + else + { + rt_val = rtx_alloc (code); /* Allocate the storage space. */ + + fmt = GET_RTX_FORMAT (code); /* Find the right format... */ + for (i = 0; i < GET_RTX_LENGTH (code); i++) + { + switch (*fmt++) + { + case '0': /* Unused field. */ + break; + + case 'i': /* An integer? */ + XINT (rt_val, i) = va_arg (p, int); + break; + + case 's': /* A string? */ + XSTR (rt_val, i) = va_arg (p, char *); + break; + + case 'e': /* An expression? */ + case 'u': /* An insn? Same except when printing. */ + XEXP (rt_val, i) = va_arg (p, rtx); + break; + + case 'E': /* An RTX vector? */ + XVEC (rt_val, i) = va_arg (p, rtvec); + break; + + default: + abort(); + } + } + va_end (p); + return rt_val; + } + + va_end (p); + attr_hash_add_rtx (hashcode, rt_val); + return rt_val; + + found: + va_end (p); + return h->u.rtl; + } + + /* Create a new string printed with the printf line arguments into a space + of at most LEN bytes: + + rtx attr_printf (len, format, [arg1, ..., argn]) */ + + #ifdef HAVE_VPRINTF + + /*VARARGS2*/ + static char * + attr_printf (va_alist) + va_dcl + { + va_list p; + register int len; + register char *fmt; + register char *str; + + /* Print the string into a temporary location. */ + va_start (p); + len = va_arg (p, int); + str = (char *) alloca (len); + fmt = va_arg (p, char *); + vsprintf (str, fmt, p); + va_end (p); + + return attr_string (str, strlen (str)); + } + + #else /* not HAVE_VPRINTF */ + + static char * + attr_printf (len, fmt, arg1, arg2, arg3) + int len; + char *fmt; + char *arg1, *arg2, *arg3; /* also int */ + { + register char *str; + + /* Print the string into a temporary location. */ + str = (char *) alloca (len); + sprintf (str, fmt, arg1, arg2, arg3); + + return attr_string (str, strlen (str)); + } + #endif /* not HAVE_VPRINTF */ + + /* Return a permanent (possibly shared) copy of a string STR (not assumed + to be null terminated) with LEN bytes. */ + + static char * + attr_string (str, len) + char *str; + int len; + { + register struct attr_hash *h; + int hashcode; + int i; + register char *new_str; + + /* Compute the hash code. */ + hashcode = (len + 1) * 613 + (unsigned)str[0]; + for (i = 1; i <= len; i += 2) + hashcode = ((hashcode * 613) + (unsigned)str[i]); + if (hashcode < 0) + hashcode = -hashcode; + + /* Search the table for the string. */ + for (h = attr_hash_table[hashcode % RTL_HASH_SIZE]; h; h = h->next) + if (h->hashcode == -hashcode + && !strncmp (h->u.str, str, len)) + return h->u.str; /* <-- return if found. */ + + /* Not found; create a permanent copy and add it to the hash table. */ + new_str = (char *) xmalloc (len + 1); + bcopy (str, new_str, len); + new_str[len] = '\0'; + attr_hash_add_string (hashcode, new_str); + + return new_str; /* Return the new string. */ + } + /* Given a test expression for an attribute, ensure it is validly formed. + IS_CONST indicates whether the expression is constant for each compiler + run (a constant expression may not test any particular insn). + Convert (eq_attr "att" "a1,a2") to (ior (eq_attr ... ) (eq_attrq ..)) and (eq_attr "att" "!a1") to (not (eq_attr "att" "a1")). Do the latter *************** *** 296,301 **** static rtx ! check_attr_test (exp) rtx exp; { struct attr_desc *attr; --- 614,620 ---- static rtx ! check_attr_test (exp, is_const) rtx exp; + int is_const; { struct attr_desc *attr; *************** *** 309,319 **** /* Handle negation test. */ if (XSTR (exp, 1)[0] == '!') ! { ! XSTR(exp, 1) = &XSTR(exp, 1)[1]; ! newexp = rtx_alloc (NOT); ! XEXP (newexp, 0) = exp; ! ! return check_attr_test (newexp); ! } else if (n_comma_elts (XSTR (exp, 1)) == 1) --- 628,636 ---- /* Handle negation test. */ if (XSTR (exp, 1)[0] == '!') ! return check_attr_test (attr_rtx (NOT, ! attr_rtx (EQ_ATTR, ! XSTR (exp, 0), ! &XSTR(exp, 1)[1])), ! is_const); else if (n_comma_elts (XSTR (exp, 1)) == 1) *************** *** 333,336 **** --- 650,657 ---- } + if (is_const && ! attr->is_const) + fatal ("Constant expression uses insn attribute `%s' in EQ_ATTR", + XEXP (exp, 0)); + XSTR (exp, 0) = attr->name; *************** *** 361,371 **** while ((p = next_comma_elt (&name_ptr)) != NULL) { ! newexp = rtx_alloc (EQ_ATTR); ! XSTR (newexp, 0) = XSTR (exp, 0); ! XSTR (newexp, 1) = p; orexp = insert_right_side (IOR, orexp, newexp, -2); } ! return check_attr_test (orexp); } break; --- 682,690 ---- while ((p = next_comma_elt (&name_ptr)) != NULL) { ! newexp = attr_rtx (EQ_ATTR, XSTR (exp, 0), p); orexp = insert_right_side (IOR, orexp, newexp, -2); } ! return check_attr_test (orexp, is_const); } break; *************** *** 380,392 **** case IOR: case AND: ! XEXP (exp, 0) = check_attr_test (XEXP (exp, 0)); ! XEXP (exp, 1) = check_attr_test (XEXP (exp, 1)); break; case NOT: ! XEXP (exp, 0) = check_attr_test (XEXP (exp, 0)); break; case MATCH_OPERAND: case LE: case LT: case GT: case GE: case LEU: case LTU: case GTU: case GEU: --- 699,715 ---- case IOR: case AND: ! XEXP (exp, 0) = check_attr_test (XEXP (exp, 0), is_const); ! XEXP (exp, 1) = check_attr_test (XEXP (exp, 1), is_const); break; case NOT: ! XEXP (exp, 0) = check_attr_test (XEXP (exp, 0), is_const); break; case MATCH_OPERAND: + if (is_const) + fatal ("RTL operator \"%s\" not valid in constant attribute test", + GET_RTX_NAME (MATCH_OPERAND)); + case LE: case LT: case GT: case GE: case LEU: case LTU: case GTU: case GEU: *************** *** 396,399 **** --- 719,730 ---- break; + case SYMBOL_REF: + if (is_const) + { + /* These cases are valid for constant attributes, but can't be + simplified. */ + RTX_UNCHANGING_P (exp) = 1; + break; + } default: fatal ("RTL operator \"%s\" not valid in attribute test", *************** *** 455,459 **** case IF_THEN_ELSE: ! XEXP (exp, 0) = check_attr_test (XEXP (exp, 0)); check_attr_value (XEXP (exp, 1), attr); check_attr_value (XEXP (exp, 2), attr); --- 786,791 ---- case IF_THEN_ELSE: ! XEXP (exp, 0) = check_attr_test (XEXP (exp, 0), ! attr ? attr->is_const : 0); check_attr_value (XEXP (exp, 1), attr); check_attr_value (XEXP (exp, 2), attr); *************** *** 466,470 **** for (i = 0; i < XVECLEN (exp, 0); i += 2) { ! XVECEXP (exp, 0, i) = check_attr_test (XVECEXP (exp, 0, i)); check_attr_value (XVECEXP (exp, 0, i + 1), attr); } --- 798,803 ---- for (i = 0; i < XVECLEN (exp, 0); i += 2) { ! XVECEXP (exp, 0, i) = check_attr_test (XVECEXP (exp, 0, i), ! attr ? attr->is_const : 0); check_attr_value (XVECEXP (exp, 0, i + 1), attr); } *************** *** 473,476 **** --- 806,816 ---- return; + case SYMBOL_REF: + if (attr && attr->is_const) + /* A constant SYMBOL_REF is valid as a constant attribute test and + is expanded later by make_canonical into a COND. */ + return; + /* Otherwise, fall through... */ + default: fatal ("Illegal operation `%s' for attribute value", *************** *** 503,510 **** for (i = 0; i < num_alt - 1; i++) { XVECEXP (condexp, 0, 2 * i) = rtx_alloc (EQ_ATTR); XSTR (XVECEXP (condexp, 0, 2 * i), 0) = alternative_name; ! XSTR (XVECEXP (condexp, 0, 2 * i), 1) = (char *) xmalloc (3); ! sprintf (XSTR (XVECEXP (condexp, 0, 2 * i), 1), "%d", i); XVECEXP (condexp, 0, 2 * i + 1) = XVECEXP (exp, 1, i); } --- 843,853 ---- for (i = 0; i < num_alt - 1; i++) { + char *p; + p = attr_printf (3, "%d", i); + + /* Sharing this EQ_ATTR rtl causes trouble. */ XVECEXP (condexp, 0, 2 * i) = rtx_alloc (EQ_ATTR); XSTR (XVECEXP (condexp, 0, 2 * i), 0) = alternative_name; ! XSTR (XVECEXP (condexp, 0, 2 * i), 1) = p; XVECEXP (condexp, 0, 2 * i + 1) = XVECEXP (exp, 1, i); } *************** *** 512,521 **** XEXP (condexp, 1) = XVECEXP (exp, 1, i); ! newexp = rtx_alloc (SET); ! XEXP (newexp, 0) = rtx_alloc (ATTR); ! XSTR (XEXP (newexp, 0), 0) = XSTR (exp, 0); ! XEXP (newexp, 1) = condexp; ! ! return newexp; } --- 855,859 ---- XEXP (condexp, 1) = XVECEXP (exp, 1, i); ! return attr_rtx (SET, attr_rtx (ATTR, XSTR (exp, 0)), condexp); } *************** *** 537,549 **** n = n_comma_elts (XSTR (exp, 1)); if (n == 1) ! { ! newexp = rtx_alloc (SET); ! XEXP (newexp, 0) = rtx_alloc (ATTR); ! XSTR (XEXP (newexp, 0), 0) = XSTR (exp, 0); ! XEXP (newexp, 1) = rtx_alloc (CONST_STRING); ! XSTR (XEXP (newexp, 1), 0) = XSTR (exp, 1); ! ! return newexp; ! } newexp = rtx_alloc (SET_ATTR_ALTERNATIVE); --- 875,881 ---- n = n_comma_elts (XSTR (exp, 1)); if (n == 1) ! return attr_rtx (SET, ! attr_rtx (ATTR, XSTR (exp, 0)), ! attr_rtx (CONST_STRING, XSTR (exp, 1))); newexp = rtx_alloc (SET_ATTR_ALTERNATIVE); *************** *** 555,562 **** n = 0; while ((p = next_comma_elt (&name_ptr)) != NULL) ! { ! XVECEXP (newexp, 1, n) = rtx_alloc (CONST_STRING); ! XSTR (XVECEXP (newexp, 1, n++), 0) = p; ! } return convert_set_attr_alternative (newexp, num_alt, insn_code, insn_index); --- 887,891 ---- n = 0; while ((p = next_comma_elt (&name_ptr)) != NULL) ! XVECEXP (newexp, 1, n++) = attr_rtx (CONST_STRING, p); return convert_set_attr_alternative (newexp, num_alt, insn_code, insn_index); *************** *** 617,620 **** --- 946,999 ---- } + /* Given a constant SYMBOL_REF expression, convert to a COND that + explicitly tests each enumerated value. */ + + static rtx + convert_const_symbol_ref (exp, attr) + rtx exp; + struct attr_desc *attr; + { + rtx condexp; + struct attr_value *av; + int i; + int num_alt = 0; + + for (av = attr->first_value; av; av = av->next) + num_alt++; + + /* Make a COND with all tests but the last, and in the original order. + Select the last value via the default. Note that the attr values + are constructed in reverse order. */ + + condexp = rtx_alloc (COND); + XVEC (condexp, 0) = rtvec_alloc ((num_alt - 1) * 2); + av = attr->first_value; + XEXP (condexp, 1) = av->value; + + for (i = num_alt - 2; av = av->next, i >= 0; i--) + { + char * p; + rtx value; + + XVECEXP (condexp, 0, 2 * i) = rtx_alloc (EQ); + XEXP (XVECEXP (condexp, 0, 2 * i), 0) = exp; + XEXP (XVECEXP (condexp, 0, 2 * i), 1) = value = rtx_alloc (SYMBOL_REF); + RTX_UNCHANGING_P (value) = 1; + XSTR (value, 0) = p = (char *) xmalloc (2 + + strlen (attr->name) + + strlen (XSTR (av->value, 0))); + strcpy (p, attr->name); + strcat (p, "_"); + strcat (p, XSTR (av->value, 0)); + for (; *p != '\0'; p++) + if (*p >= 'a' && *p <= 'z') + *p -= 'a' - 'A'; + + XVECEXP (condexp, 0, 2 * i + 1) = av->value; + } + + return condexp; + } + /* Given a valid expression for an attribute value, remove any IF_THEN_ELSE expressions by converting them into a COND. This removes cases from this *************** *** 646,649 **** --- 1025,1039 ---- break; + case SYMBOL_REF: + if (!attr->is_const || RTX_UNCHANGING_P (exp)) + break; + RTX_UNCHANGING_P (exp) = 1; + exp = convert_const_symbol_ref (exp, attr); + check_attr_value (exp, attr); + /* Goto COND case since this is now a COND. Note that while the + new expression is rescanned, all symbol_ref notes are mared as + unchanging. */ + goto cond; + case IF_THEN_ELSE: newexp = rtx_alloc (COND); *************** *** 658,661 **** --- 1048,1052 ---- case COND: + cond: /* First, check for degenerate COND. */ if (XVECLEN (exp, 0) == 0) *************** *** 778,790 **** for (i = 0; i < XVECLEN (delay->def, 1); i += 3) { - newexp = rtx_alloc (IF_THEN_ELSE); condexp = XVECEXP (delay->def, 1, i); if (condexp == 0) condexp = false_rtx; ! XEXP (newexp, 0) = condexp; ! XEXP (newexp, 1) = make_numeric_value (1); ! XEXP (newexp, 2) = make_numeric_value (0); ! p = (char *) xmalloc (13); ! sprintf (p, "*delay_%d_%d", delay->num, i / 3); make_internal_attr (p, newexp, 1); --- 1169,1178 ---- for (i = 0; i < XVECLEN (delay->def, 1); i += 3) { condexp = XVECEXP (delay->def, 1, i); if (condexp == 0) condexp = false_rtx; ! newexp = attr_rtx (IF_THEN_ELSE, condexp, ! make_numeric_value (1), make_numeric_value (0)); ! p = attr_printf (13, "*delay_%d_%d", delay->num, i / 3); make_internal_attr (p, newexp, 1); *************** *** 791,802 **** if (have_annul_true) { - newexp = rtx_alloc (IF_THEN_ELSE); condexp = XVECEXP (delay->def, 1, i + 1); if (condexp == 0) condexp = false_rtx; ! XEXP (newexp, 0) = condexp; ! XEXP (newexp, 1) = make_numeric_value (1); ! XEXP (newexp, 2) = make_numeric_value (0); ! p = (char *) xmalloc (18); ! sprintf (p, "*annul_true_%d_%d", delay->num, i / 3); make_internal_attr (p, newexp, 1); } --- 1179,1188 ---- if (have_annul_true) { condexp = XVECEXP (delay->def, 1, i + 1); if (condexp == 0) condexp = false_rtx; ! newexp = attr_rtx (IF_THEN_ELSE, condexp, ! make_numeric_value (1), ! make_numeric_value (0)); ! p = attr_printf (18, "*annul_true_%d_%d", delay->num, i / 3); make_internal_attr (p, newexp, 1); } *************** *** 804,815 **** if (have_annul_false) { - newexp = rtx_alloc (IF_THEN_ELSE); condexp = XVECEXP (delay->def, 1, i + 2); if (condexp == 0) condexp = false_rtx; ! XEXP (newexp, 0) = condexp; ! XEXP (newexp, 1) = make_numeric_value (1); ! XEXP (newexp, 2) = make_numeric_value (0); ! p = (char *) xmalloc (18); ! sprintf (p, "*annul_false_%d_%d", delay->num, i / 3); make_internal_attr (p, newexp, 1); } --- 1190,1199 ---- if (have_annul_false) { condexp = XVECEXP (delay->def, 1, i + 2); if (condexp == 0) condexp = false_rtx; ! newexp = attr_rtx (IF_THEN_ELSE, condexp, ! make_numeric_value (1), ! make_numeric_value (0)); ! p = attr_printf (18, "*annul_false_%d_%d", delay->num, i / 3); make_internal_attr (p, newexp, 1); } *************** *** 873,882 **** { /* Apply recursively to all values within. */ ! newexp = rtx_alloc (IF_THEN_ELSE); ! XEXP (newexp, 0) = XEXP (right, 0); ! XEXP (newexp, 1) = operate_exp (op, left, XEXP (right, 1)); ! XEXP (newexp, 2) = operate_exp (op, left, XEXP (right, 2)); ! ! return newexp; } else if (GET_CODE (right) == COND) --- 1257,1263 ---- { /* Apply recursively to all values within. */ ! return attr_rtx (IF_THEN_ELSE, XEXP (right, 0), ! operate_exp (op, left, XEXP (right, 1)), ! operate_exp (op, left, XEXP (right, 2))); } else if (GET_CODE (right) == COND) *************** *** 902,911 **** else if (GET_CODE (left) == IF_THEN_ELSE) { ! newexp = rtx_alloc (IF_THEN_ELSE); ! XEXP (newexp, 0) = XEXP (left, 0); ! XEXP (newexp, 1) = operate_exp (op, XEXP (left, 1), right); ! XEXP (newexp, 2) = operate_exp (op, XEXP (left, 2), right); ! ! return newexp; } --- 1283,1289 ---- else if (GET_CODE (left) == IF_THEN_ELSE) { ! return attr_rtx (IF_THEN_ELSE, XEXP (left, 0), ! operate_exp (op, XEXP (left, 1), right), ! operate_exp (op, XEXP (left, 2), right)); } *************** *** 984,995 **** for (op = unit->ops; op; op = op->next) { - str = (char *) xmalloc (strlen (unit->name) + 11); - /* Validate the expressions we were given for the conditions and busy cost. Then make an attribute for use in the conflict function. */ ! op->condexp = check_attr_test (op->condexp); check_attr_value (op->busyexp, 0); ! sprintf (str, "*%s_case_%d", unit->name, op->num); make_internal_attr (str, make_canonical (0, op->busyexp)); --- 1362,1372 ---- for (op = unit->ops; op; op = op->next) { /* Validate the expressions we were given for the conditions and busy cost. Then make an attribute for use in the conflict function. */ ! op->condexp = check_attr_test (op->condexp, 0); check_attr_value (op->busyexp, 0); ! str = attr_printf (strlen (unit->name) + 11, "*%s_case_%d", ! unit->name, op->num); make_internal_attr (str, make_canonical (0, op->busyexp)); *************** *** 1014,1023 **** /* Make an attribute for the case number and ready delay. */ ! str = (char *) xmalloc (strlen (unit->name) + 8); ! sprintf (str, "*%s_cases", unit->name); make_internal_attr (str, caseexp, 1); ! str = (char *) xmalloc (strlen (unit->name) + 20); ! sprintf (str, "*%s_unit_ready_cost", unit->name); make_internal_attr (str, readyexp, 0); --- 1391,1399 ---- /* Make an attribute for the case number and ready delay. */ ! str = attr_printf (strlen (unit->name) + 8, "*%s_cases", unit->name); make_internal_attr (str, caseexp, 1); ! str = attr_printf (strlen (unit->name) + 20, "*%s_unit_ready_cost", ! unit->name); make_internal_attr (str, readyexp, 0); *************** *** 1024,1028 **** /* Merge this function unit into the ready cost and unit mask attributes. */ ! XEXP (newexp, 0) = check_attr_test (unit->condexp); XEXP (newexp, 1) = make_numeric_value (1 << unit->num); unitsmask = operate_exp (OR_OP, unitsmask, newexp); --- 1400,1404 ---- /* Merge this function unit into the ready cost and unit mask attributes. */ ! XEXP (newexp, 0) = check_attr_test (unit->condexp, 0); XEXP (newexp, 1) = make_numeric_value (1 << unit->num); unitsmask = operate_exp (OR_OP, unitsmask, newexp); *************** *** 1123,1135 **** return (*address_fn) (exp); ! newexp = rtx_alloc (IF_THEN_ELSE); ! XEXP (newexp, 0) = substitute_address (XEXP (exp, 0), ! no_address_fn, address_fn); ! XEXP (newexp, 1) = substitute_address (XEXP (exp, 1), ! no_address_fn, address_fn); ! XEXP (newexp, 2) = substitute_address (XEXP (exp, 2), ! no_address_fn, address_fn); ! ! return newexp; } --- 1499,1509 ---- return (*address_fn) (exp); ! return attr_rtx (IF_THEN_ELSE, ! substitute_address (XEXP (exp, 0), ! no_address_fn, address_fn), ! substitute_address (XEXP (exp, 1), ! no_address_fn, address_fn), ! substitute_address (XEXP (exp, 2), ! no_address_fn, address_fn)); } *************** *** 1178,1181 **** --- 1552,1556 ---- fatal ("length attribute must be numeric."); + length_attr->is_const = 0; length_attr->is_special = 1; *************** *** 1441,1448 **** { /* Make a copy of this expression and call recursively. */ ! newexp = rtx_alloc (code); ! XEXP (newexp, 0) = XEXP (exp, 0); ! XEXP (newexp, 1) = insert_right_side (code, XEXP (exp, 1), ! term, insn_code, insn_index); } else --- 1816,1822 ---- { /* Make a copy of this expression and call recursively. */ ! newexp = attr_rtx (code, XEXP (exp, 0), ! insert_right_side (code, XEXP (exp, 1), ! term, insn_code, insn_index)); } else *************** *** 1449,1455 **** { /* Insert the new term. */ ! newexp = rtx_alloc (code); ! XEXP (newexp, 0) = exp; ! XEXP (newexp, 1) = term; } --- 1823,1827 ---- { /* Insert the new term. */ ! newexp = attr_rtx (code, exp, term); } *************** *** 1502,1511 **** ; ! alternative = (char *) xmalloc (3); ! sprintf (alternative, "%d", i); ! newexp = rtx_alloc (EQ_ATTR); ! XSTR (newexp, 0) = alternative_name; ! XSTR (newexp, 1) = alternative; RTX_UNCHANGING_P (newexp) = 1; --- 1874,1880 ---- ; ! alternative = attr_printf (3, "%d", i); ! newexp = attr_rtx (EQ_ATTR, alternative_name, alternative); RTX_UNCHANGING_P (newexp) = 1; *************** *** 1567,1572 **** /* Add this condition into the AND expression. */ ! newexp = rtx_alloc (NOT); ! XEXP (newexp, 0) = XVECEXP (value, 0, i); andexp = insert_right_side (AND, andexp, newexp, insn_code, insn_index); --- 1936,1940 ---- /* Add this condition into the AND expression. */ ! newexp = attr_rtx (NOT, XVECEXP (value, 0, i)); andexp = insert_right_side (AND, andexp, newexp, insn_code, insn_index); *************** *** 1625,1631 **** if (left != XEXP (exp, 0) || right != XEXP (exp, 1)) { ! newexp = rtx_alloc (GET_CODE (exp)); ! XEXP (newexp, 0) = left; ! XEXP (newexp, 1) = right; exp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); --- 1993,1997 ---- if (left != XEXP (exp, 0) || right != XEXP (exp, 1)) { ! newexp = attr_rtx (GET_CODE (exp), left, right); exp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); *************** *** 1650,1656 **** if (left != XEXP (exp, 0) || right != XEXP (exp, 1)) { ! newexp = rtx_alloc (GET_CODE (exp)); ! XEXP (newexp, 0) = left; ! XEXP (newexp, 1) = right; exp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); --- 2016,2020 ---- if (left != XEXP (exp, 0) || right != XEXP (exp, 1)) { ! newexp = attr_rtx (GET_CODE (exp), left, right); exp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); *************** *** 1748,1754 **** if (left != XEXP (exp, 0) || right != XEXP (exp, 1)) { ! newexp = rtx_alloc (GET_CODE (exp)); ! XEXP (newexp, 0) = left; ! XEXP (newexp, 1) = right; exp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); --- 2112,2116 ---- if (left != XEXP (exp, 0) || right != XEXP (exp, 1)) { ! newexp = attr_rtx (GET_CODE (exp), left, right); exp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); *************** *** 1773,1779 **** if (left != XEXP (exp, 0) || right != XEXP (exp, 1)) { ! newexp = rtx_alloc (GET_CODE (exp)); ! XEXP (newexp, 0) = left; ! XEXP (newexp, 1) = right; exp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); --- 2135,2139 ---- if (left != XEXP (exp, 0) || right != XEXP (exp, 1)) { ! newexp = attr_rtx (GET_CODE (exp), left, right); exp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); *************** *** 1832,1836 **** /* If either side is an IOR and we have (eq_attr "alternative" ..") present on both sides, apply the distributive law since this will ! yield simplications. */ if ((GET_CODE (left) == IOR || GET_CODE (right) == IOR) && compute_alternative_mask (left, IOR) --- 2192,2196 ---- /* If either side is an IOR and we have (eq_attr "alternative" ..") present on both sides, apply the distributive law since this will ! yield simplifications. */ if ((GET_CODE (left) == IOR || GET_CODE (right) == IOR) && compute_alternative_mask (left, IOR) *************** *** 1844,1853 **** } ! newexp = rtx_alloc (IOR); ! XEXP (newexp, 0) = rtx_alloc (AND); ! XEXP (newexp, 1) = rtx_alloc (AND); ! XEXP (XEXP (newexp, 0), 0) = XEXP (XEXP (newexp, 1), 0) = left; ! XEXP (XEXP (newexp, 0), 1) = XEXP (right, 0); ! XEXP (XEXP (newexp, 1), 1) = XEXP (right, 1); return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); --- 2204,2210 ---- } ! newexp = attr_rtx (IOR, ! attr_rtx (AND, left, XEXP (right, 0)), ! attr_rtx (AND, left, XEXP (right, 1))); return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); *************** *** 1896,1902 **** left = make_alternative_compare (i); right = simplify_and_tree (exp, &left, insn_code, insn_index); ! newexp = rtx_alloc (AND); ! XEXP (newexp, 0) = left; ! XEXP (newexp, 1) = right; return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); --- 2253,2257 ---- left = make_alternative_compare (i); right = simplify_and_tree (exp, &left, insn_code, insn_index); ! newexp = attr_rtx (AND, left, right); return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); *************** *** 1906,1912 **** if (left != XEXP (exp, 0) || right != XEXP (exp, 1)) { ! newexp = rtx_alloc (AND); ! XEXP (newexp, 0) = left; ! XEXP (newexp, 1) = right; return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); } --- 2261,2265 ---- if (left != XEXP (exp, 0) || right != XEXP (exp, 1)) { ! newexp = attr_rtx (AND, left, right); return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); } *************** *** 1938,1950 **** && rtx_equal_p (XEXP (left, 0), XEXP (right, 0))) { ! newexp = rtx_alloc (IOR); ! XEXP (newexp, 0) = XEXP (left, 1); ! XEXP (newexp, 1) = XEXP (right, 1); left = XEXP (left, 0); right = newexp; ! newexp = rtx_alloc (AND); ! XEXP (newexp, 0) = left; ! XEXP (newexp, 1) = right; return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); } --- 2291,2299 ---- && rtx_equal_p (XEXP (left, 0), XEXP (right, 0))) { ! newexp = attr_rtx (IOR, XEXP (left, 1), XEXP (right, 1)); left = XEXP (left, 0); right = newexp; ! newexp = attr_rtx (AND, left, right); return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); } *************** *** 1978,1985 **** left = make_alternative_compare (i); right = simplify_and_tree (exp, &left, insn_code, insn_index); ! newexp = rtx_alloc (IOR); ! XEXP (newexp, 0) = rtx_alloc (NOT); ! XEXP (XEXP (newexp, 0), 0) = left; ! XEXP (newexp, 1) = right; return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); --- 2327,2331 ---- left = make_alternative_compare (i); right = simplify_and_tree (exp, &left, insn_code, insn_index); ! newexp = attr_rtx (IOR, attr_rtx (NOT, left), right); return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); *************** *** 1989,1995 **** if (left != XEXP (exp, 0) || right != XEXP (exp, 1)) { ! newexp = rtx_alloc (IOR); ! XEXP (newexp, 0) = left; ! XEXP (newexp, 1) = right; return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); } --- 2335,2339 ---- if (left != XEXP (exp, 0) || right != XEXP (exp, 1)) { ! newexp = attr_rtx (IOR, left, right); return SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); } *************** *** 2009,2017 **** else if (GET_CODE (left) == IOR) { ! newexp = rtx_alloc (AND); ! XEXP (newexp, 0) = rtx_alloc (NOT); ! XEXP (XEXP (newexp, 0), 0) = XEXP (left, 0); ! XEXP (newexp, 1) = rtx_alloc (NOT); ! XEXP (XEXP (newexp, 1), 0) = XEXP (left, 1); newexp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); --- 2353,2359 ---- else if (GET_CODE (left) == IOR) { ! newexp = attr_rtx (AND, ! attr_rtx (NOT, XEXP (left, 0)), ! attr_rtx (NOT, XEXP (left, 1))); newexp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); *************** *** 2019,2027 **** else if (GET_CODE (left) == AND) { ! newexp = rtx_alloc (IOR); ! XEXP (newexp, 0) = rtx_alloc (NOT); ! XEXP (XEXP (newexp, 0), 0) = XEXP (left, 0); ! XEXP (newexp, 1) = rtx_alloc (NOT); ! XEXP (XEXP (newexp, 1), 0) = XEXP (left, 1); newexp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); --- 2361,2367 ---- else if (GET_CODE (left) == AND) { ! newexp = attr_rtx (IOR, ! attr_rtx (NOT, XEXP (left, 0)), ! attr_rtx (NOT, XEXP (left, 1))); newexp = SIMPLIFY_TEST_EXP (newexp, insn_code, insn_index); *************** *** 2029,2034 **** else if (left != XEXP (exp, 0)) { ! newexp = rtx_alloc (NOT); ! XEXP (newexp, 0) = left; } break; --- 2369,2373 ---- else if (left != XEXP (exp, 0)) { ! newexp = attr_rtx (NOT, left); } break; *************** *** 2118,2123 **** { av = (struct attr_value *) xmalloc (sizeof (struct attr_value)); ! av->value = rtx_alloc (CONST_STRING); ! XSTR (av->value, 0) = p; av->next = attr->first_value; attr->first_value = av; --- 2457,2461 ---- { av = (struct attr_value *) xmalloc (sizeof (struct attr_value)); ! av->value = attr_rtx (CONST_STRING, p); av->next = attr->first_value; attr->first_value = av; *************** *** 2128,2131 **** --- 2466,2478 ---- } + if (GET_CODE (XEXP (exp, 2)) == CONST) + { + attr->is_const = 1; + if (attr->is_numeric) + fatal ("Constant attributes may not take numeric values"); + /* Get rid of the CONST node. It is allowed only at top-level. */ + XEXP (exp, 2) = XEXP (XEXP (exp, 2), 0); + } + if (! strcmp (attr->name, "length") && ! attr->is_numeric) fatal ("`length' attribute must take numeric values"); *************** *** 2371,2378 **** orexp = insert_right_side (IOR, orexp, XVECEXP (def, 6, i), -2); ! op->busyexp = rtx_alloc (IF_THEN_ELSE); ! XEXP (op->busyexp, 0) = orexp; ! XEXP (op->busyexp, 1) = make_numeric_value (XINT (def, 5)); ! XEXP (op->busyexp, 2) = make_numeric_value (0); } else --- 2718,2724 ---- orexp = insert_right_side (IOR, orexp, XVECEXP (def, 6, i), -2); ! op->busyexp = attr_rtx (IF_THEN_ELSE, orexp, ! make_numeric_value (XINT (def, 5)), ! make_numeric_value (0)); } else *************** *** 2460,2464 **** break; case MOD: ! printf (" % "); break; case AND: --- 2806,2810 ---- break; case MOD: ! printf (" %% "); break; case AND: *************** *** 2647,2652 **** { case SYMBOL_REF: ! /* Since this is an arbitrary expression, it can look at anything. */ ! must_extract = must_constrain = 1; return; --- 2993,3001 ---- { case SYMBOL_REF: ! if (! RTX_UNCHANGING_P (exp)) ! /* Since this is an arbitrary expression, it can look at anything. ! However, constant expressions do not depend on any particular ! insn. */ ! must_extract = must_constrain = 1; return; *************** *** 2705,2710 **** if (attr->name[0] == '*') printf ("%s (insn)\n", &attr->name[1]); ! else printf ("get_attr_%s (insn)\n", attr->name); printf (" rtx insn;\n"); printf ("{\n"); --- 3054,3073 ---- if (attr->name[0] == '*') printf ("%s (insn)\n", &attr->name[1]); ! else if (attr->is_const == 0) printf ("get_attr_%s (insn)\n", attr->name); + else + { + printf ("get_attr_%s ()\n", attr->name); + printf ("{\n"); + + for (av = attr->first_value; av; av = av->next) + if (av->num_insns != 0) + write_attr_set (attr, 2, av->value, "return", ";", + true_rtx, av->first_insn->insn_code, + av->first_insn->insn_index); + + printf ("}\n\n"); + return; + } printf (" rtx insn;\n"); printf ("{\n"); *************** *** 2792,2797 **** XVECEXP (value, 0, i), insn_code, insn_index); ! newexp = rtx_alloc (NOT); ! XEXP (newexp, 0) = testexp; newexp = insert_right_side (AND, our_known_true, newexp, insn_code, insn_index); --- 3155,3159 ---- XVECEXP (value, 0, i), insn_code, insn_index); ! newexp = attr_rtx (NOT, testexp); newexp = insert_right_side (AND, our_known_true, newexp, insn_code, insn_index); *************** *** 3026,3031 **** if (num_delays > 1) { ! sprintf (str, "*delay_type", kind); ! attr = find_attr (str, 0); if (! attr) abort (); common_av = find_most_used (attr); --- 3388,3392 ---- if (num_delays > 1) { ! attr = find_attr ("*delay_type", 0); if (! attr) abort (); common_av = find_most_used (attr); *************** *** 3125,3129 **** /* See if only one case exists and if there is a constant value for that case. If so, we don't need a function. */ ! str = (char *) xmalloc (strlen (unit->name) + 10); sprintf (str, "*%s_cases", unit->name); attr = find_attr (str, 0); --- 3486,3490 ---- /* See if only one case exists and if there is a constant value for that case. If so, we don't need a function. */ ! str = (char *) alloca (strlen (unit->name) + 10); sprintf (str, "*%s_cases", unit->name); attr = find_attr (str, 0); *************** *** 3284,3292 **** ; ! out_str = (char *) xmalloc (p - *pstr + 1); ! for (p = out_str; **pstr != ',' && **pstr != '\0'; (*pstr)++) ! *p++ = **pstr; - *p++ = '\0'; if (**pstr == ',') (*pstr)++; --- 3645,3651 ---- ; ! out_str = attr_string (*pstr, p - *pstr); ! *pstr = p; if (**pstr == ',') (*pstr)++; *************** *** 3329,3333 **** attr->name = new_name; attr->first_value = attr->default_val = NULL; ! attr->is_numeric = attr->is_special = 0; attr->next = attrs; attrs = attr; --- 3688,3692 ---- attr->name = new_name; attr->first_value = attr->default_val = NULL; ! attr->is_numeric = attr->is_const = attr->is_special = 0; attr->next = attrs; attrs = attr; *************** *** 3351,3354 **** --- 3710,3714 ---- attr->is_numeric = 1; + attr->is_const = 0; attr->is_special = special; attr->default_val = get_attr_value (value, attr, -2); *************** *** 3406,3409 **** --- 3766,3770 ---- static rtx int_values[20]; rtx exp; + char *p; if (n < 0) *************** *** 3413,3420 **** return int_values[n]; ! exp = rtx_alloc (CONST_STRING); ! XSTR (exp, 0) = (char *) xmalloc ((n < 1000 ? 4 ! : HOST_BITS_PER_INT * 3 / 10 + 3)); ! sprintf (XSTR (exp, 0), "%d", n); if (n < 20) --- 3774,3779 ---- return int_values[n]; ! p = attr_printf ((n < 1000 ? 4 : HOST_BITS_PER_INT * 3 / 10 + 3), "%d", n); ! exp = attr_rtx (CONST_STRING, p); if (n < 20) *************** *** 3494,3501 **** /* Set up true and false rtx's */ ! true_rtx = rtx_alloc (CONST_INT); ! false_rtx = rtx_alloc (CONST_INT); ! XINT (true_rtx, 0) = 1; ! XINT (false_rtx, 0) = 0; RTX_UNCHANGING_P (true_rtx) = RTX_UNCHANGING_P (false_rtx) = 1; --- 3853,3858 ---- /* Set up true and false rtx's */ ! true_rtx = attr_rtx (CONST_INT, 1); ! false_rtx = attr_rtx (CONST_INT, 0); RTX_UNCHANGING_P (true_rtx) = RTX_UNCHANGING_P (false_rtx) = 1; diff -rc2N gcc-2.0/genextract.c gcc-2.1/genextract.c *** gcc-2.0/genextract.c Fri Jan 17 18:02:34 1992 --- gcc-2.1/genextract.c Sat Mar 7 04:41:00 1992 *************** *** 72,75 **** --- 72,76 ---- char *xrealloc (); static void fatal (); + static void mybzero (); void fancy_abort (); *************** *** 83,87 **** /* No operands seen so far in this pattern. */ ! bzero (operand_seen, operand_seen_length); printf (" case %d:\n", insn_code_number); --- 84,88 ---- /* No operands seen so far in this pattern. */ ! mybzero (operand_seen, operand_seen_length); printf (" case %d:\n", insn_code_number); *************** *** 294,297 **** --- 295,307 ---- { fatal ("Internal gcc abort."); + } + + static void + mybzero (b, length) + register char *b; + register unsigned length; + { + while (length-- > 0) + *b++ = 0; } diff -rc2N gcc-2.0/getopt.c gcc-2.1/getopt.c *** gcc-2.0/getopt.c Sat Feb 22 03:38:49 1992 --- gcc-2.1/getopt.c Tue Mar 24 21:50:09 1992 *************** *** 24,28 **** #define alloca __builtin_alloca #else /* not __GNUC__ */ ! #ifdef sparc #include #else --- 24,28 ---- #define alloca __builtin_alloca #else /* not __GNUC__ */ ! #if defined(sparc) && !defined(USG) && !defined(SVR4) && !defined(__svr4__) #include #else *************** *** 47,50 **** --- 47,51 ---- #undef alloca #include + #include #else /* Not GNU C library. */ #define __alloca alloca diff -rc2N gcc-2.0/getpwd.c gcc-2.1/getpwd.c *** gcc-2.0/getpwd.c --- gcc-2.1/getpwd.c Fri Mar 20 17:28:18 1992 *************** *** 0 **** --- 1,73 ---- + /* getpwd.c - get the working directory */ + + #include "config.h" + + #include + #include + #include + + #ifndef errno + extern int errno; + #endif + + /* Virtually every UN*X system now in common use (except for pre-4.3-tahoe + BSD systems) now provides getcwd as called for by POSIX. Allow for + the few exceptions to the general rule here. */ + + #if !(defined (POSIX) || defined (USG) || defined (VMS)) + #include + extern char *getwd (); + #define getcwd(buf,len) getwd(buf) + #define GUESSPATHLEN (MAXPATHLEN + 1) + #else /* (defined (USG) || defined (VMS)) */ + extern char *getcwd (); + /* We actually use this as a starting point, not a limit. */ + #define GUESSPATHLEN 100 + #endif /* (defined (USG) || defined (VMS)) */ + + char *getenv (); + char *xmalloc (); + + /* Get the working directory. Use the PWD environment variable if it's + set correctly, since this is faster and gives more uniform answers + to the user. Yield the working directory if successful; otherwise, + yield 0 and set errno. */ + + char * + getpwd () + { + static char *pwd; + static int failure_errno; + + char *p = pwd; + size_t s; + struct stat dotstat, pwdstat; + + if (!p && !(errno = failure_errno)) + { + if (! ((p = getenv ("PWD")) != 0 + && *p == '/' + && stat (p, &pwdstat) == 0 + && stat (".", &dotstat) == 0 + && dotstat.st_ino == pwdstat.st_ino + && dotstat.st_dev == pwdstat.st_dev)) + + /* The shortcut didn't work. Try the slow, ``sure'' way. */ + for (s = GUESSPATHLEN; ! getcwd (p = xmalloc (s), s); s *= 2) + { + int e = errno; + free (p); + if (e != ERANGE) + { + errno = failure_errno = e; + p = 0; + break; + } + } + + /* Cache the result. This assumes that the program does + not invoke chdir between calls to getpwd. */ + pwd = p; + } + return p; + } diff -rc2N gcc-2.0/global-alloc.c gcc-2.1/global-alloc.c *** gcc-2.0/global-alloc.c Mon Feb 17 16:14:55 1992 --- gcc-2.1/global-alloc.c Sat Mar 21 22:36:46 1992 *************** *** 249,252 **** --- 249,253 ---- static void mark_reg_store (); static void mark_reg_clobber (); + static void mark_reg_conflicts (); static void mark_reg_live_nc (); static void mark_reg_death (); *************** *** 543,547 **** if (n_basic_blocks > 0) #endif ! reload (basic_block_head[0], 1, file); } --- 544,548 ---- if (n_basic_blocks > 0) #endif ! reload (get_insns (), 1, file); } *************** *** 699,702 **** --- 700,728 ---- #endif + /* If INSN has multiple outputs, then any reg that dies here + and is used inside of an output + must conflict with the other outputs. */ + + if (GET_CODE (PATTERN (insn)) == PARALLEL && !single_set (insn)) + for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) + if (REG_NOTE_KIND (link) == REG_DEAD) + { + int used_in_output = 0; + int i; + rtx reg = XEXP (link, 0); + + for (i = XVECLEN (PATTERN (insn), 0) - 1; i >= 0; i--) + { + rtx set = XVECEXP (PATTERN (insn), 0, i); + if (GET_CODE (set) == SET + && GET_CODE (SET_DEST (set)) != REG + && !rtx_equal_p (reg, SET_DEST (set)) + && reg_overlap_mentioned_p (reg, SET_DEST (set))) + used_in_output = 1; + } + if (used_in_output) + mark_reg_conflicts (reg); + } + /* Mark any registers set in INSN and then never used. */ *************** *** 779,783 **** For each allocno, remove from preferences registers that cannot be used, either because of conflicts or register type. Then compute all registers ! prefered by each lower-priority register that conflicts. */ for (i = max_allocno - 1; i >= 0; i--) --- 805,809 ---- For each allocno, remove from preferences registers that cannot be used, either because of conflicts or register type. Then compute all registers ! preferred by each lower-priority register that conflicts. */ for (i = max_allocno - 1; i >= 0; i--) *************** *** 876,880 **** /* Try each hard reg to see if it fits. Do this in two passes. ! In the first pass, skip registers that are prefered by some other pseudo to give it a better chance of getting one of those registers. Only if we can't get a register when excluding those do we take one of them. --- 902,906 ---- /* Try each hard reg to see if it fits. Do this in two passes. ! In the first pass, skip registers that are preferred by some other pseudo to give it a better chance of getting one of those registers. Only if we can't get a register when excluding those do we take one of them. *************** *** 1331,1334 **** --- 1357,1399 ---- record_one_conflict (regno); SET_HARD_REG_BIT (hard_regs_live, regno); + regno++; + } + } + } + + /* Record that REG has conflicts with all the regs currently live. + Do not mark REG itself as live. */ + + static void + mark_reg_conflicts (reg) + rtx reg; + { + register int regno; + + if (GET_CODE (reg) == SUBREG) + reg = SUBREG_REG (reg); + + if (GET_CODE (reg) != REG) + return; + + regno = REGNO (reg); + + if (reg_renumber[regno] >= 0) + regno = reg_renumber[regno]; + + /* Either this is one of the max_allocno pseudo regs not allocated, + or it is or has a hardware reg. First handle the pseudo-regs. */ + if (regno >= FIRST_PSEUDO_REGISTER) + { + if (reg_allocno[regno] >= 0) + record_one_conflict (regno); + } + /* Handle hardware regs (and pseudos allocated to hard regs). */ + else if (! fixed_regs[regno]) + { + register int last = regno + HARD_REGNO_NREGS (regno, GET_MODE (reg)); + while (regno < last) + { + record_one_conflict (regno); regno++; } diff -rc2N gcc-2.0/gmon.c gcc-2.1/gmon.c *** gcc-2.0/gmon.c Thu Nov 28 20:08:11 1991 --- gcc-2.1/gmon.c Sat Mar 14 00:04:01 1992 *************** *** 201,205 **** This identifies the function that was just entered. */ selfpc = (void *) __builtin_return_address (0); ! /* frompcindex = pc in preceeding frame. This identifies the caller of the function just entered. */ frompcindex = (void *) __builtin_return_address (1); --- 201,205 ---- This identifies the function that was just entered. */ selfpc = (void *) __builtin_return_address (0); ! /* frompcindex = pc in preceding frame. This identifies the caller of the function just entered. */ frompcindex = (void *) __builtin_return_address (1); diff -rc2N gcc-2.0/gplus.gperf gcc-2.1/gplus.gperf *** gcc-2.0/gplus.gperf Wed Dec 4 22:24:13 1991 --- gcc-2.1/gplus.gperf Thu Mar 19 13:33:17 1992 *************** *** 1,4 **** %{ ! /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,$ gplus.gperf */ %} struct resword { char *name; short token; enum rid rid;}; --- 1,4 ---- %{ ! /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf */ %} struct resword { char *name; short token; enum rid rid;}; *************** *** 6,11 **** __alignof, ALIGNOF, NORID __alignof__, ALIGNOF, NORID ! __asm, ASM, NORID ! __asm__, ASM, NORID __attribute, ATTRIBUTE, NORID __attribute__, ATTRIBUTE, NORID --- 6,11 ---- __alignof, ALIGNOF, NORID __alignof__, ALIGNOF, NORID ! __asm, ASM_KEYWORD, NORID ! __asm__, ASM_KEYWORD, NORID __attribute, ATTRIBUTE, NORID __attribute__, ATTRIBUTE, NORID *************** *** 14,17 **** --- 14,18 ---- __const, TYPE_QUAL, RID_CONST __const__, TYPE_QUAL, RID_CONST + __extension__, EXTENSION, NORID __headof, HEADOF, NORID __headof__, HEADOF, NORID *************** *** 18,21 **** --- 19,23 ---- __inline, SCSPEC, RID_INLINE __inline__, SCSPEC, RID_INLINE + __label__, LABEL, NORID __signed, TYPESPEC, RID_SIGNED __signed__, TYPESPEC, RID_SIGNED *************** *** 32,36 **** throw, THROW, NORID /* Extension */, try, TRY, NORID /* Extension */, ! asm, ASM, NORID, auto, SCSPEC, RID_AUTO, break, BREAK, NORID, --- 34,38 ---- throw, THROW, NORID /* Extension */, try, TRY, NORID /* Extension */, ! asm, ASM_KEYWORD, NORID, auto, SCSPEC, RID_AUTO, break, BREAK, NORID, diff -rc2N gcc-2.0/gstdarg.h gcc-2.1/gstdarg.h *** gcc-2.0/gstdarg.h Fri Feb 21 02:00:55 1992 --- gcc-2.1/gstdarg.h Wed Mar 4 16:57:02 1992 *************** *** 23,26 **** --- 23,29 ---- #include "va-mips.h" #else + #ifdef __sparc__ + #include "va-sparc.h" + #else #ifdef _HIDDEN_VA_LIST /* On OSF1, this means varargs.h is "half-loaded". */ *************** *** 44,55 **** (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) - #ifndef __sparc__ #define va_start(AP, LASTARG) \ (AP = ((char *) __builtin_next_arg ())) - #else - #define va_start(AP, LASTARG) \ - (__builtin_saveregs (), \ - AP = ((char *) __builtin_next_arg ())) - #endif void va_end (va_list); /* Defined in libgcc.a */ --- 47,52 ---- *************** *** 60,63 **** --- 57,61 ---- *((TYPE *) (AP - __va_rounded_size (TYPE)))) + #endif /* not sparc */ #endif /* not mips */ #endif /* not hp9000s800 */ diff -rc2N gcc-2.0/gstddef.h gcc-2.1/gstddef.h *** gcc-2.0/gstddef.h Wed Jan 15 01:01:38 1992 --- gcc-2.1/gstddef.h Wed Mar 18 00:20:37 1992 *************** *** 17,20 **** --- 17,21 ---- #ifndef _PTRDIFF_T /* in case has defined it. */ + #ifndef _T_PTRDIFF_ #ifndef _T_PTRDIFF #ifndef __PTRDIFF_T *************** *** 21,25 **** --- 22,28 ---- #ifndef _PTRDIFF_T_ #ifndef ___int_ptrdiff_t_h + #ifndef _GCC_PTRDIFF_T #define _PTRDIFF_T + #define _T_PTRDIFF_ #define _T_PTRDIFF #define __PTRDIFF_T *************** *** 26,29 **** --- 29,33 ---- #define _PTRDIFF_T_ #define ___int_ptrdiff_t_h + #define _GCC_PTRDIFF_T #ifndef __PTRDIFF_TYPE__ #define __PTRDIFF_TYPE__ long int *************** *** 30,33 **** --- 34,38 ---- #endif typedef __PTRDIFF_TYPE__ ptrdiff_t; + #endif /* _GCC_PTRDIFF_T */ #endif /* ___int_ptrdiff_t_h */ #endif /* _PTRDIFF_T_ */ *************** *** 34,37 **** --- 39,43 ---- #endif /* __PTRDIFF_T */ #endif /* _T_PTRDIFF */ + #endif /* _T_PTRDIFF_ */ #endif /* _PTRDIFF_T */ *************** *** 39,42 **** --- 45,49 ---- #ifndef _SIZE_T /* in case has defined it. */ + #ifndef _T_SIZE_ #ifndef _T_SIZE #ifndef __SIZE_T *************** *** 43,47 **** --- 50,56 ---- #ifndef _SIZE_T_ #ifndef ___int_size_t_h + #ifndef _GCC_SIZE_T #define _SIZE_T + #define _T_SIZE_ #define _T_SIZE #define __SIZE_T *************** *** 48,51 **** --- 57,61 ---- #define _SIZE_T_ #define ___int_size_t_h + #define _GCC_SIZE_T #ifndef __SIZE_TYPE__ #define __SIZE_TYPE__ long unsigned int *************** *** 52,55 **** --- 62,66 ---- #endif typedef __SIZE_TYPE__ size_t; + #endif /* _GCC_SIZE_T */ #endif /* ___int_size_t_h */ #endif /* _SIZE_T_ */ *************** *** 56,59 **** --- 67,71 ---- #endif /* __SIZE_T */ #endif /* _T_SIZE */ + #endif /* _T_SIZE_ */ #endif /* _SIZE_T */ *************** *** 66,69 **** --- 78,82 ---- #ifndef _WCHAR_T_ #ifndef ___int_wchar_t_h + #ifndef _GCC_WCHAR_T #define _WCHAR_T #define _T_WCHAR_ *************** *** 72,75 **** --- 85,89 ---- #define _WCHAR_T_ #define ___int_wchar_t_h + #define _GCC_WCHAR_T #ifndef __WCHAR_TYPE__ #define __WCHAR_TYPE__ int *************** *** 76,79 **** --- 90,94 ---- #endif typedef __WCHAR_TYPE__ wchar_t; + #endif #endif #endif diff -rc2N gcc-2.0/gsyms.h gcc-2.1/gsyms.h *** gcc-2.0/gsyms.h Sat Dec 15 11:39:53 1990 --- gcc-2.1/gsyms.h Sat Mar 14 00:04:03 1992 *************** *** 1,3 **** ! /* For cross compilation, use the portable defintions from the COFF documentation. */ --- 1,3 ---- ! /* For cross compilation, use the portable definitions from the COFF documentation. */ diff -rc2N gcc-2.0/halfpic.c gcc-2.1/halfpic.c *** gcc-2.0/halfpic.c Fri Feb 21 16:46:21 1992 --- gcc-2.1/halfpic.c Tue Mar 17 10:35:02 1992 *************** *** 69,73 **** rtx addr; { - int offset; char *name; --- 69,72 ---- *************** *** 75,83 **** { case CONST: ! offset = 0; ! addr = eliminate_constant_term (addr, &offset); ! if (GET_CODE (addr) != SYMBOL_REF) ! return FALSE; ! /* fall through */ --- 74,83 ---- { case CONST: ! { ! rtx offset = const0_rtx; ! addr = eliminate_constant_term (addr, &offset); ! if (GET_CODE (addr) != SYMBOL_REF) ! return FALSE; ! } /* fall through */ diff -rc2N gcc-2.0/integrate.c gcc-2.1/integrate.c *** gcc-2.0/integrate.c Fri Jan 17 18:16:46 1992 --- gcc-2.1/integrate.c Sat Mar 14 16:30:38 1992 *************** *** 165,168 **** --- 165,178 ---- } + /* We cannot inline this function if forced_labels is non-zero. This + implies that a label in this function was used as an initializer. + Because labels can not be duplicated, all labels in the function + will be renamed when it is inlined. However, there is no way to find + and fix all variables initialized with addresses of labels in this + function, hence inlining is impossible. */ + + if (forced_labels) + return "function with label addresses used in initializers cannot inline"; + return 0; } *************** *** 251,259 **** if (GET_CODE (p) == MEM && copy) ! /* Copy the rtl so that modifications of the address ! later in compilation won't affect this arg_vector. ! Virtual register instantiation can screw the address ! of the rtl. */ ! DECL_RTL (parms) = copy_rtx (p); RTVEC_ELT (arg_vector, i) = p; --- 261,276 ---- if (GET_CODE (p) == MEM && copy) ! { ! /* Copy the rtl so that modifications of the addresses ! later in compilation won't affect this arg_vector. ! Virtual register instantiation can screw the address ! of the rtl. */ ! rtx new = copy_rtx (p); ! ! /* Don't leave the old copy anywhere in this decl. */ ! if (DECL_RTL (parms) == DECL_INCOMING_RTL (parms)) ! DECL_INCOMING_RTL (parms) = new; ! DECL_RTL (parms) = new; ! } RTVEC_ELT (arg_vector, i) = p; *************** *** 499,502 **** --- 516,520 ---- case CODE_LABEL: copy = label_map[CODE_LABEL_NUMBER (insn)]; + LABEL_NAME (copy) = LABEL_NAME (insn); break; *************** *** 1766,1772 **** loc = plus_constant (loc, rounded); #endif ! map->reg_map[regno] = force_operand (loc, 0); ! map->const_equiv_map[regno] = loc; ! map->const_age_map[regno] = CONST_AGE_PARM; seq = gen_sequence (); --- 1784,1790 ---- loc = plus_constant (loc, rounded); #endif ! map->reg_map[regno] = temp = force_operand (loc, 0); ! map->const_equiv_map[REGNO (temp)] = loc; ! map->const_age_map[REGNO (temp)] = CONST_AGE_PARM; seq = gen_sequence (); *************** *** 1773,1777 **** end_sequence (); emit_insn_after (seq, map->insns_at_start); ! return map->reg_map[regno]; } else if (regno == VIRTUAL_INCOMING_ARGS_REGNUM) --- 1791,1795 ---- end_sequence (); emit_insn_after (seq, map->insns_at_start); ! return temp; } else if (regno == VIRTUAL_INCOMING_ARGS_REGNUM) *************** *** 1785,1791 **** loc = assign_stack_temp (BLKmode, size, 1); loc = XEXP (loc, 0); ! map->reg_map[regno] = force_operand (loc, 0); ! map->const_equiv_map[regno] = loc; ! map->const_age_map[regno] = CONST_AGE_PARM; seq = gen_sequence (); --- 1803,1809 ---- loc = assign_stack_temp (BLKmode, size, 1); loc = XEXP (loc, 0); ! map->reg_map[regno] = temp = force_operand (loc, 0); ! map->const_equiv_map[REGNO (temp)] = loc; ! map->const_age_map[REGNO (temp)] = CONST_AGE_PARM; seq = gen_sequence (); *************** *** 1792,1796 **** end_sequence (); emit_insn_after (seq, map->insns_at_start); ! return map->reg_map[regno]; } else if (REG_FUNCTION_VALUE_P (orig)) --- 1810,1814 ---- end_sequence (); emit_insn_after (seq, map->insns_at_start); ! return temp; } else if (REG_FUNCTION_VALUE_P (orig)) *************** *** 2092,2096 **** /* Substitute known constants for pseudo regs in the contents of LOC, which are part of INSN. ! If INSN is zero, the substition should always be done (this is used to update DECL_RTL). These changes are taken out by try_constants if the result is not valid. --- 2110,2114 ---- /* Substitute known constants for pseudo regs in the contents of LOC, which are part of INSN. ! If INSN is zero, the substitution should always be done (this is used to update DECL_RTL). These changes are taken out by try_constants if the result is not valid. diff -rc2N gcc-2.0/invoke.texi gcc-2.1/invoke.texi *** gcc-2.0/invoke.texi Fri Feb 14 03:35:04 1992 --- gcc-2.1/invoke.texi Sat Mar 21 21:11:07 1992 *************** *** 68,73 **** -w -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wcomment -Wconversion -Werror ! -Wformat -Wid-clash-@var{len} -Wimplicit -Wmissing-prototypes ! -Wno-parentheses -Wpointer-arith -Wreturn-type -Wshadow -Wstrict-prototypes -Wswitch -Wtraditional -Wtrigraphs -Wuninitialized -Wunused -Wwrite-strings -Wchar-subscripts --- 68,74 ---- -w -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wcomment -Wconversion -Werror ! -Wformat -Wid-clash-@var{len} -Wimplicit -Wimport ! -Winline -Wmissing-prototypes ! -Wparentheses -Wpointer-arith -Wreturn-type -Wshadow -Wstrict-prototypes -Wswitch -Wtraditional -Wtrigraphs -Wuninitialized -Wunused -Wwrite-strings -Wchar-subscripts *************** *** 78,82 **** @example -a -d@var{letters} -fpretend-float ! -g -ggdb -gdwarf -gstabs -gstabs+ -gcoff -p -pg -save-temps @end example --- 79,84 ---- @example -a -d@var{letters} -fpretend-float ! -g -g@var{level} -ggdb -gdwarf ! -gstabs -gstabs+ -gcoff -gxcoff -p -pg -save-temps @end example *************** *** 134,138 **** @emph{SPARC Options} ! -mfpu -mno-epilogue @emph{Convex Options} --- 136,140 ---- @emph{SPARC Options} ! -mforce-align -mfpu -mno-epilogue @emph{Convex Options} *************** *** 165,169 **** -mno-stats -mmemcpy -mno-memcpy -mno-mips-tfile -mmips-tfile -msoft-float -mhard-float -mabicalls -mno-abicalls -mhalf-pic ! -mno-half-pic -G @var{num} @end example --- 167,174 ---- -mno-stats -mmemcpy -mno-memcpy -mno-mips-tfile -mmips-tfile -msoft-float -mhard-float -mabicalls -mno-abicalls -mhalf-pic ! -mno-half-pic -G @var{num} -nocpp ! ! @emph{i386 Options} ! -m486 -msoft-float @end example *************** *** 520,523 **** --- 525,531 ---- Inhibit all warning messages. + @item -Wno_import + Inhibit warning messages about the use of @samp{#import}. + @item -pedantic Issue all the warnings demanded by strict ANSI standard C; reject *************** *** 690,693 **** --- 698,704 ---- @xref{Function Attributes}. + @item -Wparentheses + Warn if parentheses are omitted in certain contexts. + @item -Wall All of the above @samp{-W} options combined. These are all the *************** *** 784,789 **** Warn if an @code{extern} declaration is encountered within an function. ! @item -Wno-parentheses ! Disable warnings that parentheses are suggested around an expression. @item -Werror --- 795,801 ---- Warn if an @code{extern} declaration is encountered within an function. ! @item -Winline ! Warn if a function can not be inlined, and either it was declared as inline, ! or else the @samp{-finline-functions} option was given. @item -Werror *************** *** 802,806 **** @item -g Produce debugging information in the operating system's native format ! (stabs or COFF or DWARF). GDB can work with this debugging information. On most systems that use stabs format, @samp{-g} enables use of extra --- 814,819 ---- @item -g Produce debugging information in the operating system's native format ! (stabs, COFF, XCOFF, or DWARF). GDB can work with this debugging ! information. On most systems that use stabs format, @samp{-g} enables use of extra *************** *** 843,846 **** --- 856,863 ---- This is the format used by SDB on COFF systems. + @item -gxcoff + Produce debugging information in XCOFF format (if that is supported). + This is the format used on IBM RS/6000 systems. + @item -gdwarf Produce debugging information in DWARF format (if that is supported). *************** *** 851,854 **** --- 868,872 ---- @itemx -gstabs@var{level} @itemx -gcoff@var{level} + @itemx -gxcoff@var{level} @itemx -gdwarf@var{level} Request debugging information and also use @var{level} to specify how *************** *** 957,961 **** in the current directory and name them based on the source file. Thus, compiling @file{foo.c} with @samp{-c -save-temps} would produce files ! @file{foo.cpp} and @file{foo.s}, as well as @file{foo.o}. @end table --- 975,979 ---- in the current directory and name them based on the source file. Thus, compiling @file{foo.c} with @samp{-c -save-temps} would produce files ! @file{foo.i} and @file{foo.s}, as well as @file{foo.o}. @end table *************** *** 991,1002 **** @item -O2 ! Highly optimize. All supported optimizations that do not involve a ! space-speed tradeoff are performed. As compared to @samp{-O}, this ! option will increase both compilation time and the performance of the generated code. ! All @samp{-f@var{flag}} options that control optimization are turned on ! when @samp{-O2} is specified, except for @samp{-funroll-loops} and ! @samp{-funroll-all-loops}. @end table --- 1009,1020 ---- @item -O2 ! Optimize even more. Nearly all supported optimizations that do not ! involve a space-speed tradeoff are performed. As compared to @samp{-O}, ! this option increases both compilation time and the performance of the generated code. ! @samp{-O2} turns on all @samp{-f@var{flag}} options that enable more ! optimization, except for @samp{-funroll-loops}, ! @samp{-funroll-all-loops} and @samp{-fomit-frame-pointer}. @end table *************** *** 1328,1332 **** It makes a difference where in the command you write this option; the linker searches processes libraries and object files in the order they ! are specified. Thus, @samp{foo.o -lz bar.o} seaches library @samp{z} after file @file{foo.o} but before @file{bar.o}. If @file{bar.o} refers to functions in @samp{z}, those functions may not be loaded. --- 1346,1350 ---- It makes a difference where in the command you write this option; the linker searches processes libraries and object files in the order they ! are specified. Thus, @samp{foo.o -lz bar.o} searches library @samp{z} after file @file{foo.o} but before @file{bar.o}. If @file{bar.o} refers to functions in @samp{z}, those functions may not be loaded. *************** *** 1357,1364 **** option has no effect. - @item -dynamic - On systems that support dynamic linking, you can use this option to - request it explicitly. - @item -shared Produce a shared object which can then be linked with other objects to --- 1375,1378 ---- *************** *** 1436,1440 **** @samp{-B} prefix, if any. If that name is not found, or if @samp{-B} was not specified, the driver tries two standard prefixes, which are ! @file{/usr/lib/gcc/} and @file{/usr/local/lib/gcc/}. If neither of those results in a file name that is found, the unmodified program name is searched for using the directories specified in your --- 1450,1454 ---- @samp{-B} prefix, if any. If that name is not found, or if @samp{-B} was not specified, the driver tries two standard prefixes, which are ! @file{/usr/lib/gcc/} and @file{/usr/local/lib/gcc-lib/}. If neither of those results in a file name that is found, the unmodified program name is searched for using the directories specified in your *************** *** 1502,1506 **** the file name used for the executable files and libraries used for compilation. A given version of GNU CC, for a given target machine, is ! normally kept in the directory @file{/usr/local/lib/gcc/@var{machine}/@var{version}}.@refill It follows that sites can customize the effect of @samp{-b} or @samp{-V} --- 1516,1520 ---- the file name used for the executable files and libraries used for compilation. A given version of GNU CC, for a given target machine, is ! normally kept in the directory @file{/usr/local/lib/gcc-lib/@var{machine}/@var{version}}.@refill It follows that sites can customize the effect of @samp{-b} or @samp{-V} *************** *** 1507,1512 **** either by changing the names of these directories or adding alternate names (or symbolic links). Thus, if ! @file{/usr/local/lib/gcc/80386} is a link to ! @file{/usr/local/lib/gcc/i386v}, then @samp{-b 80386} will be an alias for @samp{-b i386v}.@refill --- 1521,1526 ---- either by changing the names of these directories or adding alternate names (or symbolic links). Thus, if ! @file{/usr/local/lib/gcc-lib/80386} is a link to ! @file{/usr/local/lib/gcc-lib/i386v}, then @samp{-b 80386} will be an alias for @samp{-b i386v}.@refill *************** *** 1571,1574 **** --- 1585,1589 ---- * RT Options:: * MIPS Options:: + * i386 Options:: @end menu *************** *** 1684,1691 **** own arrangements to provide suitable library functions for cross-compilation. - - @item -malign - This doesn't completely work yet. @end ignore @item -mno-epilogue Generate separate return instructions for @code{return} statements. --- 1699,1708 ---- own arrangements to provide suitable library functions for cross-compilation. @end ignore + + @item -mforce-align + Make sure all objects of type @code{double} are 8-byte aligned in memory + and use double-word instructions to reference them. + @item -mno-epilogue Generate separate return instructions for @code{return} statements. *************** *** 2008,2012 **** @end table ! @node MIPS Options, , RT Options, Submodel Options @subsection MIPS Options @cindex MIPS options --- 2025,2029 ---- @end table ! @node MIPS Options, i386 Options, RT Options, Submodel Options @subsection MIPS Options @cindex MIPS options *************** *** 2017,2021 **** @item -mcpu=@var{cpu type} Assume the defaults for the machine type @var{cpu type} when ! scheduling insturctions. The default @var{cpu type} is @samp{default}, which picks the longest cycles times for any of the machines, in order that the code run at reasonable rates on all MIPS --- 2034,2038 ---- @item -mcpu=@var{cpu type} Assume the defaults for the machine type @var{cpu type} when ! scheduling instructions. The default @var{cpu type} is @samp{default}, which picks the longest cycles times for any of the machines, in order that the code run at reasonable rates on all MIPS *************** *** 2065,2071 **** @itemx -mno-gpopt The @samp{-mgpopt} switch says to write all of the data declarations ! before the instructions in the text section, to all the MIPS assembler ! to generate one word memory references instead of using two words for ! short global or static data items. This is on by default if optimization is selected. --- 2082,2088 ---- @itemx -mno-gpopt The @samp{-mgpopt} switch says to write all of the data declarations ! before the instructions in the text section, this allows the MIPS ! assembler to generate one word memory references instead of using two ! words for short global or static data items. This is on by default if optimization is selected. *************** *** 2092,2096 **** @file{stage3} objects will have the temporary file names passed to the assembler embedded in the object file, which means the objects will ! not compare the same. @item -msoft-float --- 2109,2115 ---- @file{stage3} objects will have the temporary file names passed to the assembler embedded in the object file, which means the objects will ! not compare the same. The @samp{-mno-mips-tfile} switch should only ! be used when there are bugs in the @file{mips-tfile} program that ! prevents compilation. @item -msoft-float *************** *** 2138,2142 **** the MIPS assembler is used, and 0 when the GNU assembler is used. The @samp{-G @var{num}} switch is also passed to the assembler and linker. ! All modules should be compiled with the same @samp{-G @var{num}} value. @end table --- 2157,2166 ---- the MIPS assembler is used, and 0 when the GNU assembler is used. The @samp{-G @var{num}} switch is also passed to the assembler and linker. ! All modules should be compiled with the same @samp{-G @var{num}} ! value. ! ! @item -nocpp ! Tell the MIPS assembler to not run it's preprocessor over user ! assembler files (with a @samp{.s} suffix) when assembling them. @end table *************** *** 2148,2151 **** --- 2172,2201 ---- @end ifset + @node i386 Options, , MIPS Options, Submodel Options + @subsection Intel 386 Options + @cindex i386 Options + @cindex Intel 386 Options + + These @samp{-m} options are defined for the i386 family of computers: + + @table @code + @item -m486 + @itemx -mno486 + Control whether or not code is optimized for a 486 instead of an + 386. Code generated for an 486 will run on a 386 and vice versa. + + @item -msoft-float + Generate output containing library calls for floating point. + @strong{Warning:} the requisite libraries are not part of GNU CC. + Normally the facilities of the machine's usual C compiler are used, but + this can't be done directly in cross-compilation. You must make your + own arrangements to provide suitable library functions for + cross-compilation. + + On machines where a function returnings float point results in the 80387 + register stack, some floating point opcodes may be emitted even if + @samp{-msoft-float} is used. + @end table + @node Code Gen Options, Environment Variables, Submodel Options, Invoking GCC @section Options for Code Generation Conventions *************** *** 2229,2232 **** --- 2279,2287 ---- position-independent. + The GNU assembler does not fully support PIC. Currently, you must use + some other assembler in order for PIC to work. We would welcome + volunteers to upgrade GAS to handle this; the first part of the job is + to figure out what the assembler must do differently. + @item -fPIC If supported for the target machine, emit position-independent code, *************** *** 2329,2333 **** In addition, the prefix is used in an unusual way in finding the directories to search for header files. For each of the standard ! directories whose name normally begins with @samp{/usr/local/lib/gcc} (more precisely, with the value of @code{GCC_INCLUDE_DIR}), GNU CC tries replacing that beginning with the specified prefix to produce an --- 2384,2388 ---- In addition, the prefix is used in an unusual way in finding the directories to search for header files. For each of the standard ! directories whose name normally begins with @samp{/usr/local/lib/gcc-lib} (more precisely, with the value of @code{GCC_INCLUDE_DIR}), GNU CC tries replacing that beginning with the specified prefix to produce an *************** *** 2354,2363 **** @item C_INCLUDE_PATH ! @itemx C++_INCLUDE_PATH @itemx OBJC_INCLUDE_PATH @findex C_INCLUDE_PATH ! @findex C++_INCLUDE_PATH @findex OBJC_INCLUDE_PATH ! @c @itemx OBJC++_INCLUDE_PATH These environment variables pertain to particular languages. Each variable's value is a colon-separated list of directories, much like --- 2409,2418 ---- @item C_INCLUDE_PATH ! @itemx CPLUS_INCLUDE_PATH @itemx OBJC_INCLUDE_PATH @findex C_INCLUDE_PATH ! @findex CPLUS_INCLUDE_PATH @findex OBJC_INCLUDE_PATH ! @c @itemx OBJCPLUS_INCLUDE_PATH These environment variables pertain to particular languages. Each variable's value is a colon-separated list of directories, much like diff -rc2N gcc-2.0/jump.c gcc-2.1/jump.c *** gcc-2.0/jump.c Fri Feb 14 14:54:07 1992 --- gcc-2.1/jump.c Sat Mar 14 00:04:09 1992 *************** *** 641,645 **** } ! /* If we have an unconditional jump preceeded by a USE, try to put the USE before the target and jump there. This simplifies many of the optimizations below since we don't have to worry about --- 641,645 ---- } ! /* If we have an unconditional jump preceded by a USE, try to put the USE before the target and jump there. This simplifies many of the optimizations below since we don't have to worry about *************** *** 691,695 **** We set: ! TEMP to the jump insn preceeding "x = a;" TEMP1 to X TEMP2 to the insn that sets "x = b;" --- 691,695 ---- We set: ! TEMP to the jump insn preceding "x = a;" TEMP1 to X TEMP2 to the insn that sets "x = b;" *************** *** 1417,1420 **** --- 1417,1431 ---- rtx range1before, range2before; + /* Include in each range any line number before it. */ + while (PREV_INSN (range1beg) + && GET_CODE (PREV_INSN (range1beg)) == NOTE + && NOTE_LINE_NUMBER (PREV_INSN (range1beg)) > 0) + range1beg = PREV_INSN (range1beg); + + while (PREV_INSN (range2beg) + && GET_CODE (PREV_INSN (range2beg)) == NOTE + && NOTE_LINE_NUMBER (PREV_INSN (range2beg)) > 0) + range2beg = PREV_INSN (range2beg); + /* Don't move NOTEs for blocks or loops; shift them outside the ranges, where they'll stay put. */ *************** *** 2667,2671 **** if (GET_CODE (insn) == JUMP_INSN) JUMP_LABEL (insn) = label; ! else if (! find_reg_note (insn, REG_LABEL, 0)) { rtx next = next_real_insn (label); --- 2678,2682 ---- if (GET_CODE (insn) == JUMP_INSN) JUMP_LABEL (insn) = label; ! else if (! find_reg_note (insn, REG_LABEL, label)) { rtx next = next_real_insn (label); diff -rc2N gcc-2.0/libgcc1.c gcc-2.1/libgcc1.c *** gcc-2.0/libgcc1.c Fri Feb 14 22:39:14 1992 --- gcc-2.1/libgcc1.c Wed Mar 4 04:27:57 1992 *************** *** 202,206 **** #ifndef perform_lesf2 ! #define perform_lesf2(a, b) return 1 - (a >= b); #endif --- 202,206 ---- #ifndef perform_lesf2 ! #define perform_lesf2(a, b) return 1 - (a <= b); #endif diff -rc2N gcc-2.0/libgcc2.c gcc-2.1/libgcc2.c *** gcc-2.0/libgcc2.c Wed Feb 12 12:47:31 1992 --- gcc-2.1/libgcc2.c Thu Mar 19 15:40:42 1992 *************** *** 30,34 **** --- 30,36 ---- #include "tm.h" + #ifndef L_trampoline #include "gstddef.h" + #endif /* Don't use `fancy_abort' here even if config.h says to use it. */ *************** *** 865,870 **** --- 867,877 ---- #else /* not __i860__ */ #ifdef __sparc__ + #ifdef NO_UNDERSCORES + asm (".global __builtin_saveregs"); + asm ("__builtin_saveregs:"); + #else asm (".global ___builtin_saveregs"); asm ("___builtin_saveregs:"); + #endif asm ("st %i0,[%fp+68]"); asm ("st %i1,[%fp+72]"); *************** *** 1220,1223 **** --- 1227,1255 ---- } #endif /* __convex__ */ + + #ifdef __pyr__ + + #include + #include + #include + #include + #include + + /* Modified from the convex -code above. + mremap promises to clear the i-cache. */ + + void + __enable_execute_stack () + { + int fp; + if (mprotect (((unsigned int)&fp/PAGSIZ)*PAGSIZ, PAGSIZ, + PROT_READ|PROT_WRITE|PROT_EXEC)) + { + perror ("mprotect in __enable_execute_stack"); + fflush (stderr); + abort (); + } + } + #endif /* __pyr__ */ #endif /* L_trampoline */ *************** *** 1255,1259 **** /* Run all the global constructors on entry to the program. */ ! #ifndef ON_EXIT /* DO_GLOBAL_CTORS_BODY uses ON_EXIT */ #define ON_EXIT(a, b) #else --- 1287,1291 ---- /* Run all the global constructors on entry to the program. */ ! #ifndef ON_EXIT #define ON_EXIT(a, b) #else *************** *** 1270,1275 **** --- 1302,1310 ---- { DO_GLOBAL_CTORS_BODY; + ON_EXIT (__do_global_dtors, 0); } + #endif /* no INIT_SECTION_ASM_OP */ + #if !defined (INIT_SECTION_ASM_OP) || defined (INVOKE__main) /* Subroutine called automatically by `main'. Compiling a global function named `main' *************** *** 1291,1295 **** } } ! #endif /* no INIT_SECTION_ASM_OP */ #endif /* L__main */ --- 1326,1330 ---- } } ! #endif /* no INIT_SECTION_ASM_OP or INVOKE__main */ #endif /* L__main */ *************** *** 1306,1313 **** /* We declare the lists here with two elements each, so that they are valid empty lists if no other definition is loaded. */ ! #ifndef INIT_SECTION_ASM_OP func_ptr __CTOR_LIST__[2]; func_ptr __DTOR_LIST__[2]; ! #endif /* INIT_SECTION_ASM_OP */ #ifndef ON_EXIT --- 1341,1348 ---- /* We declare the lists here with two elements each, so that they are valid empty lists if no other definition is loaded. */ ! #if !defined(INIT_SECTION_ASM_OP) && !defined(CTOR_LISTS_DEFINED_EXTERNALLY) func_ptr __CTOR_LIST__[2]; func_ptr __DTOR_LIST__[2]; ! #endif /* no INIT_SECTION_ASM_OP and not CTOR_LISTS_DEFINED_EXTERNALLY */ #ifndef ON_EXIT diff -rc2N gcc-2.0/limits.h gcc-2.1/limits.h *** gcc-2.0/limits.h Wed Dec 18 14:59:17 1991 --- gcc-2.1/limits.h Thu Mar 5 10:04:31 1992 *************** *** 2,7 **** #ifndef _MACH_MACHLIMITS_H_ ! /* _MACH_MACHLIMITS.H_ is used on OSF/1. */ ! #define _LIMITS_H #define _MACH_MACHLIMITS_H_ --- 2,7 ---- #ifndef _MACH_MACHLIMITS_H_ ! /* _MACH_MACHLIMITS_H_ is used on OSF/1. */ ! #define _LIMITS_H_ #define _MACH_MACHLIMITS_H_ *************** *** 69,71 **** #endif /* _MACH_MACHLIMITS_H_ */ ! #endif /* _LIMITS_H */ --- 69,71 ---- #endif /* _MACH_MACHLIMITS_H_ */ ! #endif /* _LIMITS_H_ */ diff -rc2N gcc-2.0/local-alloc.c gcc-2.1/local-alloc.c *** gcc-2.0/local-alloc.c Fri Jan 17 21:44:32 1992 --- gcc-2.1/local-alloc.c Sat Mar 21 22:35:42 1992 *************** *** 369,373 **** /* This sets the maximum number of quantities we can have. Quantity ! numbers start at zero and we can have one for each psuedo plus the number of SCRATCHs in the largest block, in the worst case. */ max_qty = (max_regno - FIRST_PSEUDO_REGISTER) + max_scratch; --- 369,373 ---- /* This sets the maximum number of quantities we can have. Quantity ! numbers start at zero and we can have one for each pseudo plus the number of SCRATCHs in the largest block, in the worst case. */ max_qty = (max_regno - FIRST_PSEUDO_REGISTER) + max_scratch; *************** *** 641,645 **** static void ! optimize_reg_copy (insn, dest, src) rtx insn; rtx dest; --- 641,645 ---- static void ! optimize_reg_copy_1 (insn, dest, src) rtx insn; rtx dest; *************** *** 756,759 **** --- 756,838 ---- } } + + /* INSN is a copy of SRC to DEST, in which SRC dies. See if we now have + a sequence of insns that modify DEST followed by an insn that sets + SRC to DEST in which DEST dies, with no prior modification of DEST. + (There is no need to check if the insns in between actually modify + DEST. We should not have cases where DEST is not modified, but + the optimization is safe if no such modification is detected.) + In that case, we can replace all uses of DEST, starting with INSN and + ending with the set of SRC to DEST, with SRC. We do not do this + optimization if a CALL_INSN is crossed unless SRC already crosses a + call. + + It is assumed that DEST and SRC are pseudos; it is too complicated to do + this for hard registers since the substitutions we may make might fail. */ + + static void + optimize_reg_copy_2 (insn, dest, src) + rtx insn; + rtx dest; + rtx src; + { + rtx p, q; + rtx set; + int sregno = REGNO (src); + int dregno = REGNO (dest); + + for (p = NEXT_INSN (insn); p; p = NEXT_INSN (p)) + { + if (GET_CODE (p) == CODE_LABEL || GET_CODE (p) == JUMP_INSN + || (GET_CODE (p) == NOTE + && (NOTE_LINE_NUMBER (p) == NOTE_INSN_LOOP_BEG + || NOTE_LINE_NUMBER (p) == NOTE_INSN_LOOP_END))) + break; + + if (GET_RTX_CLASS (GET_CODE (p)) != 'i') + continue; + + set = single_set (p); + if (set && SET_SRC (set) == dest && SET_DEST (set) == src + && find_reg_note (p, REG_DEAD, dest)) + { + /* We can do the optimization. Scan forward from INSN again, + replacing regs as we go. */ + + /* Set to stop at next insn. */ + for (q = insn; q != NEXT_INSN (p); q = NEXT_INSN (q)) + if (GET_RTX_CLASS (GET_CODE (q)) == 'i') + { + if (reg_mentioned_p (dest, PATTERN (q))) + { + PATTERN (q) = replace_rtx (PATTERN (q), dest, src); + + /* We assume that a register is used exactly once per + insn in the updates below. If this is not correct, + no great harm is done. */ + reg_n_refs[sregno] -= loop_depth; + reg_n_refs[dregno] += loop_depth; + } + + + if (GET_CODE (q) == CALL_INSN) + { + reg_n_calls_crossed[dregno]--; + reg_n_calls_crossed[sregno]++; + } + } + + remove_note (p, find_reg_note (p, REG_DEAD, dest)); + reg_n_deaths[dregno]--; + remove_note (insn, find_reg_note (insn, REG_DEAD, src)); + reg_n_deaths[sregno]--; + return; + } + + if (reg_set_p (src, p) + || (GET_CODE (p) == CALL_INSN && reg_n_calls_crossed[sregno] == 0)) + break; + } + } /* Find registers that are equivalent to a single value throughout the *************** *** 826,830 **** && GET_CODE (SET_SRC (set)) == REG && ! find_reg_note (insn, REG_DEAD, SET_SRC (set))) ! optimize_reg_copy (insn, dest, SET_SRC (set)); /* Otherwise, we only handle the case of a pseudo register being set --- 905,917 ---- && GET_CODE (SET_SRC (set)) == REG && ! find_reg_note (insn, REG_DEAD, SET_SRC (set))) ! optimize_reg_copy_1 (insn, dest, SET_SRC (set)); ! ! /* Similarly for a pseudo-pseudo copy when SRC is dead. */ ! else if (flag_expensive_optimizations && GET_CODE (dest) == REG ! && REGNO (dest) >= FIRST_PSEUDO_REGISTER ! && GET_CODE (SET_SRC (set)) == REG ! && REGNO (SET_SRC (set)) >= FIRST_PSEUDO_REGISTER ! && find_reg_note (insn, REG_DEAD, SET_SRC (set))) ! optimize_reg_copy_2 (insn, dest, SET_SRC (set)); /* Otherwise, we only handle the case of a pseudo register being set *************** *** 1643,1647 **** /* Record the death of REG in the current insn. If OUTPUT_P is non-zero, REG is an output that is dying (i.e., it is never used), otherwise it ! is an input (the normal case). */ static void --- 1730,1735 ---- /* Record the death of REG in the current insn. If OUTPUT_P is non-zero, REG is an output that is dying (i.e., it is never used), otherwise it ! is an input (the normal case). ! If OUTPUT_P is 1, then we extend the life past the end of this insn. */ static void *************** *** 1651,1654 **** --- 1739,1761 ---- { register int regno = REGNO (reg); + + /* If this insn has multiple results, + and the dead reg is used in one of the results, + extend its life to after this insn, + so it won't get allocated together with any other result of this insn. */ + if (GET_CODE (PATTERN (this_insn)) == PARALLEL + && !single_set (this_insn)) + { + int i; + for (i = XVECLEN (PATTERN (this_insn), 0) - 1; i >= 0; i--) + { + rtx set = XVECEXP (PATTERN (this_insn), 0, i); + if (GET_CODE (set) == SET + && GET_CODE (SET_DEST (set)) != REG + && !rtx_equal_p (reg, SET_DEST (set)) + && reg_overlap_mentioned_p (reg, SET_DEST (set))) + output_p = 1; + } + } if (regno < FIRST_PSEUDO_REGISTER) diff -rc2N gcc-2.0/longlong.h gcc-2.1/longlong.h *** gcc-2.0/longlong.h Mon Dec 23 23:29:21 1991 --- gcc-2.1/longlong.h Sat Mar 14 00:04:13 1992 *************** *** 25,29 **** #define __ll_highpart(t) ((unsigned long int) (t) / __ll_B) ! /* Define auxilliary asm macros. 1) umul_ppmm(high_prod, low_prod, multipler, multiplicand) --- 25,29 ---- #define __ll_highpart(t) ((unsigned long int) (t) / __ll_B) ! /* Define auxiliary asm macros. 1) umul_ppmm(high_prod, low_prod, multipler, multiplicand) *************** *** 251,254 **** --- 251,255 ---- } while (0) #define UMUL_TIME 8 + #if 0 /* Overflow for nh>=FFFFFFFE, d==FFFFFFFF. Find a good fix later. */ #define udiv_qrnnd(q, r, nh, nl, d) \ do { /* Use the signed "div" insn, and adjust the result. */ \ *************** *** 299,302 **** --- 300,304 ---- #define UDIV_TIME 40 #define UDIV_NEEDS_NORMALIZATION 1 + #endif #define count_leading_zeros(count, x) \ __asm__ ("cntlz %0,%1" \ diff -rc2N gcc-2.0/loop.c gcc-2.1/loop.c *** gcc-2.0/loop.c Tue Feb 4 16:25:44 1992 --- gcc-2.1/loop.c Sun Mar 22 17:38:23 1992 *************** *** 49,53 **** /* Vector mapping INSN_UIDs to luids. ! The luids are like uids but increase monononically always. We use them to see whether a jump comes from outside a given loop. */ --- 49,53 ---- /* Vector mapping INSN_UIDs to luids. ! The luids are like uids but increase monotonically always. We use them to see whether a jump comes from outside a given loop. */ *************** *** 1459,1462 **** --- 1459,1490 ---- } + /* If X contains any LABEL_REF's, add REG_LABEL notes for them to all + insns in INSNS which use thet reference. */ + + static void + add_label_notes (x, insns) + rtx x; + rtx insns; + { + enum rtx_code code = GET_CODE (x); + int i; + char *fmt; + rtx insn; + + if (code == LABEL_REF) + { + for (insn = insns; insn; insn = NEXT_INSN (insn)) + if (reg_mentioned_p (XEXP (x, 0), insn)) + REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_LABEL, XEXP (x, 0), + REG_NOTES (insn)); + return; + } + + fmt = GET_RTX_FORMAT (code); + for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) + if (fmt[i] == 'e') + add_label_notes (XEXP (x, i), insns); + } + /* Scan MOVABLES, and move the insns that deserve to be moved. If two matching movables are combined, replace one reg with the *************** *** 1636,1643 **** start_sequence (); emit_move_insn (m->set_dest, m->set_src); ! temp = gen_sequence (); end_sequence (); ! i1 = emit_insn_before (temp, loop_start); if (! find_reg_note (i1, REG_EQUAL, 0)) REG_NOTES (i1) --- 1664,1673 ---- start_sequence (); emit_move_insn (m->set_dest, m->set_src); ! temp = get_insns (); end_sequence (); ! add_label_notes (m->set_src, temp); ! ! i1 = emit_insns_before (temp, loop_start); if (! find_reg_note (i1, REG_EQUAL, 0)) REG_NOTES (i1) *************** *** 3276,3280 **** { /* Biv initial value is not simple move, ! so let it keep intial value of "itself". */ if (loop_dump_stream) --- 3306,3310 ---- { /* Biv initial value is not simple move, ! so let it keep initial value of "itself". */ if (loop_dump_stream) *************** *** 3756,3760 **** since the givs we planned to use might not have been reduced. ! We have to be careful that we didn't initially think we could elminate this biv because of a giv that we now think may be dead and shouldn't be used as a biv replacement. --- 3786,3790 ---- since the givs we planned to use might not have been reduced. ! We have to be careful that we didn't initially think we could eliminate this biv because of a giv that we now think may be dead and shouldn't be used as a biv replacement. *************** *** 3863,3867 **** return 1; ! /* Only consider psuedos we know about initialized in insns whose luids we know. */ if (GET_CODE (x) != REG --- 3893,3897 ---- return 1; ! /* Only consider pseudos we know about initialized in insns whose luids we know. */ if (GET_CODE (x) != REG *************** *** 4106,4110 **** However, for a DEST_ADDR giv, INSN merely uses the value of the giv; it does not compute a new value. Hence the value is always computable ! irregardless of whether INSN is executed each iteration. */ if (type == DEST_ADDR) --- 4136,4140 ---- However, for a DEST_ADDR giv, INSN merely uses the value of the giv; it does not compute a new value. Hence the value is always computable ! regardless of whether INSN is executed each iteration. */ if (type == DEST_ADDR) *************** *** 4505,4513 **** else if (biv->insn == p) { ! if (biv->mult_val == const1_rtx ! && (tem = simplify_giv_expr (gen_rtx (MULT, giv->mode, ! biv->add_val, ! giv->mult_val), ! &dummy))) giv->derive_adjustment = tem; else --- 4535,4551 ---- else if (biv->insn == p) { ! tem = 0; ! ! if (biv->mult_val == const1_rtx) ! tem = simplify_giv_expr (gen_rtx (MULT, giv->mode, ! biv->add_val, ! giv->mult_val), ! &dummy); ! ! if (tem && giv->derive_adjustment) ! tem = simplify_giv_expr (gen_rtx (PLUS, giv->mode, tem, ! giv->derive_adjustment), ! &dummy); ! if (tem) giv->derive_adjustment = tem; else *************** *** 5818,5822 **** for (v = bl->giv; v; v = v->next_iv) ! if (CONSTANT_P (v->mult_val) && ! v->ignore && ! v->maybe_dead && v->mode == mode) --- 5856,5860 ---- for (v = bl->giv; v; v = v->next_iv) ! if (CONSTANT_P (v->mult_val) && INTVAL (v->mult_val) > 0 && ! v->ignore && ! v->maybe_dead && v->mode == mode) diff -rc2N gcc-2.0/loop.h gcc-2.1/loop.h *** gcc-2.0/loop.h Wed Jan 15 16:51:01 1992 --- gcc-2.1/loop.h Sat Mar 14 00:04:21 1992 *************** *** 83,87 **** then cannot combine with any other giv. */ unsigned maybe_dead : 1; /* 1 if this giv might be dead. In that case, ! we won't use it to elminate a biv, it would probably lose. */ int lifetime; /* Length of life of this giv */ --- 83,87 ---- then cannot combine with any other giv. */ unsigned maybe_dead : 1; /* 1 if this giv might be dead. In that case, ! we won't use it to eliminate a biv, it would probably lose. */ int lifetime; /* Length of life of this giv */ diff -rc2N gcc-2.0/machmode.h gcc-2.1/machmode.h *** gcc-2.0/machmode.h Wed Jan 15 16:54:47 1992 --- gcc-2.1/machmode.h Tue Mar 10 17:11:09 1992 *************** *** 99,102 **** --- 99,108 ---- #define GET_MODE_WIDER_MODE(MODE) (mode_wider_mode[(int)(MODE)]) + /* Return the mode for data of a given size SIZE and mode class CLASS. + If LIMIT is nonzero, then don't use modes bigger than MAX_FIXED_MODE_SIZE. + The value is BLKmode if no other mode is found. */ + + extern enum machine_mode mode_for_size (); + /* Find the best mode to use to access a bit field. */ diff -rc2N gcc-2.0/make-cc1.com gcc-2.1/make-cc1.com *** gcc-2.0/make-cc1.com Thu Feb 13 17:08:10 1992 --- gcc-2.1/make-cc1.com Mon Mar 23 14:29:32 1992 *************** *** 144,149 **** regclass,local-alloc,global-alloc,reload,reload1,insn-peep,final,recog insn-recog,insn-extract,insn-output,obstack,integrate,caller-save,calls ! dwarfout,function,insn-attrtab,reorg,sched,sdbout,dbxout,unroll,reg-stack ! aux-output,print-rtl,version $! $pur/nolog independent.opt --- 144,149 ---- regclass,local-alloc,global-alloc,reload,reload1,insn-peep,final,recog insn-recog,insn-extract,insn-output,obstack,integrate,caller-save,calls ! dwarfout,xcoffout,function,insn-attrtab,reorg,sched,sdbout,dbxout,unroll ! reg-stack,aux-output,print-rtl,getpwd,version $! $pur/nolog independent.opt *************** *** 248,251 **** --- 248,252 ---- $ 'CC 'CFLAGS dwarfout.c $ 'CC 'CFLAGS dbxout.c + $ 'CC 'CFLAGS xcoffout.c $ 'CC 'CFLAGS reg-stack.c $ 'CC 'CFLAGS function.c *************** *** 261,264 **** --- 262,266 ---- $ 'CC 'CFLAGS insn-attrtab.c $ 'CC 'CFLAGS aux-output.c + $ 'CC 'CFLAGS getpwd.c $! $compile_cc1: diff -rc2N gcc-2.0/make-gcc.com gcc-2.1/make-gcc.com *** gcc-2.0/make-gcc.com Tue Sep 17 21:14:04 1991 --- gcc-2.1/make-gcc.com Sat Mar 7 13:47:32 1992 *************** *** 18,19 **** --- 18,85 ---- $ @make-cc1 $! @make-cc1 cc1 cc1plus + $! + $! + $! Now build the library routines that are required. These will be placed in + $! libgcc2.olb. To install, extract all of the modules from libgcc2.olb and + $! add them to gnu_cc:[000000]gcclib.olb. You may have to delete the eprintf + $! and new modules from the gnu_cc:[000000]gcclib.olb, since libgcc2 supplies + $! these same routines with different module names. + $! + $! Set up the logical names to use the compiler that we just built. + $! + $ Procedure:='f$environment("PROCEDURE")' + $ Device:='f$parse(Procedure,,,"DEVICE","NO_CONCEAL")' + $ Directory:='f$parse(Procedure,,,"DIRECTORY","NO_CONCEAL")' + $ Path:="''Device'''Directory'" + $! + $! Check for "rooted" directory specs + $! + $ l = 'f$length(Path)' + $ tmp = 'f$locate(".][",Path)' + $ if 'tmp' .ne. 'l' then goto 10$ + $ tmp = 'f$locate(".><",Path)' + $ if 'tmp' .ne. 'l' then goto 10$ + $ goto 100$ + $! + $! Eliminate rooted directory specs + $! + $ 10$: + $ if "''f$extract(tmp,255,Path)'" .eqs. ".][000000]" then goto 20$ + $ if "''f$extract(tmp,255,Path)'" .eqs. ".><000000>" then goto 20$ + $ l = tmp + 3 + $ Path:="''f$extract(0,tmp,Path)'.''f$extract(l,255,Path)'" + $ goto 100$ + $ 20$: + $ l = tmp + 1 + $ Path:="''f$extract(0,tmp,Path)'''f$extract(l,1,Path)'" + $ 100$: + $! + $! Calculate the prefix and suffix (used in generating desired paths) + $! + $ l = 'f$length(Path)' - 1 + $ Prefix:='f$Extract(0,l,Path)' + $ Suffix:='f$extract(l,1,Path)' + $! + $ gnu_cc_path:="''Prefix'.''Suffix'" + $! + $oldgcc=f$trnlnm("GNU_CC") + $ assign 'gnu_cc_path'/translation=concealed, - + 'f$trnlnm("GNU_CC")/translation=concealed GNU_CC + $! + $! Set the version number from version.opt. + $! + $open ifile$ version.opt + $read ifile$ line + $close ifile$ + $ijk = f$locate("=",line) + 1 + $line='f$extract(ijk,255,line) + $assign 'line' gnu_cc_version + $! + $! Now build gcclib2.olb + $! + $@make-l2 + $! + $! Deassign logical names. + $! + $deassign gnu_cc_version + $deassign gnu_cc diff -rc2N gcc-2.0/make-l2.com gcc-2.1/make-l2.com *** gcc-2.0/make-l2.com Wed Feb 12 12:56:05 1992 --- gcc-2.1/make-l2.com Sat Mar 7 13:47:31 1992 *************** *** 2,6 **** $flnm = f$enviroment("PROCEDURE") ! get current procedure name $set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")' - $@$diska:[eric]test_gcc2 $! $! Command file to build libgcc2.olb. You should only run this once you --- 2,5 ---- *************** *** 9,12 **** --- 8,17 ---- $! with gnu_cc:[000000]gcclib.olb $! + $if f$extract(0,1,f$trnlnm("GNU_CC_VERSION")).nes."1" then goto compile + $! + $write sys$output "This must be compiled by gcc 2.0" + $exit + $! + $compile: $lib/create libgcc2.olb $call compile_libgcc2 "L_muldi3" diff -rc2N gcc-2.0/math-68881.h gcc-2.1/math-68881.h *** gcc-2.0/math-68881.h Thu May 2 14:44:28 1991 --- gcc-2.1/math-68881.h Wed Mar 11 18:27:37 1992 *************** *** 283,287 **** errno = EDOM; ! __asm ("fmove%.d %#07fffffffffffffff,%0" /* quiet NaN */ : "=f" (value) : /* no inputs */); --- 283,287 ---- errno = EDOM; ! __asm ("fmove%.d %#0x7fffffffffffffff,%0" /* quiet NaN */ : "=f" (value) : /* no inputs */); *************** *** 300,304 **** int i = (int) y; ! if (i & 1 == 0) /* even */ return exp (y * log (-x)); else --- 300,304 ---- int i = (int) y; ! if ((i & 1) == 0) /* even */ return exp (y * log (-x)); else diff -rc2N gcc-2.0/md.texi gcc-2.1/md.texi *** gcc-2.0/md.texi Tue Feb 4 14:25:01 1992 --- gcc-2.1/md.texi Mon Mar 16 22:15:09 1992 *************** *** 4,8 **** @ifset INTERNALS ! @node Machine Desc, Machine Macros, RTL, Top @chapter Machine Descriptions @cindex machine descriptions --- 4,8 ---- @ifset INTERNALS ! @node Machine Desc, Target Macros, RTL, Top @chapter Machine Descriptions @cindex machine descriptions *************** *** 1815,1819 **** There are often cases where multiple RTL expressions could represent an ! operation peformed by a single machine instruction. This situation is most commonly encountered with logical, branch, and multiply-accumulate instructions. In such cases, the compiler attempts to convert these --- 1815,1819 ---- There are often cases where multiple RTL expressions could represent an ! operation performed by a single machine instruction. This situation is most commonly encountered with logical, branch, and multiply-accumulate instructions. In such cases, the compiler attempts to convert these *************** *** 2388,2391 **** --- 2388,2392 ---- * Attr Example:: An example of assigning attributes. * Insn Lengths:: Computing the length of insns. + * Constant Attributes:: Defining attributes that are constant. * Delay Slots:: Defining delay slots required for a machine. * Function Units:: Specifying information for insn scheduling. *************** *** 2414,2418 **** attribute for insns that match patterns whose definition does not include an explicit value for this attribute. @xref{Attr Example}, for more ! information on the handling of defaults. @findex insn-attr.h --- 2415,2420 ---- attribute for insns that match patterns whose definition does not include an explicit value for this attribute. @xref{Attr Example}, for more ! information on the handling of defaults. @xref{Constant Attributes}, ! for information on attributes that do not depend on any particular insn. @findex insn-attr.h *************** *** 2779,2783 **** full-word result. ! @node Insn Lengths, Delay Slots, Attr Example, Insn Attributes @subsection Computing the Length of an Insn @cindex insn lengths, computing --- 2781,2785 ---- full-word result. ! @node Insn Lengths, Constant Attributes, Attr Example, Insn Attributes @subsection Computing the Length of an Insn @cindex insn lengths, computing *************** *** 2838,2844 **** @end table ! @findex get_attr_value The routine that returns the value of the @code{length} attribute, ! @code{get_attr_value}, can be used by the output routine to determine the form of the branch instruction to be written, as the example below illustrates. --- 2840,2846 ---- @end table ! @findex get_attr_length The routine that returns the value of the @code{length} attribute, ! @code{get_attr_length}, can be used by the output routine to determine the form of the branch instruction to be written, as the example below illustrates. *************** *** 2868,2872 **** @end example ! @node Delay Slots, Function Units, Insn Lengths, Insn Attributes @subsection Delay Slot Scheduling @cindex delay slots, defining --- 2870,2903 ---- @end example ! @node Constant Attributes, Delay Slots, Insn Lengths, Insn Attributes ! @subsection Constant Attributes ! @cindex constant attributes ! ! A special form of DEFINE_ATTR, where the expression for the default ! value is a CONST expression, indicates an attribute that is constant for ! a given run of the compiler. Constant attributes may be used to specify ! which variety of processor is used. For example, ! ! @example ! (define_attr "cpu" "m88100,m88110,m88000" ! (const ! (cond [(symbol_ref "TARGET_88100") (const_string "m88100") ! (symbol_ref "TARGET_88110") (const_string "m88110")] ! (const_string "m88000")))) ! ! (define_attr "memory" "fast,slow" ! (const ! (if_then_else (symbol_ref "TARGET_FAST_MEM") ! (const_string "fast") ! (const_string "slow")))) ! @end example ! ! The routine generated for constant attributes has no parameters as it ! does not depend on any particular insn. RTL expressions used to ! define the value of a constant attribute may use the SYMBOL_REF form, ! but may not use either the MATCH_OPERAND form or EQ_ATTR forms ! involving insn attributes. ! ! @node Delay Slots, Function Units, Constant Attributes, Insn Attributes @subsection Delay Slot Scheduling @cindex delay slots, defining diff -rc2N gcc-2.0/mips-tdump.c gcc-2.1/mips-tdump.c *** gcc-2.0/mips-tdump.c Fri Jan 10 17:35:27 1992 --- gcc-2.1/mips-tdump.c Sat Mar 21 18:15:25 1992 *************** *** 23,26 **** --- 23,27 ---- #include #include + #include #include #include *************** *** 33,37 **** #else ! #ifdef _STDIO_H_ /* Ultrix 4.0 */ typedef void *PTR_T; typedef void *CPTR_T; --- 34,38 ---- #else ! #if defined(_STDIO_H_) || defined(__STDIO_H__) /* Ultrix 4.0, SGI */ typedef void *PTR_T; typedef void *CPTR_T; *************** *** 38,42 **** #else ! typedef char *PTR_T; /* Ultrix 3.1 */ typedef char *CPTR_T; #endif --- 39,43 ---- #else ! typedef char *PTR_T; /* Ultrix 3.1 */ typedef char *CPTR_T; #endif diff -rc2N gcc-2.0/mips-tfile.c gcc-2.1/mips-tfile.c *** gcc-2.0/mips-tfile.c Mon Jan 13 11:23:40 1992 --- gcc-2.1/mips-tfile.c Sun Mar 22 15:15:19 1992 *************** *** 617,621 **** #else ! #ifdef _STDIO_H_ /* Ultrix 4.0 */ typedef void *PTR_T; typedef void *CPTR_T; --- 617,621 ---- #else ! #if defined(_STDIO_H_) || defined(__STDIO_H__) /* Ultrix 4.0, SGI */ typedef void *PTR_T; typedef void *CPTR_T; *************** *** 622,626 **** #else ! typedef char *PTR_T; /* Ultrix 3.1 */ typedef char *CPTR_T; #endif --- 622,626 ---- #else ! typedef char *PTR_T; /* Ultrix 3.1 */ typedef char *CPTR_T; #endif *************** *** 647,651 **** __proto((char *)); extern void fancy_abort __proto((void)); ! extern void botch __proto((const char *)); extern PTR_T xmalloc __proto((Size_t)); extern PTR_T xcalloc __proto((Size_t, Size_t)); --- 647,651 ---- __proto((char *)); extern void fancy_abort __proto((void)); ! void botch __proto((const char *)); extern PTR_T xmalloc __proto((Size_t)); extern PTR_T xcalloc __proto((Size_t, Size_t)); *************** *** 685,689 **** #include ! #ifdef USG #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */ #else --- 685,689 ---- #include ! #if defined (USG) || defined (NO_STAB_H) #include "gstab.h" /* If doing DBX on sysV, use our own stab.h. */ #else *************** *** 1594,1597 **** --- 1594,1598 ---- static int rename_output = 0; /* != 0 if rename output file*/ static int delete_input = 0; /* != 0 if delete input after done */ + static int stabs_seen = 0; /* != 0 if stabs have been seen */ *************** *** 1676,1679 **** --- 1677,1681 ---- STATIC char *read_line __proto((void)); STATIC void parse_input __proto((void)); + STATIC void mark_stabs __proto((const char *)); STATIC void parse_begin __proto((const char *)); STATIC void parse_bend __proto((const char *)); *************** *** 1716,1719 **** --- 1718,1727 ---- STATIC void free_thead __proto((thead_t *)); + /* rms: The following is a very bad idea. + It's easy for these to conflict with definitions on certain systems. + All system calls and library functions + for which an implicit definition will work + should be left implicit. + I deleted the declarations for open and fstat. */ /* Prototypes for library functions used. */ #if !defined(NO_LIB_PROTOTYPE) && !defined(_OSF_SOURCE) && !defined(_STDIO_H_) *************** *** 1736,1740 **** extern void perror __proto((const char *)); extern void exit __proto((int)); - extern int open __proto((const char *, int, ...)); extern int rename __proto((const char *, const char *)); --- 1744,1747 ---- *************** *** 1761,1765 **** extern long lseek __proto((int, long, int)); extern int ftruncate __proto((int, long)); - extern int fstat __proto((int, struct stat *)); #endif --- 1768,1771 ---- *************** *** 1801,1804 **** --- 1807,1811 ---- { ".stabs", sizeof(".stabs")-1, parse_stabs }, { ".stabn", sizeof(".stabn")-1, parse_stabn }, + { "#@stabs", sizeof("#@stabs")-1, mark_stabs }, }; *************** *** 2792,2796 **** if (cur_file_ptr == (efdr_t *)0) { ! error ("#.begin directive without a preceeding .file directive"); return; } --- 2799,2803 ---- if (cur_file_ptr == (efdr_t *)0) { ! error ("#.begin directive without a preceding .file directive"); return; } *************** *** 2798,2802 **** if (cur_proc_ptr == (PDR *)0) { ! error ("#.begin directive without a preceeding .ent directive"); return; } --- 2805,2809 ---- if (cur_proc_ptr == (PDR *)0) { ! error ("#.begin directive without a preceding .ent directive"); return; } *************** *** 2842,2846 **** if (cur_file_ptr == (efdr_t *)0) { ! error ("#.begin directive without a preceeding .file directive"); return; } --- 2849,2853 ---- if (cur_file_ptr == (efdr_t *)0) { ! error ("#.begin directive without a preceding .file directive"); return; } *************** *** 2848,2852 **** if (cur_proc_ptr == (PDR *)0) { ! error ("#.bend directive without a preceeding .ent directive"); return; } --- 2855,2859 ---- if (cur_proc_ptr == (PDR *)0) { ! error ("#.bend directive without a preceding .ent directive"); return; } *************** *** 3463,3467 **** if (cur_file_ptr == (efdr_t *)0) { ! error (".end directive without a preceeding .file directive"); return; } --- 3470,3474 ---- if (cur_file_ptr == (efdr_t *)0) { ! error (".end directive without a preceding .file directive"); return; } *************** *** 3469,3473 **** if (cur_proc_ptr == (PDR *)0) { ! error (".end directive without a preceeding .ent directive"); return; } --- 3476,3480 ---- if (cur_proc_ptr == (PDR *)0) { ! error (".end directive without a preceding .ent directive"); return; } *************** *** 3523,3527 **** if (cur_file_ptr == (efdr_t *)0) { ! error (".ent directive without a preceeding .file directive"); return; } --- 3530,3534 ---- if (cur_file_ptr == (efdr_t *)0) { ! error (".ent directive without a preceding .file directive"); return; } *************** *** 3578,3581 **** --- 3585,3606 ---- + /* Make sure the @stabs symbol is emitted. */ + + static void + mark_stabs (start) + const char *start; /* Start of directive (ignored) */ + { + if (!stabs_seen) + { + /* Add a dummy @stabs dymbol. */ + stabs_seen = 1; + (void) add_local_symbol (stabs_symbol, + stabs_symbol + sizeof (stabs_symbol), + stNil, scInfo, -1, MIPS_MARK_STAB(0)); + + } + } + + /* Parse .stabs directives. *************** *** 3620,3632 **** sc_t sc; int ch; - static int stabs_seen = 0; ! if (stabs_seen++ == 0) ! { ! /* Add a dummy @stabs dymbol. */ ! (void) add_local_symbol (stabs_symbol, ! stabs_symbol + sizeof (stabs_symbol), ! stNil, scInfo, -1, MIPS_MARK_STAB(0)); ! } /* Read code from stabs. */ --- 3645,3651 ---- sc_t sc; int ch; ! if (stabs_seen == 0) ! mark_stabs (""); /* Read code from stabs. */ *************** *** 3692,3696 **** if (p[0] != ',' || p[1] != '0' || p[2] != ',' || p[3] != '0' || p[4] != ',') { ! error ("Illegal .stabs/.stabn directive, manditory 0 isn't"); return; } --- 3711,3715 ---- if (p[0] != ',' || p[1] != '0' || p[2] != ',' || p[3] != '0' || p[4] != ',') { ! error ("Illegal .stabs/.stabn directive, mandatory 0 isn't"); return; } diff -rc2N gcc-2.0/objc-actions.c gcc-2.1/objc-actions.c *** gcc-2.0/objc-actions.c Sat Feb 15 15:26:02 1992 --- gcc-2.1/objc-actions.c Mon Mar 23 00:29:03 1992 *************** *** 37,41 **** * code generation `options': * ! * - OBJC_INT_SELECTORS, OBJC_NONUNIQUE_SELECTORS */ --- 37,41 ---- * code generation `options': * ! * - OBJC_INT_SELECTORS, OBJC_NONUNIQUE_SELECTORS, NEXT_OBJC_RUNTIME */ *************** *** 204,209 **** /* some commonly used instances of "identifier_node". */ ! static tree self_id, _cmd_id, _msg_id, _msgSuper_id; ! static tree objc_getClass_id, objc_getMetaClass_id; static tree self_decl, _msg_decl, _msgSuper_decl; --- 204,208 ---- /* some commonly used instances of "identifier_node". */ ! static tree self_id, _cmd_id; static tree self_decl, _msg_decl, _msgSuper_decl; *************** *** 210,214 **** static tree objc_getClass_decl, objc_getMetaClass_decl; ! static tree super_type, _selector_type, id_type, class_type; static tree instance_type; --- 209,213 ---- static tree objc_getClass_decl, objc_getMetaClass_decl; ! static tree super_type, selector_type, id_type, class_type; static tree instance_type; *************** *** 268,274 **** static tree objc_object_id, objc_class_id; - #ifdef OBJC_NONUNIQUE_SELECTORS - static tree _OBJC_SELECTOR_REFERENCES_id; - #endif static tree _OBJC_SUPER_decl; --- 267,270 ---- *************** *** 476,479 **** --- 472,496 ---- } + /* Create and push a decl for a built-in external variable or field NAME. + CODE says which. + TYPE is its data type. */ + + static tree + create_builtin_decl (code, type, name) + enum tree_code code; + char *name; + tree type; + { + tree decl = build_decl (code, get_identifier (name), type); + if (code == VAR_DECL) + { + TREE_EXTERNAL (decl) = 1; + TREE_PUBLIC (decl) = 1; + make_decl_rtl (decl, 0, 1); + pushdecl (decl); + } + return decl; + } + /* * purpose: "play" parser, creating/installing representations *************** *** 491,495 **** synth_module_prologue () { ! tree sc_spec, type_spec, decl_specs, expr_decl, parms, record; /* defined in `objc.h' */ --- 508,512 ---- synth_module_prologue () { ! tree expr_decl, temp_type; /* defined in `objc.h' */ *************** *** 498,626 **** objc_object_reference = xref_tag (RECORD_TYPE, objc_object_id); ! id_type = groktypename (build_tree_list ( ! build_tree_list (NULLT, objc_object_reference), ! build1 (INDIRECT_REF, NULLT, NULLT))); objc_class_id = get_identifier (TAG_CLASS); ! class_type = groktypename (build_tree_list ! (build_tree_list ! (NULLT, xref_tag (RECORD_TYPE, objc_class_id)), ! build1 (INDIRECT_REF, NULLT, NULLT))); ! ! /* Declare SEL type before prototypes for objc_msgSend(), or else those ! struct tags are considered local to the prototype and won't match the one ! in . */ #ifdef OBJC_INT_SELECTORS /* `unsigned int' */ ! _selector_type = unsigned_type_node; #else /* `struct objc_selector *' */ ! _selector_type = groktypename (build_tree_list ( ! build_tree_list (NULLT, ! xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR))), ! build1 (INDIRECT_REF, NULLT, NULLT))); #endif /* not OBJC_INT_SELECTORS */ - /* forward declare type...or else the prototype for `super' will bitch */ - groktypename (build_tree_list (build_tree_list (NULLT, - xref_tag (RECORD_TYPE, get_identifier (TAG_SUPER))), - build1 (INDIRECT_REF, NULLT, NULLT))); - - _msg_id = get_identifier ("objc_msgSend"); - _msgSuper_id = get_identifier ("objc_msgSendSuper"); - objc_getClass_id = get_identifier ("objc_getClass"); - objc_getMetaClass_id = get_identifier ("objc_getMetaClass"); - /* struct objc_object *objc_msgSend (id, SEL, ...); */ - pushlevel (0); - decl_specs = build_tree_list (NULLT, objc_object_reference); - push_parm_decl (build_tree_list (decl_specs, - build1 (INDIRECT_REF, NULLT, NULLT))); - - #ifdef OBJC_INT_SELECTORS - decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_UNSIGNED]); - decl_specs = tree_cons (NULLT, ridpointers[(int) RID_INT], decl_specs); - expr_decl = NULLT; - #else - decl_specs = build_tree_list (NULLT, - xref_tag (RECORD_TYPE, - get_identifier (TAG_SELECTOR))); - expr_decl = build1 (INDIRECT_REF, NULLT, NULLT); - #endif /* not OBJC_INT_SELECTORS */ - - push_parm_decl (build_tree_list (decl_specs, expr_decl)); - parms = get_parm_info (0); - poplevel (0, 0, 0); - - decl_specs = build_tree_list (NULLT, objc_object_reference); - expr_decl = build_nt (CALL_EXPR, _msg_id, parms, NULLT); - expr_decl = build1 (INDIRECT_REF, NULLT, expr_decl); - - _msg_decl = define_decl (expr_decl, decl_specs); ! /* struct objc_object *objc_msgSendSuper (struct objc_super *, SEL, ...); */ ! pushlevel (0); ! decl_specs = build_tree_list (NULLT, xref_tag (RECORD_TYPE, ! get_identifier (TAG_SUPER))); ! push_parm_decl (build_tree_list (decl_specs, ! build1 (INDIRECT_REF, NULLT, NULLT))); ! ! #ifdef OBJC_INT_SELECTORS ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_UNSIGNED]); ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_INT], decl_specs); ! expr_decl = NULLT; ! #else /* not OBJC_INT_SELECTORS */ ! decl_specs = build_tree_list (NULLT, ! xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR))); ! expr_decl = build1 (INDIRECT_REF, NULLT, NULLT); ! #endif /* not OBJC_INT_SELECTORS */ ! ! push_parm_decl (build_tree_list (decl_specs, expr_decl)); ! parms = get_parm_info (0); ! poplevel (0, 0, 0); ! decl_specs = build_tree_list (NULLT, objc_object_reference); ! expr_decl = build_nt (CALL_EXPR, _msgSuper_id, parms, NULLT); ! expr_decl = build1 (INDIRECT_REF, NULLT, expr_decl); ! ! _msgSuper_decl = define_decl (expr_decl, decl_specs); /* id objc_getClass (); */ ! parms = build_tree_list (NULLT, NULLT); ! expr_decl = build_nt (CALL_EXPR, objc_getClass_id, parms, NULLT); ! expr_decl = build1 (INDIRECT_REF, NULLT, expr_decl); ! objc_getClass_decl = define_decl (expr_decl, decl_specs); /* id objc_getMetaClass (); */ - parms = build_tree_list (NULLT, NULLT); - expr_decl = build_nt (CALL_EXPR, objc_getMetaClass_id, parms, NULLT); - expr_decl = build1 (INDIRECT_REF, NULLT, expr_decl); - - objc_getMetaClass_decl = define_decl (expr_decl, decl_specs); ! #ifdef OBJC_NONUNIQUE_SELECTORS ! _OBJC_SELECTOR_REFERENCES_id = get_identifier ("_OBJC_SELECTOR_REFERENCES"); /* extern SEL _OBJC_SELECTOR_REFERENCES[]; */ - sc_spec = tree_cons (NULLT, ridpointers[(int) RID_EXTERN], NULLT); - - #ifdef OBJC_INT_SELECTORS - decl_specs = tree_cons (NULLT, ridpointers[(int) RID_UNSIGNED], sc_spec); - decl_specs = tree_cons (NULLT, ridpointers[(int) RID_INT], decl_specs); - expr_decl = _OBJC_SELECTOR_REFERENCES_id; - #else /* not OBJC_INT_SELECTORS */ - decl_specs = build_tree_list (NULLT, - xref_tag (RECORD_TYPE, - get_identifier (TAG_SELECTOR))); - expr_decl = build1 (INDIRECT_REF, NULLT, _OBJC_SELECTOR_REFERENCES_id); - #endif /* not OBJC_INT_SELECTORS */ ! expr_decl = build_nt (ARRAY_REF, expr_decl, NULLT); ! _OBJC_SELECTOR_REFERENCES_decl = define_decl (expr_decl, decl_specs); #endif } --- 515,573 ---- objc_object_reference = xref_tag (RECORD_TYPE, objc_object_id); ! id_type = build_pointer_type (objc_object_reference); objc_class_id = get_identifier (TAG_CLASS); ! class_type = build_pointer_type (xref_tag (RECORD_TYPE, objc_class_id)); ! ! /* Declare type of selector-objects that represent an operation name. */ #ifdef OBJC_INT_SELECTORS /* `unsigned int' */ ! selector_type = unsigned_type_node; #else /* `struct objc_selector *' */ ! selector_type ! = build_pointer_type (xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR))); #endif /* not OBJC_INT_SELECTORS */ /* struct objc_object *objc_msgSend (id, SEL, ...); */ ! temp_type ! = build_function_type (id_type, ! tree_cons (NULL_TREE, id_type, ! tree_cons (NULLT, selector_type, NULLT))); ! ! _msg_decl = builtin_function ("objc_msgSend", temp_type, NOT_BUILT_IN, 0); ! ! /* struct objc_object *objc_msgSendSuper (void *, SEL, ...); */ ! ! temp_type ! = build_function_type (id_type, ! tree_cons (NULL_TREE, ptr_type_node, ! tree_cons (NULLT, selector_type, NULLT))); ! _msgSuper_decl = builtin_function ("objc_msgSendSuper", ! temp_type, NOT_BUILT_IN, 0); /* id objc_getClass (); */ ! ! temp_type = build_function_type (id_type, NULLT); ! objc_getClass_decl ! = builtin_function ("objc_getClass", temp_type, NOT_BUILT_IN, 0); /* id objc_getMetaClass (); */ ! objc_getMetaClass_decl ! = builtin_function ("objc_getMetaClass", temp_type, NOT_BUILT_IN, 0); /* extern SEL _OBJC_SELECTOR_REFERENCES[]; */ ! #ifdef OBJC_NONUNIQUE_SELECTORS ! _OBJC_SELECTOR_REFERENCES_decl ! = create_builtin_decl (VAR_DECL, build_array_type (selector_type, NULLT), ! "_OBJC_SELECTOR_REFERENCES"); #endif } *************** *** 651,668 **** return aString; } ! /* ! * struct objc_symtab { ! * long sel_ref_cnt; ! * char *refs; ! * long cls_def_cnt; ! * long cat_def_cnt; ! * void *defs[cls_def_cnt + cat_def_cnt]; ! * }; ! */ static void build_objc_symtab_template () { ! tree decl_specs, field_decl, field_decl_chain; objc_symtab_template = start_struct (RECORD_TYPE, get_identifier (_TAG_SYMTAB)); --- 598,618 ---- return aString; } + + /* Take care of defining and initializing _OBJC_SYMBOLS. */ ! /* Predefine the following data type: ! ! struct _objc_symtab { ! long sel_ref_cnt; ! SEL *refs; ! short cls_def_cnt; ! short cat_def_cnt; ! void *defs[cls_def_cnt + cat_def_cnt]; ! }; */ ! static void build_objc_symtab_template () { ! tree field_decl, field_decl_chain, index; objc_symtab_template = start_struct (RECORD_TYPE, get_identifier (_TAG_SYMTAB)); *************** *** 670,693 **** /* long sel_ref_cnt; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_LONG]); ! field_decl = get_identifier ("sel_ref_cnt"); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); field_decl_chain = field_decl; ! #ifdef OBJC_INT_SELECTORS ! /* unsigned int *sel_ref; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_UNSIGNED]); ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_INT], decl_specs); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("refs")); ! #else /* not OBJC_INT_SELECTORS */ ! /* struct objc_selector **sel_ref; */ ! decl_specs = build_tree_list (NULLT, ! xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR))); ! field_decl = build1 (INDIRECT_REF, NULLT, get_identifier ("refs")); ! field_decl = build1 (INDIRECT_REF, NULLT, field_decl); ! #endif /* not OBJC_INT_SELECTORS */ ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); --- 620,633 ---- /* long sel_ref_cnt; */ ! field_decl = create_builtin_decl (FIELD_DECL, ! long_integer_type_node, ! "sel_ref_cnt"); field_decl_chain = field_decl; ! /* SEL *refs; */ ! field_decl = create_builtin_decl (FIELD_DECL, ! build_pointer_type (selector_type), ! "refs"); chainon (field_decl_chain, field_decl); *************** *** 694,700 **** /* short cls_def_cnt; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_SHORT]); ! field_decl = get_identifier ("cls_def_cnt"); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); --- 634,640 ---- /* short cls_def_cnt; */ ! field_decl = create_builtin_decl (FIELD_DECL, ! short_integer_type_node, ! "cls_def_cnt"); chainon (field_decl_chain, field_decl); *************** *** 701,707 **** /* short cat_def_cnt; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_SHORT]); ! field_decl = get_identifier ("cat_def_cnt"); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); --- 641,647 ---- /* short cat_def_cnt; */ ! field_decl = create_builtin_decl (FIELD_DECL, ! short_integer_type_node, ! "cat_def_cnt"); chainon (field_decl_chain, field_decl); *************** *** 708,716 **** /* void *defs[cls_def_cnt + cat_def_cnt]; */ ! decl_specs = build_tree_list (NULLT, ridpointers[(int) RID_VOID]); ! field_decl = build_nt (ARRAY_REF, get_identifier ("defs"), ! build_int_2 (imp_count + cat_count, 0)); ! field_decl = build1 (INDIRECT_REF, NULLT, field_decl); ! field_decl = grokfield (input_filename, lineno, field_decl, decl_specs, NULLT); chainon (field_decl_chain, field_decl); --- 648,655 ---- /* void *defs[cls_def_cnt + cat_def_cnt]; */ ! index = build_index_type (build_int_2 (imp_count + cat_count - 1, 0)); ! field_decl = create_builtin_decl (FIELD_DECL, ! build_array_type (ptr_type_node, index), ! "defs"); chainon (field_decl_chain, field_decl); *************** *** 718,721 **** --- 657,663 ---- } + /* Create the initial value for the `defs' field of _objc_symtab. + This is a CONSTRUCTOR. */ + static tree init_def_list () *************** *** 746,758 **** } ! /* ! * struct objc_symtab { ! * long sel_ref_cnt; ! * char *refs; ! * long cls_def_cnt; ! * long cat_def_cnt; ! * void *defs[cls_def_cnt + cat_def_cnt]; ! * }; ! */ static tree init_objc_symtab () --- 688,693 ---- } ! /* Construct the initial value for all of _objc_symtab. */ ! static tree init_objc_symtab () *************** *** 794,797 **** --- 729,735 ---- } + /* Push forward-declarations of all the categories + so that init_def_list can use them in a CONSTRUCTOR. */ + static void forward_declare_categories () *************** *** 803,815 **** if (TREE_CODE (impent->imp_context) == CATEGORY_TYPE) { ! tree sc_spec, decl_specs, decl; ! ! sc_spec = build_tree_list (NULLT, ridpointers[(int) RID_EXTERN]); ! decl_specs = tree_cons (NULLT, objc_category_template, sc_spec); ! implementation_context = impent->imp_context; ! impent->class_decl = define_decl ( ! synth_id_with_class_suffix ("_OBJC_CATEGORY"), ! decl_specs); } } --- 741,749 ---- if (TREE_CODE (impent->imp_context) == CATEGORY_TYPE) { ! /* Set an invisible arg to synth_id_with_class_suffix. */ implementation_context = impent->imp_context; ! impent->class_decl ! = create_builtin_decl (VAR_DECL, objc_category_template, ! synth_id_with_class_suffix ("_OBJC_CATEGORY")); } } *************** *** 817,820 **** --- 751,757 ---- } + /* Create the declaration of _OBJC_SYMBOLS, with type `strict _objc_symtab' + and initialized appropriately. */ + static void generate_objc_symtab_decl () *************** *** 839,843 **** finish_decl (_OBJC_SYMBOLS_decl, init_objc_symtab (), NULLT); } ! /* * tree_node------->tree_node----->... --- 776,780 ---- finish_decl (_OBJC_SYMBOLS_decl, init_objc_symtab (), NULLT); } ! /* * tree_node------->tree_node----->... *************** *** 1134,1138 **** else { ! decl = build_decl (VAR_DECL, ident, _selector_type); TREE_EXTERNAL (decl) = 1; TREE_PUBLIC (decl) = 1; --- 1071,1075 ---- else { ! decl = build_decl (VAR_DECL, ident, selector_type); TREE_EXTERNAL (decl) = 1; TREE_PUBLIC (decl) = 1; *************** *** 1154,1158 **** { tree expr = build_msg_pool_reference (offset); ! TREE_TYPE (expr) = _selector_type; /* cast */ return expr; } --- 1091,1095 ---- { tree expr = build_msg_pool_reference (offset); ! TREE_TYPE (expr) = selector_type; /* cast */ return expr; } *************** *** 1168,1190 **** int idx = 0; char buf[256]; ! #else/ ! ! sc_spec = tree_cons (NULLT, ridpointers[(int) RID_STATIC], NULLT); ! ! #ifdef OBJC_INT_SELECTORS ! /* static unsigned int _OBJC_SELECTOR_REFERENCES[] = { 1, 2, ... }; */ ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_UNSIGNED], sc_spec); ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_INT], decl_specs); ! expr_decl = _OBJC_SELECTOR_REFERENCES_id; ! #else /* not OBJC_INT_SELECTORS */ ! /* static struct objc_selector *_OBJC_SELECTOR_REFERENCES[] = { 1, 2, .}; */ ! decl_specs = build_tree_list (NULLT, ! xref_tag (RECORD_TYPE, ! get_identifier (TAG_SELECTOR))); ! expr_decl = build1 (INDIRECT_REF, NULLT, _OBJC_SELECTOR_REFERENCES_id); ! #endif /* not OBJC_INT_SELECTORS */ ! ! expr_decl = build_nt (ARRAY_REF, expr_decl, NULLT); ! _OBJC_SELECTOR_REFERENCES_decl = start_decl (expr_decl, decl_specs, 1); #endif --- 1105,1112 ---- int idx = 0; char buf[256]; ! #else ! /* The corresponding pop_obstacks is in finish_decl, ! called at the end of this function. */ ! push_obstacks_nochange (); #endif *************** *** 1195,1213 **** #ifndef OBJC_NONUNIQUE_SELECTORS sprintf (buf, "_OBJC_SELECTOR_REFERENCES_%d", idx); ! sc_spec = build_tree_list (NULLT, ridpointers[RID_STATIC]); ! #ifdef OBJC_INT_SELECTORS ! /* static unsigned int _OBJC_SELECTOR_REFERENCES_n = ...; */ ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_UNSIGNED], sc_spec); ! decl_specs = tree_cons (NULLT, ridpointers[(int) RID_INT], decl_specs); var_decl = get_identifier (buf); - #else /* not OBJC_INT_SELECTORS */ - /* static struct objc_selector *_OBJC_SELECTOR_REFERENCES_n = ...; */ - decl_specs = tree_cons (NULLT, - xref_tag (RECORD_TYPE, - get_identifier (TAG_SELECTOR)), - sc_spec); - var_decl = build1 (INDIRECT_REF, NULLT, get_identifier (buf)); - #endif /* not OBJC_INT_SELECTORS */ /* the `decl' that is returned from start_decl is the one that we --- 1117,1125 ---- #ifndef OBJC_NONUNIQUE_SELECTORS sprintf (buf, "_OBJC_SELECTOR_REFERENCES_%d", idx); ! sc_spec = build_tree_list (NULLT, ridpointers[(int) RID_STATIC]); ! /* static SEL _OBJC_SELECTOR_REFERENCES_n = ...; */ ! decl_specs = tree_cons (NULLT, selector_type, sc_spec); var_decl = get_identifier (buf); /* the `decl' that is returned from start_decl is the one that we *************** *** 1231,1234 **** --- 1143,1147 ---- #ifdef OBJC_NONUNIQUE_SELECTORS + DECL_INITIAL (_OBJC_SELECTOR_REFERENCES_decl) = (tree) 1; initlist = build_nt (CONSTRUCTOR, NULLT, nreverse (initlist)); finish_decl (_OBJC_SELECTOR_REFERENCES_decl, initlist, NULLT); *************** *** 2507,2523 **** #define METHOD_DEF 0 #define METHOD_REF 1 ! /* ! * used by `build_message_expr' and `comp_method_types'. ! * ! * add_args is a tree_list node the following info on a parameter list: ! * ! * The TREE_PURPOSE is a chain of decls of those parms. ! * The TREE_VALUE is a list of structure, union and enum tags defined. ! * The TREE_CHAIN is a list of argument types to go in the FUNCTION_TYPE. ! * This tree_list node is later fed to `grokparms'. ! * ! * VOID_AT_END nonzero means append `void' to the end of the type-list. ! * Zero means the parmlist ended with an ellipsis so don't append `void'. ! */ static tree get_arg_type_list (meth, context, superflag) --- 2420,2431 ---- #define METHOD_DEF 0 #define METHOD_REF 1 ! /* Used by `build_message_expr' and `comp_method_types'. ! Return an argument list for method METH. ! CONTEXT is either METHOD_DEF or METHOD_REF, ! saying whether we are trying to define a method or call one. ! SUPERFLAG says this is for a send to super; ! this makes a difference for the NeXT calling sequence ! in which the lookup and the method call are done together. */ ! static tree get_arg_type_list (meth, context, superflag) *************** *** 2528,2535 **** tree arglist, akey; /* receiver type */ if (superflag) ! arglist = build_tree_list (NULLT, super_type); else { if (context == METHOD_DEF) --- 2436,2447 ---- tree arglist, akey; + #ifdef NEXT_OBJC_RUNTIME /* receiver type */ if (superflag) ! { ! arglist = build_tree_list (NULLT, super_type); ! } else + #endif { if (context == METHOD_DEF) *************** *** 2540,2544 **** /* selector type - will eventually change to `int' */ ! chainon (arglist, build_tree_list (NULLT, _selector_type)); /* build a list of argument types */ --- 2452,2456 ---- /* selector type - will eventually change to `int' */ ! chainon (arglist, build_tree_list (NULLT, selector_type)); /* build a list of argument types */ *************** *** 2604,2625 **** * special treatment. */ ! tree exp = 0; ! if ((exp = TREE_OPERAND (receiver, 0)) && (TREE_CODE (exp) == ADDR_EXPR)) { ! if ((exp = TREE_OPERAND (exp, 0)) && ! (TREE_CODE (exp) == FUNCTION_DECL) && exp == objc_getClass_decl) { /* we have a call to objc_getClass! */ ! tree arg = 0; ! ! if ((arg = TREE_OPERAND (receiver, 1)) && ! (TREE_CODE (arg) == TREE_LIST) && ! (arg = TREE_VALUE (arg)) && ! (TREE_CODE (arg) == NOP_EXPR) && ! (arg = TREE_OPERAND (arg, 0)) && ! (TREE_CODE (arg) == ADDR_EXPR) && ! (arg = TREE_OPERAND (arg, 0)) && ! (TREE_CODE (arg) == STRING_CST)) /* finally, we have the class name */ return get_identifier (TREE_STRING_POINTER (arg)); --- 2516,2538 ---- * special treatment. */ ! tree exp = TREE_OPERAND (receiver, 0); ! if (exp != 0 && (TREE_CODE (exp) == ADDR_EXPR)) { ! exp = TREE_OPERAND (exp, 0); ! if (exp != 0 ! && TREE_CODE (exp) == FUNCTION_DECL && exp == objc_getClass_decl) { /* we have a call to objc_getClass! */ ! tree arg = TREE_OPERAND (receiver, 1); ! ! if (arg != 0 ! && TREE_CODE (arg) == TREE_LIST ! && (arg = TREE_VALUE (arg)) ! && TREE_CODE (arg) == NOP_EXPR ! && (arg = TREE_OPERAND (arg, 0)) ! && TREE_CODE (arg) == ADDR_EXPR ! && (arg = TREE_OPERAND (arg, 0)) ! && TREE_CODE (arg) == STRING_CST) /* finally, we have the class name */ return get_identifier (TREE_STRING_POINTER (arg)); *************** *** 4166,4170 **** tree sc_spec, ret_spec, ret_decl, decl_specs; tree method_decl, method_id; ! char buf[256]; /* synth the storage class & assemble the return type */ --- 4079,4083 ---- tree sc_spec, ret_spec, ret_decl, decl_specs; tree method_decl, method_id; ! char *buf; /* synth the storage class & assemble the return type */ *************** *** 4174,4199 **** if (TREE_CODE (implementation_context) == IMPLEMENTATION_TYPE) #ifdef OBJC_GEN_METHOD_LABEL ! OBJC_GEN_METHOD_LABEL (buf, ! TREE_CODE (method) == INSTANCE_METHOD_DECL, ! IDENTIFIER_POINTER (CLASS_NAME (implementation_context)), ! NULL, ! IDENTIFIER_POINTER (METHOD_SEL_NAME (method))); #else ! sprintf (buf, "_%d_%s", ++method_slot, ! IDENTIFIER_POINTER (CLASS_NAME (implementation_context))); #endif else /* we have a category */ #ifdef OBJC_GEN_METHOD_LABEL ! OBJC_GEN_METHOD_LABEL (buf, ! TREE_CODE (method) == INSTANCE_METHOD_DECL, ! IDENTIFIER_POINTER (CLASS_NAME (implementation_context)), ! IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context)), ! IDENTIFIER_POINTER (METHOD_SEL_NAME (method))); #else ! sprintf (buf, "_%d_%s_%s", ++method_slot, ! IDENTIFIER_POINTER (CLASS_NAME (implementation_context)), ! IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context))); #endif method_id = get_identifier (buf); --- 4087,4125 ---- if (TREE_CODE (implementation_context) == IMPLEMENTATION_TYPE) + { + /* Make sure this is big enough for any plausible method label. */ + buf = (char *) alloca (50 + + strlen (IDENTIFIER_POINTER (METHOD_SEL_NAME (method))) + + strlen (IDENTIFIER_POINTER (CLASS_NAME (implementation_context)))); #ifdef OBJC_GEN_METHOD_LABEL ! OBJC_GEN_METHOD_LABEL (buf, ! TREE_CODE (method) == INSTANCE_METHOD_DECL, ! IDENTIFIER_POINTER (CLASS_NAME (implementation_context)), ! NULL, ! IDENTIFIER_POINTER (METHOD_SEL_NAME (method))); #else ! sprintf (buf, "_%d_%s", ++method_slot, ! IDENTIFIER_POINTER (CLASS_NAME (implementation_context))); #endif + } else /* we have a category */ + { + /* Make sure this is big enough for any plausible method label. */ + buf = (char *) alloca (50 + + strlen (IDENTIFIER_POINTER (METHOD_SEL_NAME (method))) + + strlen (IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context))) + + strlen (IDENTIFIER_POINTER (CLASS_NAME (implementation_context)))); #ifdef OBJC_GEN_METHOD_LABEL ! OBJC_GEN_METHOD_LABEL (buf, ! TREE_CODE (method) == INSTANCE_METHOD_DECL, ! IDENTIFIER_POINTER (CLASS_NAME (implementation_context)), ! IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context)), ! IDENTIFIER_POINTER (METHOD_SEL_NAME (method))); #else ! sprintf (buf, "_%d_%s_%s", ++method_slot, ! IDENTIFIER_POINTER (CLASS_NAME (implementation_context)), ! IDENTIFIER_POINTER (CLASS_SUPER_NAME (implementation_context))); #endif + } method_id = get_identifier (buf); diff -rc2N gcc-2.0/objc-parse.y gcc-2.1/objc-parse.y *** gcc-2.0/objc-parse.y Fri Jan 17 18:15:52 1992 --- gcc-2.1/objc-parse.y Thu Mar 12 00:28:02 1992 *************** *** 103,108 **** /* the reserved words */ %token SIZEOF ENUM STRUCT UNION IF ELSE WHILE DO FOR SWITCH CASE DEFAULT ! %token BREAK CONTINUE RETURN GOTO ASM TYPEOF ALIGNOF ALIGN %token ATTRIBUTE EXTENSION LABEL --- 103,109 ---- /* the reserved words */ + /* SCO include files test "ASM", so use something else. */ %token SIZEOF ENUM STRUCT UNION IF ELSE WHILE DO FOR SWITCH CASE DEFAULT ! %token BREAK CONTINUE RETURN GOTO ASM_KEYWORD TYPEOF ALIGNOF ALIGN %token ATTRIBUTE EXTENSION LABEL *************** *** 236,240 **** | datadef | objcdef ! | ASM '(' string ')' ';' { if (pedantic) pedwarn ("ANSI C forbids use of `asm' keyword"); --- 237,241 ---- | datadef | objcdef ! | ASM_KEYWORD '(' string ')' ';' { if (pedantic) pedwarn ("ANSI C forbids use of `asm' keyword"); *************** *** 775,779 **** /* empty */ { $$ = NULL_TREE; } ! | ASM '(' string ')' { if (TREE_CHAIN ($3)) $3 = combine_strings ($3); $$ = $3; --- 776,780 ---- /* empty */ { $$ = NULL_TREE; } ! | ASM_KEYWORD '(' string ')' { if (TREE_CHAIN ($3)) $3 = combine_strings ($3); $$ = $3; *************** *** 1461,1465 **** emit_line_note ($-1, $0); c_expand_return ($2); } ! | ASM maybe_type_qual '(' string ')' ';' { stmt_count++; emit_line_note ($-1, $0); --- 1462,1466 ---- emit_line_note ($-1, $0); c_expand_return ($2); } ! | ASM_KEYWORD maybe_type_qual '(' string ')' ';' { stmt_count++; emit_line_note ($-1, $0); *************** *** 1467,1471 **** expand_asm ($4); } /* This is the case with just output operands. */ ! | ASM maybe_type_qual '(' string ':' asm_operands ')' ';' { stmt_count++; emit_line_note ($-1, $0); --- 1468,1472 ---- expand_asm ($4); } /* This is the case with just output operands. */ ! | ASM_KEYWORD maybe_type_qual '(' string ':' asm_operands ')' ';' { stmt_count++; emit_line_note ($-1, $0); *************** *** 1475,1479 **** input_filename, lineno); } /* This is the case with input operands as well. */ ! | ASM maybe_type_qual '(' string ':' asm_operands ':' asm_operands ')' ';' { stmt_count++; emit_line_note ($-1, $0); --- 1476,1480 ---- input_filename, lineno); } /* This is the case with input operands as well. */ ! | ASM_KEYWORD maybe_type_qual '(' string ':' asm_operands ':' asm_operands ')' ';' { stmt_count++; emit_line_note ($-1, $0); *************** *** 1483,1487 **** input_filename, lineno); } /* This is the case with clobbered registers as well. */ ! | ASM maybe_type_qual '(' string ':' asm_operands ':' asm_operands ':' asm_clobbers ')' ';' { stmt_count++; --- 1484,1488 ---- input_filename, lineno); } /* This is the case with clobbered registers as well. */ ! | ASM_KEYWORD maybe_type_qual '(' string ':' asm_operands ':' asm_operands ':' asm_clobbers ')' ';' { stmt_count++; *************** *** 2073,2077 **** | RETURN { $$ = get_identifier (token_buffer); } | GOTO { $$ = get_identifier (token_buffer); } ! | ASM { $$ = get_identifier (token_buffer); } | SIZEOF { $$ = get_identifier (token_buffer); } | TYPEOF { $$ = get_identifier (token_buffer); } --- 2074,2078 ---- | RETURN { $$ = get_identifier (token_buffer); } | GOTO { $$ = get_identifier (token_buffer); } ! | ASM_KEYWORD { $$ = get_identifier (token_buffer); } | SIZEOF { $$ = get_identifier (token_buffer); } | TYPEOF { $$ = get_identifier (token_buffer); } diff -rc2N gcc-2.0/optabs.c gcc-2.1/optabs.c *** gcc-2.0/optabs.c Tue Feb 4 14:22:33 1992 --- gcc-2.1/optabs.c Sat Mar 14 00:06:52 1992 *************** *** 72,75 **** --- 72,76 ---- optab one_cmpl_optab; optab ffs_optab; + optab sqrt_optab; optab cmp_optab; *************** *** 1184,1188 **** word at a time. ! Such a block is preceeded by a CLOBBER of the output, consists of multiple insns, each setting one word of the output, and followed by a SET copying the output to itself. --- 1185,1189 ---- word at a time. ! Such a block is preceded by a CLOBBER of the output, consists of multiple insns, each setting one word of the output, and followed by a SET copying the output to itself. *************** *** 1496,1500 **** { #ifdef TARGET_MEM_FUNCTIONS ! emit_library_call (memcmp_libfunc, 0, TYPE_MODE (integer_type_node), 3, XEXP (x, 0), Pmode, XEXP (y, 0), Pmode, --- 1497,1501 ---- { #ifdef TARGET_MEM_FUNCTIONS ! emit_library_call (memcmp_libfunc, 1, TYPE_MODE (integer_type_node), 3, XEXP (x, 0), Pmode, XEXP (y, 0), Pmode, *************** *** 1501,1505 **** size, Pmode); #else ! emit_library_call (bcmp_libfunc, 0, TYPE_MODE (integer_type_node), 3, XEXP (x, 0), Pmode, XEXP (y, 0), Pmode, --- 1502,1506 ---- size, Pmode); #else ! emit_library_call (bcmp_libfunc, 1, TYPE_MODE (integer_type_node), 3, XEXP (x, 0), Pmode, XEXP (y, 0), Pmode, *************** *** 1586,1590 **** libfunc = ucmp_optab->handlers[(int) mode].libfunc; ! emit_library_call (libfunc, 0, SImode, 2, x, mode, y, mode); --- 1587,1591 ---- libfunc = ucmp_optab->handlers[(int) mode].libfunc; ! emit_library_call (libfunc, 1, SImode, 2, x, mode, y, mode); *************** *** 1707,1711 **** } ! emit_library_call (libfunc, 0, SImode, 2, x, mode, y, mode); --- 1708,1712 ---- } ! emit_library_call (libfunc, 1, SImode, 2, x, mode, y, mode); *************** *** 2557,2561 **** start_sequence (); ! emit_library_call (libfcn, 0, GET_MODE (to), 1, from, GET_MODE (from)); insns = get_insns (); end_sequence (); --- 2558,2562 ---- start_sequence (); ! emit_library_call (libfcn, 1, GET_MODE (to), 1, from, GET_MODE (from)); insns = get_insns (); end_sequence (); *************** *** 2753,2757 **** start_sequence (); ! emit_library_call (libfcn, 0, GET_MODE (to), 1, from, GET_MODE (from)); insns = get_insns (); end_sequence (); --- 2754,2758 ---- start_sequence (); ! emit_library_call (libfcn, 1, GET_MODE (to), 1, from, GET_MODE (from)); insns = get_insns (); end_sequence (); *************** *** 2830,2833 **** --- 2831,2835 ---- one_cmpl_optab = init_optab (NOT); ffs_optab = init_optab (FFS); + sqrt_optab = init_optab (SQRT); #ifdef HAVE_addqi3 *************** *** 2894,2898 **** #ifdef HAVE_subti3 if (HAVE_subti3) ! sub_optab->handlers[(int) Imode].insn_code = CODE_FOR_subti3; #endif #ifdef HAVE_subsf3 --- 2896,2900 ---- #ifdef HAVE_subti3 if (HAVE_subti3) ! sub_optab->handlers[(int) TImode].insn_code = CODE_FOR_subti3; #endif #ifdef HAVE_subsf3 *************** *** 3676,3679 **** --- 3678,3720 ---- expand_expr will generate a conditional negation. */ + #ifdef HAVE_sqrtqi2 + if (HAVE_sqrtqi2) + sqrt_optab->handlers[(int) QImode].insn_code = CODE_FOR_sqrtqi2; + #endif + #ifdef HAVE_sqrthi2 + if (HAVE_sqrthi2) + sqrt_optab->handlers[(int) HImode].insn_code = CODE_FOR_sqrthi2; + #endif + #ifdef HAVE_sqrtpsi2 + if (HAVE_sqrtpsi2) + sqrt_optab->handlers[(int) PSImode].insn_code = CODE_FOR_sqrtpsi2; + #endif + #ifdef HAVE_sqrtsi2 + if (HAVE_sqrtsi2) + sqrt_optab->handlers[(int) SImode].insn_code = CODE_FOR_sqrtsi2; + #endif + #ifdef HAVE_sqrtdi2 + if (HAVE_sqrtdi2) + sqrt_optab->handlers[(int) DImode].insn_code = CODE_FOR_sqrtdi2; + #endif + #ifdef HAVE_sqrtti2 + if (HAVE_sqrtti2) + sqrt_optab->handlers[(int) TImode].insn_code = CODE_FOR_sqrtti2; + #endif + #ifdef HAVE_sqrtsf2 + if (HAVE_sqrtsf2) + sqrt_optab->handlers[(int) SFmode].insn_code = CODE_FOR_sqrtsf2; + #endif + #ifdef HAVE_sqrtdf2 + if (HAVE_sqrtdf2) + sqrt_optab->handlers[(int) DFmode].insn_code = CODE_FOR_sqrtdf2; + #endif + #ifdef HAVE_sqrttf2 + if (HAVE_sqrttf2) + sqrt_optab->handlers[(int) TFmode].insn_code = CODE_FOR_sqrttf2; + #endif + /* No library calls here! If there is no sqrt instruction expand_builtin + should force the library call. */ + #ifdef HAVE_one_cmplqi2 if (HAVE_one_cmplqi2) *************** *** 3996,3997 **** --- 4037,4055 ---- fixunsdfdi_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__fixunsdfdi"); } + + #ifdef BROKEN_LDEXP + + /* SCO 3.2 apparently has a broken ldexp. */ + + double + ldexp(x,n) + double x; + int n; + { + if (n > 0) + while (n--) + x *= 2; + + return x; + } + #endif /* BROKEN_LDEXP */ diff -rc2N gcc-2.0/proto-man gcc-2.1/proto-man *** gcc-2.0/proto-man Tue Jan 7 21:22:51 1992 --- gcc-2.1/proto-man Sat Mar 14 02:23:33 1992 *************** *** 877,881 **** .PP Bugs (and requests for reasonable enhancements) should be reported to ! rfg@ics.uci.edu. Bugs may actually be fixed if they can be easily reproduced, so it is in your interest to report them in such a way that reproduction is easy. --- 877,881 ---- .PP Bugs (and requests for reasonable enhancements) should be reported to ! bug-gcc@prep.ai.mit.edu. Bugs may actually be fixed if they can be easily reproduced, so it is in your interest to report them in such a way that reproduction is easy. diff -rc2N gcc-2.0/protoize.c gcc-2.1/protoize.c *** gcc-2.0/protoize.c Tue Feb 18 15:42:08 1992 --- gcc-2.1/protoize.c Mon Mar 23 02:17:43 1992 *************** *** 1,5 **** ! /* Protoize program - Written by Ron Guilmette at the Microelectronics ! and Computer Technology Corporation (MCC). The author's current ! E-mail address is . Copyright (C) 1989, 1992 Free Software Foundation, Inc. --- 1,3 ---- ! /* Protoize program - Original version by Ron Guilmette at MCC. Copyright (C) 1989, 1992 Free Software Foundation, Inc. *************** *** 69,94 **** #include #include "gvarargs.h" - #include "getopt.h" ! #ifndef PATH_MAX /* defines this on most POSIX systems. */ ! #include ! /* Sometimes defines these macros. */ ! #undef CHAR_BIT ! #undef CHAR_MAX ! #undef CHAR_MIN ! #undef CLK_TCK ! #undef INT_MAX ! #undef INT_MIN ! #undef LONG_MAX ! #undef LONG_MIN ! #undef SCHAR_MAX ! #undef SCHAR_MIN ! #undef SHRT_MAX ! #undef SHRT_MIN ! #undef UCHAR_MAX ! #undef UINT_MAX ! #undef ULONG_MAX ! #undef USHRT_MAX ! #endif extern int errno; --- 67,76 ---- #include #include "gvarargs.h" ! /* Include getopt.h for the sake of getopt_long. ! We don't need the declaration of getopt, and it could conflict ! with something from a system header file, so effectively nullify that. */ ! #define getopt getopt_loser ! #include "getopt.h" extern int errno; *************** *** 111,120 **** #define my_chmod(file, mode) chmod((char *)file, mode) ! #if !(defined (USG) || defined (VMS) || defined (POSIX)) ! #define GUESSPATHLEN (MAXPATHLEN + 1) ! #else /* (defined (USG) || defined (VMS) || defined (POSIX)) */ ! /* We actually use this as a starting point, not a limit. */ ! #define GUESSPATHLEN 200 ! #endif /* (defined (USG) || defined (VMS) || defined (POSIX)) */ /* Aliases for pointers to void. --- 93,97 ---- #define my_chmod(file, mode) chmod((char *)file, mode) ! char *getpwd (); /* Aliases for pointers to void. *************** *** 147,161 **** #define O_WRONLY 1 - /* Virtually every UN*X system now in common use (except for pre-4.3-tahoe - BSD systems) now provides getcwd as called for by POSIX. Allow for - the few exceptions to the general rule here. */ - - #if !(defined (USG) || defined (VMS)) - extern char *getwd (); - #define getcwd(buf,len) getwd(buf) - #else /* (defined (USG) || defined (VMS)) */ - extern char *getcwd (); - #endif /* (defined (USG) || defined (VMS)) */ - /* Declaring stat or __flsbuf with a prototype causes conflicts with system headers on some systems. */ --- 124,127 ---- *************** *** 199,208 **** extern char * strrchr (); #if !(defined (USG) || defined (VMS)) - extern int vfork (); #define fork vfork ! #else ! extern int fork (); ! #endif /* !(defined (USG) || defined (VMS)) */ #endif /* !defined (POSIX) */ --- 165,173 ---- extern char * strrchr (); + /* Fork is not declared because the declaration caused a conflict + on the HPPA. */ #if !(defined (USG) || defined (VMS)) #define fork vfork ! #endif /* (defined (USG) || defined (VMS)) */ #endif /* !defined (POSIX) */ *************** *** 249,253 **** but we do read in its corresponding aux_info file. */ ! static const char * const syscalls_filename = "SYSCALLS.c"; /* Default place to find the above file. */ --- 214,218 ---- but we do read in its corresponding aux_info file. */ ! static const char syscalls_filename[] = "SYSCALLS.c"; /* Default place to find the above file. */ *************** *** 501,509 **** #endif /* !defined (UNPROTOIZE) */ ! /* An index into the compile_params array where we should insert the filename ! parameter when we are ready to exec the C compiler. A zero value indicates that we have not yet called munge_compile_params. */ ! static int filename_index = 0; /* Count of command line arguments which were "filename" arguments. */ --- 466,478 ---- #endif /* !defined (UNPROTOIZE) */ ! /* An index into the compile_params array where we should insert the source ! file name when we are ready to exec the C compiler. A zero value indicates that we have not yet called munge_compile_params. */ ! static int input_file_name_index = 0; ! ! /* An index into the compile_params array where we should insert the filename ! for the aux info file, when we run the C compiler. */ ! static int aux_info_file_name_index = 0; /* Count of command line arguments which were "filename" arguments. */ *************** *** 898,902 **** const file_info *fi_p; { ! return (substr (fi_p->hash_entry->symbol, syscalls_filename) != NULL); } --- 867,873 ---- const file_info *fi_p; { ! char const *f = fi_p->hash_entry->symbol; ! size_t fl = strlen (f), sysl = sizeof (syscalls_filename) - 1; ! return sysl <= fl && strcmp (f + fl - sysl, syscalls_filename) == 0; } *************** *** 1209,1217 **** const char *cwd2 = (cwd) ? cwd : cwd_buffer; char *const abs_buffer ! = (char *) alloca (strlen (cwd2) + strlen (rel_filename) + 1); char *endp = abs_buffer; char *outp, *inp; ! /* Copy the filename (possibly preceeded by the current working directory name) into the absolutization buffer. */ --- 1180,1188 ---- const char *cwd2 = (cwd) ? cwd : cwd_buffer; char *const abs_buffer ! = (char *) alloca (strlen (cwd2) + strlen (rel_filename) + 2); char *endp = abs_buffer; char *outp, *inp; ! /* Copy the filename (possibly preceded by the current working directory name) into the absolutization buffer. */ *************** *** 1229,1234 **** while (*endp++ = *src_p++) continue; - if (endp[-1] == '/') - *endp = '\0'; } --- 1200,1203 ---- *************** *** 1238,1241 **** --- 1207,1214 ---- outp = inp = abs_buffer; *outp++ = *inp++; /* copy first slash */ + #ifdef apollo + if (inp[0] == '/') + *outp++ = *inp++; /* copy second slash */ + #endif for (;;) { *************** *** 1316,1322 **** char *path_p; int unmatched_slash_count = 0; path_p = abspath (cwd, filename); ! rel_buf_p = rel_buffer = (char *) xmalloc (strlen (path_p) + 1); while (*cwd_p && (*cwd_p == *path_p)) --- 1289,1296 ---- char *path_p; int unmatched_slash_count = 0; + size_t filename_len = strlen (filename); path_p = abspath (cwd, filename); ! rel_buf_p = rel_buffer = (char *) xmalloc (filename_len); while (*cwd_p && (*cwd_p == *path_p)) *************** *** 1325,1329 **** path_p++; } ! if (!*cwd_p) /* whole pwd matched */ { if (!*path_p) /* input *is* the current path! */ --- 1299,1303 ---- path_p++; } ! if (!*cwd_p && (!*path_p || *path_p == '/')) /* whole pwd matched */ { if (!*path_p) /* input *is* the current path! */ *************** *** 1352,1355 **** --- 1326,1331 ---- while (unmatched_slash_count--) { + if (rel_buffer + filename_len <= rel_buf_p + 3) + return filename; *rel_buf_p++ = '.'; *rel_buf_p++ = '.'; *************** *** 1356,1366 **** *rel_buf_p++ = '/'; } ! while (*rel_buf_p++ = *path_p++) ! continue; --rel_buf_p; if (*(rel_buf_p-1) == '/') *--rel_buf_p = '\0'; - if (strlen (rel_buffer) > (unsigned) strlen (filename)) - strcpy (rel_buffer, filename); return rel_buffer; } --- 1332,1346 ---- *rel_buf_p++ = '/'; } ! ! do ! { ! if (rel_buffer + filename_len <= rel_buf_p) ! return filename; ! } ! while (*rel_buf_p++ = *path_p++); ! --rel_buf_p; if (*(rel_buf_p-1) == '/') *--rel_buf_p = '\0'; return rel_buffer; } *************** *** 1503,1507 **** Link this record onto the list of such records for the particular file in ! which it occured in proper (descending) line number order (for now). If there is an identical record already on the list for the file, throw --- 1483,1487 ---- Link this record onto the list of such records for the particular file in ! which it occurred in proper (descending) line number order (for now). If there is an identical record already on the list for the file, throw *************** *** 1556,1560 **** The file_info records for all of these "base" file names (properly) act as file_info records for the "original" (i.e. un-included) files ! which were submitted to gcc for compilation (when the -fgen-aux-info option was used). */ --- 1536,1540 ---- The file_info records for all of these "base" file names (properly) act as file_info records for the "original" (i.e. un-included) files ! which were submitted to gcc for compilation (when the -aux-info option was used). */ *************** *** 1680,1684 **** If p points to another right paren, then this indicates that we are dealing with multiple formals lists. In that case, there ! really should be another right paren preceeding this right paren. */ if (*p != ')') --- 1660,1664 ---- If p points to another right paren, then this indicates that we are dealing with multiple formals lists. In that case, there ! really should be another right paren preceding this right paren. */ if (*p != ')') *************** *** 1887,1894 **** } ! /* Rewrite the options list used to recompile base source files. All we are ! really doing here is removing -g, -O, -S, -c, and -o options, and then ! adding a final group of options like '-fgen-aux-info -S -o /dev/null'. */ static void munge_compile_params (params_list) --- 1867,1877 ---- } ! /* Set up the vector COMPILE_PARAMS which is the argument list for running GCC. ! Also set input_file_name_index and aux_info_file_name_index ! to the indices of the slots where the file names should go. */ + /* We initialize the vector by removing -g, -O, -S, -c, and -o options, + and adding '-aux-info AUXFILE -S -o /dev/null INFILE' at the end. */ + static void munge_compile_params (params_list) *************** *** 1895,1899 **** const char *params_list; { ! char **temp_params = (char **) alloca (strlen (params_list) + 10); int param_count = 0; const char *param; --- 1878,1885 ---- const char *params_list; { ! /* Build up the contents in a temporary vector ! that is so big that to has to be big enough. */ ! char **temp_params ! = (char **) alloca ((strlen (params_list) + 6) * sizeof (char *)); int param_count = 0; const char *param; *************** *** 1935,1939 **** break; } ! temp_params[param_count++] = "-fgen-aux-info"; temp_params[param_count++] = "-S"; temp_params[param_count++] = "-o"; --- 1921,1930 ---- break; } ! temp_params[param_count++] = "-aux-info"; ! ! /* Leave room for the aux-info file name argument. */ ! aux_info_file_name_index = param_count; ! temp_params[param_count++] = NULL; ! temp_params[param_count++] = "-S"; temp_params[param_count++] = "-o"; *************** *** 1940,1946 **** temp_params[param_count++] = "/dev/null"; ! /* Leave room for the filename argument and a terminating null pointer. */ ! ! temp_params[filename_index = param_count++] = NULL; temp_params[param_count++] = NULL; --- 1931,1938 ---- temp_params[param_count++] = "/dev/null"; ! /* Leave room for the input file name argument. */ ! input_file_name_index = param_count; ! temp_params[param_count++] = NULL; ! /* Terminate the list. */ temp_params[param_count++] = NULL; *************** *** 1961,1972 **** int child_pid; ! if (!filename_index) munge_compile_params (""); ! compile_params[filename_index] = shortpath (NULL, base_filename); if (!quiet_flag) fprintf (stderr, "%s: compiling `%s'\n", ! pname, compile_params[filename_index]); if (child_pid = fork ()) --- 1953,1970 ---- int child_pid; ! if (!input_file_name_index) munge_compile_params (""); ! /* Store the full source file name in the argument vector. */ ! compile_params[input_file_name_index] = shortpath (NULL, base_filename); ! /* Add .X to source file name to get aux-info file name. */ ! compile_params[aux_info_file_name_index] ! = dupnstr (compile_params[input_file_name_index], ! (2 + strlen (compile_params[input_file_name_index]))); ! strcat (compile_params[aux_info_file_name_index], ".X"); if (!quiet_flag) fprintf (stderr, "%s: compiling `%s'\n", ! pname, compile_params[input_file_name_index]); if (child_pid = fork ()) *************** *** 2008,2015 **** if (!WIFEXITED (wait_status)) { kill (child_pid, 9); return 0; } ! return (WEXITSTATUS (wait_status) == 0) ? 1 : 0; } } --- 2006,2021 ---- if (!WIFEXITED (wait_status)) { + fprintf (stderr, "%s: error: subprocess %ld did not exit\n", + pname, (long) child_pid); kill (child_pid, 9); return 0; } ! if (WEXITSTATUS (wait_status) != 0) ! { ! fprintf (stderr, "%s: error: %s: compilation failed\n", ! pname, base_filename); ! return 0; ! } ! return 1; } } *************** *** 2018,2024 **** if (my_execvp (compile_params[0], (char *const *) compile_params)) { ! fprintf (stderr, "%s: error: execvp returned: %s\n", ! pname, sys_errlist[errno]); ! exit (errno); } return 1; /* Never executed. */ --- 2024,2035 ---- if (my_execvp (compile_params[0], (char *const *) compile_params)) { ! int e = errno, f = fileno (stderr); ! write (f, pname, strlen (pname)); ! write (f, ": ", 2); ! write (f, compile_params[0], strlen (compile_params[0])); ! write (f, ": ", 2); ! write (f, sys_errlist[e], strlen (sys_errlist[e])); ! write (f, "\n", 1); ! _exit (1); } return 1; /* Never executed. */ *************** *** 2035,2043 **** int is_syscalls; { ! char *const aux_info_filename ! = (char *) alloca (strlen (base_source_filename) ! + strlen (aux_info_suffix) + 1); char *aux_info_base; char *aux_info_limit; const char *aux_info_second_line; time_t aux_info_mtime; --- 2046,2055 ---- int is_syscalls; { ! size_t base_len = strlen (base_source_filename); ! char * aux_info_filename ! = (char *) alloca (base_len + strlen (aux_info_suffix) + 1); char *aux_info_base; char *aux_info_limit; + char *aux_info_relocated_name; const char *aux_info_second_line; time_t aux_info_mtime; *************** *** 2069,2073 **** } if (!gen_aux_info_file (base_source_filename)) ! return; retries++; goto retry; --- 2081,2088 ---- } if (!gen_aux_info_file (base_source_filename)) ! { ! errors++; ! return; ! } retries++; goto retry; *************** *** 2187,2190 **** --- 2202,2221 ---- continue; aux_info_second_line = p; + aux_info_relocated_name = 0; + if (invocation_filename[0] != '/') + { + /* INVOCATION_FILENAME is relative; + append it to BASE_SOURCE_FILENAME's dir. */ + char *dir_end; + aux_info_relocated_name = xmalloc (base_len + (p-invocation_filename)); + strcpy (aux_info_relocated_name, base_source_filename); + dir_end = strrchr (aux_info_relocated_name, '/'); + if (dir_end) + dir_end++; + else + dir_end = aux_info_relocated_name; + strcpy (dir_end, invocation_filename); + invocation_filename = aux_info_relocated_name; + } } *************** *** 2207,2211 **** { free (aux_info_base); ! if (my_unlink (aux_info_filename) == -1) { fprintf (stderr, "%s: error: can't delete file `%s': %s\n", --- 2238,2243 ---- { free (aux_info_base); ! xfree (aux_info_relocated_name); ! if (keep_it && my_unlink (aux_info_filename) == -1) { fprintf (stderr, "%s: error: can't delete file `%s': %s\n", *************** *** 2253,2256 **** --- 2285,2289 ---- free (aux_info_base); + xfree (aux_info_relocated_name); } *************** *** 2489,2493 **** p = (NONCONST char *) substr (needed, user->hash_entry->symbol) + strlen (user->hash_entry->symbol) + 2; ! strcpy (p, "??\?);"); fprintf (stderr, "%s: %d: `%s' used but missing from SYSCALLS\n", --- 2522,2530 ---- p = (NONCONST char *) substr (needed, user->hash_entry->symbol) + strlen (user->hash_entry->symbol) + 2; ! /* Avoid having ??? in the string. */ ! *p++ = '?'; ! *p++ = '?'; ! *p++ = '?'; ! strcpy (p, ");"); fprintf (stderr, "%s: %d: `%s' used but missing from SYSCALLS\n", *************** *** 2581,2585 **** prototype for the actual function definition. We don't check for this here however, since we assume that the compiler must have already done ! this consistancy checking when it was creating the .X files. */ for (dd_p = hp->ddip; dd_p; dd_p = dd_p->next_for_func) --- 2618,2622 ---- prototype for the actual function definition. We don't check for this here however, since we assume that the compiler must have already done ! this consistency checking when it was creating the .X files. */ for (dd_p = hp->ddip; dd_p; dd_p = dd_p->next_for_func) *************** *** 3419,3423 **** } ! /* Finally, write out a new indent string, just like the preceeding one that we found. This will typically include a newline as the first character of the indent string. */ --- 3456,3460 ---- } ! /* Finally, write out a new indent string, just like the preceding one that we found. This will typically include a newline as the first character of the indent string. */ *************** *** 3957,3961 **** /* Don't even mention "system" include files unless we are protoizing. If we are protoizing, we mention these as a ! gentile way of prodding the user to convert his "system" include files to prototype format. */ && !in_system_include_dir (convert_filename) --- 3994,3998 ---- /* Don't even mention "system" include files unless we are protoizing. If we are protoizing, we mention these as a ! gentle way of prodding the user to convert his "system" include files to prototype format. */ && !in_system_include_dir (convert_filename) *************** *** 4266,4270 **** syscalls_absolute_filename = (char *) xmalloc (strlen (nondefault_syscalls_dir) ! + strlen (syscalls_filename) + 2); strcpy (syscalls_absolute_filename, nondefault_syscalls_dir); } --- 4303,4307 ---- syscalls_absolute_filename = (char *) xmalloc (strlen (nondefault_syscalls_dir) ! + sizeof (syscalls_filename) + 1); strcpy (syscalls_absolute_filename, nondefault_syscalls_dir); } *************** *** 4273,4277 **** syscalls_absolute_filename = (char *) xmalloc (strlen (default_syscalls_dir) ! + strlen (syscalls_filename) + 2); strcpy (syscalls_absolute_filename, default_syscalls_dir); } --- 4310,4314 ---- syscalls_absolute_filename = (char *) xmalloc (strlen (default_syscalls_dir) ! + sizeof (syscalls_filename) + 1); strcpy (syscalls_absolute_filename, default_syscalls_dir); } *************** *** 4360,4364 **** int longind; int c; ! int size; pname = strrchr (argv[0], '/'); --- 4397,4401 ---- int longind; int c; ! char *params = ""; pname = strrchr (argv[0], '/'); *************** *** 4365,4380 **** pname = pname ? pname+1 : argv[0]; ! /* Read the working directory, avoiding arbitrary limit. */ ! size = GUESSPATHLEN; ! while (1) { ! char *value; ! ! cwd_buffer = (char *) xmalloc (size); ! value = getcwd (cwd_buffer, size); ! if (value != 0 || errno != ERANGE) ! break; ! free (cwd_buffer); ! size *= 2; } --- 4402,4411 ---- pname = pname ? pname+1 : argv[0]; ! cwd_buffer = getpwd (); ! if (!cwd_buffer) { ! fprintf (stderr, "%s: cannot get working directory: %s\n", ! pname, sys_errlist[errno]); ! exit (1); } *************** *** 4427,4431 **** break; case 'c': ! munge_compile_params (optarg); break; #ifdef UNPROTOIZE --- 4458,4462 ---- break; case 'c': ! params = optarg; break; #ifdef UNPROTOIZE *************** *** 4452,4455 **** --- 4483,4489 ---- } + /* Set up compile_params based on -p and -c options. */ + munge_compile_params (params); + n_base_source_files = argc - optind; diff -rc2N gcc-2.0/real.h gcc-2.1/real.h *** gcc-2.0/real.h Sun Feb 2 23:32:05 1992 --- gcc-2.1/real.h Thu Mar 19 14:42:28 1992 *************** *** 138,141 **** --- 138,146 ---- #endif + /* Determine whether a floating-point value X is a NaN. */ + #ifndef REAL_VALUE_ISNAN + #define REAL_VALUE_ISNAN(x) (target_isnan (x)) + #endif + /* Determine whether a floating-point value X is minus 0. */ #ifndef REAL_VALUE_MINUS_ZERO diff -rc2N gcc-2.0/recog.c gcc-2.1/recog.c *** gcc-2.0/recog.c Wed Jan 15 16:56:16 1992 --- gcc-2.1/recog.c Tue Mar 10 21:37:38 1992 *************** *** 1755,1759 **** if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT || HOST_BITS_PER_INT != BITS_PER_WORD) ! && GET_CODE (op) != VOIDmode && ! flag_pretend_float) break; if (GET_CODE (op) == CONST_DOUBLE) --- 1755,1759 ---- if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT || HOST_BITS_PER_INT != BITS_PER_WORD) ! && GET_MODE (op) != VOIDmode && ! flag_pretend_float) break; if (GET_CODE (op) == CONST_DOUBLE) diff -rc2N gcc-2.0/reg-stack.c gcc-2.1/reg-stack.c *** gcc-2.0/reg-stack.c Fri Feb 14 15:31:40 1992 --- gcc-2.1/reg-stack.c Fri Mar 20 23:53:32 1992 *************** *** 59,63 **** SET_SRC is REG or MEM. ! The case where both the SET_SRC and SET_DEST FIRST_STACK_REG appears ambiguous. As a special case, the presence of a REG_DEAD note for FIRST_STACK_REG differentiates between a load insn and a pop. --- 59,63 ---- SET_SRC is REG or MEM. ! The case where the SET_SRC and SET_DEST are both FIRST_STACK_REG appears ambiguous. As a special case, the presence of a REG_DEAD note for FIRST_STACK_REG differentiates between a load insn and a pop. *************** *** 810,831 **** n_clobbers = 0; - clobber_reg = (rtx *) alloca (XVECLEN (body, 0) * sizeof (rtx *)); if (GET_CODE (body) == PARALLEL) ! for (i = 0; i < XVECLEN (body, 0); i++) ! if (GET_CODE (XVECEXP (body, 0, i)) == CLOBBER) ! { ! rtx clobber = XVECEXP (body, 0, i); ! rtx reg = XEXP (clobber, 0); ! if (GET_CODE (reg) == SUBREG && GET_CODE (SUBREG_REG (reg)) == REG) ! reg = SUBREG_REG (reg); ! if (STACK_REG_P (reg)) ! { ! clobber_reg[n_clobbers] = reg; ! n_clobbers++; ! } ! } /* Enforce rule #4: Output operands must specifically indicate which --- 810,834 ---- n_clobbers = 0; if (GET_CODE (body) == PARALLEL) ! { ! clobber_reg = (rtx *) alloca (XVECLEN (body, 0) * sizeof (rtx *)); ! for (i = 0; i < XVECLEN (body, 0); i++) ! if (GET_CODE (XVECEXP (body, 0, i)) == CLOBBER) ! { ! rtx clobber = XVECEXP (body, 0, i); ! rtx reg = XEXP (clobber, 0); ! if (GET_CODE (reg) == SUBREG && GET_CODE (SUBREG_REG (reg)) == REG) ! reg = SUBREG_REG (reg); ! ! if (STACK_REG_P (reg)) ! { ! clobber_reg[n_clobbers] = reg; ! n_clobbers++; ! } ! } ! } /* Enforce rule #4: Output operands must specifically indicate which *************** *** 1450,1454 **** /***************************************************************************** ! This section deals with stack register substition, and forms the second pass over the RTL. *****************************************************************************/ --- 1453,1457 ---- /***************************************************************************** ! This section deals with stack register substitution, and forms the second pass over the RTL. *****************************************************************************/ *************** *** 2131,2158 **** n_clobbers = 0; - clobber_reg = (rtx *) alloca (XVECLEN (body, 0) * sizeof (rtx *)); - clobber_loc = (rtx **) alloca (XVECLEN (body, 0) * sizeof (rtx **)); if (GET_CODE (body) == PARALLEL) ! for (i = 0; i < XVECLEN (body, 0); i++) ! if (GET_CODE (XVECEXP (body, 0, i)) == CLOBBER) ! { ! rtx clobber = XVECEXP (body, 0, i); ! rtx reg = XEXP (clobber, 0); ! rtx *loc = & XEXP (clobber, 0); ! if (GET_CODE (reg) == SUBREG && GET_CODE (SUBREG_REG (reg)) == REG) ! { ! loc = & SUBREG_REG (reg); ! reg = SUBREG_REG (reg); ! } ! if (STACK_REG_P (reg)) ! { ! clobber_reg[n_clobbers] = reg; ! clobber_loc[n_clobbers] = loc; ! n_clobbers++; ! } ! } bcopy (regstack, &temp_stack, sizeof (temp_stack)); --- 2134,2164 ---- n_clobbers = 0; if (GET_CODE (body) == PARALLEL) ! { ! clobber_reg = (rtx *) alloca (XVECLEN (body, 0) * sizeof (rtx *)); ! clobber_loc = (rtx **) alloca (XVECLEN (body, 0) * sizeof (rtx **)); ! for (i = 0; i < XVECLEN (body, 0); i++) ! if (GET_CODE (XVECEXP (body, 0, i)) == CLOBBER) ! { ! rtx clobber = XVECEXP (body, 0, i); ! rtx reg = XEXP (clobber, 0); ! rtx *loc = & XEXP (clobber, 0); ! if (GET_CODE (reg) == SUBREG && GET_CODE (SUBREG_REG (reg)) == REG) ! { ! loc = & SUBREG_REG (reg); ! reg = SUBREG_REG (reg); ! } ! ! if (STACK_REG_P (reg)) ! { ! clobber_reg[n_clobbers] = reg; ! clobber_loc[n_clobbers] = loc; ! n_clobbers++; ! } ! } ! } bcopy (regstack, &temp_stack, sizeof (temp_stack)); *************** *** 2288,2292 **** /* Now emit a pop insn for any REG_UNUSED output, or any REG_DEAD input that the asm didn't implicitly pop. If the asm didn't ! implicitly pop a reg, that reg will still be live. Note that we can't use find_regno_note here: the register numbers --- 2294,2298 ---- /* Now emit a pop insn for any REG_UNUSED output, or any REG_DEAD input that the asm didn't implicitly pop. If the asm didn't ! implicitly pop an input reg, that reg will still be live. Note that we can't use find_regno_note here: the register numbers *************** *** 2293,2297 **** in the death notes have already been substituted. */ ! for (i = 0; i < n_outputs + n_inputs; i++) if (STACK_REG_P (operands[i])) { --- 2299,2318 ---- in the death notes have already been substituted. */ ! for (i = 0; i < n_outputs; i++) ! if (STACK_REG_P (operands[i])) ! { ! int j; ! ! for (j = 0; j < n_notes; j++) ! if (REGNO (operands[i]) == REGNO (note_reg[j]) ! && note_kind[j] == REG_UNUSED) ! { ! insn = emit_pop_insn (insn, regstack, operands[i], ! emit_insn_after); ! break; ! } ! } ! ! for (i = first_input; i < first_input + n_inputs; i++) if (STACK_REG_P (operands[i])) { *************** *** 2300,2307 **** for (j = 0; j < n_notes; j++) if (REGNO (operands[i]) == REGNO (note_reg[j]) ! && (note_kind[j] == REG_UNUSED ! || (note_kind[j] == REG_DEAD ! && TEST_HARD_REG_BIT (regstack->reg_set, ! REGNO (operands[i]))))) { insn = emit_pop_insn (insn, regstack, operands[i], --- 2321,2326 ---- for (j = 0; j < n_notes; j++) if (REGNO (operands[i]) == REGNO (note_reg[j]) ! && note_kind[j] == REG_DEAD ! && TEST_HARD_REG_BIT (regstack->reg_set, REGNO (operands[i]))) { insn = emit_pop_insn (insn, regstack, operands[i], *************** *** 2623,2627 **** /* Traverse all basic blocks in a function, converting the register ! refereces in each insn from the "flat" register file that gcc uses, to the stack-like registers the 387 uses. */ --- 2642,2646 ---- /* Traverse all basic blocks in a function, converting the register ! references in each insn from the "flat" register file that gcc uses, to the stack-like registers the 387 uses. */ diff -rc2N gcc-2.0/regclass.c gcc-2.1/regclass.c *** gcc-2.0/regclass.c Fri Jan 31 00:14:10 1992 --- gcc-2.1/regclass.c Thu Mar 5 15:07:30 1992 *************** *** 327,342 **** the register info. */ ! for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) ! if (reg_names[i][0] && ! strcmp (reg_names[i], name)) ! { ! fixed_regs[i] = fixed; ! call_used_regs[i] = call_used; ! break; ! } ! ! if (i == FIRST_PSEUDO_REGISTER) { warning ("unknown register name: %s", name); - return; } } --- 327,338 ---- the register info. */ ! if ((i = decode_reg_name (name)) >= 0) { + fixed_regs[i] = fixed; + call_used_regs[i] = call_used; + } + else + { warning ("unknown register name: %s", name); } } diff -rc2N gcc-2.0/reload.c gcc-2.1/reload.c *** gcc-2.0/reload.c Wed Feb 12 16:51:17 1992 --- gcc-2.1/reload.c Sat Mar 14 00:07:03 1992 *************** *** 285,288 **** --- 285,298 ---- enum insn_code t_icode = CODE_FOR_nothing; + /* If X is a pseudo-register that has an equivalent MEM (actually, if it + is still a pseudo-register by now, it *must* have an equivalent MEM + but we don't want to assume that), use that equivalent when seeing if + a secondary reload is needed since whether or not a reload is needed + might be sensitive to the form of the MEM. */ + + if (GET_CODE (x) == REG && REGNO (x) >= FIRST_PSEUDO_REGISTER + && reg_equiv_mem[REGNO (x)] != 0) + x = reg_equiv_mem[REGNO (x)]; + #ifdef SECONDARY_INPUT_RELOAD_CLASS if (in_p) *************** *** 324,329 **** skip. */ enum reg_class insn_class ! = REG_CLASS_FROM_LETTER (insn_operand_constraint[(int) icode][!in_p][in_p]); if (insn_class == NO_REGS --- 334,341 ---- skip. */ + char insn_letter = insn_operand_constraint[(int) icode][!in_p][in_p]; enum reg_class insn_class ! = (insn_letter == 'r' ? GENERAL_REGS ! : REG_CLASS_FROM_LETTER (insn_letter)); if (insn_class == NO_REGS *************** *** 338,345 **** else { class = insn_class; t_mode = insn_operand_mode[(int) icode][2]; ! t_class ! = REG_CLASS_FROM_LETTER (insn_operand_constraint[(int) icode][2][2]); t_icode = icode; icode = CODE_FOR_nothing; --- 350,358 ---- else { + char t_letter = insn_operand_constraint[(int) icode][2][2]; class = insn_class; t_mode = insn_operand_mode[(int) icode][2]; ! t_class = (t_letter == 'r' ? GENERAL_REGS ! : REG_CLASS_FROM_LETTER (t_letter)); t_icode = icode; icode = CODE_FOR_nothing; *************** *** 1832,1836 **** n_alternatives = n_occurrences (',', constraints[0]) + 1; for (i = 1; i < noperands; i++) ! if (n_alternatives != n_occurrences (',', constraints[0]) + 1) { error_for_asm (insn, "operand constraints differ in number of alternatives"); --- 1845,1849 ---- n_alternatives = n_occurrences (',', constraints[0]) + 1; for (i = 1; i < noperands; i++) ! if (n_alternatives != n_occurrences (',', constraints[i]) + 1) { error_for_asm (insn, "operand constraints differ in number of alternatives"); *************** *** 2013,2016 **** --- 2026,2034 ---- recog_operand[i], ind_levels); substed_operand[i] = recog_operand[i] = *recog_operand_loc[i]; + + /* This is no longer a psuedo register. To prevent later code + from thinking it still is, we must reset the preferred_class + to NO_REGS. */ + preferred_class[i] = NO_REGS; } } *************** *** 3215,3221 **** We also need to do this if there is an equivalent MEM that is not offsettable. In that case, alter_subreg would produce an ! invalid address on big-endian machines. */ else if (regno >= FIRST_PSEUDO_REGISTER && (reg_equiv_address[regno] != 0 || (reg_equiv_mem[regno] != 0 --- 3233,3247 ---- We also need to do this if there is an equivalent MEM that is not offsettable. In that case, alter_subreg would produce an ! invalid address on big-endian machines. ! ! For machines that zero-extend byte loads, we must not reload using ! a wider mode if we have a paradoxical SUBREG. find_reloads will ! force a reload in that case. So we should not do anything here. */ else if (regno >= FIRST_PSEUDO_REGISTER + #ifdef BYTE_LOADS_ZERO_EXTEND + && (GET_MODE_SIZE (GET_MODE (x)) + <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))) + #endif && (reg_equiv_address[regno] != 0 || (reg_equiv_mem[regno] != 0 *************** *** 3396,3400 **** being eliminated, a pseudo is not allocated to a hard register, and the offset between the frame and stack pointers is not its initial value. ! In that case the psuedo will have been replaced by a MEM referring to the stack pointer. */ if (GET_CODE (ad) == MEM) --- 3422,3426 ---- being eliminated, a pseudo is not allocated to a hard register, and the offset between the frame and stack pointers is not its initial value. ! In that case the pseudo will have been replaced by a MEM referring to the stack pointer. */ if (GET_CODE (ad) == MEM) diff -rc2N gcc-2.0/reload1.c gcc-2.1/reload1.c *** gcc-2.0/reload1.c Thu Feb 20 02:32:14 1992 --- gcc-2.1/reload1.c Sun Mar 15 18:39:26 1992 *************** *** 237,241 **** enum insn_code reload_out_optab[NUM_MACHINE_MODES]; ! /* This obstack is used for allocation of rtl during register elmination. The allocated storage can be freed once find_reloads has processed the insn. */ --- 237,241 ---- enum insn_code reload_out_optab[NUM_MACHINE_MODES]; ! /* This obstack is used for allocation of rtl during register elimination. The allocated storage can be freed once find_reloads has processed the insn. */ *************** *** 703,707 **** break; ! if (i == max_regno && num_eliminable = 0 && ! caller_save_needed) return; #endif --- 703,707 ---- break; ! if (i == max_regno && num_eliminable == 0 && ! caller_save_needed) return; #endif *************** *** 745,749 **** and repeats until one repetition spills no additional hard regs. */ ! /* This flag is set when a psuedo reg is spilled, to require another pass. Note that getting an additional reload reg does not necessarily imply any pseudo reg was spilled; --- 745,749 ---- and repeats until one repetition spills no additional hard regs. */ ! /* This flag is set when a pseudo reg is spilled, to require another pass. Note that getting an additional reload reg does not necessarily imply any pseudo reg was spilled; *************** *** 881,885 **** } ! /* If we allocated another psuedo to the stack, redo elimination bookkeeping. */ if (something_changed) --- 881,885 ---- } ! /* If we allocated another pseudo to the stack, redo elimination bookkeeping. */ if (something_changed) *************** *** 1189,1193 **** If a group is needed, the size and mode of the group will ! have been set up at the begining of this loop. */ if (GET_CODE (insn) == CALL_INSN --- 1189,1193 ---- If a group is needed, the size and mode of the group will ! have been set up at the beginning of this loop. */ if (GET_CODE (insn) == CALL_INSN *************** *** 1368,1371 **** --- 1368,1385 ---- } + /* See if anything that happened changes which eliminations are valid. + For example, on the Sparc, whether or not the frame pointer can + be eliminated can depend on what registers have been used. We need + not check some conditions again (such as flag_omit_frame_pointer) + since they can't have changed. */ + + for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++) + if ((ep->from == FRAME_POINTER_REGNUM && FRAME_POINTER_REQUIRED) + #ifdef ELIMINABLE_REGS + || ! CAN_ELIMINATE (ep->from, ep->to) + #endif + ) + ep->can_eliminate = 0; + /* Look for the case where we have discovered that we can't replace register A with register B and that means that we will now be *************** *** 2158,2162 **** /* Otherwise, if this is the definition of a label and it is ! preceeded by a BARRIER, set our offsets to the known offset of that label. */ --- 2172,2176 ---- /* Otherwise, if this is the definition of a label and it is ! preceded by a BARRIER, set our offsets to the known offset of that label. */ *************** *** 2170,2174 **** reg_eliminate[i].offset = reg_eliminate[i].previous_offset = offsets_at[CODE_LABEL_NUMBER (x)][i]; ! if (reg_eliminate[i].offset != reg_eliminate[i].initial_offset) num_not_at_initial_offset++; } --- 2184,2190 ---- reg_eliminate[i].offset = reg_eliminate[i].previous_offset = offsets_at[CODE_LABEL_NUMBER (x)][i]; ! if (reg_eliminate[i].can_eliminate ! && (reg_eliminate[i].offset ! != reg_eliminate[i].initial_offset)) num_not_at_initial_offset++; } *************** *** 2564,2568 **** case CLOBBER: /* If clobbering a register that is the replacement register for an ! elimination we still think can be peformed, note that it cannot be performed. Otherwise, we need not be concerned about it. */ for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++) --- 2580,2584 ---- case CLOBBER: /* If clobbering a register that is the replacement register for an ! elimination we still think can be performed, note that it cannot be performed. Otherwise, we need not be concerned about it. */ for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++) *************** *** 3216,3220 **** /* Notice when we move to a new basic block. */ ! if (live_known && basic_block_needs && this_block + 1 < n_basic_blocks && insn == basic_block_head[this_block+1]) ++this_block; --- 3232,3236 ---- /* Notice when we move to a new basic block. */ ! if (live_known && this_block + 1 < n_basic_blocks && insn == basic_block_head[this_block+1]) ++this_block; *************** *** 3229,3233 **** reg_eliminate[i].offset = reg_eliminate[i].previous_offset = offsets_at[CODE_LABEL_NUMBER (insn)][i]; ! if (reg_eliminate[i].offset != reg_eliminate[i].initial_offset) num_not_at_initial_offset++; } --- 3245,3251 ---- reg_eliminate[i].offset = reg_eliminate[i].previous_offset = offsets_at[CODE_LABEL_NUMBER (insn)][i]; ! if (reg_eliminate[i].can_eliminate ! && (reg_eliminate[i].offset ! != reg_eliminate[i].initial_offset)) num_not_at_initial_offset++; } *************** *** 3261,3264 **** --- 3279,3292 ---- #endif /* SMALL_REGISTER_CLASSES */ + /* If this is a USE and CLOBBER of a MEM, ensure that any + references to eliminable registers have been removed. */ + + if ((GET_CODE (PATTERN (insn)) == USE + || GET_CODE (PATTERN (insn)) == CLOBBER) + && GET_CODE (XEXP (PATTERN (insn), 0)) == MEM) + XEXP (XEXP (PATTERN (insn), 0), 0) + = eliminate_regs (XEXP (XEXP (PATTERN (insn), 0), 0), + GET_MODE (XEXP (PATTERN (insn), 0)), 0); + /* If we need to do register elimination processing, do so. This might delete the insn, in which case we are done. */ *************** *** 4297,4302 **** int s = reload_order[i]; ! if ((reload_in[s] == 0 && reload_out[s] == 0 && ! ! reload_secondary_p[s]) || reload_optional[s]) continue; --- 4325,4330 ---- int s = reload_order[i]; ! if ((reload_in[s] == 0 && reload_out[s] == 0 ! && ! reload_secondary_p[s]) || reload_optional[s]) continue; *************** *** 4452,4456 **** rtx new_spill_reg_store[FIRST_PSEUDO_REGISTER]; ! /* If this is a CALL_INSN preceeded by USE insns, any reload insns must go in front of the first USE insn, not in front of INSN. */ --- 4480,4484 ---- rtx new_spill_reg_store[FIRST_PSEUDO_REGISTER]; ! /* If this is a CALL_INSN preceded by USE insns, any reload insns must go in front of the first USE insn, not in front of INSN. */ *************** *** 4709,4712 **** --- 4737,4756 ---- { int secondary_reload = reload_secondary_reload[j]; + rtx real_oldequiv = oldequiv; + rtx real_old = old; + + /* If OLDEQUIV is a pseudo with a MEM, get the real MEM + and similarly for OLD. + See comments in find_secondary_reload in reload.c. */ + if (GET_CODE (oldequiv) == REG + && REGNO (oldequiv) >= FIRST_PSEUDO_REGISTER + && reg_equiv_mem[REGNO (oldequiv)] != 0) + real_oldequiv = reg_equiv_mem[REGNO (oldequiv)]; + + if (GET_CODE (old) == REG + && REGNO (old) >= FIRST_PSEUDO_REGISTER + && reg_equiv_mem[REGNO (old)] != 0) + real_old = reg_equiv_mem[REGNO (old)]; + second_reload_reg = reload_reg_rtx[secondary_reload]; icode = reload_secondary_icode[j]; *************** *** 4717,4721 **** enum reg_class new_class = SECONDARY_INPUT_RELOAD_CLASS (reload_reg_class[j], ! mode, oldequiv); if (new_class == NO_REGS) --- 4761,4765 ---- enum reg_class new_class = SECONDARY_INPUT_RELOAD_CLASS (reload_reg_class[j], ! mode, real_oldequiv); if (new_class == NO_REGS) *************** *** 4728,4732 **** if (! TEST_HARD_REG_BIT (reg_class_contents[(int) new_class], REGNO (second_reload_reg))) ! oldequiv = old; else { --- 4772,4776 ---- if (! TEST_HARD_REG_BIT (reg_class_contents[(int) new_class], REGNO (second_reload_reg))) ! oldequiv = old, real_oldequiv = real_old; else { *************** *** 4738,4742 **** || (insn_operand_predicate[(int) new_icode][1] && ! ((*insn_operand_predicate[(int) new_icode][1]) ! (oldequiv, mode))))) new_icode = CODE_FOR_nothing; --- 4782,4786 ---- || (insn_operand_predicate[(int) new_icode][1] && ! ((*insn_operand_predicate[(int) new_icode][1]) ! (real_oldequiv, mode))))) new_icode = CODE_FOR_nothing; *************** *** 4750,4754 **** if (!HARD_REGNO_MODE_OK (REGNO (second_reload_reg), new_mode)) ! oldequiv = old; else second_reload_reg --- 4794,4798 ---- if (!HARD_REGNO_MODE_OK (REGNO (second_reload_reg), new_mode)) ! oldequiv = old, real_oldequiv = real_old; else second_reload_reg *************** *** 4762,4766 **** /* If we still need a secondary reload register, check to see if it is being used as a scratch or intermediate ! register and generate code appropriately. */ if (second_reload_reg) --- 4806,4813 ---- /* If we still need a secondary reload register, check to see if it is being used as a scratch or intermediate ! register and generate code appropriately. If we need ! a scratch register, use REAL_OLDEQUIV since the form of ! the insn may depend on the actual address if it is ! a MEM. */ if (second_reload_reg) *************** *** 4769,4773 **** { reload_insn = emit_insn_before (GEN_FCN (icode) ! (reloadreg, oldequiv, second_reload_reg), where); --- 4816,4821 ---- { reload_insn = emit_insn_before (GEN_FCN (icode) ! (reloadreg, ! real_oldequiv, second_reload_reg), where); *************** *** 4791,4795 **** = emit_insn_before ((GEN_FCN (tertiary_icode) (second_reload_reg, ! oldequiv, third_reload_reg)), where); --- 4839,4843 ---- = emit_insn_before ((GEN_FCN (tertiary_icode) (second_reload_reg, ! real_oldequiv, third_reload_reg)), where); *************** *** 5077,5120 **** register only for an input reload, so check again here. */ ! if (reload_secondary_reload[j] >= 0 ! && (SECONDARY_OUTPUT_RELOAD_CLASS (reload_reg_class[j], ! mode, old) ! != NO_REGS)) { ! second_reloadreg = reloadreg; ! reloadreg = reload_reg_rtx[reload_secondary_reload[j]]; ! /* See if RELOADREG is to be used as a scratch register ! or as an intermediate register. */ ! if (reload_secondary_icode[j] != CODE_FOR_nothing) ! { ! emit_insn_before ((GEN_FCN (reload_secondary_icode[j]) ! (old, second_reloadreg, reloadreg)), ! first_output_reload_insn); ! special = 1; ! } ! else ! { ! /* See if we need both a scratch and intermediate reload ! register. */ ! int secondary_reload = reload_secondary_reload[j]; ! enum insn_code tertiary_icode ! = reload_secondary_icode[secondary_reload]; ! rtx pat; ! if (GET_MODE (reloadreg) != mode) ! reloadreg = gen_rtx (REG, mode, REGNO (reloadreg)); ! if (tertiary_icode != CODE_FOR_nothing) { ! rtx third_reloadreg ! = reload_reg_rtx[reload_secondary_reload[secondary_reload]]; ! pat = (GEN_FCN (tertiary_icode) ! (reloadreg, second_reloadreg, third_reloadreg)); } else ! pat = gen_move_insn (reloadreg, second_reloadreg); ! emit_insn_before (pat, first_output_reload_insn); } } --- 5125,5177 ---- register only for an input reload, so check again here. */ ! if (reload_secondary_reload[j] >= 0) { ! rtx real_old = old; ! if (GET_CODE (old) == REG && REGNO (old) >= FIRST_PSEUDO_REGISTER ! && reg_equiv_mem[REGNO (old)] != 0) ! real_old = reg_equiv_mem[REGNO (old)]; ! if((SECONDARY_OUTPUT_RELOAD_CLASS (reload_reg_class[j], ! mode, real_old) ! != NO_REGS)) ! { ! second_reloadreg = reloadreg; ! reloadreg = reload_reg_rtx[reload_secondary_reload[j]]; ! /* See if RELOADREG is to be used as a scratch register ! or as an intermediate register. */ ! if (reload_secondary_icode[j] != CODE_FOR_nothing) { ! emit_insn_before ((GEN_FCN (reload_secondary_icode[j]) ! (real_old, second_reloadreg, ! reloadreg)), ! first_output_reload_insn); ! special = 1; } else ! { ! /* See if we need both a scratch and intermediate reload ! register. */ ! int secondary_reload = reload_secondary_reload[j]; ! enum insn_code tertiary_icode ! = reload_secondary_icode[secondary_reload]; ! rtx pat; ! ! if (GET_MODE (reloadreg) != mode) ! reloadreg = gen_rtx (REG, mode, REGNO (reloadreg)); ! if (tertiary_icode != CODE_FOR_nothing) ! { ! rtx third_reloadreg ! = reload_reg_rtx[reload_secondary_reload[secondary_reload]]; ! pat = (GEN_FCN (tertiary_icode) ! (reloadreg, second_reloadreg, third_reloadreg)); ! } ! else ! pat = gen_move_insn (reloadreg, second_reloadreg); ! ! emit_insn_before (pat, first_output_reload_insn); ! } } } *************** *** 5368,5374 **** It might be better not to actually emit the insn unless it is valid, ! but we need to pass the insn as an operand to `recog' and it is ! simpler to emit and then delete the insn if not valid than to ! dummy things up. */ rtx move_operand, other_operand, insn; --- 5425,5431 ---- It might be better not to actually emit the insn unless it is valid, ! but we need to pass the insn as an operand to `recog' and ! `insn_extract'and it is simpler to emit and then delete the insn if ! not valid than to dummy things up. */ rtx move_operand, other_operand, insn; *************** *** 5415,5418 **** --- 5472,5476 ---- if (CONSTANT_P (XEXP (in, 1)) + || GET_CODE (XEXP (in, 1)) == MEM || (GET_CODE (XEXP (in, 1)) == REG && REGNO (XEXP (in, 1)) >= FIRST_PSEUDO_REGISTER)) *************** *** 5564,5567 **** --- 5622,5629 ---- /* Nonzero if increment after copying. */ int post = (GET_CODE (value) == POST_DEC || GET_CODE (value) == POST_INC); + rtx prev = PREV_INSN (insn); + rtx inc; + rtx add_insn; + enum insn_code code; /* No hard register is equivalent to this register after *************** *** 5575,5650 **** inc_amount = - inc_amount; ! /* First handle preincrement, which is simpler. */ ! if (! post) { ! /* If incrementing a register, assume we can ! output an insn to increment it directly. */ ! if (GET_CODE (incloc) == REG && ! (REGNO (incloc) < FIRST_PSEUDO_REGISTER ! || reg_renumber[REGNO (incloc)] >= 0)) ! { ! rtx first_new ! = emit_insn_before (gen_add2_insn (incloc, ! gen_rtx (CONST_INT, VOIDmode, ! inc_amount)), ! insn); ! emit_insn_before (gen_move_insn (reloadreg, incloc), insn); ! return first_new; } ! else ! /* Else we must not assume we can increment the location directly ! (even though on many target machines we can); ! copy it to the reload register, increment there, then save back. */ ! { ! rtx first_new ! = emit_insn_before (gen_move_insn (reloadreg, incloc), insn); ! emit_insn_before (gen_add2_insn (reloadreg, ! gen_rtx (CONST_INT, VOIDmode, ! inc_amount)), ! insn); ! emit_insn_before (gen_move_insn (incloc, reloadreg), insn); ! return first_new; ! } ! } ! /* Postincrement. ! Because this might be a jump insn or a compare, and because RELOADREG ! may not be available after the insn in an input reload, ! we must do the incrementation before the insn being reloaded for. */ else { ! /* Copy the value, then increment it. */ ! rtx first_new ! = emit_insn_before (gen_move_insn (reloadreg, incloc), insn); ! ! /* If incrementing a register, assume we can ! output an insn to increment it directly. */ ! if (GET_CODE (incloc) == REG && ! (REGNO (incloc) < FIRST_PSEUDO_REGISTER ! || reg_renumber[REGNO (incloc)] >= 0)) ! { ! emit_insn_before (gen_add2_insn (incloc, ! gen_rtx (CONST_INT, VOIDmode, ! inc_amount)), ! insn); ! } ! else ! /* Else we must not assume we can increment INCLOC ! (even though on many target machines we can); ! increment the copy in the reload register, ! save that back, then decrement the reload register ! so it has the original value. */ ! { ! emit_insn_before (gen_add2_insn (reloadreg, ! gen_rtx (CONST_INT, VOIDmode, ! inc_amount)), ! insn); ! emit_insn_before (gen_move_insn (incloc, reloadreg), insn); ! emit_insn_before (gen_sub2_insn (reloadreg, ! gen_rtx (CONST_INT, VOIDmode, ! inc_amount)), ! insn); ! } ! return first_new; } } --- 5637,5705 ---- inc_amount = - inc_amount; ! inc = gen_rtx (CONST_INT, VOIDmode, inc_amount); ! ! /* If this is post-increment, first copy the location to the reload reg. */ ! if (post) ! emit_insn_before (gen_move_insn (reloadreg, incloc), insn); ! ! /* See if we can directly increment INCLOC. Use a method similar to that ! in gen_input_reload. */ ! ! add_insn = emit_insn_before (gen_rtx (SET, VOIDmode, incloc, ! gen_rtx (PLUS, GET_MODE (incloc), ! incloc, inc)), insn); ! ! code = recog_memoized (add_insn); ! if (code >= 0) { ! insn_extract (add_insn); ! if (constrain_operands (code, 1)) ! { ! /* If this is a pre-increment and we have incremented the value ! where it lives, copy the incremented value to RELOADREG to ! be used as an address. */ ! ! if (! post) ! emit_insn_before (gen_move_insn (reloadreg, incloc), insn); ! return NEXT_INSN (prev); } ! } ! ! if (PREV_INSN (add_insn)) ! NEXT_INSN (PREV_INSN (add_insn)) = NEXT_INSN (add_insn); ! if (NEXT_INSN (add_insn)) ! PREV_INSN (NEXT_INSN (add_insn)) = PREV_INSN (add_insn); ! ! /* If couldn't do the increment directly, must increment in RELOADREG. ! The way we do this depends on whether this is pre- or post-increment. ! For pre-increment, copy INCLOC to the reload register, increment it ! there, then save back. */ ! ! if (! post) ! { ! emit_insn_before (gen_move_insn (reloadreg, incloc), insn); ! emit_insn_before (gen_add2_insn (reloadreg, inc), insn); ! emit_insn_before (gen_move_insn (incloc, reloadreg), insn); ! } else { ! /* Postincrement. ! Because this might be a jump insn or a compare, and because RELOADREG ! may not be available after the insn in an input reload, we must do ! the incrementation before the insn being reloaded for. ! ! We have already copied INCLOC to RELOADREG. Increment the copy in ! RELOADREG, save that back, then decrement RELOADREG so it has ! the original value. */ ! ! emit_insn_before (gen_add2_insn (reloadreg, inc), insn); ! emit_insn_before (gen_move_insn (incloc, reloadreg), insn); ! emit_insn_before (gen_add2_insn (reloadreg, ! gen_rtx (CONST_INT, VOIDmode, ! -inc_amount)), ! insn); } + + return NEXT_INSN (prev); } diff -rc2N gcc-2.0/reorg.c gcc-2.1/reorg.c *** gcc-2.0/reorg.c Wed Feb 12 18:53:09 1992 --- gcc-2.1/reorg.c Sun Mar 22 13:16:15 1992 *************** *** 96,100 **** On machines that use CC0, we are very conservative. We will not make a copy of an insn involving CC0 since we want to maintain a 1-1 ! correspondance between the insn that sets and uses CC0. The insns are allowed to be separated by placing an insn that sets CC0 (but not an insn that uses CC0; we could do this, but it doesn't seem worthwhile) in a --- 96,100 ---- On machines that use CC0, we are very conservative. We will not make a copy of an insn involving CC0 since we want to maintain a 1-1 ! correspondence between the insn that sets and uses CC0. The insns are allowed to be separated by placing an insn that sets CC0 (but not an insn that uses CC0; we could do this, but it doesn't seem worthwhile) in a *************** *** 1759,1805 **** } - /* Used for communication between the following two routines, contains - the block number that insn was in. */ - - static int current_block_number; - - /* Called via note_stores from update_block_status. It marks the - registers set in this insn as live at the start of the block whose - number is in current_block_number. */ - - static void - update_block_from_store (dest, x) - rtx dest; - rtx x; - { - int first_regno, last_regno; - int offset = 0; - int i; - - if (GET_CODE (x) != SET - || (GET_CODE (dest) != REG && (GET_CODE (dest) != SUBREG - || GET_CODE (SUBREG_REG (dest)) != REG))) - return; - - if (GET_CODE (dest) == SUBREG) - first_regno = REGNO (SUBREG_REG (dest)) + SUBREG_WORD (dest); - else - first_regno = REGNO (dest); - - last_regno = first_regno + HARD_REGNO_NREGS (first_regno, GET_MODE (dest)); - for (i = first_regno; i < last_regno; i++) - basic_block_live_at_start[current_block_number][i / HOST_BITS_PER_INT] - |= (1 << (i % HOST_BITS_PER_INT)); - } - /* Called when INSN is being moved from a location near the target of a jump. ! If WHERE is the first active insn at the start of its basic block, we can ! just mark the registers set in INSN as live at the start of the basic block ! that starts immediately before INSN. ! ! Otherwise, we leave a marker of the form (use (INSN)) immediately in front of WHERE for mark_target_live_regs. These markers will be deleted when ! reorg finishes. */ static void update_block (insn, where) --- 1759,1771 ---- } /* Called when INSN is being moved from a location near the target of a jump. ! We leave a marker of the form (use (INSN)) immediately in front of WHERE for mark_target_live_regs. These markers will be deleted when ! reorg finishes. + We used to try to update the live status of registers if WHERE is at + the start of a basic block, but that can't work since we may remove a + BARRIER in relax_delay_slots. */ + static void update_block (insn, where) *************** *** 1807,1810 **** --- 1773,1778 ---- rtx where; { + int b; + /* Ignore if this was in a delay slot and it came from the target of a branch. */ *************** *** 1812,1827 **** return; ! current_block_number = find_basic_block (insn); ! if (current_block_number == -1) ! return; ! ! if (where == next_active_insn (basic_block_head[current_block_number])) ! note_stores (PATTERN (insn), update_block_from_store); ! else ! emit_insn_before (gen_rtx (USE, VOIDmode, insn), where); /* INSN might be making a value live in a block where it didn't use to be. So recompute liveness information for this block. */ ! bb_ticks[current_block_number]++; } --- 1780,1791 ---- return; ! emit_insn_before (gen_rtx (USE, VOIDmode, insn), where); /* INSN might be making a value live in a block where it didn't use to be. So recompute liveness information for this block. */ ! ! b = find_basic_block (insn); ! if (b != -1) ! bb_ticks[b]++; } *************** *** 2082,2085 **** --- 2046,2055 ---- ) CLEAR_HARD_REG_BIT (current_live_regs, i); + + /* A CALL_INSN sets any global register live, since it may + have been modified by the call. */ + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) + if (global_regs[i]) + SET_HARD_REG_BIT (current_live_regs, i); } *************** *** 2205,2210 **** what is live: we can see what is live at the branch target and include anything used but not set before the branch. The only things that are ! live are those that are live using the above test and the test below. */ ! if (jump_insn) { rtx jump_target = (GET_CODE (jump_insn) == INSN --- 2175,2184 ---- what is live: we can see what is live at the branch target and include anything used but not set before the branch. The only things that are ! live are those that are live using the above test and the test below. ! ! Don't try this if we expired our jump count above, since that would ! mean there may be an infinite loop in the function being compiled. */ ! ! if (jump_insn && jump_count < 10) { rtx jump_target = (GET_CODE (jump_insn) == INSN *************** *** 2665,2669 **** int slots_to_fill, *pslots_filled; { ! rtx new_thread = thread; rtx delay_list = 0; struct resources opposite_needed, set, needed; --- 2639,2643 ---- int slots_to_fill, *pslots_filled; { ! rtx new_thread; rtx delay_list = 0; struct resources opposite_needed, set, needed; *************** *** 2689,2692 **** --- 2663,2672 ---- mark_target_live_regs (opposite_thread, &opposite_needed); + /* If the insn at THREAD can be split, do it here to avoid having to + update THREAD and NEW_THREAD if it is done in the loop below. Also + initialize NEW_THREAD. */ + + new_thread = thread = try_split (PATTERN (thread), thread, 0); + /* Scan insns at THREAD. We are looking for an insn that can be removed from THREAD (it neither sets nor references resources that were set *************** *** 2841,2845 **** We could check for more complex cases than those tested below, but it doesn't seem worth it. It might also be a good idea to try ! to swap the two insns. That might do better. */ if (GET_CODE (trial) == INSN && GET_CODE (pat) == SET --- 2821,2829 ---- We could check for more complex cases than those tested below, but it doesn't seem worth it. It might also be a good idea to try ! to swap the two insns. That might do better. ! ! We can't do this if the next insn modifies our source, because that ! would make the replacement into the insn invalid. This also ! prevents updating the contents of a PRE_INC. */ if (GET_CODE (trial) == INSN && GET_CODE (pat) == SET *************** *** 2848,2859 **** { rtx next = next_nonnote_insn (trial); - int our_dest = REGNO (SET_DEST (pat)); if (next && GET_CODE (next) == INSN ! && GET_CODE (PATTERN (next)) == SET ! && GET_CODE (SET_DEST (PATTERN (next))) == REG ! && REGNO (SET_DEST (PATTERN (next))) != our_dest ! && refers_to_regno_p (our_dest, our_dest + 1, ! SET_SRC (PATTERN (next)), 0)) validate_replace_rtx (SET_DEST (pat), SET_SRC (pat), next); } --- 2832,2840 ---- { rtx next = next_nonnote_insn (trial); if (next && GET_CODE (next) == INSN ! && GET_CODE (PATTERN (next)) != USE ! && ! reg_set_p (SET_DEST (pat), next) ! && reg_referenced_p (SET_DEST (pat), PATTERN (next))) validate_replace_rtx (SET_DEST (pat), SET_SRC (pat), next); } *************** *** 2886,2890 **** /* If we haven't found anything for this delay slot and it is very likely that the branch will be taken, see if the insn at our target ! increments or decrements a register. If so, try to place the opposite arithmetic insn after the jump insn and put the arithmetic insn in the delay slot. If we can't do this, return. */ --- 2867,2872 ---- /* If we haven't found anything for this delay slot and it is very likely that the branch will be taken, see if the insn at our target ! increments or decrements a register with an increment that does not ! depend on the destination register. If so, try to place the opposite arithmetic insn after the jump insn and put the arithmetic insn in the delay slot. If we can't do this, return. */ *************** *** 2895,2899 **** rtx src; ! trial = try_split (pat, new_thread, 0); pat = PATTERN (trial); --- 2877,2881 ---- rtx src; ! trial = new_thread; pat = PATTERN (trial); *************** *** 2904,2908 **** dest = SET_DEST (pat), src = SET_SRC (pat); if ((GET_CODE (src) == PLUS || GET_CODE (src) == MINUS) ! && rtx_equal_p (XEXP (src, 0), dest)) { rtx other = XEXP (src, 1); --- 2886,2891 ---- dest = SET_DEST (pat), src = SET_SRC (pat); if ((GET_CODE (src) == PLUS || GET_CODE (src) == MINUS) ! && rtx_equal_p (XEXP (src, 0), dest) ! && ! reg_overlap_mentioned_p (dest, XEXP (src, 1))) { rtx other = XEXP (src, 1); diff -rc2N gcc-2.0/rtl.h gcc-2.1/rtl.h *** gcc-2.0/rtl.h Tue Feb 18 20:02:00 1992 --- gcc-2.1/rtl.h Sat Mar 14 00:07:15 1992 *************** *** 109,113 **** current loop. 1 in an INSN, JUMP_INSN, or CALL_INSN if this insn must be scheduled ! together with the preceeding insn. Valid only within sched. 1 in an INSN, JUMP_INSN, or CALL_INSN if insn is in a delay slot and from the target of a branch. Valid from reorg until end of compilation; --- 109,113 ---- current loop. 1 in an INSN, JUMP_INSN, or CALL_INSN if this insn must be scheduled ! together with the preceding insn. Valid only within sched. 1 in an INSN, JUMP_INSN, or CALL_INSN if insn is in a delay slot and from the target of a branch. Valid from reorg until end of compilation; *************** *** 434,438 **** /* During sched, for an insn, 1 means that the insn must be scheduled together ! with the preceeding insn. */ #define SCHED_GROUP_P(INSN) ((INSN)->in_struct) --- 434,438 ---- /* During sched, for an insn, 1 means that the insn must be scheduled together ! with the preceding insn. */ #define SCHED_GROUP_P(INSN) ((INSN)->in_struct) diff -rc2N gcc-2.0/rtl.texi gcc-2.1/rtl.texi *** gcc-2.0/rtl.texi Fri Feb 14 03:37:57 1992 --- gcc-2.1/rtl.texi Sun Mar 22 21:20:49 1992 *************** *** 837,841 **** @findex CONST_DOUBLE_LOW ! If @var{m} is @code{VOIDmode}, the bit of the value are stored in @var{i0} and @var{i1}. @var{i0} is customarily accessed with the macro @code{CONST_DOUBLE_LOW} and @var{i1} with @code{CONST_DOUBLE_HIGH}. --- 837,841 ---- @findex CONST_DOUBLE_LOW ! If @var{m} is @code{VOIDmode}, the bits of the value are stored in @var{i0} and @var{i1}. @var{i0} is customarily accessed with the macro @code{CONST_DOUBLE_LOW} and @var{i1} with @code{CONST_DOUBLE_HIGH}. *************** *** 871,875 **** @findex symbol_ref ! @item (symbol_ref @var{symbol}) Represents the value of an assembler label for data. @var{symbol} is a string that describes the name of the assembler label. If it starts --- 871,875 ---- @findex symbol_ref ! @item (symbol_ref:@var{mode} @var{symbol}) Represents the value of an assembler label for data. @var{symbol} is a string that describes the name of the assembler label. If it starts *************** *** 878,881 **** --- 878,884 ---- with @samp{_}. + The @code{symbol_ref} contains a mode, which is usually @code{Pmode}. + Usually that is the only mode for which a symbol is directly valid. + @findex label_ref @item (label_ref @var{label}) *************** *** 1366,1370 **** @cindex logical shift @item (lshift:@var{m} @var{x} @var{c}) ! Like @code{lshift} but for arithmetic left shift. @code{ashift} and @code{lshift} are identical operations; we customarily use @code{ashift} for both. --- 1369,1373 ---- @cindex logical shift @item (lshift:@var{m} @var{x} @var{c}) ! Like @code{ashift} but for logical left shift. @code{ashift} and @code{lshift} are identical operations; we customarily use @code{ashift} for both. *************** *** 1935,1945 **** @findex unspec_volatile @item (unspec [@var{operands} @dots{}] @var{index}) ! @itemx (unspec [@var{operands} @dots{}] @var{index}) Represents a machine-specific operation on @var{operands}. @var{index} ! selects between multiple macine-specific operations. @code{unspec_volatile} is used for volatile operations and operations that may trap; @code{unspec} is used for other operations. ! These codes may appear themselves inside a @code{pattern} of an insn, inside a @code{parallel}, or inside an expression. --- 1938,1948 ---- @findex unspec_volatile @item (unspec [@var{operands} @dots{}] @var{index}) ! @itemx (unspec_volatile [@var{operands} @dots{}] @var{index}) Represents a machine-specific operation on @var{operands}. @var{index} ! selects between multiple machine-specific operations. @code{unspec_volatile} is used for volatile operations and operations that may trap; @code{unspec} is used for other operations. ! These codes may appear inside a @code{pattern} of an insn, inside a @code{parallel}, or inside an expression. *************** *** 2182,2186 **** unpredictably. ! A @code{call_insn} insn may be preceeded by insns that contain a single @code{use} expression and be followed by insns the contain a single @code{clobber} expression. If so, these @code{use} and @code{clobber} --- 2185,2189 ---- unpredictably. ! A @code{call_insn} insn may be preceded by insns that contain a single @code{use} expression and be followed by insns the contain a single @code{clobber} expression. If so, these @code{use} and @code{clobber} diff -rc2N gcc-2.0/sched.c gcc-2.1/sched.c *** gcc-2.0/sched.c Tue Feb 18 18:33:31 1992 --- gcc-2.1/sched.c Tue Mar 24 15:00:52 1992 *************** *** 145,149 **** #define LOW_PRIORITY_P(INSN) ((INSN_PRIORITY (INSN) & 0x7f000000) == 0) ! /* Vector indexed by INSN_UID giving number of insns refering to this insn. */ static int *insn_ref_count; #define INSN_REF_COUNT(INSN) (insn_ref_count[INSN_UID (INSN)]) --- 145,149 ---- #define LOW_PRIORITY_P(INSN) ((INSN_PRIORITY (INSN) & 0x7f000000) == 0) ! /* Vector indexed by INSN_UID giving number of insns referring to this insn. */ static int *insn_ref_count; #define INSN_REF_COUNT(INSN) (insn_ref_count[INSN_UID (INSN)]) *************** *** 1181,1186 **** if (GET_CODE (x) == SET) sched_analyze_2 (SET_SRC (x), insn); - else if (GET_CODE (x) != CLOBBER) - sched_analyze_2 (dest, insn); } --- 1181,1184 ---- *************** *** 1202,1360 **** code = GET_CODE (x); ! /* Get rid of the easy cases first. */ ! ! /* Ignore constants. Note that we must handle CONST_DOUBLE here ! because it may have a cc0_rtx in its CONST_DOUBLE_CHAIN field, but ! this does not mean that this insn is using cc0. */ ! if (code == CONST_INT || code == CONST_DOUBLE || code == SYMBOL_REF ! || code == CONST || code == LABEL_REF) ! return; #ifdef HAVE_cc0 ! else if (code == CC0) ! { ! rtx link; ! /* User of CC0 depends on immediately preceding insn. ! All notes are removed from the list of insns to schedule before we ! reach here, so the previous insn must be the setter of cc0. */ ! if (GET_CODE (PREV_INSN (insn)) != INSN) ! abort (); ! SCHED_GROUP_P (insn) = 1; ! /* Make a copy of all dependencies on PREV_INSN, and add to this insn. ! This is so that all the dependencies will apply to the group. */ ! for (link = LOG_LINKS (PREV_INSN (insn)); link; link = XEXP (link, 1)) ! add_dependence (insn, XEXP (link, 0), GET_MODE (link)); ! return; ! } #endif ! else if (code == REG) ! { ! int regno = REGNO (x); ! if (regno < FIRST_PSEUDO_REGISTER) ! { ! int i; ! i = HARD_REGNO_NREGS (regno, GET_MODE (x)); ! while (--i >= 0) ! { ! reg_last_uses[regno + i] ! = gen_rtx (INSN_LIST, VOIDmode, ! insn, reg_last_uses[regno + i]); ! if (reg_last_sets[regno + i]) ! add_dependence (insn, reg_last_sets[regno + i], 0); ! if ((call_used_regs[regno + i] || global_regs[regno + i]) ! && last_function_call) ! /* Function calls clobber all call_used regs. */ ! add_dependence (insn, last_function_call, REG_DEP_ANTI); ! } ! } ! else ! { ! reg_last_uses[regno] ! = gen_rtx (INSN_LIST, VOIDmode, insn, reg_last_uses[regno]); ! if (reg_last_sets[regno]) ! add_dependence (insn, reg_last_sets[regno], 0); ! /* If the register does not already cross any calls, then add this ! insn to the sched_before_next_call list so that it will still ! not cross calls after scheduling. */ ! if (reg_n_calls_crossed[regno] == 0) ! add_dependence (sched_before_next_call, insn, REG_DEP_ANTI); ! } ! return; ! } ! /* The interesting case. */ ! else if (code == MEM) ! { ! /* Reading memory. */ ! /* Don't create a dependence for memory references which are known to ! be unchanging, such as constant pool accesses. These will never ! conflict with any other memory access. */ ! if (RTX_UNCHANGING_P (x) == 0) ! { ! rtx pending, pending_mem; ! pending = pending_read_insns; ! pending_mem = pending_read_mems; ! while (pending) ! { ! /* If a dependency already exists, don't create a new one. */ ! if (! find_insn_list (XEXP (pending, 0), LOG_LINKS (insn))) ! if (read_dependence (XEXP (pending_mem, 0), x)) ! add_dependence (insn, XEXP (pending, 0), REG_DEP_ANTI); ! pending = XEXP (pending, 1); ! pending_mem = XEXP (pending_mem, 1); ! } ! pending = pending_write_insns; ! pending_mem = pending_write_mems; ! while (pending) ! { ! /* If a dependency already exists, don't create a new one. */ ! if (! find_insn_list (XEXP (pending, 0), LOG_LINKS (insn))) ! if (true_dependence (XEXP (pending_mem, 0), x)) ! add_dependence (insn, XEXP (pending, 0), 0); ! pending = XEXP (pending, 1); ! pending_mem = XEXP (pending_mem, 1); ! } ! if (last_pending_memory_flush) ! add_dependence (insn, last_pending_memory_flush, REG_DEP_ANTI); ! /* Always add these dependencies to pending_reads, since ! this insn may be followed by a write. */ ! add_insn_mem_dependence (&pending_read_insns, &pending_read_mems, ! insn, x); ! } ! /* Take advantage of tail recursion here. */ ! sched_analyze_2 (XEXP (x, 0), insn); ! return; ! } ! else if (code == ASM_OPERANDS || code == ASM_INPUT ! || code == UNSPEC_VOLATILE) ! { ! rtx u; ! /* Traditional and volatile asm instructions must be considered to use ! and clobber all hard registers and all of memory. So must ! UNSPEC_VOLATILE operations. */ ! if ((code == ASM_OPERANDS && MEM_VOLATILE_P (x)) || code == ASM_INPUT ! || code == UNSPEC_VOLATILE) ! { ! for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) ! { ! for (u = reg_last_uses[i]; u; u = XEXP (u, 1)) ! if (GET_CODE (PATTERN (XEXP (u, 0))) != USE) ! add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI); ! reg_last_uses[i] = 0; ! if (reg_last_sets[i] ! && GET_CODE (PATTERN (reg_last_sets[i])) != USE) ! add_dependence (insn, reg_last_sets[i], 0); ! reg_last_sets[i] = insn; ! } ! flush_pending_lists (insn); ! } ! /* For all ASM_OPERANDS, we must traverse the vector of input operands. ! We can not just fall through here since then we would be confused ! by the ASM_INPUT rtx inside ASM_OPERANDS, which do not indicate ! traditional asms unlike their normal usage. */ ! if (code == ASM_OPERANDS) ! { ! for (j = 0; j < ASM_OPERANDS_INPUT_LENGTH (x); j++) ! sched_analyze_2 (ASM_OPERANDS_INPUT (x, j), insn); ! return; ! } } --- 1200,1371 ---- code = GET_CODE (x); ! switch (code) ! { ! case CONST_INT: ! case CONST_DOUBLE: ! case SYMBOL_REF: ! case CONST: ! case LABEL_REF: ! /* Ignore constants. Note that we must handle CONST_DOUBLE here ! because it may have a cc0_rtx in its CONST_DOUBLE_CHAIN field, but ! this does not mean that this insn is using cc0. */ ! return; #ifdef HAVE_cc0 ! case CC0: ! { ! rtx link; ! /* User of CC0 depends on immediately preceding insn. ! All notes are removed from the list of insns to schedule before we ! reach here, so the previous insn must be the setter of cc0. */ ! if (GET_CODE (PREV_INSN (insn)) != INSN) ! abort (); ! SCHED_GROUP_P (insn) = 1; ! /* Make a copy of all dependencies on PREV_INSN, and add to this insn. ! This is so that all the dependencies will apply to the group. */ ! for (link = LOG_LINKS (PREV_INSN (insn)); link; link = XEXP (link, 1)) ! add_dependence (insn, XEXP (link, 0), GET_MODE (link)); ! return; ! } #endif ! case REG: ! { ! int regno = REGNO (x); ! if (regno < FIRST_PSEUDO_REGISTER) ! { ! int i; ! i = HARD_REGNO_NREGS (regno, GET_MODE (x)); ! while (--i >= 0) ! { ! reg_last_uses[regno + i] ! = gen_rtx (INSN_LIST, VOIDmode, ! insn, reg_last_uses[regno + i]); ! if (reg_last_sets[regno + i]) ! add_dependence (insn, reg_last_sets[regno + i], 0); ! if ((call_used_regs[regno + i] || global_regs[regno + i]) ! && last_function_call) ! /* Function calls clobber all call_used regs. */ ! add_dependence (insn, last_function_call, REG_DEP_ANTI); ! } ! } ! else ! { ! reg_last_uses[regno] ! = gen_rtx (INSN_LIST, VOIDmode, insn, reg_last_uses[regno]); ! if (reg_last_sets[regno]) ! add_dependence (insn, reg_last_sets[regno], 0); ! ! /* If the register does not already cross any calls, then add this ! insn to the sched_before_next_call list so that it will still ! not cross calls after scheduling. */ ! if (reg_n_calls_crossed[regno] == 0) ! add_dependence (sched_before_next_call, insn, REG_DEP_ANTI); ! } ! return; ! } ! case MEM: ! { ! /* Reading memory. */ ! /* Don't create a dependence for memory references which are known to ! be unchanging, such as constant pool accesses. These will never ! conflict with any other memory access. */ ! if (RTX_UNCHANGING_P (x) == 0) ! { ! rtx pending, pending_mem; ! pending = pending_read_insns; ! pending_mem = pending_read_mems; ! while (pending) ! { ! /* If a dependency already exists, don't create a new one. */ ! if (! find_insn_list (XEXP (pending, 0), LOG_LINKS (insn))) ! if (read_dependence (XEXP (pending_mem, 0), x)) ! add_dependence (insn, XEXP (pending, 0), REG_DEP_ANTI); ! pending = XEXP (pending, 1); ! pending_mem = XEXP (pending_mem, 1); ! } ! pending = pending_write_insns; ! pending_mem = pending_write_mems; ! while (pending) ! { ! /* If a dependency already exists, don't create a new one. */ ! if (! find_insn_list (XEXP (pending, 0), LOG_LINKS (insn))) ! if (true_dependence (XEXP (pending_mem, 0), x)) ! add_dependence (insn, XEXP (pending, 0), 0); ! pending = XEXP (pending, 1); ! pending_mem = XEXP (pending_mem, 1); ! } ! if (last_pending_memory_flush) ! add_dependence (insn, last_pending_memory_flush, REG_DEP_ANTI); ! /* Always add these dependencies to pending_reads, since ! this insn may be followed by a write. */ ! add_insn_mem_dependence (&pending_read_insns, &pending_read_mems, ! insn, x); ! } ! /* Take advantage of tail recursion here. */ ! sched_analyze_2 (XEXP (x, 0), insn); ! return; ! } ! case ASM_OPERANDS: ! case ASM_INPUT: ! case UNSPEC_VOLATILE: ! { ! rtx u; ! /* Traditional and volatile asm instructions must be considered to use ! and clobber all hard registers and all of memory. So must ! UNSPEC_VOLATILE operations. */ ! if ((code == ASM_OPERANDS && MEM_VOLATILE_P (x)) || code == ASM_INPUT ! || code == UNSPEC_VOLATILE) ! { ! for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) ! { ! for (u = reg_last_uses[i]; u; u = XEXP (u, 1)) ! if (GET_CODE (PATTERN (XEXP (u, 0))) != USE) ! add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI); ! reg_last_uses[i] = 0; ! if (reg_last_sets[i] ! && GET_CODE (PATTERN (reg_last_sets[i])) != USE) ! add_dependence (insn, reg_last_sets[i], 0); ! reg_last_sets[i] = insn; ! } ! flush_pending_lists (insn); ! } ! /* For all ASM_OPERANDS, we must traverse the vector of input operands. ! We can not just fall through here since then we would be confused ! by the ASM_INPUT rtx inside ASM_OPERANDS, which do not indicate ! traditional asms unlike their normal usage. */ ! if (code == ASM_OPERANDS) ! { ! for (j = 0; j < ASM_OPERANDS_INPUT_LENGTH (x); j++) ! sched_analyze_2 (ASM_OPERANDS_INPUT (x, j), insn); ! return; ! } ! break; ! } ! case PRE_DEC: ! case POST_DEC: ! case PRE_INC: ! case POST_INC: ! /* These read and modify the result; just consider them writes. */ ! sched_analyze_1 (x, insn); ! return; } *************** *** 1397,1450 **** sched_analyze_2 (x, insn); - for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) - { - /* Any REG_INC note is a SET of the register indicated. */ - if (REG_NOTE_KIND (link) == REG_INC) - { - rtx dest = XEXP (link, 0); - int regno = REGNO (dest); - int i; - - /* A hard reg in a wide mode may really be multiple registers. - If so, mark all of them just like the first. */ - if (regno < FIRST_PSEUDO_REGISTER) - { - i = HARD_REGNO_NREGS (regno, GET_MODE (dest)); - while (--i >= 0) - { - rtx u; - - for (u = reg_last_uses[regno+i]; u; u = XEXP (u, 1)) - add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI); - reg_last_uses[regno + i] = 0; - if (reg_last_sets[regno + i]) - add_dependence (insn, reg_last_sets[regno + i], - REG_DEP_OUTPUT); - reg_last_sets[regno + i] = insn; - if ((call_used_regs[i] || global_regs[i]) - && last_function_call) - /* Function calls clobber all call_used regs. */ - add_dependence (insn, last_function_call, REG_DEP_ANTI); - } - } - else - { - rtx u; - - for (u = reg_last_uses[regno]; u; u = XEXP (u, 1)) - add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI); - reg_last_uses[regno] = 0; - if (reg_last_sets[regno]) - add_dependence (insn, reg_last_sets[regno], REG_DEP_OUTPUT); - reg_last_sets[regno] = insn; - - /* Don't let it cross a call after scheduling if it doesn't - already cross one. */ - if (reg_n_calls_crossed[regno] == 0 && last_function_call) - add_dependence (insn, last_function_call, 0); - } - } - } - /* Handle function calls. */ if (GET_CODE (insn) == CALL_INSN) --- 1408,1411 ---- *************** *** 2325,2335 **** && next_nonnote_insn (tail) == 0) { ! /* If this was the only insn in the block, then there are no insns to ! schedule. */ ! if (head == tail) ! return; ! /* We don't try to reorder the USE at the end of a function. */ ! tail = prev_nonnote_insn (tail); #if 0 --- 2286,2303 ---- && next_nonnote_insn (tail) == 0) { ! /* Don't try to reorder any USE insns at the end of a function. ! They must be last to ensure proper register allocation. ! Exclude them all from scheduling. */ ! do ! { ! /* If we are down to one USE insn, then there are no insns to ! schedule. */ ! if (head == tail) ! return; ! tail = prev_nonnote_insn (tail); ! } ! while (GET_CODE (tail) == INSN ! && GET_CODE (PATTERN (tail)) == USE); #if 0 *************** *** 3484,3488 **** case REG_LABEL: /* Should be moved to the new insn(s) which use the label. */ ! abort (); case REG_CC_SETTER: --- 3452,3461 ---- case REG_LABEL: /* Should be moved to the new insn(s) which use the label. */ ! for (insn = first; insn != NEXT_INSN (last); insn = NEXT_INSN (insn)) ! if (GET_RTX_CLASS (GET_CODE (insn)) == 'i' ! && reg_mentioned_p (XEXP (note, 0), PATTERN (insn))) ! REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_LABEL, ! XEXP (note, 0), REG_NOTES (insn)); ! break; case REG_CC_SETTER: *************** *** 3945,3949 **** ";; register %d now crosses calls\n", regno); } ! reg_live_length[regno] = sched_reg_live_length[regno]; reg_n_calls_crossed[regno] = sched_reg_n_calls_crossed[regno]; } --- 3918,3925 ---- ";; register %d now crosses calls\n", regno); } ! /* Negative values are special; don't overwrite the current ! reg_live_length value if it is negative. */ ! if (reg_live_length[regno] >= 0) ! reg_live_length[regno] = sched_reg_live_length[regno]; reg_n_calls_crossed[regno] = sched_reg_n_calls_crossed[regno]; } diff -rc2N gcc-2.0/sdbout.c gcc-2.1/sdbout.c *** gcc-2.0/sdbout.c Fri Feb 21 01:36:24 1992 --- gcc-2.1/sdbout.c Sat Mar 21 18:23:49 1992 *************** *** 105,109 **** static void sdbout_one_type (); static void sdbout_queue_anonymous_type (); ! static void sdbout_dequeue_anonymous_type (); static int plain_type_1 (); --- 105,109 ---- static void sdbout_one_type (); static void sdbout_queue_anonymous_type (); ! static void sdbout_dequeue_anonymous_types (); static int plain_type_1 (); *************** *** 765,768 **** --- 765,785 ---- PUT_SDB_SCL (C_AUTO); } + else if (GET_CODE (value) == MEM && GET_CODE (XEXP (value, 0)) == CONST) + { + /* Handle an obscure case which can arise when optimizing and + when there are few available registers. (This is *always* + the case for i386/i486 targets). The DECL_RTL looks like + (MEM (CONST ...)) even though this variable is a local `auto' + or a local `register' variable. In effect, what has happened + is that the reload pass has seen that all assignments and + references for one such a local variable can be replaced by + equivalent assignments and references to some static storage + variable, thereby avoiding the need for a register. In such + cases we're forced to lie to debuggers and tell them that + this variable was itself `static'. */ + PUT_SDB_DEF (name); + PUT_SDB_VAL (XEXP (XEXP (value, 0), 0)); + PUT_SDB_SCL (C_STAT); + } else { *************** *** 831,835 **** register tree type = TREE_VALUE (link); ! if (! TREE_ASM_WRITTEN (type)) sdbout_one_type (type); } --- 848,852 ---- register tree type = TREE_VALUE (link); ! if (type && ! TREE_ASM_WRITTEN (type)) sdbout_one_type (type); } diff -rc2N gcc-2.0/stmt.c gcc-2.1/stmt.c *** gcc-2.0/stmt.c Sat Feb 8 04:33:26 1992 --- gcc-2.1/stmt.c Thu Mar 19 19:18:23 1992 *************** *** 536,539 **** --- 536,540 ---- { rtx x = expand_expr (exp, 0, VOIDmode, 0); + emit_queue (); emit_indirect_jump (x); emit_barrier (); *************** *** 1150,1161 **** for (tail = clobbers; tail; tail = TREE_CHAIN (tail), i++) { - int j; char *regname = TREE_STRING_POINTER (TREE_VALUE (tail)); ! ! for (j = 0; j < FIRST_PSEUDO_REGISTER; j++) ! if (!strcmp (regname, reg_names[j])) ! break; ! if (j == FIRST_PSEUDO_REGISTER) { error ("unknown register name `%s' in `asm'", regname); --- 1151,1158 ---- for (tail = clobbers; tail; tail = TREE_CHAIN (tail), i++) { char *regname = TREE_STRING_POINTER (TREE_VALUE (tail)); ! int j = decode_reg_name (regname); ! if (j < 0) { error ("unknown register name `%s' in `asm'", regname); *************** *** 1270,1273 **** --- 1267,1271 ---- case NOP_EXPR: case CONVERT_EXPR: + case NON_LVALUE_EXPR: /* Don't warn about values cast to void. */ if (TREE_TYPE (exp) == void_type_node) *************** *** 1885,1889 **** register rtx start_move = start_label; ! /* If the start label is preceeded by a NOTE_INSN_LOOP_CONT note, then we want to move this note also. */ if (GET_CODE (PREV_INSN (start_move)) == NOTE --- 1883,1887 ---- register rtx start_move = start_label; ! /* If the start label is preceded by a NOTE_INSN_LOOP_CONT note, then we want to move this note also. */ if (GET_CODE (PREV_INSN (start_move)) == NOTE *************** *** 2498,2502 **** arg_pointer_save_area = assign_stack_local (Pmode, GET_MODE_SIZE (Pmode), 0); ! emit_move_insn (virtual_incoming_args_rtx, arg_pointer_save_area); } #endif --- 2496,2503 ---- arg_pointer_save_area = assign_stack_local (Pmode, GET_MODE_SIZE (Pmode), 0); ! emit_move_insn (virtual_incoming_args_rtx, ! /* We need a pseudo here, ! or else instantiate_virtual_regs_1 complains. */ ! copy_to_reg (arg_pointer_save_area)); } #endif *************** *** 2779,2782 **** --- 2780,2785 ---- tree decl; { + int was_used = TREE_USED (decl); + if (TREE_STATIC (decl)) return; *************** *** 2800,2803 **** --- 2803,2809 ---- } + /* Don't let the initialization count as "using" the variable. */ + TREE_USED (decl) = was_used; + /* Free any temporaries we made while initializing the decl. */ free_temp_slots (); *************** *** 3546,3554 **** || (unsigned) (TREE_INT_CST_LOW (range)) > 10 * count || TREE_CODE (index_expr) == INTEGER_CST ! /* This will reduce to a constant. */ || (TREE_CODE (index_expr) == CALL_EXPR && TREE_CODE (TREE_OPERAND (index_expr, 0)) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (TREE_OPERAND (index_expr, 0), 0)) == FUNCTION_DECL ! && DECL_FUNCTION_CODE (TREE_OPERAND (TREE_OPERAND (index_expr, 0), 0)) == BUILT_IN_CLASSIFY_TYPE)) { index = expand_expr (index_expr, 0, VOIDmode, 0); --- 3552,3562 ---- || (unsigned) (TREE_INT_CST_LOW (range)) > 10 * count || TREE_CODE (index_expr) == INTEGER_CST ! /* These will reduce to a constant. */ || (TREE_CODE (index_expr) == CALL_EXPR && TREE_CODE (TREE_OPERAND (index_expr, 0)) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (TREE_OPERAND (index_expr, 0), 0)) == FUNCTION_DECL ! && DECL_FUNCTION_CODE (TREE_OPERAND (TREE_OPERAND (index_expr, 0), 0)) == BUILT_IN_CLASSIFY_TYPE) ! || (TREE_CODE (index_expr) == COMPOUND_EXPR ! && TREE_CODE (TREE_OPERAND (index_expr, 1)) == INTEGER_CST)) { index = expand_expr (index_expr, 0, VOIDmode, 0); *************** *** 3668,3674 **** { index_expr = convert (thiscase->data.case_stmt.nominal_type, ! build (MINUS_EXPR, TREE_TYPE (index_expr), ! index_expr, minval)); index = expand_expr (index_expr, 0, VOIDmode, 0); emit_queue (); index = protect_from_queue (index, 0); --- 3676,3684 ---- { index_expr = convert (thiscase->data.case_stmt.nominal_type, ! fold (build (MINUS_EXPR, ! TREE_TYPE (index_expr), ! index_expr, minval))); index = expand_expr (index_expr, 0, VOIDmode, 0); + index = convert_to_mode (Pmode, index, 1); emit_queue (); index = protect_from_queue (index, 0); *************** *** 3675,3679 **** do_pending_stack_adjust (); ! do_tablejump (index, gen_rtx (CONST_INT, VOIDmode, TREE_INT_CST_LOW (range)), --- 3685,3689 ---- do_pending_stack_adjust (); ! do_tablejump (index, Pmode, gen_rtx (CONST_INT, VOIDmode, TREE_INT_CST_LOW (range)), diff -rc2N gcc-2.0/stor-layout.c gcc-2.1/stor-layout.c *** gcc-2.0/stor-layout.c Tue Feb 18 20:07:30 1992 --- gcc-2.1/stor-layout.c Wed Mar 11 23:27:36 1992 *************** *** 58,61 **** --- 58,66 ---- { tree chain = pending_sizes; + tree t; + + /* Put each SAVE_EXPR into the current function. */ + for (t = chain; t; t = TREE_CHAIN (t)) + SAVE_EXPR_CONTEXT (TREE_VALUE (t)) = current_function_decl; pending_sizes = 0; return chain; *************** *** 65,69 **** to serve as the actual size-expression for a type or decl. */ ! static tree variable_size (size) tree size; --- 70,74 ---- to serve as the actual size-expression for a type or decl. */ ! tree variable_size (size) tree size; *************** *** 619,622 **** --- 624,632 ---- break; + case OFFSET_TYPE: + TYPE_SIZE (type) = size_int (GET_MODE_BITSIZE (Pmode)); + TYPE_MODE (type) = Pmode; + break; + case FUNCTION_TYPE: case METHOD_TYPE: *************** *** 682,687 **** MODE_INT, 1); ! #ifdef STRICT_ALIGNMENT ! if (TYPE_ALIGN (type) < BIGGEST_ALIGNMENT && TYPE_ALIGN (type) < TREE_INT_CST_LOW (TYPE_SIZE (type)) && TYPE_MODE (type) != BLKmode) --- 692,696 ---- MODE_INT, 1); ! if (STRICT_ALIGNMENT && TYPE_ALIGN (type) < BIGGEST_ALIGNMENT && TYPE_ALIGN (type) < TREE_INT_CST_LOW (TYPE_SIZE (type)) && TYPE_MODE (type) != BLKmode) *************** *** 690,694 **** TYPE_MODE (type) = BLKmode; } - #endif } break; --- 699,702 ---- *************** *** 737,743 **** what the scalar mode would need, and it matters, then stick with BLKmode. */ ! #ifdef STRICT_ALIGNMENT ! if (! (TYPE_ALIGN (type) >= BIGGEST_ALIGNMENT ! || TYPE_ALIGN (type) >= TREE_INT_CST_LOW (TYPE_SIZE (type)))) { if (TYPE_MODE (type) != BLKmode) --- 745,752 ---- what the scalar mode would need, and it matters, then stick with BLKmode. */ ! if (STRICT_ALIGNMENT ! && ! (TYPE_ALIGN (type) >= BIGGEST_ALIGNMENT ! || (TYPE_ALIGN (type) ! >= TREE_INT_CST_LOW (TYPE_SIZE (type))))) { if (TYPE_MODE (type) != BLKmode) *************** *** 747,751 **** TYPE_MODE (type) = BLKmode; } ! #endif record_lose: ; } --- 756,760 ---- TYPE_MODE (type) = BLKmode; } ! record_lose: ; } *************** *** 767,775 **** what the scalar mode would need, and it matters, then stick with BLKmode. */ ! #ifdef STRICT_ALIGNMENT ! && (TYPE_ALIGN (type) >= BIGGEST_ALIGNMENT ! || TYPE_ALIGN (type) >= TREE_INT_CST_LOW (TYPE_SIZE (type))) ! #endif ! ) { tree field; --- 776,782 ---- what the scalar mode would need, and it matters, then stick with BLKmode. */ ! && (! STRICT_ALIGNMENT ! || TYPE_ALIGN (type) >= BIGGEST_ALIGNMENT ! || TYPE_ALIGN (type) >= TREE_INT_CST_LOW (TYPE_SIZE (type)))) { tree field; *************** *** 805,813 **** if (TYPE_MODE (type) != BLKmode && TYPE_MODE (type) != VOIDmode ! #ifndef STRICT_ALIGNMENT ! && (TREE_CODE (type) != RECORD_TYPE && TREE_CODE (type) != UNION_TYPE ! && TREE_CODE (type) != ARRAY_TYPE) ! #endif ! ) TYPE_ALIGN (type) = GET_MODE_ALIGNMENT (TYPE_MODE (type)); --- 812,818 ---- if (TYPE_MODE (type) != BLKmode && TYPE_MODE (type) != VOIDmode ! && (STRICT_ALIGNMENT ! || (TREE_CODE (type) != RECORD_TYPE && TREE_CODE (type) != UNION_TYPE ! && TREE_CODE (type) != ARRAY_TYPE))) TYPE_ALIGN (type) = GET_MODE_ALIGNMENT (TYPE_MODE (type)); *************** *** 967,971 **** if (mode == MAX_MACHINE_MODE /* It is tempting to omit the following line ! if STRICT_ALIGNMENT is not defined. But that is incorrect, since if the bitfield uses part of 3 bytes and we use a 4-byte mode, we could get a spurious segv --- 972,976 ---- if (mode == MAX_MACHINE_MODE /* It is tempting to omit the following line ! if STRICT_ALIGNMENT is true. But that is incorrect, since if the bitfield uses part of 3 bytes and we use a 4-byte mode, we could get a spurious segv diff -rc2N gcc-2.0/stupid.c gcc-2.1/stupid.c *** gcc-2.0/stupid.c Wed Jan 15 17:03:40 1992 --- gcc-2.1/stupid.c Sat Mar 14 00:12:45 1992 *************** *** 50,54 **** /* Vector mapping INSN_UIDs to suids. ! The suids are like uids but increase monononically always. We use them to see whether a subroutine call came between a variable's birth and its death. */ --- 50,54 ---- /* Vector mapping INSN_UIDs to suids. ! The suids are like uids but increase monotonically always. We use them to see whether a subroutine call came between a variable's birth and its death. */ diff -rc2N gcc-2.0/texinfo.tex gcc-2.1/texinfo.tex *** gcc-2.0/texinfo.tex Sat Feb 22 03:39:36 1992 --- gcc-2.1/texinfo.tex Tue Mar 24 21:50:44 1992 *************** *** 23,27 **** %what you give them. Help stamp out software-hoarding! ! \def\texinfoversion{2.63} \message{Loading texinfo package [Version \texinfoversion]:} \message{} --- 23,27 ---- %what you give them. Help stamp out software-hoarding! ! \def\texinfoversion{2.65} \message{Loading texinfo package [Version \texinfoversion]:} \message{} *************** *** 2074,2097 **** \let\ptexequiv = \equiv ! {\tentt ! \global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} ! \global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil} ! \global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil} ! \global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil} % Adapted from the manmac format (p.420 of TeXbook) ! \global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex ! depth .1ex\hfil} ! } \def\point{$\star$} ! \def\result{\leavevmode\raise.15ex\copy\dblarrowbox} ! \def\expansion{\leavevmode\raise.1ex\copy\longdblarrowbox} ! \def\print{\leavevmode\lower.1ex\copy\pushcharbox} ! ! \def\equiv{\leavevmode\lower.1ex\copy\equivbox} ! % Does anyone really want this? ! % \def\bull{\leavevmode\copy\bullbox} % Adapted from the TeXbook's \boxit. --- 2074,2094 ---- \let\ptexequiv = \equiv ! %{\tentt ! %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} ! %\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil} ! %\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil} ! %\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil} % Adapted from the manmac format (p.420 of TeXbook) ! %\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex ! % depth .1ex\hfil} ! %} \def\point{$\star$} ! \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} ! \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} ! \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} ! \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} % Adapted from the TeXbook's \boxit. *************** *** 3039,3044 **** % Following George Bush, just get rid of widows and orphans. ! \widowpenalty=20000 ! \clubpenalty=2000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're --- 3036,3041 ---- % Following George Bush, just get rid of widows and orphans. ! \widowpenalty=10000 ! \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're diff -rc2N gcc-2.0/tm.texi gcc-2.1/tm.texi *** gcc-2.0/tm.texi Fri Feb 14 03:40:16 1992 --- gcc-2.1/tm.texi Sat Mar 21 18:24:56 1992 *************** *** 4,11 **** @ifset INTERNALS ! @node Machine Macros, Config, Machine Desc, Top ! @chapter Machine Description Macros @cindex machine description macros ! @cindex macros, machine description @cindex @file{tm.h} macros --- 4,12 ---- @ifset INTERNALS ! @node Target Macros, Config, Machine Desc, Top ! @chapter Target Description Macros @cindex machine description macros ! @cindex target description macros ! @cindex macros, target description @cindex @file{tm.h} macros *************** *** 41,45 **** @end menu ! @node Driver, Run-time Target, Machine Macros, Machine Macros @section Controlling the Compilation Driver, @file{gcc} @cindex driver --- 42,46 ---- @end menu ! @node Driver @section Controlling the Compilation Driver, @file{gcc} @cindex driver *************** *** 176,180 **** @item STANDARD_EXEC_PREFIX Define this macro as a C string constant if you wish to override the ! standard choice of @file{/usr/local/lib/gcc/} as the default prefix to try when searching for the executable files of the compiler. --- 177,181 ---- @item STANDARD_EXEC_PREFIX Define this macro as a C string constant if you wish to override the ! standard choice of @file{/usr/local/lib/gcc-lib/} as the default prefix to try when searching for the executable files of the compiler. *************** *** 314,318 **** @end enumerate ! @node Run-time Target, Storage Layout, Driver, Machine Macros @section Run-time Target Specification @cindex run-time target specification --- 315,319 ---- @end enumerate ! @node Run-time Target @section Run-time Target Specification @cindex run-time target specification *************** *** 463,467 **** @end table ! @node Storage Layout, Type Layout, Run-time Target, Machine Macros @section Storage Layout @cindex storage layout --- 464,468 ---- @end table ! @node Storage Layout @section Storage Layout @cindex storage layout *************** *** 589,592 **** --- 590,596 ---- empty field such as @code{int : 0;}. + Note that @code{PCC_BITFIELD_TYPE_MATTERS} also affects the alignment + that results from an empty field. + @findex STRUCTURE_SIZE_BOUNDARY @item STRUCTURE_SIZE_BOUNDARY *************** *** 599,605 **** @findex STRICT_ALIGNMENT @item STRICT_ALIGNMENT ! Define this if instructions will fail to work if given data not ! on the nominal alignment. If instructions will merely go slower ! in that case, do not define this macro. @findex PCC_BITFIELD_TYPE_MATTERS --- 603,609 ---- @findex STRICT_ALIGNMENT @item STRICT_ALIGNMENT ! Define this macro to be the value 1 if instructions will fail to work ! if given data not on the nominal alignment. If instructions will merely ! go slower in that case, define this macro as 0. @findex PCC_BITFIELD_TYPE_MATTERS *************** *** 710,714 **** @end table ! @node Type Layout, Registers, Storage Layout, Machine Macros @section Layout of Source Language Data Types --- 714,718 ---- @end table ! @node Type Layout @section Layout of Source Language Data Types *************** *** 869,873 **** @end table ! @node Registers, Register Classes, Type Layout, Machine Macros @section Register Usage @cindex register usage --- 873,877 ---- @end table ! @node Registers @section Register Usage @cindex register usage *************** *** 1265,1269 **** @end table ! @node Register Classes, Stack and Calling, Registers, Machine Macros @section Register Classes @cindex register class definitions --- 1269,1273 ---- @end table ! @node Register Classes @section Register Classes @cindex register class definitions *************** *** 1391,1395 **** letters for register classes. If @var{char} is such a letter, the value should be the register class corresponding to it. Otherwise, ! the value should be @code{NO_REGS}. @findex REGNO_OK_FOR_BASE_P --- 1395,1401 ---- letters for register classes. If @var{char} is such a letter, the value should be the register class corresponding to it. Otherwise, ! the value should be @code{NO_REGS}. The register letter @samp{r}, ! corresponding to class @code{GENERAL_REGS}, will not be passed ! to this macro; you do not need to handle it. @findex REGNO_OK_FOR_BASE_P *************** *** 1603,1607 **** @end table ! @node Stack and Calling, Varargs, Register Classes, Machine Macros @section Describing Stack Layout and Calling Conventions @cindex calling conventions --- 1609,1613 ---- @end table ! @node Stack and Calling @section Describing Stack Layout and Calling Conventions @cindex calling conventions *************** *** 2243,2247 **** @node Aggregate Return ! @subsection How Large Values Are Returnd @cindex aggregates as return values @cindex large return values --- 2249,2253 ---- @node Aggregate Return ! @subsection How Large Values Are Returned @cindex aggregates as return values @cindex large return values *************** *** 2598,2602 **** @end table ! @node Varargs, Trampolines, Stack and Calling, Machine Macros @section Implementing the Varargs Macros @cindex varargs implementation --- 2604,2608 ---- @end table ! @node Varargs @section Implementing the Varargs Macros @cindex varargs implementation *************** *** 2736,2740 **** @end table ! @node Trampolines, Library Calls, Varargs, Machine Macros @section Trampolines for Nested Functions @cindex trampolines for nested functions --- 2742,2746 ---- @end table ! @node Trampolines @section Trampolines for Nested Functions @cindex trampolines for nested functions *************** *** 2870,2874 **** @end table ! @node Library Calls, Addressing Modes, Trampolines, Machine Macros @section Implicit Calls to Library Routines @cindex library subroutine names --- 2876,2880 ---- @end table ! @node Library Calls @section Implicit Calls to Library Routines @cindex library subroutine names *************** *** 3044,3048 **** @end table ! @node Addressing Modes, Condition Code, Library Calls, Machine Macros @section Addressing Modes @cindex addressing modes --- 3050,3054 ---- @end table ! @node Addressing Modes @section Addressing Modes @cindex addressing modes *************** *** 3231,3235 **** @end table ! @node Condition Code, Costs, Addressing Modes, Machine Macros @section Condition Code Status @cindex condition code status --- 3237,3241 ---- @end table ! @node Condition Code @section Condition Code Status @cindex condition code status *************** *** 3341,3345 **** @end table ! @node Costs, Sections, Condition Code, Machine Macros @section Describing Relative Costs of Operations @cindex costs of instructions --- 3347,3351 ---- @end table ! @node Costs @section Describing Relative Costs of Operations @cindex costs of instructions *************** *** 3490,3503 **** @findex SLOW_UNALIGNED_ACCESS @item SLOW_UNALIGNED_ACCESS ! Define this macro if unaligned accesses have a cost many times greater ! than aligned accesses, for example if they are emulated in a trap ! handler. ! When this macro is defined, the compiler will act as if ! @code{STRICT_ALIGNMENT} were defined when generating code for block moves. This can cause significantly more instructions to be produced. ! Therefore, do not define this macro if unaligned accesses only add a cycle or two to the time for a memory access. @findex DONT_REDUCE_ADDR @item DONT_REDUCE_ADDR --- 3496,3511 ---- @findex SLOW_UNALIGNED_ACCESS @item SLOW_UNALIGNED_ACCESS ! Define this macro to be the value 1 if unaligned accesses have a cost ! many times greater than aligned accesses, for example if they are ! emulated in a trap handler. ! When this macro is non-zero, the compiler will act as if ! @code{STRICT_ALIGNMENT} were non-zero when generating code for block moves. This can cause significantly more instructions to be produced. ! Therefore, do not set this macro non-zero if unaligned accesses only add a cycle or two to the time for a memory access. + If the value of this macro is always zero, it need not be defined. + @findex DONT_REDUCE_ADDR @item DONT_REDUCE_ADDR *************** *** 3526,3530 **** @end table ! @node Sections, PIC, Costs, Machine Macros @section Dividing the Output into Sections (Texts, Data, @dots{}) --- 3534,3538 ---- @end table ! @node Sections @section Dividing the Output into Sections (Texts, Data, @dots{}) *************** *** 3642,3646 **** @end table ! @node PIC, Assembler Format, Sections, Machine Macros @section Position Independent Code @cindex position independent code --- 3650,3654 ---- @end table ! @node PIC @section Position Independent Code @cindex position independent code *************** *** 3685,3689 **** @end table ! @node Assembler Format, Debugging Info, PIC, Machine Macros @section Defining the Output Assembler Language --- 3693,3697 ---- @end table ! @node Assembler Format @section Defining the Output Assembler Language *************** *** 3703,3707 **** @end menu ! @node File Framework, Data Output, Assembler Format, Assembler Format @subsection The Overall Framework of an Assembler File @cindex assembler format --- 3711,3715 ---- @end menu ! @node File Framework @subsection The Overall Framework of an Assembler File @cindex assembler format *************** *** 3802,3806 **** @end table ! @node Data Output, Uninitialized Data, File Framework, Assembler Format @subsection Output of Data --- 3810,3814 ---- @end table ! @node Data Output @subsection Output of Data *************** *** 3917,3921 **** @end table ! @node Uninitialized Data, Label Output, Data Output, Assembler Format @subsection Output of Uninitialized Variables --- 3925,3929 ---- @end table ! @node Uninitialized Data @subsection Output of Uninitialized Variables *************** *** 3979,3983 **** @end table ! @node Label Output, Constructor Output, Uninitialized Data, Assembler Format @subsection Output and Generation of Labels --- 3987,3991 ---- @end table ! @node Label Output @subsection Output and Generation of Labels *************** *** 4069,4081 **** a reference to the label @var{label}. - @findex ASM_GENERATE_INTERNAL_LABEL - @item ASM_GENERATE_INTERNAL_LABEL (@var{string}, @var{prefix}, @var{num}) - A C statement to store into the string @var{string} a label whose name - is made from the string @var{prefix} and the number @var{num}. - - This string, when output subsequently by @code{ASM_OUTPUT_LABELREF}, - should produce the same output that @code{ASM_OUTPUT_INTERNAL_LABEL} - would produce with the same @var{prefix} and @var{num}. - @findex ASM_OUTPUT_INTERNAL_LABEL @item ASM_OUTPUT_INTERNAL_LABEL (@var{stream}, @var{prefix}, @var{num}) --- 4077,4080 ---- *************** *** 4082,4090 **** A C statement to output to the stdio stream @var{stream} a label whose name is made from the string @var{prefix} and the number @var{num}. ! These labels are used for internal purposes, and there is no reason ! for them to appear in the symbol table of the object file. On many ! systems, the letter @samp{L} at the beginning of a label has this ! effect. The usual definition of this macro is as follows: @example fprintf (@var{stream}, "L%s%d:\n", @var{prefix}, @var{num}) --- 4081,4097 ---- A C statement to output to the stdio stream @var{stream} a label whose name is made from the string @var{prefix} and the number @var{num}. ! ! It is absolutely essential that these labels be distinct from the labels ! used for user-level functions and variables. Otherwise, certain programs ! will have name conflicts with internal labels. ! ! It is desirable to exclude internal labels from the symbol table of the ! object file. Most assemblers have a naming convention for labels that ! should be excluded; on many systems, the letter @samp{L} at the ! beginning of a label has this effect. You should find out what ! convention your system uses, and follow it. + The usual definition of this macro is as follows: + @example fprintf (@var{stream}, "L%s%d:\n", @var{prefix}, @var{num}) *************** *** 4091,4094 **** --- 4098,4118 ---- @end example + @findex ASM_GENERATE_INTERNAL_LABEL + @item ASM_GENERATE_INTERNAL_LABEL (@var{string}, @var{prefix}, @var{num}) + A C statement to store into the string @var{string} a label whose name + is made from the string @var{prefix} and the number @var{num}. + + This string, when output subsequently by @code{assemble_name}, + should produce the same output that @code{ASM_OUTPUT_INTERNAL_LABEL} + would produce with the same @var{prefix} and @var{num}. + + If the string begins with @samp{*}, then @code{assemble_name} will + output the rest of the string unchanged. It is often convenient for + @code{ASM_GENERATE_INTERNAL_LABEL} to use @samp{*} in this way. If the + string doesn't start with @samp{*}, then @code{ASM_OUTPUT_LABELREF} gets + to output the string, and may change it. (Of course, + @code{ASM_OUTPUT_LABELREF} is also part of your machine description, so + you should know what it does on your machine.) + @findex ASM_FORMAT_PRIVATE_NAME @item ASM_FORMAT_PRIVATE_NAME (@var{outvar}, @var{name}, @var{number}) *************** *** 4124,4132 **** systems define other ways of computing names. ! @var{buf} is a buffer in which to store the name (256 chars max); ! @var{is_inst} specifies whether the method is an instance method or a ! class method; @var{class_name} is the name of the class; @var{cat_name} ! is the name of the category (or NULL if the method is not in a category); ! and @var{sel_name} is the name of the selector. On systems where the assembler can handle quoted names, you can use this --- 4148,4160 ---- systems define other ways of computing names. ! @var{buf} is an expression of type @code{char *} which gives you a ! buffer in which to store the name; its length is as long as ! @var{class_name}, @var{cat_name} and @var{sel_name} put together, plus ! 50 characters extra. ! ! The argument @var{is_inst} specifies whether the method is an instance ! method or a class method; @var{class_name} is the name of the class; ! @var{cat_name} is the name of the category (or NULL if the method is not ! in a category); and @var{sel_name} is the name of the selector. On systems where the assembler can handle quoted names, you can use this *************** *** 4134,4138 **** @end table ! @node Constructor Output, Instruction Output, Label Output, Assembler Format @subsection Output of Initialization Routines @cindex initialization routines --- 4162,4166 ---- @end table ! @node Constructor Output @subsection Output of Initialization Routines @cindex initialization routines *************** *** 4184,4188 **** @end table ! @node Instruction Output, Dispatch Tables, Constructor Output, Assembler Format @subsection Output of Assembler Instructions --- 4212,4216 ---- @end table ! @node Instruction Output @subsection Output of Assembler Instructions *************** *** 4346,4350 **** @end table ! @node Dispatch Tables, Alignment Output, Instruction Output, Assembler Format @subsection Output of Dispatch Tables --- 4374,4378 ---- @end table ! @node Dispatch Tables @subsection Output of Dispatch Tables *************** *** 4410,4414 **** @end table ! @node Alignment Output,, Dispatch Tables, Assembler Format @subsection Assembler Commands for Alignment --- 4438,4442 ---- @end table ! @node Alignment Output @subsection Assembler Commands for Alignment *************** *** 4455,4459 **** @end table ! @node Debugging Info, Cross-compilation, Assembler Format, Machine Macros @section Controlling Debugging Information Format --- 4483,4487 ---- @end table ! @node Debugging Info @section Controlling Debugging Information Format *************** *** 4493,4496 **** --- 4521,4529 ---- in response to the @samp{-g} option. + @findex XCOFF_DEBUGGING_INFO + @item XCOFF_DEBUGGING_INFO + Define this macro if GNU CC should produce XCOFF format debugging output + in response to the @samp{-g} option. + @findex DEFAULT_GDB_EXTENSIONS @item DEFAULT_GDB_EXTENSIONS *************** *** 4601,4604 **** --- 4634,4645 ---- if backslash is correct for your system. + @findex DBX_WORKING_DIRECTORY + @item DBX_WORKING_DIRECTORY + Define this if DBX wants to have the current directory recorded in each + object file. + + Note that the working directory is always recorded if GDB extensions are + enabled. + @findex DBX_STATIC_STAB_DATA_SECTION @item DBX_STATIC_STAB_DATA_SECTION *************** *** 4706,4710 **** @end table ! @node Cross-compilation, Misc, Debugging INfo, Machine Macros @section Cross Compilation and Floating Point Format @cindex cross compilation and floating point --- 4747,4751 ---- @end table ! @node Cross-compilation @section Cross Compilation and Floating Point Format @cindex cross compilation and floating point *************** *** 4875,4879 **** @end table ! @node Misc,, Cross-compilation, Machine Macros @section Miscellaneous Parameters @cindex parameters, miscellaneous --- 4916,4920 ---- @end table ! @node Misc @section Miscellaneous Parameters @cindex parameters, miscellaneous *************** *** 4885,4889 **** @file{@var{machine}.c}. This macro is called within an initializer of an array of structures. The first field in the structure is the name of a ! predicate and the second field is an arrary of rtl codes. For each predicate, list all rtl codes that can be in expressions matched by the predicate. The list should have a trailing comma. Here is an example --- 4926,4930 ---- @file{@var{machine}.c}. This macro is called within an initializer of an array of structures. The first field in the structure is the name of a ! predicate and the second field is an array of rtl codes. For each predicate, list all rtl codes that can be in expressions matched by the predicate. The list should have a trailing comma. Here is an example *************** *** 4966,4974 **** instructions exist, you should define this macro. ! However, on some machines, such as the 80386, truncation only applies to ! shift operations and not bitfield operations. Do not define ! @code{SHIFT_COUNT_TRUNCATED} on such machines. Instead, add patterns to ! the @file{md} file that include the implied truncation of the shift ! instructions. @findex TRULY_NOOP_TRUNCATION --- 5007,5015 ---- instructions exist, you should define this macro. ! However, on some machines, such as the 80386 and the 680x0, truncation ! only applies to shift operations and not the (real or pretended) ! bitfield operations. Do not define @code{SHIFT_COUNT_TRUNCATED} on such ! machines. Instead, add patterns to the @file{md} file that include the ! implied truncation of the shift instructions. @findex TRULY_NOOP_TRUNCATION *************** *** 5108,5117 **** programs which already use it. - @findex HAVE_VPRINTF - @findex vprintf - @item HAVE_VPRINTF - Define this if the library function @code{vprintf} is available on your - system. - @findex DOLLARS_IN_IDENTIFIERS @item DOLLARS_IN_IDENTIFIERS --- 5149,5152 ---- *************** *** 5121,5124 **** --- 5156,5166 ---- used; 2 means it is allowed by default provided @samp{-ansi} is not used. 1 is the default; there is no need to define this macro in that case. + + @findex NO_DOLLAR_IN_LABEL + @item NO_DOLLAR_IN_LABEL + Define this macro if the assembler does not accept the character + @samp{$} in label names. By default constructors and destructors in + G++ have @samp{$} in the identifiers. If this macro is defined, + @samp{.} is used instead. @findex DEFAULT_MAIN_RETURN diff -rc2N gcc-2.0/toplev.c gcc-2.1/toplev.c *** gcc-2.0/toplev.c Tue Feb 18 20:07:07 1992 --- gcc-2.1/toplev.c Mon Mar 23 14:26:48 1992 *************** *** 53,56 **** --- 53,60 ---- #include "flags.h" #include "insn-attr.h" + + #ifdef XCOFF_DEBUGGING_INFO + #include "xcoffout.h" + #endif #ifdef VMS *************** *** 184,190 **** enum debug_info_level debug_info_level = DINFO_LEVEL_NONE; ! #ifdef DBX_DEBUGGING_INFO /* Nonzero means can use our own extensions to DBX format. ! Relevant only when write_symbols == DBX_DEBUG. */ int use_gdb_dbx_extensions = 0; #endif --- 188,194 ---- enum debug_info_level debug_info_level = DINFO_LEVEL_NONE; ! #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) /* Nonzero means can use our own extensions to DBX format. ! Relevant only when write_symbols == DBX_DEBUG or XCOFF_DEBUG. */ int use_gdb_dbx_extensions = 0; #endif *************** *** 371,374 **** --- 375,382 ---- int flag_gen_aux_info = 0; + /* Specified name of aux-info file. */ + + static char *aux_info_file_name; + /* Nonzero means make the text shared if supported. */ *************** *** 446,450 **** {"inline", &flag_no_inline, 0}, {"syntax-only", &flag_syntax_only, 1}, - {"gen-aux-info", &flag_gen_aux_info, 1}, {"shared-data", &flag_shared_data, 1}, {"caller-saves", &flag_caller_saves, 1}, --- 454,457 ---- *************** *** 529,533 **** {"aggregate-return", &warn_aggregate_return, 1}, {"cast-align", &warn_cast_align, 1}, ! {"uninitialized", &warn_uninitialized, 1} }; --- 536,541 ---- {"aggregate-return", &warn_aggregate_return, 1}, {"cast-align", &warn_cast_align, 1}, ! {"uninitialized", &warn_uninitialized, 1}, ! {"inline", &warn_inline, 1} }; *************** *** 1288,1292 **** int start_time; int dump_base_name_length; - char *aux_info_file_name; int name_specified = name != 0; --- 1296,1299 ---- *************** *** 1346,1355 **** init_caller_save (); ! /* If auxilliary info generation is desired, open the output file. */ if (flag_gen_aux_info) { - aux_info_file_name = (char *) xmalloc (dump_base_name_length + 6); - strcpy (aux_info_file_name, dump_base_name); - strcat (aux_info_file_name, ".X"); aux_info_file = fopen (aux_info_file_name, "w"); if (aux_info_file == 0) --- 1353,1361 ---- init_caller_save (); ! /* If auxiliary info generation is desired, open the output file. ! This goes in the same directory as the source file--unlike ! all the other output files. */ if (flag_gen_aux_info) { aux_info_file = fopen (aux_info_file_name, "w"); if (aux_info_file == 0) *************** *** 1539,1542 **** --- 1545,1552 ---- } + #ifdef IO_BUFFER_SIZE + setvbuf (asm_out_file, xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE); + #endif + input_filename = name; *************** *** 1571,1576 **** /* If dbx symbol table desired, initialize writing it and output the predefined types. */ ! #ifdef DBX_DEBUGGING_INFO ! if (write_symbols == DBX_DEBUG) TIMEVAR (symout_time, dbxout_init (asm_out_file, main_input_filename, getdecls ())); --- 1581,1586 ---- /* If dbx symbol table desired, initialize writing it and output the predefined types. */ ! #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) ! if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG) TIMEVAR (symout_time, dbxout_init (asm_out_file, main_input_filename, getdecls ())); *************** *** 1657,1666 **** output_inline_function (decl); ! /* Warn about any function or variable ! declared static but not defined. */ if ((warn_unused || TREE_USED (decl) || (DECL_NAME (decl) && TREE_USED (DECL_NAME (decl)))) ! /* && TREE_CODE (decl) == FUNCTION_DECL */ && DECL_INITIAL (decl) == 0 && TREE_EXTERNAL (decl) --- 1667,1679 ---- output_inline_function (decl); ! /* Warn about any function ! declared static but not defined. ! We don't warn about variables, ! because many programs have static variables ! that exist only to get some text into the object file. */ if ((warn_unused || TREE_USED (decl) || (DECL_NAME (decl) && TREE_USED (DECL_NAME (decl)))) ! && TREE_CODE (decl) == FUNCTION_DECL && DECL_INITIAL (decl) == 0 && TREE_EXTERNAL (decl) *************** *** 1716,1721 **** /* Do dbx symbols */ ! #ifdef DBX_DEBUGGING_INFO ! if (write_symbols == DBX_DEBUG) TIMEVAR (symout_time, { --- 1729,1734 ---- /* Do dbx symbols */ ! #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) ! if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG) TIMEVAR (symout_time, { *************** *** 1882,1887 **** error ("invalid register name `%s' for register variable", asmspec); } ! #ifdef DBX_DEBUGGING_INFO ! else if (write_symbols == DBX_DEBUG && TREE_CODE (decl) == TYPE_DECL) TIMEVAR (symout_time, dbxout_symbol (decl, 0)); #endif --- 1895,1901 ---- error ("invalid register name `%s' for register variable", asmspec); } ! #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) ! else if ((write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG) ! && TREE_CODE (decl) == TYPE_DECL) TIMEVAR (symout_time, dbxout_symbol (decl, 0)); #endif *************** *** 1900,1905 **** int toplev; { ! #ifdef DBX_DEBUGGING_INFO ! if (write_symbols == DBX_DEBUG) TIMEVAR (symout_time, dbxout_symbol (TYPE_STUB_DECL (type), !toplev)); #endif --- 1914,1919 ---- int toplev; { ! #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) ! if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG) TIMEVAR (symout_time, dbxout_symbol (TYPE_STUB_DECL (type), !toplev)); #endif *************** *** 2445,2448 **** --- 2459,2470 ---- exit_rest_of_compilation: + /* In case the function was not output, + don't leave any temporary anonymous types + queued up for sdb output. */ + #ifdef SDB_DEBUGGING_INFO + if (write_symbols == SDB_DEBUG) + sdbout_types (0); + #endif + /* Put back the tree of subblocks from before we copied it. Code generation and the output of debugging info may have modified *************** *** 2542,2548 **** obey_regdecls = (optimize == 0); ! flag_no_inline = (optimize == 0); ! if (flag_no_inline) ! warn_inline = 0; if (optimize >= 1) --- 2564,2572 ---- obey_regdecls = (optimize == 0); ! if (optimize == 0) ! { ! flag_no_inline = 1; ! warn_inline = 0; ! } if (optimize >= 1) *************** *** 2560,2563 **** --- 2584,2588 ---- flag_strength_reduce = 1; flag_rerun_cse_after_loop = 1; + flag_caller_saves = 1; #ifdef INSN_SCHEDULING flag_schedule_insns = 1; *************** *** 2823,2827 **** to choose a format in a system-dependent way. */ #if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \ ! + defined (DWARF_DEBUGGING_INFO)) #ifdef PREFERRED_DEBUGGING_TYPE if (!strncmp (str, "ggdb", len)) --- 2848,2852 ---- to choose a format in a system-dependent way. */ #if 1 < (defined (DBX_DEBUGGING_INFO) + defined (SDB_DEBUGGING_INFO) \ ! + defined (DWARF_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO)) #ifdef PREFERRED_DEBUGGING_TYPE if (!strncmp (str, "ggdb", len)) *************** *** 2870,2873 **** --- 2895,2918 ---- write_symbols = SDB_DEBUG; #endif /* SDB_DEBUGGING_INFO */ + #ifdef XCOFF_DEBUGGING_INFO + if (write_symbols != NO_DEBUG) + ; + else if (!strncmp (str, "ggdb", len)) + write_symbols = XCOFF_DEBUG; + else if (!strncmp (str, "gxcoff", len)) + write_symbols = XCOFF_DEBUG; + + /* Always enable extensions for -ggdb, + always disable for -gxcoff. + For plain -g, use system-specific default. */ + if (write_symbols == XCOFF_DEBUG && !strncmp (str, "ggdb", len) + && len >= 2) + use_gdb_dbx_extensions = 1; + else if (write_symbols == DBX_DEBUG + && !strncmp (str, "gxcoff", len) && len >= 2) + use_gdb_dbx_extensions = 0; + else + use_gdb_dbx_extensions = DEFAULT_GDB_EXTENSIONS; + #endif if (write_symbols == NO_DEBUG) warning ("`-%s' option not supported on this version of GCC", str); *************** *** 2886,2889 **** --- 2931,2939 ---- g_switch_value = atoi ((str[1] != '\0') ? str+1 : argv[++i]); } + else if (!strncmp (str, "aux-info", 8)) + { + flag_gen_aux_info = 1; + aux_info_file_name = (str[8] != '\0' ? str+8 : argv[++i]); + } else error ("Invalid option `%s'", argv[i]); *************** *** 2898,2901 **** --- 2948,2959 ---- else filename = argv[i]; + } + + /* Inlining does not work if not optimizing, + so force it not to be done. */ + if (optimize == 0) + { + flag_no_inline = 1; + warn_inline = 0; } diff -rc2N gcc-2.0/tree.c gcc-2.1/tree.c *** gcc-2.0/tree.c Fri Feb 14 22:55:11 1992 --- gcc-2.1/tree.c Sat Mar 14 00:12:57 1992 *************** *** 1676,1680 **** /* Return, as an INTEGER_CST node, the number of elements for ! TYPE (which is an ARRAY_TYPE). */ tree --- 1676,1681 ---- /* Return, as an INTEGER_CST node, the number of elements for ! TYPE (which is an ARRAY_TYPE) minus one. ! This counts only elements of the top array. */ tree *************** *** 2168,2172 **** volatilep = !!volatilep; ! /* If not generating auxilliary info, search the chain of variants to see if there is already one there just like the one we need to have. If so, use that existing one. --- 2169,2173 ---- volatilep = !!volatilep; ! /* If not generating auxiliary info, search the chain of variants to see if there is already one there just like the one we need to have. If so, use that existing one. *************** *** 2189,2192 **** --- 2190,2218 ---- TYPE_READONLY (t) = constp; TYPE_VOLATILE (t) = volatilep; + TYPE_POINTER_TO (t) = 0; + TYPE_REFERENCE_TO (t) = 0; + + /* Add this type to the chain of variants of TYPE. */ + TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (m); + TYPE_NEXT_VARIANT (m) = t; + + current_obstack = ambient_obstack; + return t; + } + + /* Create a new variant of TYPE, equivalent but distinct. + This is so the caller can modify it. */ + + tree + build_type_copy (type) + tree type; + { + register tree t, m = TYPE_MAIN_VARIANT (type); + register struct obstack *ambient_obstack = current_obstack; + + current_obstack + = TREE_PERMANENT (type) ? &permanent_obstack : saveable_obstack; + + t = copy_node (type); TYPE_POINTER_TO (t) = 0; TYPE_REFERENCE_TO (t) = 0; diff -rc2N gcc-2.0/tree.h gcc-2.1/tree.h *** gcc-2.0/tree.h Mon Jan 13 15:29:23 1992 --- gcc-2.1/tree.h Thu Mar 12 14:06:16 1992 *************** *** 912,920 **** extern tree build_type_variant (); ! /* Return the mode for data of a given size SIZE and mode class CLASS. ! If LIMIT is nonzero, then don't use modes bigger than MAX_FIXED_MODE_SIZE. ! The value is BLKmode if no other mode is found. */ ! extern enum machine_mode mode_for_size (); /* Given a ..._TYPE node, calculate the TYPE_SIZE, TYPE_SIZE_UNIT, --- 912,918 ---- extern tree build_type_variant (); ! /* Make a copy of a type node. */ ! extern tree build_type_copy (); /* Given a ..._TYPE node, calculate the TYPE_SIZE, TYPE_SIZE_UNIT, *************** *** 1034,1037 **** --- 1032,1043 ---- extern tree save_expr (); + + /* variable_size (EXP) is like save_expr (EXP) except that it + is for the special case of something that is part of a + variable size for a data type. It makes special arrangements + to compute the value at the right time when the data type + belongs to a function parameter. */ + + extern tree variable_size (); /* stabilize_reference (EXP) returns an reference equivalent to EXP diff -rc2N gcc-2.0/unroll.c gcc-2.1/unroll.c *** gcc-2.0/unroll.c Fri Feb 7 22:27:38 1992 --- gcc-2.1/unroll.c Sat Mar 14 00:13:01 1992 *************** *** 325,329 **** { #ifdef HAVE_cc0 ! /* The immediately preceeding insn is a compare which must be deleted. */ delete_insn (last_loop_insn); --- 325,329 ---- { #ifdef HAVE_cc0 ! /* The immediately preceding insn is a compare which must be deleted. */ delete_insn (last_loop_insn); *************** *** 330,334 **** delete_insn (PREV_INSN (last_loop_insn)); #else ! /* The immediately preceeding insn may not be the compare, so don't delete it. */ delete_insn (last_loop_insn); --- 330,334 ---- delete_insn (PREV_INSN (last_loop_insn)); #else ! /* The immediately preceding insn may not be the compare, so don't delete it. */ delete_insn (last_loop_insn); *************** *** 884,892 **** { #ifdef HAVE_cc0 ! /* The immediately preceeding insn is a compare which we do not want to copy. */ copy_end = PREV_INSN (PREV_INSN (last_loop_insn)); #else ! /* The immediately preceeding insn may not be a compare, so we must copy it. */ copy_end = PREV_INSN (last_loop_insn); --- 884,892 ---- { #ifdef HAVE_cc0 ! /* The immediately preceding insn is a compare which we do not want to copy. */ copy_end = PREV_INSN (PREV_INSN (last_loop_insn)); #else ! /* The immediately preceding insn may not be a compare, so we must copy it. */ copy_end = PREV_INSN (last_loop_insn); *************** *** 938,942 **** { #ifdef HAVE_cc0 ! /* The immediately preceeding insn is a compare which we do not want to copy. */ insert_before = PREV_INSN (last_loop_insn); --- 938,942 ---- { #ifdef HAVE_cc0 ! /* The immediately preceding insn is a compare which we do not want to copy. */ insert_before = PREV_INSN (last_loop_insn); *************** *** 943,947 **** copy_end = PREV_INSN (insert_before); #else ! /* The immediately preceeding insn may not be a compare, so we must copy it. */ insert_before = last_loop_insn; --- 943,947 ---- copy_end = PREV_INSN (insert_before); #else ! /* The immediately preceding insn may not be a compare, so we must copy it. */ insert_before = last_loop_insn; *************** *** 1249,1253 **** does not have code to deal with them. */ if (GET_MODE_CLASS (GET_MODE (loop_final_value)) == MODE_FLOAT ! || GET_MODE_CLASS (GET_MODE (loop_initial_value) == MODE_FLOAT)) { if (loop_dump_stream) --- 1249,1253 ---- does not have code to deal with them. */ if (GET_MODE_CLASS (GET_MODE (loop_final_value)) == MODE_FLOAT ! || GET_MODE_CLASS (GET_MODE (loop_initial_value)) == MODE_FLOAT) { if (loop_dump_stream) *************** *** 1462,1467 **** if (tv->giv_type == DEST_ADDR && tv->same == v) { tv->dest_reg = plus_constant (tv->dest_reg, ! INTVAL (giv_inc)); *tv->location = tv->dest_reg; --- 1462,1469 ---- if (tv->giv_type == DEST_ADDR && tv->same == v) { + /* Increment the giv by the amount that was calculated in + find_splittable_givs, and saved in add_val. */ tv->dest_reg = plus_constant (tv->dest_reg, ! INTVAL (tv->add_val)); *tv->location = tv->dest_reg; *************** *** 1492,1497 **** /* Reset the giv to be just the register again, in case ! it is used after the set we have just emitted. */ ! tv->dest_reg = dest_reg; *tv->location = tv->dest_reg; } --- 1494,1502 ---- /* Reset the giv to be just the register again, in case ! it is used after the set we have just emitted. ! We must subtract the const_adjust factor added in ! above. */ ! tv->dest_reg = plus_constant (dest_reg, ! - tv->const_adjust); *tv->location = tv->dest_reg; } *************** *** 2049,2053 **** if (loop_dump_stream) fprintf (loop_dump_stream, ! "Loop unrolling: Iteration var not an interger.\n"); return; } --- 2054,2058 ---- if (loop_dump_stream) fprintf (loop_dump_stream, ! "Loop unrolling: Iteration var not an integer.\n"); return; } *************** *** 2236,2240 **** /* If the initial value of the biv is itself (i.e. it is too complicated for strength_reduce to compute), or is a hard ! register, then we must create a new psuedo reg to hold the initial value of the biv. */ --- 2241,2245 ---- /* If the initial value of the biv is itself (i.e. it is too complicated for strength_reduce to compute), or is a hard ! register, then we must create a new pseudo reg to hold the initial value of the biv. */ *************** *** 2597,2601 **** } } ! if (loop_dump_stream) fprintf (loop_dump_stream, "DEST_ADDR giv being split.\n"); --- 2602,2613 ---- } } ! ! /* Overwrite the old add_val, which is no longer needed, and ! substitute the amount that the giv is incremented on each ! iteration. We need to save this somewhere, so we know how ! much to increment split DEST_ADDR giv's in copy_loop_body. */ ! ! v->add_val = giv_inc; ! if (loop_dump_stream) fprintf (loop_dump_stream, "DEST_ADDR giv being split.\n"); *************** *** 2661,2664 **** --- 2673,2677 ---- rtx insn, label; enum rtx_code code; + int jump_count = 0; /* HACK: Must also search the loop fall through exit, create a label_ref *************** *** 2676,2699 **** insn = NEXT_INSN (XEXP (label, 0)); ! while (1) { ! if (insn == 0) ! break; ! ! if ((code = GET_CODE (insn)) == INSN || code == JUMP_INSN ! || code == CALL_INSN) { ! if (GET_CODE (PATTERN (insn)) == SET) ! { ! if (reg_mentioned_p (reg, SET_SRC (PATTERN (insn)))) ! return 0; ! if (SET_DEST (PATTERN (insn)) == reg) ! break; ! if (reg_mentioned_p (reg, SET_DEST (PATTERN (insn)))) ! return 0; ! } ! else if (reg_mentioned_p (reg, PATTERN (insn))) return 0; } if (code == JUMP_INSN) { --- 2689,2707 ---- insn = NEXT_INSN (XEXP (label, 0)); ! while (insn) { ! code = GET_CODE (insn); ! if (GET_RTX_CLASS (code) == 'i') { ! rtx set; ! ! if (reg_referenced_p (reg, PATTERN (insn))) return 0; + + set = single_set (insn); + if (set && rtx_equal_p (SET_DEST (set), reg)) + break; } + if (code == JUMP_INSN) { *************** *** 2700,2727 **** if (GET_CODE (PATTERN (insn)) == RETURN) break; ! else if (! simplejump_p (insn)) return 0; else ! { ! insn = JUMP_LABEL (insn); ! /* If this branches to a code label after a LOOP_BEG or ! a LOOP_CONT note, then assume it is a loop back edge. ! Must fail in that case to prevent going into an infinite ! loop trying to trace infinite loops. ! ! In the presence of syntax errors, this may be a jump to ! a CODE_LABEL that was never emitted. Fail in this case ! also. */ ! ! if (! PREV_INSN (insn) ! || (GET_CODE (PREV_INSN (insn)) == NOTE ! && ((NOTE_LINE_NUMBER (PREV_INSN (insn)) ! == NOTE_INSN_LOOP_BEG) ! || (NOTE_LINE_NUMBER (PREV_INSN (insn)) ! == NOTE_INSN_LOOP_CONT)))) ! return 0; ! } } ! insn = NEXT_INSN (insn); } --- 2708,2719 ---- if (GET_CODE (PATTERN (insn)) == RETURN) break; ! else if (! simplejump_p (insn) ! /* Prevent infinite loop following infinite loops. */ ! || jump_count++ > 20) return 0; else ! insn = JUMP_LABEL (insn); } ! insn = NEXT_INSN (insn); } *************** *** 2741,2744 **** --- 2733,2741 ---- { rtx increment, tem; + + /* ??? This only works for MODE_INT biv's. Reject all others for now. */ + + if (GET_MODE_CLASS (bl->biv->mode) != MODE_INT) + return 0; /* The final value for reversed bivs must be calculated differently than diff -rc2N gcc-2.0/va-hp800.h gcc-2.1/va-hp800.h *** gcc-2.0/va-hp800.h Wed Jan 29 00:45:53 1992 --- gcc-2.1/va-hp800.h Mon Mar 16 14:02:51 1992 *************** *** 1,9 **** ! typedef char *va_list; ! #if __GNUCC__ > 1 #ifdef _STDARG_H ! #define va_start(AP,LASTARG) \ ! (__builtin_saveregs(), (AP) = __builtin_next_arg ()) #else #define va_alist __builtin_va_alist --- 1,15 ---- ! #if __GNUC__ > 1 ! typedef struct ! { ! char *__va_stack_start; /* Real start of stack args. */ ! char *__va_int; /* Pointer to the general register */ ! /* args and stack. */ ! char *__va_float; /* Pointer to the fp register args. */ ! char *__va_double; ! } va_list; #ifdef _STDARG_H ! #define va_start(AP,LASTARG) ((AP) = *(va_list *)__builtin_saveregs()) #else #define va_alist __builtin_va_alist *************** *** 10,15 **** /* The ... causes current_function_varargs to be set in cc1. */ #define va_dcl int __builtin_va_alist; ... ! #define va_start(AP) \ ! ((AP) = (va_list *)&__builtin_va_alist + sizeof(int)) #endif /* _STDARG_H */ --- 16,20 ---- /* The ... causes current_function_varargs to be set in cc1. */ #define va_dcl int __builtin_va_alist; ... ! #define va_start(AP) ((AP) = *(va_list *)__builtin_saveregs()) #endif /* _STDARG_H */ *************** *** 20,29 **** (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) ! #define va_arg(AP,TYPE) \ ! ((__va_rounded_size(TYPE) <= 8)) \ ! ? ((AP) -= __va_rounded_size (TYPE), (__alignof__ (TYPE) > 4 ? \ ! (int)AP &= ~(0x7) : 0), \ ! *(TYPE *)(AP)) \ ! : ((AP) -= sizeof (TYPE *), **(TYPE **)(AP)) void va_end (va_list); /* Defined in libgcc.a */ --- 25,47 ---- (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) ! #define va_arg(AP, TYPE) \ ! (((__va_rounded_size(TYPE) <= 8) \ ! ? ((AP).__va_int -= __va_rounded_size (TYPE), \ ! (AP).__va_float -= __va_rounded_size (TYPE), \ ! (AP).__va_double -= __va_rounded_size (TYPE), \ ! (__alignof__ (TYPE) > 4 ? ((int)(AP).__va_int &= ~(0x7), \ ! (int)(AP).__va_float &= ~(0x7), \ ! (int)(AP).__va_double &= ~(0x7)) : 0))\ ! : (int)((AP).__va_int -= sizeof (TYPE *), \ ! (AP).__va_float -= sizeof (TYPE *), \ ! (AP).__va_double -= sizeof (TYPE *))), \ ! (((AP).__va_int < (AP).__va_stack_start \ ! || __builtin_classify_type (* (TYPE *) 0) != 8) \ ! ? ((__va_rounded_size(TYPE) <= 8) ? *(TYPE *)(AP).__va_int \ ! : **(TYPE **)(AP).__va_int) \ ! : ((__va_rounded_size(TYPE) <= 4) ? *(TYPE *)(AP).__va_float \ ! : ((__va_rounded_size(TYPE) <= 8) ? *(TYPE *)(AP).__va_double \ ! : **(TYPE **)(AP).__va_int)))) ! void va_end (va_list); /* Defined in libgcc.a */ *************** *** 31,34 **** --- 49,54 ---- #else /* __GNUCC__ > 1 */ + + typedef char *va_list; /* __builtin_saveregs () tickles a bug in the pa-risc gcc 1.39 port, */ diff -rc2N gcc-2.0/va-pyr.h gcc-2.1/va-pyr.h *** gcc-2.0/va-pyr.h Fri Jan 31 01:51:30 1992 --- gcc-2.1/va-pyr.h Sat Mar 14 00:13:02 1992 *************** *** 10,14 **** * As such, it depends strongly on the Pyramid conventions for * parameter passing.ct and indepenent implementation. ! * These (somewhat bizarre) paramter-passing conventions are described * in the ``OSx Operating System Porting Guide''. * --- 10,14 ---- * As such, it depends strongly on the Pyramid conventions for * parameter passing.ct and indepenent implementation. ! * These (somewhat bizarre) parameter-passing conventions are described * in the ``OSx Operating System Porting Guide''. * diff -rc2N gcc-2.0/va-sparc.h gcc-2.1/va-sparc.h *** gcc-2.0/va-sparc.h Fri Jan 31 01:50:46 1992 --- gcc-2.1/va-sparc.h Wed Mar 4 16:58:05 1992 *************** *** 21,28 **** #define va_dcl int __builtin_va_alist; __va_ellipsis ! /* The difference is to store the stack address in both components ! instead of in AP itself. */ #define va_start(AP) \ (__builtin_saveregs (), (AP) = ((char *) &__builtin_va_alist)) #define va_end(pvar) --- 21,32 ---- #define va_dcl int __builtin_va_alist; __va_ellipsis ! #ifdef _STDARG_H ! #define va_start(AP, LASTARG) \ ! (__builtin_saveregs (), AP = ((char *) __builtin_next_arg ())) ! #else #define va_start(AP) \ (__builtin_saveregs (), (AP) = ((char *) &__builtin_va_alist)) + #endif + #define va_end(pvar) *************** *** 44,48 **** ((__builtin_classify_type (__va_temp) >= 12) \ ? ((pvar) += __va_rounded_size (TYPE *), \ ! **(TYPE **) (pvar) - __va_rounded_size (TYPE *)) \ ! : ((pvar) += __va_rounded_size (TYPE), \ *((TYPE *) ((pvar) - __va_rounded_size (TYPE)))));}) --- 48,52 ---- ((__builtin_classify_type (__va_temp) >= 12) \ ? ((pvar) += __va_rounded_size (TYPE *), \ ! **(TYPE **) ((pvar) - __va_rounded_size (TYPE *))) \ ! : ((pvar) += __va_rounded_size (TYPE), \ *((TYPE *) ((pvar) - __va_rounded_size (TYPE)))));}) diff -rc2N gcc-2.0/varasm.c gcc-2.1/varasm.c *** gcc-2.0/varasm.c Mon Feb 17 08:20:31 1992 --- gcc-2.1/varasm.c Mon Mar 23 14:26:54 1992 *************** *** 39,42 **** --- 39,46 ---- #include "obstack.h" + #ifdef XCOFF_DEBUGGING_INFO + #include "xcoffout.h" + #endif + #ifndef ASM_STABS_OP #define ASM_STABS_OP ".stabs" *************** *** 78,81 **** --- 82,86 ---- void output_constant (); void output_constructor (); + void data_section (); #ifdef EXTRA_SECTIONS *************** *** 190,196 **** } /* Decode an `asm' spec for a declaration as a register name. Return the register number, or -1 if nothing specified, ! or -2 if the name is not a register. */ int --- 195,217 ---- } + /* Given NAME, a putative register name, discard any customary prefixes. */ + + static char * + strip_reg_name (name) + char *name; + { + #ifdef REGISTER_PREFIX + if (!strncmp (name, REGISTER_PREFIX, strlen (REGISTER_PREFIX))) + name += strlen (REGISTER_PREFIX); + #endif + if (name[0] == '%' || name[0] == '#') + name++; + return name; + } + /* Decode an `asm' spec for a declaration as a register name. Return the register number, or -1 if nothing specified, ! or -2 if the name is not a register. Accept an exact spelling or ! a decimal number. Prefixes such as % are optional. */ int *************** *** 202,205 **** --- 223,229 ---- int i; + /* Get rid of confusing prefixes. */ + asmspec = strip_reg_name (asmspec); + /* Allow a decimal number as a "register name". */ for (i = strlen (asmspec) - 1; i >= 0; i--) *************** *** 216,227 **** for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) ! if (reg_names[i][0] && ! strcmp (asmspec, reg_names[i])) return i; - if (asmspec[0] == '%') - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (reg_names[i][0] && ! strcmp (asmspec + 1, reg_names[i])) - return i; - #ifdef ADDITIONAL_REGISTER_NAMES { --- 240,247 ---- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) ! if (reg_names[i][0] ! && ! strcmp (asmspec, strip_reg_name (reg_names[i]))) return i; #ifdef ADDITIONAL_REGISTER_NAMES { *************** *** 232,240 **** if (! strcmp (asmspec, table[i].name)) return table[i].number; - - if (asmspec[0] == '%') - for (i = 0; i < sizeof (table) / sizeof (table[0]); i++) - if (! strcmp (asmspec + 1, table[i].name)) - return table[i].number; } #endif /* ADDITIONAL_REGISTER_NAMES */ --- 252,255 ---- *************** *** 500,506 **** #ifdef DBX_DEBUGGING_INFO ! /* Output SDB definition of the function. */ if (write_symbols == DBX_DEBUG) ! dbxout_begin_function (); #endif --- 515,521 ---- #ifdef DBX_DEBUGGING_INFO ! /* Output DBX definition of the function. */ if (write_symbols == DBX_DEBUG) ! dbxout_begin_function (decl); #endif *************** *** 657,663 **** TREE_ASM_WRITTEN (decl) = 1; ! #ifdef DBX_DEBUGGING_INFO /* File-scope global variables are output here. */ ! if (write_symbols == DBX_DEBUG && top_level) dbxout_symbol (decl, 0); #endif --- 672,679 ---- TREE_ASM_WRITTEN (decl) = 1; ! #if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO) /* File-scope global variables are output here. */ ! if ((write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG) ! && top_level) dbxout_symbol (decl, 0); #endif *************** *** 746,750 **** if (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST) ! return; app_disable (); --- 762,766 ---- if (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST) ! goto finish; app_disable (); *************** *** 757,761 **** { error_with_decl (decl, "size of variable `%s' is too large"); ! return; } --- 773,777 ---- { error_with_decl (decl, "size of variable `%s' is too large"); ! goto finish; } *************** *** 816,820 **** #endif } ! return; } --- 832,836 ---- #endif } ! goto finish; } *************** *** 907,910 **** --- 923,942 ---- /* Leave space for it. */ assemble_zeros (int_size_in_bytes (TREE_TYPE (decl))); + + finish: + #ifdef XCOFF_DEBUGGING_INFO + /* Unfortunately, the IBM assembler cannot handle stabx before the actual + declaration. When something like ".stabx "aa:S-2",aa,133,0" is emitted + and `aa' hasn't been output yet, the assembler generates a stab entry with + a value of zero, in addition to creating an unnecessary external entry + for `aa'. Hence, we must pospone dbxout_symbol to here at the end. */ + + /* File-scope global variables are output here. */ + if (write_symbols == XCOFF_DEBUG && top_level) + dbxout_symbol (decl, 0); + #else + /* There must be a statement after a label. */ + ; + #endif } *************** *** 1311,1315 **** /* Detect special cases. */ ! if (REAL_VALUES_EQUAL (dconst0, d)) return CONST0_RTX (mode); else if (REAL_VALUES_EQUAL (dconst1, d)) --- 1343,1348 ---- /* Detect special cases. */ ! /* Avoid REAL_VALUES_EQUAL here in order to distinguish minus zero. */ ! if (!bcmp (&dconst0, &d, sizeof d)) return CONST0_RTX (mode); else if (REAL_VALUES_EQUAL (dconst1, d)) *************** *** 2703,2707 **** following bit-fields. */ ! /* next_offset is the offset n fbits from the begining of the structure to the next bit of this element to be processed. end_offset is the offset of the first bit past the end of --- 2736,2740 ---- following bit-fields. */ ! /* next_offset is the offset n fbits from the beginning of the structure to the next bit of this element to be processed. end_offset is the offset of the first bit past the end of diff -rc2N gcc-2.0/version.c gcc-2.1/version.c *** gcc-2.0/version.c Thu Feb 20 00:27:45 1992 --- gcc-2.1/version.c Sun Mar 22 16:29:26 1992 *************** *** 1 **** ! char *version_string = "2.0"; --- 1 ---- ! char *version_string = "2.1"; diff -rc2N gcc-2.0/xcoffout.c gcc-2.1/xcoffout.c *** gcc-2.0/xcoffout.c --- gcc-2.1/xcoffout.c Mon Mar 23 14:26:18 1992 *************** *** 0 **** --- 1,444 ---- + /* Output xcoff-format symbol table information from GNU compiler. + 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + + /* Output xcoff-format symbol table data. The main functionality is contained + in dbxout.c. This file implements the sdbout-like parts of the xcoff + interface. Many functions are very similar to their counterparts in + sdbout.c. */ + + /* Include this first, because it may define MIN and MAX. */ + #include + + #include "config.h" + #include "tree.h" + #include "rtl.h" + #include "flags.h" + + #ifdef XCOFF_DEBUGGING_INFO + + /* This defines the C_* storage classes. */ + #include + + #include "xcoffout.h" + + #if defined (USG) || defined (NO_STAB_H) + #include "gstab.h" + #else + #include + + /* This is a GNU extension we need to reference in this file. */ + #ifndef N_CATCH + #define N_CATCH 0x54 + #endif + #endif + + /* These are GNU extensions we need to reference in this file. */ + #ifndef N_DSLINE + #define N_DSLINE 0x46 + #endif + #ifndef N_BSLINE + #define N_BSLINE 0x48 + #endif + + /* Line number of beginning of current function, minus one. + Negative means not in a function or not using xcoff. */ + + int xcoff_begin_function_line = -1; + + /* Name of the current include file. */ + + char *xcoff_current_include_file; + + /* Name of the current function file. This is the file the `.bf' is + emitted from. In case a line is emitted from a different file, + (by including that file of course), then the line number will be + absolute. */ + + char *xcoff_current_function_file; + + /* Names of bss and data sections. These should be unique names for each + compilation unit. */ + + char *xcoff_bss_section_name; + char *xcoff_private_data_section_name; + char *xcoff_read_only_section_name; + + /* Macro definitions used below. */ + /* Ensure we don't output a negative line number. */ + #define MAKE_LINE_SAFE(LINE) \ + if (LINE <= xcoff_begin_function_line) \ + LINE = xcoff_begin_function_line + 1 \ + + #define ASM_OUTPUT_LFB(FILE,LINENUM) \ + { \ + if (xcoff_begin_function_line == -1) \ + { \ + xcoff_begin_function_line = (LINENUM) - 1;\ + fprintf (FILE, "\t.bf\t%d\n", (LINENUM)); \ + } \ + xcoff_current_function_file \ + = (xcoff_current_include_file \ + ? xcoff_current_include_file : main_input_filename); \ + } + + #define ASM_OUTPUT_LFE(FILE,LINENUM) \ + do { \ + int linenum = LINENUM; \ + MAKE_LINE_SAFE (linenum); \ + fprintf (FILE, "\t.ef\t%d\n", ABS_OR_RELATIVE_LINENO (linenum)); \ + xcoff_begin_function_line = -1; \ + } while (0) + + #define ASM_OUTPUT_LBB(FILE,LINENUM,BLOCKNUM) \ + do { \ + int linenum = LINENUM; \ + MAKE_LINE_SAFE (linenum); \ + fprintf (FILE, "\t.bb\t%d\n", ABS_OR_RELATIVE_LINENO (linenum)); \ + } while (0) + + #define ASM_OUTPUT_LBE(FILE,LINENUM,BLOCKNUM) \ + do { \ + int linenum = LINENUM; \ + MAKE_LINE_SAFE (linenum); \ + fprintf (FILE, "\t.eb\t%d\n", ABS_OR_RELATIVE_LINENO (linenum)); \ + } while (0) + + /* Support routines for XCOFF debugging info. */ + + /* Assign NUMBER as the stabx type number for the type described by NAME. + Search all decls in the list SYMS to find the type NAME. */ + + static void + assign_type_number (syms, name, number) + tree syms; + char *name; + int number; + { + tree decl; + + for (decl = syms; decl; decl = TREE_CHAIN (decl)) + if (!strcmp (IDENTIFIER_POINTER (DECL_NAME (decl)), name)) + { + TREE_ASM_WRITTEN (decl) = 1; + TYPE_SYMTAB_ADDRESS (TREE_TYPE (decl)) = number; + } + } + + /* Setup gcc primitive types to use the XCOFF built-in type numbers where + possible. */ + + void + xcoff_output_standard_types (syms) + tree syms; + { + /* Handle built-in C types here. */ + + assign_type_number (syms, "int", -1); + assign_type_number (syms, "char", -2); + assign_type_number (syms, "short int", -3); + assign_type_number (syms, "long int", -4); + assign_type_number (syms, "unsigned char", -5); + assign_type_number (syms, "signed char", -6); + assign_type_number (syms, "short unsigned int", -7); + assign_type_number (syms, "unsigned int", -8); + /* No such type "unsigned". */ + assign_type_number (syms, "long unsigned int", -10); + assign_type_number (syms, "void", -11); + assign_type_number (syms, "float", -12); + assign_type_number (syms, "double", -13); + assign_type_number (syms, "long double", -14); + /* Pascal and Fortran types run from -15 to -29. */ + /* No such type "wchar". */ + + /* "long long int", and "long long unsigned int", are not handled here, + because there are no predefined types that match them. */ + + /* ??? Should also handle built-in C++ and Obj-C types. There perhaps + aren't any that C doesn't already have. */ + } + + /* Print an error message for unrecognized stab codes. */ + + #define UNKNOWN_STAB(STR) \ + do { \ + fprintf(stderr, "Error, unknown stab %s: : 0x%x\n", STR, stab); \ + fflush (stderr); \ + } while (0) + + /* Conversion routine from BSD stabs to AIX storage classes. */ + + int + stab_to_sclass (stab) + int stab; + { + switch (stab) + { + case N_GSYM: + return C_GSYM; + + case N_FNAME: + UNKNOWN_STAB ("N_FNAME"); + abort(); + + case N_FUN: + return C_FUN; + + case N_STSYM: + case N_LCSYM: + return C_STSYM; + + case N_MAIN: + UNKNOWN_STAB ("N_MAIN"); + abort (); + + case N_RSYM: + return C_RSYM; + + case N_SSYM: + UNKNOWN_STAB ("N_SSYM"); + abort (); + + case N_RPSYM: + return C_RPSYM; + + case N_PSYM: + return C_PSYM; + case N_LSYM: + return C_LSYM; + case N_DECL: + return C_DECL; + case N_ENTRY: + return C_ENTRY; + + case N_SO: + UNKNOWN_STAB ("N_SO"); + abort (); + + case N_SOL: + UNKNOWN_STAB ("N_SOL"); + abort (); + + case N_SLINE: + UNKNOWN_STAB ("N_SLINE"); + abort (); + + case N_DSLINE: + UNKNOWN_STAB ("N_DSLINE"); + abort (); + + case N_BSLINE: + UNKNOWN_STAB ("N_BSLINE"); + abort (); + #if 0 + /* This has the same value as N_BSLINE. */ + case N_BROWS: + UNKNOWN_STAB ("N_BROWS"); + abort (); + #endif + + case N_BINCL: + UNKNOWN_STAB ("N_BINCL"); + abort (); + + case N_EINCL: + UNKNOWN_STAB ("N_EINCL"); + abort (); + + case N_EXCL: + UNKNOWN_STAB ("N_EXCL"); + abort (); + + case N_LBRAC: + UNKNOWN_STAB ("N_LBRAC"); + abort (); + + case N_RBRAC: + UNKNOWN_STAB ("N_RBRAC"); + abort (); + + case N_BCOMM: + return C_BCOMM; + case N_ECOMM: + return C_ECOMM; + case N_ECOML: + return C_ECOML; + + case N_LENG: + UNKNOWN_STAB ("N_LENG"); + abort (); + + case N_PC: + UNKNOWN_STAB ("N_PC"); + abort (); + + case N_M2C: + UNKNOWN_STAB ("N_M2C"); + abort (); + + case N_SCOPE: + UNKNOWN_STAB ("N_SCOPE"); + abort (); + + case N_CATCH: + UNKNOWN_STAB ("N_CATCH"); + abort (); + + default: + UNKNOWN_STAB ("default"); + abort (); + } + } + + /* In XCOFF, we have to have this .bf before the function prologue. + Rely on the value of `dbx_begin_function_line' not to duplicate .bf. */ + + void + xcoffout_output_first_source_line (file, last_linenum) + FILE *file; + int last_linenum; + { + ASM_OUTPUT_LFB (file, last_linenum); + dbxout_parms (DECL_ARGUMENTS (current_function_decl)); + ASM_OUTPUT_SOURCE_LINE (file, last_linenum); + } + + /* Output the symbols defined in block number DO_BLOCK. + Set NEXT_BLOCK_NUMBER to 0 before calling. + + This function works by walking the tree structure of blocks, + counting blocks until it finds the desired block. */ + + static int do_block = 0; + + static int next_block_number; + + static void + xcoffout_block (block, depth, args) + register tree block; + int depth; + tree args; + { + while (block) + { + /* Ignore blocks never expanded or otherwise marked as real. */ + if (TREE_USED (block)) + { + /* When we reach the specified block, output its symbols. */ + if (next_block_number == do_block) + { + /* Output the syms of the block. */ + if (debug_info_level != DINFO_LEVEL_TERSE || depth == 0) + dbxout_syms (BLOCK_VARS (block)); + if (args) + dbxout_reg_parms (args); + + /* We are now done with the block. Don't go to inner blocks. */ + return; + } + /* If we are past the specified block, stop the scan. */ + else if (next_block_number >= do_block) + return; + + next_block_number++; + + /* Output the subblocks. */ + xcoffout_block (BLOCK_SUBBLOCKS (block), depth + 1, 0); + } + block = BLOCK_CHAIN (block); + } + } + + /* Describe the beginning of an internal block within a function. + Also output descriptions of variables defined in this block. + + N is the number of the block, by order of beginning, counting from 1, + and not counting the outermost (function top-level) block. + The blocks match the BLOCKs in DECL_INITIAL (current_function_decl), + if the count starts at 0 for the outermost one. */ + + void + xcoffout_begin_block (file, line, n) + FILE *file; + int line; + int n; + { + tree decl = current_function_decl; + + ASM_OUTPUT_LBB (file, line, n); + + do_block = n; + next_block_number = 0; + xcoffout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl)); + } + + /* Describe the end line-number of an internal block within a function. */ + + void + xcoffout_end_block (file, line, n) + FILE *file; + int line; + int n; + { + ASM_OUTPUT_LBE (file, line, n); + } + + /* Called at beginning of function body (after prologue). + Record the function's starting line number, so we can output + relative line numbers for the other lines. + Record the file name that this function is contained in. */ + + void + xcoffout_begin_function (file, last_linenum) + FILE *file; + int last_linenum; + { + ASM_OUTPUT_LFB (file, last_linenum); + } + + /* Called at end of function (before epilogue). + Describe end of outermost block. */ + + void + xcoffout_end_function (file, last_linenum) + FILE *file; + int last_linenum; + { + ASM_OUTPUT_LFE (file, last_linenum); + } + + /* Output xcoff info for the absolute end of a function. + Called after the epilogue is output. */ + + void + xcoffout_end_epilogue (file) + FILE *file; + { + /* We need to pass the correct function size to .function, otherwise, + the xas assembler can't figure out the correct size for the function + aux entry. So, we emit a label after the last instruction which can + be used by the .function psuedo op to calculate the function size. */ + + char *fname = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); + if (*fname == '*') + ++fname; + fprintf (file, "L..end_"); + ASM_OUTPUT_LABEL (file, fname); + } + #endif /* XCOFF_DEBUGGING_INFO */ diff -rc2N gcc-2.0/xcoffout.h gcc-2.1/xcoffout.h *** gcc-2.0/xcoffout.h --- gcc-2.1/xcoffout.h Thu Mar 12 07:18:14 1992 *************** *** 0 **** --- 1,172 ---- + /* XCOFF definitions. These are needed in dbxout.c, final.c, + and xcoffout.h. */ + + #define ASM_STABS_OP ".stabx" + + /* Tags and typedefs are C_DECL in XCOFF, not C_LSYM. */ + + #define DBX_DECL_STABS_CODE N_DECL + + /* Use the XCOFF predefined type numbers. */ + + /* ??? According to metin, typedef stabx must go in text control section, + but he did not make this changes everywhere where such typedef stabx + can be emitted, so it is really needed or not? */ + + #define DBX_OUTPUT_STANDARD_TYPES(SYMS) \ + { \ + text_section (); \ + xcoff_output_standard_types (SYMS); \ + } + + /* Any type with a negative type index has already been output. */ + + #define DBX_TYPE_DEFINED(TYPE) (TYPE_SYMTAB_ADDRESS (TYPE) < 0) + + /* Must use N_STSYM for static const variables (those in the text section) + instead of N_FUN. */ + + #define DBX_STATIC_CONST_VAR_CODE N_STSYM + + /* For static variables, output code to define the start of a static block. */ + + #define DBX_STATIC_BLOCK_START(ASMFILE,CODE) \ + { \ + if ((CODE) == N_STSYM) \ + fprintf ((ASMFILE), "\t.bs\t%s[RW]\n", xcoff_private_data_section_name);\ + else if ((CODE) == N_LCSYM) \ + fprintf ((ASMFILE), "\t.bs\t%s\n", xcoff_bss_section_name); \ + } + + /* For static variables, output code to define the end of a static block. */ + + #define DBX_STATIC_BLOCK_END(ASMFILE,CODE) \ + { \ + if (current_sym_code == N_STSYM || current_sym_code == N_LCSYM) \ + fprintf (asmfile, "\t.es\n"); \ + } + + /* We must use N_RPYSM instead of N_RSYM for register parameters. */ + + #define DBX_REGPARM_STABS_CODE N_RPSYM + + /* We must use 'R' instead of 'P' for register parameters. */ + + #define DBX_REGPARM_STABS_LETTER 'R' + + /* Define our own finish symbol function, since xcoff stabs have their + own different format. */ + + #define DBX_FINISH_SYMBOL(SYM) \ + { \ + if (current_sym_addr && current_sym_code == N_FUN) \ + fprintf (asmfile, "\",."); \ + else \ + fprintf (asmfile, "\","); \ + /* If we are writing a function name, we must ensure that \ + there is no storage-class suffix on the name. */ \ + if (current_sym_addr && current_sym_code == N_FUN \ + && GET_CODE (current_sym_addr) == SYMBOL_REF) \ + { \ + char *_p; \ + for (_p = XSTR (current_sym_addr, 0); *_p != '[' && *_p; _p++) \ + fprintf (asmfile, "%c", *_p); \ + } \ + else if (current_sym_addr) \ + output_addr_const (asmfile, current_sym_addr); \ + else if (current_sym_code == N_GSYM) \ + fprintf (asmfile, "%s", IDENTIFIER_POINTER (DECL_NAME (SYM))); \ + else \ + fprintf (asmfile, "%d", current_sym_value); \ + fprintf (asmfile, ",%d,0\n", stab_to_sclass (current_sym_code)); \ + } + + /* These are IBM XCOFF extensions we need to reference in dbxout.c + and xcoffout.c. */ + + /* AIX XCOFF uses this for typedefs. This can have any value, since it is + only used for translation into a C_DECL storage class. */ + #ifndef N_DECL + #define N_DECL 0x8c + #endif + /* AIX XCOFF uses this for parameters passed in registers. This can have + any value, since it is only used for translation into a C_RPSYM storage + class. */ + #ifndef N_RPSYM + #define N_RPSYM 0x8e + #endif + + /* The line number of the beginning of the current function. + xcoffout.c needs this so that it can output relative linenumbers. */ + + extern int xcoff_begin_function_line; + + /* Name of the current include file. */ + + extern char *xcoff_current_include_file; + + /* Name of the current function file. This is the file the `.bf' is + emitted from. In case a line is emitted from a different file, + (by including that file of course), then the line number will be + absolute. */ + + extern char *xcoff_current_function_file; + + /* Names of bss and data sections. These should be unique names for each + compilation unit. */ + + extern char *xcoff_bss_section_name; + extern char *xcoff_private_data_section_name; + extern char *xcoff_read_only_section_name; + + /* Don't write out path name for main source file. */ + #define DBX_OUTPUT_MAIN_SOURCE_DIRECTORY(FILE,FILENAME) + + /* Write out main source file name using ".file" rather than ".stabs". */ + #define DBX_OUTPUT_MAIN_SOURCE_FILENAME(FILE,FILENAME) \ + fprintf (FILE, "\t.file\t\"%s\"\n", FILENAME); + + #define ABS_OR_RELATIVE_LINENO(LINENO) \ + ((xcoff_current_include_file \ + && xcoff_current_include_file != xcoff_current_function_file) \ + ? (LINENO) : (LINENO) - xcoff_begin_function_line) + + /* Output source line numbers via ".line" rather than ".stabd". */ + #define ASM_OUTPUT_SOURCE_LINE(FILE,LINENUM) \ + do { \ + if (xcoff_begin_function_line >= 0) \ + fprintf (FILE, "\t.line\t%d\n", ABS_OR_RELATIVE_LINENO (LINENUM)); \ + } while (0) + + /* We don't want to emit source file names in dbx style. */ + #define DBX_OUTPUT_SOURCE_FILENAME(FILE, FILENAME) \ + { \ + if (xcoff_current_include_file) \ + fprintf (FILE, "\t.ei\t\"%s\"\n", xcoff_current_include_file);\ + if (strcmp (main_input_filename, FILENAME)) \ + { \ + fprintf (FILE, "\t.bi\t\"%s\"\n", FILENAME); \ + xcoff_current_include_file = FILENAME; \ + } \ + else \ + xcoff_current_include_file = NULL; \ + } + + /* If we are still in an include file, its end must be marked. */ + #define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ + { \ + if (xcoff_current_include_file) \ + { \ + fprintf ((FILE), "\t.ei\t\"%s\"\n", \ + xcoff_current_include_file); \ + xcoff_current_include_file = NULL; \ + } \ + } + + /* Do not break .stabs pseudos into continuations. */ + #define DBX_CONTIN_LENGTH 0 + + /* Don't try to use the `x' type-cross-reference character in DBX data. + Also has the consequence of putting each struct, union or enum + into a separate .stabs, containing only cross-refs to the others. */ + #define DBX_NO_XREFS