Changes for GNU CC version 2.3.3, from version 2.3.2. diff -rc2N gcc-2.3.2/ChangeLog gcc-2.3.3/ChangeLog *** gcc-2.3.2/ChangeLog Sat Nov 28 01:21:00 1992 --- gcc-2.3.3/ChangeLog Sat Dec 26 05:12:21 1992 *************** *** 1,2 **** --- 1,465 ---- + Sat Dec 26 05:12:05 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Version 2.3.3 released. + + Fri Dec 25 06:53:49 1992 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * expmed.c (store_bit_field): If VALUE needs to be narrowed, do + it with gen_lowpart, not an explicit SUBREG. + + * a29k.md (divsf3): Fix typo in mode of DIV. + + Fri Dec 25 00:03:26 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * Makefile.in (install-dir): Add missing semicolon. + + * i386sco4.h (_KR, _SVID, _NO_PROTOTYPE): Define if -traditional. + + Thu Dec 24 15:02:29 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * fixinc.svr4: Don't change bitfield types to int. + + * seq386.h (TARGET_DEFAULT): Override. + + Wed Dec 23 20:19:17 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * i386sco4.h (CPP_SPEC): Avoid repeated def of _M_SYSV. + + Tue Dec 22 15:40:08 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-decl.c (store_parm_decls): Use TYPE_MAIN_VARIANT to compare types + when merging info from previous prototype. + + * fixinc.svr4: Add special fixes for netinet/in.h and sys/endian.h. + + Mon Dec 21 02:58:27 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * m68kv4.h (ASM_OUTPUT_CASE_END): + Use switch_table_difference_label_flag. + + * configure (m68k-motorola-sysv*): Set use_collect2. + + Sat Dec 19 20:19:44 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * a29k.c (secondary_reload_class): Return CR_REGS for larger than + word memory, and BP_REGS for part-word mem with no DW. + + * a29k.md: Consistently use `&' in constraint of MATCH_SCRATCH. + Always use a reg as 4th arg of dmac/fmac even if ignored by insn. + Uses of `b' as a constraint in multi-word reload patterns should + be `c'. + + Sat Dec 19 01:32:13 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * Makefile.in (all.cross): Add `specs' as dep. + + * build-make (CC): Delete the -V option. + + * getpwd.c (getpwd): Don't get upset if ERANGE is not defined. + + Fri Dec 18 20:56:59 1992 John Hassey (hassey@dg-rtp.dg.com) + + * objc-actions.c (build_encode_expr): + Terminate the encode string with a null. + (encode_aggregate): Distinguish pointer to record from a + record. Output fields for record. Fix unions. + + Fri Dec 18 17:17:39 1992 Michael Meissner (meissner@osf.org) + + * mips.h (MIPS_VERSION): Set Meissner version # to 33. + (struct mips_args): Add support for passing QI/HI mode structures + the way the MIPS compiler passes them. + (SIZE_TYPE, PTRDIFF_TYPE): Define as unsigned int, and int if not + defined already. + + * mips.c (init_cumulative_args): Use a static structure to + initialize the CUMULATIVE_ARGS structure. + (function_arg_advance): Add a newline at the end of debug output. + (function_arg): If a structure is passed as a QImode or HImode + value in a register, record the fact for the call define_expands + and prologue expander to move the structure into the high part of + the register, and back again. If debugging, print if the argument + is a structure. + (mips_expand_prologue): Shift any QI/HI structures passed back, so + they can be used as normal QI/HI values. + + * mips.md (call): If there were any tiny structures passes as + QI/HI modes in registers, shift the register, so that the + structure value is in the high part of the register. + (call_value): Ditto. + (call_internal): Delete creating $31 rtx, since we can get it from + the normal insn patterns. + (call_value_internal): Ditto. + + Fri Dec 18 05:14:14 1992 Brendan Kehoe (brendan@lisa.cygnus.com) + + Make abstract virtual functions work. + * cp-call.c (compute_conversion_costs): Undo change of Sept 1 about + setting HARSHNESS to 0 re: the conversion of the first argument. + (build_method_call): Delete the code that redid the RTL for calling + the right fn, since we will now behave correctly. (Even with this, + we ended up calling the wrong fn---the base class, rather than the + derived one.) + + * cp-decl2.c (grokclassfn): Try using the local value for a nested + type if the IDENTIFIER_TYPE_VALUE isn't there. + + * cp-method.c (build_overload_nested_name): Use DECL_NAME instead of + DECL_ASSEMBLER_NAME, since pushtag now mangles together + DECL_ASSEMBLER_NAME. This will make us emit `Q21D1B', not `Q221D1B'. + + Thu Dec 17 17:51:16 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makefile.in (install-dir): Added missing then and semicolon. + + Thu Dec 17 15:19:36 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * x-i386s4 (CC): New assignment. + + Wed Dec 16 15:49:11 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * objc-actions.c (finish_objc) [OBJC_SELECTORS_WITHOUT_LABELS]: + Always call build_selector_translation_table. + + * Makefile.in (install-dir): + If cross-compiler, create $(tooldir) and $(assertdir). + + Wed Dec 16 14:19:08 1992 Richard Kenner (kenner at vlsi1.ultra.nyu) + + * rs6000.h (INITIALIZE_TRAMPOLINE): Get function address and toc + pointer from correct place relative to FNADDR. + + * varasm.c (assemble_trampoline_template): If TRAMPOLINE_SECTION + is defined, put the trampoline template into that section. + + * alpha.h (TRAMPOLINE_SECTION): New macro. + + Wed Dec 16 14:19:41 1992 Jim Wilson (wilson@wookumz.gnu.ai.mit.edu) + + * reload.c (get_secondary_mem): Don't save address if it isn't valid. + + Wed Dec 16 13:59:17 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * varasm.c (assemble_trampoline_template): + Use readonly_data_section, not text_section. + + Wed Dec 16 11:32:11 1992 Michael Meissner (meissner@osf.org) + + * mips.h (MIPS_VERSION): Set Meissner version # to 32. + (compute_frame_size): Change function return type to long. + (epilogue_reg_mentioned_p): New function decl. + (mips_frame_info): Change unsigned longs to longs. + (ELIGIBLE_FOR_EPILOGUE_DELAY): Call epilogue_reg_mentioned_p. + + * mips.c (epilogue_reg_mentioned_p): New function to return true + if any register used in the epilogue sequence is referenced. If + the stack size is greater than 32k bytes, return true for + registers $8 and $9, since they are used to hold temps. + (compute_frame_size): Change return type & variables to long. + (compute_frame_size): Use 1L in shifts to create GP save mask. + (save_restore): Merge function into save_restore_insns. + (save_restore_insns): Add FILE * argument, to write to the .s + file if non-NULL -- otherwise produce insns. Add arguments to + pass in that the prologue/epilogue has loaded the stack size into + $8 if large stack frame. Completely rewrite large stack frame + support, so that it doesn't abort if large stack frame, saved GP + registers, and no saved FP registers. If large stack frame, use + stack size stored in $8 if we can. + (function_prologue): Make tsize long. + (function_epilogue): Ditto. + (mips_expand_prologue): Ditto. + (mips_expand_epilogue): Ditto. + (mips_expand_prologue): Change call to save_restore_insns. + (mips_expand_epilogue): Ditto. + (function_epilogue): Call save_restore_insns instead of + save_restore. + + Wed Dec 16 07:33:08 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stmt.c (expand_goto): Set LABEL_REF_NONLOCAL_P in the LABEL_REF + we make in the non-local case. + + * varasm.c (assemble_trampoline_template): Always put template in + text section. + + Wed Dec 16 05:04:06 1992 Tom Wood (wood@dg-rtp.dg.com) + + * combine.c (try_combine): Allow for the case where I3 becomes an + unconditional jump when it is the last nonnote insn. + + Tue Dec 15 20:30:06 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * cccp.c (do_pragma): Use index, not strchr. + + * seq386.h (FUNCTION_PROFILER): Add missing . to label name. + + * reload1.c (eliminate_regs_in_insn): Test old_body, not new_body, + since people have tested it that way. + + * reload1.c (eliminate_regs_in_insn): Don't recopy new_body + if it is an asm_operands insn. + + Tue Dec 15 19:42:58 1992 Jim Wilson (wilson@wookumz.gnu.ai.mit.edu) + + * sparc.md (return peepholes): Add QImode and HImode move/return + patterns. + + Tue Dec 15 17:42:07 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.h (ASM_SPEC): New macro. + + * alpha.h (TRAMPOLINE_{TEMPLATE,SIZE}, INITIALIZE_TRAMPOLINE): + Make major changes to fix numerous bugs. + (TRANSFER_FROM_TRAMPOLINE): New macro. + * alpha.md: Add new UNSPEC_VOLATILE 0 to flush instruction cache. + + Mon Dec 14 13:16:14 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * rs6000.c (output_epilog): Support LANGUAGE_STRING values for F77, + Ada, and Pascal. + + Sun Dec 13 16:42:26 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * fixinc.sco: Complete rewrite by ian@cygnus.com. + + Sat Dec 12 17:51:43 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * va-alpha.h: Correctly form multi-word object. + + * alpha.c (alpha_builtin_savregs): Correctly compute ARGSIZE and NREGS. + + * alpha.h (FUNCTION_ARG_PASS_BY_REFERENCE): Deleted. + + Sat Dec 12 08:42:43 1992 Jeffrey A. Law (law@schirf.cs.utah.edu) + + * pa-hpux.h (TARGET_DEFAULT): Do not enable TARGET_SHARED_LIBS + by default in 2.3.3 since it doesn't really work. + * pa-ghpux.h, pa1-hpux.h, pa1-ghpux.h: Likewise. + + * pa.md (floatsisf, floatsidf): Do not accept general registers. + + Fri Dec 11 00:13:52 1992 Ian Lance Taylor (ian@cygnus.com) + + * configure (i[34]86-*-sco3.2v4*): Use fixinc.sco. + * fixinc.sco: New file. + Like fixinc.svr4 but turn !__STDC__ into !__STRICT_ANSI__. Don't + require space after getcwd argument in stdlib.h. + * x-i386s4: Don't use rcc: + (CC, OLDCC, RCCFLAGS, CCLIBFLAGS): Vars deleted. + * xm-i386sco.h (ONLY_INT_FIELDS): Define if not __GNUC__. + (CODE_FIELD_BUG): Likewise. + * rtl.h (struct rtx_def) [ONLY_INT_FIELDS]: Handle CODE_FIELD_BUG. + + Fri Dec 11 17:56:53 1992 Brendan Kehoe (brendan@mole.gnu.ai.mit.edu) + + * cp-search.c (lookup_nested_field): Check for assignment to members + of an enclosing class only when looking at a member, not at other + things (like nested types). + + * cp-cvt.c (convert_to_reference): If a conversion can be found via + a constructor, then use it. Also fix a typo about when to + return the result of a type conversion. + + Fri Dec 11 08:15:53 1992 James Van Artsdalen (james@bigtex.cactus.org) + + * reload1.c (choose_reload_regs): Don't inherit a reload if the + previous reload wasn't at least as wide as the current reload. + + Fri Dec 11 07:19:11 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.c (output_epilog): Remove garbage from one decl of EXTRA. + Subtract, not add, size from frame pointer. + + * a29kunix.h (LINK_SPEC): Use -T, not -c, for new gld and change file + name to default.gld from default.ld. + + * function.c (assign_outer_stack_local): Align proper frame offset. + + * loop.c (get_condition): Check for overflow when canonicalizing + comparison. + + Thu Dec 10 15:53:41 1992 Jim Wilson (wilson@wookumz.gnu.ai.mit.edu) + + * enquire.c (i_define, u_define, f_define): Add #undef before #define. + * fixinc.svr4 (limits.h): Add #ifndef/#endif around macros that + are supposed to be defined in float.h. + + * combine.c (try_combine): Only use I2DEST as a scratch reg for + a split if it does not overlap any inputs of NEWPAT. + + Thu Dec 10 10:23:28 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * combine.c (get_last_value): Never use value from later insn, even + if reg is only set once. + + * c-tree.h (IDENTIFIER_LIMBO_VALUE): Delete duplicate definition. + + Thu Dec 10 08:54:03 1992 Tom Wood (wood@dg-rtp.dg.com) + + * i386sco4.h (CPP_PREDEFINES): Define i386 and unix here. + (CPP_SPEC): Not here. + + Wed Dec 9 19:03:55 1992 Jeffrey A. Law (law@schirf.cs.utah.edu) + + * pa.h (ASM_DECLARE_FUNCTION_NAME): Correctly get the return type + of DECL. + + * x-pa (CC): Set to "/usr/local/bin/gcc" instead of + "/usr/local/gcc". + + Tue Dec 8 17:50:26 1992 Michael Meissner (meissner@osf.org) + + * mips.h (MIPS_VERSION): Bump Meissner version number to 31. + (LEGITIMIZE_ADDDRESS): Split large offsets, even when not + optimizing. Otherwise, illegal stack offsets can be generated. + + Tue Dec 8 11:55:52 1992 Jeffrey A. Law (law@schirf.cs.utah.edu) + + * pa.md (sh[123]add): Use "shadd_operand" as the predicate for + operand one. + * pa.c (shadd_operand): New function. + + Tue Dec 8 08:30:13 1992 Tom Wood (wood@dg-rtp.dg.com) + + * hp320.h (AS_BUG_FLOATING_CONSTANT, AS_BUG_TRAILING_LABEL): New. + (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Output align 1 to + accomodate the "trailing label" bug. + (ASM_OUTPUT_DOUBLE_OPERAND, ASM_OUTPUT_FLOAT_OPERAND): Define to + output values in hex to accomodate the "floating constant" bug. + (PRINT_OPERAND_FLOAT, PRINT_OPERAND): Ditto. + + * gcc.c (temp_names): New variable. + (do_spec_1): Rewrite MKTEMP_EACH_FILE for %g/%u/%U. + (choose_temp_base): Abort if mktemp yields a null string. + + Tue Dec 8 08:30:13 1992 Niklas Hallqvist (niklas@della.appli.se) + + * integrate.c (expand_inline_function): Don't output line notes + for implicit formals. + + Tue Dec 8 06:21:44 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (max_uid): New variable. + (cse_end_of_basic_block): Use it to ignore insns made by CSE. + (cse_main): Set it. + + Mon Dec 7 21:22:29 1992 Brendan Kehoe (brendan@mole.gnu.ai.mit.edu) + + * cp-init.c (do_friend): Revert change of Sept 1; it seems to have + broken properly emitting friends. + + Mon Dec 7 19:09:25 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload1.c (eliminate_regs_in_insn): Make another copy of all the + RTL if we changed something and we aren't permanently replacing. + + * romp.md (reload_out{q,h}i): Write as proper PARALLEL. + + Sun Dec 6 16:27:14 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.md (add-mult): Add missing `&' in constraints of kludge + plus/plus/mult pattern. + + Sun Dec 6 16:26:42 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * optabs.c (expand_binop): Correct sign of complex quotient imagpart. + + Sun Dec 6 07:59:16 1992 Michael Meissner (meissner@osf.org) + + * mips.h (MIPS_VERSION): Set Meissner version # to 30. + (LEGITIMIZE_ADDRESS): For + addresses, rewrite so + that + ( & ~0x7fff) is put into a pseudo reg. + This is to allow CSE to generate better code for repeated + references in the same general vicinity, such as when large stack + frames are used. + + * config/dec-osf1.h (LINK_SPEC): Pass -call_shared, -no_archive, + and -exact_version to the linker. If -call_shared, do not pass + -non_shared to the linker. + * mips-5.h (LINK_SPEC): Ditto. + * mips-5bsd.h (LINK_SPEC): Ditto. + * mips-svr4.h (LINK_SPEC): Ditto. + * mips-sysv.h (LINK_SPEC): Ditto. + + Fri Dec 4 19:50:29 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * fixincludes: fix _cplusplus typo in SCO's tinfo.h + + Fri Dec 4 19:22:35 1992 Randy S. Welch (randy@kcin.alphacdc.com) + + * xm-plexus.h: New file. + * configure (m68k-plexus-sysv*): Use it. + + Fri Dec 4 19:21:44 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * c-decl.c (start_function): Use TYPE_MAIN_VARIANT when comparing + return type with previous prototype declaration. + + * cccp.c (output_line_command): Use alloca for line_cmd_buf. + + Fri Dec 4 19:20:34 1992 Richard Kenner (kenner@mole.gnu.ai.mit.edu) + + * cse.c (cse_insn): Always pass result of canon_reg through + validate_change before using it in insn. + + * c-decl.c, cp-decl.c (init_decl_processing): Don't use hardwired + sizes for the modes when making int{Q,H,S,D}I_type_mode and the + unsigned versions of them; the actual size depends on BITS_PER_UNIT. + + Fri Dec 4 19:13:35 1992 Jonas Olsson (ljo@po.cwru.edu) + + * i386bsd.h (ASM_OUTPUT_ADDR_DIFF_ELT, JUMP_TABLES_IN_TEXT_SECTION): + Copy definitions from i386v4.h to get PIC code correct. + + Thu Dec 3 19:20:14 1992 Brendan Kehoe (brendan@lisa.cygnus.com) + + * cp-decl.c: Include sys/types.h for systems that need things for + signal.h. + + Thu Dec 3 01:40:42 1992 Jim Wilson (wilson@wookumz.gnu.ai.mit.edu) + + * sparc.c (finalize_pic): Remove "*_" from GLOBAL_OFFSET_TABLE name. + * spc-sol2.h (ASM_SPEC): Pass "-K PIC" to assembler when pic. + (JUMP_TABLES_IN_TEXT_SECTION): Define. + (SELECT_RTX_SECTION): Define. + + * fixincludes (sys/types.h): Check for [ \t]size_t not size_t. + + Wed Dec 2 15:40:36 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * configure (rs6000-ibm-aix32): New target. + * rs6000-aix32.h: New file. + + Tue Dec 1 18:05:20 1992 Brendan Kehoe (brendan@lisa.cygnus.com) + + * cp-type2.c (build_functional_cast): Revert change of Nov 2, + concerning clearing the TREE_VALUE of a default parameter. + + Tue Dec 1 13:33:25 1992 Jim Wilson (wilson@wookumz.gnu.ai.mit.edu) + + * local-alloc.c (optimize_reg_copy_2): Correct reg_n_refs updates. + + * Makefile.in (INSTALLED_H): Add syslimits.h. + + Tue Dec 1 11:09:50 1992 Brendan Kehoe (brendan@lisa.cygnus.com) + + * cp-call.c (build_method_call): When looking for a default arg + initialized by a ctor, be careful of a null ref w/ operand 1. + + Tue Dec 1 10:43:13 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * combine.c (num_sign_bit_copies): Return 1 on failure, not 0. + Fix typo in last change; return 1 on failure, not BITWIDTH. + + Tue Dec 1 09:39:47 1992 Michael Meissner (meissner@osf.org) + + * mips.c (function_prologue): Do not emit a .loc before the + function if debug level is 1. This confuses gdb. + + Tue Dec 1 02:48:29 1992 James Van Artsdalen (james at bigtex.cactus.org) + + * isc.h (TARGET_DEFAULT): New macro - don't make TARGET_IEEE_FP + default for ISC. + Fri Nov 27 01:30:41 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) *************** *** 690,694 **** decl's non-zero. ! ue Oct 27 09:31:08 1992 Mike Stump (mrs@cygnus.com) * cp-lex.c (do_identifier): Add missing fourth argument to --- 1153,1157 ---- decl's non-zero. ! Tue Oct 27 09:31:08 1992 Mike Stump (mrs@cygnus.com) * cp-lex.c (do_identifier): Add missing fourth argument to diff -rc2N gcc-2.3.2/Makefile.in gcc-2.3.3/Makefile.in *** gcc-2.3.2/Makefile.in Wed Nov 25 23:43:52 1992 --- gcc-2.3.3/Makefile.in Fri Dec 25 02:07:58 1992 *************** *** 406,410 **** # All the header files that are installed for users from GCC itself. ! INSTALLED_H = float.h stddef.h stdarg.h varargs.h $(USER_H) limits.h # The files that "belong" in CONFIG_H are deliberately omitted --- 406,411 ---- # All the header files that are installed for users from GCC itself. ! INSTALLED_H = float.h stddef.h stdarg.h varargs.h $(USER_H) limits.h \ ! syslimits.h # The files that "belong" in CONFIG_H are deliberately omitted *************** *** 429,433 **** all.internal: start.encap rest.encap # This is what to compile if making a cross-compiler. ! all.cross: native gcc-cross libgcc.a cross-test $(EXTRA_PARTS) # This is what to compile if making gcc with a cross-compiler. all.build: native xgcc $(EXTRA_PARTS) --- 430,434 ---- all.internal: start.encap rest.encap # This is what to compile if making a cross-compiler. ! all.cross: native gcc-cross specs libgcc.a cross-test $(EXTRA_PARTS) # This is what to compile if making gcc with a cross-compiler. all.build: native xgcc $(EXTRA_PARTS) *************** *** 1442,1445 **** --- 1443,1453 ---- -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi + -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi + -if [ -f gcc-cross ] ; \ + then \ + if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi ; \ + if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; fi ; \ + else true; \ + fi # We don't use mkdir -p to create the parents of mandir, # because some systems don't support it. *************** *** 1467,1472 **** done # Don't mess with specs if it doesn't exist yet. - # We can't make it a dependency because with a cross compiler - # you have to make specs on the target machine or not at all. -if [ -f specs ] ; then \ rm -f $(libsubdir)/specs; \ --- 1475,1478 ---- diff -rc2N gcc-2.3.2/README gcc-2.3.3/README *** gcc-2.3.2/README Fri Nov 27 23:53:38 1992 --- gcc-2.3.3/README Sat Dec 26 04:54:09 1992 *************** *** 1,3 **** ! This directory contains the version 2.3.2 release of the GNU C compiler. It includes all of the support for compiling C++ and Objective C, including a run-time library for Objective C. --- 1,3 ---- ! This directory contains the version 2.3.3 release of the GNU C compiler. It includes all of the support for compiling C++ and Objective C, including a run-time library for Objective C. diff -rc2N gcc-2.3.2/SERVICE gcc-2.3.3/SERVICE *** gcc-2.3.2/SERVICE Fri Nov 27 23:53:56 1992 --- gcc-2.3.3/SERVICE Sat Dec 26 04:54:28 1992 *************** *** 318,321 **** --- 318,339 ---- Entered: 2/14/92  + Free Software Association of Germany + Michaela Merz + Heimatring 19 + 6000 Frankfurt/Main 70 + phone: (+49 69) 6312083 + modems: (+49 69) 6312934 | 6311235 | 634588 + email: + + We distribute, install and/or port, teach, support free software and + offer regular consulting. We accept software development contracts for + any (unix) software as long as you will release it into free software. + + Rates are DM 200,-- plus VAT per hour. 25 % will be donated to the + Free Software Foundation. For worthy organizations, we may + offer our services for free. Please ask. + + Entered: 12/24/92 +  Andy Gaynor -- [Ag] 597 Hoes Lane, Piscataway, NJ 08854 diff -rc2N gcc-2.3.2/alloca.c gcc-2.3.3/alloca.c *** gcc-2.3.2/alloca.c Fri Nov 27 23:53:57 1992 --- gcc-2.3.3/alloca.c Sat Dec 26 04:54:29 1992 *************** *** 31,36 **** #endif ! #ifdef emacs #include "config.h" #ifdef static /* actually, only want this if static is defined as "" --- 31,39 ---- #endif ! #ifdef HAVE_CONFIG_H #include "config.h" + #endif + + #ifdef emacs #ifdef static /* actually, only want this if static is defined as "" diff -rc2N gcc-2.3.2/build-make gcc-2.3.3/build-make *** gcc-2.3.2/build-make Wed Oct 21 18:13:14 1992 --- gcc-2.3.3/build-make Sat Dec 19 17:51:53 1992 *************** *** 1,4 **** # We have to use the cross-compiler we just built to compile it. ! CC = gcc -b $(target) -V $(version) # Need those to compile binaries running on host machine. --- 1,4 ---- # We have to use the cross-compiler we just built to compile it. ! CC = gcc -b $(target) # Need those to compile binaries running on host machine. diff -rc2N gcc-2.3.2/c-decl.c gcc-2.3.3/c-decl.c *** gcc-2.3.2/c-decl.c Mon Nov 23 18:02:50 1992 --- gcc-2.3.3/c-decl.c Tue Dec 22 17:56:28 1992 *************** *** 2568,2593 **** unsigned_char_type_node)); ! intQI_type_node = make_signed_type (8); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intQI_type_node)); ! intHI_type_node = make_signed_type (16); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intHI_type_node)); ! intSI_type_node = make_signed_type (32); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intSI_type_node)); ! intDI_type_node = make_signed_type (64); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intDI_type_node)); ! unsigned_intQI_type_node = make_unsigned_type (8); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intQI_type_node)); ! unsigned_intHI_type_node = make_unsigned_type (16); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intHI_type_node)); ! unsigned_intSI_type_node = make_unsigned_type (32); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intSI_type_node)); ! unsigned_intDI_type_node = make_unsigned_type (64); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intDI_type_node)); --- 2568,2593 ---- unsigned_char_type_node)); ! intQI_type_node = make_signed_type (GET_MODE_BITSIZE (QImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intQI_type_node)); ! intHI_type_node = make_signed_type (GET_MODE_BITSIZE (HImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intHI_type_node)); ! intSI_type_node = make_signed_type (GET_MODE_BITSIZE (SImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intSI_type_node)); ! intDI_type_node = make_signed_type (GET_MODE_BITSIZE (DImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intDI_type_node)); ! unsigned_intQI_type_node = make_unsigned_type (GET_MODE_BITSIZE (QImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intQI_type_node)); ! unsigned_intHI_type_node = make_unsigned_type (GET_MODE_BITSIZE (HImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intHI_type_node)); ! unsigned_intSI_type_node = make_unsigned_type (GET_MODE_BITSIZE (SImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intSI_type_node)); ! unsigned_intDI_type_node = make_unsigned_type (GET_MODE_BITSIZE (DImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intDI_type_node)); *************** *** 5405,5409 **** if (old_decl != 0 && TREE_CODE (TREE_TYPE (old_decl)) == FUNCTION_TYPE && !DECL_BUILT_IN (old_decl) ! && TREE_TYPE (TREE_TYPE (decl1)) == TREE_TYPE (TREE_TYPE (old_decl)) && TYPE_ARG_TYPES (TREE_TYPE (decl1)) == 0) TREE_TYPE (decl1) = TREE_TYPE (old_decl); --- 5405,5410 ---- if (old_decl != 0 && TREE_CODE (TREE_TYPE (old_decl)) == FUNCTION_TYPE && !DECL_BUILT_IN (old_decl) ! && (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (decl1))) ! == TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (old_decl)))) && TYPE_ARG_TYPES (TREE_TYPE (decl1)) == 0) TREE_TYPE (decl1) = TREE_TYPE (old_decl); *************** *** 5776,5780 **** if (! comptypes (DECL_ARG_TYPE (parm), TREE_VALUE (type))) { ! if (TREE_TYPE (parm) == TREE_VALUE (type)) { /* Adjust argument to match prototype. E.g. a previous --- 5777,5782 ---- if (! comptypes (DECL_ARG_TYPE (parm), TREE_VALUE (type))) { ! if (TYPE_MAIN_VARIANT (TREE_TYPE (parm)) ! == TYPE_MAIN_VARIANT (TREE_VALUE (type))) { /* Adjust argument to match prototype. E.g. a previous diff -rc2N gcc-2.3.2/c-tree.h gcc-2.3.3/c-tree.h *** gcc-2.3.2/c-tree.h Tue Sep 15 20:52:23 1992 --- gcc-2.3.3/c-tree.h Thu Dec 10 10:22:41 1992 *************** *** 58,63 **** #define IDENTIFIER_ERROR_LOCUS(NODE) \ (((struct lang_identifier *)(NODE))->error_locus) - #define IDENTIFIER_LIMBO_VALUE(NODE) \ - (((struct lang_identifier *)(NODE))->limbo_value) /* In identifiers, C uses the following fields in a special way: --- 58,61 ---- diff -rc2N gcc-2.3.2/cccp.c gcc-2.3.3/cccp.c *** gcc-2.3.2/cccp.c Fri Nov 27 01:29:50 1992 --- gcc-2.3.3/cccp.c Tue Dec 15 23:25:36 1992 *************** *** 5925,5929 **** fname = p + 1; ! if (p = (U_CHAR *) strchr (fname, '\"')) *p = '\0'; --- 5925,5929 ---- fname = p + 1; ! if (p = (U_CHAR *) index (fname, '\"')) *p = '\0'; *************** *** 6785,6789 **** { int len; ! char line_cmd_buf[500]; if (no_line_commands --- 6785,6789 ---- { int len; ! char *line_cmd_buf; if (no_line_commands *************** *** 6817,6820 **** --- 6817,6821 ---- } + line_cmd_buf = (char *) alloca (strlen (ip->nominal_fname) + 100); #ifdef OUTPUT_LINE_COMMANDS sprintf (line_cmd_buf, "#line %d \"%s\"", ip->lineno, ip->nominal_fname); diff -rc2N gcc-2.3.2/combine.c gcc-2.3.3/combine.c *** gcc-2.3.2/combine.c Fri Nov 27 19:13:54 1992 --- gcc-2.3.3/combine.c Wed Dec 16 05:02:45 1992 *************** *** 1536,1540 **** m_split = split_insns (newpat, i3); ! if (m_split == 0) { /* If I2DEST is a hard register or the only use of a pseudo, --- 1536,1548 ---- m_split = split_insns (newpat, i3); ! ! /* We can only use I2DEST as a scratch reg if it doesn't overlap any ! inputs of NEWPAT. */ ! ! /* ??? If I2DEST is not safe, and I1DEST exists, then it would be ! possible to try that as a scratch reg. This would require adding ! more code to make it work though. */ ! ! if (m_split == 0 && ! reg_overlap_mentioned_p (ni2dest, newpat)) { /* If I2DEST is a hard register or the only use of a pseudo, *************** *** 2084,2091 **** /* If I3 is now an unconditional jump, ensure that it has a BARRIER following it since it may have initially been a ! conditional jump. */ if ((GET_CODE (newpat) == RETURN || simplejump_p (i3)) ! && GET_CODE (next_nonnote_insn (i3)) != BARRIER) emit_barrier_after (i3); } --- 2092,2100 ---- /* If I3 is now an unconditional jump, ensure that it has a BARRIER following it since it may have initially been a ! conditional jump. It may also be the last nonnote insn. */ if ((GET_CODE (newpat) == RETURN || simplejump_p (i3)) ! && ((temp = next_nonnote_insn (i3)) == NULL_RTX ! || GET_CODE (temp) != BARRIER)) emit_barrier_after (i3); } *************** *** 6226,6230 **** if (mode == VOIDmode) ! return 0; bitwidth = GET_MODE_BITSIZE (mode); --- 6235,6239 ---- if (mode == VOIDmode) ! return 1; bitwidth = GET_MODE_BITSIZE (mode); *************** *** 6458,6462 **** if (bitwidth > HOST_BITS_PER_WIDE_INT) ! return bitwidth; sig = significant_bits (x, mode); --- 6467,6471 ---- if (bitwidth > HOST_BITS_PER_WIDE_INT) ! return 1; sig = significant_bits (x, mode); *************** *** 8804,8813 **** /* If the value was set in a later insn that the ones we are processing, ! we can't use it, but make a quick check to see if the previous insn ! set it to something. This is commonly the case when the same pseudo ! is used by repeated insns. */ ! if (reg_n_sets[regno] != 1 ! && INSN_CUID (reg_last_set[regno]) >= subst_low_cuid) { rtx insn, set; --- 8813,8821 ---- /* If the value was set in a later insn that the ones we are processing, ! we can't use it even if the register was only set once, but make a quick ! check to see if the previous insn set it to something. This is commonly ! the case when the same pseudo is used by repeated insns. */ ! if (INSN_CUID (reg_last_set[regno]) >= subst_low_cuid) { rtx insn, set; diff -rc2N gcc-2.3.2/config/a29k.c gcc-2.3.3/config/a29k.c *** gcc-2.3.2/config/a29k.c Sat Oct 24 10:33:08 1992 --- gcc-2.3.3/config/a29k.c Sat Dec 19 20:18:14 1992 *************** *** 725,735 **** } ! /* If we are transferring between memory and a multi-word mode or between ! memory and a mode smaller than a word without DW being enabled, we need ! BP. */ ! if (code == MEM ! && (GET_MODE_SIZE (mode) > UNITS_PER_WORD ! || (! TARGET_DW_ENABLE && GET_MODE_SIZE (mode) < UNITS_PER_WORD))) return BP_REGS; --- 725,739 ---- } ! /* If we are transferring between memory and a multi-word mode, we need ! CR. */ ! if (code == MEM && GET_MODE_SIZE (mode) > UNITS_PER_WORD) ! return CR_REGS; ! ! /* If between memory and a mode smaller than a word without DW being ! enabled, we need BP. */ ! ! if (code == MEM && ! TARGET_DW_ENABLE ! && GET_MODE_SIZE (mode) < UNITS_PER_WORD) return BP_REGS; diff -rc2N gcc-2.3.2/config/a29k.md gcc-2.3.3/config/a29k.md *** gcc-2.3.2/config/a29k.md Wed Nov 18 17:25:36 1992 --- gcc-2.3.3/config/a29k.md Fri Dec 25 07:29:57 1992 *************** *** 186,190 **** [(call (match_operand:SI 0 "memory_operand" "m") (match_operand 1 "" "")) ! (clobber (match_scratch:SI 2 "=l"))] "GET_CODE (XEXP (operands[0], 0)) != CONST_INT" "calli lr0,%0%#" --- 186,190 ---- [(call (match_operand:SI 0 "memory_operand" "m") (match_operand 1 "" "")) ! (clobber (match_scratch:SI 2 "=&l"))] "GET_CODE (XEXP (operands[0], 0)) != CONST_INT" "calli lr0,%0%#" *************** *** 194,198 **** [(call (mem:SI (match_operand:SI 0 "call_operand" "i")) (match_operand:SI 1 "general_operand" "g")) ! (clobber (match_scratch:SI 2 "=l"))] "" "call lr0,%F0" --- 194,198 ---- [(call (mem:SI (match_operand:SI 0 "call_operand" "i")) (match_operand:SI 1 "general_operand" "g")) ! (clobber (match_scratch:SI 2 "=&l"))] "" "call lr0,%F0" *************** *** 203,207 **** (call (match_operand:SI 1 "memory_operand" "m") (match_operand 2 "" ""))) ! (clobber (match_scratch:SI 3 "=l"))] "GET_CODE (XEXP (operands[1], 0)) != CONST_INT" "calli lr0,%1%#" --- 203,207 ---- (call (match_operand:SI 1 "memory_operand" "m") (match_operand 2 "" ""))) ! (clobber (match_scratch:SI 3 "=&l"))] "GET_CODE (XEXP (operands[1], 0)) != CONST_INT" "calli lr0,%1%#" *************** *** 212,216 **** (call (mem:SI (match_operand:SI 1 "call_operand" "i")) (match_operand:SI 2 "general_operand" "g"))) ! (clobber (match_scratch:SI 3 "=l"))] "" "call lr0,%F1" --- 212,216 ---- (call (mem:SI (match_operand:SI 1 "call_operand" "i")) (match_operand:SI 2 "general_operand" "g"))) ! (clobber (match_scratch:SI 3 "=&l"))] "" "call lr0,%F1" *************** *** 385,389 **** "@ dadd %0,%1,%2 ! dmac 8,%0,%1,0" [(set_attr "type" "fadd,dam")]) --- 385,389 ---- "@ dadd %0,%1,%2 ! dmac 8,%0,%1,%1" [(set_attr "type" "fadd,dam")]) *************** *** 509,513 **** (match_operand:DF 2 "register_operand" "0")))] "TARGET_29050" ! "dmac 11,%0,%1,0" [(set_attr "type" "dam")]) --- 509,513 ---- (match_operand:DF 2 "register_operand" "0")))] "TARGET_29050" ! "dmac 11,%0,%1,%1" [(set_attr "type" "dam")]) *************** *** 517,521 **** (match_operand:DF 2 "register_operand" "0"))))] "TARGET_29050" ! "dmac 11,%0,%1,0" [(set_attr "type" "dam")]) --- 517,521 ---- (match_operand:DF 2 "register_operand" "0"))))] "TARGET_29050" ! "dmac 11,%0,%1,%1" [(set_attr "type" "dam")]) *************** *** 528,532 **** cpeq %2,gr1,gr1\;xor %0,%1,%2 cpeq %2,gr1,gr1\;xor %0,%1,%2\;sll %L0,%L1,0 ! dmac 13,%0,%1,0" [(set_attr "type" "multi,multi,dam")]) --- 528,532 ---- cpeq %2,gr1,gr1\;xor %0,%1,%2 cpeq %2,gr1,gr1\;xor %0,%1,%2\;sll %L0,%L1,0 ! dmac 13,%0,%1,%1" [(set_attr "type" "multi,multi,dam")]) *************** *** 580,585 **** "@ dsub %0,%1,%2 ! dmac 9,%0,%2,0 ! dmac 10,%0,%1,0" [(set_attr "type" "fadd,dam,dam")]) --- 580,585 ---- "@ dsub %0,%1,%2 ! dmac 9,%0,%2,%2 ! dmac 10,%0,%1,%1" [(set_attr "type" "fadd,dam,dam")]) *************** *** 750,754 **** "@ fadd %0,%1,%2 ! fmac 8,%0,%1,0" [(set_attr "type" "fadd,fam")]) --- 750,754 ---- "@ fadd %0,%1,%2 ! fmac 8,%0,%1,%1" [(set_attr "type" "fadd,fam")]) *************** *** 756,760 **** (define_insn "divsf3" [(set (match_operand:SF 0 "register_operand" "=r") ! (div:DF (match_operand:SF 1 "register_operand" "=r") (match_operand:SF 2 "register_operand" "r")))] "" --- 756,760 ---- (define_insn "divsf3" [(set (match_operand:SF 0 "register_operand" "=r") ! (div:SF (match_operand:SF 1 "register_operand" "=r") (match_operand:SF 2 "register_operand" "r")))] "" *************** *** 822,826 **** (match_operand:SF 2 "register_operand" "0")))] "TARGET_29050" ! "fmac 11,%0,%1,0" [(set_attr "type" "fam")]) --- 822,826 ---- (match_operand:SF 2 "register_operand" "0")))] "TARGET_29050" ! "fmac 11,%0,%1,%1" [(set_attr "type" "fam")]) *************** *** 830,834 **** (match_operand:SF 2 "register_operand" "0"))))] "TARGET_29050" ! "fmac 11,%0,%1,0" [(set_attr "type" "fam")]) --- 830,834 ---- (match_operand:SF 2 "register_operand" "0"))))] "TARGET_29050" ! "fmac 11,%0,%1,%1" [(set_attr "type" "fam")]) *************** *** 840,844 **** "@ cpeq %2,gr1,gr1\;xor %0,%1,%2 ! fmac 13,%0,%1,0" [(set_attr "type" "multi,fam")]) --- 840,844 ---- "@ cpeq %2,gr1,gr1\;xor %0,%1,%2 ! fmac 13,%0,%1,%1" [(set_attr "type" "multi,fam")]) *************** *** 892,897 **** "@ fsub %0,%1,%2 ! fmac 9,%0,%2,0 ! fmac 10,%0,%1,0" [(set_attr "type" "fadd,fam,fam")]) --- 892,897 ---- "@ fsub %0,%1,%2 ! fmac 9,%0,%2,%2 ! fmac 10,%0,%1,%1" [(set_attr "type" "fadd,fam,fam")]) *************** *** 1007,1011 **** [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (sign_extend:SI (match_operand:QI 1 "memory_operand" "m"))) ! (clobber (match_scratch:PSI 2 "=b"))] "TARGET_DW_ENABLE" "load 0,17,%0,%1" --- 1007,1011 ---- [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (sign_extend:SI (match_operand:QI 1 "memory_operand" "m"))) ! (clobber (match_scratch:PSI 2 "=&b"))] "TARGET_DW_ENABLE" "load 0,17,%0,%1" *************** *** 1015,1019 **** [(set (match_operand:HI 0 "gpc_reg_operand" "=r") (sign_extend:HI (match_operand:QI 1 "memory_operand" "m"))) ! (clobber (match_scratch:PSI 2 "=b"))] "TARGET_DW_ENABLE" "load 0,17,%0,%1" --- 1015,1019 ---- [(set (match_operand:HI 0 "gpc_reg_operand" "=r") (sign_extend:HI (match_operand:QI 1 "memory_operand" "m"))) ! (clobber (match_scratch:PSI 2 "=&b"))] "TARGET_DW_ENABLE" "load 0,17,%0,%1" *************** *** 1023,1027 **** [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (sign_extend:SI (match_operand:HI 1 "memory_operand" "m"))) ! (clobber (match_scratch:PSI 2 "=b"))] "TARGET_DW_ENABLE" "load 0,18,%0,%1" --- 1023,1027 ---- [(set (match_operand:SI 0 "gpc_reg_operand" "=r") (sign_extend:SI (match_operand:HI 1 "memory_operand" "m"))) ! (clobber (match_scratch:PSI 2 "=&b"))] "TARGET_DW_ENABLE" "load 0,18,%0,%1" *************** *** 1436,1440 **** [(set (match_operand 0 "memory_operand" "=m") (match_operand 1 "gpc_reg_operand" "r")) ! (clobber (match_scratch:PSI 2 "=c"))] "!TARGET_NO_STOREM_BUG && GET_MODE (operands[0]) == GET_MODE (operands[1]) --- 1436,1440 ---- [(set (match_operand 0 "memory_operand" "=m") (match_operand 1 "gpc_reg_operand" "r")) ! (clobber (match_scratch:PSI 2 "=&c"))] "!TARGET_NO_STOREM_BUG && GET_MODE (operands[0]) == GET_MODE (operands[1]) *************** *** 1447,1451 **** [(set (match_operand:SI 1 "memory_operand" "=m") (match_operand:SI 2 "gpc_reg_operand" "r")) ! (clobber (match_scratch:PSI 3 "=c"))])] "!TARGET_NO_STOREM_BUG" "mtsrim cr,%V0\;storem 0,0,%2,%1" --- 1447,1451 ---- [(set (match_operand:SI 1 "memory_operand" "=m") (match_operand:SI 2 "gpc_reg_operand" "r")) ! (clobber (match_scratch:PSI 3 "=&c"))])] "!TARGET_NO_STOREM_BUG" "mtsrim cr,%V0\;storem 0,0,%2,%1" *************** *** 2411,2415 **** [(parallel [(set (match_operand:DF 0 "register_operand" "=r") (match_operand:DF 1 "reload_memory_operand" "m")) ! (clobber (match_operand:PSI 2 "register_operand" "=&b"))])] "" "") --- 2411,2415 ---- [(parallel [(set (match_operand:DF 0 "register_operand" "=r") (match_operand:DF 1 "reload_memory_operand" "m")) ! (clobber (match_operand:PSI 2 "register_operand" "=&c"))])] "" "") *************** *** 2418,2422 **** [(parallel [(set (match_operand:DF 0 "reload_memory_operand" "=m") (match_operand:DF 1 "register_operand" "r")) ! (clobber (match_operand:PSI 2 "register_operand" "=&b"))])] "" "") --- 2418,2422 ---- [(parallel [(set (match_operand:DF 0 "reload_memory_operand" "=m") (match_operand:DF 1 "register_operand" "r")) ! (clobber (match_operand:PSI 2 "register_operand" "=&c"))])] "" "") *************** *** 2425,2429 **** [(parallel [(set (match_operand:DI 0 "register_operand" "=r") (match_operand:DI 1 "reload_memory_operand" "m")) ! (clobber (match_operand:PSI 2 "register_operand" "=&b"))])] "" "") --- 2425,2429 ---- [(parallel [(set (match_operand:DI 0 "register_operand" "=r") (match_operand:DI 1 "reload_memory_operand" "m")) ! (clobber (match_operand:PSI 2 "register_operand" "=&c"))])] "" "") *************** *** 2432,2436 **** [(parallel [(set (match_operand:DI 0 "reload_memory_operand" "=m") (match_operand:DI 1 "register_operand" "r")) ! (clobber (match_operand:PSI 2 "register_operand" "=&b"))])] "" "") --- 2432,2436 ---- [(parallel [(set (match_operand:DI 0 "reload_memory_operand" "=m") (match_operand:DI 1 "register_operand" "r")) ! (clobber (match_operand:PSI 2 "register_operand" "=&c"))])] "" "") *************** *** 2439,2443 **** [(parallel [(set (match_operand:TI 0 "register_operand" "=r") (match_operand:TI 1 "reload_memory_operand" "m")) ! (clobber (match_operand:PSI 2 "register_operand" "=&b"))])] "" "") --- 2439,2443 ---- [(parallel [(set (match_operand:TI 0 "register_operand" "=r") (match_operand:TI 1 "reload_memory_operand" "m")) ! (clobber (match_operand:PSI 2 "register_operand" "=&c"))])] "" "") *************** *** 2446,2450 **** [(parallel [(set (match_operand:TI 0 "reload_memory_operand" "=m") (match_operand:TI 1 "register_operand" "r")) ! (clobber (match_operand:PSI 2 "register_operand" "=&b"))])] "" "") --- 2446,2450 ---- [(parallel [(set (match_operand:TI 0 "reload_memory_operand" "=m") (match_operand:TI 1 "register_operand" "r")) ! (clobber (match_operand:PSI 2 "register_operand" "=&c"))])] "" "") diff -rc2N gcc-2.3.2/config/a29kunix.h gcc-2.3.3/config/a29kunix.h *** gcc-2.3.2/config/a29kunix.h Mon Aug 17 07:31:48 1992 --- gcc-2.3.3/config/a29kunix.h Fri Dec 11 07:14:43 1992 *************** *** 37,42 **** #define CPP_SPEC "%{!m29000:-Dam29050 -D__am29050__}" #undef LINK_SPEC ! #define LINK_SPEC "-c default.ld%s" /* For some systems, it is best if double-word objects are aligned on a --- 37,43 ---- #define CPP_SPEC "%{!m29000:-Dam29050 -D__am29050__}" + /* Use a default linker configuration file. */ #undef LINK_SPEC ! #define LINK_SPEC "-T default.gld%s" /* For some systems, it is best if double-word objects are aligned on a diff -rc2N gcc-2.3.2/config/alpha.c gcc-2.3.3/config/alpha.c *** gcc-2.3.2/config/alpha.c Thu Nov 26 17:37:18 1992 --- gcc-2.3.3/config/alpha.c Sat Dec 12 17:50:12 1992 *************** *** 1014,1018 **** /* 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. */ --- 1014,1018 ---- /* Do what is necessary for `va_start'. The argument is ignored; ! We look at the current function to determine if stdarg or varargs is used and fill in an initial va_list. A pointer to this constructor is returned. */ *************** *** 1024,1030 **** rtx block, addr, argsize; tree fntype = TREE_TYPE (current_function_decl); ! int stdargs = (TYPE_ARG_TYPES (fntype) != 0 ! && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) ! != void_type_node)); int nregs = current_function_args_info; --- 1024,1030 ---- rtx block, addr, argsize; tree fntype = TREE_TYPE (current_function_decl); ! int stdarg = (TYPE_ARG_TYPES (fntype) != 0 ! && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) ! != void_type_node)); int nregs = current_function_args_info; *************** *** 1035,1040 **** { argsize = plus_constant (current_function_arg_offset_rtx, ! ((6 - stdargs) * UNITS_PER_WORD ! + UNITS_PER_WORD - 1)); argsize = expand_shift (RSHIFT_EXPR, Pmode, argsize, build_int_2 (3, 0), argsize, 0); --- 1035,1039 ---- { argsize = plus_constant (current_function_arg_offset_rtx, ! (6 * UNITS_PER_WORD + UNITS_PER_WORD - 1)); argsize = expand_shift (RSHIFT_EXPR, Pmode, argsize, build_int_2 (3, 0), argsize, 0); *************** *** 1042,1049 **** else { ! /* If we are using memory, deduct the stdarg adjustment from it, ! otherwise from the number of registers. Then compute the current ! argument number. */ ! int memargs = ((INTVAL (current_function_arg_offset_rtx) + UNITS_PER_WORD - 1) --- 1041,1046 ---- else { ! /* Compute the number of args in memory and number of arguments already ! processed. Then adjust the number of registers if this is stdarg. */ int memargs = ((INTVAL (current_function_arg_offset_rtx) + UNITS_PER_WORD - 1) *************** *** 1050,1059 **** / UNITS_PER_WORD); - if (memargs) - memargs -= stdargs; - else - nregs -= stdargs; - argsize = GEN_INT (MIN (nregs, 6) + memargs); } --- 1047,1054 ---- / UNITS_PER_WORD); argsize = GEN_INT (MIN (nregs, 6) + memargs); + + if (nregs <= 6) + nregs -= stdarg; } *************** *** 1408,1412 **** = ((tmp1 >> 16) & 0xffff) - 2 * ((tmp1 >> 16) & 0x8000); HOST_WIDE_INT tmp2 = frame_size - (high << 16) - low; ! int extra = 0xe; int in_reg = 31; --- 1403,1407 ---- = ((tmp1 >> 16) & 0xffff) - 2 * ((tmp1 >> 16) & 0x8000); HOST_WIDE_INT tmp2 = frame_size - (high << 16) - low; ! int extra = 0; int in_reg = 31; *************** *** 1432,1436 **** fprintf (file, "\tldah $28,%d($%d)\n", high, in_reg); ! fprintf (file, "\taddq $25,$28,$28\n"); reg_offset_from = 28; --- 1427,1431 ---- fprintf (file, "\tldah $28,%d($%d)\n", high, in_reg); ! fprintf (file, "\tsubq $25,$28,$28\n"); reg_offset_from = 28; diff -rc2N gcc-2.3.2/config/alpha.h gcc-2.3.3/config/alpha.h *** gcc-2.3.2/config/alpha.h Thu Nov 26 21:27:33 1992 --- gcc-2.3.3/config/alpha.h Wed Dec 16 14:53:00 1992 *************** *** 42,45 **** --- 42,48 ---- #define SIGNED_CHAR_SPEC "%{funsigned-char:-D__CHAR_UNSIGNED__}" + /* No point in running CPP on our assembler output. */ + #define ASM_SPEC "-nocpp" + /* Right now Alpha OSF/1 doesn't seem to have debugging or profiled libraries. */ *************** *** 732,743 **** && GET_MODE_CLASS (MODE) == MODE_FLOAT) * 32) : 0) - /* This indicates that an argument is to be passed with an invisible reference - (i.e., a pointer to the object is passed). - - On the Alpha, we do this if it must be passed on the stack. */ - - #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ - (MUST_PASS_IN_STACK (MODE, TYPE)) - /* Specify the padding direction of arguments. --- 735,738 ---- *************** *** 817,838 **** The trampoline should set the static chain pointer to value placed ! into the trampoline and should branch to the specified routine. We ! use $28 (at) as a temporary. Note that $27 has been set to the ! address of the trampoline, so we can use it for addressability ! of the two data items. Trampolines are always aligned to ! FUNCTION_BOUNDARY, which is 64 bits. */ #define TRAMPOLINE_TEMPLATE(FILE) \ { \ ! fprintf (FILE, "\tbis $27,$27,$28\n"); \ fprintf (FILE, "\tldq $27,16($27)\n"); \ ! fprintf (FILE, "\tldq $1,20($28)\n"); \ ! fprintf (FILE, "\tjmp $31,0($27),0\n"); \ fprintf (FILE, "\t.quad 0,0\n"); \ } /* Length in units of the trampoline for entering a nested function. */ ! #define TRAMPOLINE_SIZE 24 /* Emit RTL insns to initialize the variable parts of a trampoline. --- 812,837 ---- The trampoline should set the static chain pointer to value placed ! into the trampoline and should branch to the specified routine. ! Note that $27 has been set to the address of the trampoline, so we can ! use it for addressability of the two data items. Trampolines are always ! aligned to FUNCTION_BOUNDARY, which is 64 bits. */ #define TRAMPOLINE_TEMPLATE(FILE) \ { \ ! fprintf (FILE, "\tldq $1,24($27)\n"); \ fprintf (FILE, "\tldq $27,16($27)\n"); \ ! fprintf (FILE, "\tjmp $31,($27),0\n"); \ ! fprintf (FILE, "\tnop\n"); \ fprintf (FILE, "\t.quad 0,0\n"); \ } + /* Section in which to place the trampoline. On Alpha, instructions + may only be placed in a text segment. */ + + #define TRAMPOLINE_SECTION text_section + /* Length in units of the trampoline for entering a nested function. */ ! #define TRAMPOLINE_SIZE 32 /* Emit RTL insns to initialize the variable parts of a trampoline. *************** *** 841,845 **** here that a function will be called many more times than its address is taken (e.g., it might be passed to qsort), so we take the trouble ! to initialize the "hint" field in the JMP insn. */ #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ --- 840,845 ---- here that a function will be called many more times than its address is taken (e.g., it might be passed to qsort), so we take the trouble ! to initialize the "hint" field in the JMP insn. Note that the hint ! field is PC (new) + 4 * bits 13:0. */ #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ *************** *** 849,862 **** _addr = memory_address (Pmode, plus_constant ((TRAMP), 16)); \ emit_move_insn (gen_rtx (MEM, Pmode, _addr), (FNADDR)); \ ! _addr = memory_address (Pmode, plus_constant ((TRAMP), 20)); \ emit_move_insn (gen_rtx (MEM, Pmode, _addr), (CXT)); \ \ ! _temp = expand_shift (RSHIFT_EXPR, Pmode, (FNADDR), \ build_int_2 (2, 0), NULL_RTX, 1); \ ! _temp = expand_and (_temp, GEN_INT (0x1fff), 0); \ \ ! _addr = memory_address (SImode, plus_constant ((TRAMP), 12)); \ _temp1 = force_reg (SImode, gen_rtx (MEM, SImode, _addr)); \ ! _temp1 = expand_and (_temp, GEN_INT (0xfffe000), NULL_RTX); \ _temp1 = expand_binop (SImode, ior_optab, _temp1, _temp, _temp1, 1, \ OPTAB_WIDEN); \ --- 849,866 ---- _addr = memory_address (Pmode, plus_constant ((TRAMP), 16)); \ emit_move_insn (gen_rtx (MEM, Pmode, _addr), (FNADDR)); \ ! _addr = memory_address (Pmode, plus_constant ((TRAMP), 24)); \ emit_move_insn (gen_rtx (MEM, Pmode, _addr), (CXT)); \ \ ! _temp = force_operand (plus_constant ((TRAMP), 12), NULL_RTX); \ ! _temp = expand_binop (DImode, sub_optab, (FNADDR), _temp, _temp, 1, \ ! OPTAB_WIDEN); \ ! _temp = expand_shift (RSHIFT_EXPR, Pmode, _temp, \ build_int_2 (2, 0), NULL_RTX, 1); \ ! _temp = expand_and (gen_lowpart (SImode, _temp), \ ! GEN_INT (0x3fff), 0); \ \ ! _addr = memory_address (SImode, plus_constant ((TRAMP), 8)); \ _temp1 = force_reg (SImode, gen_rtx (MEM, SImode, _addr)); \ ! _temp1 = expand_and (_temp1, GEN_INT (0xffffc000), NULL_RTX); \ _temp1 = expand_binop (SImode, ior_optab, _temp1, _temp, _temp1, 1, \ OPTAB_WIDEN); \ *************** *** 863,866 **** --- 867,895 ---- \ emit_move_insn (gen_rtx (MEM, SImode, _addr), _temp1); \ + \ + emit_library_call (gen_rtx (SYMBOL_REF, Pmode, \ + "__enable_execute_stack"), \ + 0, VOIDmode, 1,_addr, Pmode); \ + \ + emit_insn (gen_rtx (UNSPEC_VOLATILE, VOIDmode, \ + gen_rtvec (1, const0_rtx), 0)); \ + } + + /* Attempt to turn on access permissions for the stack. */ + + #define TRANSFER_FROM_TRAMPOLINE \ + \ + void \ + __enable_execute_stack (addr) \ + void *addr; \ + { \ + long size = getpagesize (); \ + long mask = ~(size-1); \ + char *page = (char *) (((long) addr) & mask); \ + char *end = (char *) ((((long) (addr + TRAMPOLINE_SIZE)) & mask) + size); \ + \ + /* 7 is PROT_READ | PROT_WRITE | PROT_EXEC */ \ + if (mprotect (page, end - page, 7) < 0) \ + perror ("mprotect of trampoline code"); \ } diff -rc2N gcc-2.3.2/config/alpha.md gcc-2.3.3/config/alpha.md *** gcc-2.3.2/config/alpha.md Thu Nov 26 21:27:23 1992 --- gcc-2.3.3/config/alpha.md Tue Dec 15 17:40:44 1992 *************** *** 207,211 **** (define_insn "" ! [(set (match_operand:DI 0 "register_operand" "=r") (plus:DI (plus:DI (mult:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") (match_operand:DI 2 "const48_operand" "I")) --- 207,211 ---- (define_insn "" ! [(set (match_operand:DI 0 "register_operand" "=&r") (plus:DI (plus:DI (mult:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") (match_operand:DI 2 "const48_operand" "I")) *************** *** 2308,2311 **** --- 2308,2318 ---- }" [(set_attr "type" "ibr")]) + + ;; Cache flush. Used by INITIALIZE_TRAMPOLINE. 0x86 is PAL_imb, but we don't + ;; want to have to include pal.h in our .s file. + (define_insn "" + [(unspec_volatile [(const_int 0)] 0)] + "" + "call_pal 0x86") ;; Finally, we have the basic data motion insns. The byte and word insns diff -rc2N gcc-2.3.2/config/dec-osf1.h gcc-2.3.3/config/dec-osf1.h *** gcc-2.3.2/config/dec-osf1.h Wed Oct 7 09:49:14 1992 --- gcc-2.3.3/config/dec-osf1.h Sun Dec 6 07:57:57 1992 *************** *** 29,33 **** %{EB: %e-EB not supported} \ %{mips1} %{mips2} %{mips3} %{bestGnum} \ ! %{shared} %{non_shared} %{!shared: %{!non_shared: -non_shared}}}" #include "decstatn.h" --- 29,34 ---- %{EB: %e-EB not supported} \ %{mips1} %{mips2} %{mips3} %{bestGnum} \ ! %{shared} %{non_shared} %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared: %{!non_shared: %{!call_shared: -non_shared}}}}" #include "decstatn.h" diff -rc2N gcc-2.3.2/config/hp320.h gcc-2.3.3/config/hp320.h *** gcc-2.3.2/config/hp320.h Sun Nov 22 17:40:02 1992 --- gcc-2.3.3/config/hp320.h Tue Dec 8 10:33:07 1992 *************** *** 33,36 **** --- 33,47 ---- #define HPUX_ASM + #if !defined (CROSS_COMPILE) && !defined (NO_BUGS) + /* The assembler on HP 9k3xx machines running HPUX 8.0 doesn't translate + floating point constants behind some operands. The workaround is to + use hex constants. Reported by Thomas Nau (nau@medizin.uni-ulm.de). */ + #define AS_BUG_FLOATING_CONSTANT + /* The assembler on HP 9k3xx machines running HPUX 8.0 doesn't accept + labels followed by a text, data, or other section directive. Reported + by Thomas Nau (nau@medizin.uni-ulm.de). */ + #define AS_BUG_TRAILING_LABEL + #endif + /* gcc.c should find libgcc.a itself rather than expecting linker to. */ #define LINK_LIBGCC_SPECIAL *************** *** 289,295 **** #define ASM_APP_OFF "" #define TEXT_SECTION_ASM_OP "text" - #define DATA_SECTION_ASM_OP "data" #define ASCII_DATA_ASM_OP "byte" --- 300,310 ---- #define ASM_APP_OFF "" + #ifdef AS_BUG_TRAILING_LABEL + #define TEXT_SECTION_ASM_OP "\tlalign\t1\ntext" + #define DATA_SECTION_ASM_OP "\tlalign\t1\ndata" + #else #define TEXT_SECTION_ASM_OP "text" #define DATA_SECTION_ASM_OP "data" + #endif #define ASCII_DATA_ASM_OP "byte" *************** *** 337,340 **** --- 352,373 ---- fprintf (FILE, "\tfloat 0f%.9g\n", (VALUE)) + #ifdef AS_BUG_FLOATING_CONSTANT + #undef ASM_OUTPUT_DOUBLE_OPERAND + #define ASM_OUTPUT_DOUBLE_OPERAND(FILE, VALUE) \ + do { \ + union { double d; int i[2]; } dummy_u; \ + dummy_u.d = (VALUE); \ + asm_fprintf (FILE, "%I0x%x%08x", dummy_u.i[0], dummy_u.i[1]); \ + } while (0) + + #undef ASM_OUTPUT_FLOAT_OPERAND + #define ASM_OUTPUT_FLOAT_OPERAND(FILE, VALUE) \ + do { \ + union { float f; int i; } dummy_u; \ + dummy_u.f = (VALUE); \ + asm_fprintf (FILE, "%I0x%08x", dummy_u.i); \ + } while (0) + #endif /* AS_BUG_FLOATING_CONSTANT */ + /* This is how to output an assembler line defining an `int' constant. */ *************** *** 379,382 **** --- 412,426 ---- #define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO) + #ifdef AS_BUG_FLOATING_CONSTANT + #define PRINT_OPERAND_FLOAT(FILE,CODE,FLOAT,INT) \ + fprintf (FILE, "&0x%x", (INT)) + #else + #define PRINT_OPERAND_FLOAT(FILE,CODE,FLOAT,INT) \ + if (CODE == 'f') \ + fprintf (FILE, "&0f%.9g", (FLOAT)); \ + else \ + fprintf (FILE, "&0x%x", (INT)) + #endif /* AS_BUG_FLOATING_CONSTANT */ + #define PRINT_OPERAND(FILE, X, CODE) \ { if (CODE == '.') fprintf (FILE, "."); \ *************** *** 397,404 **** u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ u1.f = u.d; \ ! if (CODE == 'f') \ ! fprintf (FILE, "&0f%.9g", u1.f); \ ! else \ ! fprintf (FILE, "&0x%x", u1.i); } \ else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \ { union { double d; int i[2]; } u; \ --- 441,445 ---- u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ u1.f = u.d; \ ! PRINT_OPERAND_FLOAT (FILE,CODE, u1.f, u1.i); } \ else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \ { union { double d; int i[2]; } u; \ diff -rc2N gcc-2.3.2/config/i386bsd.h gcc-2.3.3/config/i386bsd.h *** gcc-2.3.2/config/i386bsd.h Tue Nov 24 13:27:59 1992 --- gcc-2.3.3/config/i386bsd.h Fri Dec 4 19:09:39 1992 *************** *** 130,131 **** --- 130,147 ---- return ret; \ } + + /* The following macros are stolen from i386v4.h */ + /* These have to be defined to get PIC code correct */ + + /* This is how to output an element of a case-vector that is relative. + This is only used for PIC code. See comments by the `casesi' insn in + i386.md for an explanation of the expression this outputs. */ + + #undef ASM_OUTPUT_ADDR_DIFF_ELT + #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ + fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE) + + /* Indicate that jump tables go in the text section. This is + necessary when compiling PIC code. */ + + #define JUMP_TABLES_IN_TEXT_SECTION diff -rc2N gcc-2.3.2/config/i386sco4.h gcc-2.3.3/config/i386sco4.h *** gcc-2.3.2/config/i386sco4.h Sat Oct 10 05:31:15 1992 --- gcc-2.3.3/config/i386sco4.h Sat Dec 26 03:54:53 1992 *************** *** 62,72 **** #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "" #undef CPP_SPEC #define CPP_SPEC \ ! "-D__i386 -D_M_I386 -D_M_I86 -D_M_I86SM -D_M_SDATA -D_M_STEXT \ ! -D__unix -D_M_UNIX -D_M_XENIX \ ! -D_M_SYS5 -D_M_SYSV -D_M_SYSV -D_M_SYS3 -D_M_SYSIII \ -D_M_COFF -D_M_BITFIELDS -D_M_WORDSWAP \ %{scoxpg3:-D_XOPEN_SOURCE -D_STRICT_NAMES} \ --- 62,72 ---- #undef CPP_PREDEFINES ! #define CPP_PREDEFINES "-Di386 -Dunix" #undef CPP_SPEC #define CPP_SPEC \ ! "-D_M_I386 -D_M_I86 -D_M_I86SM -D_M_SDATA -D_M_STEXT \ ! -D_M_UNIX -D_M_XENIX \ ! -D_M_SYS5 -D_M_SYSV -D_M_SYS3 -D_M_SYSIII \ -D_M_COFF -D_M_BITFIELDS -D_M_WORDSWAP \ %{scoxpg3:-D_XOPEN_SOURCE -D_STRICT_NAMES} \ *************** *** 73,80 **** %{!scoxpg3:%{posix:-D_POSIX_SOURCE -D_STRICT_NAMES}} \ %{!scoxpg3:%{!posix:\ ! %{ansi:-D_STRICT_NAMES}%{!ansi:\ ! -Di386 -DM_I386 -DM_I86 -DM_I86SM -DM_SDATA -DM_STEXT \ ! -Dunix -DM_UNIX -DM_XENIX \ ! -DM_SYS5 -DM_SYSV -D_M_SYSV -DM_SYS3 -DM_SYSIII \ ! -DM_COFF -DM_BITFIELDS -DM_WORDSWAP \ ! %{scointl:-D_M_INTERNAT -DM_INTERNAT}}}}" --- 73,81 ---- %{!scoxpg3:%{posix:-D_POSIX_SOURCE -D_STRICT_NAMES}} \ %{!scoxpg3:%{!posix:\ ! %{ansi:-D_STRICT_NAMES}%{!ansi:\ ! -DM_I386 -DM_I86 -DM_I86SM -DM_SDATA -DM_STEXT \ ! -DM_UNIX -DM_XENIX \ ! -DM_SYS5 -DM_SYSV -DM_SYS3 -DM_SYSIII \ ! -DM_COFF -DM_BITFIELDS -DM_WORDSWAP \ ! %{scointl:-D_M_INTERNAT -DM_INTERNAT} \ ! %{traditional:-D_KR -D_SVID -D_NO_PROTOTYPE}}}}" diff -rc2N gcc-2.3.2/config/isc.h gcc-2.3.3/config/isc.h *** gcc-2.3.2/config/isc.h Mon Jul 27 22:54:24 1992 --- gcc-2.3.3/config/isc.h Tue Dec 1 03:47:45 1992 *************** *** 45,46 **** --- 45,57 ---- /* Handle #pragma pack and #pragma weak. */ #define HANDLE_SYSV_PRAGMA + + /* By default, target has a 80387, uses IEEE compatible arithmetic, + and returns float values in the 387, ie, + (TARGET_80387 | TARGET_FLOAT_RETURNS_IN_80387) + + ISC's software emulation of a 387 fails to handle the `fucomp' + opcode. fucomp is only used when generating IEEE compliant code. + So don't make TARGET_IEEE_FP default for ISC. */ + + #undef TARGET_DEFAULT + #define TARGET_DEFAULT 0201 diff -rc2N gcc-2.3.2/config/m68kv4.h gcc-2.3.3/config/m68kv4.h *** gcc-2.3.2/config/m68kv4.h Sun Jul 12 17:14:58 1992 --- gcc-2.3.3/config/m68kv4.h Mon Dec 21 06:02:42 1992 *************** *** 223,233 **** } ! /* SVR4 m68k assembler is bitching on the syntax `2.b'. Change ! it back to use the "LLDnnn-LLnnn" format. */ #undef ASM_OUTPUT_CASE_END ! #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE) \ ! if (RTX_INTEGRATED_P (TABLE)) \ ! asm_fprintf (FILE, "\t%s %LLD%d,%LL%d\n",\ ! SET_ASM_OP, (NUM), (NUM)) --- 223,236 ---- } ! /* SVR4 m68k assembler is bitching on the syntax `2.b'. ! So use the "LLDnnn-LLnnn" format. Define LLDnnn after the table. */ #undef ASM_OUTPUT_CASE_END ! #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE) \ ! do { \ ! if (switch_table_difference_label_flag) \ ! asm_fprintf ((FILE), "\t%s %LLD%d,%LL%d\n", SET_ASM_OP, (NUM), (NUM));\ ! switch_table_difference_label_flag = 0; \ ! } while (0) + int switch_table_difference_label_flag; diff -rc2N gcc-2.3.2/config/mips-5.h gcc-2.3.3/config/mips-5.h *** gcc-2.3.2/config/mips-5.h Sat Sep 26 18:02:54 1992 --- gcc-2.3.3/config/mips-5.h Sun Dec 6 07:57:31 1992 *************** *** 25,29 **** %{EL: %e-EL not supported} \ %{mips1} %{mips2} %{mips3} %{bestGnum} \ ! %{shared} %{non_shared} %{!shared: %{!non_shared: -non_shared}}" #include "mips.h" --- 25,30 ---- %{EL: %e-EL not supported} \ %{mips1} %{mips2} %{mips3} %{bestGnum} \ ! %{shared} %{non_shared} %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared: %{!non_shared: %{!call_shared: -non_shared}}}}" #include "mips.h" diff -rc2N gcc-2.3.2/config/mips-5bsd.h gcc-2.3.3/config/mips-5bsd.h *** gcc-2.3.2/config/mips-5bsd.h Sat Nov 7 21:26:53 1992 --- gcc-2.3.3/config/mips-5bsd.h Sun Dec 6 07:57:32 1992 *************** *** 39,43 **** %{EL: %e-EL not supported} \ %{mips1} %{mips2} %{mips3} %{bestGnum} \ ! %{shared} %{non_shared} %{!shared: %{!non_shared: -non_shared}} \ -systype /bsd43/ }" --- 39,44 ---- %{EL: %e-EL not supported} \ %{mips1} %{mips2} %{mips3} %{bestGnum} \ ! %{shared} %{non_shared} %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared: %{!non_shared: %{!call_shared: -non_shared}}}} \ -systype /bsd43/ }" diff -rc2N gcc-2.3.2/config/mips-5svr4.h gcc-2.3.3/config/mips-5svr4.h *** gcc-2.3.2/config/mips-5svr4.h Sat Nov 7 21:26:56 1992 --- gcc-2.3.3/config/mips-5svr4.h Sun Dec 6 07:57:32 1992 *************** *** 39,43 **** %{EL: %e-EL not supported} \ %{mips1} %{mips2} %{mips3} %{bestGnum} \ ! %{shared} %{non_shared} %{!shared: %{!non_shared: -non_shared}} \ -systype /svr4/}" --- 39,44 ---- %{EL: %e-EL not supported} \ %{mips1} %{mips2} %{mips3} %{bestGnum} \ ! %{shared} %{non_shared} %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared: %{!non_shared: %{!call_shared: -non_shared}}}} \ -systype /svr4/}" diff -rc2N gcc-2.3.2/config/mips-5sysv.h gcc-2.3.3/config/mips-5sysv.h *** gcc-2.3.2/config/mips-5sysv.h Sat Nov 7 21:26:59 1992 --- gcc-2.3.3/config/mips-5sysv.h Sun Dec 6 07:57:33 1992 *************** *** 39,43 **** %{EL: %e-EL not supported} \ %{mips1} %{mips2} %{mips3} %{bestGnum} \ ! %{shared} %{non_shared} %{!shared: %{!non_shared: -non_shared}} \ -systype /sysv/}" --- 39,44 ---- %{EL: %e-EL not supported} \ %{mips1} %{mips2} %{mips3} %{bestGnum} \ ! %{shared} %{non_shared} %{call_shared} %{no_archive} %{exact_version} \ ! %{!shared: %{!non_shared: %{!call_shared: -non_shared}}}} \ -systype /sysv/}" diff -rc2N gcc-2.3.2/config/mips.c gcc-2.3.3/config/mips.c *** gcc-2.3.2/config/mips.c Thu Nov 26 16:02:33 1992 --- gcc-2.3.3/config/mips.c Fri Dec 18 18:28:47 1992 *************** *** 2414,2417 **** --- 2414,2418 ---- rtx libname; /* SYMBOL_REF of library name or 0 */ { + static CUMULATIVE_ARGS zero_cum; tree param, next_param; *************** *** 2431,2437 **** } ! cum->gp_reg_found = 0; ! cum->arg_number = 0; ! cum->arg_words = 0; /* Determine if this function has variable arguments. This is --- 2432,2436 ---- } ! *cum = zero_cum; /* Determine if this function has variable arguments. This is *************** *** 2462,2466 **** if (TARGET_DEBUG_E_MODE) fprintf (stderr, ! "function_adv( {gp reg found = %d, arg # = %2d, words = %2d}, %4s, 0x%.8x, %d )\n", cum->gp_reg_found, cum->arg_number, cum->arg_words, GET_MODE_NAME (mode), type, named); --- 2461,2465 ---- if (TARGET_DEBUG_E_MODE) fprintf (stderr, ! "function_adv( {gp reg found = %d, arg # = %2d, words = %2d}, %4s, 0x%.8x, %d )\n\n", cum->gp_reg_found, cum->arg_number, cum->arg_words, GET_MODE_NAME (mode), type, named); *************** *** 2513,2518 **** --- 2512,2521 ---- int named; /* != 0 for normal args, == 0 for ... args */ { + rtx ret; int regbase = -1; int bias = 0; + int struct_p = ((type != (tree)0) + && (TREE_CODE (type) == RECORD_TYPE + || TREE_CODE (type) == UNION_TYPE)); if (TARGET_DEBUG_E_MODE) *************** *** 2568,2583 **** { if (TARGET_DEBUG_E_MODE) ! fprintf (stderr, "\n"); ! return 0; } ! if (regbase == -1) ! abort (); ! if (TARGET_DEBUG_E_MODE) ! fprintf (stderr, "%s\n", reg_names[regbase + cum->arg_words + bias]); ! return gen_rtx (REG, mode, regbase + cum->arg_words + bias); } --- 2571,2610 ---- { if (TARGET_DEBUG_E_MODE) ! fprintf (stderr, "%s\n", struct_p ? ", [struct]" : ""); ! ret = (rtx)0; } + else + { + if (regbase == -1) + abort (); ! ret = gen_rtx (REG, mode, regbase + cum->arg_words + bias); ! if (TARGET_DEBUG_E_MODE) ! fprintf (stderr, "%s%s\n", reg_names[regbase + cum->arg_words + bias], ! struct_p ? ", [struct]" : ""); ! ! /* The following is a hack in order to pass 1 byte structures ! the same way that the MIPS compiler does (namely by passing ! the structure in the high byte or half word of the register). ! This also makes varargs work. If we have such a structure, ! we save the adjustment RTL, and the call define expands will ! emit them. For the VOIDmode argument (argument after the ! last real argument, pass back a parallel vector holding each ! of the adjustments. */ ! ! if (struct_p && (mode == QImode || mode == HImode)) ! { ! rtx amount = GEN_INT (BITS_PER_WORD - GET_MODE_BITSIZE (mode)); ! rtx reg = gen_rtx (REG, SImode, regbase + cum->arg_words + bias); ! cum->adjust[ cum->num_adjusts++ ] = gen_ashlsi3 (reg, reg, amount); ! } ! } ! ! if (mode == VOIDmode && cum->num_adjusts > 0) ! ret = gen_rtx (PARALLEL, VOIDmode, gen_rtvec_v (cum->num_adjusts, cum->adjust)); ! return ret; } *************** *** 3733,3736 **** --- 3760,3829 ---- + /* Return TRUE if any register used in the epilogue is used. This to insure + any insn put into the epilogue delay slots is safe. */ + + int + epilogue_reg_mentioned_p (insn) + rtx insn; + { + register char *fmt; + register int i; + register enum rtx_code code; + register int regno; + + if (insn == (rtx)0) + return 0; + + if (GET_CODE (insn) == LABEL_REF) + return 0; + + code = GET_CODE (insn); + switch (code) + { + case REG: + regno = REGNO (insn); + if (regno == STACK_POINTER_REGNUM) + return 1; + + if (regno == FRAME_POINTER_REGNUM && frame_pointer_needed) + return 1; + + if (!call_used_regs[regno]) + return 1; + + if (regno != MIPS_TEMP1_REGNUM && regno != MIPS_TEMP2_REGNUM) + return 0; + + if (!current_frame_info.initialized) + compute_frame_size (get_frame_size ()); + + return (current_frame_info.total_size >= 32768); + + case SCRATCH: + case CC0: + case PC: + case CONST_INT: + case CONST_DOUBLE: + return 0; + } + + fmt = GET_RTX_FORMAT (code); + for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) + { + if (fmt[i] == 'E') + { + register int j; + for (j = XVECLEN (insn, i) - 1; j >= 0; j--) + if (epilogue_reg_mentioned_p (XVECEXP (insn, i, j))) + return 1; + } + else if (fmt[i] == 'e' && epilogue_reg_mentioned_p (XEXP (insn, i))) + return 1; + } + + return 0; + } + + /* Return the bytes needed to compute the frame pointer from the current stack pointer. *************** *** 3786,3790 **** */ ! unsigned long compute_frame_size (size) int size; /* # of var. bytes allocated */ --- 3879,3883 ---- */ ! long compute_frame_size (size) int size; /* # of var. bytes allocated */ *************** *** 3791,3805 **** { int regno; ! unsigned long total_size; /* # bytes that the entire frame takes up */ ! unsigned long var_size; /* # bytes that variables take up */ ! unsigned long args_size; /* # bytes that outgoing arguments take up */ ! unsigned long extra_size; /* # extra bytes */ ! unsigned int gp_reg_rounded; /* # bytes needed to store gp after rounding */ ! unsigned int gp_reg_size; /* # bytes needed to store gp regs */ ! unsigned int fp_reg_size; /* # bytes needed to store fp regs */ ! unsigned long mask; /* mask of saved gp registers */ ! unsigned long fmask; /* mask of saved fp registers */ ! int fp_inc; /* 1 or 2 depending on the size of fp regs */ ! int fp_bits; /* bitmask to use for each fp register */ gp_reg_size = 0; --- 3884,3898 ---- { int regno; ! long total_size; /* # bytes that the entire frame takes up */ ! long var_size; /* # bytes that variables take up */ ! long args_size; /* # bytes that outgoing arguments take up */ ! long extra_size; /* # extra bytes */ ! long gp_reg_rounded; /* # bytes needed to store gp after rounding */ ! long gp_reg_size; /* # bytes needed to store gp regs */ ! long fp_reg_size; /* # bytes needed to store fp regs */ ! long mask; /* mask of saved gp registers */ ! long fmask; /* mask of saved fp registers */ ! int fp_inc; /* 1 or 2 depending on the size of fp regs */ ! long fp_bits; /* bitmask to use for each fp register */ gp_reg_size = 0; *************** *** 3827,3831 **** { gp_reg_size += UNITS_PER_WORD; ! mask |= 1 << (regno - GP_REG_FIRST); } } --- 3920,3924 ---- { gp_reg_size += UNITS_PER_WORD; ! mask |= 1L << (regno - GP_REG_FIRST); } } *************** *** 3901,3940 **** ! /* Save/restore registers printing out the instructions to a file. */ ! void ! save_restore (file, gp_op, gp_2word_op, fp_op) ! FILE *file; /* stream to write to */ ! char *gp_op; /* operation to do on gp registers */ ! char *gp_2word_op; /* 2 word op to do on gp registers */ ! char *fp_op; /* operation to do on fp registers */ { int regno; ! unsigned long mask = current_frame_info.mask; ! unsigned long fmask = current_frame_info.fmask; ! unsigned long gp_offset; ! unsigned long fp_offset; ! unsigned long max_offset; ! char *base_reg; if (mask == 0 && fmask == 0) return; - base_reg = reg_names[STACK_POINTER_REGNUM]; - gp_offset = current_frame_info.gp_sp_offset; - fp_offset = current_frame_info.fp_sp_offset; - max_offset = (gp_offset > fp_offset) ? gp_offset : fp_offset; - - /* Deal with calling functions with a large structure. */ - if (max_offset >= 32768) - { - char *temp = reg_names[MIPS_TEMP2_REGNUM]; - fprintf (file, "\tli\t%s,%ld\n", temp, max_offset); - fprintf (file, "\taddu\t%s,%s,%s\n", temp, temp, base_reg); - base_reg = temp; - gp_offset = max_offset - gp_offset; - fp_offset = max_offset - fp_offset; - } - /* Save registers starting from high to low. The debuggers prefer at least the return register be stored at func+4, and also it --- 3994,4027 ---- ! /* Common code to emit the insns (or to write the instructions to a file) ! to save/restore registers. ! Other parts of the code assume that MIPS_TEMP1_REGNUM (aka large_reg) ! is not modified within save_restore_insns. */ ! ! #define BITSET_P(value,bit) (((value) & (1L << (bit))) != 0) ! ! static void ! save_restore_insns (store_p, large_reg, large_offset, file) ! int store_p; /* true if this is prologue */ ! rtx large_reg; /* register holding large offset constant or NULL */ ! long large_offset; /* large constant offset value */ ! FILE *file; /* file to write instructions to instead of making RTL */ { + long mask = current_frame_info.mask; + long fmask = current_frame_info.fmask; int regno; ! rtx base_reg_rtx; ! long base_offset; ! long gp_offset; ! long fp_offset; ! long end_offset; + if (frame_pointer_needed && !BITSET_P (mask, FRAME_POINTER_REGNUM - GP_REG_FIRST)) + abort (); + if (mask == 0 && fmask == 0) return; /* Save registers starting from high to low. The debuggers prefer at least the return register be stored at func+4, and also it *************** *** 3942,4031 **** register is reloaded in addition to return address. */ ! if (mask || frame_pointer_needed) { ! for (regno = GP_REG_LAST; regno >= GP_REG_FIRST; regno--) ! { ! if ((mask & (1L << (regno - GP_REG_FIRST))) != 0 ! || (regno == FRAME_POINTER_REGNUM && frame_pointer_needed)) ! { ! fprintf (file, "\t%s\t%s,%d(%s)\n", ! gp_op, reg_names[regno], ! gp_offset, base_reg); ! gp_offset -= UNITS_PER_WORD; ! } } - } ! if (fmask) ! { ! int fp_inc = (TARGET_FLOAT64) ? 1 : 2; ! for (regno = FP_REG_LAST-1; regno >= FP_REG_FIRST; regno -= fp_inc) { ! if ((fmask & (1L << (regno - FP_REG_FIRST))) != 0) { ! fprintf (file, "\t%s\t%s,%d(%s)\n", ! fp_op, reg_names[regno], fp_offset, base_reg); ! ! fp_offset -= 2*UNITS_PER_WORD; } } - } - } - - - /* Common code to emit the insns to save/restore registers. */ - - static void - save_restore_insns (store_p) - int store_p; /* true if this is prologue */ - { - int regno; - rtx base_reg_rtx = stack_pointer_rtx; - unsigned long mask = current_frame_info.mask; - unsigned long fmask = current_frame_info.fmask; - unsigned long gp_offset; - unsigned long fp_offset; - unsigned long max_offset; - if (mask == 0 && fmask == 0) - return; - - gp_offset = current_frame_info.gp_sp_offset; - fp_offset = current_frame_info.fp_sp_offset; - max_offset = (gp_offset > fp_offset) ? gp_offset : fp_offset; - - /* Deal with calling functions with a large structure. */ - if (max_offset >= 32768) - { - base_reg_rtx = gen_rtx (REG, Pmode, MIPS_TEMP2_REGNUM); - emit_move_insn (base_reg_rtx, GEN_INT (max_offset)); - emit_insn (gen_addsi3 (base_reg_rtx, base_reg_rtx, stack_pointer_rtx)); - gp_offset = max_offset - gp_offset; - fp_offset = max_offset - fp_offset; - } - - /* Save registers starting from high to low. The debuggers prefer - at least the return register be stored at func+4, and also it - allows us not to need a nop in the epilog if at least one - register is reloaded in addition to return address. */ - - if (mask || frame_pointer_needed) - { for (regno = GP_REG_LAST; regno >= GP_REG_FIRST; regno--) { ! if ((mask & (1L << (regno - GP_REG_FIRST))) != 0 ! || (regno == FRAME_POINTER_REGNUM && frame_pointer_needed)) { ! rtx reg_rtx = gen_rtx (REG, Pmode, regno); ! rtx mem_rtx = gen_rtx (MEM, Pmode, ! gen_rtx (PLUS, Pmode, base_reg_rtx, ! GEN_INT (gp_offset))); ! ! if (store_p) ! emit_move_insn (mem_rtx, reg_rtx); else ! emit_move_insn (reg_rtx, mem_rtx); gp_offset -= UNITS_PER_WORD; --- 4029,4110 ---- register is reloaded in addition to return address. */ ! /* Save GP registers if needed. */ ! if (mask) { ! /* Pick which pointer to use as a base register. For small ! frames, just use the stack pointer. Otherwise, use a ! temporary register. Save 2 cycles if the save area is near ! the end of a large frame, by reusing the constant created in ! the prologue/epilogue to adjust the stack frame. */ ! gp_offset = current_frame_info.gp_sp_offset; ! end_offset = gp_offset - (current_frame_info.gp_reg_size - UNITS_PER_WORD); ! ! if (gp_offset < 0 || end_offset < 0) ! fatal ("gp_offset (%ld) or end_offset (%ld) is less than zero.", ! gp_offset, end_offset); ! ! else if (gp_offset < 32768) ! { ! base_reg_rtx = stack_pointer_rtx; ! base_offset = 0; } ! else if (large_reg != (rtx)0 ! && (((unsigned long)(large_offset - gp_offset)) < 32768) ! && (((unsigned long)(large_offset - end_offset)) < 32768)) ! { ! base_reg_rtx = gen_rtx (REG, Pmode, MIPS_TEMP2_REGNUM); ! base_offset = large_offset; ! if (file == (FILE *)0) ! emit_insn (gen_addsi3 (base_reg_rtx, large_reg, stack_pointer_rtx)); ! else ! fprintf (file, "\taddu\t%s,%s,%s\n", ! reg_names[MIPS_TEMP2_REGNUM], ! reg_names[REGNO (large_reg)], ! reg_names[STACK_POINTER_REGNUM]); ! } ! else { ! base_reg_rtx = gen_rtx (REG, Pmode, MIPS_TEMP2_REGNUM); ! base_offset = gp_offset; ! if (file == (FILE *)0) { ! emit_move_insn (base_reg_rtx, GEN_INT (gp_offset)); ! emit_insn (gen_addsi3 (base_reg_rtx, base_reg_rtx, stack_pointer_rtx)); } + else + fprintf (file, "\tli\t%s,0x%.08lx\t# %ld\n\taddu\t%s,%s,%s\n", + reg_names[MIPS_TEMP2_REGNUM], + (long)base_offset, + (long)base_offset, + reg_names[MIPS_TEMP2_REGNUM], + reg_names[MIPS_TEMP2_REGNUM], + reg_names[STACK_POINTER_REGNUM]); } for (regno = GP_REG_LAST; regno >= GP_REG_FIRST; regno--) { ! if (BITSET_P (mask, regno - GP_REG_FIRST)) { ! if (file == (FILE *)0) ! { ! rtx reg_rtx = gen_rtx (REG, Pmode, regno); ! rtx mem_rtx = gen_rtx (MEM, Pmode, ! gen_rtx (PLUS, Pmode, base_reg_rtx, ! GEN_INT (gp_offset - base_offset))); ! ! if (store_p) ! emit_move_insn (mem_rtx, reg_rtx); ! else ! emit_move_insn (reg_rtx, mem_rtx); ! } else ! fprintf (file, "\t%s\t%s,%ld(%s)\n", ! (store_p) ? "sw" : "lw", ! reg_names[regno], ! gp_offset - base_offset, ! reg_names[REGNO(base_reg_rtx)]); gp_offset -= UNITS_PER_WORD; *************** *** 4033,4037 **** --- 4112,4122 ---- } } + else + { + base_reg_rtx = (rtx)0; /* Make sure these are initialzed */ + base_offset = 0; + } + /* Save floating point registers if needed. */ if (fmask) { *************** *** 4038,4055 **** int fp_inc = (TARGET_FLOAT64) ? 1 : 2; ! for (regno = FP_REG_LAST-1; regno >= FP_REG_FIRST; regno -= fp_inc) { ! if ((fmask & (1L << (regno - FP_REG_FIRST))) != 0) { ! rtx reg_rtx = gen_rtx (REG, DFmode, regno); ! rtx mem_rtx = gen_rtx (MEM, DFmode, ! gen_rtx (PLUS, Pmode, base_reg_rtx, ! GEN_INT (fp_offset))); ! if (store_p) ! emit_move_insn (mem_rtx, reg_rtx); else ! emit_move_insn (reg_rtx, mem_rtx); fp_offset -= 2*UNITS_PER_WORD; } --- 4123,4205 ---- int fp_inc = (TARGET_FLOAT64) ? 1 : 2; ! /* Pick which pointer to use as a base register. */ ! fp_offset = current_frame_info.fp_sp_offset; ! end_offset = fp_offset - (current_frame_info.fp_reg_size - UNITS_PER_WORD); ! ! if (fp_offset < 0 || end_offset < 0) ! fatal ("fp_offset (%ld) or end_offset (%ld) is less than zero.", ! fp_offset, end_offset); ! ! else if (fp_offset < 32768) { ! base_reg_rtx = stack_pointer_rtx; ! base_offset = 0; ! } ! ! else if (base_reg_rtx != (rtx)0 ! && (((unsigned long)(base_offset - fp_offset)) < 32768) ! && (((unsigned long)(base_offset - end_offset)) < 32768)) ! { ! ; /* already set up for gp registers above */ ! } ! ! else if (large_reg != (rtx)0 ! && (((unsigned long)(large_offset - fp_offset)) < 32768) ! && (((unsigned long)(large_offset - end_offset)) < 32768)) ! { ! base_reg_rtx = gen_rtx (REG, Pmode, MIPS_TEMP2_REGNUM); ! base_offset = large_offset; ! if (file == (FILE *)0) ! emit_insn (gen_addsi3 (base_reg_rtx, large_reg, stack_pointer_rtx)); ! else ! fprintf (file, "\taddu\t%s,%s,%s\n", ! reg_names[MIPS_TEMP2_REGNUM], ! reg_names[REGNO (large_reg)], ! reg_names[STACK_POINTER_REGNUM]); ! } ! ! else ! { ! base_reg_rtx = gen_rtx (REG, Pmode, MIPS_TEMP2_REGNUM); ! base_offset = fp_offset; ! if (file == (FILE *)0) { ! emit_move_insn (base_reg_rtx, GEN_INT (fp_offset)); ! emit_insn (gen_addsi3 (base_reg_rtx, base_reg_rtx, stack_pointer_rtx)); ! } ! else ! fprintf (file, "\tli\t%s,0x%.08lx\t# %ld\n\taddu\t%s,%s,%s\n", ! reg_names[MIPS_TEMP2_REGNUM], ! (long)base_offset, ! (long)base_offset, ! reg_names[MIPS_TEMP2_REGNUM], ! reg_names[MIPS_TEMP2_REGNUM], ! reg_names[STACK_POINTER_REGNUM]); ! } ! for (regno = FP_REG_LAST-1; regno >= FP_REG_FIRST; regno -= fp_inc) ! { ! if (BITSET_P (fmask, regno - FP_REG_FIRST)) ! { ! if (file == (FILE *)0) ! { ! rtx reg_rtx = gen_rtx (REG, DFmode, regno); ! rtx mem_rtx = gen_rtx (MEM, DFmode, ! gen_rtx (PLUS, Pmode, base_reg_rtx, ! GEN_INT (fp_offset - base_offset))); ! ! if (store_p) ! emit_move_insn (mem_rtx, reg_rtx); ! else ! emit_move_insn (reg_rtx, mem_rtx); ! } else ! fprintf (file, "\t%s\t%s,%ld(%s)\n", ! (store_p) ? "s.d" : "l.d", ! reg_names[regno], ! fp_offset - base_offset, ! reg_names[REGNO(base_reg_rtx)]); + fp_offset -= 2*UNITS_PER_WORD; } *************** *** 4066,4073 **** int size; { ! int tsize = current_frame_info.total_size; ASM_OUTPUT_SOURCE_FILENAME (file, DECL_SOURCE_FILE (current_function_decl)); ! ASM_OUTPUT_SOURCE_LINE (file, DECL_SOURCE_LINE (current_function_decl)); inside_function = 1; --- 4216,4225 ---- int size; { ! long tsize = current_frame_info.total_size; ASM_OUTPUT_SOURCE_FILENAME (file, DECL_SOURCE_FILE (current_function_decl)); ! ! if (debug_info_level != DINFO_LEVEL_TERSE) ! ASM_OUTPUT_SOURCE_LINE (file, DECL_SOURCE_LINE (current_function_decl)); inside_function = 1; *************** *** 4075,4078 **** --- 4227,4231 ---- assemble_name (file, current_function_name); fputs ("\n", file); + assemble_name (file, current_function_name); fputs (":\n", file); *************** *** 4111,4128 **** { int regno; ! int tsize; ! tree fndecl = current_function_decl; /* current... is tooo long */ ! tree fntype = TREE_TYPE (fndecl); ! tree fnargs = (TREE_CODE (fntype) != METHOD_TYPE) ? DECL_ARGUMENTS (fndecl) : 0; tree next_arg; tree cur_arg; - char *arg_name = (char *)0; CUMULATIVE_ARGS args_so_far; /* Determine the last argument, and get its name. */ for (cur_arg = fnargs; cur_arg != (tree)0; cur_arg = next_arg) { next_arg = TREE_CHAIN (cur_arg); if (next_arg == (tree)0) --- 4264,4318 ---- { int regno; ! long tsize; ! rtx tmp_rtx = (rtx)0; ! char *arg_name = (char *)0; ! tree fndecl = current_function_decl; ! tree fntype = TREE_TYPE (fndecl); ! tree fnargs = (TREE_CODE (fntype) != METHOD_TYPE) ? DECL_ARGUMENTS (fndecl) : 0; + rtx next_arg_reg; + int i; tree next_arg; tree cur_arg; CUMULATIVE_ARGS args_so_far; /* Determine the last argument, and get its name. */ + + INIT_CUMULATIVE_ARGS (args_so_far, fntype, (rtx)0); + regno = GP_ARG_FIRST; + for (cur_arg = fnargs; cur_arg != (tree)0; cur_arg = next_arg) { + tree type = DECL_ARG_TYPE (cur_arg); + enum machine_mode passed_mode = TYPE_MODE (type); + rtx entry_parm = FUNCTION_ARG (args_so_far, + passed_mode, + DECL_ARG_TYPE (cur_arg), + 1); + + if (entry_parm) + { + int words; + + /* passed in a register, so will get homed automatically */ + if (GET_MODE (entry_parm) == BLKmode) + words = (int_size_in_bytes (type) + 3) / 4; + else + words = (GET_MODE_SIZE (GET_MODE (entry_parm)) + 3) / 4; + + regno = REGNO (entry_parm) + words - 1; + } + else + { + regno = GP_ARG_LAST+1; + break; + } + + FUNCTION_ARG_ADVANCE (args_so_far, + passed_mode, + DECL_ARG_TYPE (cur_arg), + 1); + next_arg = TREE_CHAIN (cur_arg); if (next_arg == (tree)0) *************** *** 4135,4138 **** --- 4325,4353 ---- } + /* In order to pass small structures by value in registers + compatibly with the MIPS compiler, we need to shift the value + into the high part of the register. Function_arg has encoded a + PARALLEL rtx, holding a vector of adjustments to be made as the + next_arg_reg variable, so we split up the insns, and emit them + separately. */ + + next_arg_reg = FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1); + if (next_arg_reg != (rtx)0 && GET_CODE (next_arg_reg) == PARALLEL) + { + rtvec adjust = XVEC (next_arg_reg, 0); + int num = GET_NUM_ELEM (adjust); + + for (i = 0; i < num; i++) + { + rtx pattern = RTVEC_ELT (adjust, i); + if (GET_CODE (pattern) != SET + || GET_CODE (SET_SRC (pattern)) != ASHIFT) + abort_with_insn (pattern, "Insn is not a shift"); + + PUT_CODE (SET_SRC (pattern), ASHIFTRT); + emit_insn (pattern); + } + } + /* If this function is a varargs function, store any registers that would normally hold arguments ($4 - $7) on the stack. */ *************** *** 4139,4184 **** if ((TYPE_ARG_TYPES (fntype) != 0 && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) != void_type_node)) ! || (arg_name ! && (strcmp (arg_name, "__builtin_va_alist") == 0 ! || strcmp (arg_name, "va_alist") == 0))) { - tree parm; - - regno = GP_ARG_FIRST; - INIT_CUMULATIVE_ARGS (args_so_far, fntype, (rtx)0); - - for (parm = fnargs; (parm && (regno <= GP_ARG_LAST)); parm = TREE_CHAIN (parm)) - { - rtx entry_parm; - enum machine_mode passed_mode; - tree type; - - type = DECL_ARG_TYPE (parm); - passed_mode = TYPE_MODE (type); - entry_parm = FUNCTION_ARG (args_so_far, passed_mode, - DECL_ARG_TYPE (parm), 1); - - if (entry_parm) - { - int words; - - /* passed in a register, so will get homed automatically */ - if (GET_MODE (entry_parm) == BLKmode) - words = (int_size_in_bytes (type) + 3) / 4; - else - words = (GET_MODE_SIZE (GET_MODE (entry_parm)) + 3) / 4; - - regno = REGNO (entry_parm) + words - 1; - } - else - { - regno = GP_ARG_LAST+1; - break; - } - - FUNCTION_ARG_ADVANCE (args_so_far, passed_mode, - DECL_ARG_TYPE (parm), 1); - } - for (; regno <= GP_ARG_LAST; regno++) { --- 4354,4361 ---- if ((TYPE_ARG_TYPES (fntype) != 0 && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) != void_type_node)) ! || (arg_name != (char *)0 ! && ((arg_name[0] == '_' && strcmp (arg_name, "__builtin_va_alist") == 0) ! || (arg_name[0] == 'v' && strcmp (arg_name, "va_alist") == 0)))) { for (; regno <= GP_ARG_LAST; regno++) { *************** *** 4199,4203 **** if (tsize > 32767) { ! rtx tmp_rtx = gen_rtx (REG, SImode, MIPS_TEMP1_REGNUM); emit_move_insn (tmp_rtx, tsize_rtx); tsize_rtx = tmp_rtx; --- 4376,4380 ---- if (tsize > 32767) { ! tmp_rtx = gen_rtx (REG, SImode, MIPS_TEMP1_REGNUM); emit_move_insn (tmp_rtx, tsize_rtx); tsize_rtx = tmp_rtx; *************** *** 4206,4210 **** emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx, tsize_rtx)); ! save_restore_insns (TRUE); if (frame_pointer_needed) --- 4383,4387 ---- emit_insn (gen_subsi3 (stack_pointer_rtx, stack_pointer_rtx, tsize_rtx)); ! save_restore_insns (TRUE, tmp_rtx, tsize, (FILE *)0); if (frame_pointer_needed) *************** *** 4227,4231 **** int size; { ! int tsize; char *sp_str = reg_names[STACK_POINTER_REGNUM]; char *t1_str = reg_names[MIPS_TEMP1_REGNUM]; --- 4404,4408 ---- int size; { ! long tsize; char *sp_str = reg_names[STACK_POINTER_REGNUM]; char *t1_str = reg_names[MIPS_TEMP1_REGNUM]; *************** *** 4235,4238 **** --- 4412,4418 ---- int load_nop = FALSE; int load_only_r31; + rtx tmp_rtx = (rtx)0; + rtx restore_rtx; + int i; /* The epilogue does not depend on any registers, but the stack *************** *** 4315,4319 **** if (tsize > 32767) ! fprintf (file, "\tli\t%s,%d\n", t1_str, tsize); if (frame_pointer_needed) --- 4495,4502 ---- if (tsize > 32767) ! { ! fprintf (file, "\tli\t%s,0x%.08lx\t# %ld\n", t1_str, (long)tsize, (long)tsize); ! tmp_rtx = gen_rtx (REG, Pmode, MIPS_TEMP1_REGNUM); ! } if (frame_pointer_needed) *************** *** 4321,4325 **** sp_str, reg_names[FRAME_POINTER_REGNUM]); ! save_restore (file, "lw", "ld", "l.d"); load_only_r31 = (current_frame_info.mask == (1 << 31) --- 4504,4508 ---- sp_str, reg_names[FRAME_POINTER_REGNUM]); ! save_restore_insns (FALSE, tmp_rtx, tsize, file); load_only_r31 = (current_frame_info.mask == (1 << 31) *************** *** 4468,4477 **** mips_expand_epilogue () { ! int tsize = current_frame_info.total_size; rtx tsize_rtx = GEN_INT (tsize); if (tsize > 32767) { ! rtx tmp_rtx = gen_rtx (REG, SImode, MIPS_TEMP1_REGNUM); emit_move_insn (tmp_rtx, tsize_rtx); tsize_rtx = tmp_rtx; --- 4651,4661 ---- mips_expand_epilogue () { ! long tsize = current_frame_info.total_size; rtx tsize_rtx = GEN_INT (tsize); + rtx tmp_rtx = (rtx)0; if (tsize > 32767) { ! tmp_rtx = gen_rtx (REG, SImode, MIPS_TEMP1_REGNUM); emit_move_insn (tmp_rtx, tsize_rtx); tsize_rtx = tmp_rtx; *************** *** 4483,4487 **** emit_insn (gen_movsi (stack_pointer_rtx, frame_pointer_rtx)); ! save_restore_insns (FALSE); emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, tsize_rtx)); --- 4667,4671 ---- emit_insn (gen_movsi (stack_pointer_rtx, frame_pointer_rtx)); ! save_restore_insns (FALSE, tmp_rtx, tsize, (FILE *)0); emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, tsize_rtx)); diff -rc2N gcc-2.3.2/config/mips.h gcc-2.3.3/config/mips.h *** gcc-2.3.2/config/mips.h Sat Nov 21 07:54:16 1992 --- gcc-2.3.3/config/mips.h Fri Dec 18 18:28:51 1992 *************** *** 127,131 **** extern int cmp_op (); extern int cmp2_op (); ! extern unsigned long compute_frame_size (); extern void expand_block_move (); extern int equality_op (); --- 127,132 ---- extern int cmp_op (); extern int cmp2_op (); ! extern long compute_frame_size (); ! extern int epilogue_reg_mentioned_p (); extern void expand_block_move (); extern int equality_op (); *************** *** 483,487 **** /* Print subsidiary information on the compiler version in use. */ ! #define MIPS_VERSION "[AL 1.1, MM 29]" #ifndef MACHINE_TYPE --- 484,488 ---- /* Print subsidiary information on the compiler version in use. */ ! #define MIPS_VERSION "[AL 1.1, MM 33]" #ifndef MACHINE_TYPE *************** *** 1230,1233 **** --- 1231,1235 ---- arguments and any other information used in the calling sequence (such as pic). */ + #define MIPS_TEMP1_REGNUM (GP_REG_FIRST + 8) #define MIPS_TEMP2_REGNUM (GP_REG_FIRST + 9) *************** *** 1541,1559 **** struct mips_frame_info { ! unsigned long total_size; /* # bytes that the entire frame takes up */ ! unsigned long var_size; /* # bytes that variables take up */ ! unsigned long args_size; /* # bytes that outgoing arguments take up */ ! unsigned long extra_size; /* # bytes of extra gunk */ ! unsigned int gp_reg_size; /* # bytes needed to store gp regs */ ! unsigned int fp_reg_size; /* # bytes needed to store fp regs */ ! unsigned long mask; /* mask of saved gp registers */ ! unsigned long fmask; /* mask of saved fp registers */ ! long gp_save_offset; /* offset from vfp to store gp registers */ ! long fp_save_offset; /* offset from vfp to store fp registers */ ! unsigned long gp_sp_offset; /* offset from new sp to store gp registers */ ! unsigned long fp_sp_offset; /* offset from new sp to store fp registers */ ! int initialized; /* != 0 if frame size already calculated */ ! int num_gp; /* number of gp registers saved */ ! int num_fp; /* number of fp registers saved */ }; --- 1543,1561 ---- struct mips_frame_info { ! long total_size; /* # bytes that the entire frame takes up */ ! long var_size; /* # bytes that variables take up */ ! long args_size; /* # bytes that outgoing arguments take up */ ! long extra_size; /* # bytes of extra gunk */ ! int gp_reg_size; /* # bytes needed to store gp regs */ ! int fp_reg_size; /* # bytes needed to store fp regs */ ! long mask; /* mask of saved gp registers */ ! long fmask; /* mask of saved fp registers */ ! long gp_save_offset; /* offset from vfp to store gp registers */ ! long fp_save_offset; /* offset from vfp to store fp registers */ ! long gp_sp_offset; /* offset from new sp to store gp registers */ ! long fp_sp_offset; /* offset from new sp to store fp registers */ ! int initialized; /* != 0 if frame size already calculated */ ! int num_gp; /* number of gp registers saved */ ! int num_fp; /* number of fp registers saved */ }; *************** *** 1808,1814 **** typedef struct mips_args { ! int gp_reg_found; ! int arg_number; ! int arg_words; } CUMULATIVE_ARGS; --- 1810,1819 ---- typedef struct mips_args { ! int gp_reg_found; /* whether a gp register was found yet */ ! int arg_number; /* argument number */ ! int arg_words; /* # total words the arguments take */ ! int num_adjusts; /* number of adjustments made */ ! /* Adjustments made to args pass in regs. */ ! struct rtx_def *adjust[MAX_ARGS_IN_REGISTERS]; } CUMULATIVE_ARGS; *************** *** 1897,1903 **** (get_attr_dslot (INSN) == DSLOT_NO \ && get_attr_length (INSN) == 1 \ ! && ! reg_mentioned_p (stack_pointer_rtx, PATTERN (INSN)) \ ! && ! reg_mentioned_p (frame_pointer_rtx, PATTERN (INSN)) \ ! && ! reg_mentioned_p (arg_pointer_rtx, PATTERN (INSN))) /* Tell prologue and epilogue if register REGNO should be saved / restored. */ --- 1902,1906 ---- (get_attr_dslot (INSN) == DSLOT_NO \ && get_attr_length (INSN) == 1 \ ! && ! epilogue_reg_mentioned_p (PATTERN (INSN))) /* Tell prologue and epilogue if register REGNO should be saved / restored. */ *************** *** 2242,2248 **** address. The compiler has standard ways of doing so in all cases. In fact, it is safe for this macro to do nothing. But ! often a machine-dependent strategy can generate better code. */ ! #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {} --- 2245,2309 ---- address. The compiler has standard ways of doing so in all cases. In fact, it is safe for this macro to do nothing. But ! often a machine-dependent strategy can generate better code. ! ! For the MIPS, transform: ! ! memory(X + ) ! ! into: ! ! Y = & ~0x7fff; ! Z = X + Y ! memory (Z + ( & 0x7fff)); ! ! This is for CSE to find several similar references, and only use one Z. */ ! #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \ ! { \ ! register rtx xinsn = (X); \ ! \ ! if (TARGET_DEBUG_B_MODE) \ ! { \ ! GO_PRINTF ("\n========== LEGITIMIZE_ADDRESS\n"); \ ! GO_DEBUG_RTX (xinsn); \ ! } \ ! \ ! if (GET_CODE (xinsn) == PLUS) \ ! { \ ! register rtx xplus0 = XEXP (xinsn, 0); \ ! register rtx xplus1 = XEXP (xinsn, 1); \ ! register enum rtx_code code0 = GET_CODE (xplus0); \ ! register enum rtx_code code1 = GET_CODE (xplus1); \ ! \ ! if (code0 != REG && code1 == REG) \ ! { \ ! xplus0 = XEXP (xinsn, 1); \ ! xplus1 = XEXP (xinsn, 0); \ ! code0 = GET_CODE (xplus0); \ ! code1 = GET_CODE (xplus1); \ ! } \ ! \ ! if (code0 == REG && REG_OK_FOR_BASE_P (xplus0) \ ! && code1 == CONST_INT && !SMALL_INT (xplus1)) \ ! { \ ! rtx int_reg = gen_reg_rtx (Pmode); \ ! rtx ptr_reg = gen_reg_rtx (Pmode); \ ! \ ! emit_move_insn (int_reg, \ ! GEN_INT (INTVAL (xplus1) & ~ 0x7fff)); \ ! \ ! emit_insn (gen_rtx (SET, VOIDmode, \ ! ptr_reg, \ ! gen_rtx (PLUS, Pmode, xplus0, int_reg))); \ ! \ ! X = gen_rtx (PLUS, Pmode, ptr_reg, \ ! GEN_INT (INTVAL (xplus1) & 0x7fff)); \ ! goto WIN; \ ! } \ ! } \ ! \ ! if (TARGET_DEBUG_B_MODE) \ ! GO_PRINTF ("LEGITIMIZE_ADDRESS could not fix.\n"); \ ! } *************** *** 3468,3469 **** --- 3529,3542 ---- #define MIPS_MARK_STAB(code) ((code)+CODE_MASK) #define MIPS_UNMARK_STAB(code) ((code)-CODE_MASK) + + + /* Default definitions for size_t and ptrdiff_t. */ + + #ifndef SIZE_TYPE + #define SIZE_TYPE "unsigned int" + #endif + + #ifndef PTRDIFF_TYPE + #define PTRDIFF_TYPE "int" + #endif + diff -rc2N gcc-2.3.2/config/mips.md gcc-2.3.3/config/mips.md *** gcc-2.3.2/config/mips.md Sat Nov 21 07:54:18 1992 --- gcc-2.3.3/config/mips.md Fri Dec 18 18:28:49 1992 *************** *** 4044,4048 **** [(parallel [(call (match_operand 0 "memory_operand" "m") (match_operand 1 "" "i")) ! (clobber (match_operand 2 "" ""))])] ;; overwrite op2 with $31 "" " --- 4044,4050 ---- [(parallel [(call (match_operand 0 "memory_operand" "m") (match_operand 1 "" "i")) ! (clobber (reg:SI 31)) ! (use (match_operand 2 "" "")) ;; next_arg_reg ! (use (match_operand 3 "" ""))])] ;; struct_value_size_rtx "" " *************** *** 4050,4058 **** rtx addr; ! operands[2] = gen_rtx (REG, SImode, GP_REG_FIRST + 31); ! ! addr = XEXP (operands[0], 0); ! if (GET_CODE (addr) != REG && !CONSTANT_ADDRESS_P (addr)) ! XEXP (operands[0], 0) = force_reg (FUNCTION_MODE, addr); }") --- 4052,4082 ---- rtx addr; ! if (operands[0]) /* eliminate unused code warnings */ ! { ! addr = XEXP (operands[0], 0); ! if (GET_CODE (addr) != REG && !CONSTANT_ADDRESS_P (addr)) ! XEXP (operands[0], 0) = force_reg (FUNCTION_MODE, addr); ! ! /* In order to pass small structures by value in registers ! compatibly with the MIPS compiler, we need to shift the value ! into the high part of the register. Function_arg has encoded ! a PARALLEL rtx, holding a vector of adjustments to be made ! as the next_arg_reg variable, so we split up the insns, ! and emit them separately. */ ! ! if (operands[2] != (rtx)0 && GET_CODE (operands[2]) == PARALLEL) ! { ! rtvec adjust = XVEC (operands[2], 0); ! int num = GET_NUM_ELEM (adjust); ! int i; ! ! for (i = 0; i < num; i++) ! emit_insn (RTVEC_ELT (adjust, i)); ! } ! ! emit_call_insn (gen_call_internal (operands[0], operands[1], ! gen_rtx (REG, Pmode, GP_REG_FIRST + 31))); ! DONE; ! } }") *************** *** 4072,4077 **** { operands[0] = target; ! operands[1] = gen_rtx (REG, SImode, GP_REG_FIRST + 31); ! return \"%*%[li\\t%@,%0\\n\\tjal\\t%1,%@%]\"; } --- 4096,4100 ---- { operands[0] = target; ! return \"%*%[li\\t%@,%0\\n\\tjal\\t%2,%@%]\"; } *************** *** 4079,4084 **** { operands[0] = target; ! operands[1] = gen_rtx (REG, SImode, GP_REG_FIRST + 31); ! return \"%*jal\\t%1,%0\"; } }" --- 4102,4106 ---- { operands[0] = target; ! return \"%*jal\\t%2,%0\"; } }" *************** *** 4093,4097 **** (call (match_operand 1 "memory_operand" "m") (match_operand 2 "" "i"))) ! (clobber (match_operand 3 "" ""))])] ;; overwrite op3 with $31 "" " --- 4115,4120 ---- (call (match_operand 1 "memory_operand" "m") (match_operand 2 "" "i"))) ! (clobber (reg:SI 31)) ! (use (match_operand 3 "" ""))])] ;; next_arg_reg "" " *************** *** 4099,4107 **** rtx addr; ! operands[3] = gen_rtx (REG, SImode, GP_REG_FIRST + 31); - addr = XEXP (operands[1], 0); - if (GET_CODE (addr) != REG && !CONSTANT_ADDRESS_P (addr)) - XEXP (operands[1], 0) = force_reg (FUNCTION_MODE, addr); }") --- 4122,4154 ---- rtx addr; ! if (operands[0]) /* eliminate unused code warning */ ! { ! addr = XEXP (operands[1], 0); ! if (GET_CODE (addr) != REG && !CONSTANT_ADDRESS_P (addr)) ! XEXP (operands[1], 0) = force_reg (FUNCTION_MODE, addr); ! ! /* In order to pass small structures by value in registers ! compatibly with the MIPS compiler, we need to shift the value ! into the high part of the register. Function_arg has encoded ! a PARALLEL rtx, holding a vector of adjustments to be made ! as the next_arg_reg variable, so we split up the insns, ! and emit them separately. */ ! ! if (operands[3] != (rtx)0 && GET_CODE (operands[3]) == PARALLEL) ! { ! rtvec adjust = XVEC (operands[3], 0); ! int num = GET_NUM_ELEM (adjust); ! int i; ! ! for (i = 0; i < num; i++) ! emit_insn (RTVEC_ELT (adjust, i)); ! } ! ! emit_call_insn (gen_call_value_internal (operands[0], operands[1], operands[2], ! gen_rtx (REG, Pmode, GP_REG_FIRST + 31))); ! ! DONE; ! } }") *************** *** 4122,4127 **** { operands[1] = target; ! operands[2] = gen_rtx (REG, SImode, GP_REG_FIRST + 31); ! return \"%*%[li\\t%@,%1\\n\\tjal\\t%2,%@%]\"; } --- 4169,4173 ---- { operands[1] = target; ! return \"%*%[li\\t%@,%1\\n\\tjal\\t%3,%@%]\"; } *************** *** 4129,4134 **** { operands[1] = target; ! operands[2] = gen_rtx (REG, SImode, GP_REG_FIRST + 31); ! return \"%*jal\\t%2,%1\"; } }" --- 4175,4179 ---- { operands[1] = target; ! return \"%*jal\\t%3,%1\"; } }" diff -rc2N gcc-2.3.2/config/pa-ghpux.h gcc-2.3.3/config/pa-ghpux.h *** gcc-2.3.2/config/pa-ghpux.h Tue Nov 10 09:55:47 1992 --- gcc-2.3.3/config/pa-ghpux.h Sat Dec 12 09:38:17 1992 *************** *** 19,23 **** #ifndef TARGET_DEFAULT ! #define TARGET_DEFAULT 8 /* TARGET_SHARED_LIBS */ #endif --- 19,23 ---- #ifndef TARGET_DEFAULT ! #define TARGET_DEFAULT 0 #endif diff -rc2N gcc-2.3.2/config/pa-hpux.h gcc-2.3.3/config/pa-hpux.h *** gcc-2.3.2/config/pa-hpux.h Tue Nov 10 09:55:36 1992 --- gcc-2.3.3/config/pa-hpux.h Sat Dec 12 09:38:13 1992 *************** *** 19,23 **** #ifndef TARGET_DEFAULT ! #define TARGET_DEFAULT 8 /* TARGET_SHARED_LIBS */ #endif --- 19,23 ---- #ifndef TARGET_DEFAULT ! #define TARGET_DEFAULT 0 #endif diff -rc2N gcc-2.3.2/config/pa.c gcc-2.3.3/config/pa.c *** gcc-2.3.2/config/pa.c Mon Nov 16 08:52:10 1992 --- gcc-2.3.3/config/pa.c Tue Dec 8 11:54:25 1992 *************** *** 2521,2522 **** --- 2521,2537 ---- return GET_CODE (op) == SYMBOL_REF && FUNCTION_NAME_P (XSTR (op, 0)); } + + /* Return 1 if OP is suitable for the second add operand (the unshifed + operand) in an shadd instruction. Allow CONST_INT to work around + a reload bug. */ + int + shadd_operand (op, mode) + rtx op; + enum machine_mode mode; + { + if (GET_CODE (op) == REG) + return 1; + if (GET_CODE (op) == CONST_INT) + return 1; + return 0; + } diff -rc2N gcc-2.3.2/config/pa.h gcc-2.3.3/config/pa.h *** gcc-2.3.2/config/pa.h Mon Nov 9 12:20:43 1992 --- gcc-2.3.3/config/pa.h Fri Dec 11 01:52:55 1992 *************** *** 818,822 **** #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do { tree fntype = DECL_RESULT (DECL); \ tree tree_type = TREE_TYPE (DECL); \ tree parm; \ --- 818,822 ---- #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ ! do { tree fntype = TREE_TYPE (TREE_TYPE (DECL)); \ tree tree_type = TREE_TYPE (DECL); \ tree parm; \ diff -rc2N gcc-2.3.2/config/pa.md gcc-2.3.3/config/pa.md *** gcc-2.3.2/config/pa.md Mon Nov 23 14:51:30 1992 --- gcc-2.3.3/config/pa.md Sat Dec 12 08:41:55 1992 *************** *** 1454,1458 **** (define_insn "floatsisf2" [(set (match_operand:SF 0 "general_operand" "=fx") ! (float:SF (match_operand:SI 1 "register_operand" "fxr")))] "" "* return output_floatsisf2 (operands);" --- 1454,1458 ---- (define_insn "floatsisf2" [(set (match_operand:SF 0 "general_operand" "=fx") ! (float:SF (match_operand:SI 1 "register_operand" "fx")))] "" "* return output_floatsisf2 (operands);" *************** *** 1473,1477 **** (define_insn "floatsidf2" [(set (match_operand:DF 0 "general_operand" "=fx") ! (float:DF (match_operand:SI 1 "register_operand" "fxr")))] "" "* return output_floatsidf2 (operands);" --- 1473,1477 ---- (define_insn "floatsidf2" [(set (match_operand:DF 0 "general_operand" "=fx") ! (float:DF (match_operand:SI 1 "register_operand" "fx")))] "" "* return output_floatsidf2 (operands);" *************** *** 2040,2044 **** (set_attr "length" "1")]) ! ;; Using nonmemory_operand works around a bug in reload. For 2.4 fix ;; reload and use register_operand instead. (define_insn "" --- 2040,2044 ---- (set_attr "length" "1")]) ! ;; Using shadd_operand works around a bug in reload. For 2.4 fix ;; reload and use register_operand instead. (define_insn "" *************** *** 2046,2050 **** (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r") (const_int 2)) ! (match_operand:SI 1 "nonmemory_operand" "r")))] "" "sh1add %2,%1,%0") --- 2046,2050 ---- (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r") (const_int 2)) ! (match_operand:SI 1 "shadd_operand" "r")))] "" "sh1add %2,%1,%0") *************** *** 2054,2058 **** (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r") (const_int 4)) ! (match_operand:SI 1 "nonmemory_operand" "r")))] "" "sh2add %2,%1,%0") --- 2054,2058 ---- (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r") (const_int 4)) ! (match_operand:SI 1 "shadd_operand" "r")))] "" "sh2add %2,%1,%0") *************** *** 2062,2066 **** (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r") (const_int 8)) ! (match_operand:SI 1 "nonmemory_operand" "r")))] "" "sh3add %2,%1,%0") --- 2062,2066 ---- (plus:SI (mult:SI (match_operand:SI 2 "register_operand" "r") (const_int 8)) ! (match_operand:SI 1 "shadd_operand" "r")))] "" "sh3add %2,%1,%0") diff -rc2N gcc-2.3.2/config/pa1-ghpux.h gcc-2.3.3/config/pa1-ghpux.h *** gcc-2.3.2/config/pa1-ghpux.h Mon Nov 9 12:20:47 1992 --- gcc-2.3.3/config/pa1-ghpux.h Sat Dec 12 09:38:23 1992 *************** *** 24,28 **** #define HP_FP_ARG_DESCRIPTOR_REVERSED ! #define TARGET_DEFAULT 9 /* TARGET_SNAKE + TARGET_SHARED_LIBS */ #include "pa-ghpux.h" --- 24,28 ---- #define HP_FP_ARG_DESCRIPTOR_REVERSED ! #define TARGET_DEFAULT 1 /* TARGET_SNAKE */ #include "pa-ghpux.h" diff -rc2N gcc-2.3.2/config/pa1-hpux.h gcc-2.3.3/config/pa1-hpux.h *** gcc-2.3.2/config/pa1-hpux.h Mon Nov 9 12:20:52 1992 --- gcc-2.3.3/config/pa1-hpux.h Sat Dec 12 09:38:20 1992 *************** *** 24,28 **** #define HP_FP_ARG_DESCRIPTOR_REVERSED ! #define TARGET_DEFAULT 9 /* TARGET_SNAKE + TARGET_SHARED_LIBS */ #include "pa-hpux.h" --- 24,28 ---- #define HP_FP_ARG_DESCRIPTOR_REVERSED ! #define TARGET_DEFAULT 1 /* TARGET_SNAKE */ #include "pa-hpux.h" diff -rc2N gcc-2.3.2/config/romp.md gcc-2.3.3/config/romp.md *** gcc-2.3.2/config/romp.md Wed Nov 11 12:50:51 1992 --- gcc-2.3.3/config/romp.md Mon Dec 7 19:08:37 1992 *************** *** 308,314 **** (define_expand "reload_outqi" ! [(set (match_operand:QI 0 "symbolic_memory_operand" "=m") ! (match_operand:QI 1 "" "r")) ! (match_operand:SI 2 "" "=&b")] "" "") --- 308,314 ---- (define_expand "reload_outqi" ! [(parallel [(set (match_operand:QI 0 "symbolic_memory_operand" "=m") ! (match_operand:QI 1 "" "r")) ! (clobber (match_operand:SI 2 "" "=&b"))])] "" "") *************** *** 363,369 **** (define_expand "reload_outhi" ! [(set (match_operand:HI 0 "symbolic_memory_operand" "=m") ! (match_operand:HI 1 "" "r")) ! (match_operand:SI 2 "" "=&b")] "" "") --- 363,369 ---- (define_expand "reload_outhi" ! [(parallel [(set (match_operand:HI 0 "symbolic_memory_operand" "=m") ! (match_operand:HI 1 "" "r")) ! (clobber (match_operand:SI 2 "" "=&b"))])] "" "") diff -rc2N gcc-2.3.2/config/rs6000-aix32.h gcc-2.3.3/config/rs6000-aix32.h *** gcc-2.3.2/config/rs6000-aix32.h --- gcc-2.3.3/config/rs6000-aix32.h Wed Dec 2 15:39:24 1992 *************** *** 0 **** --- 1,27 ---- + /* Definitions of target machine for GNU compiler, + for IBM RS/6000 running AIX version 3.2. + Copyright (C) 1992 Free Software Foundation, Inc. + Contributed by Richard Kenner (kenner@nyu.edu) + + 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 "rs6000.h" + + /* AIX 3.2 defined _AIX32 as well as the others. */ + #undef CPP_PREDEFINES + #define CPP_PREDEFINES "-D_IBMR2 -D_AIX -D_AIX32" diff -rc2N gcc-2.3.2/config/rs6000.c gcc-2.3.3/config/rs6000.c *** gcc-2.3.2/config/rs6000.c Sat Sep 19 15:35:26 1992 --- gcc-2.3.3/config/rs6000.c Mon Dec 14 13:13:34 1992 *************** *** 1433,1436 **** --- 1433,1442 ---- if (! strcmp (language_string, "GNU C")) i = 0; + else if (! strcmp (language_string, "GNU F77")) + i = 1; + else if (! strcmp (language_string, "GNU Ada")) + i = 3; + else if (! strcmp (language_string, "GNU PASCAL")) + i = 2; else if (! strcmp (language_string, "GNU C++")) i = 9; diff -rc2N gcc-2.3.2/config/rs6000.h gcc-2.3.3/config/rs6000.h *** gcc-2.3.2/config/rs6000.h Fri Nov 27 18:15:44 1992 --- gcc-2.3.3/config/rs6000.h Wed Dec 16 19:23:20 1992 *************** *** 852,863 **** #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, CXT) \ { \ - emit_move_insn (gen_rtx (MEM, SImode, memory_address (SImode, ADDR)), \ - force_reg (SImode, FNADDR)); \ emit_move_insn (gen_rtx (MEM, SImode, \ ! memory_address (SImode, plus_constant (ADDR, 4))), \ ! gen_rtx (REG, SImode, 2)); \ emit_move_insn (gen_rtx (MEM, SImode, \ ! memory_address (SImode, plus_constant (ADDR, 8))), \ ! force_reg (SImode, CXT)); \ } --- 852,869 ---- #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, CXT) \ { \ emit_move_insn (gen_rtx (MEM, SImode, \ ! memory_address (SImode, (ADDR))), \ ! gen_rtx (MEM, SImode, \ ! memory_address (SImode, (FNADDR)))); \ emit_move_insn (gen_rtx (MEM, SImode, \ ! memory_address (SImode, \ ! plus_constant ((ADDR), 4))), \ ! gen_rtx (MEM, SImode, \ ! memory_address (SImode, \ ! plus_constant ((FNADDR), 4)))); \ ! emit_move_insn (gen_rtx (MEM, SImode, \ ! memory_address (SImode, \ ! plus_constant ((ADDR), 8))), \ ! force_reg (SImode, (CXT))); \ } diff -rc2N gcc-2.3.2/config/seq386.h gcc-2.3.3/config/seq386.h *** gcc-2.3.2/config/seq386.h Sun Sep 20 21:14:00 1992 --- gcc-2.3.3/config/seq386.h Thu Dec 24 15:03:17 1992 *************** *** 24,27 **** --- 24,35 ---- #include "bsd386.h" + /* By default, don't use IEEE compatible arithmetic comparisons + because the assembler can't handle the fucom insn. + Return float values in the 387. + (TARGET_80387 | TARGET_FLOAT_RETURNS_IN_80387) */ + + #undef TARGET_DEFAULT + #define TARGET_DEFAULT 0201 + /* Specify predefined symbols in preprocessor. */ *************** *** 77,81 **** #undef FUNCTION_PROFILER #define FUNCTION_PROFILER(FILE, LABELNO) \ ! fprintf (FILE, "\tmovl $LP%d,%%eax\n\tcall mcount\n", (LABELNO)); /* Assembler pseudo-op for shared data segment. */ --- 85,89 ---- #undef FUNCTION_PROFILER #define FUNCTION_PROFILER(FILE, LABELNO) \ ! fprintf (FILE, "\tmovl $.LP%d,%%eax\n\tcall mcount\n", (LABELNO)); /* Assembler pseudo-op for shared data segment. */ diff -rc2N gcc-2.3.2/config/sparc.c gcc-2.3.3/config/sparc.c *** gcc-2.3.2/config/sparc.c Tue Oct 13 14:05:17 1992 --- gcc-2.3.3/config/sparc.c Thu Dec 3 01:42:50 1992 *************** *** 750,754 **** /* Initialize every time through, since we can't easily know this to be permanent. */ ! global_offset_table = gen_rtx (SYMBOL_REF, Pmode, "*__GLOBAL_OFFSET_TABLE_"); pic_pc_rtx = gen_rtx (CONST, Pmode, gen_rtx (MINUS, Pmode, --- 750,754 ---- /* Initialize every time through, since we can't easily know this to be permanent. */ ! global_offset_table = gen_rtx (SYMBOL_REF, Pmode, "_GLOBAL_OFFSET_TABLE_"); pic_pc_rtx = gen_rtx (CONST, Pmode, gen_rtx (MINUS, Pmode, diff -rc2N gcc-2.3.2/config/sparc.md gcc-2.3.3/config/sparc.md *** gcc-2.3.2/config/sparc.md Tue Oct 13 14:29:53 1992 --- gcc-2.3.3/config/sparc.md Tue Dec 15 19:41:18 1992 *************** *** 3051,3054 **** --- 3051,3085 ---- ;; Return peepholes. First the "normal" ones + ;; ??? There are QImode, HImode, and SImode versions of this pattern. + ;; It might be possible to write one more general pattern instead of three. + + (define_insn "" + [(set (match_operand:QI 0 "restore_operand" "") + (match_operand:QI 1 "arith_operand" "rI")) + (return)] + "! TARGET_EPILOGUE" + "* + { + if (current_function_returns_struct) + return \"jmp %%i7+12\;restore %%g0,%1,%Y0\"; + else + return \"ret\;restore %%g0,%1,%Y0\"; + }" + [(set_attr "type" "multi")]) + + (define_insn "" + [(set (match_operand:HI 0 "restore_operand" "") + (match_operand:HI 1 "arith_operand" "rI")) + (return)] + "! TARGET_EPILOGUE" + "* + { + if (current_function_returns_struct) + return \"jmp %%i7+12\;restore %%g0,%1,%Y0\"; + else + return \"ret\;restore %%g0,%1,%Y0\"; + }" + [(set_attr "type" "multi")]) + (define_insn "" [(set (match_operand:SI 0 "restore_operand" "") diff -rc2N gcc-2.3.2/config/spc-sol2.h gcc-2.3.3/config/spc-sol2.h *** gcc-2.3.2/config/spc-sol2.h Sat Nov 21 17:16:21 1992 --- gcc-2.3.3/config/spc-sol2.h Thu Dec 3 01:42:54 1992 *************** *** 31,35 **** #undef ASM_SPEC #define ASM_SPEC \ ! "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s" /* However it appears that Solaris 2.0 uses the same reg numbering as --- 31,36 ---- #undef ASM_SPEC #define ASM_SPEC \ ! "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \ ! %{fpic:-K PIC} %{fPIC:-K PIC}" /* However it appears that Solaris 2.0 uses the same reg numbering as *************** *** 77,80 **** --- 78,96 ---- #define CTORS_SECTION_ASM_OP "\t.section\t\".ctors\",#alloc,#execinstr\n" #define DTORS_SECTION_ASM_OP "\t.section\t\".dtors\",#alloc,#execinstr\n" + + /* The native assembler can't compute differences between symbols in different + sections when generating pic code, so we must put jump tables in the + text section. */ + #define JUMP_TABLES_IN_TEXT_SECTION 1 + + /* Must use data section for relocatable constants when pic. */ + #undef SELECT_RTX_SECTION + #define SELECT_RTX_SECTION(MODE,RTX) \ + { \ + if (flag_pic && symbolic_operand (RTX)) \ + data_section (); \ + else \ + const_section (); \ + } /* The Solaris 2 assembler uses .skip, not .zero, so put this back. */ diff -rc2N gcc-2.3.2/config/x-i386s4 gcc-2.3.3/config/x-i386s4 *** gcc-2.3.2/config/x-i386s4 Wed Sep 2 02:16:00 1992 --- gcc-2.3.3/config/x-i386s4 Thu Dec 17 15:21:52 1992 *************** *** 1,9 **** RANLIB = : RANLIB_TEST = false - CC = rcc $(RCCFLAGS) - OLDCC = rcc $(RCCFLAGS) - RCCFLAGS = -Dunix -Di386 -DM_UNIX -DM_I386 -DNULL=0 - CCLIBFLAGS = CLIB = -lPW # Seems to be needed with SCO DEV3.2v4. --- 1,6 ---- RANLIB = : RANLIB_TEST = false CLIB = -lPW + CC = cc -nointl # Seems to be needed with SCO DEV3.2v4. diff -rc2N gcc-2.3.2/config/x-pa gcc-2.3.3/config/x-pa *** gcc-2.3.2/config/x-pa Thu Sep 17 14:52:08 1992 --- gcc-2.3.3/config/x-pa Wed Dec 9 19:03:21 1992 *************** *** 1 **** ! CC=/usr/local/gcc -DUSE_C_ALLOCA -D__inline= --- 1 ---- ! CC=/usr/local/bin/gcc -DUSE_C_ALLOCA -D__inline= diff -rc2N gcc-2.3.2/config/xm-i386sco.h gcc-2.3.3/config/xm-i386sco.h *** gcc-2.3.2/config/xm-i386sco.h Mon Jul 27 23:03:00 1992 --- gcc-2.3.3/config/xm-i386sco.h Sat Dec 12 20:42:58 1992 *************** *** 10,11 **** --- 10,19 ---- #define IO_BUFFER_SIZE (0x8000 - 1024) + + #ifndef __GNUC__ + /* The SCO compiler gets it wrong, and treats enumerated bitfields + as signed quantities, making it impossible to use an 8-bit enum + for compiling GNU C++. */ + #define ONLY_INT_FIELDS 1 + #define CODE_FIELD_BUG 1 + #endif diff -rc2N gcc-2.3.2/config/xm-plexus.h gcc-2.3.3/config/xm-plexus.h *** gcc-2.3.2/config/xm-plexus.h --- gcc-2.3.3/config/xm-plexus.h Fri Dec 4 19:15:09 1992 *************** *** 0 **** --- 1,20 ---- + /* Host environment for 68000's running System V. */ + + #include "xm-m68k.h" + + #define USG + #define bcopy(a,b,c) memcpy (b,a,c) + #define bzero(a,b) memset (a,0,b) + #define bcmp(a,b,c) memcmp (a,b,c) + + #define rindex strrchr + #define index strchr + + #ifndef __GNUC__ + #define USE_C_ALLOCA + #endif + + #ifndef _SIZE_T_ + typedef int size_t; + #define _SIZE_T_ + #endif diff -rc2N gcc-2.3.2/configure gcc-2.3.3/configure *** gcc-2.3.2/configure Wed Nov 25 16:23:16 1992 --- gcc-2.3.3/configure Mon Dec 21 02:58:23 1992 *************** *** 336,339 **** --- 336,340 ---- xmake_file=x-i386s4 tmake_file=t-i386sco + fixincludes=fixinc.sco broken_install=yes ;; *************** *** 609,612 **** --- 610,614 ---- tm_file=mot3300.h xm_file=xm-mot3300.h + use_collect2=yes header_files=math-68881.h ;; *************** *** 629,633 **** tm_file=plexus.h use_collect2=yes ! xm_file=xm-m68kv.h header_files=math-68881.h ;; --- 631,635 ---- tm_file=plexus.h use_collect2=yes ! xm_file=xm-plexus.h header_files=math-68881.h ;; *************** *** 976,980 **** use_collect2=yes ;; ! rs6000-*) xm_file=xm-rs6000.h tm_file=rs6000.h --- 978,987 ---- use_collect2=yes ;; ! rs6000-ibm-aix32) ! xm_file=xm-rs6000.h ! tm_file=rs6000-aix32.h ! use_collect2=yes ! ;; ! rs6000-ibm-aix*) xm_file=xm-rs6000.h tm_file=rs6000.h diff -rc2N gcc-2.3.2/cp-call.c gcc-2.3.3/cp-call.c *** gcc-2.3.2/cp-call.c Thu Nov 12 20:50:12 1992 --- gcc-2.3.3/cp-call.c Fri Dec 18 08:28:21 1992 *************** *** 583,593 **** harshness = convert_harshness (TREE_VALUE (ttf), TREE_TYPE (TREE_VALUE (tta)), TREE_VALUE (tta)); - /* Don't include the cost to convert the first parameter, as we know it - is the instance pointer that we know will be converted by itself - later. It could point to a derived class. */ - if (strike_index == 0 && TREE_CODE (TREE_TYPE (function)) == METHOD_TYPE - && !DECL_STATIC_FUNCTION_P (function)) - harshness = 0; - cp->harshness[strike_index] = harshness; if (EVIL_HARSHNESS (harshness) --- 583,586 ---- *************** *** 1915,1918 **** --- 1908,1912 ---- of the constructor. */ if (parms && TREE_CODE (TREE_VALUE (parms)) == CALL_EXPR + && TREE_OPERAND (TREE_VALUE (parms), 1) && TREE_CALLS_NEW (TREE_VALUE (TREE_OPERAND (TREE_VALUE (parms), 1)))) parms = build_tree_list (NULL_TREE, instance_ptr); diff -rc2N gcc-2.3.2/cp-cvt.c gcc-2.3.3/cp-cvt.c *** gcc-2.3.2/cp-cvt.c Thu Nov 12 20:50:31 1992 --- gcc-2.3.3/cp-cvt.c Fri Dec 11 22:32:50 1992 *************** *** 569,576 **** { if (rval == error_mark_node) ! { ! error ("ambiguous pointer conversion"); ! return rval; ! } } else if (type != intype --- 569,574 ---- { if (rval == error_mark_node) ! error ("ambiguous pointer conversion"); ! return rval; } else if (type != intype *************** *** 700,703 **** --- 698,707 ---- flags |= LOOKUP_PROTECTED_OK; return build_up_reference (reftype, rval, flags, decl!=NULL_TREE); + } + + if (rval) + { + /* If we found a way to convert earlier, then use it. */ + return rval; } diff -rc2N gcc-2.3.2/cp-decl.c gcc-2.3.3/cp-decl.c *** gcc-2.3.2/cp-decl.c Mon Nov 23 20:47:34 1992 --- gcc-2.3.3/cp-decl.c Fri Dec 4 19:16:51 1992 *************** *** 34,37 **** --- 34,38 ---- #include "cp-tree.h" #include "cp-lex.h" + #include #include #include "obstack.h" *************** *** 4098,4116 **** /* These are types that type_for_size and type_for_mode use. */ ! intQI_type_node = make_signed_type (8); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intQI_type_node)); ! intHI_type_node = make_signed_type (16); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intHI_type_node)); ! intSI_type_node = make_signed_type (32); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intSI_type_node)); ! intDI_type_node = make_signed_type (64); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intDI_type_node)); ! unsigned_intQI_type_node = make_unsigned_type (8); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intQI_type_node)); ! unsigned_intHI_type_node = make_unsigned_type (16); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intHI_type_node)); ! unsigned_intSI_type_node = make_unsigned_type (32); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intSI_type_node)); ! unsigned_intDI_type_node = make_unsigned_type (64); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intDI_type_node)); --- 4099,4117 ---- /* These are types that type_for_size and type_for_mode use. */ ! intQI_type_node = make_signed_type (GET_MODE_BITSIZE (QImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intQI_type_node)); ! intHI_type_node = make_signed_type (GET_MODE_BITSIZE (HImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intHI_type_node)); ! intSI_type_node = make_signed_type (GET_MODE_BITSIZE (SImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intSI_type_node)); ! intDI_type_node = make_signed_type (GET_MODE_BITSIZE (DImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, intDI_type_node)); ! unsigned_intQI_type_node = make_unsigned_type (GET_MODE_BITSIZE (QImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intQI_type_node)); ! unsigned_intHI_type_node = make_unsigned_type (GET_MODE_BITSIZE (HImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intHI_type_node)); ! unsigned_intSI_type_node = make_unsigned_type (GET_MODE_BITSIZE (SImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intSI_type_node)); ! unsigned_intDI_type_node = make_unsigned_type (GET_MODE_BITSIZE (DImode)); pushdecl (build_decl (TYPE_DECL, NULL_TREE, unsigned_intDI_type_node)); diff -rc2N gcc-2.3.2/cp-decl2.c gcc-2.3.3/cp-decl2.c *** gcc-2.3.2/cp-decl2.c Thu Nov 12 20:51:08 1992 --- gcc-2.3.3/cp-decl2.c Fri Dec 18 22:44:58 1992 *************** *** 679,683 **** arg_types = hash_tree_chain (const_integer_type, void_list_node); /* Build the overload name. It will look like e.g. 7Example. */ ! dbuf = build_overload_name (IDENTIFIER_TYPE_VALUE (cname), 1, 1); buf = (char *)alloca (strlen (dbuf) + sizeof (DESTRUCTOR_DECL_PREFIX)); bcopy (DESTRUCTOR_DECL_PREFIX, buf, len); --- 679,688 ---- arg_types = hash_tree_chain (const_integer_type, void_list_node); /* Build the overload name. It will look like e.g. 7Example. */ ! if (IDENTIFIER_TYPE_VALUE (cname)) ! dbuf = build_overload_name (IDENTIFIER_TYPE_VALUE (cname), 1, 1); ! else if (IDENTIFIER_LOCAL_VALUE (cname)) ! dbuf = build_overload_name (TREE_TYPE (IDENTIFIER_LOCAL_VALUE (cname)), 1, 1); ! else ! my_friendly_abort (346); buf = (char *)alloca (strlen (dbuf) + sizeof (DESTRUCTOR_DECL_PREFIX)); bcopy (DESTRUCTOR_DECL_PREFIX, buf, len); diff -rc2N gcc-2.3.2/cp-init.c gcc-2.3.3/cp-init.c *** gcc-2.3.2/cp-init.c Mon Nov 23 20:46:57 1992 --- gcc-2.3.3/cp-init.c Mon Dec 7 21:22:06 1992 *************** *** 2490,2500 **** /* Main friend processor. This is large, and for modularity purposes, ! has been removed from grokdeclarator. It always returns `void_type_node'. ! That value is in turn returned by `grokdeclarator' into cp-parse.y which ! sees that `void_type_node' was returned when trying to grok some ! declaration (in this case a friend declaration) appearing within a ! classtype definition. cp-parse.y knows that `void_type_node' means ! that a friend declaration was grok'ed, and thus it avoids adding ! anything new to the list of members of the current class in such cases. CTYPE is the class this friend belongs to. --- 2490,2496 ---- /* Main friend processor. This is large, and for modularity purposes, ! has been removed from grokdeclarator. It returns `void_type_node' ! to indicate that something happened, though a FIELD_DECL is ! not returned. CTYPE is the class this friend belongs to. *************** *** 2575,2583 **** make_decl_rtl (decl, NULL_TREE, 1); add_friend (current_class_type, decl); - /* decl = void_type_node; */ } else xref_friend (current_class_type, decl, ctype); - /* decl = void_type_node; */ DECL_FRIEND_P (decl) = 1; } --- 2571,2577 ---- *************** *** 2603,2607 **** else xref_friends (current_class_type, declarator, ctype); ! /* decl = void_type_node; */ } } --- 2597,2601 ---- else xref_friends (current_class_type, declarator, ctype); ! decl = void_type_node; } } *************** *** 2630,2634 **** TREE_GETS_DELETE (current_class_type) = 0; } ! /* decl = void_type_node; */ } /* A global friend. --- 2624,2628 ---- TREE_GETS_DELETE (current_class_type) = 0; } ! decl = void_type_node; } /* A global friend. *************** *** 2666,2670 **** TREE_OVERLOADED (declarator) = 1; decl = push_overloaded_decl (decl, 1); - /* decl = void_type_node; */ } else --- 2660,2663 ---- *************** *** 2695,2701 **** else make_friend_class (current_class_type, TREE_TYPE (decl)); ! /* decl = void_type_node; */ } ! return void_type_node; } --- 2688,2694 ---- else make_friend_class (current_class_type, TREE_TYPE (decl)); ! decl = void_type_node; } ! return decl; } diff -rc2N gcc-2.3.2/cp-method.c gcc-2.3.3/cp-method.c *** gcc-2.3.2/cp-method.c Mon Nov 23 20:46:24 1992 --- gcc-2.3.3/cp-method.c Fri Dec 18 23:51:07 1992 *************** *** 1354,1358 **** tree context; { ! tree name = DECL_ASSEMBLER_NAME (context); if (DECL_CONTEXT (context)) { --- 1354,1359 ---- tree context; { ! /* We use DECL_NAME here, because pushtag now sets the DECL_ASSEMBLER_NAME. */ ! tree name = DECL_NAME (context); if (DECL_CONTEXT (context)) { diff -rc2N gcc-2.3.2/cp-search.c gcc-2.3.3/cp-search.c *** gcc-2.3.2/cp-search.c Mon Nov 23 20:56:10 1992 --- gcc-2.3.3/cp-search.c Sun Dec 13 08:24:27 1992 *************** *** 1563,1568 **** } ! /* If NAME is defined in an enclosing class, complain about it and ! return the node. */ tree lookup_nested_field (name) --- 1563,1567 ---- } ! /* Try to find NAME inside a nested class. */ tree lookup_nested_field (name) *************** *** 1590,1594 **** if (id != NULL_TREE) { ! if (! TREE_STATIC (id) && TREE_TYPE (id) != error_mark_node) { error ("assignment to non-static member `%s' of enclosing class `%s'", --- 1589,1595 ---- if (id != NULL_TREE) { ! if (TREE_CODE (id) == FIELD_DECL ! && ! TREE_STATIC (id) ! && TREE_TYPE (id) != error_mark_node) { error ("assignment to non-static member `%s' of enclosing class `%s'", diff -rc2N gcc-2.3.2/cp-type2.c gcc-2.3.3/cp-type2.c *** gcc-2.3.2/cp-type2.c Thu Nov 12 20:53:23 1992 --- gcc-2.3.3/cp-type2.c Thu Dec 3 04:46:01 1992 *************** *** 1391,1401 **** my_friendly_assert (TREE_CODE (expr_as_ctor) == CALL_EXPR, 322); my_friendly_assert (TREE_CALLS_NEW (TREE_VALUE (parm)), 323); ! /* The default parameter could be a call to a constructor, though. */ ! if (TREE_CODE (TREE_VALUE (parm)) != SAVE_EXPR) ! { ! TREE_VALUE (parm) = NULL_TREE; ! expr_as_ctor = build_indirect_ref (expr_as_ctor, 0); ! TREE_HAS_CONSTRUCTOR (expr_as_ctor) = 1; ! } } return expr_as_ctor; --- 1391,1397 ---- my_friendly_assert (TREE_CODE (expr_as_ctor) == CALL_EXPR, 322); my_friendly_assert (TREE_CALLS_NEW (TREE_VALUE (parm)), 323); ! TREE_VALUE (parm) = NULL_TREE; ! expr_as_ctor = build_indirect_ref (expr_as_ctor, 0); ! TREE_HAS_CONSTRUCTOR (expr_as_ctor) = 1; } return expr_as_ctor; diff -rc2N gcc-2.3.2/cse.c gcc-2.3.3/cse.c *** gcc-2.3.2/cse.c Sun Oct 18 15:55:20 1992 --- gcc-2.3.3/cse.c Tue Dec 8 06:20:06 1992 *************** *** 329,332 **** --- 329,335 ---- static int *uid_cuid; + /* Highest UID in UID_CUID. */ + static int max_uid; + /* Get the cuid of an insn. */ *************** *** 2327,2332 **** If INSN is non-zero and we are replacing a pseudo with a hard register ! or vice versa, verify that INSN remains valid after we make our ! substitution. */ static rtx --- 2330,2338 ---- If INSN is non-zero and we are replacing a pseudo with a hard register ! or vice versa, validate_change is used to ensure that INSN remains valid ! after we make our substitution. The calls are made with IN_GROUP non-zero ! so apply_change_group must be called upon the outermost return from this ! function (unless INSN is zero). The result of apply_change_group can ! generally be discarded since the changes we are making are optional. */ static rtx *************** *** 5585,5589 **** someplace else, so it isn't worth cse'ing (and on 80386 is unsafe)! Ensure we invalidate the destination register. On the 80386 no ! other code would invalidate it since it is a fixed_reg. */ else if (GET_CODE (SET_SRC (x)) == CALL) --- 5591,5596 ---- someplace else, so it isn't worth cse'ing (and on 80386 is unsafe)! Ensure we invalidate the destination register. On the 80386 no ! other code would invalidate it since it is a fixed_reg. ! We need not check the return of apply_change_group; see canon_reg. */ else if (GET_CODE (SET_SRC (x)) == CALL) *************** *** 5628,5632 **** if (GET_CODE (y) == SET) { ! /* As above, we ignore unconditional jumps and call-insns. */ if (GET_CODE (SET_SRC (y)) == CALL) { --- 5635,5640 ---- if (GET_CODE (y) == SET) { ! /* As above, we ignore unconditional jumps and call-insns and ! ignore the result of apply_change_group. */ if (GET_CODE (SET_SRC (y)) == CALL) { *************** *** 5660,5663 **** --- 5668,5673 ---- else if (GET_CODE (y) == CALL) { + /* The result of apply_change_group can be ignored; see + canon_reg. */ canon_reg (y, insn); apply_change_group (); *************** *** 5682,5685 **** --- 5692,5696 ---- else if (GET_CODE (x) == CALL) { + /* The result of apply_change_group can be ignored; see canon_reg. */ canon_reg (x, insn); apply_change_group (); *************** *** 5741,5745 **** canonicalizations that would have worked individually not to be applied because some other canonicalization didn't work, but this should not ! occur often. */ apply_change_group (); --- 5752,5758 ---- canonicalizations that would have worked individually not to be applied because some other canonicalization didn't work, but this should not ! occur often. ! ! The result of apply_change_group can be ignored; see canon_reg. */ apply_change_group (); *************** *** 6202,6206 **** else if (validate_change (insn, &SET_SRC (sets[i].rtl), trial, 0)) { ! SET_SRC (sets[i].rtl) = canon_reg (SET_SRC (sets[i].rtl), insn); apply_change_group (); break; --- 6215,6224 ---- else if (validate_change (insn, &SET_SRC (sets[i].rtl), trial, 0)) { ! /* The result of apply_change_group can be ignored; see ! canon_reg. */ ! ! validate_change (insn, &SET_SRC (sets[i].rtl), ! canon_reg (SET_SRC (sets[i].rtl), insn), ! 1); apply_change_group (); break; *************** *** 7368,7375 **** nsets += 1; ! if (INSN_CUID (p) > high_cuid) high_cuid = INSN_CUID (p); ! if (INSN_CUID (p) < low_cuid) ! low_cuid = INSN_CUID(p); /* See if this insn is in our branch path. If it is and we are to --- 7386,7396 ---- nsets += 1; ! /* Ignore insns made by CSE; they cannot affect the boundaries of ! the basic block. */ ! ! if (INSN_UID (p) <= max_uid && INSN_CUID (p) > high_cuid) high_cuid = INSN_CUID (p); ! if (INSN_UID (p) <= max_uid && INSN_CUID (p) < low_cuid) ! low_cuid = INSN_CUID (p); /* See if this insn is in our branch path. If it is and we are to *************** *** 7555,7561 **** /* Find the largest uid. */ ! i = get_max_uid (); ! uid_cuid = (int *) alloca ((i + 1) * sizeof (int)); ! bzero (uid_cuid, (i + 1) * sizeof (int)); /* Compute the mapping from uids to cuids. --- 7576,7582 ---- /* Find the largest uid. */ ! max_uid = get_max_uid (); ! uid_cuid = (int *) alloca ((max_uid + 1) * sizeof (int)); ! bzero (uid_cuid, (max_uid + 1) * sizeof (int)); /* Compute the mapping from uids to cuids. diff -rc2N gcc-2.3.2/enquire.c gcc-2.3.3/enquire.c *** gcc-2.3.2/enquire.c Fri Jul 31 02:29:07 1992 --- gcc-2.3.3/enquire.c Thu Dec 10 17:51:27 1992 *************** *** 20,23 **** --- 20,24 ---- Support NO_LONG_DOUBLE_IO in f_define and f_rep; new fn fake_f_rep, Apr 92. Enclose -f output in #ifndef _FLOAT_H___, Richard Stallman, May 92. + Add #undef before every #define, Jim Wilson, Dec 92. COMPILING *************** *** 781,784 **** --- 782,786 ---- /* Produce a #define for a signed int type */ describe(desc, extra); + printf("#undef %s%s\n", sort, name); if (val >= 0) { printf("#define %s%s %ld%s\n", sort, name, val, mark); *************** *** 808,811 **** --- 810,814 ---- /* Produce a #define for an unsigned value */ describe(desc, extra); + printf("#undef %s%s\n", sort, name); printf("#define %s%s %lu%s%s\n", sort, name, val, U, mark); if (val != req) { *************** *** 822,825 **** --- 825,829 ---- /* Produce a #define for a float/double/long double */ describe(desc, extra); + printf ("#undef %s%s\n", sort, name); if (stdc) { #ifdef NO_LONG_DOUBLE_IO diff -rc2N gcc-2.3.2/expmed.c gcc-2.3.3/expmed.c *** gcc-2.3.2/expmed.c Thu Nov 26 10:33:39 1992 --- gcc-2.3.3/expmed.c Fri Dec 25 15:08:44 1992 *************** *** 403,412 **** { /* Optimization: Don't bother really extending VALUE ! if it has all the bits we will actually use. */ ! /* Avoid making subreg of a subreg, or of a mem. */ ! if (GET_CODE (value1) != REG) value1 = copy_to_reg (value1); ! value1 = gen_rtx (SUBREG, maxmode, value1, 0); } else if (!CONSTANT_P (value)) --- 403,418 ---- { /* Optimization: Don't bother really extending VALUE ! if it has all the bits we will actually use. However, ! if we must narrow it, be sure we do it correctly. */ ! if (GET_MODE_SIZE (GET_MODE (value)) < GET_MODE_SIZE (maxmode)) ! { ! /* Avoid making subreg of a subreg, or of a mem. */ ! if (GET_CODE (value1) != REG) value1 = copy_to_reg (value1); ! value1 = gen_rtx (SUBREG, maxmode, value1, 0); ! } ! else ! value1 = gen_lowpart (maxmode, value1); } else if (!CONSTANT_P (value)) diff -rc2N gcc-2.3.2/extend.texi gcc-2.3.3/extend.texi *** gcc-2.3.2/extend.texi Wed Oct 21 17:57:06 1992 --- gcc-2.3.3/extend.texi Fri Dec 4 19:02:39 1992 *************** *** 1152,1156 **** The keyword @code{__attribute__} allows you to specify special attributes when making a declaration. This keyword is followed by an ! attribute specification inside double parentheses. One attributes, @code{format}, is currently defined for functions. Others are implemented for variables and structure fields (@pxref{Function --- 1152,1156 ---- The keyword @code{__attribute__} allows you to specify special attributes when making a declaration. This keyword is followed by an ! attribute specification inside double parentheses. One attribute, @code{format}, is currently defined for functions. Others are implemented for variables and structure fields (@pxref{Function diff -rc2N gcc-2.3.2/fixinc.sco gcc-2.3.3/fixinc.sco *** gcc-2.3.2/fixinc.sco --- gcc-2.3.3/fixinc.sco Sun Dec 13 16:42:20 1992 *************** *** 0 **** --- 1,275 ---- + #! /bin/sh + # + # fixinc.sco -- Install modified versions of SCO system include + # files. + # + # Based on fixinc.svr4 script by Ron Guilmette (rfg@ncd.com) (SCO + # modifications by Ian Lance Taylor (ian@airs.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. + # + # This script munges the native include files provided with SCO + # 3.2v4 systems so as to provide a reasonable namespace when + # compiling with gcc. The header files by default do not + # provide many essential definitions and declarations if + # __STDC__ is 1. This script modifies the header files to check + # for __STRICT_ANSI__ being defined instead. Once munged, the + # resulting new system include files are placed in a directory + # that GNU C will search *before* searching the /usr/include + # directory. This script should work properly for most SCO + # 3.2v4 systems. For other types of systems, you should use the + # `fixincludes' or the `fixinc.svr4' script instead. + # + # See README-fixinc for more information. + + # Directory where gcc sources (and sometimes special include files) live. + SRCDIR=${3-${SRCDIR-.}} + + # Directory containing the original header files. + INPUT=${2-${INPUT-/usr/include}} + + # Fail if no arg to specify a directory for the output. + if [ x$1 = x ] + then echo fixincludes: no output directory specified + exit 1 + fi + + # Directory in which to store the results. + LIB=${1?"fixincludes: output directory not specified"} + + # Make sure it exists. + if [ ! -d $LIB ]; then + mkdir $LIB || exit 1 + fi + + ORIG_DIR=`pwd` + + # Make LIB absolute. + cd $LIB; LIB=`pwd` + + # This prevents /bin/ex from failing if the current terminal type is + # unrecognizable. + TERM=dumb + export TERM + # This prevents /bin/ex from failing if the EXINIT environment variable + # was set to something invalid. + EXINIT="" + export EXINIT + + 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 + LINKS=true + else + LINKS=false + fi + + 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 + if [ ! -d $LIB/$file ] + then mkdir $LIB/$file + fi + done + + # treetops gets an alternating list + # of old directories to copy + # and the new directories to copy to. + treetops="${INPUT} ${LIB}" + + if $LINKS; then + echo 'Making internal symbolic directory links' + for file in $files; do + dest=`ls -ld $file | sed -n 's/.*-> //p'` + if [ "$dest" ]; then + cwd=`pwd` + # In case $dest is relative, get to $file's dir first. + cd ${INPUT} + cd `echo ./$file | sed -n 's&[^/]*$&&p'` + # Check that the target directory exists. + # Redirections changed to avoid bug in sh on Ultrix. + (cd $dest) > /dev/null 2>&1 + if [ $? = 0 ]; then + cd $dest + # X gets the dir that the link actually leads to. + x=`pwd` + # If link leads back into ${INPUT}, + # make a similar link here. + if expr $x : "${INPUT}/.*" > /dev/null; then + # Y gets the actual target dir name, relative to ${INPUT}. + y=`echo $x | sed -n "s&${INPUT}/&&p"` + echo $file '->' $y ': Making link' + rm -fr ${LIB}/$file > /dev/null 2>&1 + ln -s ${LIB}/$y ${LIB}/$file > /dev/null 2>&1 + else + # If the link is to outside ${INPUT}, + # treat this directory as if it actually contained the files. + # This line used to have $dest instead of $x. + # $dest seemed to be wrong for links found in subdirectories + # of ${INPUT}. Does this change break anything? + treetops="$treetops $x ${LIB}/$file" + fi + fi + cd $cwd + fi + done + fi + + set - $treetops + while [ $# != 0 ]; do + # $1 is an old directory to copy, and $2 is the new directory to copy to. + echo "Finding header files in $1:" + cd ${INPUT} + cd $1 + files=`find . -name '*.h' -type f -print` + echo 'Checking header files:' + for file in $files; do + if egrep '!__STDC__' $file >/dev/null; then + echo Fixing $file + if [ -r $file ]; then + cp $file $2/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w $2/$file + + # The following have been removed from the sed command below + # because it is more useful to leave these things in. + # The only reason to remove them was for -pedantic, + # which isn't much of a reason. -- rms. + # /^[ ]*#[ ]*ident/d + + sed -e ' + s/!__STDC__/!defined (__STRICT_ANSI__)/g + ' $2/$file > $2/$file.sed + mv $2/$file.sed $2/$file + if cmp $file $2/$file >/dev/null 2>&1; then + echo Deleting $2/$file\; no fixes were needed. + rm $2/$file + fi + fi + fi + done + shift; shift + done + + # Fix first broken decl of getcwd present on some svr4 systems. + + 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 -e 's/getcwd(char \{0,\}\*, int)/getcwd(char *, size_t)/' $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 second broken decl of getcwd present on some svr4 systems. Also + # fix the incorrect decl of profil present on some svr4 systems. + + file=unistd.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 -e 's/getcwd(char \*, int)/getcwd(char *, size_t)/' $file_to_fix \ + | sed -e 's/profil(unsigned short \*, unsigned int, unsigned int, unsigned int)/profil(unsigned short *, size_t, int, unsigned)/' > /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 an error in this file: the #if says _cplusplus, not the double + # underscore __cplusplus that it should be + file=tinfo.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, __cplusplus macro + sed -e 's/[ ]_cplusplus/ __cplusplus/' ${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 + rm ${LIB}/$file + fi + fi + + echo 'Removing unneeded directories:' + cd $LIB + files=`find . -type d -print | sort -r` + for file in $files; do + rmdir $LIB/$file > /dev/null 2>&1 + done + + if $LINKS; then + echo 'Making internal symbolic non-directory links' + cd ${INPUT} + files=`find . -type l -print` + for file in $files; do + dest=`ls -ld $file | sed -n 's/.*-> //p'` + if expr "$dest" : '[^/].*' > /dev/null; then + target=${LIB}/`echo file | sed "s|[^/]*\$|$dest|"` + if [ -f $target ]; then + ln -s $dest ${LIB}/$file >/dev/null 2>&1 + fi + fi + done + fi + + cd ${ORIG_DIR} + + echo 'Replacing ' + rm -f ${LIB}/sys/byteorder.h + cp ${SRCDIR}/byteorder.h ${LIB}/sys/byteorder.h + + exit 0 diff -rc2N gcc-2.3.2/fixinc.svr4 gcc-2.3.3/fixinc.svr4 *** gcc-2.3.2/fixinc.svr4 Wed Nov 25 20:13:56 1992 --- gcc-2.3.3/fixinc.svr4 Thu Dec 24 18:26:30 1992 *************** *** 153,156 **** --- 153,165 ---- # /^[ ]*#[ ]*ident/d + # This code makes Solaris SCSI fail, because it changes the + # alignment within some critical structures. See . + # s/u_char\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/ + # Disable these also, since they probably aren't safe either. + # s/u_short\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/ + # s/ushort\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/ + # s/evcm_t\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/ + # s/Pbyte\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*SEQSIZ\)/unsigned int\1/ + # The change of u_char, etc, to u_int # applies to bit fields. *************** *** 174,182 **** /#[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/ - s/ushort\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/ - s/evcm_t\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*[0-9][0-9]*\)/u_int\1/ - s/Pbyte\([ ][ ]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ ]*:[ ]*SEQSIZ\)/unsigned int\1/ s/__STDC__ == 0/!defined (__STRICT_ANSI__)/g s/__STDC__ != 0/defined (__STRICT_ANSI__)/g --- 183,186 ---- *************** *** 904,907 **** --- 908,994 ---- fi + # Conditionalize some of on _KERNEL being defined. + + file=netinet/in.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 + if grep _KERNEL $file_to_fix > /dev/null; then + echo No change needed in $file_to_fix + else + sed -e '/#ifdef INKERNEL/i\ + #ifdef _KERNEL' \ + -e '/#endif[ ]*\/\* INKERNEL \*\//a\ + #endif /* _KERNEL */' \ + $file_to_fix > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + echo Fixed $file_to_fix + fi + fi + + # Conditionalize some of on __GNUC__ and __GNUG__. + + file=sys/endian.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 + if grep __GNUC__ $file_to_fix > /dev/null; then + echo No change needed in $file_to_fix + else + sed -e '/# ifdef __STDC__/i\ + # if !defined (__GNUC__) && !defined (__GNUG__)' \ + -e '/# include /s/ / /'\ + -e '/# include /i\ + # endif /* !defined (__GNUC__) && !defined (__GNUG__) */'\ + $file_to_fix > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + echo Fixed $file_to_fix + fi + fi + + # Commented out because tmcconne@sedona.intel.com says we don't clearly need it + # and the text in types.h is not erroneous. + ## In sys/types.h, don't name the enum for booleans. + # + #file=sys/types.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 + # if grep "enum boolean" $file_to_fix > /dev/null; then + # sed -e 's/enum boolean/enum/' ${LIB}/$file > ${LIB}/${file}.sed + # rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + # echo Fixed $file_to_fix + # else + # echo No change needed in $file_to_fix + # fi + #fi + # Remove useless extern keyword from struct forward declarations in # and *************** *** 1089,1092 **** --- 1176,1230 ---- fi fi + fi + + # In limits.h, put #ifndefs around things that are supposed to be defined + # in float.h to avoid redefinition errors if float.h is included first. + # Solaris 2.1 has this problem. + + file=limits.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 -e '/[ ]FLT_MIN[ ]/i\ + #ifndef FLT_MIN'\ + -e '/[ ]FLT_MIN[ ]/a\ + #endif'\ + -e '/[ ]FLT_MAX[ ]/i\ + #ifndef FLT_MAX'\ + -e '/[ ]FLT_MAX[ ]/a\ + #endif'\ + -e '/[ ]FLT_DIG[ ]/i\ + #ifndef FLT_DIG'\ + -e '/[ ]FLT_DIG[ ]/a\ + #endif'\ + -e '/[ ]DBL_MIN[ ]/i\ + #ifndef DBL_MIN'\ + -e '/[ ]DBL_MIN[ ]/a\ + #endif'\ + -e '/[ ]DBL_MAX[ ]/i\ + #ifndef DBL_MAX'\ + -e '/[ ]DBL_MAX[ ]/a\ + #endif'\ + -e '/[ ]DBL_DIG[ ]/i\ + #ifndef DBL_DIG'\ + -e '/[ ]DBL_DIG[ ]/a\ + #endif' $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 diff -rc2N gcc-2.3.2/fixincludes gcc-2.3.3/fixincludes *** gcc-2.3.2/fixincludes Thu Nov 26 23:26:44 1992 --- gcc-2.3.3/fixincludes Fri Dec 4 19:49:22 1992 *************** *** 334,338 **** fi ! # Fix this file to avoid interfering with stddef.h. file=sys/types.h if [ -r $file ] && [ ! -r ${LIB}/$file ]; then --- 334,339 ---- fi ! # Fix this file to avoid interfering with stddef.h, but don't mistakenly ! # match e.g. ssize_t present in AIX for the ps/2. file=sys/types.h if [ -r $file ] && [ ! -r ${LIB}/$file ]; then *************** *** 344,348 **** echo Fixing $file ex ${LIB}/$file </dev/null 2>&1; then echo Deleting ${LIB}/$file\; no fixes were needed. + rm ${LIB}/$file + fi + fi + + # Fix an error in this file: the #if says _cplusplus, not the double + # underscore __cplusplus that it should be + file=tinfo.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, __cplusplus macro + sed -e 's/[ ]_cplusplus/ __cplusplus/' ${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 rm ${LIB}/$file fi diff -rc2N gcc-2.3.2/function.c gcc-2.3.3/function.c *** gcc-2.3.2/function.c Mon Oct 26 14:38:37 1992 --- gcc-2.3.3/function.c Fri Dec 11 07:14:02 1992 *************** *** 639,645 **** /* Round frame offset to that alignment. */ #ifdef FRAME_GROWS_DOWNWARD ! frame_offset = FLOOR_ROUND (frame_offset, alignment); #else ! frame_offset = CEIL_ROUND (frame_offset, alignment); #endif --- 639,645 ---- /* Round frame offset to that alignment. */ #ifdef FRAME_GROWS_DOWNWARD ! function->frame_offset = FLOOR_ROUND (function->frame_offset, alignment); #else ! function->frame_offset = CEIL_ROUND (function->frame_offset, alignment); #endif diff -rc2N gcc-2.3.2/gcc.c gcc-2.3.3/gcc.c *** gcc-2.3.2/gcc.c Fri Nov 27 18:08:15 1992 --- gcc-2.3.3/gcc.c Tue Dec 8 08:32:53 1992 *************** *** 837,840 **** --- 837,852 ---- static int argbuf_index; + /* This is the list of suffixes and codes (%g/%u/%U) and the associated + temp file. Used only if MKTEMP_EACH_FILE. */ + + static struct temp_name { + char *suffix; /* suffix associated with the code. */ + int length; /* strlen (suffix). */ + int unique; /* Indicates whether %g or %u/%U was used. */ + char *filename; /* associated filename. */ + int filename_length; /* strlen (filename). */ + struct temp_name *next; + } *temp_names; + /* Number of commands executed so far. */ *************** *** 1131,1134 **** --- 1143,1148 ---- mktemp (temp_filename); temp_filename_length = strlen (temp_filename); + if (temp_filename_length == 0) + abort (); } *************** *** 2546,2559 **** else { ! #ifdef MKTEMP_EACH_FILE /* ??? This has a problem: the total number of ! values mktemp can return is limited. ! That matters for the names of object files. ! In 2.4, do something about that. */ ! /* Choose a new temp_filename, but get rid of the ! suffix that the spec wants to add to it. */ ! choose_temp_base (); while (*p == '.' || isalpha (*p)) p++; ! obstack_grow (&obstack, temp_filename, temp_filename_length); delete_this_arg = 1; #else --- 2560,2599 ---- else { ! #ifdef MKTEMP_EACH_FILE ! /* ??? This has a problem: the total number of ! values mktemp can return is limited. ! That matters for the names of object files. ! In 2.4, do something about that. */ ! struct temp_name *t; ! char *suffix = p; while (*p == '.' || isalpha (*p)) p++; ! ! /* See if we already have an association of %g/%u/%U and ! suffix. */ ! for (t = temp_names; t; t = t->next) ! if (t->length == p - suffix ! && strncmp (t->suffix, suffix, p - suffix) == 0 ! && t->unique == (c != 'g')) ! break; ! ! /* Make a new association if needed. %u requires one. */ ! if (t == 0 || c == 'u') ! { ! if (t == 0) ! { ! t = (struct temp_name *) xmalloc (sizeof (struct temp_name)); ! t->next = temp_names; ! temp_names = t; ! } ! t->length = p - suffix; ! t->suffix = save_string (suffix, p - suffix); ! t->unique = (c != 'g'); ! choose_temp_base (); ! t->filename = temp_filename; ! t->filename_length = temp_filename_length; ! } ! ! obstack_grow (&obstack, t->filename, t->filename_length); delete_this_arg = 1; #else diff -rc2N gcc-2.3.2/gcc.texi gcc-2.3.3/gcc.texi *** gcc-2.3.2/gcc.texi Sun Dec 6 08:10:28 1992 --- gcc-2.3.3/gcc.texi Wed Dec 16 14:56:13 1992 *************** *** 67,71 **** @center Richard M. Stallman @sp 3 ! @center last updated 24 Nov 1992 @sp 1 @c The version number appears twice more in this file. --- 67,71 ---- @center Richard M. Stallman @sp 3 ! @center last updated 16 Dec 1992 @sp 1 @c The version number appears twice more in this file. *************** *** 1257,1271 **** @item ! Profiling is not supported on the HP PA machine. Neither is debugging ! (@samp{-g}), unless you use the preliminary GNU tools ! (@pxref{Installation}). @item - GNU CC on the HP PA handles variadic function arguments using a calling - convention incompatible with the HP compiler. This is only a problem - for routines that take @code{va_list} as parameters, such as - @code{vprintf}. This may be fixed eventually. - - @item The HP-UX linker has a bug which can cause programs which make use of @code{const} variables to fail in unusual ways. If your program makes --- 1257,1264 ---- @item ! Debugging (@samp{-g}) is not supported on the HP PA machine, unless you use ! the preliminary GNU tools (@pxref{Installation}). @item The HP-UX linker has a bug which can cause programs which make use of @code{const} variables to fail in unusual ways. If your program makes *************** *** 1290,1293 **** --- 1283,1290 ---- Taking the address of a label may generate errors from the HP-UX PA assembler. GAS for the PA does not have this problem. + + @item + GNU CC produced code will not yet link against HP-UX 8.0 shared libraries. + We expect to fix this problem in GNU CC 2.4. @item diff -rc2N gcc-2.3.2/getopt.c gcc-2.3.3/getopt.c *** gcc-2.3.2/getopt.c Fri Nov 27 23:54:51 1992 --- gcc-2.3.3/getopt.c Sat Dec 26 04:55:25 1992 *************** *** 20,23 **** --- 20,27 ---- Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif + /* AIX requires this to be the first thing in the file. */ #ifdef __GNUC__ diff -rc2N gcc-2.3.2/getopt1.c gcc-2.3.3/getopt1.c *** gcc-2.3.2/getopt1.c Fri Nov 27 23:54:52 1992 --- gcc-2.3.3/getopt1.c Sat Dec 26 04:55:27 1992 *************** *** 16,19 **** --- 16,23 ---- Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif + #include "getopt.h" diff -rc2N gcc-2.3.2/getpwd.c gcc-2.3.3/getpwd.c *** gcc-2.3.2/getpwd.c Thu Aug 20 14:49:22 1992 --- gcc-2.3.3/getpwd.c Sat Dec 19 01:32:08 1992 *************** *** 60,64 **** --- 60,66 ---- int e = errno; free (p); + #ifdef ERANGE if (e != ERANGE) + #endif { errno = failure_errno = e; diff -rc2N gcc-2.3.2/integrate.c gcc-2.3.3/integrate.c *** gcc-2.3.2/integrate.c Wed Nov 25 13:03:18 1992 --- gcc-2.3.3/integrate.c Tue Dec 8 08:32:40 1992 *************** *** 1218,1225 **** rtx copy; ! rtx note = emit_note (DECL_SOURCE_FILE (formal), ! DECL_SOURCE_LINE (formal)); ! if (note) ! RTX_INTEGRATED_P (note) = 1; arg_trees[i] = arg; --- 1218,1230 ---- rtx copy; ! /* Make sure this formal has some correspondence in the users code ! * before emitting any line notes for it. */ ! if (DECL_SOURCE_LINE (formal)) ! { ! rtx note = emit_note (DECL_SOURCE_FILE (formal), ! DECL_SOURCE_LINE (formal)); ! if (note) ! RTX_INTEGRATED_P (note) = 1; ! } arg_trees[i] = arg; diff -rc2N gcc-2.3.2/invoke.texi gcc-2.3.3/invoke.texi *** gcc-2.3.2/invoke.texi Sat Nov 21 10:24:41 1992 --- gcc-2.3.3/invoke.texi Sat Dec 12 09:38:08 1992 *************** *** 2582,2592 **** @item -mshared-libs ! Generate code that can be linked against HP-UX shared libraries. This is the ! default in HP-UX 8.0. @item -mno-shared-libs ! Don't generate code that will be linked against shared libraries. This may be ! necessary if the emitted object files will be linked on a system older than ! HP-UX 8.0. @item -mlong-calls --- 2582,2591 ---- @item -mshared-libs ! Generate code that can be linked against HP-UX shared libraries. This option ! is not fully function yet, and is not on by default for any PA target. @item -mno-shared-libs ! Don't generate code that will be linked against shared libraries. This is ! the default for all PA targets. @item -mlong-calls diff -rc2N gcc-2.3.2/local-alloc.c gcc-2.3.3/local-alloc.c *** gcc-2.3.2/local-alloc.c Wed Nov 4 07:21:51 1992 --- gcc-2.3.3/local-alloc.c Tue Dec 1 13:43:22 1992 *************** *** 861,866 **** 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; } --- 861,866 ---- insn in the updates below. If this is not correct, no great harm is done. */ ! reg_n_refs[dregno] -= loop_depth; ! reg_n_refs[sregno] += loop_depth; } diff -rc2N gcc-2.3.2/loop.c gcc-2.3.3/loop.c *** gcc-2.3.2/loop.c Fri Oct 23 02:01:59 1992 --- gcc-2.3.3/loop.c Fri Dec 11 07:13:48 1992 *************** *** 6387,6418 **** return 0; ! /* Canonicalize any ordered comparison with integers involving equality. */ ! if (GET_CODE (op1) == CONST_INT) { HOST_WIDE_INT const_val = INTVAL (op1); unsigned HOST_WIDE_INT uconst_val = const_val; switch (code) ! { ! case LE: ! code = LT; ! op1 = GEN_INT (const_val + 1); ! break; ! case GE: ! code = GT; ! op1 = GEN_INT (const_val - 1); ! break; ! case LEU: ! code = LTU; ! op1 = GEN_INT (uconst_val + 1); ! break; ! case GEU: ! code = GTU; ! op1 = GEN_INT (uconst_val - 1); ! break; ! } } --- 6387,6427 ---- return 0; ! /* Canonicalize any ordered comparison with integers involving equality ! if we can do computations in the relevant mode and we do not ! overflow. */ ! ! if (GET_CODE (op1) == CONST_INT ! && GET_MODE (op0) != VOIDmode ! && GET_MODE_BITSIZE (GET_MODE (op0)) <= HOST_BITS_PER_WIDE_INT) { HOST_WIDE_INT const_val = INTVAL (op1); unsigned HOST_WIDE_INT uconst_val = const_val; + unsigned HOST_WIDE_INT max_val + = (unsigned HOST_WIDE_INT) GET_MODE_MASK (GET_MODE (op0)); switch (code) ! { ! case LE: ! if (const_val != max_val >> 1) ! code = LT, op1 = GEN_INT (const_val + 1); ! break; ! case GE: ! if (const_val ! != (((HOST_WIDE_INT) 1 ! << (GET_MODE_BITSIZE (GET_MODE (op0)) - 1)))) ! code = GT, op1 = GEN_INT (const_val - 1); ! break; ! case LEU: ! if (uconst_val != max_val) ! code = LTU, op1 = GEN_INT (uconst_val + 1); ! break; ! case GEU: ! if (uconst_val != 0) ! code = GTU, op1 = GEN_INT (uconst_val - 1); ! break; ! } } diff -rc2N gcc-2.3.2/objc-actions.c gcc-2.3.3/objc-actions.c *** gcc-2.3.2/objc-actions.c Mon Nov 9 12:38:39 1992 --- gcc-2.3.3/objc-actions.c Sat Dec 19 04:03:27 1992 *************** *** 2952,2955 **** --- 2952,2956 ---- encode_type (type, OBJC_ENCODE_INLINE_DEFS); + obstack_1grow (&util_obstack, 0); /* null terminate string */ string = obstack_finish (&util_obstack); *************** *** 3750,3774 **** case RECORD_TYPE: { ! if (*obstack_next_free (&util_obstack) == '^' ! || format != OBJC_ENCODE_INLINE_DEFS) { ! /* we have a reference - this is a NeXT extension-- ! or we don't want the details. */ ! if (TYPE_NAME (type) ! && (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE)) { ! obstack_1grow (&util_obstack, '{'); ! obstack_grow (&util_obstack, IDENTIFIER_POINTER (TYPE_NAME (type)), strlen (IDENTIFIER_POINTER (TYPE_NAME (type)))); - obstack_1grow (&util_obstack, '}'); } else /* we have an untagged structure or a typedef */ ! obstack_grow (&util_obstack, "{?}", 3); } else { tree fields = TYPE_FIELDS (type); ! obstack_1grow (&util_obstack, '{'); for ( ; fields; fields = TREE_CHAIN (fields)) encode_field_decl (fields, format); --- 3751,3786 ---- case RECORD_TYPE: { ! int have_pointer = 0; ! ! if (obstack_object_size (&util_obstack) > 0 ! && *(obstack_next_free (&util_obstack)-1) == '^') ! have_pointer = 1; ! ! obstack_1grow (&util_obstack, '{'); ! if (TYPE_NAME (type)) { ! if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) { ! obstack_grow (&util_obstack, IDENTIFIER_POINTER (TYPE_NAME (type)), strlen (IDENTIFIER_POINTER (TYPE_NAME (type)))); } else /* we have an untagged structure or a typedef */ ! { ! obstack_1grow (&util_obstack, '?'); ! } } + + if (have_pointer + || format == OBJC_ENCODE_DONT_INLINE_DEFS) + { + /* we have a pointer + or we don't want the details. */ + obstack_1grow (&util_obstack, '}'); + } else { tree fields = TYPE_FIELDS (type); ! obstack_1grow (&util_obstack, '='); for ( ; fields; fields = TREE_CHAIN (fields)) encode_field_decl (fields, format); *************** *** 3777,3806 **** break; } case UNION_TYPE: { ! if (*obstack_next_free (&util_obstack) == '^' ! || format != OBJC_ENCODE_INLINE_DEFS) { ! /* we have a reference - this is a NeXT extension-- ! or we don't want the details. */ ! if (TYPE_NAME (type) ! && (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE)) { ! obstack_1grow (&util_obstack, '<'); ! obstack_grow (&util_obstack, IDENTIFIER_POINTER (TYPE_NAME (type)), strlen (IDENTIFIER_POINTER (TYPE_NAME (type)))); - obstack_1grow (&util_obstack, '>'); } else /* we have an untagged structure or a typedef */ ! obstack_grow (&util_obstack, "", 3); } else { tree fields = TYPE_FIELDS (type); - obstack_1grow (&util_obstack, '<'); for ( ; fields; fields = TREE_CHAIN (fields)) encode_field_decl (fields, format); ! obstack_1grow (&util_obstack, '>'); } break; --- 3789,3829 ---- break; } + case UNION_TYPE: { ! int have_pointer = 0; ! ! if (obstack_object_size (&util_obstack) > 0 ! && *(obstack_next_free (&util_obstack)-1) == '^') ! have_pointer = 1; ! ! obstack_1grow (&util_obstack, '('); ! if (have_pointer && TYPE_NAME (type)) { ! if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) { ! obstack_grow (&util_obstack, IDENTIFIER_POINTER (TYPE_NAME (type)), strlen (IDENTIFIER_POINTER (TYPE_NAME (type)))); } else /* we have an untagged structure or a typedef */ ! { ! obstack_1grow (&util_obstack, '?'); ! } } + + if (have_pointer + || format == OBJC_ENCODE_DONT_INLINE_DEFS) + { + /* we have a pointer + or we don't want the details. */ + obstack_1grow (&util_obstack, ')'); + } else { tree fields = TYPE_FIELDS (type); for ( ; fields; fields = TREE_CHAIN (fields)) encode_field_decl (fields, format); ! obstack_1grow (&util_obstack, ')'); } break; *************** *** 3807,3810 **** --- 3830,3834 ---- } + case ENUMERAL_TYPE: obstack_1grow (&util_obstack, 'i'); *************** *** 4968,4972 **** --- 4992,5000 ---- } + /* If we are using an array of selectors, we must always + finish up the array decl even if no selectors were used. */ + #ifndef OBJC_SELECTORS_WITHOUT_LABELS if (sel_ref_chain) + #endif build_selector_translation_table (); diff -rc2N gcc-2.3.2/optabs.c gcc-2.3.3/optabs.c *** gcc-2.3.2/optabs.c Thu Nov 26 23:12:46 1992 --- gcc-2.3.3/optabs.c Sun Dec 6 16:26:10 1992 *************** *** 970,977 **** emit_move_insn (imagr, res); } ! else /* Divider is of complex type */ { /* X/(a+ib) */ ! rtx divider; rtx real_t; rtx imag_t; --- 970,977 ---- emit_move_insn (imagr, res); } ! else /* Divisor is of complex type */ { /* X/(a+ib) */ ! rtx divisor; rtx real_t; rtx imag_t; *************** *** 979,984 **** optab mulopt = unsignedp ? umul_widen_optab : smul_optab; ! /* Divider: a*a + b*b */ ! divider = expand_binop (submode, add_optab, expand_binop (submode, mulopt, real1, real1, --- 979,984 ---- optab mulopt = unsignedp ? umul_widen_optab : smul_optab; ! /* Divisor: c*c + d*d */ ! divisor = expand_binop (submode, add_optab, expand_binop (submode, mulopt, real1, real1, *************** *** 989,995 **** 0, unsignedp, methods); ! if (! imag0) /* ((c)(a-ib))/divider */ ! { ! /* Calculate the divident */ real_t = expand_binop (submode, mulopt, real0, real1, 0, unsignedp, methods); --- 989,995 ---- 0, unsignedp, methods); ! if (! imag0) /* ((a)(c-id))/divisor */ ! { /* (a+i0) / (c+id) = (ac/(cc+dd)) + i(-ad/(cc+dd)) */ ! /* Calculate the dividend */ real_t = expand_binop (submode, mulopt, real0, real1, 0, unsignedp, methods); *************** *** 1001,1007 **** 0, unsignedp); } ! else /* ((c+id)(a-ib))/divider */ { ! /* Calculate the divident */ real_t = expand_binop (submode, add_optab, expand_binop (submode, mulopt, --- 1001,1007 ---- 0, unsignedp); } ! else /* ((a+ib)(c-id))/divider */ { ! /* Calculate the dividend */ real_t = expand_binop (submode, add_optab, expand_binop (submode, mulopt, *************** *** 1015,1022 **** imag_t = expand_binop (submode, sub_optab, expand_binop (submode, mulopt, ! real0, imag1, 0, unsignedp, methods), expand_binop (submode, mulopt, ! real1, imag0, 0, unsignedp, methods), 0, unsignedp, methods); --- 1015,1022 ---- imag_t = expand_binop (submode, sub_optab, expand_binop (submode, mulopt, ! imag0, real1, 0, unsignedp, methods), expand_binop (submode, mulopt, ! real0, imag1, 0, unsignedp, methods), 0, unsignedp, methods); *************** *** 1024,1028 **** } ! res = expand_binop (submode, binoptab, real_t, divider, realr, unsignedp, methods); if (res != realr) --- 1024,1028 ---- } ! res = expand_binop (submode, binoptab, real_t, divisor, realr, unsignedp, methods); if (res != realr) *************** *** 1029,1033 **** emit_move_insn (realr, res); ! res = expand_binop (submode, binoptab, imag_t, divider, imagr, unsignedp, methods); if (res != imagr) --- 1029,1033 ---- emit_move_insn (realr, res); ! res = expand_binop (submode, binoptab, imag_t, divisor, imagr, unsignedp, methods); if (res != imagr) diff -rc2N gcc-2.3.2/reload.c gcc-2.3.3/reload.c *** gcc-2.3.2/reload.c Fri Nov 27 01:50:40 1992 --- gcc-2.3.3/reload.c Wed Dec 16 14:16:44 1992 *************** *** 432,436 **** find_reloads_address (mode, NULL_PTR, XEXP (loc, 0), &XEXP (loc, 0), x, 0); ! secondary_memlocs_elim[(int) mode] = loc; return loc; --- 432,441 ---- find_reloads_address (mode, NULL_PTR, XEXP (loc, 0), &XEXP (loc, 0), x, 0); ! /* If the address was not valid to begin with, we can not save it, because ! there is no guarantee that the reloads needed to make it valid will ! occur before every use of this address. */ ! ! else ! secondary_memlocs_elim[(int) mode] = loc; return loc; diff -rc2N gcc-2.3.2/reload1.c gcc-2.3.3/reload1.c *** gcc-2.3.2/reload1.c Fri Oct 30 16:34:33 1992 --- gcc-2.3.3/reload1.c Tue Dec 15 22:27:42 1992 *************** *** 2997,3000 **** --- 2997,3010 ---- if (new_body != old_body) { + /* If we aren't replacing things permanently and we changed something, + make another copy to ensure that all the RTL is new. Otherwise + things can go wrong if find_reload swaps commutative operands + and one is inside RTL that has been copied while the other is not. */ + + /* Don't copy an asm_operands because (1) there's no need and (2) + copy_rtx can't do it properly when there are multiple outputs. */ + if (! replace && asm_noperands (old_body) < 0) + new_body = copy_rtx (new_body); + /* If we had a move insn but now we don't, rerecognize it. */ if ((GET_CODE (old_body) == SET && GET_CODE (SET_SRC (old_body)) == REG *************** *** 4375,4378 **** --- 4385,4389 ---- { register int regno = -1; + enum machine_mode mode; if (reload_in[r] == 0) *************** *** 4379,4385 **** ; else if (GET_CODE (reload_in[r]) == REG) ! regno = REGNO (reload_in[r]); else if (GET_CODE (reload_in_reg[r]) == REG) ! regno = REGNO (reload_in_reg[r]); #if 0 /* This won't work, since REGNO can be a pseudo reg number. --- 4390,4402 ---- ; else if (GET_CODE (reload_in[r]) == REG) ! { ! regno = REGNO (reload_in[r]); ! mode = GET_MODE (reload_in[r]); ! } else if (GET_CODE (reload_in_reg[r]) == REG) ! { ! regno = REGNO (reload_in_reg[r]); ! mode = GET_MODE (reload_in_reg[r]); ! } #if 0 /* This won't work, since REGNO can be a pseudo reg number. *************** *** 4396,4399 **** --- 4413,4418 ---- if (reg_reloaded_contents[i] == regno + && (GET_MODE_SIZE (GET_MODE (reg_last_reload_reg[regno])) + >= GET_MODE_SIZE (mode)) && HARD_REGNO_MODE_OK (spill_regs[i], reload_mode[r]) && TEST_HARD_REG_BIT (reg_class_contents[(int) reload_reg_class[r]], diff -rc2N gcc-2.3.2/rtl.h gcc-2.3.3/rtl.h *** gcc-2.3.2/rtl.h Fri Oct 23 07:38:26 1992 --- gcc-2.3.3/rtl.h Sat Dec 12 20:42:19 1992 *************** *** 69,73 **** --- 69,77 ---- { #ifdef ONLY_INT_FIELDS + #ifdef CODE_FIELD_BUG + unsigned int code : 16; + #else unsigned short code; + #endif #else /* The kind of expression this is. */ diff -rc2N gcc-2.3.2/stmt.c gcc-2.3.3/stmt.c *** gcc-2.3.2/stmt.c Wed Nov 25 12:10:46 1992 --- gcc-2.3.3/stmt.c Wed Dec 16 07:24:44 1992 *************** *** 626,631 **** --- 626,634 ---- { struct function *p = find_function_data (context); + rtx label_ref = gen_rtx (LABEL_REF, Pmode, label_rtx (label)); rtx temp; + p->has_nonlocal_label = 1; + LABEL_REF_NONLOCAL_P (label_ref) = 1; /* Copy the rtl for the slots so that they won't be shared in *************** *** 638,643 **** copy_rtx (p->nonlocal_goto_handler_slot), copy_rtx (p->nonlocal_goto_stack_level), ! gen_rtx (LABEL_REF, Pmode, ! label_rtx (label)))); else #endif --- 641,645 ---- copy_rtx (p->nonlocal_goto_handler_slot), copy_rtx (p->nonlocal_goto_stack_level), ! label_ref)); else #endif *************** *** 672,677 **** /* Put in the static chain register the nonlocal label address. */ ! emit_move_insn (static_chain_rtx, ! gen_rtx (LABEL_REF, Pmode, label_rtx (label))); /* USE of frame_pointer_rtx added for consistency; not clear if really needed. */ --- 674,678 ---- /* Put in the static chain register the nonlocal label address. */ ! emit_move_insn (static_chain_rtx, label_ref); /* USE of frame_pointer_rtx added for consistency; not clear if really needed. */ diff -rc2N gcc-2.3.2/tm.texi gcc-2.3.3/tm.texi *** gcc-2.3.2/tm.texi Fri Oct 23 19:45:36 1992 --- gcc-2.3.3/tm.texi Wed Dec 16 14:52:38 1992 *************** *** 2914,2917 **** --- 2914,2924 ---- automatically. + @findex TRAMPOLINE_SECTION + @item TRAMPOLINE_SECTION + The name of a subroutine to switch to the section in which the + trampoline template is to be placed (@pxref{Sections}). The default is + a value of @samp{readonly_data_section}, which places the trampoline in + the section containing read-only data. + @findex TRAMPOLINE_SIZE @item TRAMPOLINE_SIZE diff -rc2N gcc-2.3.2/va-alpha.h gcc-2.3.3/va-alpha.h *** gcc-2.3.2/va-alpha.h Tue Nov 3 08:04:57 1992 --- gcc-2.3.3/va-alpha.h Sat Dec 12 17:52:24 1992 *************** *** 161,167 **** \ for (__i = 0; __i < __va_nwords (__type); __i++) \ ! __obj[__i] = ((__va).__va_arg < 6 \ ! ? (__va).__va_iregs[(__va).__va_arg] \ ! : (__va).__va_stack[(__va).__va_arg - 6]); \ \ __rv = (void *) &__obj[0]; \ --- 161,167 ---- \ for (__i = 0; __i < __va_nwords (__type); __i++) \ ! __obj[__i] = ((__va).__va_arg + __i < 6 \ ! ? (__va).__va_iregs[(__va).__va_arg + __i] \ ! : (__va).__va_stack[(__va).__va_arg + __i - 6]); \ \ __rv = (void *) &__obj[0]; \ diff -rc2N gcc-2.3.2/varasm.c gcc-2.3.3/varasm.c *** gcc-2.3.2/varasm.c Wed Nov 4 16:45:37 1992 --- gcc-2.3.3/varasm.c Wed Dec 16 14:52:47 1992 *************** *** 1072,1075 **** --- 1072,1083 ---- int align; + /* By default, put trampoline templates in read-only data section. */ + + #ifdef TRAMPOLINE_SECTION + TRAMPOLINE_SECTION (); + #else + readonly_data_section (); + #endif + /* Write the assembler code to define one. */ align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT); diff -rc2N gcc-2.3.2/version.c gcc-2.3.3/version.c *** gcc-2.3.2/version.c Fri Nov 27 22:33:23 1992 --- gcc-2.3.3/version.c Sat Dec 26 04:46:45 1992 *************** *** 1 **** ! char *version_string = "2.3.2"; --- 1 ---- ! char *version_string = "2.3.3";