diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-02-14 19:12:00 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-02-14 19:12:00 +0000 |
commit | df96e1901c8f6b0f125702972a33f062d4c00179 (patch) | |
tree | dfe9429b4514f8fb7a993da328e10843f3cc0567 /gnu/usr.bin | |
parent | aff5322427b69c6098ef28e5b51155683046fcc4 (diff) |
Diffstat (limited to 'gnu/usr.bin')
32 files changed, 44297 insertions, 0 deletions
diff --git a/gnu/usr.bin/gcc/ChangeLog.10 b/gnu/usr.bin/gcc/ChangeLog.10 new file mode 100644 index 00000000000..a7d3837d103 --- /dev/null +++ b/gnu/usr.bin/gcc/ChangeLog.10 @@ -0,0 +1,10110 @@ +Sun Mar 31 05:10:10 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stor-layout.c (layout_decl): Don't make a bitfield an integral mode + if the mode of the field type is not MODE_INT. + + * sched.c (schedule_block): CALL_INSNs don't affect fixed regs. + * flow.c (propagate_block): CALL_INSNs don't kill fixed regs. + +Sat Mar 30 03:32:48 1996 Torbjorn Granlund <tege@noisy.tmg.se> + + * expmed.c (expand_divmod, case TRUNC_DIV_EXPR): Move some code + to avoid shifting by a too large count. + +Fri Mar 29 15:45:51 1996 Doug Evans <dje@cygnus.com> + + * configure (i[3456]86-*-sunos5*): Delete, config.sub converts + sunos5 to solaris2. + (sparc-*-sunos5*): Likewise. + (sparc64-*-{solaris2*,sunos5*}): Delete. Stick with sparc-*-solaris2*. + + * sparc.h (FUNCTION_PROFILER): Save/restore %g2 around mcount call. + +Fri Mar 29 14:20:31 1996 Stan Cox <coxs@dg-rtp.dg.com> + + * i386.c (notice_update_cc): Clear cc_status if ref modified MEM. + +Fri Mar 29 09:37:52 1996 Jeffrey A. Law <law@cygnus.com> + + * calls.c (expand_call): Remove current_call_is_indirect nonsense. + Add additional argument to INIT_CUMULATIVE_ARGS. + (emit_library_call): Likewise. + (emit_library_call_value): Likewise. + * expr.c (expand_builtin): Likewise. + * function.c (assign_parms): Likewise. + * pa.h (hppa_args): New field "indirect". + (INIT_CUMULATIVE_ARGS): Initialize "indirect" field. + (FUNCTION_ARG): Check "indirect" field, rather than + "current_call_is_indirect". + * a29k.h (INIT_CUMULATIVE_ARGS):New arg, INDIRECT. + * alpha.h (INIT_CUMULATIVE_ARGS): Likewise. + * arm.h (INIT_CUMULATIVE_ARGS): Likewise. + * clipper.h (INIT_CUMULATIVE_ARGS): Likewise. + * convex.h (INIT_CUMULATIVE_ARGS): Likewise. + * dsp16xx.h (INIT_CUMULATIVE_ARGS): Likewise. + * elxsi.h (INIT_CUMULATIVE_ARGS): Likewise. + * fx80.h (INIT_CUMULATIVE_ARGS): Likewise. + * gmicro.h (INIT_CUMULATIVE_ARGS): Likewise. + * h8300.h (INIT_CUMULATIVE_ARGS): Likewise. + * i370/mvs.h (INIT_CUMULATIVE_ARGS): Likewise. + * i386.h (INIT_CUMULATIVE_ARGS): Likewise. + * i860.h (INIT_CUMULATIVE_ARGS): Likewise. + * i960.h (INIT_CUMULATIVE_ARGS): Likewise. + * m68k.h (INIT_CUMULATIVE_ARGS): Likewise. + * m68k/mot3300.h (INIT_CUMULATIVE_ARGS): Likewise. + * m88k.h (INIT_CUMULATIVE_ARGS): Likewise. + * mips.h (INIT_CUMULATIVE_ARGS): Likewise. + * ns32k.h (INIT_CUMULATIVE_ARGS): Likewise. + * pdp11.h (INIT_CUMULATIVE_ARGS): Likewise. + * pyr.h (INIT_CUMULATIVE_ARGS): Likewise. + * romp.h (INIT_CUMULATIVE_ARGS): Likewise. + * rs6000.h (INIT_CUMULATIVE_ARGS): Likewise. + * sh.h (INIT_CUMULATIVE_ARGS): Likewise. + * sparc.h (INIT_CUMULATIVE_ARGS): Likewise. + * spur.h (INIT_CUMULATIVE_ARGS): Likewise. + * tahoe.h (INIT_CUMULATIVE_ARGS): Likewise. + * vax.h (INIT_CUMULATIVE_ARGS): Likewise. + * we32k.h (INIT_CUMULATIVE_ARGS): Likewise. + * mips.c (mips_expand_prologue): Add extra arg to + INIT_CUMULATIVE_ARGS call. + +Thu Mar 28 18:45:49 1996 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * alpha.c (summarize_insn): Fix three "off-by-one" bugs in loop bounds. + +Thu Mar 28 16:50:10 1996 Doug Evans <dje@cygnus.com> + + * ginclude/inl-sparc.h: Deleted. + +Thu Mar 28 12:07:31 1996 Jeffrey A. Law <law@cygnus.com> + + * va-h8300.h (va_arg): Don't assume sizeof (int) == 4. + + * pa.c (hppa_legitimize_address): Don't lose for + (plus (plus (mult (A) (shadd_const)) (B)) (C)) if + B + C isn't a valid address for indexing. + (basereg_operand): Only accept base registers after + cse has completed. Don't accept the frame pointer if + it's likely to be eliminated. + * pa.md (unscaled indexing patterns): Add variants with + basereg and index register reversed. + (HImode and QImode loads): Add zero extended variants. + +Wed Mar 27 07:45:27 1996 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * expmed.c (negate_rtx): Fix typo in previous change. + +Tue Mar 26 13:50:43 1996 Jim Wilson <wilson@mole.gnu.ai.mit.edu> + + * calls.c (expand_call): In convert_to_mode call, use word_mode + not SImode. + +Tue Mar 26 13:44:34 1996 Doug Evans <dje@canuck.cygnus.com> + + * configure: Delete unnecessary special handling of --with-cpu. + +Tue Mar 26 10:41:57 1996 Jeffrey A. Law <law@cygnus.com> + + * expr.c (emit_push_insn): When doing a partial push, emit + a CLOBBER so that flow doesn't think the entire register + is live. + +Tue Mar 26 10:00:52 1996 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * alpha.c (summarize_insn, default case): Properly use format_ptr. + +Tue Mar 26 09:51:09 1996 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.h (output_move_simode_const): New extern declaration. + * m68k.c (output_move_simode_const): New function. + (singlemove_string): Call it. + * m68k.md (fullword move): Likewise. + +Tue Mar 26 05:43:06 1996 Torbjorn Granlund <tege@noisy.tmg.se> + + * vax.md (insv matcher): Call CC_STATUS_INIT. + * vax.h (NOTICE_UPDATE_CC): Handle ZERO_EXTRACT destination. + +Mon Mar 25 19:18:08 1996 Jason Merrill <jason@yorick.cygnus.com> + + * function.c (expand_function_start): Don't set up context_display + unless current_function_needs_context. + +Mon Mar 25 18:48:18 1996 Philippe De Muyter <phdm@info.ucl.ac.be> + + * fold-const.c (fold, case BIT_IOR_EXPR): Recognize rotates + with variable count. + +Mon Mar 25 18:05:28 1996 Jim Wilson <wilson@cygnus.com> + + * Makefile.in (libgcc1-test): Undo Feb 12 change. + +Mon Mar 25 08:09:59 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * objc/thread-single.c (objc_mutex_unlock): Properly declare thread_id. + +Mon Mar 25 08:02:50 1996 Philippe De Muyter <phdm@info.ucl.ac.be> + + * configure (m68k-motorola-sysv*): Fixed indentation. + +Sun Mar 24 08:16:42 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expmed.c (negate_rtx): Don't try to negate a constant ourself; + instead call simplify_unary_operation. + +Sun Mar 24 07:29:06 1996 Richard Henderson <rth@tamu.edu> + + * gcc.c (process_command): Instead of hardcoding non-empty + switches_need_spaces to turn on "o" and "L", make the string + contain the switches that need the spaces. + * m68k/ccur-GAS.h (SWITCHES_NEED_SPACES): Change definition + correspondingly. + +Sat Mar 23 18:34:44 1996 Harry Dolan <dolan@ssd.intel.com> + + * i860/paragon.h (LIB_SPEC): Always output -lmach. + +Sat Mar 23 18:25:39 1996 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * c-typeck.c (set_init_index): Check for use outside an array + initializer. + + * defaults.h (ASM_OUTPUT_ADDR_DIFF_ELT): Delete. + * pdp11.h (ASM_OUTPUT_ADDR_DIFF_ELT): Don't define. + +Sat Mar 23 15:55:35 1996 Doug Evans <dje@canuck.cygnus.com> + + * combine.c (make_extraction): In BITS_BIG_ENDIAN correction of POS, + need to treat MEM and REG differently. + + * sparc.h (SPARC_SIMM{10,11,13}_P): Define. + (SMALL_INT): Use SPARC_SIMM13_P. + (CONST_OK_FOR_LETTER_P): Support new letters L,M. + * sparc.c (arith11_operand): Use SPARC_SIMM11_P. + (arith10_operand): Use SPARC_SIMM10_P. + * sparc.md (*mov{qi,hi,si,di}_cc_sp64): Fix constraints. + (*mov{qi,hi,si,di}_cc_reg_sp64): Likewise. + +Sat Mar 23 07:47:19 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * m68k/linux.h (TRAMPOLINE_TEMPLATE): Correct first instruction. + * m68k/m68kv4.h (TRAMPOLINE_TEMPLATE): Likewise. + +Sat Mar 23 07:06:55 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * bc-emit.c (bc_emit_instruction): Add missing va_end call. + + * c-typeck.c (build_array_ref): Give error if subscripting a function. + +Fri Mar 22 09:11:45 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * local-alloc.c (optimize_reg_copy_1): Only update reg_live_length + if it is non-negative. + +Thu Mar 21 14:42:26 1996 Doug Evans <dje@cygnus.com> + + * sparc/splet.h (STARTFILE_SPEC,LINK_SPEC): Define. + +Wed Mar 20 17:23:18 1996 Jim Wilson <wilson@cygnus.com> + + * cse.c (note_mem_written): Delete obsolete code for handling + (mem (scratch)). + + * mips.c (mips_expand_prologue): In initialization of fnargs, delete + special treatment of METHOD_TYPE. + +Wed Mar 20 17:07:45 1996 Doug Evans <dje@cygnus.com> + + * sparc/sol2.h (ASM_CPU_SPEC): Recognize -mcpu=v8plus, not v9. + Fix typo in ultrasparc entry. + * sparc.h (CPP_CPU_SPEC): Add v8plus entry. + (ASM_CPU_SPEC): Likewise. + + * sparc.c (fcc_reg_operand): Ensure correct mode. + (icc_or_fcc_reg_operand): Likewise. + (gen_v9_scc): IF_THEN_ELSE must have a mode. + (print_operand): New operand code `x' for all condition codes. + New operand codes `c,d' for reversed conditional moves. + * sparc.md (movqicc,movhicc): New named patterns. + (movdicc): if_then_else must have a mode. + (movsicc,movsfcc,movdfcc,movtfcc): Likewise. + Change condition to TARGET_V9, not TARGET_ARCH64. + Fail if DImode compare and ! TARGET_ARCH64. + (conditional move matchers): Rewrite. + +Wed Mar 20 16:12:29 1996 Stan Cox <coxs@wombat.gnu.ai.mit.edu> + + * i386.h (HARD_REGNO_MODE_OK): Relax QImode constraint to + avoid a reload problem. + +Wed Mar 20 13:12:22 1996 Jeffrey A. Law <law@cygnus.com> + + * pa.c (hppa_legitimize_address): Don't lose for x[n-const] + when n-const will not be shifted. Don't pessimize code for + x[n-const] when const is small. + +Wed Mar 20 11:42:32 1996 Markus Theissinger <Markus.Theissinger@gmd.de> + + * m68k/sun3.h (LIB_SPEC): Don't link /usr/lib/bb_link.o with `gcc -a'. + (__bb_init_func): Deleted. + (BLOCK_PROFILER_CODE): Don't set macro to nothing. + + * m68k/xm-sun3.h: New file. + * configure (m68k-sun-sunos*): Use it. + + * xm-linux.h (HAVE_POPEN): New define. + +Wed Mar 20 11:28:37 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * m68k/linux.h (ASM_SPEC): Deleted. + (STRUCT_VALUE_REGNUM): Redefine as register a0. + (STATIC_CHAIN_REGNUM): Redefine as register a1. + (TRAMPOLINE_TEMPLATE): Redefine to use the right register. + +Wed Mar 20 08:04:34 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * libgcc2.c (__dummy): New function. + * Makefile.in (LIB2FUNCS): Add __dummy. + * expr.c (expand_builtin, case BUILT_IN_SETJMP): Call "setjmp" + pattern, if any. + Call dummy function pointed to by static chain pointer. + (expand_builtin, case BUILT_IN_LONJMP): Ignore second expression. + Set address of __dummy into static chain pointer. + Copy the label to return to into a pseudo earlier. + + * stupid.c (last_setjmp_suid, regs_crosses_setjmp): New variables. + (stupid_life_analysis, stupid_mark_refs): Use them to track which + regs are live over a setjmp; don't allocate such regs. + +Tue Mar 19 22:02:07 1996 Jason Merrill <jason@yorick.cygnus.com> + + * cplus-dem.c (demangle_template): Fix for non-mangled pointer + arguments. + +Tue Mar 19 13:54:06 1996 Jeffrey A. Law <law@wombat.gnu.ai.mit.edu> + + * pa.c (compute_frame_size): Update comments to reflect reality. + (hppa_expand_prologue): Don't save registers which aren't + used, even if it creates holes. Partially undoes changes from + early March. + (hppa_expand_epilogue): Likewise. + +Tue Mar 19 08:25:17 1996 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * stmt.c (struct case_node): New member balance. + (add_case_node): New function. + (pushcase, pushcase_range): Use it. + (case_tree2list): New function. + (expand_end_case): Use it. + +Tue Mar 19 07:44:22 1996 Stephen L Moshier (moshier@world.std.com) + + * regstack.c (move_for_stack_reg): Avoid stack overflow while + storing XFmode from fp reg to memory. + +Tue Mar 19 07:38:03 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * m68k.h (MASK_*): New macros. + (OVERRIDE_OPTIONS): Use them. + (TARGET_SWITCHES): Likewise. + Treat -m68332 like -m68000. + +Mon Mar 18 20:04:13 1996 Richard Earnshaw (rearnsha@armltd.co.uk) + + * expmed.c (emit_store_flag): If expanding (GE X 0) will need two + insns, don't use subtarget for the result of the first insn. + Move a likely constant to the start of a condition. + +Mon Mar 18 19:48:14 1996 Philippe De Muyter <phdm@info.ucl.ac.be> + + * m68k.h (CONST_OK_FOR_LETTER_VALUE): New constraint 'M'. + * m68k.c (output_function_epilogue): Restore registers using sp+ + instead of fp(n) in leaf functions. + (USE_MOVQ, use_movq): Function replaced by macro. + * m68k.md (pushexthisi_const, movsi_const0): New names. + (andsi3, iorsi3): Allow only 'M', not 'K' constants, if dest is 'd'. + +Mon Mar 18 19:33:20 1996 Fila Kolodny <fila@ibi.com> + + * i370/t-mvs: New file. + * configure (i370-*-mvs*): Use it. + * i370/mvs.h (FUNCTION_PROLOGUE): LE/370 takes 120 bytes for DSA. + Have only one copy of timestamp and PPA2 per object module. + Only have unnamed CSECT to match IBM C. + +Mon Mar 18 19:26:21 1996 Paul Russell (Rusty.Russell@adelaide.maptek.com.au) + + * combine.c (simplify_if_then_else): Allow for case that + condition might no longer be a condition. + +Mon Mar 18 19:14:42 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-typeck.c (build_conditional_expr): If OP1 is null, set + both OP1 and ORIG_OP1 to IFEXP. + + * c-iterate.c (iterator_loop_epilogue): Don't clear DECL_RTL + for a static decl. + +Mon Mar 18 08:02:25 1996 Stephen L Moshier <moshier@world.std.com> + + * alpha.c (summarize_insn, case SUBREG, CONST_*): New cases. + +Sun Mar 17 16:55:00 1996 Doug Evans <dje@cygnus.com> + + * combine.c (find_split_point): Handle NULL return from + make_extraction. + (make_field_assignment): Likewise. + +Sat Mar 16 18:56:47 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * tree.c (substitute_in_expr, case COMPONENT_REF): Ignore + if inner PLACEHOLDER_EXPR has not yet been initialized. + + * i386.c (standard_80386_constant_p): -0.0 is not 0.0. + * i386.md (insv): Restore missing end of comment. + + * combine.c (make_extraction): Correct typo in force_to_mode + call in previous change. + Return 0 if pos+len out of range of want desired mode. + +Sat Mar 16 16:20:43 1996 David Mosberger-Tang <davidm@azstarnet.com> + + * alpha.md (trap): New attribute. + Modify patterns for all floating-point trap generating instructions. + * alpha.h (CPP_SPEC): Added -mieee and -mieee-with-inexact. + (alpha_trap_precision, alpha_fp_rounding_mode, alpha_fp_trap_mode): + New enum types. + (target_flags, alpha_tp, alpha_fprm, alpha_fptm): New external vars. + (alpha_fprm_string, alpha_fptm_string, alpha_tp_string): Likewise. + (TARGET_IEEE{,_WITH_INEXACT,_CONFORMANT}): New macros. + (MASK_IEEE{,_WITH_INEXACT,_CONFORMANT}): Likewise. + (MASK_FP, MASK_FPREGS, + (TARGET_SWITCHES): Added "ieee-conformant", "ieee", and + "ieee-with-inexact"; use MASK symbols. + (TARGET_OPTIONS): New macro. + (OVERRIDE_OPTIONS, FINAL_PRESCAN_{INSN,LABEL}): New macros. + (PRINT_OPERAND_PUNCT_VALID_P): Allow operand codes for FP insns. + (CC1_SPEC): New macro. + * alpha.c (alpha_tp, alpha_fprm, alpha_fptm): New variables. + (alpha_tp_string, alpha_fprm_string, alpha_fptm_string + (trap_pending): Likewise. + (override_options, summarize_insn, final_prescan_insn): New functions. + (print_operand): Handle cases '&', '\'', ')', and '+'. + (output_prolog): Emit ".eflag 48" if TARGET_IEEE_CONFORMANT. + (output_epilog): Call final_prescan_insn before emitting epilog. + + * final.c (final_scan_insn, case CODE_LABEL): Invoke + FINAL_PRESCAN_INSN if FINAL_SCAN_LABEL is defined. + + * alpha/{linux.h,x-linux,xm-linux.h}: New files. + * configure (alpha-*-linux*): New case. + * alpha.c (output_prolog): Set alpha_function_needs_gp if profiling + and TARGET_PROFILING_NEEDS_GP defined. + +Thu Mar 14 22:28:20 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.h (LEGITIMATE_OFFSET_ADDRESS_P): Fix last change. + * aix41.h (LINK_SPEC): add -bnoentry if shared and no explicit entry. + +Thu Mar 14 12:47:33 1996 Jim Wilson <wilson@cygnus.com> + + * mips.h (ASM_OUTPUT_DOUBLE_INT): Use 'X' if CONST_INT and + HOST_BITS_PER_WIDE_INT == 64. + + * mips.c (mips_expand_prologue): Change TYPE_NEEDS_CONSTRUCTING to + TREE_ADDRESSABLE; + +Thu Mar 14 11:21:37 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.h (LEGITIMATE_OFFSET_ADDRESS_P): For 32-bit mode, + allow TImode variables with int offsets, so that structures + greater than 8 bytes and less than or equal to 16 bytes can be + instantiated correctly. + + * rs6000.c (rs6000_valid_type_attribute_p): Add exception + attribute for Windows NT. + + * win-nt.h (ASM_OUTPUT_FUNCTION_PREFIX): Delete, merge into + ASM_DECLARE_FUNCTION_NAME. + (ASM_DECLARE_FUNCTION_NAME): Add support for exception attribute + setting fields 3 & 4 of the structured exception handling table. + +Thu Mar 14 01:53:19 1996 Jeffrey A. Law <law@cygnus.com> + + * pa.h (ASM_DECLARE_FUNCTION_NAME): Change TYPE_NEEDS_CONSTRUCTING + to TREE_ADDRESSABLE. From Jim Wilson. + +Wed Mar 13 13:40:32 1996 Jim Wilson <wilson@chestnut.cygnus.com> + + * c-tree.h (warn_sign_compare): Add extern to declaration. + +Wed Mar 13 13:37:00 1996 Doug Evans <dje@cygnus.com> + + * configure: Use cross-make and build-make if building + cross compiler with cross compiler. + +Wed Mar 13 12:00:34 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * i386/cygwin32.h (ASM_OUTPUT_ALIGN): Correct defination. + + * rs6000/{win-nt,cygwin32}.h (STARTFILE_SPEC): Add crti.o before + all objects. + (ENDFILE_SPEC): Add crtn.o after all objects. + + * configure (powerpcle-*-cygwin32): Use t-winnt, not t-cygin32 + * rs6000/t-cygwin32: Delete, no longer used. + + * rs6000/t-winnt ({,INSTALL_}LIBGCC): Build and install crti.o and + crtn.o. + + * rs6000/win-nt.h (EXTRA_SECTION_FUNCTIONS): Add ctors_section and + dtors_section. + (INVOKE__main): Define, so that __main is called. + (ASM_OUTPUT_{CONSTRUCTOR,DESTRUCTOR}): Define to put pointers to + the constructor/destructor in the appropriate section. + + * nt-c{i,n}.asm: New files to be linked before/after all of the users' + objects. + +Wed Mar 13 00:42:17 1996 Per Bothner <bothner@cygnus.com> + + * dbxout.c (dbxout_type): Better "variant" handling to ignore + const/volatile but not typedef names. Improves Feb 12 change. + +Tue Mar 12 17:25:14 1996 David Mosberger-Tang <davidm@azstarnet.com> + + * glimits.h (__LONG_MAX__): On Alpha, use 64 bit value. + +Tue Mar 12 15:07:49 1996 Torbjorn Granlund <tege@tmg.se> + + * m68k.c (valid_dbcc_comparison_p): Don't test cc_prev_status here. + (flags_in_68881): New function. + * m68k.md (dbra peepholes): Use flags_in_68881. + +Tue Mar 12 13:54:15 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * sparc.md (nonlocal_goto): Emit barrier after jump. + (setjmp{,_64,_32}): New patterns. + +Tue Mar 12 12:43:27 1996 Jim Wilson <wilson@cygnus.com> + + * i960.h (ROUND_TYPE_SIZE): Return round_up result instead of + COMPUTED. + + * expr.c (expand_expr, case COMPONENT_REF): For unaligned object in + an aligned union, delete check for EXPAND_SUM. + + * expr.h (clear_storage): Add comment terminator. + +Mon Mar 11 19:07:50 1996 Jeffrey A. Law <law@cygnus.com> + + * recog.c (constrain_operands, case 'V'): Don't call + offsettable_memref_p before reload has completed. + +Mon Mar 11 16:06:13 1996 Doug Evans <dje@cygnus.com> + + * h8300.h (SP_AND_G_REGS): Renamed from SP_AND_G_REG. + (CC_DONE_CBIT): Delete. + (CC_OVERFLOW_0,CC_OVERFLOW_UNUSABLE,CC_NO_CARRY): Define. + * h8300.c (cond_string): Delete CC_DONE_CBIT handling. + (notice_update_cc): Delete CC_CBIT, CC_WHOOPS. Add CC_SET_ZN_C0. + (restore_compare_p): New function. + (shift_one): Use shll instead of shal so overflow bit is usable. + Set cc_valid bits to cc_status.flags values. + (emit_a_shift): Set cc_status.flags. + * h8300.md (attr cc): Delete whoops,cbit. Add set_zn_c0. + (all patterns) Update cc attr setting. + (tstqi,tsthi,tstsi): Delete CC_DONE_CBIT handling. + (addhi3,subhi3): Change define_expand to define_insn. + (branch_true,branch_false): Check if compare needs to be restored. + +Mon Mar 11 13:55:23 1996 Michael Meissner <meissner@cygnus.com> + + * rs6000.h (CONST_DOUBLE_OK_FOR_LETTER_P): Add 'H' for movdi + patterns in 32 bit that generate 3 instructions. + (num_insns_constant): Add declaration. + + * rs6000.c (num_insns_constant{,_wide}) Functions to determine the + number of insns it takes to generate an integer constant. + (easy_fp_constant): Allow DImode in easy constants. Use + num_insns_constant_wide. + (input_operand): Allow any CONST_{INT,DOUBLE}'s for {SI,DI}mode. + + * rs6000.md (movdi): Generate a normal movdi using a CONST_DOUBLE + for 32 bit mode rather than using SUBREG's. For 64 bit mode, + break large integer constants into smaller pieces. Add various + define_splits to handle loading the various DImode constants. + +Mon Mar 11 06:54:19 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * combine.c (make_extraction): Use proper mode for INNER in all cases. + (simplify_comparison, case ZERO_EXTRACT): For bits big endian and + no extzv, use BITS_PER_WORD. + * fx80.md, gmicro.md, i386.md, m68k.md, tahoe.md, vax.md: + Use proper modes and predicates for {sign,zero}_extract. + +Sun Mar 10 06:23:52 1996 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * emit-rtl.c (free_insn): New variable. + (init_emit, restore_emit_status): Clear it. + (gen_sequence): Store insn in free_insn when sequence length is 1. + (make_insn_raw): Use free_insn if available and still in the + rtl generation phase. + +Fri Mar 8 15:37:31 1996 Mike Stump <mrs@cygnus.com> + + * expr.c (expand_expr, case TARGET_EXPR): Delay putting the cleanup + on the cleanup chain until after the subexpression has been expanded. + +Fri Mar 8 16:14:51 1996 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * i386.c (ix86_binary_operator_ok): One memory operand is OK. + This is independent of commutativity. + +Fri Mar 8 14:07:43 1996 Jim Wilson <wilson@cygnus.com> + + * expr.c (store_constructor_field): Call store_field if bitpos is + nonzero and target is not a MEM. + + * jump.c (jump_optimize): When handle a USE insn before an + unconditional jump, disable the optimization if the USE is the + only insn in the loop. + + * sh.c (reg_unused_after): Return 0 if see a JUMP_INSN. + +Fri Mar 8 12:08:36 1996 Doug Evans <dje@cygnus.com> + + * sparc/lynx.h (CPP_SPEC): Use %(cpp_cpu). + + * sparc/sparc.md (move_pic_label_si,move_label_di): Rewrite length + attr calcs to be more conservative. + +Thu Mar 7 19:14:21 1996 Doug Evans <dje@cygnus.com> + + * sparc/t-splet: New file. + * sparc/splet.h: New file. + * configure (sparclet-*-aout*): Use them. + + * sparc.h (MASK_LIVE_G0,TARGET_LIVE_G0): Define. + (FIRST_PSEUDO_REGISTER): Add 1 for %icc (now 101). + (FIXED_REGISTERS,CALL_USED_REGISTERS): Update. + (FIXED_REGISTERS): %g0 is fixed by default. + (SPARC_{FIRST,LAST}_V9_FCC_REG): Define. + (SPARC_{ICC,FCC}_REG): Define. + (CONDITIONAL_REGISTER_USAGE): Don't fix %fcc0 if v8. + (REG_CLASS_CONTENTS): Reg 0 is an int reg, reg 100 is %icc. + (REGNO_REG_CLASS): Rewrite to use global `sparc_regno_reg_class'. + (REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER,LEAF_REGISTERS): Add %icc. + (REG_CLASS_FROM_LETTER): Handle 'c' for FPCC_REGS in non-v9 case. + (REGNO_OK_FOR_{BASE,INDEX}_P): Treat %g0 as a normal reg. + (REG_OK_FOR_{BASE,INDEX}_P,EXTRA_CONSTRAINT): Likewise. + (REGISTER_NAMES): Add %icc. + (ADDITIONAL_REGISTER_NAMES): Use SPARC_ICC_REG. + * sparc.c (leaf_reg_remap): Add %icc=100. + (reg_or_0_operand): Don't allow 0 if TARGET_LIVE_G0. + (fcc_reg_operand): Renamed from ccfp_reg_operand. + Use SPARC_FCC_REG. Don't treat reg 0 as an fcc reg. Don't match + modes if `mode' argument is VOIDmode. + (icc_or_fcc_reg_operand): New function. + (gen_compare_reg): Use SPARC_FCC_REG for v8 fp compares. + Use SPARC_ICC_REG for int compares. + (eligible_for_epilogue_delay): Don't allow anything if TARGET_LIVE_G0. + Delete unnecessary test for %g0. + (emit_move_sequence): Don't emit (set (mem) (const_int 0)) if + TARGET_LIVE_G0. + (output_scc_insn): Label moved to operand 3. Condition code reg + moved to operand 2. + (sparc_mode_class): Enum C_MODE renamed to CC_MODE. + (hard_32bit_mode_classes): Set reg 0 to S_MODES. Add entry for %icc. + (hard_64bit_mode_classes): Set reg 0 to D_MODES. Add entry for %icc. + (sparc_regno_reg_class): New global. + (sparc_init_modes): Initialize it. + (output_cbranch): Delete fp_cond_reg argument. + (print_operand, MEM op): Don't print "%g0+" if TARGET_LIVE_G0. + (sparc_flat_eligible_for_epilogue_delay): Don't allow anything if + TARGET_LIVE_G0. + * sparc.md (live_g0): New attribute. + (*): Integer condition code register is now reg 100. + Use SPARC_ICC_REG instead of hardcoding reg 100 where possible. + Non-v9 floating point condition code register is now reg 96. + (*cmp{sf,df,tf}_{fpe,fp}_sp{32,64}): Combine v9/non-v9 cases. + (*{normal,inverted}_{,fp,fpe}_branch): Update call to output_cbranch. + (*mov{qi,hi,si}_insn): Don't use if TARGET_LIVE_G0. + (*mov{qi,hi,si}_insn_liveg0): New patterns. + (*mov{si,di,sf,df,tf}_ccfp{,e}_sp64): ccfp_reg_operand renamed to + fcc_reg_operand. + (*negdi2_sp32,negsi2,one_cmplsi2,ffssi2): Ensure %%g0 is 0 if + TARGET_LIVE_G0. + (*one_cmpldi2_sp32): Move operand 1 to rs1 and use 0 as rs2. + (patterns that use %g0 in rs2): Use 0 immediate value instead. + (patterns that read %g0): Don't use if TARGET_LIVE_G0. + +Thu Mar 7 15:39:16 1996 Jim Wilson <wilson@chestnut.cygnus.com> + + * sh.h (PASS_IN_REG_P): Change < to <=. + * va-sh.h (va_start): Change __SH3E___ to __SH3E__. + (va_arg): Add little-endian SH3E support. Fix big-endian version + to work for arguments smaller than the word size. + +Thu Mar 7 10:37:37 1996 Jeffrey A. Law <law@cygnus.com> + + * lib2funcs.asm: Remove entry/exit routines. Move them into... + * ee.asm: New file. Entry/exit code. + * ee_fp.asm: New file. Entry/exit code with frame pointer. + * t-pa: Corresponding changes. + * t-pro: Corresponding changes. + + * pa.c: Fix misc small typos/thinkos in recent changes. + +Wed Mar 6 17:36:03 1996 Jason Merrill <jason@yorick.cygnus.com> + + * cplus-dem.c (demangle_template): Fix for address-of-extern arguments. + +Wed Mar 6 15:12:55 1996 Jeffrey A. Law <law@cygnus.com> + + * t-pro (dp-bit rule): Fix typo. + + * lib2funcs.asm (__outline_prologue): Remove frame pointer + support. + (__outline_prologue_fp): Out of line prologue with frame pointer. + (__outline_epilogue, outline_epilogue_fp): Similarly. + * pa.c (compute_frame_size): Allocate enough space to avoid holes + in the callee register saves. Remove some special handling of %r3. + (hppa_expand_prologue): Don't do an out of line prologue/epilogue + if it would take more insns than an inline prologue/epilogue. + Don't leave holes in the callee register save set. + (hppa_expand_prologue): Corresponding changes. Pass stack size + to out of line epilogue code. + * pa.h (FRAME_POINTER_REQUIRED): Revert last change. + * pa.md (outline_prologue_call): Handle outline prologues which + don't need frame pointers. + (outline_epilogue_call): Similarly. + * t-pro: Reenable multilib code. Build a set of libraries that + optimize for space. + +Wed Mar 6 14:28:14 1996 Jim Wilson <wilson@chestnut.cygnus.com> + + * Makefile.in (USER_H): Add ginclude/va-sh.h. + * ginclude/stdarg.h, ginclude/varargs.h: Use va-sh.h. + * ginclude/va-sh.h: New file. + + * sh.h (PASS_IN_REG_P): Fix typo in last change. + +Wed Mar 6 11:42:06 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.h (enum processor_type): Remove PROCESSOR_PPC602. + (RTX_COSTS): Remove PROCESSOR_PPC602. PPC603 MULT cost depends + on constant and domain. + * rs6000.c (processor_target_table): 602 uses PROCESSOR_PPC603. + (get_issue_rate): Remove CPU_PPC602. + * rs6000.md (function units): Remove PPC602. Add store and + fpstore type attribute values. Update patterns. + +Tue Mar 5 18:43:43 1996 Richard Henderson <rth@tamu.edu> + + * m68k/coff.h (ASM_OUTPUT_SECTION_NAME): New define. + + * m68k/{aux-crt1.c,aux-crt[2n].asm}: New files. + * m68k/{aux-exit.c,aux-low.gld,aux-mcount.c}: More new files. + * m68k/{aux.h,auxgnu.h,auxstd.h}: Even more new files. + * m68k/{t-aux,xm-aux.h}: The rest of the new files. + * m68k/sgs.h (ASM_OUTPUT_CASE_END): Add missing semicolon. + (switch_table_difference_label_flag): Make extern. + * fixincludes (sys/param.h): Fix c89 __asm statements. + * configure (m68k-apple-aux*): New target. + +Tue Mar 5 17:38:19 1996 Doug Evans <dje@cygnus.com> + + * sparc.md (*mov{qi,hi,si}_insn): Simplify length attribute. + (*movsi_insn): Use fpload/fpstore attributes for fp loads/stores. + %r1 -> %1 for fpstore alternative. + (*movsf_insn,*movsf_no_f_insn): %r1 -> %1. + +Tue Mar 5 17:19:17 1996 Jason Merrill <jason@yorick.cygnus.com> + + * expr.c (expand_expr, case *_DECL): If we make a non-local + reference from a function with DECL_NO_STATIC_CHAIN set, abort. + (expand_expr, case ADDR_EXPR): We don't need a trampoline for a + function with DECL_NO_STATIC_CHAIN set. + * function.c (lookup_static_chain): If we're checking on a function + that doesn't need a static chain, return 0. + (init_function_start): We don't need context if DECL_NO_STATIC_CHAIN + is set. + * tree.c (staticp): Check DECL_NO_STATIC_CHAIN on nested functions. + +Tue Mar 5 15:04:29 1996 Jim Wilson <wilson@chestnut.cygnus.com> + + * sh.md (push_e, pop_e): Add TARGET_SH3E to condition. + * sh.h (JUMP_TABLES_IN_TEXT_SECTION): Define. + * sh.c (find_barrier): Set si_limit to 1018 instead of 1020, and + hi_limit to 510 instead of 512. + +Tue Mar 5 13:39:44 1996 Doug Evans <dje@cygnus.com> + + * loop.c (init_loop): Use pseudo reg in add_cost computation + so cost doesn't vary depending on whether reg 0 happens to be + fixed or not. + +Tue Mar 5 09:32:24 1996 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * reg-stack.c (record_label_references): Check for undefined label. + +Tue Mar 5 09:22:20 1996 Scott Christley (scottc@net-community.com) + + * objc/objc-api.h, objc/runtime.h: Include objc/thread.h. + * objc/class.c (__objc_init_class_tables): Surround sarray access + with mutex lock/unlock. + (__objc_add_class_to_hash, objc_lookup_class): Likewise. + (objc_get_class, objc_get_next_class): Likewise. + (__objc_resolve_class_links, class_pose_as): Likewise. + * objc/init.c (__objc_runtime_mutux, __objc_runtime_thread_alive): + New variables. + (objc_init_statics, __objc_init_protocols): Surround sarray access + with mutex lock/unlock + (__objc_exec_class): Likewise. + Initialization for thread-safe global variables. + Declarations for thread-safe functions and global variables + * objc/sendmsg.c (get_imp, __objc_responds_to): + Surround sarray access with mutex lock/unlock. + (__objc_init_install_dtable): Likewise. + (__objc_update_dispatch_table_for_class): Likewise. + (__objc_print_dtable_stats): Likewise. + * objc/selector.c (sel_get_typed_uid, sel_get_any_typed_uid): Likewise. + (sel_get_any_uid, sel_get_name, sel_register_name): Likewise. + (sel_register_typed_name): Likewise. + * objc/sarray.h (union sversion): New. + (struct sarray): Maintain multiple versions. + (sarray_remove_garbage): Add prototype. + * objc/sarray.c (sarray_{remove,free}_garbage): New functions. + (sarray_at_put, sarray_new, sarray_lazy_copy): + Modify/copy sarray structure/data in a thread-safe manner + (sarray_{realloc,free}): Reallocate/free sarray structure/data in a + thread-safe manner. + + * objc/THREADS, objc/thread.c, objc/thread.h: New files. + * objc/thread-{decosf1,irix,solaris,win32,single}.c: New files. + * objc/objc-list.h: Renamed from objc/list.h. + * objc/Makefile: Changes to compile new files and name renaming. + * objc/makefile.dos: Likewise. + +Tue Mar 5 07:51:31 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * bc-emit.c, bc-optab.c (free): Delete declaration of library function. + + * c-decl.c (duplicate_decl): If making decl non-external, copy + context from old to new. + +Tue Mar 5 02:27:35 1996 Jeffrey A. Law <law@cygnus.com + + * lib2funcs.asm (__outline_prologue): New "function". + (__outline_epilogue): New "function". + * pa.h (TARGET_SPACE): Define. + (target_flags): Add -mspace and -mno-space. Enable/disable + space saving optimizations. + (FRAME_POINTER_REQUIRED): Frame pointers are always required + when generating out of line prologues and epilogues. + * pa.c (compute_frame_size): Handle out of line prologues/epilogues. + (hppa_expand_prologue): If optimizing for space, emit an out of + line prologue. + (hppa_expand_epilogue): Similarly. + (override_options): Optimizing for space is not compatable with + either profiling or PIC code generation. + * pa.md (outline_prologue_call): New pattern. + (outline_epilogue_call): Likewise. + +Tue Mar 5 02:17:32 1996 Doug Evans <dje@cygnus.com> + + * sparc.md (*cmp{si,di}_insn): %r0 -> %0. + (DFmode move define_split): Ensure registers not extended v9 fp regs. + (*mov{sf,df,tf}_cc_reg_sp64): %r3 -> %3. + +Mon Mar 4 18:46:37 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de> + + * Makefile.in (CRT0STUFF_T_CFLAGS): New macro. + (stamp-crt0, crt0.o, mcrt0.o): New goals. + (STAGESTUFF): stamp-crt0 added. + + * collect2.c (main): Check new define DEFAULT_A_OUT_NAME. + + * m68k.c (print_operand): Emit .l as scale factor #ifdef MOTOROLA. + * m68k/mot3300-crt0.S, m68k/mot3300Mcrt0.S: New files. + * m68k/mot3300g.h: Deleted. + * m68k/mot3300.h (FUNCTION_PROFILER): Emit label references + corresponding to those generated by ASM_OUTPUT_INTERNAL_LABEL. + (MOTOROLA, MOTOROLA_BSR, ...): Define #ifndef USE_GAS. + (ASM_SPEC): Define properly #ifdef USE_GAS. + (LIB_SPEC): -L/usr/lib/libp deleted. + (STARTFILE_SPEC): -L/usr/lib/libp added. + (DEFAULT_A_OUT_NAME): Define. + (LINK_SPEC): Pass -v if GNU ld is used. + (LOCAL_LABEL_PREFIX): Local labels start with .L using GAS, else L%. + (USER_LABEL_PREFIX): Undefine. + (FUNCTION_PROFILER): Call asm_fprintf instead of normal fprintf. + (ASM_APP_ON, ASM_FILE_START): GAS supports it. + (CTORS_.../DTORS_...): Define if GNU ld is used. + (ASM_FILE_START): Define properly for Motorola and GNU as syntax. + (TARGET_VERSION): Re-define only #ifndef USE_GAS. + (CALL_USED_REGISTERS): Deleted. + (GLOBAL_ASM_OP): Re-define only #ifndef USE_GAS. + (ASM_{LONG,SHORT,CHAR,BYTE,BYTE_OP}): New macros. + (ASM_OUTPUT_{DOUBLE,LONG_DOUBLE,FLOAT,INT,SHORT}): Use them. + (ASM_OUTPUT_{CHAR,BYTE,ASCII,FLOAT_OPERAND,DOUBLE_OPERAND}): Likewise. + (ALIGN_ASM_OP, SKIP_ASM_OP): New macros. + (ASM_OUTPUT_{ALIGN,SKIP}): Use them. + (ASM_OUTPUT_SOURCE_FILENAME): Define only if not using GNU as. + (ASM_{GENERATE,OUTPUT}_INTERAL_LABEL): Provide proper definitions for + Motorola and GNU as syntax. + (ASM_OUTPUT_ADDR_{VEC,DIFF}_ELT): Changed for portability between + Motorola and GNU as syntax. + (ASM_OUTPUT_{CASE_LABEL,OPCODE}): Define only if not using GNU as. + (ASM_OUTPUT_CASE_FETCH, ASM_RETURN_CASE_JUMP): New macros. + (ASM_OUTPUT_{COMMON,LOCAL}): Proper defns for Motorola and gas syntax. + (SDB_...): Define only for Motorola as. + (ALT_LIBM): New define to tell g++.c about an alternative name for + `-lm'. + (MATH_LIBRARY, NEED_ATEXIT, HAVE_ATEXIT, EXIT_BODY): New macros. + * m68k/t-mot3300, m68k/t-mot3300-{gald,gas,gld}: New files. + * m68k/x-mot3300-gas: New file. + * m68k/xm-mot3300.h (USG): Set to 1. + * configure (m68k-motorola-sysv*): Keep track of new different + combinations (--with-gnu-...), and provide proper definitions for + tm_file, xmake_file, tmake_file, use_collect2, and extra_parts. + + * gbl-ctors.h (HAVE_ATEXIT): Define if NEED_ATEXIT is defined. + (atexit): Use `int atexit' prototype also if NEED_ATEXIT is defined. + (on_exit): According to man on_exit on the Sun it returns int not void. + * libgcc2.c (L_bb/atexit, onexit): Declarations replaced by + #include'ing "gbl-ctors.h". + (L_exit/atexit): New function. + (L_exit/exit): Call any registered functions. + +Mon Mar 4 18:03:38 1996 Bryan Ford (baford@cs.utah.edu) + + * configure (i[3456]86-moss-msdos*): New target. + * i386/moss.h: New file. + +Mon Mar 4 17:38:50 1996 Jim Wilson <wilson@cygnus.com> + + * sh.h (PASS_IN_REG_P): Don't reject BLKmode for SH3e. + For SH3e, do reject parameter that won't fit entirely in registers. + + * sh.md (mulhisi3-2, mulhisi3-1, mulsidi3_i, umulsidi3_i, + smulsi3_highpart, umulsi3_highpart): Renames operands 1/2 to 0/1. + (mulsidi3, umulsidi3): Add support for TARGET_LITTLE_ENDIAN. + + * sh.c (machine_dependent_reorg): In TARGET_RELAX code, when scan + forward from LINK, fail if pass a CODE_LABEL before finding INSN. + Fail if SCAN not INSN is a JUMP_INSN. + +Mon Mar 4 11:27:10 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.h (CALL_LONG): Change CALL_xx values from an enumeration + to bitmasks. Add CALL_LONG to support longcall attributes. + (rs6000_args): Call_cookie field is now an int. + (rs6000_longcall_ref): Add declaration. + + * rs6000.c (init_cumulative_args): Add support for longcall + attributes to always call through a pointer. + (function_arg): Ditto. + (rs6000_valid_type_attribute_p): Ditto. + (rs6000_longcall_ref): New function for long calls. + + * rs6000.md (call insns): Add support for longcall attributes. + +Mon Mar 4 08:42:14 1996 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * real.c (significand_size): Don't test the modes, but their sizes. + + * dwarfout.c (xstrdup): Moved from here. + * toplev.c (xstrdup): New function. + * tree.h (xstrdup): Declare. + * bc-emit.c (bc_xstrdup): Delete. + * expr.c (bc_strdup): Delete. + (bc_load_externaddr_id): Use xstrdup instead of bc_xstrdup. + * function.c (bc_expand_function_start): Likewise. + * 1750a.c (strdup): Delete. + (float_label): Use xstrdup instead of strdup. + * 1750a.h (xstrdup): Declare instead of instead of strdup. + (ASM_OUTPUT_LABEL): Use xstrdup instead of strdup. + (FIX_FRAME_POINTER_ADDRESS): Don't use DEPTH in string. + +Mon Mar 4 08:23:23 1996 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * xm-we32k.h (NO_WAIT_H): Deleted. + + * collect2.c: Never include wait.h. + +Sat Mar 2 22:43:07 1996 Torbjorn Granlund <tege@spiff.gnu.ai.mit.edu> + + * configure (code for making links): Work around sh bug on FreeBSD. + +Sat Mar 2 13:40:29 1996 Jeffrey A. Law <law@cygnus.com> + + * h8300.h (BIGGEST_FIELD_ALIGNMENT): Replace uses of + TARGET_ALIGN_STRUCT_300 with TARGET_ALIGN_300. + (BIGGEST_ALIGNMENT): Likewise. + +Sat Mar 2 08:04:50 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * calls.c (expand_call): If passing by invisible ref, not const. + + * sparc.c (SKIP_CALLERS_UNIMP_P): Make agree with test used in call. + + * expr.c (do_jump, case COMPOUND_EXPR): Call preserve_temp_slots. + + * fold-const.c (fold, case *_DIV_EXPR): Ignore SAVE_EXPR if has RTL. + +Fri Mar 1 17:59:17 1996 Jeffrey A. Law <law@cygnus.com> + + * optabs.c (emit_cmp_insn): Immediately copy the return + value from the library call into a pseudo register. + (emit_float_lib_cmp): Likewise. + +Fri Mar 1 14:37:40 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/sysv4.h (BSS_SECTION_ASM_OP): Define. + (*_SECTION_ASM_OP): Change tab after .section into a space. + (ASM_OUTPUT_INT): Ditto. + (ASM_OUTPUT_ALIGNED_LOCAL): Rewrite to use bss_section. + (ASM_OUTPUT_ALIGNED_BSS): Define to use ASM_GLOBALIZE_LABEL and + ASM_OUTPUT_ALIGNED_LOCAL. + + * rs6000/win-nt.h (BSS_SECTION_ASM_OP): Define. + (ASM_OUTPUT_ALIGNED_LOCAL): Define. + (ASM_OUTPUT_LOCAL): Don't define any more. + (ASM_OUTPUT_ALIGNED_BSS): Define to use ASM_GLOBALIZE_LABEL and + ASM_OUTPUT_ALIGNED_LOCAL. + +Thu Feb 29 17:33:12 1996 Jim Wilson <wilson@chestnut.cygnus.com> + + * c-typeck.c (push_init_level): When output padding to align structure + field, set constructor_unfilled_fields. + + * dbxout.c (dbxout_type, case METHOD_TYPE): Add CHARS (1) call + after emitting second '#' character. + +Thu Feb 29 13:59:27 1996 Doug Evans <dje@charmed.cygnus.com> + + * h8300.h (ASM_OUTPUT_BSS): Define. + * m68k/coff.h (BSS_SECTION_ASM_OP): Define. + (ASM_OUTPUT_ALIGNED_BSS): Define. + * m68k/m68k-aout.h (BSS_SECTION_ASM_OP): Define. + (ASM_OUTPUT_BSS): Define. + +Thu Feb 29 13:39:39 1996 Per Bothner <bothner@cygnus.com> + + * varasm.c (compare_constant_1): For a SET_TYPE CONSTRUCTOR, + first extract and compare the set length. + + * varasm.c (record_constant_1): For SET_TYPE CONSTRUCTOR, + permanent_obstack.next_free is *end* of available space. + +Thu Feb 29 13:14:14 1996 Jeffrey A. Law <law@cygnus.com> + + * pa.h (TARGET_SWITCHES): Add new flags "-mlong-load-store" and + "-mno-long-load-store". + (TARGET_LONG_LOAD_STORE): Define. + * pa.md (symbolic high part): Handle TARGET_LONG_LOAD_STORE. + +Thu Feb 29 11:39:30 1996 Stan Cox <coxs@dg-rtp.dg.com> + + * i386.md (cmpxf*): XF compare cannot have mem operands. + (casesi expand): Put (minus:SI..) into subsi3 format. + * i386.c (i386_return_pops_args): Cleanup extra argument + used as address of a returned structure. + +Wed Feb 28 22:24:28 1996 Doug Evans <dje@cygnus.com> + + * varasm.c (enum in_section): Define in_bss if BSS_SECTION_ASM_OP + is defined. + (bss_section,asm_output_bss,asm_output_aligned_bss): New functions. + (assemble_variable): Delete redundant test for too large an object. + Rewrite test for uninitialized variables. Use new macros + ASM_OUTPUT{,_ALIGNED}_BSS if defined to output global uninitialized + but not common variables. + * bytecode.h (BC_OUTPUT_BSS): Define. + * lynx.h (EXTRA_SECTIONS): Delete in_bss. + (EXTRA_SECTION_FUNCTIONS): Delete BSS_SECTION_FUNCTION. + * svr3.h (EXTRA_SECTIONS): Likewise. + (BSS_SECTION_FUNCTION): Delete. + * convex.h (EXTRA_SECTIONS,EXTRA_SECTIONS_FUNCTIONS): Delete. + * dsp16xx.h (EXTRA_SECTIONS): Delete in_bss. + (EXTRA_SECTION_FUNCTIONS): Delete bss_section. + * gmicro.h (EXTRA_SECTIONS,EXTRA_SECTIONS_FUNCTIONS): Delete. + * i386/aix386ng.h (EXTRA_SECTION_FUNCTIONS): Delete + BSS_SECTION_FUNCTION. + * i386/att.h (BSS_SECTION_FUNCTION): Delete. + * i386/sco5.h (EXTRA_SECTIONS): Delete in_bss. + (EXTRA_SECTION_FUNCTIONS): Delete BSS_SECTION_FUNCTION. + (BSS_SECTION_FUNCTION): Delete. + * i386/seq-sysv3.h (BSS_SECTION_FUNCTION): Delete. + * i386/svr3gas.h (EXTRA_SECTIONS): Delete in_bss. + (EXTRA_SECTION_FUNCTIONS): Delete BSS_SECTION_FUNCTION. + (BSS_SECTION_FUNCTION): Delete. + * i860/paragon.h (EXTRA_SECTIONS,EXTRA_SECTIONS_FUNCTIONS): Undef. + * m68k/crds.h (EXTRA_SECTIONS,EXTRA_SECTIONS_FUNCTIONS): Delete. + (BSS_SECTION_ASM_OP): Define. + * m68k/m68k.h (BC_OUTPUT_BSS): Define. + * mips/iris6.h (EXTRA_SECTIONS): Delete in_bss. + * pa.h (EXTRA_SECTIONS): Delete in_bss. + (EXTRA_SECTION_FUNCTIONS): Delete bss_section. + * sparc/litecoff.h (EXTRA_SECTIONS): Delete in_bss. + +Wed Feb 28 14:12:25 1996 Jim Wilson <wilson@chestnut.cygnus.com> + + * sh.h (FUNCTION_VALUE_REGNO_P, FUNCTION_ARG_REGNO_P): Include FP + registers only when TARGET_SH3E. + (PASS_IN_REG_P): Exclude BLKmode only when ! TARGET_SH3E. + +Wed Feb 28 12:03:26 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.c (rs6000_trampoline_{template,size}): Change Windows NT + trampoline template so it doesn't require making stack executable. + Add support for 64 bit systems. + (rs6000_initialize_trampoline): Ditto. + +Tue Feb 27 16:42:00 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.c (print_operand): New code 'H'. + * rs6000.md (insv, extzv): Add DImode patterns. Use 'h' + consistently for masking SImode shifts. + (rotldi3, ashldi3, lshrdi3, ashrdi3): Use 'H'. + (movsf split): Generate CONST_INT instead of SUBREG. + +Tue Feb 27 15:02:17 1996 Doug Evans <dje@cygnus.com> + + * sh.h (HANDLE_PRAGMA): Delete `return'. + +Tue Feb 27 08:18:12 1996 Richard Earnshaw (rearnsha@armltd.co.uk) + + * arm.c (aof_text_section): Remove pseudo read-only hack. Doesn't + take a parameter any more. + * arm/aof.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove + readonly data sections. + (READONLYDATA_SECTION, READONLY_DATA_SECTION): Delete. + + * arm.h (enum arm_cond_code): New enum. + (ARM_INVERSE_CONDITION_CODE): Moved here from arm.c. + (SELECT_CC_MODE): Call arm_select_cc_mode to do the work. + (PREDICATE_CODES): Add dominant_cc_register; delete + reversible_cc_register. + * arm.c (arm_current_cc): Now an enum. + (ARM_INVERSE_CONDITION_CODE): Moved to arm.h + (revsersible_cc_register): Delete. + (dominant_cc_register): New function. + (select_dominance_cc_mode): New function. + (arm_select_cc_mode): New function. + (output_return_instruction): New parameter REVERSE, used to + reverse the condition of a conditional return. All callers + changed. + (arm_print_operand case 'D'): Only suppress condition printing + if the operand is a NULL pointer. + (get_arm_condition_code): Now a static function returning + enum arm_cond_code. Handle dominance expressions. Return enum + values rather than integers. + * arm.md (*addsi3_compare0_scratch): New insn. + (*movsi_compare0, *cmpsi_insn, *cmpsi_shiftsi): Make sure the + compare has mode CC. + (cmp{si,sf,df,xf} expands): Just provide sufficient information + to allow the parameters to be matched properly. + (*cmpsi_negsi): Delete (of dubious validity). + (*cmpsi_shiftsi_swp): New pattern. + (*condbranch_reversed): No longer needs to check REVERSIBLE_CC_MODE. + (mov{si,sf,df}cc, *mov{si,sf,df}{,_hard,_soft}_insn): The mode of the + IF_THEN_ELSE must be appropriate to the target (not void). + (*and_scc): Match cc_register, not reversible_cc_register. + (*ior_compare_compare): Delete. + (split for ior_compare_compare + condjump): Delete. + (*impossible_cond_compare): Delete. + (*condition_compare_ior): Delete. + (*cond_move): Mode for the IF_THEN_ELSE must be SImode. + (*and_scc_scc): Delete. + (split for and_scc_scc + condjump): Delete. + (*impossible_cond_branch_and): Delete. + (*cmp_ite0, *cmp_ite1): New patterns. + (if_compare_not): Should be an anonymous pattern. + (Peephole for move and compare): Compare mode must be mode CCmode. + (Split pattern for comparing shifted reg then branch): Delete. + (*loadqi_compare): Delete, replaced with a split pattern to do + the same thing. + (*cond_move_not): Match cc_register, not reversible_cc_register. + + * arm.c ({load,store}_multiple_sequence): New functions. + (emit_{ldm,stm}_seq): New functions. + * arm.md (load/store multiple peepholes): Rewrite using the above + functions. + (all patterns taking immediate_operand): If the code later assumes + this is a CONST_INT, then match const_int_operand instead. + +Mon Feb 26 17:26:13 1996 Doug Evans <dje@cygnus.com> + + * sparc.md: Add sparclet scheduling parameters. + (compare define_insn's): Move closer to compare define_expand's. + (32 bit multiply patterns): Use for TARGET_SPARCLET. + (*smacsi,*smacdi,*umacdi): Multiply/accumulate patterns for the + sparclet. + +Sat Feb 24 19:13:29 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.md (movsf split): Fix typo in last patch. + +Sat Feb 24 10:02:55 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * toplev.c (fatal_insn): Flush stdout/stderr. + +Sat Feb 24 02:03:28 1996 Jeffrey A. Law <law@cygnus.com> + + * pa.md (abssi2): Rework to avoid matching constraints. + +Fri Feb 23 11:21:43 1996 Jeffrey A. Law <law@cygnus.com> + + * pa.c (override_options): Warn if both PIC code generation and + profiling are requested. + +Fri Feb 23 08:47:38 1996 Richard Kenner (kenner at vlsi1) + + * expr.c (expand_builtin, case BUILT_IN_SETJMP): Set CONST_CALL_P + on NOTE_INSN_SETJMP instead of emitting USE insns for call-saved regs. + * reload1.c (reload): For special CONST_CALL_P NOTE_INSN_SETJMP, + mark all call-saved regs as used. + * sched.c (sched_analyze): Record NOTE_INSN_SETJMP if no + CALL_INSN as prev; preserve CONST_CALL_P bit. + (reemit_notes): Restore CONST_CALL_P. + +Thu Feb 22 17:45:12 1996 Doug Evans <dje@cygnus.com> + + * configure (sparclet-*-aout*): Set extra_headers. + * ginclude/inl-sparc.h: New file. + +Wed Feb 21 20:39:53 1996 Doug Evans <dje@cygnus.com> + + * configure (sparc64-*-solaris2*): Merge with sparc-*-solaris2*. + * sparc.h (enum processor_type): Declare. + (sparc_cpu_attr): Define. + (TARGET_OPTIONS): Add -mtune=. + (sparc_select): Declare. + (sparc_cpu_string): Delete. + (FIRST_PSEUDO_REGISTER): Set to 100. + ({FIXED,CALL_USED}_REGISTERS): Merge !v9/v9 cases. + (CONDITIONAL_REGISTER_USAGE): Mark %g5 as fixed if !v9. + Mark %g1 as fixed if v9. Fix v9-only regs if !v9. + Mark fp{16..47} as call-saved if v9. + (enum reg_class): Merge !v9/v9 cases. + (REG_CLASS_NAMES,REG_CLASS_CONTENTS,REGNO_REG_CLASS): Likewise. + (REG_ALLOC_ORDER,REG_LEAF_ALLOC_ORDER,LEAF_REGISTERS): Likewise. + (FP_REG_CLASS_P,SPARC_REGISTER_NAMES): Likewise. + (REG_CLASS_FROM_LETTER): Test TARGET_V9 at runtime. + * sparc.c (sparc_cpu_string): Delete. + (sparc_select): New global. + (sparc_override_options): Handle -mtune=xxx. + * sparc.md (cpu attr): Add sparc{lite,let} implementations. + * sparc/sp64-sol2.h: Deleted. + + * arm.md (consttable_end): Delete call to text_section. + (align_4): Delete call to readonly_data_section. + +Wed Feb 21 14:29:06 1996 Ian Lance Taylor <ian@cygnus.com> + + * cplus-dem.c (demangle_template): Initialize is_bool. Correctly + handle 0 as a pointer value parameter. + +Wed Feb 21 14:13:29 1996 Jason Merrill <jason@yorick.cygnus.com> + + * tree.c (decl_function_context): Do decl_function_context right for + function-local classes. + +Wed Feb 21 12:42:52 1996 Jeffrey A. Law <law@cygnus.com> + + * c-typeck.c (initializer_constant_valid_p): Don't dereference + a null pointer on partial structure initialization. + +Wed Feb 21 11:49:58 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.h (ASM_OUTPUT_EXTERNAL): Append section info + even when verbatim symbol prefix '*' present. + * rs6000/aix3newas.h (ASM_OUTPUT_EXTERNAL): Same. + * rs6000/aix41.h (ASM_OUTPUT_EXTERNAL): Same. + * rs6000/powerpc.h (ASM_OUTPUT_EXTERNAL): Same. + * rs6000/win-nt.h (ASM_OUTPUT_EXTERNAL): Same. + +Wed Feb 21 03:55:32 1996 Paul Eggert <eggert@twinsun.com> + + * cccp.c (validate_else): Don't loop given `#endif /'. + Handle multiple adjacent backslash-newlines correctly. + Accept a new parameter LIMIT to specify end of input; + this prevents confusion when the input contains '\0' characters. + (collect_expansion): Fix off-by-1 error when searching for `*/' + at end of a comment used for traditional token concatenation. + (macarg1): Fix off-by-1 error when skipping past `*/' + at end of comment. + +Tue Feb 20 16:12:31 1996 Doug Evans <dje@cygnus.com> + + * hard-reg-set.h (twice unrolled GO_IF_HARD_REG_EQUAL): Add missing \. + +Tue Feb 20 14:21:16 1996 Jeffrey A. Law <law@cygnus.com> + + * pa.h (DBX_CONTIN_LENGTH): Define to 4000 characters. + + * pa.c (hppa_expand_epilogue): Always emit a blockage insn + before cutting back the stack. + +Mon Feb 19 19:42:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com> + + * sparc.h (TARGET_SWITCHES): Add -m{,no-}impure-text. + (MASK_IMPURE_TEXT, TARGET_IMPURE_TEXT): Define. + (LINK_SPEC): Only add `-assert pure-text' if -mimpure-text wasn't used. + +Mon Feb 19 19:20:15 1996 Doug Evans <dje@canuck.cygnus.com> + + * configure (sparc-aout): sparc-aout.h renamed to aout.h. + (sparclet-aout): Likewise. + (sparclite-*-aout*): Renamed from sparclite-*-*. + Don't set use_collect2. + (target_cpu_default): Set to TARGET_CPU_<cpu> for sparc. + + * sparc.h (TARGET_CPU_sparc{,let,lite,64}): Define. + ({CPP,ASM}_DEFAULT_SPEC): Set from TARGET_CPU_foo. + (SPARC_ARCH64 CPP_PREDEFINES): Define __arch64__. + (CPP_SPEC): Add %(cpp_cpu). + (CPP_CPU_SPEC): Define. + (CC1_SPEC): Convert -m<cpu> to -mcpu=<cpu>. + (ASM_SPEC): Add %(asm_cpu). + (ASM_CPU_SPEC): Define. + (EXTRA_SPECS,SUBTARGET_EXTRA_SPECS): Define. + (OVERRIDE_OPTIONS): Call SUBTARGET_OVERRIDE_OPTIONS after + sparc_override_options. + ({MASK,TARGET}_SUPERSPARC): Delete. + ({MASK,TARGET}_SPARCLET): Define. + (MASK_ISA): Renamed from MASK_CPUS. + (TARGET_SWITCHES): Delete no-{v8,sparclite}. + (sparc_cpu,sparc_cpu_string): Declare. + ({SUB,}TARGET_OPTIONS): Define. + (FIXED_REGISTERS): Add definitions for sparc64 in 32 bit mode. + (CONDITIONAL_REGISTER_USAGE): Don't set fixed_regs[234] if sparc64. + Don't set call_used_regs[48..80] for sparc64 in 32 bit mode. + Don't clobber fixed_regs[234] if -ffixed- was passed. + (ADJUST_COST): Change test for supersparc. + * sparc.c (sparc_cpu_string,sparc_cpu): New globals. + (sparc_override_options): Set ISA and CPU from sparc_cpu_string. + Delete tests for v9 only switches if not v9. + Error if -mcpu=v9 and v9 support not compiled in. + * sparc/sol2.h (CPP_SPEC): Use %(cpp_cpu). + (ASM_SPEC): Likewise. + (ASM_{DEFAULT,CPU}_SPEC): Use Solaris syntax for sparc64. + * sparc/sysv4.h (ASM_SPEC): Add %(asm_cpu). + * sparc/t-sparcbare (MULTILIB_*): -mv8 renamed to -mcpu=v8. + * sparc/t-sparclite (MULTILIB_*): Delete msoft-float and mno-flat, + they're the defaults. Add -mcpu=f934 as synonym for -mfpu. + * va-sparc.h (__arch64__): Renamed from __sparc_v9__. + + * sparc/lite.h: #include aoutos.h. + (TARGET_DEFAULT): Use MASK_FOO values. + * sparc/sp64-aout.h: #include aoutos.h. + (TARGET_DEFAULT): Add MASK_APP_REGS. + (JUMP_TABLES_IN_TEXT_SECTION,READONLY_DATA_SECTION): Delete. + * sparc/sp64-elf.h (TARGET_DEFAULT): Add MASK_APP_REGS. + (CPP_PREDEFINES): Define __arch64__. + * sparc/sp64-sol2.h (TARGET_DEFAULT, SUBTARGET_SWITCHES): Delete. + (ASM_SPEC): Delete. + + * sparc.h ({MASK,TARGET}_FRW): Delete. + (FRAME_POINTER_REQUIRED,INITIAL_FRAME_POINTER_OFFSET, + BASE_{INCOMING_ARG,OUTGOING_VALUE}_REG,INCOMING_REGNO,OUTGOING_REGNO, + FUNCTION_{PROLOGUE,EPILOGUE},DELAY_SLOTS_FOR_EPILOGUE): TARGET_FRW + renamed to TARGET_FLAT. + + * sparc.md (cpu attr): Add all cpu variants. + (negtf2,negdf2,abstf2,absdf2): Use isa attr, not arch attr, in + determining insn lengths. + + * sparc/aout.h: Renamed from sparc-aout.h. + (CPP_PREDEFINES): Delete __GCC_NEW_VARARGS__. + Add -Acpu(sparc) -Amachine(sparc). + +Mon Feb 19 17:49:08 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.md (movsf split): Use SUBREG, not operand_subword. + (movdf split): operand_subword TARGET_32BIT and new split using + SUBREG for TARGET_64BIT. + * rs6000.c (easy_fp_constant): Rewrite to not use operand_subword. + (input_operand): Remove final add_operand test made irrelevant by + Dec. 8 change. + (output_toc): Handle DImode values. + +Mon Feb 19 13:38:00 1996 Lee Iverson <leei@Canada.AI.SRI.COM> + + * i386/sol2.h (SWITCH_TAKES_ARG): Restore -R. + * sparc/sol2.h (SWITCH_TAKES_ARG): Likewise. + +Mon Feb 19 08:19:00 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * hard-reg-set.h (HARD_REG macros): If more than + HOST_BITS_PER_WIDE_INT hard registers and less than or equal to + 4*HOST_BITS_PER_WIDE_INT hard registers, unroll loops by hand. + +Mon Feb 19 07:35:07 1996 Torbjorn Granlund <tege@tmg.se> + + * rs6000.md (not:SI with assign and compare): Fix typo. + (not:DI with assign and compare): Likewise. + +Mon Feb 19 07:17:25 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * sparc.md (nonlocal_goto): No longer need USE of %o0. + (goto_handler_and_restore): Show uses %o0. + + * combine.c (force_to_mode, case IOR): Fix typo in commuting + IOR and LSHIFTRT. + + * alpha.c (call_operand): If in REG, only reg 27 valid. + +Mon Feb 19 06:57:34 1996 Richard Earnshaw (rearnsha@armltd.co.uk) + + * emit-rtl.c (operand_subword): For 32-bit targets, return + the appropriate subword of extended precision CONST_DOUBLEs. + + * arm.c (offsettable_memory_operand): New function. + (alignable_memory_operand): New function. + (gen_rotated_half_load): New function. + (get_arm_condition_code): Extract the mode of the comparison and + use it to generate the correct return value. + * arm.h (EXTRA_CC_MODES, EXTRA_CC_NAMES): Add CC_Zmode. + (SELECT_CC_MODE): return CC_Zmode if the operand is QImode. Allow LT + and GE comparisons in CC_NOOVmode. + (PREDICATE_CODES): add offsettable_memory_operand and + alignable_memory_operand. + * arm.md (*zeroextract[qs]i_compare0_scratch): Use const_int_operand + for operands 1 and 2. + (split patterns for aligned memory half-word operations): New patterns. + (movhi): Handle memory accesses where the alignment is known in a more + efficient manner. + (*compareqi_eq0): Use CC_Zmode. + +Mon Feb 19 05:34:08 1996 Jason Merrill <jason@phydeaux.cygnus.com> + + * toplev.c (lang_options): Add -W{no-,}sign-compare. + + * c-tree.h: Declare warn_sign_compare. + + * c-typeck.c (build_binary_op): Check warn_sign_compare rather + than extra_warnings to decide whether to warn about comparison of + signed and unsigned. + + * c-decl.c (c_decode_option): Handle warn_sign_compare. -Wall + implies -Wsign-compare. + +Sun Feb 18 21:13:44 1996 Pat Rankin (rankin@eql.caltech.edu) + + * c-lex.c (yylex, case '0'..'9','.'): For cases '0' and '1', + check for single digit constant before resorting to general + number processing. + +Sun Feb 18 19:29:44 1996 J.T. Conklin <jtc@netbsd.org> + + * m68k.h (TARGET_68060): New macro. + (TARGET_SWITCHES): Add -m68060. + * m68k.md (const_umulsi3_highpart): Disable for TARGET_M68060. + (ftruncdf2, ftruncsf2, muldf3, mulsidi3): Likewise. + (smulsi3_highpart, umulsi3_highpart, umulsidi3): Likewise. + + * {m68k,ns32k,sparc}/netbsd.h (DBX_NO_XREFS): Removed. + +Sun Feb 18 13:29:56 1996 Charles M. Hannum (mycroft@netbsd.org) + + * c-common.c (check_format_info): Warn about `L' if -pedantic. + +Fri Feb 16 20:13:23 1996 Paul Eggert <eggert@twinsun.com> + + * c-typeck.c (convert_for_assignment): + Bring back conversion to union without a cast, + undoing the Jan 16 change, but with the following differences: + - The union must have the transparent_union attribute. + - The conversion must be for a function argument. + - Warn consistently about such conversions if pedantic. + - Do not warn about an assignment incompatibility for one union member + if another union member is compatible with no warning. + +Fri Feb 16 12:06:21 1996 Stan Cox <coxs@spiff.gnu.ai.mit.edu> + + * i386.c (ix86_*_binary_operator*): Allow CONST_INT as operand1 + of MINUS. + * i386/dgux.h (OPTIMIZATION_OPTIONS): Call optimization_options. + +Fri Feb 16 08:39:47 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * configure: Change stdout report when have multiple files in + tm_file, host_xm_file, or build_xm_file. + (a29k-*-bsd): Use both a29k.h and unix.h. + (a29k-*-udi): Rename a29k-udi.h to udi.h; + use a29k.h, dbxcoff.h, and it. + (a29k-*-vxworks): Use a29k.h, dbxcoff.h, a29k/udi.h, and a29k/vx29k.h. + (alpha-dec-osf[23456789]*): Use alpha.h, not osf2.h. + (alpha-dec-osf1.2): Use alpha.h and alpha/osf12.h. + (alpha-*-osf*): Add explicit assignment of tm_file. + * a29k/udi.h: Renamed from a29k-udi.h. + Don't include a29k.h or dbxcoff.h. + * a29k/unix.h: Don't include a29k.h. + * a29k/vx29k.h: Don't include a29k-udi.h. + * alpha.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int. + * alpha/osf2.h: Deleted. + * alpha/osf12.h: Don't include alpha.h. + (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use short unsigned int. + * alpha/win-nt.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use short unsigned int. + +Thu Feb 15 18:26:04 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/ntstack.asm (__allocate_stack): Round up length to 16 + byte boundary. + + * rs6000.md (allocate_stack): On Windows NT, call set_sp to + indicate to CSE stack pointer changes with call to __allocate_stack. + (set_sp): New pattern. + +Thu Feb 15 16:49:15 1996 Jim Wilson <wilson@cygnus.com> + + * integrate.c (save_for_inline_copying): Allocate reg_map with size + based on regno_pointer_flag_length instead of max_reg+1. + +Thu Feb 15 07:48:34 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fixincludes (rpc/types.h): Remove spurious "ls" command. + + * reload1.c (eliminate_regs, case USE): If using a register that + is source of elimination, show can't be eliminated. + + * expr.c (expand_builtin, case BUILT_IN_SETJMP): Shows clobbers FP + and all caller-save registers. + Set current_function_has_nonlocal_goto. + +Wed Feb 14 13:51:55 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.md (fix_truncdfsi2): Use SUBREG not operand_subword. + (movdi): Test HOST_BITS_PER_WIDE_INT at build time. + * collect2.c (scan_libraries): Append '/' to import path if missing. + +Wed Feb 14 09:01:55 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.md (movdi): Use HOST_WIDE_INT, not long long. + +Tue Feb 13 19:36:21 1996 Per Bothner <bothner@cygnus.com> + + * expr.c (store_constructor): Fix flow control thinko (merge error). + * expr.c (store_constructor): Pass correct value to recursive call. + +Wed Jan 31 11:34:45 1996 Mike Stump <mrs@cygnus.com> + + * expr.c (expand_expr, case TARGET_EXPR): We must always store + into the allocated slot for TAREGT_EXPRs. + +Tue Feb 13 18:27:05 1996 Philippe De Muyter <phdm@info.ucl.ac.be> + + * configure (powerpc-ibm-aix3): Look for 3.2.x, not 3.2x. + + * fixincludes (memory.h): Fix it also on sysV68. + +Tue Feb 13 17:59:03 1996 Lee Iverson <leei@Canada.AI.SRI.COM> + + * gcc.c (DEFAULT_SWITCH_TAKES_ARG): New macro, from SWITCH_TAKES_ARG. + (SWITCH_TAKES_ARG): Use it. + * i386/{osfrose,sol2}.h (SWITCH_TAKES_ARG): Likewise. + * mips/{gnu,mips}.h (SWITCH_TAKES_ARG): Likewise. + * sparc/sol2.h (SWITCH_TAKES_ARG): Likewise. + * config/svr4.h (SWITCH_TAKES_ARG): Likewise. + +Tue Feb 13 17:43:46 1996 Jim Wilson <wilson@cygnus.com> + + * integrate.c (save_constants_in_decl_trees): New function. + (save_for_inline_copying, save_for_inline_nocopy): Call it. + +Tue Feb 13 17:40:27 1996 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * expr.c (convert_move): Fix typo in extendqfh2 case. + + * reload1.c (reload): Make some non-group code no longer + conditional on SMALL_REGISTER_CLASSES. + +Tue Feb 13 17:30:45 1996 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * pdp11.c: #include flags.h + (output_function_prologue, function_epilogue): Remove declarations + of call_used_regs and frame_pointer_needed. + + * c-common.c (overflow_warning): Fix typo in warning message. + + * c-decl.c (finish_decl): TREE_ASM_WRITTEN says if duplicate_decls + modified declaration to match an outside file scope declaration. + + * stmt.c (expand_end_case): Don't use ADDR_DIFF_VEC for PIC if + ASM_OUTPUT_ADDR_DIFF_ELT is not defined. + * a29k.h, romp.h (ASM_OUTPUT_ADDR_DIFF_ELT): Remove. + +Tue Feb 13 13:36:36 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/cygwin32.h (CPP_PREDEFINES): Do not define PPC, just + define __PPC__. Also define _ARCH_PPC to be compatible with the + other rs6000/powerpc ports. + * rs6000/win-nt.h (CPP_PREDEFINES): Ditto. + + * rs6000/cygwin32.h (LIBGCC_SPEC): Don't define, always link in. + (SDB_DEBUGGING_INFO): Undef. + (DBX_DEBUGGING_INFO): Define. + (PREFERRED_DEBUGGING_TYPE): Define as DBX_DEBUG. + + * rs6000/t-{cygwin32,winnt} (MULTILIB*): Remove multilib support. + + * rs6000/x-cygwin32 (LANGUAGES): Delete, don't override. + + * rs6000/ntstack.asm: New file to provide __allocate_stack, which + guarantees all pages in a dynamically allocated stack frame are + touched in order, so that the stack is properly grown. + + * rs6000/cgywin32.asm: Delete unused file. + + * rs6000/t-{cygwin32,winnt} (LIB2FUNCS_EXTRA): Add ntstack.S + to libgcc2 build. + + * rs6000.md (allocate_stack): For NT, call __allocate_stack to + bump the stack if the size is large or variable. + + * libgcc1-test.c (mainCRTStartup,__start): New startup functions + to silence more linkers. + +Tue Feb 13 13:30:53 1996 Jim Wilson <wilson@cygnus.com> + + * expr.c (store_constructor_field): Only call change_address if + bitpos is nonzero. + +Tue Feb 13 08:21:01 1996 Fila Kolodny <fila@ibi.com> + + * i370/mvs.h (CPP_SPEC): Add '-trigraphs' because IBM's h files + contain them. + +Tue Feb 13 08:17:52 1996 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> + + * c-typeck.c (quality_type prototype): Typo, rename as + qualify_type. + (build_binary_op): Fix precedence errors. + * combine.c (force_to_mode, num_sign_bit_copies, simplify_comparison): + Fix precedence errors. + * emit-rtl.c (gen_lowpart): Could return without a value. + * jump.c (jump_optimize): Fix potential infinite loop. + * reg-stack.c (record_reg_life_pat): Fix precedence error. + * reload1.c (emit_reload_insns): Fix precedence errors. + * stmt.c (bc_pushcase): Fix precedence error. + +Mon Feb 12 23:14:02 1996 Jason Merrill <jason@yorick.cygnus.com> + + * toplev.c (rest_of_compilation): Also set RTX_INTEGRATED_P when + we aren't going to emit the inline just yet. + +Mon Feb 12 21:31:02 1996 Jim Wilson <wilson@cygnus.com> + + * rtl.h (INLINE_REGNO_POINTER_FLAG, INLINE_REGNO_POINTER_ALIGN): + Add one to array index. + +Mon Feb 12 20:55:39 1996 H.J. Lu (hjl@gnu.ai.mit.edu) + + * configure (i[345]86-*-linux*): Set tmake_file t-linux. + Add crtbeginS.o and crtendS.o to extra_parts. + * i386/linux.h (CC1, LIB_SPEC): Deleted. + * config/linux.h (STARTFILE_SPEC): Add crtbeginS.o if -shared. + (CC1_SPEC): New. + (LIB_SPEC): Remove %{mieee-fp:-lieee}; use -lc_p for -profile. + * config/t-linux: New file. + +Mon Feb 12 20:42:11 1996 Randy Smith <randys@camaro.osf.org> + + * i386/x-osfrose (XCFLAGS{,_NODEBUG}): Remove $(SHLIB). + (XCFLAGS): New variable. + (libdir, mandir, bindir): Delete. + * i386/t-osf: New file. + * i860/paragon.h (STARTFILE_SPEC): Make gcc find crt0.o, not loader. + (LIB_SPEC): Remove /usr/lib. + * Makefile.in (TCFLAGS): New variable. + (GCC_CFLAGS): Add $(TCFLAGS). + (LIBGCC2_CFLAGS): Add -D for __GCC_FLOAT_NOT_NEEDED. + (libgcc1-test): Remove -nostdlib. + (float.h-cross): Don't give error #ifdef __GCC_FLOAT_NOT_NEEDED. + * enquire.c: Define __GCC_FLOAT_NOT_NEEEDED. + * configure (i[3456]86-*-osfrose): Add t-osf as tmake_file. + +Mon Feb 12 18:43:54 1996 Oliver Kellogg (oliver.kellogg@space.otn.dasa.de) + + * 1750a.c (add_1_to_mem): Corrected. + +Mon Feb 12 18:23:35 1996 Doug Evans <dje@cygnus.com> + + * configure (sparclet-*-aout*): New configuration. + +Mon Feb 12 14:43:50 1996 Per Bothner <bothner@cygnus.com> + + Changes to distinguish typedef from original type in debug output. + * tree.h (DECL_ORIGINAL_TYPE): New macro. + * tree.c (copy_node): Zero out type.symtab union. + * c-decl.c (pushdecl): Set DECL_ORIGINAL_TYPE for typedef origin. + * dbxout,c (dbxout_type): Don't canonicalize typedef type to base. + +Mon Feb 12 12:01:16 1996 Richard Earnshaw (rearnsha@armltd.co.uk) + + * arm.h: (CPP_SPEC): Define __ARMEB__, __ARMEL__, and + __ARMWEL__ depending on the endian flags passed to the compiler. + (ARM_FLAG_LITTLE_WORDS): Define. + (TARGET_SWITCHES): Add option -mwords-little-endian. + (TARGET_LITTLE_WORDS): Define. + (WORDS_BIG_ENDIAN): Select based on the endian switches. + (LIBGCC2_WORDS_BIG_ENDIAN): Define based on run-time endian + defines. + * arm.c (output_move_double): Cope with both word-endian + alternatives. Remove extraneous parameters from calls to + output_mov_immediate. + (arm_print_operand): New print code 'Q' for the least significant + register of a DImode operand. Make code 'R' always print the + most significant register, rather than the highest numbered. + * arm.md (all DImode output patterns): Use print code + 'Q' to access the least significant word. Make sure the + patterns are fully aware of the word endianness. + + * arm/semi.h (CPP_SPEC): Define __ARMEB__, __ARMEL__, and + __ARMWEL__ depending on the endian flags passed to the compiler. + (LINK_SPEC): Pass -EB to the linker if compiling for big-endian + mode. + (ASM_SPEC): Likewise for the assembler. + * arm/semiaof.h (CPP_SPEC): Define __ARMEB__, __ARMEL__, and + __ARMWEL__ depending on the endian flags passed to the compiler. + +Mon Feb 12 10:15:29 1996 Ian Lance Taylor <ian@cygnus.com> + + * configure: Permit tm_file and xm_file to be a list of header + file names, rather than just a single file. For many targets, + handle --with-stabs by adding dbx.h to tm_file, rather than using + a different tm_file. + * dbx.h: New file. + * alpha/gdb-osf2.h, alpha/gdb-osf12.h, alpha/gdb.h: Deleted. + * i386/sysv4gdb.h, mips/iris{5gdb,4gl,4gdb,3gdb}.h: Likewise. + * mips/dec-gosf1.h, mips/news{4,5}-gdb.h, mips/svr4-t-gdb.h: Likewise. + * mips/ultrix-gdb.h, mips/bsd-{4,5}-gdb.h: Likewise. + * mips/svr{4-5,4-4,3-5,3-4}-gdb.h, mips/mips-5-gdb.h: Likewise. + * mips/ecoff{,l}-gdb.h, mips/mips-4-gdb.h: Likewise. + +Mon Feb 12 07:22:20 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * integrate.c (save_for_inline_copying): Put virtual regs into + new regno_reg_rtx copy. + +Sun Feb 11 18:53:12 1996 Torbjorn Granlund <tege@noisy.tmg.se> + + * i386.md: Delete spurious integer subtract patterns. + Delete % from subtract operand constraints. + +Sun Feb 11 19:17:24 1996 Jeffrey A. Law <law@cygnus.com> + + * m68k.md (movqi): Call CC_STATUS_INIT when loading to/from + an address register via a data register. + +Sun Feb 11 08:44:49 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-common.c (check_format_info): Handle missing type in format + when terminated by a new `%'. + +Sat Feb 10 15:14:22 1996 J.T. Conklin <jtc@rtl.cygnus.com> + + * cross-make (STMP_FIXPROTO): Moved from here to build-make. + * build-make (STMP_FIXPROTO): Moved here from cross-make. + +Sat Feb 10 08:39:05 1996 Oliver Kellogg (oliver.kellogg@space.otn.dasa.de) + + * 1750a.md (movstrqi): Corrected. + (zero_extendqihi2): Taken out, let GCC synthesize. + (movhi-1): Added insn to move HImode small constant to memory. + (movhf-1): Added insn to move HFmode zero to memory. + (movtqf-1): Added insn to move TQFmode zero to memory. + (numerous insns): Taken out B (Base Reg with Index) mode. + + * 1750a.c (movcnt_regno_adjust): Corrected. + (mov_memory_operand, zero_operand): Added. + (b_mode_operand): Corrected. + (simple_memory_operand, add_1_to_mem): Added. + (print_operand_address): Corrected case of 'Q' output modifier. + + * 1750a.h (REG_ALLOC_ORDER): Changed back to natural order. + (CONST_DOUBLE_OK_FOR_LETTER_P): Added letter 'G'. + (EXIT_IGNORE_STACK): Set to 0. + (REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Use corresponding REGNO_OK. + (MOVE_MAX, MOVE_RATIO): Defined. + +Sat Feb 10 08:28:12 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de> + + * configure (m68k-*-psos*): New configuration. + * psos.h: New file. + * m68k/m68k-psos.h: New file. + +Sat Feb 10 08:07:52 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * sched.c (flush_pending_lists): Add new arg, ONLY_WRITE. + (sched_analyze_{1,2,insn}): Add new arg to flush_pending_lists. + (sched_analyze): Always flush pending write list for call, even const. + + * integrate.c (save_for_inline_copying): Put reg_map in function's + maybepermanent obstack instead of using alloca; set regno_reg_rtx + to it; delete recently-added copying of this later. + +Sat Feb 10 00:49:58 1996 Doug Evans <dje@cygnus.com> + + * sched.c (add_dependence): Add test for next != CODE_LABEL. + +Fri Feb 9 16:10:04 1996 Stan Cox (coxs@dg-rtp.dg.com) + + * i386.md (fp, integer): Added function units for pentium. + (cmp*,mov*,add*,sub*,mul*,div*,extend*,trunc*,and*,ior*,xor*,neg*, + abs*,sqrt*,sin*,cos*,not*,ash*,lsh*,rot*,sub): Tightened constraints, + added attribute support, and made changes for new `binary' and + `unary' functions. + + * i386.c (processor_costs): New variable. + (optimization_options, ix86_expand_binary_operator, + ix86_binary_operator_ok, ix86_expand_unary_operator, + ix86_unary_operator_ok, is_mul, is_div, copy_all_rtx, rewrite_address, + last_to_set_cc, doesnt_st_condition_code, sets_condition_code, + str_immediate_operand, is_fp_insn, is_fp_dest, is_fp_store, + agi_dependent, reg_mentioned_in_mem): New functions. + + * i386.h (OPTIMIZATION_OPTIONS, ALIGN_DFmode, IS_STACK_MODE, + IX86_EXPAND_BINARY_OPERATOR): New macros. + (RTX_COSTS, REGISTER_MOVE_COST, ADJUST_BLOCKAGE) Changed for pentium. + +Fri Feb 9 14:47:27 1996 Doug Evans <dje@cygnus.com> + + * sparc.c (sp64_medium_pic_operand): New function. + (move_pic_label): Delete. + (legitimize_pic_address): Simplify using some named patterns. + (finalize_pic): Add preliminary sparc64 support. + (emit_move_sequence): Reorganize. + * sparc.md (pic_lo_sum_si,pic_sethi_si,get_pc_sp32,get_pc_sp64, + move_pic_label_si,move_label_di,sethi_di_sp64): Make named patterns. + (sethi_di_sp64_const,sethi_di_medium_pic): New anonymous patterns. + (move_pic_label_si,move_label_di): Optimize for near labels. + (tablejump): Use for TARGET_MEDANY. + (casesi): Delete. + +Fri Feb 9 13:48:45 1996 Jim Wilson <wilson@cygnus.com> + + * mips.md (probe+2, probe+4): New conditional move patterns. + (movsicc): Don't truncate comparison if it is DImode. + + * sh.h (CPP_SPEC): Add defines for -m1, -m2, and -m3. + +Fri Feb 9 09:11:28 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * toplev.c (rest_of_compilation): Set RTX_INTEGRATED_P in + INLINE_HEADER iff function is inlineable. + * calls.c (expand_call): Test RTX_INTEGRATED_P in DECL_SAVED_INSNS. + +Thu Feb 8 01:11:15 1996 Jeffrey A. Law <law@cygnus.com> + + * pa.md (floatunssisf2 expander): Don't use "general_operand". + (floatunssidf2 expander): Likewise. + +Wed Feb 7 16:59:31 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/{sysv4,win-nt,netware,cygwin32}.h ({ASM,LINK}_SPEC): + Don't use %{V} for either linker or assembler. + +Tue Feb 6 17:22:29 1996 Per Bothner <bothner@cygnus.com> + + * dbxout.c (dbxout_range_type): Emit non-range INTEGER_TYPE + as a sub-range of itself (so gdb can tell the difference). + +Tue Feb 6 17:01:44 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.md (addsi3 and adddi3 split): Use cleaner computation + and portable HOST_WIDE_INT. + (iordi3 split): Use HOST_WIDE_INT. + (movdi): Add TARGET_64BIT support and generate 64 bit constants. + (movdi matcher, TARGET_POWERPC64): Add immediate constraint handled + by new define_split. + (allocate_stack): Use TARGET_32BIT. + (tablejump): Add TARGET_64BIT support using ... + (tablejumpsi): Rename original tablejump pattern. + (tablejumpdi): New pattern. + +Tue Feb 6 15:29:22 1996 Per Bothner <bothner@cygnus.com> + + * stor-layout.c (layout_type): Use same code to layout CHAR_TYPE + as for INTEGER_TYPE (instead of hard-wiring in QImode). + +Tue Feb 6 15:13:38 1996 Jeffrey A. Law <law@cygnus.com> + + * pa.md (various patterns): Avoid using "general operand" in + define_insn patterns. + +Sun Feb 4 21:37:05 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/eabi{,sim}.h (LINK_START_SPEC): Bump the default start address + for the simulator to 0x10000074 so that we don't waste a page in the + linked file. + +Fri Feb 2 19:44:10 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/eabi-c{i,n}.asm (.sdata2, .sbss2): Put these in the + read-only section, not read-write. + + * libgcc2.c (__unwind_function, rs6000/powerpc): Use _ARCH_PPC + being defined to indicate to use PowerPC mnemonics. + + * config/rs6000/t-cygwin32 (MULTILIB*): Add software floating + point support. + +Thu Feb 1 09:10:02 1996 Steve Chamberlain <sac@slash.cygnus.com> + + * {i386,rs6000}/cygwin32.{asm,h}: New templates. + * {i386,rs6000}/{t,x}-cygwin32: Ditto. + * {i386,rs6000}/xm-cygwin32.h: Ditto. + * configure (powerpcle-*-cygwin32, i[3456]86-*-cygwin32): New. + +Fri Feb 2 17:42:40 1996 Paul Eggert <eggert@twinsun.com> + + * c-decl.c (finish_struct): + Fix typo in transparent union warning that led to core dump. + + * c-parse.in (stmt): Warn about `goto *expr;' if pedantic. + (label): Warn about `case expr ... expr:' if pedantic. + +Fri Feb 2 11:05:27 1996 Doug Evans <dje@cygnus.com> + + * h8300.h (TARGET_ALIGN_300): Renamed from TARGET_ALIGN_STRUCT_300. + (TARGET_SWITCHES): Rename -malign-struct-300 to -malign-300. + (BIGGEST_ALIGNMENT): Use TARGET_ALIGN_300. + +Fri Feb 2 08:25:49 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * flow.c (jmp_uses_reg_or_mem): Renamed from uses_reg_or_mem. + Don't look into condition of an IF_THEN_ELSE; also make faster. + (find_basic_blocks): Use new name. + +Fri Feb 2 06:49:56 1996 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * reload.c (debug_reload): Fix typo for reload_noncombine. + +Thu Feb 1 21:49:02 1996 Jeffrey A. Law <law@cygnus.com> + + * pa-pro.h (TARGET_DEFAULT): Turn on TARGET_SOFT_FLOAT by + default for all pro targets. + * t-pro: Delete all multilib references. + +Thu Feb 1 17:50:02 1996 Doug Evans <dje@cygnus.com> + + * c-lex.c (check_newline): Return result of HANDLE_PRAGMA. + * h8300.h (HANDLE_PRAGMA): Pass result back to caller. + * i960/i960.h (HANDLE_PRAGMA): Likewise. + * sh.h (HANDLE_PRAGMA): Likewise. + * nextstep.h (HANDLE_PRAGMA): Likewise. + +Wed Jan 31 19:26:03 1996 Doug Evans <dje@cygnus.com> + + * m68k/m68k-none.h: Rewrite to use EXTRA_SPECS. + * m68k/vxm68k.h (CPP_SPEC): Delete. + (SUBTARGET_EXTRA_SPECS): Define. + +Wed Jan 31 15:10:59 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.c (output_epilog): Fix PPC64 typos and use TARGET_32BIT. + (output_prolog): Same. + (rs6000_trampoline_template, rs6000_trampoline_size): Use TARGET_32BIT. + * rs6000.md (movdf TARGET_POWERPC64 matcher): Fix std typo. + (movdi TARGET_POWERPC64 matcher): Same. + +Wed Jan 31 09:46:11 1996 Richard Earnshaw (rearnshaw@armltd.co.uk) + + * regs.h (regno_pointer_align, REGNO_POINTER_ALIGN): Delete from here. + * rtl.h (regno_pointer_align, REGNO_POINTER_ALIGN): Put them here. + +Wed Jan 31 08:26:12 1996 Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) + + * m68k/linux.h (STRICT_ALIGNMENT): Define to zero. + (LEGITIMATE_PIC_OPERAND_P): Match definition from m68kv4.h. + + * m68k.h (TRAMPOLINE_{TEMPLATE,SIZE}): Avoid need for helper function. + (INITIALIZE_TRAMPOLINE): Likewise. + (TRAMPOLINE_ALIGNMENT): Renamed from TRAMPOLINE_ALIGN. + * m68k/next.h (INITIALIZE_TRAMPOLINE): Adjusted accordingly. + + * m68kv4.h (STATIC_CHAIN_REGNUM): Redefine to use register a1. + (TRAMPOLINE_TEMPLATE): Likewise. + + * m68k/linux.h, m68kv4.h (LIBCALL_VALUE): Return XFmode value in fp0. + * m68k.c (init_68881_table): Use SFmode for the first six + constants and DFmode for the seventh. + + * m68k.md (movqi): Use moveq if possible. + +Wed Jan 31 08:18:15 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (expand_builtin, case BUILT_IN_NEXT_ARG): Strip off + INDIRECT_REF when checking second arg. + + * calls.c (struct arg_data, expand_call): Test STRICT_ALIGN with #if. + +Wed Jan 31 07:47:56 1996 Tim Wright (timw@sequent.com) + + * configure (i[345]-sequent-sysv*): Change to sysv3*; add i686. + (i[3456]86-sequent-ptx4*, i[3456]86-sequent-sysv4*): New cases. + * fixinc.ptx (sys/mc_param.h): Remove embedded asm. + * fixinc.svr4 (__STDC__): Add one more case. + * i386/ptx4-i.h, ptx4.h: New files. + +Wed Jan 31 07:15:23 1996 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.h (MACHINE_STATE_{SAVE,RESTORE}): Allow MOTOROLA syntax. + + * m68k.md ({adddi,subdi}_sexthishl32): 'a' and 'd' versions merged + and fixed; do not generate 'add/sub a,m'. + + * gcc.c (warn_std_ptr): Initialize with 0 instead of NULL_PTR. + +Tue Jan 30 13:29:05 1996 Ian Lance Taylor <ian@cygnus.com> + + * dbxout.c: Don't include <string.h>. + Don't compare strchr result to NULL. + + * config/svr4.h (ASM_FINAL_SPEC): Use %|, not ${pipe:-}. + +Tue Jan 30 06:48:43 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * combine.c (nonzero_bits, case REG): Ignore REG_POINTER_ALIGNMENT. + Restore old code for SP, but use it for all pointers to + defined locations in the frame. + +Mon Jan 29 11:25:28 1996 Ian Lance Taylor <ian@cygnus.com> + + * dbxout.c (dbxout_type_methods): Don't use #ifndef inside call to + strchr. + +Sun Jan 28 14:44:09 1996 Doug Evans <dje@cygnus.com> + + * config/dbxcoff.h (*): #undef first. + +Sat Jan 27 21:46:16 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.c (rs6000_sync_trampoline): Add cmpdi to 64bit case. + (rs6000_initialize_trampoline): CSE of Pmode to pmode. + * rs6000.md (movdf): Handle move between FPR and 64 bit GPR. + (movdi matcher): Handle SPR move to itself and add "mr." combiner. + +Sat Jan 27 10:06:31 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/sysv4.h (ASM_OUTPUT_ALIGNED_LOCAL): Redefine, put small + data items in .sbss if -msdata. + (SWITCH_TAKES_ARG): Add 'B', 'b', and 'V'. + +Sat Jan 27 07:59:25 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * tree.h (enum built_in_function): Add BUILT_IN_{SET,LONG}JMP. + * expr.c: Include hard-reg-set.h. + (arg_pointer_save_area): New declaration. + (expand_builtin, case BUILT_IN_{SET,LONG}JMP): New cases. + * Makefile.in (expr.o): Includes hard-reg-set.h. + * c-decl.c (init_decl_processing): Add definitions for + __builtin_setjmp and __builtin_longjmp. + * cccp.c (initialize_builtins): Add def of __HAVE_BUILTIN_SETJMP__. + + * expr.c (expand_expr, case COMPONENT_REF): Pass EXPAND_INITIALIZER + to recursive call. + +Fri Jan 26 17:24:07 1996 Doug Evans <dje@cygnus.com> + + * sparc.h (sparc_arch_type): Delete. + ({,TARGET_}MASK_DEPRECATED_V8_INSNS): Define. + (ARCH64_SWITCHES): Renamed from V9_SWITCHES. + * sparc.c (sparc_arch_type): Delete. + (sparc_init_modes): Likewise. + (output_move_quad): Don't use ldq/stq unless TARGET_HARD_QUAD. + * sparc/sp64-sol2.h (TARGET_DEFAULT): Add MASK_DEPRECATED_V8_INSNS. + (SUBTARGET_SWITCHES): Add -m{no-,}deprecated-v8-insns. + * sparc.md (arch attribute): Rewrite. + (isa): New attribute. + (32 bit multiply/divide patterns): Use if TARGET_DEPRECATED_V8_INSNS. + (32 bit divide patterns): V9 doesn't require delay after y reg write. + +Fri Jan 26 12:08:43 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.h (TARGET_32BIT): Define. + (BITS_PER_WORD, UNITS_PER_WORD): Invert so 32bit expected case. + (LONG_TYPE_SIZE, POINTER_BOUNDARY, PARM_BOUNDARY): Likewise. + (RS6000_REG_SAVE, RS6000_SAVE_AREA, RS6000_VARARGS_SIZE): Likewise. + (RETURN_ADDRESS_OFFSET, CASE_VECTOR_MODE, MOVE_MAX): Likewise. + (Pmode, FUNCTION_MODE): Likewise. + (LEGITIMATE_OFFSET_ADDRESS_P): Handle TARGET_64BIT. + (GO_IF_LEGITIMATE_ADDRESS, LEGITIMIZE_ADDRESS): Likewise. + (GO_IF_MODE_DEPENDENT_ADDRESS): Same. + +Fri Jan 26 10:37:52 1996 Stan Coxs <coxs@dg-rtp.dg.com> + + * m88k.md (umulsidi3): Added for the 88110 + +Fri Jan 26 09:35:42 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/sysv4.h (STRIP_NAME_ENCODING): Deal with names that have + both @ and * prefix characters. + (ASM_OUTPUT_LABELREF): Ditto. + +Thu Jan 25 10:03:34 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.h (LEGITIMIZE_ADDRESS): Rewrite to use HOST_WIDE_INT, not + plain int. + (optimize,flag_expensive_optimizations): Provide declaration for + expander functions. + + * rs6000.md (movsi): Correct code in splitting an address into + load from the TOC, and add low/high integer parts. If expensive + optimizations, and reload hasn't started, use separate pseudo regs + for each step. + + * rs6000.c (small_data_operand): Don't use the function + eliminate_constant_term, unwind code directly. + (input_operand): SYMBOL_REF/CONST of small data operand is valid. + (print_{,address_}operand): Add @sda21(0) in appropriate cases for + small data. + %L, etc. so that if the item is in small memory, the appropriate + relocation is used. + (rs6000_select{,_rtx}_section): Don't put floating point constants + or small strings in .sdata2 since we can't tell from the pointer + whether it is in the small data area or not. + + * rs6000.h (EXTRA_CONSTRAINT): Add 'U' for small data references. + (LEGITIMATE_SMALL_DATA_P): Test explicitly for SYMBOL_REF or CONST + before calling small_data_operand. + + * rs6000.md (movsi): Handle the addresses of small data items. + + * rs6000/sysv4.h (g_switch_{value,set}): Add declarations. + (SDATA_DEFAULT_SIZE): Default to 8. + (SUBTARGET_OVERRIDE_OPTIONS): If -G was not set, set it to + SDATA_DEFAULT_SIZE. + (CC1_SPEC): Pass -G nn to the compilers. + (SWITCH_TAKES_ARG): Add -G nn support. + (LINK_SPEC): Pass -G nn to the linker. + +Thu Jan 25 09:16:34 1996 Doug Evans <dje@cygnus.com> + + * configure (sparc64-*-solaris2*): New target. + * sparc.h (SPARC_{V9,ARCH64}): Default value is 0. + (*): Replace SPARCV9 with SPARC_{V9,ARCH64}. + (MASK_CPUS): Define. + ({MASK,TARGET}_ENV32): Delete. + ({MASK,TARGET}_ARCH64,TARGET_ARCH32): Define. + (TARGET_SWITCHES): Reset cpu flags first for each variant. + (CONDITIONAL_REGISTER_USAGE): If 32 bit v9 system, unfix g1-g4, + fix g5, and make %f48-%f80 call used. + * sparc/sp64-aout.h (SPARC_{V9,ARCH64}): Define. + (TARGET_VERSION): Define. + (TARGET_DEFAULT): Add MASK_ARCH64, delete MASK_ENV32. + (JUMP_TABLES_IN_TEXT_SECTION): Define. + (READONLY_DATA_SECTION): Make text_section. + * sparc/sp64-elf.h (SPARC_{V9,ARCH64}): Define. + (TARGET_DEFAULT): Add MASK_ARCH64. + (ENDFILE_SPEC): No longer need to check for -nostartfiles. + (ASM_IDENTIFY_GCC): Define as empty. + * sparc/sp64-sol2.h: New file. + * sparc.c (*): Replace TARGET_V9 with TARGET_ARCH64. + (hard_32bit_mode_classes): Add v9 regs. + (gen_v9_scc): Handle 32 bit v9 case. Call v9_regcmp_p. + * sparc.md (*): Replace TARGET_V9 with TARGET_ARCH64 in places + requiring 64 bit environment. + (multf3_extend): Require TARGET_HARD_QUAD. + +Thu Jan 25 00:33:25 1996 Ian Lance Taylor <ian@cygnus.com> + + * dbxcoff.h (DBX_USE_BINCL): Define. + (DBX_CONTIN_LENGTH): Define if not defined. + +Wed Jan 24 18:00:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com> + + * alpha.c (alpha_write_verstamp): Only emit MS_STAMP and LS_STAMP, + not the extra numbers. + +Wed Jan 24 15:18:15 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.c (init_cumulative_args): Rewrite to use DEFAULT_ABI + runtime tests, instead of V.4 #ifdefs. + (function_arg{,_advance,_partial_nregs,_pass_by_reference}): Ditto. + (setup_incoming_varargs): Ditto. + (init_cumulative_args): Set call_cookie field to CALL_NORMAL or + CALL_NT_DLLIMPORT. + (function_arg): Add support for DLL imports. + (rs6000_valid_{decl,type}_attribute_p): New functions for NT + attributes cdecl, stdcall, dllimport, and dllexport. + (rs6000_comp_type_attributes): New attribute support. + (rs6000_set_default_type_attributes): Ditto. + (rs6000_dll_import_ref): Ditto. + + * rs6000.h (FP_ARG_{AIX,SYSV}_MAX_REG): Move here from sysv4.h. + * sysv4.h (FP_ARG_{AIX,SYSV}_MAX_REG): Move to rs6000.h. + + * rs6000.h (rs6000_call_cookie): New enum to describe the integer + that is the 2nd argument to call insns and 3rd argument to + call_value insns. Add support for NT DLL imports. + (rs6000_args): Add call_cookie field. + (VALID_MACHINE_{DECL,TYPE}_ATTRIBUTE): Define to call C functions. + ({COMP_TYPE,SET_DEFAULT_TYPE}_ATTRIBUTES): Ditto. + (rs6000_valid_{decl,type}_attribute_p): Add declarations. + (rs6000_comp_type_attributes): Ditto. + (rs6000_set_default_type_attributes): Ditto. + (rs6000_dll_import_ref): Ditto. + + * win-nt.h (ASM_DECLARE_FUNCTION_NAME): Add support for dllexport + attribute. + + * rs6000.md (call insns): Add support for NT dllimport functions, + and fix up NT indirect calls. Also correctly set the flag + rs6000_save_toc_p on NT indirect calls. + + * aix41.h (LINK_SPEC): Use new extra specs to avoid separate + versions for native and cross compilation. + * rs6000.h (LINK_SPEC): Ditto. + * sysv4.h (LINK_SPEC): Ditto. + + * rs6000.h (EXTRA_SPECS): Add link_syscalls, link_libg, link_path, + link_specs, and also allow target to define more with the macro + SUBTARGET_EXTRA_SPECS. + (LINK_{LIBG,SYSCALLS}_SPEC): Define as fixed pathnames if native + compilation, and currently nothing if cross compiling. + (LINK_START_SPEC): If not defined, define as empty. + * eabi{,sim}.h (LINK_START_SPEC): Add default -Ttext for + simulator. + + * eabi{aix,le}.h (MULTILIB_DEFAULTS): Add -mno-sdata default. + * sysv4{,le}.h (MULTILIB_DEFAULTS): Ditto. + + * rs6000.c (small_data_operand): New function to return true if + the operand lives in small data under eabi. + (rs6000_select{,_rtx}_section): New functions to determine whether + to put global and static items in the V.4/eabi small data areas if + -msdata. + + * rs6000.h (LEGITIMATE_SMALL_DATA_P): Call small_data_operand it + if V.4. + (GO_IF_LEGITIMATE_ADDRESS): If LEGITIMATE_SMALL_DATA_P, the item + is a valid address. + (ASM_OUTPUT_LABELREF): Use fputs, not fprintf. + (small_data_operand): Declare function. + + * sysv4.h (TARGET_SWITCHES): New switch -msdata to use V.4 and + eabi defined small data sections. + (SUBTARGET_OVERRIDE_OPTIONS): Don't allow -msdata and + -mrelocatable or -mcall-aix options. + (EXTRA_SECTION{S,_FUNCTIONS}): Add .sdata, .sdata2, and .sbss + sections. + (SELECT{,_RTX}_SECTION): Call (rs6000_select{,_rtx}_section). + (ASM_SPEC): The -msdata switch passes -memb to the assembler. + (ENCODE_SECTION_INFO): Prepend a '@' to the name, if the item + lives in a small data region. + (STRIP_NAME_ENCODING): Strip '@' in addition to '*'. + (ASM_OUTPUT_LABELREF): Strip a leading '@'. + + * t-{ppc,eabi}gas (MULTILIB*): Add support for libraries built + with/without -msdata. Drop support for -mcall-aixdesc libraries. + +Wed Jan 24 15:18:15 1996 Kim Knuttila <krk@cygnus.com> + + * rs6000/win-nt.h (LIB_SPEC): Change options to GNU ld style. + (From Jason Molenda) + +Wed Jan 24 14:32:48 1996 Jim Wilson <wilson@cygnus.com> + + * reload1.c (used_spill_regs): New variable. + (reload): Set it. + * reorg.c (find_dead_or_set_registers): New function. + (mark_target_live_regs): Delete loop looking forward from target + and instead call find_dead_or_set_registers. + (fix_reg_dead_note): New function. + (fill_slots_from_thread): Call it. + + * loop.c (scan_loop): Correct comment. + (strength_reduce): Correct comments. Don't set maybe_multiple when + pass branch to scan_start. Don't set not_every_iteration after + passing a CODE_LABEL, or after passing a branch out of the loop. + When outputting DEST_ADDR giv increments, put them next to the memory + address on machines with auto-increment addresses. + (record_biv): Set new field always_executed. + (record_giv): Set new fields always_executed and auto_inc_opt. + (maybe_eliminate_biv_1): Reject biv with auto_inc_opt optimization + in some cases. + * loop.h (struct induction): New fields always_executed and + auto_inc_opt. + + * c-typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not + POINTER_SIZE to agree with expr.c. + +Tue Jan 23 15:17:30 1996 Doug Evans <dje@cygnus.com> + + * sparc/sol2.h (ASM_OUTPUT_ALIGNED_LOCAL): Delete, use svr4.h's. + +Tue Jan 23 03:28:01 1996 Paul Eggert <eggert@twinsun.com> + + * cexp.y: Use preprocessor arithmetic instead of C arithmetic + to avoid warnings on some compilers. + (HOST_WIDE_INT_MASK): Remove. + (MAX_CHAR_TYPE_MASK, MAX_WCHAR_TYPE_MASK): New macros. + (yylex): Use them. + +Mon Jan 22 18:39:21 1996 Per Bothner <bothner@cygnus.com> + + * cppexp.c (cpp_parse_expr): Set HAVE_VALUE flag for unary + minus, even if skip_evaluation is true. + +Mon Jan 22 16:53:48 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.h (BIGGEST_ALIGNMENT): Increase to 64 always. + (BIGGEST_FIELD_ALIGNMENT): Define. + (GO_IF_LEGITIMATE_ADDRESS): Merge PRE_INC and PRE_DEC cases. + (LEGITIMIZE_ADDRESS): Use Pmode not SImode. + (CASE_VECTOR_MODE): Depend on TARGET_64BIT. + (ASM_OUTPUT_COMMON): Delete. + (ASM_OUTPUT_ALIGNED_COMMON): Define. + * rs6000/sysv4.h (BIGGEST_FIELD_ALIGNMENT): Undefine. + * rs6000.md (adddi3, subdi3, negsi2): New PowerPC64 patterns. + (ashldi3, lshrdi3, ashrdi3, anddi3, iordi3, xordi3): Same. + (moddi3, cmpdi, tablejump matchers): Same. + (divdi3): Update PowerPC64 patterns. + * rs6000.c (rs6000_initialize_trampoline, case ABI_AIX): Use Pmode + not SImode. + +Sun Jan 21 23:33:24 1996 Ian Lance Taylor <ian@cygnus.com> + + * dbxout.c: Include <string.h> + +Fri Jan 19 17:17:00 1996 Per Bothner <bothner@kalessin.cygnus.com> + + * tree.h (CONSTRUCTOR_TARGET_CLEARED_P): Removed. + * expr.c (is_zeros_p, mostly_zeros_p): Handle SET_TYPE CONSTRUCTORs. + (store_constructor_field): New helper function. + (store_constructor): Take 'cleared' parameter. + (expand_expr): Fix store_constructor_call to pass 'cleared' of 0. + + * expr.c (store_constructor, SET_TYPE): Fix off-by-one-error. + Also, devide start byte by BITS_PER_UNIT before passing to memset. + (store_constructor): `continue' in wrong place. + + * expr.c (store_constructor): If storing into a range of array + elements, and the range is small, or the target it not memory, + unroll the loop (and use store_field, which handles REGs). + (store_constructor): Handle RANGE_EXPR in array index. + +Fri Jan 19 16:52:25 1996 Doug Evans <dje@charmed.cygnus.com> + + * svr4.h (SWITCH_TAKES_ARG): Add 'x'. + * sparc/sol2.h (SWITCH_TAKES_ARG): Likewise. + +Fri Jan 19 15:18:38 1996 Ian Lance Taylor <ian@cygnus.com> + + * dbxout.c (flag_minimal_debug): Initialize to 0 if both + NO_DOLLAR_IN_LABEL and NO_DOT_IN_LABEL are defined. + (dbxout_type_methods): If the mangled method name uses the special + C++ marker character, pass show_arg_types as 1 when calling + dbxout_type. + +Fri Jan 19 11:48:28 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/eabi-ci.asm (_SDA_BASE_): Move the default definition + from the .got section to the .sdata section. Do not add 32768. + (_SDA2_BASE_): Provide a default definition. + + * rs6000/eabi-cn.asm (.got.blrl): Don't define this section any + more, linker now directly creates the blrl instruction at + _GLOBAL_OFFSET_TABLE_-4. + +Fri Jan 19 05:12:31 1996 Richard Earnshaw <rearnsha@armltd.co.uk> + + * arm/lib1funcs.asm (__divsi3, __modsi3, __udivsi3, __umodsi3): + Replace with smaller, faster versions. + +Thu Jan 18 17:41:46 1996 Jim Wilson <wilson@cygnus.com> + + * sh.c (ctype.h): Delete. + (regno_reg_class, reg_class_from_letter): Add SH3e support. + (prepare_scc_operands, broken_move, push, pop, push_regs): Likewise. + (calc_live_regs, sh_expand_prologue, sh_expand_epilogue): Likewsie. + (initial_elimination_offset, arith_reg_operand): Likewise. + (sh_builtin_saveregs, fp_zero_operand, fp_one_operand): New functions. + (sh_function_arg, sh_function_arg_partial_nregs): Delete. + * sh.h (CPP_SPEC, CONDITIONAL_REGISTER_USAGE): Add SH3E support. + (TARGET_SWITCHES, OVERRIDE_OPTIONS, FIRST_PSEUDO_REGISTER): Likewise. + (FIXED_REGISTERS, CALL_USED_REGISTERS, HARD_REGNO_MODE_OK): Likweise. + (enum reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Likewise. + (REG_ALLOC_ORDER, CONST_DOUBLE_OK_FOR_LETTER_P, NPARM_REGS): Likewise. + (FUNCTION_VALUE, LIBCALL_VALUE, FUNCTION_VALUE_REGNO_P): Likewise. + (FUNCTION_ARG_REGNO_P, CUMULATIVE_ARGS, ROUND_REG): Likewise. + (INIT_CUMULATIVE_ARGS, FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Likewise. + (FUNCTION_ARG_PARTIAL_NREGS, LEGITIMATE_CONSTANT_P): Likewise. + (MODE_DISP_OK_4, REGISTER_MOVE_COST, REGISTER_NAMES): Likewise. + (DBX_REGISTER_NUMBER, enum processor_type): Likewise. + (SH3E_BIT, TARGET_SH3E, FPUL_REG, FIRST_FP_REG, LAST_FP_REG): New. + (FIRST_FP_PARM_REG, FIRST_FP_RET_REG, BASE_RETURN_VALUE_REG): New. + (BASE_ARG_REG, enum sh_arg_class, struct sh_args): New. + (GET_SH_ARG_CLASS, PASS_IN_REG_P, sh_builtin_saveregs): New. + (EXPAND_BUILTIN_SAVEREGS, DOUBLE_TYPE_SIZE): New. + (TARGET_SWITCHES): Delete broken -m3l option. + * sh.md (cpu, movsi_i, movsf_i, blt, bge, sle, sge): Add SH3E support. + (push_e, pop_e, movsi_ie, movsf_ie, addsf3, subsf3): New patterns. + (mulsf3, macsf3, divsf3, floatsisf2, fix_truncsfsi2): New patterns. + (cmpgtsf_t, cmpqesf_t, cmpsf, negsf2, sqrtsf2, abssf2): New patterns. + (abssf2+9, abssf2+10): Add SH3e support to peepholes + (abssf2+11, abssf2+12): New peepholes for SH3e. + * t-sh (MULTILIB_OPTIONS): Add SH3E support. + (MULTILIB_DIRNAMES): Define to empty. + +Thu Jan 18 11:29:11 1996 Ian Lance Taylor <ian@cygnus.com> + + * cplus-dem.c (cplus_demangle_opname): Change type of opname + parameter to const char *. + (cplus_mangle_opname): Change return type and type of opname + parameter to const char *. Don't cast return value. + * demangle.h (cplus_demangle_opname): Update declaration. + (cplus_mangle_opname): Likewise. + +Thu Jan 18 10:07:33 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * gcc.c (extra_specs): If EXTRA_SPECS is defined, define + extra_specs array to hold the extra specs the machine description + defines. + (set_spec): If EXTRA_SPECS is defined, handle the extra + specifications. + (process_command, main, validate_all_switches): Likewise. + + * rs6000/{rs6000.h,powerpc.h,aix41.h} ({CPP,ASM}_SPEC): Use common + specs with EXTRA_SPECS, only modifying things in the target that + needs to be modified, rather than having tons of mostly duplicate + definitions. + * rs6000/{sysv4{,le}.h,}netware.h,lynx.h,} ({CPP,ASM}_SPEC): Ditto. + * rs6000/eabi{le,aix}.h,aix3newas.h}} ({CPP,ASM}_SPEC): Ditto. + +Wed Jan 17 19:38:24 1996 Paul Eggert <eggert@twinsun.com> + + * cexp.y (HOST_WIDE_INT_MASK): Renamed from LONG_MASK; + use HOST_WIDE_INT. + (HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT): Put back. + (parse_c_expression, expression_value, parse_escape, left_shift, + right_shift, struct constant, exp, parse_number, yylex): + Replace `long' with `HOST_WIDE_INT'. + * cccp.c (PTR_INT_TYPE): Remove obsolete define to `long'. + (parse_escape, parse_c_expression, eval_if_expression, get_lintcmd, + do_line, do_if, do_elif): Replace `long' with `HOST_WIDE_INT'. + (trigraph_pcp): Don't assume a pointer difference fits in an int. + +Wed Jan 17 18:56:31 1996 Jim Wilson <wilson@cygnus.com> + + * expmed.c (extract_bit_field): For multi-word bitfield, clobber + target before storing to it. + +Wed Jan 17 14:19:34 1996 J.T. Conklin <jtc@slave.cygnus.com> + + * sparc/{t-sol2,t-sunos40,t-sunos41}: Define away LIBGCC1_TEST + so that cross compilers targeted at these systems will build. + +Wed Jan 17 09:51:58 1996 Doug Evans <dje@cygnus.com> + + * sparc.h (v9 INIT_CUMULATIVE_ARGS): Fix typos. + + * gcc.c (process_command): New local lang_n_files, and use + it in test of -c with -o. Move test of -save-temps. + Test for trailing NUL in -c. + + * i386/t-go32: New file. + * i386/xm-go32.h: New file. + * configure (i[345]86-*-go32*): Define xm_file and tmake_file. + +Wed Jan 17 07:47:43 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cccp.c (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT): Put back. + (pcfinclude): Use HOST_WIDE_INT for casting pointer to integer. + +Wed Jan 17 05:25:06 1996 Jeffrey A. Law <law@cygnus.com> + + * va-pa.h (__gnuc_va_list): Use a "void *". + +Tue Jan 16 18:45:23 1996 Per Bothner <bothner@cygnus.com> + + * cppexp.c (cpp_lex): Do cpp_pop_buffer after CPP_POP so retried + cpp_skip_hspace will actually work. + + * cppexp.c (SKIP_OPERAND): New macro. + (cpp_parse_expr): Suppress evaluation and diagnostics in + unevaluated subexpressions. + Corresponds to Eggert's Fri Jun 9 17:58:29 1995 change. + +Tue Jan 16 11:59:07 1996 Mike Stump <mrs@cygnus.com> + + * expr.c (expand_expr, case COND_EXPR): Make sure cleanups live on + the function_obstack as they are used by the exception handling code. + (defer_cleanups_to): Ditto. + (TRUTH_ANDIF_EXPR): Ditto. + (TRUTH_ORIF_EXPR): Ditto. + +Tue Jan 16 13:57:13 1996 Jim Wilson <wilson@cygnus.com> + + * cccp.c (new_include_prefix): Ignore ENOTDIR error from stat. + +Tue Jan 16 12:18:56 1996 Doug Evans <dje@cygnus.com> + + * i386/t-sol2 (crt[1in].o): Add missing -c. + * sparc/t-sol2 (crt[1in].o,gcrt1.o): Likewise. + Source files are assembler. + + * gcc.c (do_spec_1, case 'W'): Rename local `index' to `cur_index' to + avoid warning on solaris. + +Tue Jan 16 11:42:09 1996 Ian Lance Taylor <ian@cygnus.com> + + * dbxcoff.h: New file for stabs in COFF support. + * a29k/a29k-udi.h: Use dbxcoff.h. + * h8300.h, i960/i960-coff.h, m68k/coff.h, m88k/m88k-coff.h: Likewise. + * sh.h, sparc/litecoff.h: Likewise. + +Tue Jan 16 08:21:45 1996 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se> + + * optabs.c (expand_fix): Don't copy TARGET to TO if same. + + * expr.c (emit_move_insn_1): Don't emit clobber when moving + by parts and source equals destination. + +Tue Jan 16 08:08:29 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expmed.c (extract_bit_field): Don't abort if not MEM_IN_STRUCT_P. + + * local-alloc.c (memref_referenced_p, case REG): Fix last change. + + * fold-const.c (const_binop): Strip NOPS from both args. + + * regclass.c (regclass): Remove useless cast. + +Tue Jan 16 07:06:03 1996 Paul Eggert <eggert@twinsun.com> + + * cexp.y: General code cleanup in the style of 1995-04-01 change. + Add prototypes for static functions. + Add parentheses suggested by `gcc -Wparentheses'. + Use `long' uniformly, instead of long, int, HOST_WIDE_INT mess. + (struct constant): Use `signedp' flag (with sign bit) instead of + `unsignedp' flag; it's a little more convenient. + + (HAVE_STDLIB_H, STDC_HEADERS, LONG_MASK, __attribute__, PROTO, + VA_START, PRINTF_ALIST, PRINTF_DCL, PRINTF_PROTO, PRINTF_PROTO_1, + vfprintf, SIGNED, UNSIGNED): New symbols. + <stdlib.h>: Include if HAVE_STDLIB_H. + <string.h>: New include. + (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT): Remove. + (yylex, yyerror, expression_value, parse_number, + initialize_random_junk): Now static. + + (overflow_sum_sign): Renamed from possible_sum_sign, with an + extra arg SIGNEDP. + (parse_number): Inline strcmp when checking for "0x". + (yylex): Keep track of mask needed when decoding wide characters. + (parse_escape): New arg RESULT_MASK; use it instead of + assuming char width. + (yylex, parse_escape, parse_c_expression): Store all host + integers as long, not int or HOST_WIDE_INT. + (left_shift): No need to do signed left shifts separately. + + These changes are for the test program (if TEST_EXP_READER): + (pedantic, traditional): Allocate storage. + (main): Set pedantic, traditional, yydebug depending on args. + (is_hor_space, warning, lookup): Change types and implementation + to match rest of program. + (pedwarn, check_assertion, xmalloc): New functions. + + * cccp.c (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT): Remove. + (parse_escape, parse_c_expression, eval_if_expression): + Change return type to `long'; all callers changed. + (pcfinclude): Use `int', not HOST_WIDE_INT; any integral type will do. + + * cccp.c (skip_quoted_string): If pedantic and not pedantic_errors, + skipped multiline strings elicit a warning, not an error. + (rescan): Minor code reorg to keep it parallel with skip_quoted_string. + + * fold-const.c (left_shift_overflows): Remove; unused. + + * c-typeck.c (convert_for_assignment): Don't automatically convert + from a union member to the union. + +Tue Jan 16 06:26:00 1996 Stefan Vogel (stefan@ssw.de) + + * config/svr4.h (ASM_OUTPUT_SECTION_NAME): Define section attributes + only when a section is defined the first time. + +Tue Jan 16 06:03:27 1996 Thomas Graichen <graichen@omega.physik.fu-berlin.de> + + * i386/freebsd.h (ASM_WEAKEN_LABEL): Deleted; not supported. + +Mon Jan 15 20:59:49 1996 J. Kean Johnston <hug@netcom.com> + + * Makefile.in (LIBGCC2_CLFAGS): Add -DIN_LIBGCC2. + (libgcc1.a): Add -DIN_LIBGCC1. + (stamp-crtS): Remove -fpic, use CRTSTUFF_CFLAGS_S. + * config/t-libc-ok: Add CRTSTUFF_CFLAGS_S. + + * configure (i[3456]86-*-sco3.2v5*): New case. + * i386/sco5.h, i386/t-sco5, i386/x-sco5, i386/xm-sco5.h: New files. + * ginclude/stdarg.h, ginclude/varags.h: Add test for SCO Open Server 5. + +Mon Jan 15 20:44:13 1996 J.T. Conklin <jtc@netbsd.org> + + * m68k/netbsd.h (ASM_SPEC): New macro. + +Mon Jan 15 17:01:16 1996 Doug Evans <dje@cygnus.com> + + * c-lex.c (check_newline): Pass character after `#pragma' to + HANDLE_PRAGMA. Don't call get_directive_line if at end of line. + * c-common.c (get_directive_line): Watch for EOF. + * h8300.h (HANDLE_PRAGMA): New argument `c'. + Must issue `return' now. + * i960.h (HANDLE_PRAGMA): Likewise. + * sh.h (HANDLE_PRAGMA): Likewise. + * nextstep.h (HANDLE_PRAGMA): Likewise. + * h8300.c (handle_pragma): New argument `ch'. + Simplify pragma processing. Delete support for `#pragma section'. + * i960.c (process_pragma): New argument `c'. Change result to + terminating character. + * nextstep.c (handle_pragma): Likewise. + * sh.c (handle_pragma): Likewise. Also simplified. + + * sched.c (reemit_notes): Add prototype. + (sched_analyze_2): Reorganize comments. Call prev_nonnote_insn. + (sched_analyze): Add abort call. + (schedule_block): Call prev_nonnote_insn. + Move call of reemit_notes to after SCHED_GROUP_P scheduling. + Set `head' to `last'. + +Mon Jan 15 16:12:25 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * configure (*-*-gnu*): Use tmake_file=t-gnu. + * config/t-gnu (CRTSTUFF_T_CFLAGS): New file. + * configure (*-*-gnu*): Remove crtbeginS.o and crtendS.o frmo + $extra_parts. Use xmake_file=x-linux. + +Mon Jan 15 15:30:49 1996 Gran Uddeborg <gvran@uddeborg.pp.se> + + * i386/svr3{,z}.ifile: Allocate address areas for the "stab" + and "stabstr" sections. + +Mon Jan 15 14:39:14 1996 Paul Eggert <eggert@twinsun.com> + + * c-decl.c (finish_incomplete_decl): Warn if completing an + array that wasn't declared extern. Simplify test for whether + completion is needed. + + * cccp.c (do_xifdef): Warn about `#ifdef 0' if not traditional; + formerly the warning was issued if not pedantic. + +Mon Jan 15 13:24:12 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.md ({add,sub}di3): Make it work on little endian PowerPC + systems. + + * rs6000/eabi-c{i,n}.asm (.sbss2 section): Don't make .sbss2 a + .bss section just yet, because it confused the linker. + +Mon Jan 15 08:50:31 1996 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.md (pushdi): Allow "i" for operand 1. + (extendqidi2): Improve 68000 code generation. + (adddi_lshrdi_63): New pattern. + +Mon Jan 15 08:38:40 1996 H.J. Lu {hjl@gnu.ai.mit.edu) + + * configure (i[3456]86-*-linux*): Add extra_parts. + * i386/linux.h (LIB_SPEC): Remove %{mieee-fp:-lieee}. + Use -lc_p for -profile. + (CC1_SPEC): New macro. + * linux.h (STARTFILE_SPEC): Use crtbegin.o for both shared llibrary + and normal executable; use gcrt1.o for -profile. + (ENDFILE_SPEC): Use crtend.o for shared llibrary and normal executable. + * x-linux (INSTALL_ASSERT_H): Unset it. + * configure (i[3456]86-*-linux*oldld*): Set xmake_file to x-linux-aout. + (i[3456]86-*-linux*aout*): Likewise. + * x-linux-aout: New file, copied from config/x-linux. + +Mon Jan 15 07:41:05 1996 Dmitry K. Butskoy (buc@stu.spb.su) + + * varasm.c (in_data_section): New function. + +Mon Jan 15 07:37:13 1996 Andreas Schwab (schwab@issan.informatik.uni-dortmund.de) + + * c-typeck.c (build_c_cast): Don't warn about alignment when we + have an opaque type. + +Mon Jan 15 07:22:59 1996 Michel Delval (mfd@ccv.fr) + + * reload.c (find_equiv_reg): Apply single_set, not PATTERN, to WHERE. + +Mon Jan 15 07:02:21 1996 John F. Carr <jfc@mit.edu> + + * reorg.c (mark_referenced_resources, case TRAP_IF): Set volatil. + +Mon Jan 15 06:20:38 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * gcc.c (process_commands): Remove inadvertant fallthrough. + + * function.c ({,round_}trampoline_address): TRAMPOLINE_ALIGNMENT is + in bits, not bytes. + + * objc/archive.c (objc_{write,read}_type, case _C_STRUCT_B): Fix typo. + + * expr.c (expand_expr, case COMPONENT_REF): Don't make recursive + call on object with EXPAND_SUM. + + * stmt.c (save_expr_regs): Delete declaration; unused. + +Sun Jan 14 21:44:26 1996 Michael Meissner <meissner@wogglebug.tiac.net> + + * rs6000/eabi-ci.asm (__EXCEPT_START__): Provide label for start + of g++ exception pointers. + + * rs6000/eabi-cn.asm (__EXCEPT_END__): Provide label for end of + g++ exception pointers. + + * rs6000/eabi.asm (__eabi): Relocate exception pointers unless + they are NULL. + + * va-ppc.h (va_arg): Long longs are always passed in odd registers. + + * rs6000.c (function_arg_boundary): On V.4, long longs are always + passed in odd registers. + + * rs6000.md ({add,sub}di3): Remove restriction for POWER only, + since all of the instructions used are common to both + architectures. + +Sun Jan 14 20:34:03 1996 Jeffrey A. Law <law@cygnus.com> + + * expr.c (expand_assignment): Fix alignment parm in emit_block_move. + +Sun Jan 14 19:00:25 1996 Jim Wilson <wilson@cygnus.com> + + * sched.c (schedule_block): Copy RTX_INTEGRATE_P bit when create + a new note. + + * integrate.c (save_for_inline_copying, case NOTE): Copy + RTX_INTEGRATED_P bit. + +Sun Jan 14 17:57:52 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stupid.c (stupid_find_reg): Don't try to allocate reg if live + over more than 5,000 insns. + +Sat Jan 13 23:09:07 1996 Jeffrey A. Law <law@cygnus.com> + + * pa.h (STACK_BOUNDARY): Bring back down to 64bits. + + * pa.md (pre_ldwm): Fix bug exposed by recent changes. + Simplify. + (pre_stwm, post_ldwm, post_stwm): Likewise. + (HImode and QImode variants): Likewise. + * pa.c (hppa_expand_prologue): Corresponding changes. + (hppa_expand_epilogue): Likewise. + + * pa.c (hppa_legitimize_address): Generate more indexing + address modes. + +Fri Jan 12 19:03:21 1996 Doug Evans <dje@cygnus.com> + + * sparc/sol2.h (COMMON_ASM_OP): Delete, use sysv4.h's. + + * sched.c (schedule_block): Maintain a valid chain so + emit_note_before works. + +Fri Jan 12 13:20:01 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/eabi{,-ci,-cn}.asm: Add support for V.4 .sbss/.sdata, and + eabi .sbss2/.sdata2 sections, loading up r13 and r2 respectively + if the sections were used, and we don't need to relocate the + pointers. + +Thu Jan 11 19:41:07 1996 Per Bothner <bothner@cygnus.edu> + + * sparc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Use AGGREGATE_TYPE_P so + QUAL_UNION_TYPE and SET_TYPE are also passed by invisible reference. + * sparc.h (INIT_CUMULATIVE_ARGS for SPARCV9): Return types of + QUAL_UNION_TYPE and SET_TYPE also make invisible 1st argument. + +Thu Jan 11 18:33:50 1996 Doug Evans <dje@cygnus.com> + + * h8300.h (TARGET_ALIGN_STRUCT_300): New macro. + (TARGET_SWITCHES): Add -malign-struct-300. + (BIGGEST_FIELD_ALIGNMENT): Update. + +Thu Jan 11 12:07:44 1996 J.T. Conklin <jtc@cygnus.com> + + * h8300.h (CPP_PREDEFINES): Delete -D_DOUBLE_IS_32BITS. + +Thu Jan 11 11:09:33 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.md (mulsf3 !POWERPC): Use dmul attribute. + (divsf3 !POWERPC): Use ddiv attribute. + +Thu Jan 11 11:09:33 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/eabi-ctors.c (__do_global_ctors): If global variable + __atexit is non-NULL, call it with __do_global_dtors address to + register the function to run destructors. + (__do_global_{c,d}tors): Guard against NULL pointers. + + * rs6000/eabi.asm (__eabi): If the __eabi function was already + called, do nothing. + +Thu Jan 11 11:29:09 1996 Doug Evans <dje@cygnus.com> + + * fixincludes: Wrap rpc/types.h in extern "C", for osf2.0. + +Wed Jan 10 13:16:03 1996 Doug Evans <dje@cygnus.com> + + * varasm.c (variable_section): New function. + (assemble_variable): Call it. + +Wed Jan 10 11:27:28 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/eabi-c{i,n}.asm (__DTOR_{LIST,END}__): Fix typo. + * rs6000/eabi{,sim}.h ({START,END}FILE_SPEC): Add %s to object + files. + + * rs6000/t-{eabi,eabigas,ppc,ppcgas} (MULTILIB_MATCHES): Drop + support for obsolete -mcpu=mpc403. + Add -mcpu=821 and -mcpu=860 to soft-float defaults. + + * rs6000/t-eabi{,gas} (LIBGCC): Add stmp-crt. + (INSTALL_LIBGCC): Add install-crt. + (EXTRA_PARTS): Delete. + (stmp-crt{,-sub}): New rules to build crti.o and crtn.o in a + multilib fashion. + (install-crt): Install the multilib crt values. + +Tue Jan 9 17:30:16 1996 Doug Evans <dje@cygnus.com> + + * c-tree.h (merge_attributes): Moved from here. + * tree.h (merge_attributes): To here. + * c-typeck.c (merge_attributes): Moved from here. + * tree.c (merge_attributes): To here. + +Mon Jan 8 18:27:38 1996 Arne H. Juul <arnej@pvv.unit.no> + + * mips/netbsd.h (LINK_SPEC): Change nostdlib to nostartfiles. + (LOCAL_LABEL_PREFIX): Delete. + (ASM_OUTPUT_SECTION_NAME): Define. + +Sun Jan 7 17:11:11 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * collect2.c (scan_libraries): Correct Import File ID interpretation. + +Sun Jan 7 16:56:56 1996 Michael Meissner <meissner@wombat.gnu.ai.mit.edu> + + * {svr4,mips/elf{,64}}.h (MAX_OFILE_ALIGNMENT): Define as 32768*8. + +Sat Jan 6 15:52:36 1996 Doug Evans <dje@cygnus.com> + + * a29k/vx29k.h (CPP_SPEC): Define. + + * configure: Recognize any --with/--without option. + + * Makefile.in (MAKEINFOFLAGS): New variable. + (cpp.info,gcc.info): Use it. + + * sparc/t-sol2 (crt1.o,crti.o,crtn.o,gcrt1.o): Use $(GCC_FOR_TARGET). + * i386/t-sol2 (crt1.o,crti.o,crtn.o): Likewise. + +Fri Jan 5 10:44:25 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/aix{3newas,41}.h ({ASM,CPP}_SPEC): Update for new + processors. + * rs6000/eabi{aix,le}.h ({ASM,CPP}_SPEC): Ditto. + * rs6000/{lynx,netware,powerpc,sysv4}.h ({ASM,CPP}_SPEC): Ditto. + + * rs6000.c (rs6000_override_options): Remove requirement that + -mcpu=common be big endian. + (rs6000_stack_info): If NAME__main is defined, mark this function + as doing a call, even if there are no arguments. + + * rs6000.md (SI*SI->DI splitters): Add reload_completed + condition. + (mulsidi3): If big endian, do move directly, rather than moving by + pieces. + + * rs6000/eabi{,sim}.h (STARTFILE_SPEC): Add crti.o before any + other objects. + (ENDFILE_SPEC): Add crtn.o after any objects. + * rs6000/t-eabi{,gas}: Build crt{i,n}.o from eabi-crt{i,n}.asm. + * rs6000/eabi-crt{i,n}.asm: New files to provide begin/end labels + for all special sections used by eabi as opposed to relying on GLD + to set all of these symbols. + * rs6000/eabi.asm (__eabi): Change to use the new labels provided + above. Don't assume that the .got2, .ctors, .dtors, and .fixup + sections are contiguous. + +Fri Jan 5 10:40:37 1996 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.md (mulh_call): Remove r4 clobber. + (quoss_call): Remove cr0 and cr1 clobbers. + + * rs6000.md (function units): Add MPC505/821/860 support. + (SF multiply add combiner patterns): Use dmul attribute when limited + to DFmode POWER instructions. + * rs6000.c (processor_target_table): Add MPC505/821/860 support. + Remove MASK_POWER and add MASK_PPC_GFXOPT for PPC602. Always use + new mnemonics for common mode. + (rs6000_override_options): Don't set SOFT_FLOAT based upon + PROCESSOR_DEFAULT. + * rs6000.h (processor_type): Add PROCESSOR_MPCCORE. + (RTX_COSTS): Add PROCESSOR_MPCCORE cases. + (CPP_SPEC): Add new processor support. + +Fri Jan 5 00:32:49 1996 Doug Evans <dje@cygnus.com> + + * sparc.h (MACHINE_STATE_RESTORE): Add missing .align. + +Wed Jan 3 18:29:32 1996 Doug Evans <dje@cygnus.com> + + * arm/lib1funcs.asm (__USER_LABEL_PREFIX__): Define if not already. + (CONCAT1,CONCAT2,SYM): Define. + (__udivsi3,__divsi3,__umodsi3,__modsi3,__div0): Use SYM to define + global labels. + +Wed Jan 3 02:41:39 1996 Jeffrey A. Law <law@cygnus.com> + + * pa.h (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Call text_section. + +Tue Jan 2 16:12:13 1996 Jim Wilson <wilson@cygnus.com> + + * sh.c (gen_shifty_op): Output a NOP for a shift by 0. + (find_barrier): New variables si_limit, hi_limit. Set them depending + on whether we are optimizing. Set found_hi if the destination is + HImode. + (machine_dependent_reorg): If not optimizing, then change scan to a + note instead of calling delete_insn. + * sh.h (OVERRIDE_OPTIONS): Don't set optimize or flag_delayed_branch. + + * dbxout.c (gstab.h): Include if cross compiling. + +Mon Jan 1 21:13:43 1996 Arkady Tunik <Arkady_Tunik@comverse.com> + + * configure (i[3456]-*-solaris2*): Support stabs. + * i386/sol2dbg.h: New file. + +Mon Jan 1 09:08:01 1996 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-typeck.c: Use DECL_C_BIT_FIELD, not DECL_BIT_FIELD in all tests. + + * global.c (reg_allocno): No longer static. + * reload1.c (reg_allocno): Declare. + (order_regs_for_reload): New arg, GLOBAL. + Bias against regs allocated in local-alloc. + (reload): Pass new parm to order_regs_for_reload. + + * local-alloc.c (reg_equiv_replacement): New variable. + (memref_referenced_p, case REG): Check for reg_equiv_replacement. + (update_equiv_regs): reg_equiv_replacement now file-scope. + + * c-decl.c (finish_struct): Warn if field with enumeral type is + narrower than values of that type. + + * combine.c (rtx_equal_for_field_assignment_p): New function. + (make_field_assignment): Use it. + Expand compound operations on both sides of an IOR. + Properly adjust constand in IOR when computing bit position. + +Sun Dec 31 18:47:22 1995 Doug Evans <dje@cygnus.com> + + * m68k-none.h (MULTILIB_DEFAULTS): Define. + +Sun Dec 31 15:47:20 1995 Jeffrey A. Law <law@cygnus.com> + + * hard-reg-set.h (losing_caller_save_reg_set): Declare. + * regclass.c (losing_caller_save_reg_set): Define. + (init_reg_sets_1): Initialize losing_caller_save_reg_set. + * global.c (find_reg): Avoid caller-saving registers in + losing_caller_save_reg_set. + * local-alloc.c (find_free_reg): Avoid caller-saving registers + in losing_caller_save_reg_set. + (CLASS_LIKELY_SPILLED_P): Delete definition. Moved into regs.h. + * regs.h (CLASS_LIKELY_SPILLED_P): Define if not already defined. + + * reorg.c (fill_simple_delay_slots): Try to fill from the + target of an unconditional branch if necessary. + + * pa.h (REG_ALLOC_ORDER): Allocate PA1.1 caller-saved FP regs + before PA1.0 caller-saved FP regs. + + * sched.c (adjust_priority): Use ADJUST_PRIORITY if its defined. + + * pa.h (ADJUST_PRIORITY): Define to keep lifetimes of registers + that will be allocated to %r1 shorter. + +Sun Dec 31 14:20:49 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * rtl.h (assign_temp): Add extra arg. + * function.c (assign_temp): Add extra arg, DONT_PROMOTE. + Don't return (const_int 0) for VOIDmode. + * stmt.c (expand_asm_operands): Call assign_temp with extra arg. + * expr.c (save_nocopied_parts, expand_expr): Likewise. + (expand_expr, case SAVE_EXPR): Set TEMP to (const_int 0) + if MODE is VOIDmode. + (expand_expr): Don't use assign_temp for pseudos when might + want to be TMODE. + + * stmt.c (tail_recursion_args): Compare TYPE_MAIN_VARIANTs. + + * calls.c (expand_call): Don't warn about not being able to + inline if -O0. + * expr.c (clear_pending_stack_adjust): Don't do optimization if -O0. + * function.c (instantiate_decls): Check DECL_SAVED_INSNS to see + if obstack change is needed. + * toplev.c (rest_of_compilation): Leave DECL_INLINE set even if + won't inline. + + * tree.h: Add documentation on uses of common area flags. + (DECL_ERROR_ISSUED): New macro. + (DECL_NO_STATIC_CHAIN): New macro; currently unused. + * c-aux-info.c (gen_decl): DECL_REGISTER isn't defined + for FUNCTION_DECL. + * toplev.c (compile_file): Likewise. + * stmt.c (fixup_gotos): Use DECL_ERROR_ISSUED instead + of DECL_REGISTER. + * varasm.c ({bc_,}make_decl_rtl): Don't look at DECL_REGISTER + for functions. + +Sat Dec 30 07:57:11 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * sdbout.c (plain_type_1, case ARRAY_TYPE): Subtract lower bound + when writing dimension. + +Fri Dec 29 18:23:58 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (eval_if_expression): End expression with '\n', not '\0' + so '\0' can be diagnosed properly. + * cexp.y (yylex, parse_c_expression, main): Likewise. + +Thu Dec 28 18:24:54 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * tree.h (TYPE_ARRAY_MAX_SIZE): New macro (used by Chill). + * function.c (assign_temp): New function. Can handle Chill-style + variable-sized array with static maximum size. + * rtl.h (assign_temp): New declaration. + * stmt.c (expand_asm_operands): Use new assign_temp function. + * expr.c (save_noncopied_parts, expand_expr): Likewise. + +Thu Dec 28 15:28:47 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * function.c (assign_parms): Fix thinko for struct value arg. + +Fri Dec 29 12:41:47 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.md (movdf): Reinstate 12/24 change accidently dropped in + undoing 12/27 changes. + +Thu Dec 28 22:24:53 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.h: (reg_class): Undo 12/27 changes, except for formatting. + (REG_NAMES, REG_CLASS_CONTENTS, REGNO_REG_CLASS): Likewise. + (REG_CLASS_FROM_LETTER): Likewie. + (PREDICATE_CODES): Delete predicate functions. + (gpc_reg{0,3,4,34}_operand): Delete declaration. + (cc_reg{0,1}_operand): Likewise. + * rs6000.c (gpc_reg{0,3,4}_operand): Delete. + (cc_reg{0,1}_operand): Likewise. + + * rs6000.md (common mode functions): Undo 12/27 changes,and add + appropriate clobbers for common mode calls. Keep define_splits for + powerpc SI*SI->DI. + +Thu Dec 28 11:08:11 1995 Mike Stump <mrs@cygnus.com> + + * sparc.h (RETURN_ADDR_OFFSET): Rename from NORMAL_RETURN_ADDR_OFFSET; + returns offset for the current function specifically. + +Thu Dec 28 07:07:14 1995 Paul Eggert <eggert@twinsun.com> + + * c-lex.c (yylex): Improve error message for bogus numbers. + Consolidate duplicated code. + + * cexp.y (parse_number): Improve error message for bogus numbers. + (yylex): Consider `0xe-1' to be a (bogus) number if not traditional. + + * cccp.c (do_include): In VMS, worry only about EACCES when open fails. + (new_include_prefix): Don't try to stat dir prefixes in VMS. + +Wed Dec 27 14:02:54 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * fix-header.c: Add EXIT_FAILURE and EXIT_SUCCESS to stdlib.h if + missing. Re-write how errno is added to be done similarly. + (XOPEN_SYMBOL, XOPEN_EXTENDED_SYMBOL): New macros, to mark XPG4 + functions. + (std_include_table): Add a number of functions (mostly XPG4). + +Tue Dec 26 23:18:34 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * sys-types.h: Add dummy definition for ssize_t. + * sys-protos.h (bcmp, bcopy, gethostname, lockf, read, readlink, + write): Fix prototypes to match Posix and XPG4. + (socket, strcasecmp, strncasecmp): New prototypes (from XPG4). + +Wed Dec 27 15:30:04 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * libgcc2.c (_bb_init_prg): Cast arg to bzero to (char *). + + * regs.h (reg_rtx_no, regno_pointer_{flag_length,align): New decls. + (REGNO_POINTER_ALIGN): New macro. + * emit-rtl.c (regno_pointer_align): New variable. + (gen_reg_rtx): Extend regno_pointer_align table. + Allocate tables in saveable obstack. + (mark_reg_pointer): New arg, ALIGN. + (gen_inline_header): New args for reg info. + (set_new_first_and_last_insn): Set cur_insn_uid. + ({save,restore}_emit_status): Save and restore regno_pointer_align. + (restore_reg_data{,_1}): Deleted. + (init_emit): Allocate register tables in saveable obstack. + Set REGNO_POINTER_ALIGN for regs pointing into frame. + * function.c (assign_parms): Set REGNO_POINTER_ALIGN for + parms that are pointers. + * function.h (struct function): New field regno_pointer_align. + * expr.c (expand_expr, case VAR_DECL): Set REGNO_POINTER_ALIGN + when copying address into memory. + (expand_expr, case COMPONENT_REF, case ADDR_EXPR): Set alignment + of register when result or result's address. + (expand_expr, case CONVERT_EXPR): Don't handle -fforce-mem here. + * combine.c (set_nonzero_bits_and_sign_copies): Handle reg even + if only set once and in one basic block. + (nonzero_bits, case REG): Use REGNO_POINTER_ALIGN instead of + explicit alignment of registers pointing into frame. + * stmt.c (expand_decl): Set alignment of register for pointer + variable. + * optabs.c (emit_unop_insn): Don't do -fforce-mem for SIGN_EXTEND. + * cse.c (find_best_addr): Make sure folded address better before using. + * rtl.h (INLINE_REGNO_{RTX,POINTER_FLAG,POINTER_ALIGN}): New macros. + (gen_inline_header): Add three new parms. + * rtl.def (INLINE_HEADER): Add three new fields. + * integrate.c: Include regs.h. + (initialize_for_inline): Pass additional args to gen_inline_header. + (save_for_inline_copying): Make new regno_reg_rtx, regno_pointer_flag, + and regno_pointer_align arrays. + (expand_inline_function): Set alignment of reg for parm if passed + by hidden pointer. + Set regno_pointer_{flag,align} into remap table. + (copy_rtx_and_substitute): Set alignment of pointers into + stack frame. + Copy pointer flag and alignment to regs that are copies of + pointer registers from the original regs. + (output_inline_function): Don't call restore_reg_data. + Restore reg_rtx_no, regno_{reg_rtx,pointer_flag,pointer_align}. + * integrate.h (struct inline_remap): New fields regno_pointer_flag + and regno_pointer_align. + * unroll.c (unroll_loop): Set regno_pointer_{flag,align} in + remap table. + * explow.c (memory_address, allocate_dynamic_stack_space): + Pass additional arg to mark_reg_pointer. + * Makefile.in (integrate.o): Includes regs.h. + + * alpha.c ({non,}aligned_memory_operand): Test REGNO_POINTER_ALIGN. + (reg_or_unaligned_mem_operand): New function. + (get_unaligned_address): Add new arg, EXTRA_OFFSET. + * alpha.h ({CONSTANT,DATA}_ALIGNMENT): Align to at least BITS_PER_WORD. + (PREDICATE_CODES): Add reg_or_unaligned_mem_operand. + * alpha.md (extend{qihi,qisi,hisi}2): Allow unaligned memory + as arg 1 and pass to extend_{q,h}idi2. + (unaligned_extend{q,h}idi): New patterns. + (extend{q,h}idi2): If unaligned memory, call above new patterns. + (ext{q,l,w}h recognizer): Update to proper RTL. + (ext define_split): Comment out for now; wrong and maybe useless. + (unaligned_{load,store}hi): Do similarly to QImode. + (movhi, reload_{in,out}hi): Call unaligned case differently. + +Wed Dec 27 11:38:20 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.md (mulsidi3{,_common}): Undo previous change using + register classes instead of fixed registers for SI*SI->DI common + mode multiplies. + + * rs6000.c (gpc_reg34_operand): Delete unused function. + * rs6000.h (gpc_reg34_operand): Likewise. + + * rs6000.c (gpc_reg{3,4}_operand): Reorganize code and don't allow + SUBREG's. + + * rs6000.c (rs6000_override_options): Do not allow -mcpu=common on + little endian PowerPC's. + (gpc_reg{0,3,4,34}_operand): New functions to match a specific + register. + (cc_reg{0,1}_operand): Likewise. + + * rs6000.h (reg_class): Add register classes for register 3 by + itself, register 4 by itself, registers 3&4, and CR1. + (REG_NAMES): Add support for new register classes. + (REG_CLASS_CONTENTS, REGNO_REG_CLASS, REG_CLASS_FROM_LETTER): Likewise. + (PREDICATE_CODES): Add new predicate functions. + (gpc_reg{0,3,4,34}_operand): Add declaration. + (cc_reg{0,1}_operand): Likewise. + + * rs6000.md (common mode multiplication/division): Move/rename common + mode calls so they are closer to define_expands that call them. + Set attribute type to be jmpreg, rather than integer, so optimizer + knows branch processing unit is used; make SI*SI->DI multiplier use + register classes instead of hardwired registers. + Add appropriate clobbers of CR0/CR1 as mandated by PowerOpen spec. + (PowerPC SI*SI->DI multipliers): Add appropriate define_splits. + + * rs6000/t-{,x}newas (MULTILIB*): Don't build power2 or 601 + specific libraries. + +Tue Dec 26 21:52:18 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (fold_convert): When converting a NaN to + another type, change the type of the node before returning it. + +Mon Dec 25 17:12:10 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * c-typeck.c (mark_addressable): Fix error in last change. + +Sun Dec 24 22:19:49 1995 Jeffrey A. Law <law@cygnus.com> + + * pa.c (output_function_epilogue): Use assemble_integer rather + than calling ASM_OUTPUT_INT directly. + * pa.h (ASM_OUTPUT_INT): Use labels for everything in the + exception table section. + + * pa.c (print_operand): Don't call fprintf to output a register + name. Use fputs instead. + + * pa.h (ASM_OUTPUT_FUNCTION_PREFIX): Strip any name encoding + on the section name. + +Sun Dec 24 17:46:03 1995 Markus Theissinger <Markus.Theissinger@gmd.de> + + * toplev.c (main): Add -ax option. + * gcc.c (struct compilers): Likewise. + * final.c (end_final): Extended header increased to 11 words. + (profile_after_prologue): FUNCTION_BLOCK_PROFILER uses + count_basic_blocks instead of profile_label_no. + + * libgcc2.c (struct bb): Add flags field. + (HAVE_POPEN): Test new define. + (struct __bb, struct bb_{edge,func}): New structs. + (__bb_init_{prg,file},__bb_{init,exit}_trace_func,__bb_trace_ret, + (__bb_trace_func{,_ret},gopen,gclose): New functions. + + * sparc.h, i386.h, m68k.h (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): + Extension for -ax option (profile_block_flag == 2). + (MACHINE_STATE_SAVE,MACHINE_STATE_RESTORE): New macros. + (FUNCTION_BLOCK_PROFILER_EXIT): New macro. + * sparc.c (output_function_epilogue), i386.c (function_epilogue): + Use FUNCTION_BLOCK_PROFILER_EXIT. + * m68k.c (output_function_epilogue): Likewise. + * xm-sparc.h: Define HAVE_POPEN. + +Sun Dec 24 06:50:30 1995 Barrett Richardson (barrett@iglou.com) + + * floatlib.c (__divdf3): Rewrite to do software divide of two + doubles instead of using __divsf3. + +Sun Dec 24 06:38:15 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * rs6000.md (movdf): Don't copy a word at a time; nearly always loses. + + * c-tree.h (DECL_C_BIT_FIELD): New macro. + * c-decl.c (finish_struct): Set it when set DECL_BIT_FIELD. + * c-typeck.c (mark_addressable, case COMPONENT_REF): + Give error if taking address of a bit field. + + * gcc.c (unused_prefix_warning): Include machine_suffix if + require_machine_suffix. + (warn_B, warn_std, warn_std_ptr): New variables. + (process_commands): Use them and NULL_PTR as WARN arg to add_prefix. + + * gcc.c (process_command): Give error for -c with -o and + multiple compilations. + (handle_braces): Rename variable "pipe" to "pipe_p". + + * expr.h (clrstr_optab): New declaration. + (clear_storage): New parm, ALIGN. + * tree.h (CONSTRUCTOR_TARGET_CLEARED_P): New macro. + * genopinit.c (optabs): Add "clrstr%a%". + * optabs.c (init_optabs): Initialize clrstr_optab. + * expr.c (struct clear_by_pieces): New structure. + (clear_by_pieces{,_1}, {is,mostly}_zeros_p): New functions. + (clrstr_optab): New optab. + (clear_storage): Rework to try to use clear_by_pieces, then + new clrstr insn, then library call. + (store_constructor): Track if target is already cleared. + Clear target first if CONSTRUCTOR is mostly zeros. + Don't write zeros if target has been cleared. + Add new arg to clear_storage call. + (expand_expr, case CONSTRUCTOR): Don't put static constructor + in memory if mostly zero. + * i386.md (clrstrsi): New pattern and associate anonymous pattern. + +Sat Dec 23 12:21:53 1995 Jeffrey A. Law <law@cygnus.com> + + * pa.c (output_move_double): Correctly identify and handle + overlapping moves. + * pa.md (movdi patterns): Eliminate earlyclobbers in mem<->gr cases. + (movdf patterns): Likewise. + +Fri Dec 22 17:29:42 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (store_constructor): Don't call change_address on REG. + (expand_expr, case CONSTRUCTOR): Likewise. + + * mips.c (expand_block_move): Preserve MEM flags in call to + movstrsi_internal. + + * pa.c (emit_move_sequence): Don't try to set REGNO_POINTER_FLAG + for a SUBREG. + + * reload.c (find_valid_class): New function. + (push_reload): Use it in cases where a SUBREG and its contents + both need to be reloaded. + + * toplev.c (rest_of_compilation): Never defer functions that + contain nested functions. + +Fri Dec 22 15:55:00 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.md (function units): Add 403 support which deleted + by accident on Nov 21st. Mark all compares from 602, 603, 604, + 620, 403, like was done for rios{1,2} and 601 as needing the bpu, + so that compares are hoisted far enough branches for zero cycle + branch support. + +Fri Dec 22 15:13:47 1995 Stan Cox <coxs@dg-rtp.dg.com> + + * i386.h (TARGET_UNROLL_STRLEN): New macro. + * i386.c (output_strlen_unroll): New function. + * i386.md (strlensi): New pattern. + +Thu Dec 21 18:53:31 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * /gnu.h (GNU_CPP_PREDEFINES): Add missing space after -Amachine(CPU). + +Thu Dec 21 12:23:42 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * configure ({powerpc,rs6000}*): Change --enable-cpu to --with-cpu. + * rs6000.c (rs6000_select): Likewise. + + * rs6000/aix41.h (LINK_SPEC): Do not pass -bexport to the linker + if -g and -shared. + +Wed Dec 20 11:23:39 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * configure ({powerpc,rs6000}-ibm-aix*): Merge these two into the + same case statement. Aix 4 now generates -mcpu=common by default. + ({powerpc,rs6000}*): Add support for --enable-cpu=<value> to + select the default cpu to compile for. + + * rs6000/aix41.h (TARGET_DEFAULT): Make -mcpu=common default behavior. + (PROCESSOR_DEFAULT): Likewise. + (MULTILIB_DEFAULTS): Set mcpu=common. + + * rs6000.h (TARGET_CPU_DEFAULT): Define to be NULL if not defined. + (PROCESSOR_COMMON): Set this to PROCESSOR_601. + (PROCESSOR_POWERPC): Set this to PROCESSOR_604. + (TARGET_OPTIONS): Add -mtune= switch. + (rs6000_select): New structure to hold -mcpu=, -mtune= switches + and the result of configuring --enable-cpu=. + (OVERRIDE_OPTIONS): Pass TARGET_CPU_DEFAULT to + rs6000_override_options. + + * rs6000.c (rs6000_cpu_string): Delete global variable. + (rs6000_select): Define new global variable. + (rs6000_override_options): Take default_cpu argument, and provide + support for it and -mtune= in addition to -mcpu=. + + * rs6000/{aix{3newas,41},lynx,netware,powerpc}.h (ASM_SPEC): Add + support for -mcpu=power2. + * rs6000/{rs6000,sysv4}.h (ASM_SPEC): Likewise. + + * rs6000/{aix41,eabiaix,eabile,lynx,powerpc}.h (CPP_SPEC): Make + sure all -mcpu=xxx targets are supports. + * rs6000/{rs6000,sysv4,sysv4le}.h (CPP_SPEC): Likewise. + + * rs6000/t-x{newas,rs6000}: New files to be used when making a + cross compiler, to prevent libgcc1-test from being made. + + * rs6000/t-{x,}newas (MULTILIB_*): Build multlilib libraries for + power, power2, 601, powerpc, and common mode processors. + + * rs6000/aix41ppc.h: Delete, no longer used. + +Tue Dec 19 18:31:21 1995 Jim Wilson <wilson@cygnus.com> + + * mips.c (mips_reg_names, mips_sw_reg_names, mips_regno_to_class): + Add entry for new RAP reg. + * mips.h (FIRST_PSEUDO_REGISTER): Increment. + (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES, + DEBUG_REGISTER_NAMES): Add entry for new RAP reg. + (RAP_REG_NUM, RETURN_ADDRESS_POINTER_REGNUM): New macros. + (RETURN_ADDR_RTX): Define. + (ELIMINABLE_REGS, CAN_ELIMINATE, INITIAL_ELIMINATION_OFFSET): + Add RETURN_ADDRESS_POINTER_REGNUM support. + * emit-rtl.c (return_address_pointer_rtx): New global variable. + (gen_rtx, init_emit_once): Add support for it. + +Tue Dec 19 15:08:31 1995 Jason Merrill <jason@yorick.cygnus.com> + + * collect2.c: Remove auto_export functionality. + +Tue Dec 19 10:57:23 1995 Kim Knuttila <krk@cygnus.com> + + * ppc-asm.h: Do not compile the register macros under winnt. + +Mon Dec 18 19:31:23 1995 Adam Fedor <fedor@wilma.Colorado.EDU> + + * objc/encoding.c (objc_alignof_type): Handle _C_PTR case. + +Mon Dec 18 18:40:34 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * combine.c (simplify_rtx, case SUBREG): For SUBREG of a constant, + use <= instead of < when comparing mode sizes. + (force_to_mode, case NOT): Use full mask inside the NOT operation. + + * expr.c (emit_block_move): When call emit_libary_call for bcopy, + pass arguments using correct types and modes. + (emit_push_insn, expand_assignment): Likewise. + (clear_storage, store_expr): Likewise for memset and bzero. + (store_constructor): Likewise for memset. + * optabs.c (emit_cmp_insn): Likewise for memcmp and bcmp. + * convex.c (expand_movstr_call): Likewise for memcpy. + * m88k.c (expand_block_move): Likewise for memcpy and bcopy. + * mips.c (block_move_call): Likewise for memcpy and bcopy. + * mips.h (INITIALIZE_TRAMPOLINE): Likewise for cacheflush. + + * c-common.c (WCHAR_TYPE_SIZE): Add a default definition. + + * sdbout.c (sdbout_symbol, case FUNCTION_DECL): Use DECL_INITIAL + instead of DECL_EXTERNAL to identify declarations. + + * svr4.h (ASM_IDENTIFY_GCC): Don't output stab here. + (ASM_IDENTIFY_GCC_AFTER_SOURCE): Output stab here instead of above. + + * stmt.c (expand_asm_operands): Handle numeric constraints in + with the default case. + +Mon Dec 18 16:49:43 1995 John F. Carr <jfc@mit.edu> + + * expr.h (expand_mult_highpart_adjust): Declare. + +Mon Dec 18 16:39:41 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (store_constructor): Fix error in last change: just + copy MEM, but be sure to share address. + (expand_expr, case CONSTRUCTOR): Likewise. + +Mon Dec 18 16:22:46 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.h (ASM_GENERATE_INTERNAL_LABEL): Put leading '*' in label + string so as to not confuse dbxout.c. + +Mon Dec 18 09:44:56 1995 Mike Stump <mrs@cygnus.com> + + * libgcc2.c (__empty): An empty function used by the C++ frontend for + defaulting cleanup actions. + + * tree.c (save_tree_status, restore_tree_status): Save and restore + temporary_firstobj. + +Mon Dec 18 07:49:34 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * function.c (fixup_var_refs_1): Fix error in last change (when + mode of VAR is not the same as PROMOTED_MODE). + +Sun Dec 17 12:14:37 1995 Jeffrey A. Law <law@cygnus.com> + + * pa.h (ASM_OUTPUT_FUNCTION_PREFIX): Don't surround section names + with '$'; that confuses collect2. + (ASM_OUTPUT_SECTION_NAME): Likewise. + + * sched.c (canon_rtx): Recursively look for equivalences; + look for expressions equivalent to MEMs. + (true_dependence): Canonicalize inputs before operating + on their values. + (anti_dependence, output_dependence): Likewise. + + * jump.c (follow_jumps): Don't follow an unconditional jump + that is not a simple_jump. + + * pa.c (override_options): Make 7100 scheduling the default. + + * pa.md: Add 2nd reload peephole somehow omitted from Nov27 changes. + + * regclass.c (regclass): Use SECONDARY_RELOAD_CLASS if it's + defined to avoid useless work. + + * combine.c (find_split_point): Try to split SET_DEST + just like we do for SET_SRC. + +Sun Dec 17 11:37:25 1995 Torbjorn Granlund <tege@noisy.tmg.se> + + * expmed.c (expand_mult_highpart): When doing widening multiply, + put constant in a register. + (expand_mult_highpart): When mode is word_mode use gen_highpart + instead of right shift by size. + + * expr.c (expand_expr, case MULT_EXPR): Generalize code for widening + multiply to handle signed widening multiply when only unsigned optab + is defined, and vice versa. + +Sun Dec 17 07:35:50 1995 Pat Rankin <rankin@eql.caltech.edu> + + * vax/vms.h (WCHAR_TYPE_SIZE): Define. + +Sun Dec 17 07:08:34 1995 Ronald F. Guilmette <rfg@monkeys.com>. + + * fp-test.c: New file. + +Sun Dec 17 07:06:03 1995 Peter Flass <flass@lbdc.senate.state.ny.us> + + * i370.md (cmpqi): Fix generation of literal operand of CLM instruction + to avoid double literals (=X'=F'...). + +Sun Dec 17 06:57:02 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c: Try harder not to open or stat the same include file twice. + Simplify include file names so that they are more likely to match. + E.g. simplify "./a//b" to "a/b". Represent directories with simplified + prefixes, e.g. replace "./a//b" with "a/b/", and "." with "". + (absolute_filename): New function. + (do_include): Use it. + (read_name_map): Likewise; this makes things more consistent for DOS. + (main, do_include, open_include_file): -M output now contains + operands of -imacros and -include. + (skip_to_end_of_comment): When copying a // comment, don't try to + change it to a /* comment. + (rescan, skip_if_group, skip_to_end_of_comment, macarg1): Tune. + (rescan, skip_if_group, skip_to_end_of_comment, macarg1): + If warn_comments is nonzero, warn if backslash-newline appears + in a // comment. Simplify method for finding /* /* */ comment. + (skip_if_group): Optionally warn if /* /* */ appears between # and + a directive inside a skipped if group. + (macarg): Optionally warn if /* /* */ appears in a macro argument. + (strncat, VMS_strncat, vms_ino_t, ino_t): Remove. + (INCLUDE_LEN_FUDGE): Add 2 if VMS, for trailing ".h". + (INO_T_EQ, INO_T_HASH): New macros. + (struct file_buf): New member `inc'. + (expand_to_temp_buffer): Initialize it. + (struct file_name_list): New member `inc'. + (struct file_name_list): New member `st'. + c_system_include_path is now 1 if not 0. + fname is now an array, not a pointer. + (struct include_file): New members `next_ino', `deps_output', `st'. + Remove members `inode' and `dev'; they are now in `st'. + (INCLUDE_HASHSIZE): Rename from INCLUDE_HASH_SIZE. + (include_hashtab): Rename from include_hash_table. + (include_ino_hashtab): New variable. + (main): Store file status in struct stat, not in long and int pieces. + Use base_name to strip prefixes from file names. + When printing directory prefixes, omit trailing / and print "" as ".". + Fatal error if the input file is a directory. + (main, path_include): Regularize operands of -include, -imacros, + -isystem, -iwithprefix, and -iwithprefixbefore. + Regularize default include directories. + (do_include): + Allocate dsp with alloca, since fname is now dynamically allocated. + Use -3 to represent a never-opened file descriptor. + Make copy of file name, and simplify the copy. + Use base_name to identify the end of fname's directory. + Do not prepend dir for "..." if it matches the search list's first dir. + open_include_file now subsumes redundant_include_p and lookup_import. + Use bypass_slot to remember when to skip directories when including + a file that has already been seen. + Instead of using 0 to represent the working directory, and "" + to represent a directory to be ignored, use "" for the former, + and assume the latter has been removed before we get here. + Assume the directory prefixes have already been simplified. + Report as errors all open failures other than ENOENT. + Fatal error if fstat fails. + Use new deps_output member to avoid printing dependencies twice. + (bypass_hashtab): New variable. + (do_include, open_control_file, record_control_macro): New convention: + control_macro is "" if the file was imported or had #pragma once. + (pragma_once_marker): Remove. + (redundant_include_p, include_hash, lookup_include, lookup_import, + add_import, file_size_and_mode): Remove; subsumed by open_include_file. + (skip_redundant_dir_prefix): Remove; subsumed by simplify_filename. + (is_system_include, read_name_map, remap_include_file): + Assume arg is a directory prefix. + (base_name, simplify_filename, remap_include_file, + lookup_ino_include, new_include_prefix): New functions. + (open_include_file): New arguments `importing' and `pinc'. + Move filename mapping into new remap_include_file function. + First try to find file by name in include_hashtab; + if that doesn't work, open and fstat it and try to find it + by inode and dev in include_ino_hashtab. + (finclude): Get file status from inc->st instead of invoking fstat. + Store inc into fp->inc so that record_control_macro doesn't + need to do a table lookup. + (finclude, record_control_macro): Accept struct include_file * + instead of char * to identify include file. All callers changed. + (check_precompiled): Get file status from new argument `st'. + (do_pragma): Output at most one warning about #pragma implementation. + Always return 0 instead of returning garbage sometimes. + (do_pragma, hack_vms_include_specification): + Use base_name for consistency, and remove redundant code. + + From Per Bothner: + Unify the 3 separate mechanisms for avoiding processing + of redundant include files: #import, #pragma once, and + redundant_include_p to use a single more efficient data structure. + (struct file_name_list): Remove no-longer needed field control_macro. + (dont_repeat_files, all_include_files): Remove, no longer used. + (struct import_file): Renmed to struct include_file, moved earlier + in file, renamed field name to fname, and added control_macro field. + (pragma_once_marker): New constant. + (import_hash_table): Renamed to include_hash_table. + (import_hash): Renamed to include_hash. + (IMPORT_HASH_SIZE): Renamed to INCLUDE_HASH_SIZE. + (main, path_include): Don't clear removed control_macro field. + (lookup_include): New function - look up fname in include_hash_table. + (redundant_include_p): Re-write to use lookup_include. + (lookup_import, record_control_macro): Likewise. + (add_import): Defer fstat to caller. Combine two xmallocs into one. + (do_once): Use pragma_once_marker in include_hash_table. + (do_pragma): Re-implement to scan include_hash_table. + (do_include): Use new lookup_include and add_import. + +Sun Dec 17 06:45:43 1995 John F. Carr <jfc@mit.edu> + + * configure (savesrcdir): Do not create paths with trailing "/.". + + * combine.c (try_combine): When checking for two sets of the same + register in a split insn, also test for setting a ZERO_EXTRACT, + STRICT_LOW_PART, or SUBREG. + +Sun Dec 17 06:37:00 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload.c (push_secondary_reload): Don't strip paradoxical SUBREG + if reload_class is CLASS_CANNOT_CHANGE_SIZE. + +Sat Dec 16 18:24:20 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (expand_assignment): Fix alignment parm in emit_block_move. + +Sat Dec 16 18:16:08 1995 John Hassey (hassey@rtp.dg.com) + + * local-alloc.c (optimize_reg_copy_2): Don't attempt + optimization if destination register dies. + +Sat Dec 16 08:31:16 1995 Paul Eggert <eggert@twinsun.com> + + * fold-const.c (fold): Don't record overflow when negating + unsigned constants. + +Sat Dec 16 07:45:11 1995 Gran Uddeborg (uddeborg@carmen.se) + + * configure (i[3456]-*-isc, gas, stabs): Remove crt* from extra_files + +Sat Dec 16 07:03:33 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * stor-layout.c (layout_record): When PCC_BITFIELD_TYPE_MATTERS, + compute bitpos using field_size % type_align instead of field_size. + + * fixincludes (stdio.h): Fix return type of fread and fwrite + on sysV68. + +Sat Dec 16 06:57:14 1995 Thomas Lundqvist (d0thomas@dtek.chalmers.se) + + * function.c (fixup_var_refs_1): Fix two incorrect calls to single_set. + +Fri Dec 15 22:30:27 1995 Torbjorn Granlund <tege@noisy.tmg.se> + + * i386.h (REGISTER_MOVE_COST): Simplify. + +Fri Dec 15 22:30:27 1995 Stan Cox <coxs@dg-rtp.dg.com> + + * i386.h (TARGET_CPU_DEFAULT*, PROCESSOR_*, + TARGET_{LEAVE,386_ALIGNMENT,PUSH_MEMORY,ZERO_EXTEND_WITH_AND, + DOUBLE_WITH_ADD,BIT_TEST}): New macros. + * i386.c (ix86_cpu*, ix86_isa*): New global variables. + (override_options): Add -mcpu and -misa support + * i386.md: Use TARGET* macros. + * i386/dgux.{c,h}: New files. + * m88k/t-dgux: (GCC_FOR_TARGET, T_CFLAGS): New macros. + * m88k/t-dguxbcs: New file. + * m88k/x-{dgux,dguxbcs}: (GCC_FOR_TARGET, X_CFLAGS): Removed. + +Fri Dec 15 18:41:50 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * fixincludes (sys/wait.h): Add forward declaration of struct rusage + on AIX 3.2.5. + +Fri Dec 15 18:39:36 1995 Marco S Hyman (marc@dumbcat.sf.ca.us) + + * xm-bsd386.h (DONT_DECLARE_SYS_SIGLIST): Defined. + +Fri Dec 15 18:36:42 1995 Gran Uddeborg (uddeborg@carmen.se) + + * i386/svr3dbx.h (DO_GLOBAL_DTORS_BODY): Delete; obsolete. + +Fri Dec 15 18:21:34 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * i386/i386iscgas.h, i386/t-iscscodbx: Deleted; long dead. + +Fri Dec 15 10:01:27 1995 Stan Cox <coxs@dg-rtp.dg.com> + + * configure (target_cpu_default) Set for 486/586/686 + (m88k-dg-dgux) Use t-dguxbcs instead of x-dguxbcs + (i*86*) Change [345] to [3456] + (i[3456]86-dg-dgux) Added + * Makefile.in (out_object_file) Add MAYBE_TARGET_DEFAULT + +Fri Dec 15 08:05:49 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * function.c (init_temp_slots): New function. + (init_function_start): Code moved to new function and called here. + * toplev.c (rest_of_compilation): Call init_temp_slots. + + * expmed.c (store_bit_field): Don't use insv for BLKmode value. + (store_split_bit_field): Set total_bits to BITS_PER_FOR for + BLKmode value. + +Fri Dec 15 06:35:36 1995 David Edelsohn <edelsohn@mhpcc.edu> + + * xcoffout.h (DBX_STATIC_BLOCK_END): Use macro arguments. + (xcoff_begin_function_line, xcoff_current_function_file): Remove + unused extern declarations. + (DBX_OUTPUT_MAIN_SOURCE_FILENAME): Use macro argument. + * xcoffout.c (xcoff_begin_function_line): Make static. + (xcoff_inlining): Likewise. + (xcoff_current_function_file): Likewise. + (xcoff_output_standard_types): Remove TARGET_64BIT dependencies from + int and unsigned int. + +Mon Oct 16 12:25:52 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * fix-header.c: Support different kinds of functions (ANSI and + Posix1). Enable ANSI proptotypes if __STRICT_ANSI__. + (namelist_end): Removed. + (std_include_table): Divide up functions into kinds. + (add_symbols): New function. + (read_scanfile, write_rbrac, main): Use new data structures. + +Thu Dec 14 19:17:12 1995 Torbjorn Granlund <tege@noisy.tmg.se> + + * rs6000.md (umulsidi3): New pattern. + +Thu Dec 14 18:08:59 1995 Torbjorn Granlund <tege@noisy.tmg.se> + + * expmed.c (expand_divmod, case TRUNC_DIV_EXPR): Only reject + larger-than-HOST_BITS_PER_WIDE_INT modes for general constants, + not for powers-of-2. + + * i960.md (andsi3): Match op2 with logic_operand, change constraints + accordingly. Output andnot for negative op2. + (iorsi3, xorsi3): Analogous changes. + * i960.c (logic_operand): New function. + (i960_print_operand): Handle code `C'. + * i960.h (PREDICATE_CODES): Add logic_operand. + (CONST_OK_FOR_LETTER_P): Handle `M'. + * i960.md: Move all plain logical patterns together. + * i960.h (SHIFT_COUNT_TRUNCATED): Define as 0 as appropriate. + + * clipper.md (untyped_call): New pattern. + + * m68k.md (ashrsi_31): New pattern. + +Thu Dec 14 17:22:14 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + * arm.c (output_move_double): Extract DFmode constants using + REAL_VALUE_TO_TARGET_DOUBLE. + +Thu Dec 14 15:05:13 1995 Doug Evans <dje@cygnus.com> + + * Makefile.in (distclean): Delete float.h. + * configure: Set CROSS_FLOAT_H from float_format. + * config/float-i64.h: New file. + * config/float-i32.h: New file. + * config/float-vax.h: New file. + * arm/cross-float.h: Delete. + * arm/t-semi (CROSS_FLOAT_H): Delete. + +Wed Dec 13 19:16:57 1995 Mike Stump <mrs@cygnus.com> + + * expr.c (expand_expr, case ADDR_EXPR): Ensure op0 isn't QUEUED. + +Wed Dec 13 19:12:21 1995 Paul Eggert <eggert@twinsun.com> + + * gcc.c (my_strerror): Return "cannot access" if errno is 0. + (perror_with_name, pfatal_with_name, perror_exec): Don't assume that + the returned value from my_strerror contains no '%'s. + (sys_nerr): Declare only if HAVE_STRERROR is not defined. + +Wed Dec 13 19:05:47 1995 Alan Modra (alan@spri.levels.unisa.edu.au) + + * Makefile.in (c-parse.y, objc-parse.y): Add warning that file is + automatically generated. + +Wed Dec 13 15:40:30 1995 Mike Stump <mrs@cygnus.com> + + * function.c (identify_blocks): Start with chain of BLOCKs to match + rest of backend (dbxout.c), instead of just one BLOCK. + (reorder_blocks, all_blocks): Likewise. + + * stmt.c (find_loop_tree_blocks): Pass the toplevel list of + blocks, not just the first subblock. + +Wed Dec 13 16:11:18 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expmed.c (expand_divmod): Don't use TARGET if it's the wrong mode. + +Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com> + + * dbxout.c (struct typeinfo): Define. + (typevec): Change to be struct typeinfo *. Change other uses as + appropriate. + (struct dbx_file): Define if DBX_USE_BINCL. + (current_file): New static variable if DBX_USE_BINCL. + (next_file_number): Likewise. + (dbxout_init): If DBX_USE_BINCL, initialize new variables. + (dbxout_start_new_source_file): New function. + (dbxout_resume_previous_source_file): New function. + (dbxout_type_index): New function. + (dbxout_range_type): Use dbxout_type_index. + (dbxout_type): Likewise. If DBX_USE_BINCL, initialize new typevec + fields. + * c-lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols + == DBX_DEBUG, call dbxout_start_new_source_file and + dbxout_resume_previous_source_file when appropriate. + * sparc/sunos4.h (DBX_USE_BINCL): Define. + * svr4.h (DBX_USE_BINCL): Define. + +Wed Dec 13 06:52:40 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/win-nt.h (ASM_OUTPUT_EXTERNAL): Do not emit .extern for + builtin functions. + +Tue Dec 12 15:37:48 1995 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.c: Replace many uses of fprintf with putc and fputs. + (output_function_profiler): Use more efficient mnemonics, target + dependent mnemonics, asm_fprintf, and reg_names array. + + * rs6000.h: Replace many uses of fprintf with putc and fputs. + + * rs6000.h (INT_TYPE_SIZE): Remove TARGET_64BIT dependency. + (MAX_INT_TYPE_SIZE): Delete. + +Tue Dec 12 13:58:57 1995 Doug Evans <dje@cygnus.com> + + * t-h8300 (MULTILIB_{OPTIONS,DIRNAMES}): Add -mint32 support. + +Sun Dec 10 18:51:21 1995 Torbjorn Granlund <tege@noisy.tmg.se> + + * rs6000.md (matcher for neg:SI (geu:SI ..)): Get ppc syntax right. + +Sun Dec 10 08:47:16 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * combine.c (simplify_if_then_else): Convert "a == b ? b : a" to "a". + + * expr.c (expand_expr, case CONSTRUCTOR): If TREE_READONLY, + set RTX_UNCHANGING_P in TARGET. + (expand_expr, case COMPONENT_REF): If result is BLKmode, + use that to access object too. + +Sun Dec 10 01:06:57 1995 Jeffrey A. Law <law@cygnus.com> + + * pa.md (millicode delay slot description): Remove reference + to defunct TARGET_MILLICODE_LONG_CALLS. + +Sat Dec 9 18:05:03 1995 Jim Wilson <wilson@cygnus.com> + + * expr.c (expand_expr, case INDIRECT_REF): Correct typo in May 8 + change. + + * sh.h (ADDRESS_COST): Define. + * sh.md (subsi3): Rename to subsi3_internal. Add new define_expand + to handle subtracting a register from a constant. + +Fri Dec 8 19:17:30 1995 Mike Meissner <meissner@beauty.cygnus.com> + + * rs6000.c (input_operand): Allow any integer constant, not + just integers that fit in 1 instruction. + +Fri Dec 8 10:45:07 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + * arm/lib1funcs.asm (RET, RETCOND): Define according to whether we + are compiling for 32 or 26 bit mode. + (all return instructions): Use RET or RETCOND as appropriate. + +Wed Dec 6 06:58:23 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + * arm.c (arm_gen_constant): New function. + (arm_split_constant): Split most of the functionality into + arm_gen_constant. Try to decide which way of handling the constant + is optimal for the target processor. + + * arm.c (arm_prgmode): New enum. + (target_{cpu,fpe}_name, arm_fast_multiply, arm_arch4): New variables. + (all_procs): New table describing processors and capabilities. + (arm_override_options): New function. + (arm_return_in_memory): New function. + (arm_rtx_costs): Adjust the multiply costs to cope with processors + with fast multiplication instructions. + (output_move_double): Use the ldm/stm variants more efficiently. + Delete cases that can no-longer occur. + (output_return_instruction, output_func_epilogue): Use TARGET_APCS_32, + not TARGET_6 for determining the type of return instruction to emit. + (final_prescan_insn case CALL_INSN): Use TARGET_APCS_32, not TARGET_6 + to determine condition preservation. + * arm.h (CPP_SPEC): Add defines for the cpu type, hard or soft floating + point, and the APCS PC size. + (TARGET_*): Restructure. + (ARM_FLAG_*): Many new definitions for different target options, not + all of which are supported yet. + (TARGET_SWITCHES): Use the ARM_FLAG_* definitions instead of explicit + numbers. + (prog_mode_type): New enum. + (floating_point_type): Split emulated floating point into FP_SOFT[23]. + (OVERRIDE_OPTIONS): Call arm_override_options. + (ARM_CPU_NAME): Default to NULL if not defined by a subtarget. + (BYTES_BIG_ENDIAN): Can now be set as a compilation option. + (RETURN_IN_MEMORY, DEFAULT_PCC_STRUCT_RETURN): New definitions. + (GO_IF_LEGITIMATE_OFFSET): Use different HImode offsets if compiling + for an architecture 4 target. The offsets for floating point + constants are the same as for integers if compiling TARGET_SOFT_FLOAT. + (GO_IF_LEGITIMATE_ADDRESS): Don't allow PRE_INC and POST_DEC if + the size is more than 4 bytes. Restrict the range offsets for DImode; + likewise for DFmode when TARGET_SOFT_FLOAT. + (LEGITIMIZE_ADDRESS): Use symbol_mentioned_p, not LEGITIMATE_CONSTANT_P + to determine if a constant address might be better in a register. + Handle DFmode addresses in the same way as DImode if TARGET_SOFT_FLOAT. + (LOAD_EXTEND_OP): If arm_arch4, then HImode also zero-extends. + * arm.md (attributes): Rearrange order, so that condition clobbering + can be automatically determined for call insns. + (attribute cpu): Add new cpu ARM7. + (attribute type): Add new type MULT. + (attribute prog_mode): New attribute. + (attribute conds): Clobbering of call insns can now be determined + using prog_mode attribute. + (function units "write_buf", "write_blockage"): Model the write buffer + as two function units, so that conflicts are avoided more often. + (funcion unit "core"): New function unit, so that elapsed cycles can + be more accurately determined. + (all anonymous patterns): Add names. + (mulsidi3, umulsidi3): New patterns available with fast multiply + variants. + (all call insns): The conds attribute is now determined automatically. + (zero_extendhisi): Expand for architecture 4 variants if appropriate. + (*zero_extendhisi_insn): New pattern. + (extendqi{hi,si}, extendhisi): Expand for architecture 4 variants if + appropriate. + (*extendhisi_insn, *extendqihi, *extendqisi): New patterns. + (storehi_single_op): New expand. + (movhi): Handle architecture 4 expansion. + (*movhi_insn_arch4): New pattern. + (*movhi_*): Adjust applicability conditions to handle architecture 4. + (reload_outdf): Handle pre/post inc/dec reloads. + (tablejump): Delete. + (matcher for optimized tablejump): delete. + (casesi): New expand. + (casesi_internal): New pattern. + * semi.h (EXIT_BODY): Delete. + (TARGET_DEFAULT): Set to ARM_FLAG_APCS_32. + (CPP_SPEC): Define. + arm/cross-float.h: New file, used when building a cross-compiler. + * t-semi: Don't define inhibit_libc when building libgcc2.a. + (CROSS_FLOAT_H): Define. + + * arm.c ({symbol,label}_mentioned_p): New functions. + (add_constant, dump_table, fixit, find_barrier, broken_move): New + support functions for handling constant spilling. + (arm_reorg): New constant spilling pass, for putting unhandlable + constants into the rtl where we can load them efficiently. + (output_load_symbol): Delete. + * arm.h (SECONDARY_OUTPUT_RELOAD_CLASS): No need to handle floating + point constants any more, since arm_reorg will deal with them. + (LEGITIMATE_CONSTANT_P): Is now anything that doesn't contain a + LABEL. + (GO_IF_LEGITIMATE_ADDRESS): Recognize address expressions generated + by arm_reorg, but only after reload has completed. + (MACHINE_DEPENDENT_REORG): Define. + (ASM_OUTPUT_SPECIAL_POOL_ENTRY): There should be nothing left in + the pool, even if it might look like it. + * arm.md (*movsi_insn): Much simpified now that constants are handled + properly. + (movaddr): New expand. + (movsf, movdf): No need to force constants into the pool any more. + (*movdf_hard_insn): Much simplified. + (consttable_4, consttable_8, consttable_end, align_4): New patterns + for supporting embedded constants. + + * configure: New target arm-semi-aof. + * arm.c (strings_fpa): Use a form which is common to both GAS and + ARMASM. + (output_return_instruction, output_func_epilogue): Call + assemble_external_libcall, before trying to generate an abort call + in the assembler. + (arm_asm_output_label): Call ARM_OUTPUT_LABEL, rather than assuming + that labels are followed by a colon. + (aof_text_section, aof_add_import, aof_delete_import, + aof_dump_imports): New functions to support ARMASM assembler + generation. + * arm/aout.h: New file. + * arm/aof.h: New file. + * arm.h (most assembler-specific defines): Move to arm/aout.h. + (CONSTANT_ADDRESS_P): Can't directly access constant strings when + generating assembler for ARMASM. + (ENCODE_SECTION_INFO): Don't define if generating ARMASM assembler. + (ASM_OUTPUT_INTERNAL_LABEL): Generalize, so that it can be used + with all targeted assemblers. + (ASM_OUTPUT_LABEL): Call arm_asm_output_label. + * riscix.h: Include arm/aout.h, not arm/arm.h. + * riscix1-1.h: Likewise. + * semi.h: Likewise. + * arm/semiaof.h: New file. + * arm/t-semiaof: New file. + +Mon Dec 4 22:17:37 1995 Jason Merrill <jason@yorick.cygnus.com> + + * gcc.c (LIBGCC_SPEC): Do link with libgcc when -shared. + * alpha.h (LIBGCC_SPEC): Remove. + * linux.h (LIBGCC_SPEC): Remove. + * svr4.h (LIBGCC_SPEC): Remove. + * i386/t-crtpic (TARGET_LIBGCC2_CFLAGS): Use -fPIC. + * t-pa (TARGET_LIBGCC2_CFLAGS): Use -fPIC. + * sparc/t-sunos41 (TARGET_LIBGCC2_CFLAGS): Use -fPIC. + * sparc/t-sol2 (TARGET_LIBGCC2_CFLAGS): Use -fPIC. + * configure (i386-linux): Use i386/t-crtpic. + + * i386/xm-sco.h: #define NO_SYS_SIGLIST. + +Mon Dec 4 21:30:37 1995 Jim Wilson <wilson@mole.gnu.ai.mit.edu> + + * sh.c (shiftcosts): For SH3, max cost of arithmetic right shift is 3. + (expand_ashiftrt): For SH3, if shift cost is more than 3, then + call gen_ashrsi3_d to use shad instruction. + +Mon Dec 4 18:29:08 1995 Jason Merrill <jason@yorick.cygnus.com> + + * c-decl.c (finish_struct): Don't mess with the type of bitfields. + +Mon Dec 4 15:28:02 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (store_constructor, record): If field is READONLY, + set RTX_UNCHANGING_P in TO_RTX. + +Mon Dec 4 12:59:33 1995 Ian Lance Taylor <ian@cygnus.com> + + * sparc/t-sol2 (CRTSTUFF_T_CFLAGS): Use -fPIC unconditionally. + +Sun Dec 3 20:55:43 1995 Jeffrey A. Law <law@cygnus.com> + + * pa.h (ASM_OUTPUT_FUNCTION_PREFIX): Handle arbitrary sections. + (ASM_OUTPUT_SECTION_NAME): Define. + +Sat Dec 2 22:19:16 1995 Jeffrey A. Law (law@cygnus.com) + + * pa.h: Replace many uses of fprintf with fputs. + * pa.c: Likewise. + * pa-pro.h: Likewise. + + * pa.h (SECONDARY_RELOAD_CLASS): Don't call secondary_reload_class + to handle trivial cases. + * pa.c (secondary_reload_class): Rework to be more efficient. + +Sat Dec 2 07:52:46 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.md (movsi): Don't split large constants in the + movsi pattern, let the define_split split it later as needed. + +Fri Dec 1 16:00:42 1995 Brendan Kehoe <brendan@cygnus.com> + + * sparc.c (output_double_int): Handle CODE_LABEL's if v9. + +Fri Dec 1 09:13:23 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * m68k.md (decrement_and_branch_until_zero): Split into a + define_expand and an anonymous define_insn. + * fx80.md (decrement_and_branch_until_zero): Ditto. + * m88k.md (decrement_and_branch_until_zero): Ditto. + +Thu Nov 30 15:02:16 1995 Jim Wilson <wilson@mole.gnu.ai.mit.edu> + + * sh.c (noncall_uses_reg): New function. + (machine_dependent_reorg): Add support for TARGET_RELAX. + (final_prescan_insn): Likewise. + * sh.h (ASM_SPEC, LINK_SPEC): Pass on -mrelax. + (RELAX_BIT, TARGET_RELAX): New macros. + (TARGET_SWITCHES): Add -mrelax. + + * sh.c (insn-attr.h): Include. + (pragma_nosave_low_regs): New global variable. + (calc_live_regs): If SH3 and pragma_nosave_low_regs, then don't + save registers r0 through r7 for interrupt functions. + (function_epilogue): Clear pragma_nosave_low_regs. + (handle_pragma): Set pragma_nosave_low_regs if see pragma for it. + + * sh.h (FUNCTION_PROFILER): Use trap #33 instead of trap #5. + Put additional .align before trapa instruction. + +Thu Nov 30 14:45:13 1995 Doug Evans <dje@canuck.cygnus.com> + + * sparc.md (seqdi_special_trunc, snedi_special_trunc, + seqsi_special_extend, snesi_special_extend): Delete uses of SUBREG. + Make compare modes match modes of operands. + (snesi_zero_extend, snedi_zero_trunc_sp32, snedi_zero_trunc_sp64, + seqsi_zero_extend, seqdi_zero_trunc_sp32, seqdi_zero_trunc_sp64): + New patterns. + +Thu Nov 30 12:27:22 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * genmultilib: Take a 4th argument that says are the exceptions to + the multilibs, so illegal combinations can be eliminated. + + * Makefile.in (multilib.h): Pass $(MULILIB_EXCEPTIONS) as the 4th + argument to genmultilib. + + * configure (powerpc*): Remove little endian and eabiaix versions + of the t-* files. Accept powerpc{,le}-*-sysv in addition to + *-sysv4. + (powerpc{,le}-*-eabisim): Use standard t-eabigas instead of + t-eabisim. + (powerpcle-*-{winnt3,pe}): Add support for Windows NT on PowerPC. + * rs6000/t-{eabiaix,eabisim,eabilegas,ppclegas}: Delete. + + * rs6000/{t-winnt,win-nt.h}: New files for PowerPC Windows NT. + + * ginclude/ppc-asm.h: New file to provide common macros for the + various PowerPC calling sequences. + * rs6000/eabi.asm: Use ppc-asm.h. + + * rs6000/aix3newas.h (CPP_SPEC): Add support for -mcpu=603e, 602, + and 620. + * rs6000/{aix41,powerpc,rs6000,eabi{aix,le}}.h (CPP_SPEC): Ditto. + * rs6000/sysv4{,le}.h (CPP_SPEC): Ditto. + + * rs6000/aix3newas.h (LINK_SPEC): If cross compiling, don't use + absolute paths. + * rs6000/{aix41,aixppc,rs6000}.h (LINK_SPEC): Ditto. + + * rs6000/eabi.h (INVOKE__main): Don't define any more. + (ASM_OUTPUT_INT): Move to sysv4.h. + ({STARTFILE,LIB}_SPEC): If -msim or -mmvme add the appropriate + libraries. + + * rs6000/{eabiaix,eabile,sysv4{,le}}.h (CPP_SPEC): Add support for + -mcall-{aixdesc,nt} directives. + (MULTILIB_DEFAULTS): Define. + + * rs6000/eabi{,le}sim.h (TARGET_DEFAULT, CPP_SPEC): No longer + define, simulator supports floating point. + ({STARTFILE,LIB}_SPEC): If -mvme, use mvme libraries, not + simulator libraries. + + * rs6000/{mach,netware}.h (TARGET_AIX): Define as 0. + + * rs6000/netware.h (RS6000_OUTPUT_BASENAME): Don't redefine + anymore. + (STRIP_NAME_ENCODING): Undef. + + * rs6000.c (rs6000_save_toc_p, rs6000_abi): New globals. + (rs6000_override_options): Add 602, 603e, and 620 support. + (count_register_operand): New function to return true if operand + is the count register. + (easy_fp_constant): All constants are easy if -msoft-float. + (volatile_mem_operand): New function to return true if operand is + in volatile memory. + ({fp_,}reg_or_mem_operand): Call volatile_mem_operand. + (input_operand): Allow support for Windows NT loading SYMBOL_REFs + and LABEL_REFs from the TOC. + (function_arg_boundary): On Windows NT, any argument >= 8 bytes + must be double word aligned. + (function_arg{_advance,}): Call function_arg_boundary to determine + if we need to align to an odd register for large arguments. + Changes to accomidate new method of determining which ABI we're + adhering to. + (expand_block_move_mem): Copy RTX_UNCHANGING_P, and if + MEM_UNALIGNED_P is defined, copy that too. + (expand_block_move): Copy dest/src to registers using + copy_addr_to_reg. + (print_operand): Changes to accomidate Windows NT. + (first_reg_to_save): Ditto. + (rs6000_stack_info): Ditto. + (debug_stack_info): Ditto. + (output_{prolog,epilog,toc,function_profiler}): Ditto. + (rs6000_stack_info): Save main's arguments around __eabi call. + (svr4_traceback): Delete, current V.4 ABI no longer wants + tracebacks in this format. + (output_prolog): Call __eabi here, saving and restoring main's + args if needed. Save the toc pointer if needed. + (get_issue_rate): New function to return # of instructions a + machine can issue at once. + (rs6000_sync_trampoline): Emit instructions to synchronize the + PowerPC caches after a trampoline. + (rs6000_trampoline_{template,size}): New functions to provide + common trampoline support for all ABI's. + (rs6000_initialize_trampoline): Ditto. + + * rs6000.h (TARGET_{WINDOWS_NT,AIX,MACOS}): Define. + (processor_type): Add 602. + (PROCESSOR_COMMON): Assume current processor is a 604, not a 601. + (SUBTARGET_OPTIONS): Define if not defined. + (TARGET_OPTIONS): Include SUBTARGET_OPTIONS. + (COUNT_REGISTER_REGNUM): Define as 66. + (EXTRA_CONTRAINT): Add 'S' and 'T' for Windows NT. + (rs6000_abi): Add ABI_AIX_NODESC, ABI_NT. + (DEFAULT_ABI): Define if not defined. + (rs6000_stack): Add fields for Windows NT support. + (RS6000_SAVE_TOC): Add for Windows NT support. + (FUNCTION_ARG_BOUNDARY): Call function_arg_boundary. + (trampoline macros): Call trampoline functions in rs6000.c. + (RETURN_ADDRESS_OFFSET): Add Windows NT support. + (toc_section): Skip leading '*'. + (PREDICATE_CODES): Add volatile_mem_operand, + count_register_operand. + (MACHINE_issue_rate): Define. + (function decls): Add new function decls from rs6000.c. + + * rs6000.md (cpu attribute): Add 602. + (function units): Update to match reality better. + (calls through pointer): Rework to support Windows NT. + (movsi): Add Windows NT support. + (movstrsi): Remove match_operand predicates, since + expand_block_move does the checking. + (sync_isync): Delete. + (icbi, dcbst, sync, isync): New insns to generate named instruction + for making trampolines on eabi/V.4 properly flush the caches. + (decrement_and_branch_on_count): Rename from + decrement_and_branchsi. Add update of count in insn pattern. + + * rs6000/sysv4.h (TARGET_SWITCHES): Drop -mtraceback. Keep + -mno-traceback but don't do anything with it. Add + -mcalls-{nt,aixdesc}. Add -m{,no-}relocatable-lib. Add -msim, + -mmvme, and -memb. + (TARGET_TOC): Update for use with -mcalls-{nt,aixdesc}. + (SUBTARGET_OVERRIDE_OPTIONS): Update for new switches. + (RS6000_OUTPUT_BASENAME): Delete. + (toc_section): Add support for -mcall-{nt,aixdesc}. + (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Ditto. + (ASM_DECLARE_FUNCTION_NAME): Use STRIP_NAME_ENCODING instead of + RS6000_OUTPUT_BASENAME. For -mcall-{nt,aixdesc} emit the proper + function descriptor. + (ASM_SPEC): Pass appropriate -mxxx switches to the assembler based + on the -mcpu=xxx options. + (ASM_OUTPUT_INT): Move here from eabi.h. + (ENCODE_SECTION_INFO): If -mcall-{nt,aixdesc} add approriate magic + so function name has two or one leading periods. + (ASM_OUTPUT_SOURCE_LINE): Delete, use version in svr4.h. + (trampoline macros): Call trampoline functions in rs6000.c. + + * t-{eabi,ppc}{,gas} (EXTRA_HEADERS): Add ginclude/ppc-asm.h. + (LIB2FUNCS_EXTRA): Depend on eabi.S, not eabi.s. + (eabi.S): Rename from eabi.asm. + + * t-{eabi,ppc}gas (MULTILIB_*): Add -mcall-aixdesc libraries, but + don't build either little endian or -mrelocatable versions of + those libraries. + +Tue Nov 28 00:10:27 1995 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.md (divsi3): Reorder so common mode does not negate + power-of-2 shift optimization. + +Wed Nov 29 22:06:11 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * configure (sparc-*-solaris2*): Add gcrt1.o to extra_parts. + * sparc/sol2.h (STARTFILE_SPEC): Link with gcrt1.o with -pg. + * sparc/sol2-g1.asm: New file, startup code for profiled + executables. + * sparc/t-sol2: Add make rule for gcrt1.o. + * sparc/gmon-sol2.c (_mcleanup): Add support for PROFDIR + environment variable. + +Wed Nov 29 21:41:13 1995 Ian Lance Taylor <ian@cygnus.com> + + * mips/abi64.h (CPP_SPEC): If -msingle-float and not + -msoft-float, pass -D__mips_single_float. Likewise for -m4650 and + not -msoft-float. + * mips/dec-bsd.h (CPP_SPEC): Likewise. + * mips/dec-osf1.h (CPP_SPEC): Likewise. + * mips/elf64.h (CPP_SPEC): Likewise. + * mips/iris3.h (CPP_SPEC): Likewise. + * mips/iris5.h (CPP_SPEC): Likewise. + * mips/mips.h (CPP_SPEC): Likewise. + * mips/netbsd.h (CPP_SPEC): Likewise. + * mips/osfrose.h (CPP_SPEC): Likewise. + * mips/t-ecoff (MULTILIB_OPTIONS, MULTILIB_DIRNAMES, + MULTILIB_MATCHES): Add -msingle-float support. + +Wed Nov 29 17:57:48 1995 Doug Evans <dje@cygnus.com> + + * toplev.c (main): Invoke OPTIMIZATION_OPTIONS after target_flags + has been initialized so sets of target_flags aren't clobbered. + + * cccp.c (do_include): Recognize c:\foo as absolute path name in DOS. + + * svr4.h (MD_EXEC_PREFIX): Don't use if cross compiling. + (MD_STARTFILE_PREFIX): Likewise. + (LINK_SPEC): Don't use absolute path names if cross compiling. + * svr3.h (LIB_SPEC): Likewise. + + * gcc.c (do_spec_1): Fix typos in version calculation. + +Wed Nov 29 14:06:13 1995 Jim Wilson <wilson@cygnus.com> + + * sh.md (ashrsi3_d): Use %0 not %1 in output pattern. + + * svr4.h (MAX_OFILE_ALIGNMENT): Define. + + * mips/iris5.h (WORD_SWITCH_TAKES_ARG): Define. + (LINK_SPEC): Add rpath. + * mips/iris6.h (LINK_SPEC): Likewise. + + * stupid.c (stupid_mark_regs): For hard registers, use regno+j + instead of just regno in MARK_LIVE_AFTER and SET_HARD_REG_BIT calls. + + * c-common.c (combine_strings): Add support for WCHAR_TYPE as short. + +Wed Nov 29 13:59:58 1995 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * c-decl.c (duplicate_decls): Add new paramter different_binding_level. + Lots of changes to use new new parameter. + (pushdecl): Delete variable declared_global. New variable + different_binding_level and code to set it. Move extern/static + warning before duplicate_decls call. Don't let global typedefs + conflict with nested extern declarations. Move oldglobal test + inside code for setting IDENTIFIER_LIMBO_VALUE. + (lookup_name_current_level_global): Delete. + * c-tree.h (merge_attributes): New declaration. + * c-typeck.c (merge_attributes): New function. Move code from + common_type to here. + (common_type): Call merge_attributes instead of having inline code. + * integrate.c (integrate_decl_tree): Delete variable newd. + Always set DECL_ABSTRACT_ORIGIN before calling pushdecl. + +Tue Nov 28 21:57:04 1995 Jim Wilson <wilson@cygnus.com> + + * mips.c (mips_function_value): Add check for i > 0 when deciding + if structure should be return in FP registers. + +Tue Nov 28 12:47:52 1995 Jeffrey A. Law <law@cygnus.com> + + * pa.md (define split for (plus (reg) (large_constant)): Try + another way to handle this with only 2 insns. From Tege. + +Mon Nov 27 02:05:18 1995 Jeffrey A. Law <law@cygnus.com> + + * lib1funcs.asm, pa-pro.h, t-pro.h, xm-papro.h: New PA + target files. + * configure (hppa*-*-pro*): Use new target files. + + * toplev.c (rest_of_compilation): Always call jump_optimize + at least once. + + * pa.h (ASM_OUTPUT_EXTERNAL): Don't let assemble_name clobber + the value of TREE_SYMBOL_REFERENCED. + + * pa-ghpux9.h (LINK_SPEC): Pass "-z" to the linker to enable + trap on null pointer dereference for programs built on hpux9. + * pa-hpux9.h, pa1-ghpux9.h, pa1-hpux9.h: Likewise. + + * pa.c (output_function_prologue): No longer need to keep + track of the total number code bytes when TARGET_GAS && + not TARGET_PORTABLE_RUNTIME. + * pa.h (DBX_OUTPUT_MAIN_SOURCE_FILE_END): Use .NSUBSPA when + not TARGET_PORTABLE_RUNTIME. + (ASM_OUTPUT_FUNCTION_PREFIX): Define. Prefix functions with + .NSUBSPA when TARGET_GAS and not TARGET_PORTABLE_RUNTIME. + + * pa.md (symbolic high patterns): Use 'H' to print the symbolic + address so that the constant part gets rounded. + * pa.c (print_operand): Handle 'H' operand for high part of a + symbolic address with a rounded constant. + (output_global_address): New argument "rounded_constant". All + callers changed appropriately. + + * x-pa-hpux (FIXPROTO_DEFINES): Add -D_HPUX_SOURCE. + + * pa.h (CPP_SPEC): Only pass -D_HPUX_SOURCE and -D_HIUX_SOURCE if + -ansi is not present. + (CPP_PREDEFINES): Remove -D_HPUX_SOURCE and/or -D_HIUX_SOURCE. + * pa-ghiux.h (CPP_PREDEFINES): Likewise. + * pa-gux7.h (CPP_PREDEFINES): Likewise. + * pa-hiux.h (CPP_PREDEFINES): Likewise. + * pa-hpux.h (CPP_PREDEFINES): Likewise. + * pa-hpux7.h (CPP_PREDEFINES): Likewise. + * pa1-ghiux.h (CPP_PREDEFINES): Likewise. + * pa1-hiux.h (CPP_PREDEFINES): Likewise. + + * pa-hpux.h (LINK_SPEC): If -mlinker-opt, then pass -O to the + linker. + * pa-ghpux.h, pa-hpux9.h, pa-ghpux9.h: Likewise. + * pa1-ghpux9.h, pa1-hpux9.h: Likewise. + * pa.h (LINK_SPEC): Likewise. + (TARGET_SWITCHES): Add -mlinker-opt. + + * pa.md (all peepholes): Disable if TARGET_SOFT_FLOAT. + + * pa.c (pa_reorg): If TARGET_GAS, then emit insns to mark + the beginning and end of the branch table. + * pa.md (begin_brtab): New insn. Just a marker so GCC knows + where to put the .begin_brtab pseudo-op. + (end_brtab): Similarly. + + * pa.h (EXTRA_SECTIONS): Add in_ctors and in_dtors if + CTORS_SECTION_FUNCTION is defined. Else define dummy + versions of CTORS_SECTION_FUNCTION and DTORS_SECTION_FUNCTION. + (EXTRA_SECTION_FUNCTIONS): Add CTORS_SECTION_FUNCTION and + DTORS_SECTION_FUNCTION. + + * pa.md: Add peepholes to improve spill code generated + by reload when we run out of FP registers. + + * xm-pa.h: Remove spurious double-quote. + + * pa.md (call expanders): For indirect calls, load %r22 with the + function's address. + (indirect call patterns): No need to copy the call address into + %r22 anymore. + + * pa.c (output_cbranch): Fix buglet in length handling of + backwards branches with unfilled delay slots. + (output_bb, output_bvb, output_dbra, output_movb): Likewise. + + * pa.md: Fix off-by-one error in length computations for all + conditional branch patterns. + + * pa.h (output_bvb): Declare. + * pa.c (output_bvb): New function to output branch on variable + bit insns. + * pa.md (branch-on-variable-bit): New patterns. + + * pa.h (TARGET_MILLICODE_LONG_CALLS): Delete swtich and all + references. + (output_millicode_call): Declare new function + * pa.md (millicode calls): Update length computation to handle + variable length millicode calls. + (call pattners): Likewise. + (indirect call patterns): Update length compuations and output + templates to handle variable length millicode calls. + (plabel_dereference): Likewise. + * pa.c (override_options): Give warnings when incompatable + options are used. + (output_mul_insn): Call output_millicode_call instead of + output_call, eliminate last argument to output_millicode_call. + (output_div_insn): Likewise. + (output_mod_insn): Likewise. + (output_call): Rewrite long call code to handle variable length + millicode calls. Eliminate support for calling mul, div and mod + millicode routines. + (output_millicode_call): New function for calling mul, div and mod + millicode routines. + + * pa.md (abssi2): New pattern. + + * pa.c (secondary_reload_class): Loads from reg+d addresses into + FP registers don't need secondary reloads. + * pa.h: Delete soem #if 0 code. Update some comments. + (EXTRA_CONSTRAINT, case 'Q'): Only accept valid memory addresses. + + * pa.h (RTX_COSTS): Tege's rewrite. + + * pa.c (hppa_legitimize_address): Generate unscaled indexed + addressing for (plus (symbol_ref) (reg)). + (emit_move_sequence): Set REGNO_POINTER_FLAG appropriately + to encourage unscaled indexing modes. + (basereg_operand): New function for unscaled index address support. + * pa.md (unscaled indexing patterns): New patterns for unscaled + index address support. + + * pa.h (MOVE_RATIO): Define. + * pa.md (movstrsi expander): Refine tests for when to use the + library routine instead of an inlined loop copy. Provide an + additional scratch register for use in the inlined loop copy. + (movstrsi_internal): Name the pattern for ease of use. Add + additional scratch register. + * pa.c (output_block_move): Greatly simplify. Use 2X unrolled + copy loops to improve performance. + (compute_movstrsi_length): Corresponding changes. + + * pa.c (print_operand): Handle 'y' case for reversed FP + comparisons. Delete some #if 0 code. Fix various comment typos. + * pa.md (fcmp patterns): Try and reverse the comparison to avoid + useless add,tr insns. + +Sun Nov 26 14:47:42 1995 Richard Kenner <kenner@mole.gnu.ai.mit.edu> + + * Version 2.7.2 released. + + * function.c (fixup_var_refs_1): Make pseudo for DEST + in PROMOTED_MODE unless in a SUBREG. + + * cse.c (insert): Don't put a REG into qty_const. + + * msdos/top.sed: Change version to 2.7.2. + * winnt/config-nt.sed: Likewise. + +Sun Nov 26 14:41:49 1995 Douglas Rupp (drupp@cs.washington.edu) + + * Makefile.in (stamp-objlist): Change .o to $objext. + + * alpha/win-nt.h (CPP_PREDEFINES): Set __unaligned and __stdcall + to null. + (ASM_SPEC): Add a translation for -g to -Zi. + * winnt/ld.c (main): Don't pass -g to link. + * winnt/oldnames.c: Reformat and add some new functions for gnat1. + * winnt/win-nt.h (LINK_SPEC): Pass -g to ld.exe. + Increase default stack size. + * configure ({alpha-dec,i386-ibm}-winnt3.5): Add oldnames.o + to extra_objs. + * libgcc2.c (trampoline): Add getpagesize and mprotect for WINNT. + +Sun Nov 26 14:25:26 1995 Uwe Seimet (seimet@chemie.uni-kl.de) + + * atari.h (FUNCTION_VALUE): Deleted; incorrect. + +Sun Nov 26 14:23:03 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * fixincludes (curses.h): Allow space or tab after bool keyword, + instead of tab or tab. + +Sun Nov 26 14:14:11 1995 Oliver Kellogg (oliver.kellogg@space.otn.dasa.de) + + * 1750a.md (pattern for HImode PSHM): Corrected. + (trunchiqi2, zero_extendqihi2, extendhftqf2): Corrected. + (pattern for movhi of CONST_INT to REG): Corrected. + (divmodqi pattern for DISN): Corrected. + (all shift patterns): Corrected. + + * 1750a.h (REG_OK_FOR_INDEX_P, REG_OK_FOR_BASE_P): Corrected. + (ASM_OUTPUT_[datatype]): Corrected datalbl[].size computation + for output of arrays. + +Sun Nov 26 14:08:57 1995 Dave Love <d.love@dl.ac.uk> + + * mips/iris5.h (NO_IMPLICIT_EXTERN_C): Define this again so + that unistd.h doesn't get badly `fixed' for C++. libg++ will now + build with this definition. + +Sun Nov 26 14:02:43 1995 Robert E. Brown (brown@grettir.bibliotech.com) + + * configure: Better workaround for Nextstep bug. + +Sun Nov 26 13:55:07 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> + + * rs6000.md (load_multiple matcher): Fix typo in opcode. + +Sun Nov 26 13:51:08 1995 Lee Iverson <leei@Canada.AI.SRI.COM> + + * final.c (final_start_function): Move call to sdbout_begin_function + back to final_scan_insn on MIPS systems so parameter descriptions are + recognized. + +Sun Nov 26 13:43:06 1995 DJ Delorie (dj@delorie.com) + + * msdos/top.sed: Don't insert "go32". + +Sun Nov 26 12:08:23 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * combine.c (nonzero_bits, case REG): Put POINTERS_EXTEND_UNSIGNED + code before stack pointer code. Return nonzero at end of stack + pointer code. + + * sparc.h (PRINT_OPERAND_ADDRESS): Handle CONST inside PLUS. + + * Makefile.in (cppalloc.o): Add a rule to build it. + + * alpha.c (alpha_emit_set_const): Don't output SImode sequences + that rely on invisible overflow. Sign extend new when SImode. + Don't recur if new == c. Don't allow shift outside mode. Make + logical right shift be unsigned. + +Sun Nov 26 11:37:50 1995 Arne H. Juul (arnej@idt.unit.no) + + * Makefile.in (compare*): Add "|| true" to avoid spurious + failure messages from some versions of make. + +Sun Nov 26 11:20:09 1995 Dmitry K. Butskoy (buc@stu.spb.su) + + * expr.c (truthvalue_conversion): Add declaration. + +Sun Nov 12 18:09:35 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Version 2.7.1 released. + + * function.c (put_reg_into_stack): New arg volatile_p. + (put_var_into_stack): Call with new arg. + +Sat Nov 11 08:25:34 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * reload.c (output.h): Include it. + * Makefile.in (reload.o): Add dependence on output.h. + +Thu Nov 9 11:24:20 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * mips.h (HARD_REGNO_NREGS): If FP_REG_P, always use UNITS_PER_FPREG + to calculate number of words needed. + +Thu Nov 9 11:04:50 1995 Oliver Kellogg (Oliver.Kellogg@space.otn.dasa.de) + + * 1750a.md (cmphf): Addd Base Reg with Offset address mode (LB,STB,..) + (movqi,movhi,movhf,addqi3,addhf3,subqi3,subhf3,mulqihi3): Likewise. + (mulhf3,divhf3,andqi3,iorqi3): Likewise. + (define_peephole): Remove the Base mode peepholes. Replace the + special addqi define_insn for "LIM Ra,sym,Rb" by a define_peephole. + (ashlqi3): Took out futile 0th alternative. + (lshrqi3, lshrhi3, ashrqi3, ahsrhi3): Correct case of non-constant + shift count. + + * 1750a.h (REG_ALLOC_ORDER): Define. + (REGNO_OK_FOR_BASE_P): Include stack pointer in test against + reg_renumber[REGNO]. + (ASM_OUTPUT_DESTRUCTOR): Remove bogus assembler comment. + +Thu Nov 9 11:01:33 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (expand_expr, case ARRAY_REF): Properly convert types + of index, size, and multiplication. + +Wed Nov 8 09:00:22 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + * arm.md (mov*cc_{,soft_}insn): Use match_operator to test the + comparison and check that the condition code register is used. + +Wed Nov 8 08:49:35 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/sysv4.h (ASM_OUTPUT_{CONSTRUCTOR,DESTRUCTOR}): Undef before + including svr4.h. + +Tue Nov 7 10:58:12 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> + + * m68k.md (subxf3): Properly name pattern. + +Tue Nov 7 10:53:09 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * libgcc2.c (__{C,D}TOR_LIST): For AIX, initialize these arrays to + 0,0, just like NeXT to avoid a warning message from the AIX 4.1 + linker. + +Tue Nov 7 09:58:34 1995 John F. Carr <jfc@mit.edu> + + * cppexp.c (cpp_lex): Correctly parse character constants. + +Tue Nov 7 09:52:15 1995 Jason Merrill <jason@yorick.cygnus.com> + + * rs6000.h (ASM_OUTPUT_{DES,CONS}TRUCTOR): Define. + +Mon Nov 6 10:27:15 1995 Doug Evans <dje@cygnus.com> + + * combine.c (force_to_mode): Fix typo. + +Sun Nov 5 18:37:02 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> + + * m68k.md (cmpxf): Don't call force_const_mem, it looses for PIC; + get predicates right instead. Get rid of separate DEFINE_EXPAND. + (addxf3, subxf3, mulxf3, divxf3): Likewise. + (All XFmode patterns): Delete `F' and `G' constraints. + (absxf2, negxf2): Delete spurious condition on TARGET_FPA. + +Sun Nov 5 11:05:44 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * fixincludes (malloc.h): Fix return type of {m,re}alloc. + +Sun Nov 5 11:02:26 1995 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * cse.c (invalidate): For a pseudo register, do a loop to + invalidate all table entries, irrespective of mode. + +Sun Nov 5 10:57:43 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * combine.c (force_to_mode): Put in last change properly. + +Sun Nov 5 10:53:49 1995 Jeffrey A Law (law@cygnus.com) + + * pa.h (CONDITIONAL_REGISTER_USAGE): Make sure FP regs + get disabled regardless of PA1.0 vs PA1.1 code generation + when TARGET_SOFT_FLOAT or TARGET_DISABLE_FPREGS is on. + +Sun Nov 5 10:49:43 1995 Doug Evans <dje@lisa.cygnus.com> + + * i960.c (emit_move_sequence): Add a scratch register to + multi-reg stores. + (i960_output_move_{double,quad}): New functions. + (i960_print_operand): Handle new operand types E, F. + * i960.md (movdi matchers): Rewrite. + (store_unaligned_di_reg): New pattern. + (movti matchers): Rewrite. + (store_unaligned_ti_reg): New pattern. + +Sun Nov 5 10:45:24 1995 Ian Lance Taylor (ian@cygnus.com) + + * mips.h (MULTILIB_DEFAULTS): Define. + * mips/elf64.h, mips/iris6.h (MULTILIB_DEFAULTS): Define. + +Sun Nov 5 10:41:48 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * reload.c (push_reload): Delete abort for RELOAD_OTHER case added + in last change. + * reload1.c (emit_reload_insns): For RELOAD_OTHER output reloads, + output the reload insns in descending order of reloads. + + * sh.md (mulsidi3-1, mulsidi3, umulsidi3-1, umulsidi3): Enable. + (smulsi3_highpart-1, smulsi3_highpart): New patterns. + (umulsi3_highpart-1, umulsi3_highpart): Likewise. + (movdi-1): Add r/x constraint. + * t-sh (MULTILIB_OPTIONS): Add m2. + (MULTILIB_DIRNAMES): Add m2. + (MULTILIB_MATCHES): Define. + + * sparc.h (RTX_COSTS, case MULT): Check for TARGET_SPARCLITE. + + * abi64.h, elf64.h (CPP_SPEC): Add -EB and -EL support. + +Sat Nov 4 10:36:26 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * sh.md (casesi_worker): Change constraint from = to +. + + * svr4.h (ASM_IDENTIFY_GCC_AFTER_SOURCE): Delete. + (ASM_IDENTIFY_GCC): Output stab here. + +Sat Nov 4 10:32:37 1995 John Carr <jfc@mit.edu> + + * cpplib.c (finclude): Set current input pointer when input + is not a regular file. + + * cppmain.c: Define progname, required by cpplib. + +Sun Oct 29 07:48:36 1995 Michael Meissner <meissner@cygnus.com> + + * xcoffout.h (DBX_FINISH_SYMBOL): Deal with names created via + the __asm__ construct that start with a leading '*'. + * xcoffout.c (xcoff_declare_function): Likewise. + +Sun Oct 29 07:45:41 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * stupid.c (stupid_mark_refs): Handle SUBREG of pseudo-reg in a + SET_DEST same as we handle a pseudo-reg in a SET_DEST. + +Sun Oct 29 07:43:15 1995 Pat Rankin <rankin@eql.caltech.edu> + + * libgcc2.c (L_eh: __unwind_function): Implement for VAX. + * vax.h (RETURN_ADDRESS_OFFSET, RETURN_ADDR_RTX): Define. + +Sun Oct 29 12:39:08 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>a + + * i386/sol2.h (CPP_PREDEFINES): Add -D__SVR4. + +Sun Oct 29 07:14:36 1995 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * reload.c (find_equiv_reg): Check for nonsaving setjmp. + +Fri Oct 27 15:15:56 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * Makefile.in (out_object_file): Depend on TREE_H. + +Fri Oct 27 06:42:36 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.c (call_operand): Only allow reg 27 on NT too. + * alpha.md (call_value_nt, call_nt): Force non-SYMBOL_REF + into reg 27, just like for OSF. + + * rs6000.c (struct asm_option): Changed from struct option. + (expand_block_move_mem): Remove erroneously-added line. + + * expr.c (clear_storage): SIZE is now rtx, not int. + (store_constructor): Call clear_storage with rtx. + (get_inner_reference): Convert index to precision of + sizetype, not POINTER_SIZE. + (expand_expr, case ARRAY_REF): Likewise. + * expr.h (clear_storage): Second arg is rtx, not int. + +Fri Oct 27 05:45:58 1995 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * combine.c (force_to_mode, case ASHIFTRT): Properly handle + mask wider than HOST_WIDE_INT. + + * c-decl.c (pushdecl): Don't test TREE_PUBLIC when deciding whether + to register a duplicate decl in the current block. + +Thu Oct 26 21:55:39 1995 Jason Merrill <jason@sethra.cygnus.com> + + * calls.c (expand_call): Don't trust the callee to copy a + TREE_ADDRESSABLE type. + * function.c (assign_parms): Likewise. + +Thu Oct 26 19:25:05 1995 Mike Stump <mrs@cygnus.com> + + * libgcc2.c (__unwind_function): Provide a default definition for + implementations that don't yet have a function unwinder. + +Thu Oct 26 18:08:19 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (handle_directive): Don't treat newline as white + space when coalescing white space around a backslash-newline. + +Thu Oct 26 17:57:34 1995 Ian Lance Taylor <ian@cygnus.com> + + * mips-tdump.c (enum st): Define st_Struct, st_Union, and st_Enum. + (st_to_string): Handle them. + (type_to_string): Add fdp argument; pass it to emit_aggregate. + (print_symbol): Add fdp argument; pass it to type_to_string. + Handle st_Struct, st_Union, and st_Enum. + (emit_aggregate): Add fdp argument. Handle opaque types. Map + through RFD entries. + (print_file_desc): Pass FDR to print_symbol. + (main): Pass null FDR to type_to_string. + +Thu Oct 26 08:07:10 1995 Michael Meissner <meissner@cygnus.com> + + * configure (powerpc-ibm-aix[456789]*): Use rs6000/t-newas, + not rs6000/t-rs6000. + (rs6000-ibm-aix3.2.[456789]*): Likewise. + (rs6000-ibm-aix[456789]*): Likewise. + + * rs6000/t-newas: Copy from t-rs6000. + * t-rs6000: Don't build -mcpu=common multilib variants of libgcc.a. + + * rs6000.md (load_multiple insn): If address register is among regs, + don't load it with a lwsi instruction, which is undefined on PowerPC. + +Thu Oct 26 08:01:32 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * dwarfout.c (output_compile_unit_die): Handle language_string + of "GNU F77". + + * reload.c (find_reloads_address): When check for out of range constant + plus register, accept any hard register instead of just fp, ap, sp. + + * combine.c (distribute_notes): For Oct 19 change, add additional + check to verify that place has a valid INSN_CUID. + + * sparc/t-vxsparc (LIBGCC1_TEST): Define. + + * sh.md (negdi2): Use TARGET_LITTLE_ENDIAN. + + * combine.c (force_to_mode, case ASHIFTRT): Verify mode bitsize is + within HOST_BITS_PER_WIDE_INT before shifting by it. + + * final.c (final_scan_insn): When recur for instruction in delay slot, + add loop around recursive call in case the instruction gets split. + +Thu Oct 26 07:28:45 1995 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * genrecog.c (write_tree_1): Avoid emitting '-2147483648'. + + * jump.c (duplicate_loop_exit_test): Return 0 if found + a NOTE_INSN_LOOP_CONT. + +Tue Oct 24 15:30:14 1995 Jeffrey A Law <law@cygnus.com> + + * calls.c (expand_call): Make sure valreg is at least + a full word. + +Sun Oct 22 19:35:41 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * sh.h (INIT_SECTION_ASM_OP): Delete. + (HAVE_ATEXIT): Define. + +Sun Oct 22 07:46:04 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * libgcc2.c (__fixuns[xds]fsi): #undef MIN and MAX before #include + of limits.h. + + * pa.c (pa_adjust_cost): Use pa_cpu, not pa_cpu_attr. + +Sun Oct 22 07:38:58 1995 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * alpha.h (CONST_OK_FOR_LETTER_P): Use 'U' for unsigned constants. + * alpha.c (alpha_emit_set_const): Likewise. + * mips.c (gen_int_relational): Likewise. + +Sun Oct 22 07:14:35 1995 Douglas Rupp (drupp@cs.washington.edu) + + * i386.c (i386_return_pops_args): Don't need a FUNDECL to + check for type attributes in FUNTYPE. + +Sat Oct 21 18:17:42 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * sh.md (define_delay): Don't accept any instruction for an annulled + slot, only accept those for which in_delay_slot is yes. + * sh.c (find_barrier): When hi_const returns true, increment count_si + by two if found_si is true. + Always use get_attr_length to compute length of instructions. + If count_hi or count_si out of range at end, need two PREV_INSN calls + not one. + When create new label, set LABEL_NUSES to 1. + (reg_unused_after): Ifdef out code for handling labels. + (prepare_scc_operands): New local variable mode. Set it from + sh_compare_op0 or sh_compare_op1. Use it instead of SImode in + force_reg calls. + + * optabs.c (expand_float): Emit missing barrier after unconditional + jump. + +Sat Oct 21 14:16:46 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> + + * alpha.md (cmpdf): Make conditional on TARGET_FP. + +Fri Oct 20 19:11:12 1995 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * combine.c (distribute_notes): Delete instructions without + side effect that set a subreg of an unused register. + + * m68k.h (PREFERRED_RELOAD_CLASS): Check for !G constants + for DATA_OR_FP_REGS also. + +Fri Oct 20 18:57:10 1995 Ian Lance Taylor <ian@cygnus.com> + + * genmultilib: Output negations of unused alternatives, even if + one of the alternatives is selected. + +Fri Oct 20 18:48:50 1995 Jeff Law (law@hurl.cygnus.com) + + * integrate.c (output_inline_function): Turn on flag_no_inline + to avoid function integration once we begin writing deferred + output functions. + +Fri Oct 20 18:46:33 1995 Michael Meissner <meissner@wogglebug.tiac.net> + + * rs6000.c (float_conv_temp): Delete global variable. + (stack_temps): New static array to hold stack temps. + (offsettable_mem_operand): Delete function. + (offsettable_addr_operand, rs6000_stack_temp): New functions. + (output_epilog): Zero stack_temps. + + * rs6000.h (offsettable_addr_operand): Declare instead of + offsettable_mem_operand. + (PREDICATE_CODES): Use offsettable_addr_operand. + (float_conv_temp): Delete variable. + + * rs6000.md (move_to_float insns): Change move_to_float so + that it doesn't have a clobber of the memory address, and instead + passes the stack temp's memory address as one of the unspec args. + (fix_truncdfsi2): Use rs6000_stack_temp to allocate the temp. + (multiply, shift insns): Fix all cases of multiply and shift insns so + that the right mnemonics are used for -mcpu=common with both + -m{old,new}-mnemonics. + +Fri Oct 20 17:58:19 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * expr.c (safe_from_p, case RTL_EXPR): Return 0 if RTL_EXPR_SEQUENCE + exists. Delete code to return 0 if exp_rtl is zero. + + * function.c (init_function_start): Don't call init_insn_lengths here. + * toplev.c (rest_of_compilation): Call it here. + +Thu Oct 19 19:19:06 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-common.c (check_format_info): Make test for null pointer + more general. + +Thu Oct 19 18:56:16 1995 Satoshi Adachi (adachi@wisdom.aa.ap.titech.ac.jp) + + * fixincludes (stdlib.h): Be more general in edit to change + declaration of {c,m,re}alloc. + +Thu Oct 19 18:48:53 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> + + * libgcc2.c (__udiv_w_sdiv): If we don't have sdiv_qrnnd, define + dummy variant of __udiv_w_sdiv. + +Thu Oct 19 18:45:21 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * alpha.h (ASM_SPEC): If GNU as is the default, then pass -g to + the assembler if -malpha-as. If GNU as is not the default, then pass + -g to the assembler is not -mgas. + + * combine.c (distribute_notes): When search for new place to put + REG_DEAD note, call distribute_links if this new place is between + i2 and i3, and i2 uses the register. + +Thu Oct 19 18:41:36 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000.md (float{,uns}sidf2): Rewrite to break the conversion + process into several general insns. + (move_to_float): New insns to move 2 integer regs into a float register + through memory, taking endianess into account. Make sure that the + floating temporary is a valid address. Use one temporary for all + floats converted. + (fix_truncdfsi2): Take endianess into account. + + * rs6000.c ({low_32_bit,offsettable_mem}_operand): The function + low_32_bit_operand is now unused, delete it. New function + offsettable_mem_operand to determine if a memory address is + offsettable. + * rs6000.h ({low_32_bit,offsettable_mem}_operand): Ditto. + (PREDICATE_CODES): Ditto. + + * rs6000.{c,h} (float_conv_temp): New global. + * rs6000.c (output_epilog): Zero out float_conv_temp. + + * Makefile.in (libgcc{1,2}.a): Allow LIB{1,2}FUNCS_EXTRA files to + end in .S as well as .c and .asm. + +Wed Oct 18 17:56:45 1995 Jose Alonso (sidinf@fpsp.fapesp.br) + + * c-typeck.c (parser_build_binary_op): Warn about x^y==z, etc. + +Mon Oct 9 12:38:06 1995 Michael Meissner <meissner@cygnus.com> + + * protoize.c (reverse_def_dec_list): Silence compiler warnings. + +Mon Oct 9 12:35:54 1995 Andrew Cagney <cagney@highland.com.au> + + * ginclude/va-ppc.h (va_arg): Deal with long longs that would be + passed in the 7th register, and are passed in the stack instead. + +Fri Oct 6 13:47:10 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * alpha.h (ASM_SPEC): Add -g. + +Fri Oct 6 13:42:50 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * alpha.h (alpha_{arg,auto}_offset): Make extern. + +Fri Oct 6 13:24:43 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.h (RETURN_ADDRESS_OFFSET): Correct previous change. + +Fri Oct 6 13:14:43 1995 Doug Evans <dje@canuck.cygnus.com> + + * rtlanal.c (reg_set_last): Fix call to reg_set_between_p. + +Tue Oct 3 12:31:38 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stor-layout.c (layout_type, case ARRAY_TYPE): Strip MAX_EXPR + from upper bound when computing length if it just protects against + negative length. + + * expr.c (emit_move_insn_1): When doing multi-word move, show + output is clobbered. + +Tue Oct 3 12:26:07 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * cse.c (set_nonvarying_address_components, case AND): Add *pend to + end. Add constant to start instead of subtracting it. + +Tue Oct 3 12:23:28 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> + + * combine.c (simplify_rtx): In code that attempts to simplify + conditional expressions, if the result is an NE around another + comparison, return the original expression. + + * longlong.h (mips umul_ppmm): Use `l' and `h' constraints; + remove mflo and mfhi instructions. + +Tue Oct 3 12:21:29 1995 Michael Meissner <meissner@cygnus.com> + + * ginclude/va-ppc.h (va_start, stdarg case): Call + __builtin_next_arg, and ignore the result, so that the compiler + can report the proper error, if the second argument is not the + last argument. + +Tue Oct 3 12:02:51 1995 Kohtala Marko <Marko.Kohtala@ntc.nokia.com> + + * function.c (assign_stack_temp): Adjust full_size field of + temp_slot when splitting an unused slot. + +Tue Oct 3 11:51:59 1995 Mike Stump <mrs@cygnus.com> + + * expr.c (expand_builtin_return_addr): Break out functionality + from expand_builtin. + (expand_builtin): Call expand_builtin_return_addr. + * rs6000.h (RETURN_ADDR_RTX): Remove call to copy_to_reg. + Offset to return address is 4 when !TARGET_64BIT and v4_call_p, + 8 otherwise. + * sparc.h (RETURN_ADDR_RTX): Remove call to copy_to_reg. + * alpha.h (RETURN_ADDR_RTX): New definition. + +Sun Oct 1 21:23:30 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * tree.c (staticp, case INDIRECT_EXPR): Disable case. + + * expr.c (expand_expr, case COMPONENT_REF): If getting component + of union of variable size, propagate TARGET. + +Fri Sep 29 07:48:09 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (store_expr): When storing promoted value, don't return + MEM if address contains target. + +Thu Sep 28 14:30:03 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (rescan): Expand `#if foo && #bar' without a bogus + complaint about preprocessor directives within macro args. + Expand `foo' in `foo#bar' without requiring a space before `#'. + +Thu Sep 28 14:24:26 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.md (anonymous DImode shift patterns setting cc0): Turned + off due to reload problems. + +Thu Sep 28 14:05:22 1995 Niklas Hallqvist (niklas@appli.se) + + * Makefile.in (USER_H): Move up so can override. + (INSTALL_ASSERT_H): New definition. + (install-headers): Use it. + (stmp-int-hdrs): Handle USER_H being empty. + * config/x-netbsd (INSTALL_ASSERT_H): Define as empty. + + * i386/netbsd.h (WCHAR_{TYPE,UNSIGNED,TYPE_SIZE}): Now int. + * m68k/netbsd.h, ns32k/netbsd.h, sparc/netbsd.h: Likewise. + * vax/netbsd.h: Likewise. + (SIZE_TYPE): Use unsigned int. + + * m68k.c (output_scc_di): Swap operands when needed. + * m68k.h (LEGITIMATE_PIC_OPERAND): Allow SYMBOL_REF_FLAG symref. + * m68k.md: Make both assembler syntaxes do the same for PIC calls. + +Tue Sep 26 16:51:44 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * mips.c (override_options): Don't allow anything but integers to + go in the HI/LO registers. + +Tue Sep 26 16:36:18 1995 John F. Carr <jfc@mit.edu> + + * c-common.c (check_format_info): Don't warn about format type + mismatch if the argument is an ERROR_MARK. + +Mon Sep 25 17:50:50 1995 Craig Burley (burley@gnu.ai.mit.edu) + + * stor-layout.c (put_pending_sizes): New function. + * tree.h (put_pending_sizes): Add declaration. + * tree.c (save_expr): Return original for ERROR_MARK. + +Fri Sep 22 19:20:01 1995 Jeff Law (law@hurl.cygnus.com) + + * expr.c (expand_builtin, case BUILT_IN_MEMCPY): Strip off + all NOP exprs from the source and destination nodes, then + set MEM_IN_STRUCT_P. + +Fri Sep 22 18:50:31 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000/eabi.h (ASM_OUTPUT_INT): Test for whether the integer + being output is also a constant so &sym - &sym2 is not fixed up. + +Fri Sep 22 18:49:07 1995 Peter Flass (FLASS@LBDRSCS.BITNET) + + * i370.md (cmpsi): Add missing constraints to operand 1. + +Fri Sep 22 18:27:33 1995 Torbjorn Granlund <tege@matematik.su.se> + + * i386.h (CONST_OK_FOR_LETTER_P): Make `N' match range 0..255 + for `outb' instruction. + + * pyr.h (PRINT_OPERAND): Handle code `R' for REG. + * longlong.h (pyr umul_ppmm): Use it. + +Fri Sep 22 18:24:38 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-parse.in (enumlist): Propagate error_mark_node. + + * c-aux-info.c (gen_type): Handle ERROR_MARK. + + * alpha.md (movdi): Avoid memory sharing problem when in reload. + +Wed Sep 20 14:27:09 1995 Peter Flass <flass@lbdrscs.bitnet> + + * mvs.h (FUNCTION_PROLOGUE): Maintain savearea forward chain + per MVS standards. + +Wed Sep 20 14:20:52 1995 Torbjorn Granlund <tege@matematik.su.se> + + * pyr.md (cmphi recognizer): Make condition match constraints. + (cmpqi recognizer): Likewise. + +Wed Sep 20 12:42:59 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * integrate.c (expand_inline_function): Do copy something setting + the result register if it is setting it to itself and has a REG_NOTE. + + * integrate.c (set_decl_{origin_self,abstract_flags}): Treat + a DECL_INITIAL of error_mark_node the same as one of NULL_TREE. + +Tue Sep 19 19:30:18 1995 Dave Pitts (dpitts@nyx.cs.du.edu) + + * i370.md (cmphi, movhi, movstricthi, extendhisi2): Correct generation + of short integer (Halfword) + ({add,sub,mul,and,ior,xor}hi3): Likewise. + * i370/mvs.h (MACROPROLOGUE): New macro. + (FUNCTION_{PRO,EPI}LOGUE): Added ability to use IBM supplied function + prologue macros. + (FUNCTION_PROLOGUE): Corrected function "in-line" prologue alignment + problems. + (ASM_DECLARE_FUNCTION_NAME): Changed alignment to FullWord. + (ASM_OUTPUT_{SHORT,ASCII}): Reworked. + +Tue Sep 19 19:22:15 1995 Douglas Rupp (drupp@cs.washington.edu) + + * winnt/win-nt.h: Renamed from winnt/win-nt.h. + (LINK_SPEC): Add -noinhibit-exec. + * {alpha,i386}/win-nt.h: Renamed from {alpha,i386}/winnt.h. + Include winnt/win-nt.h, not winnt/winnt.h. + * winnt/oldnames.c: New file. + * winnt/headers.mak (fixinc-nt.obj): Fix typo. + * winnt/config-nt.bat: Change winnt.h to win-nt.h. + * i386/config-nt.sed: Likewise. + * configure ({alpha,i386}-*-winnt3*): Likewise. + +Mon Sep 18 14:00:45 1995 Oliver Kellogg (Oliver.Kellogg@space.otn.dasa.de) + + * 1750a.h (enum reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): + Added R2 and R0_1. + (REG_CLASS_FROM_LETTER): New letters 't' and 'z'. + (EXTRA_CONSTRAINT): New letter 'Q'. + +Sun Sep 17 12:39:22 1995 Jeff Law (law@snake.cs.utah.edu) + + * pa.h (ASM_DECLARE_FUNCTION_NAME): If a parameter's type + has TYPE_NEEDS_CONSTRUCTING on, then it's passed by invisible + reference. + +Sat Sep 16 17:42:33 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * loop.c (find_and_verify_loops): Fix error in last change. + +Sat Sep 16 08:38:22 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.h (GO_IF_LEGITIMATE_ADDRESS): Disallow SYMBOL_REF for + current function. + + * cse.c (recorded_label_ref): New variable. + (insert): Set instead of cse_jumps_altered. + (cse_main): Initialize it and return 1 if nonzero at end. + +Fri Sep 15 18:26:49 1995 Torbjorn Granlund (tege@matematik.su.se) + + * fold-const (div_and_round_double): Change `carry', `quo_est', + and `scale' from plain int to `unsigned HOST_WIDE_INT'. + +Fri Sep 15 18:24:24 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (insert): Set cse_jumps_altered when inserting a LABEL_REF. + +Fri Sep 15 17:29:41 1995 Oliver Kellogg (Oliver.Kellogg@space.otn.dasa.de) + + * 1750a.c (b_mode_operand): New function. + (print_operand): Added code 'Q'. + +Fri Sep 15 17:27:23 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * loop.c (find_and_verify_loops): When moving exit blocks out of + the loop, verify that the target of P is within the current loop. + + * reorg.c (fill_slots_from_thread): Update thread if it is split. + +Fri Sep 15 17:06:51 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000.md (decrement_and_branchsi and related insns): Don't use + a "2" to select a register preference for operand 1 if operand 2 + hasn't been seen yet. + Add appropriate clobbers in decrement_and_branchsi. + Add patterns where the pc/label_ref are interchanged. + + * Makefile.in (gnucompare, stmp-multilib-sub): Remove extra . in + front of $(objext). + + * rs6000.c (output_toc): Align DF constants if STRICT_ALIGNMENT. + + * config/fp-bit.c (FLO_union_type): Add words field if double + precision to get at the separate words. + (FLO_union_type, pack_d, unpack_d): Use FLOAT_BIT_ORDER_MISMATCH + to determine when the bitfields need to be reversed, and + FLOAT_WORD_ORDER_MISMATCH when the words need to be reversed. + +Fri Sep 15 16:41:43 1995 Jeff Law (law@snake.cs.utah.edu) + + * reorg.c (fill_simple_delay_slots): When filling insn's delay slot + with JUMP_INSN, don't assume it immediately follows insn on + unfilled slots obstack. + + * Makefile.in (caller-save.o): Depend on insn-codes.h. + +Thu Sep 14 17:41:49 1995 Jim Meyering (meyering@comco.com) + + * protoize.c (do_cleaning): Don't blank out backslash-escaped + newlines in double quoted strings. + +Thu Sep 14 16:20:35 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * emit-rtl.c (gen_lowpart): If gen_lowpart_common fails + for a REG, load it into a pseudo and try again. + +Thu Sep 14 14:15:16 1995 Stan Cox (coxs@dg-rtp.dg.com) + + * m88k.h (VERSION_INFO1): Removed BCS reference. + * m88k/dgux.h (ASM_SPEC, *_LEGEND): + Added -mno-legend option. -mstandard no longer implies that legend + legend information not be produced. + (LINK_SPEC): Removed -z text + +Tue Sep 12 19:05:39 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * cccp.c (is_system_include): Call skip_redundant_dir_prefix. + +Tue Sep 12 18:58:21 1995 John Carr <jfc@mit.edu> + + * sparc.md: Change `*return "string"' to "string" in patterns. + +Tue Sep 12 18:48:47 1995 Craig Burley (burley@gnu.ai.mit.edu) + + * function.c (put_var_into_stack): For CONCAT case, order of + placement depends on FRAME_GROWS_DOWNWARD, not STACK_GROWS_DOWNWARD. + +Tue Sep 12 18:34:10 1995 Doug Evans <dje@canuck.cygnus.com> + + * va-sparc.h (v9 varargs va_start): Handle __builtin_va_alist + being stack argument. + + * sparc.h (STATIC_CHAIN_REGNUM): Use %g5 for sparc64. + (TRAMPOLINE_TEMPLATE): Rewrite for sparc64. + (TRAMPOLINE_SIZE): Is 40 for sparc64. + * sparc.c (sparc64_initialize_trampoline): Rewrite. + +Tue Sep 12 18:30:22 1995 Douglas Rupp (drupp@cs.washington.edu) + + * cp/Make-lang.in (cc1plus) : Removed unnecessary $(exeext). + + * configure: Added code to handle gcc_extra_objs. + (alpha-winnt): Changed xmake_file to winnt/x-winnt. + Added extra_gcc_objs=spawnv.o; changed extra_programs to ld.exe. + (i386-winnt): Changed xmake_file to winnt/x-winnt. + Added extra_gcc_objs=spawnv.o; changed extra_programs to ld.exe. + * configure.bat: Changed to used common winnt/config-nt.bat. + * Makefile.in: Changed various .o's to .$(objext)'s + (specs): Removed unnecessary $(exeext). + (EXTRA_GCC_OBJS): New variable. + (clean): Removed $(LIB2FUNCS_EXTRA) + * objc/Makefile: Changed archive command for libobjc.a to use $? + for objects. + + * alpha/x-winnt, i386/x-winnt: Deleted. + * alpha/config-nt.bat, i386/config-nt.bat: Deleted. + * alpha/config-nt.sed, i386/config-nt.sed: Moved architecture + independent commands to config/winnt/config-nt.sed. + * alpha/winnt.h: Added -D_M_ALPHA to CPP_PREDEFINES. + Changed LIB_SPEC to be compatible with Gnu ld for NT. + * i386/winnt.h: Added -D_cdecl=__attribute__((__cdecl__)). + Change LIB_SPEC to be compatible with Gnu ld for NT. + * winnt/config-nt.bat, winnt/config-nt.sed: New files. + * winnt/dirent.{c,h}, winnt/fixinc-nt.c, winnt/headers.mak: New files. + * winnt/ld.c: Changed precedence of libraries to look for + libfoo.lib before libfoo.a + Changed to work like Gnu ld for NT. + * winnt/libgcc.mak, winnt/mklibgcc.c: New files. + * winnt/spawnv.c: Changed spawn function entry points to __spawn* + instead of spawn*. + * winnt/x-winnt: New file. + * fixinc-nt.sed: New file. + * fixinc.winnt: Rewritten to use fixinc-nt.sed. + + * gcc.c: Remove fix_argv kludge. + +Tue Sep 12 13:24:17 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.md (power subdi3 pattern): Fix pattern to have 5 + alternatives, and correct 4th alternative to match reality. + + * rs6000.md (adddi3, subdi3, negdi2): Add constraints so output reg + does not overlap one reg with one of the inputs. + +Tue Sep 12 13:09:48 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.c (output_scc_di): Fixed for non-SGS_CMP_ORDER syntax. + + * collect2.c (scan_libraries): Cast lsyms' alloca to LDSYM*. + +Tue Sep 12 13:04:12 1995 Niklas Hallqvist (niklas@appli.se) + + * stmt.c (expand_start_stmt_expr): Do stack adjust in right place. + + * stdarg.h (__gnuc_va_list): Make char * for NetBSD. + +Tue Sep 12 12:44:46 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * ginclude/va-ppc.h (va_arg): Reorganize to avoid BIND_EXPRs of + aggregate or array type. + +Tue Sep 12 12:42:27 1995 Ian Lance Taylor <ian@cygnus.com> + + * fixincludes: Fix HP/UX <sys/file.h> for g++ -pedantic-errors. + + * fixincludes (curses.h): typedef bool need not take up entire line. + +Mon Sep 11 19:05:42 1995 Stan Cox (coxs@dg-rtp.dg.com) + + * c-typeck.c (digest_init): Don't recursively call digest_init + when in traditional mode if the type is invalid. + +Mon Sep 11 18:58:26 1995 Oliver Kellogg (Oliver.Kellogg@space.otn.dasa.de) + + * 1750a.md: Added DLB/DSTB peepholes for HFmode. + Corrected mnemonics for HImode DSTB peephole. + +Mon Sep 11 18:48:06 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * config/fp-bit.c (FLO_union_type): Remove bitfields to set sign, + exponent, and mantissa, and add value_raw field, which is an + integer of the appropriate type. If _DEBUG_BITFLOAT is defined, + provide little and big endian bitfields. If the macro + FLOAT_BIT_ORDER_MISMATCH is defined, use explicit bitfields. + (pack_d, unpack_d): Switch to use value_raw and explicit shifts + and masks so that we don't have to worry about whether the target + is big or little endian unless FLOAT_BIT_ORDER_MISMATCH is + defined. If single precision floating point, rename to pack_f and + unpack_f, so there is no confusion in the debugger. + + * rs6000.h (rs6000_abi): New enumeration to describe which + ABI we're conforming to. + (rs6000_stack): Use abi enum, not AIX vs. V.4 boolean. + (ASM_OUTPUT_OPTIONS): New macro to print output options in .s file. + (ASM_FILE_START): Use it. + (output_options,rs6000_float_const): Declare new functions. + + * rs6000.c (output_option{,s}): New functions to write -f, -m, + and -W options to the asm file. + (rs6000_float_const): New function to generate floating point + constants portably used in signed,unsigned -> double conversions. + (rs6000_stack_info,debug_stack_info): Use ABI enumeration instead + of AIX vs. V.4 boolean. + + * rs6000.md (float{,uns}sidf2): Call rs6000_float_const to + portably build the proper floating point constant for conversions. + (movdi): Properly handle movdi of CONST_{INT,DOUBLE} on little + endian systems. + + * rs6000/sysv4.h (LIBGCC2_WORDS_BIG_ENDIAN): Define to be 0/1 + depending on the target endianess. + (ASM_FILE_START): Define, to call output_options in addition to + output_file_directive. + (TRAMPOLINE_SIZE): Correct size to match code. + + * rs6000/eabi{,le}sim.h (CPP_SPEC): Define the correct endian + macro for varargs/stdargs use. + +Mon Sep 11 18:41:58 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * c-decl.c (redeclaration_error_message): For TYPE_DECLs, return 0 + if TYPE_MAIN_VARIANT of old type is same as new type. + +Mon Sep 11 17:39:35 1995 Rob Ryan (robr@cmu.edu) + + * xcoffout.c (xcoff_inlining): New variable, used in place of + xcoff_current_include_file when determining whether to use + absolute line numbers. + (xcoffout_source_file): Switched to using xcoff_inlining to + determine when to emit .bi/.ei directives. + +Mon Sep 11 16:55:06 1995 Torbjorn Granlund <tege@matematik.su.se> + + * m68k.md (cmpdi): Change patterns to allocate scratch register at + RTL generation time. + (tstdi): Likewise. + +Sun Sep 3 09:03:50 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (size_binop): Don't pass 1 to NOTRUNC. + +Thu Aug 31 19:27:00 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * libgcc2.c: Include longlong.h. + [L_udivdi3 || L_divdi3 || L_umoddi3 || L_moddi3] (__udivmoddi4): + Define this `static inline' when defining these, so they all + remain leaf functions. + +Thu Aug 31 18:38:21 1995 Paul Eggert <eggert@twinsun.com> + + * c-parse.in (ends_in_label): New %union member. + (stmts, stmt_or_label): Use new member to avoid lexical lookahead hack. + (lineno_stmt_or_labels): New rule. + (lineno_stmt_or_label, stmt_or_label): Yield nonzero if it ends + in a label. + +Thu Aug 31 08:31:40 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (canon_hash, CONST_DOUBLE): Hash integer and real + differently. + * varasm.c (struct rtx_const): Add new field DI to union. + (decode_rtx_const, case CONST_DOUBLE): Use to hash CONST_DOUBLE + representing an integer. + + * va-alpha.h (__gnuc_va_list): Make __offset an int. + * alpha.c (alpha_builtin_saveregs): Properly compute address + of __offset both both OSF and WINNT. + + * xm-alpha.h (sbrk): Don't define here. + * gmon.c (sbrk): Define here for __alpha. + * toplev.c (sbrk): Likewise. + * mips-tfile.c (malloc, calloc, realloc): Don't define for anybody. + + * reload.c (push_reload): Add case for output reload of a SUBREG + of a hard reg when output mode is invalid for that mode. + In both that case and existing case for in, don't remove SUBREG. + * reload1.c (emit_reload_insns): Emit RELOAD_OTHER output reloads last. + +Tue Aug 29 19:16:06 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-common.c (decl_attribute, case A_PACKED): Check is_type first. + (decl_attribute, case A_T_UNION): Likewise. + Don't access TYPE_FIELDS if DECL is zero. + * c-decl.c (finish_struct): If transparent_union attribute + specified, validate it once we finish laying the union out. + +Mon Aug 28 05:58:03 1995 Paul Eggert <eggert@twinsun.com> + + * arm.c (arm_gen_movstrqi): Remove unused variable const_sxteen. + + * bi-lexer.c (buffer, inpoint): Remove unused variables. + + * i370/mvs.h, i370/mvs370.c (mvs_label_emitted): Renamed + from mvs_label_emited. + + * msdos/configur.bat: Fix misspelling of `maintainer-clean'. + +Sat Aug 26 06:57:17 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload.c (push_secondary_reload): If X is a paradoxical SUBREG, + get mode and thing to reload from inside. + * reload1.c (emit_reload_insns): Do nothing for SUBREG whose + operand is unused subsequently. + In secondary reload case, if paradoxical SUBREG for output, reload + thing inside SUBREG, just like gen_reload. + +Fri Aug 25 19:26:53 1995 Paul Eggert <eggert@twinsun.com> + + * c-typeck.c (set_init_label): Don't die if an entire + brace-pair level is superfluous in the containing level. + +Fri Aug 25 19:22:46 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * configure (powerpc{,le}-eabisim): Add support for a new target + that works under the PSIM simulator. + * rs6000/eabisim.h, rs6000/eabilesim.h, rs6000/t-eabisim: New files. + + * rs6000/eabi.h (STRICT_ALIGNMENT): If little endian, always set + strict alignment to 1. + +Fri Aug 25 19:22:23 1995 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.md ({add,sub,mulsi}di3): Support both endian possibilities. + (negdi2): Likewise. + +Fri Aug 25 19:10:41 1995 Oliver Kellogg (Oliver.Kellogg@space.otn.dasa.de) + + * 1750a.md: Added peephole definitions for Load/Store Base insns + and eliminating redundant load in an equivalent store/load sequence. + +Fri Aug 25 18:33:27 1995 Craig Burley (burley@gnu.ai.mit.edu) + + * toplev.c (report_error_function): Don't attempt to use input + file stack to identify nesting of #include's if file name oflocation + diagnosed is not same as input_filename. + +Fri Aug 25 07:31:47 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * integrate.c (output_inline_function): Switch to function obstack. + +Mon Aug 21 13:29:54 1995 J"orn Rennecke (amylaar@meolyon.hanse.de) + + * i386.c (arithmetic_comparison_operator): New function. + (print_operand): Take into account that overflow flag is not + set the same as after a compare instruction. + * i386.md (decrement_and_branch_until_zero): Use + arithmetic_comparison_operator to decide if there is comparison + suitable to be expressed by condition code from an arithmetic op. + +Mon Aug 21 13:26:13 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.md (adddi3, subdi3): "&" added to clobber's constraints. + +Mon Aug 21 12:11:14 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * t-sparclite (MULTILIB_*, LIBGCC, INSTALL_LIBGCC): Define. + + * sh.md (movdi-1, movdf-1): Make conditional on reload_completed, + delete conditions checking for pseudo registers and Q addresses. + Add code to handle SUBREG. + + * local-alloc.c (wipe_dead_reg): Make a register mentioned in a + REG_INC note die after the instruction. + + * m68k.md: For all dbra pattern, change constraint from 'g' to 'd*g'. + + * Makefile.in: (underscore.c): Rename rule to stamp-under, and + touch stamp-under at the end. Add new rule for underscore.c that + depends on stamp-under. + + * sh.c (reg_unused_after): For a SEQUENCE, make sure all insns are + safe before returning 1. + + * sh.h (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN): Define. + + * sh.c (output_stack_adjust): Add new argument reg. Use it instead + of stack_pointer_rtx. + (sh_expand_prologue, sh_expand_epilogue): Pass new argument to + output_stack_adjust. + +Sat Aug 19 17:34:15 1995 Jim Wilson <wilson@phydeaux.cygnus.com> + + * sparc/gmon-sol2.c (_mcount): Define. + * sparc/sol2.h (STARTFILE_SPEC, ENDFILE_SPEC): Delete superfluous + -pg tests. + (LINK_SPEC): Add libp directories to -Y when -pg. + + * unroll.c (calculate_giv_inc): Handle increment computed by ASHIFT. + +Sat Aug 19 17:28:56 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.md (subdi3): Should not be commutative. + (one_cmpldi2): Fixed typo with register operand. + +Sat Aug 19 17:20:43 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000.c (output_prolog): Fixup code to set stack pointer + if stack size > 32k. + * rs6000.md (sync_isync): Renamed from sync; added an isync insn + after the sync to properly deal with PowerPC's with split I/D caches. + * sysv4.h (INITIALIZE_TRAMPOLINE): Sync function now named sync_isync. + +Sat Aug 19 17:07:09 1995 Doug Evans <dje@canuck.cygnus.com> + + * h8300.h (STATIC_CHAIN_REGNUM): Use r3. + (REGISTER_NAMES): Print r7 as sp. + (ADDITIONAL_REGISTER_NAMES): Recognize r7. + (ASM_OUTPUT_ALIGN): Alignment is power of 2. + * h8300.md (fancy_btst,fancy_btst1): Branch target must be + operand 0 for length attribute to work. + +Sat Aug 19 16:43:11 1995 Paul Franklin <paul@cs.washington.edu> + + * assert.h: Declare __eprintf with attribute noreturn. + +Sat Aug 19 16:40:12 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * stddef.h: Don't define wchar_t if __cplusplus is defined. + +Tue Aug 15 18:01:01 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (warning_with_line): Fix typo in declaration when + !HAVE_VPRINTF and defined (__STDC__). + +Tue Aug 15 17:57:54 1995 Stephen L Moshier <moshier@world.std.com> + + * real.c (ediv, emul): Set sign bit of IEEE -0.0 result. + +Tue Aug 15 17:49:47 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (safe_from_p): Only safe if EXP is variable-size and X + is BLKmode. + + * stmt.c (fixup_gotos): When some fixups done, reset to point + to next instead of zeroing TREE_VALUE, which may be shared. + +Mon Aug 14 09:15:45 1995 Doug Evans <dje@canuck.cygnus.com> + + * m68k/m68kemb.h (STARTFILE_SPEC): Define as empty. + +Mon Aug 14 09:08:57 1995 Pat Rankin <rankin@eql.caltech.edu> + + * vax.c (vms_check_external): Update `pending_head' properly + when the first list element is removed. + +Mon Aug 14 09:01:32 1995 Jeffrey A. Law <law@adder.cygnus.com> + + * pa.md (call expanders): Emit a blockage insn after restoring + %r19 when generating PIC. + +Sun Aug 13 21:58:49 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * toplev.c (main): Change text of unsupported -g option warning. + +Sun Aug 13 21:47:57 1995 Andrew McCallum <mccallum@graphite.cs.rochester.edu> + + * objc/selector.c (sel_get_any_typed_uid): New function. + * objc/objc-api.h (sel_get_any_typed_uid): Declare new function. + +Sun Aug 13 21:43:17 1995 John Carr <jfc@mit.edu> + + * c-typeck.c (c_expand_asm_operands): Check for read-only output + operand where the variable is read-only but the type is not. + +Sun Aug 13 21:16:12 1995 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.c (direct_return): Epilogue required if CR saved. + +Sun Aug 13 19:09:25 1995 Jeff Law (law@snake.cs.utah.edu) + + * configure (hppa1.?-hp-hpux10): Recognize and treat just like hpux9. + +Sun Aug 13 19:07:23 1995 Doug Evans <dje@canuck.cygnus.com> + + * i960.md (movdi matchers): Fix src/dest order in unaligned + reg->reg case. + +Sun Aug 13 18:49:01 1995 DJ Delorie <dj@delorie.com> + + * i386/xm-dos.h (HAVE_STRERROR): New definition. + + * msdos/configur.bat: Add missing carriage return. + +Sun Aug 13 18:40:55 1995 Andrew Cagney <cagney@highland.com.au> + + * Makefile.in (USER_H): Add va-ppc.h. + +Sun Aug 13 18:36:17 1995 M. Warner Losh <imp@village.org> + + * stmt.c (expand_asm_operands): Type '0'..'4' operands may + allow regs, so move them to the default case. + +Sun Aug 13 18:32:35 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (warning_with_line): New function. + (trigraph_pcp): Use it, to avoid reporting line number. + (vwarning_with_line): Don't report line number if zero. + +Sun Aug 13 18:23:08 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * toplev.c (vmessage): Support four arguments. + +Sun Aug 13 18:19:51 1995 Michael Meissner <meissner@cygnus.com> + + * ginclude/stdarg.h: Add ppc svr4 calling sequence support. + * ginclude/varargs.h: Likewise. + * ginclude/va-ppc.h: New file. + +Sun Aug 13 18:05:20 1995 Michael Gschwind <mike@donoussa.vlsivie.tuwien.ac.at> + + * configure (pdp-*-*): Add support for t-pdp11. + * t-pdp11: New file. + * Makefile.in (LIBGCC2_CFLAGS): Add TARGET_LIBGCC2_CFLAGS. + +Sun Aug 13 14:50:58 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * final.c (final_start_function): Always call sdbout_begin_function + and xcoffout_begin_function, even if no line number info. + + * mips/abi64.h (SETUP_INCOMING_VARARGS): In if statement, only + subtract one for stdarg. Don't subtract PRETEND_SIZE from + argument pointer when calculating stack address. + * mips.h (INITIAL_ELIMINATION_OFFSET): For 64 bit ABI, subtract + current_function_pretend_args_size when converting from argument + pointer. + * va-mips.h (va_start): For stdarg, delete separate define for + 64 bit ABI. For varargs, don't subtract 64, and only add -8 when + all argument registers are used. + + * gcc.c (main): When concat gcc_exec_prefix and + standard_startfile_prefix, put machine_suffix in the middle. + + * iris6.h (INIT_SECTION_ASM_OP): Don't define. + (LD_INIT_SWITCH, LD_FINI_SWITCH, HAS_INIT_SECTION): Don't undef. + (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Ifdef out. + * configure (mips-sgi-irix6, mips-sgi-irix5cross64): Define + use_collect2 to yes. + + * combine.c (move_deaths): When have a multi-reg hard register, + if don't find a note, then recur for each individual hard register. + + * cse.c (set_nonvarying_address_components): Handle addresses + which are the sum of two constant pseudo regs. + (cse_rtx_addr_varies_p): Likewise. + + * Makefile.in (gfloat.h): Add a - before the rm command. + + * loop.c (find_and_verify_loops): Set dest_loop only if + JUMP_LABEL (insn) is non-zero. + +Mon Jul 31 14:31:53 1995 Ian Lance Taylor <ian@cygnus.com> + + * fixincludes: Avoid clobbering VxWorks drv/netif/if_med.h file. + +Sat Jul 29 16:21:42 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * collect2.c: (XCOFF_SCAN_LIBS): Define if OBJECT_FORMAT_COFF and + XCOFF_DEBUGGING_FORMAT. + (SCAN_LIBRARIES): Also define if XCOFF_SCAN_LIBS. + +Sat Jul 29 16:19:42 1995 Stuart D. Gathman <stuart@bmsi.com> + + * collect2.c (scan_libraries): Implement for AIX. + +Sat Jul 29 09:59:33 1995 Michael Gschwind <mike@lanai.vlsivie.tuwien.ac.at> + + * configure: (pdp11-*-bsd) New target. + * 2bsd.h: New file. + + * pdp11.c (output_move_double): Handle CONST_INT parameters properly. + * pdp11.h (RTX_COSTS): Fill in missing default values. + * pdp11.md (truncdfsf2, extendsfdf2, floatsidf2, fix_truncdfsi2): + Allow register parameters, required by gcc to generate correct code. + * xm-pdp11.h: Include tm.h. + +Sat Jul 29 09:55:17 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * configure (m68k-*-linux*aout*, m68k-*-linux*): New targets. + * m68k/linux-aout.h, m68k/linux.h, m68k/t-linux, m68k/xm-linux.h: New. + * m68k.md [USE_GAS]: Output `jbsr' instead of `jsr' for normal + function calls and `bsr.l' instead of `bsr' for pic function calls. + +Sat Jul 29 09:44:13 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * sh.h (CAN_DEBUG_WITHOUT_FP): Comment out. + + * reload.c (find_reloads_address_1, case PLUS): When handle SUBREG, + add SUBREG_WORD offset to SUBREG_REG register number. + (find_reloads_address_1, case SUBREG): If a pseudo register inside + a SUBREG is larger than the class, then reload the entire SUBREG. + * sh.h (SUBREG_OK_FOR_INDEX_P): New macro. + (INDEX_REGISTER_RTX_P): Use it. + +Sat Jul 29 09:33:19 1995 Doug Evans <dje@canuck.cygnus.com> + + * mips/netbsd.h (CPP_SPEC): Fix typo. + + * configure (a29k-*-vxworks*): Define extra_parts for crt{begin,end}.o. + * t-a29k, t-a29kbase, t-vx29k ({,CROSS_}LIBGCC1): Define as empty. + +Sat Jul 29 09:15:17 1995 Jeffrey A. Law <law@rtl.cygnus.com> + + * pa/lib2funcs.asm (gcc_plt_call): Rewrite to avoid the need + for being called by _sr4export. Inline expand $$dyncall to + avoid the need for long-call and PIC support. + +Sat Jul 29 07:30:04 1995 Oliver Kellogg (Oliver.Kellogg@space.otn.dasa.de) + + * ms1750.inc (ucim.m, ucr.m, uc.m): New. + * 1750a.md (cmpqi): Account for unsigned comparisons. + (rotrqi3, rotrhi3): Reworked. + * 1750a.c (notice_update_cc): INCM and DECM set condition codes. + (unsigned_comparison_operator, next_cc_user_is_unsigned): New fcns. + * 1750a.h (FUNCTION_EPILOGUE): Local variables freed from SP, not FP. + (ASM_OUTPUT_BYTE): Make distinct from ASM_OUTPUT_CHAR. + (ASM_OUTPUT_CONSTRUCTOR): Add FILE arg to assemble_name. + +Fri Jul 28 09:40:07 1995 Jeffrey A. Law <law@rtl.cygnus.com> + + * pa.h (DO_GLOBAL_DTORS_BODY): Use an asm statement to keep optimizer + from deleting an assignment it believes dead. + +Fri Jul 28 08:47:51 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * unroll.c (unroll_loop): When preconditioning, output code to + execute loop once if initial value is greater than or equal to final + value. + + * configure (lang_specs_files, lang_options_files): Add $srcdir to + file names when adding them to these variables. + + * c-typeck.c (pointer_int_sum): Don't distribute if intop is unsigned + and not the same size as ptrop. + + * function.c (assign_stack_temp): When split a slot, set base_offset + and full_size in the newly created slot. + (combine_temp_slots): Update full_size when slots are combined. + + * sh.c (reg_unused_after): New function. + * sh.md (define_peephole): Add peepholes to use r0+rN addressing mode + for some address reloads. + + * final.c (final_start_function): If SDB_DEBUG, call + sdbout_begin_function. If XCOFF_DEBUG, call xcoffout_begin_function + instead of xcoffout_output_first_source_line. + (final_scan_insn): Don't call sdbout_begin_function or + xcoffout_begin_function. + * xcoffout.c (xcoffout_output_first_source_line): Delete. + (xcoffout_begin_function): Call dbxout_parms and + ASM_OUTPUT_SOURCE_LINE. + + * va-mips.h: Change every occurance of #if __mips>=3 to + #ifdef __mips64. + * mips/abi64.h (CPP_SPEC): Output -D__mips64 when -mips3, or -mips4, + or -mgp64. Output -U__mips64 when -mgp32. + * mips/dec-bsd.h, mips/elf64.h, mips/iris3.h: Likewise. + * mips/iris5.h, mips/mips.h, mips/netbsd.h, mips/osfrose.h: Likewise. + + * i960.c (i960_function_epilogue): Don't clear g14 for functions with + an argument block. + (i960_output_reg_insn): Likewise. + (i960_output_call_insn): Clear g14 for functions wtih an argument + block. + +Fri Jul 28 08:43:52 1995 Doug Evans <dje@canuck.cygnus.com> + + * i960.c (i960_arg_size_and_align): Correct alignment of XFmode + values in library calls. + * i960.md (movdi matchers): Support odd numbered regs. + +Fri Jul 28 08:37:25 1995 Michael Gschwind <mike@lanai.vlsivie.tuwien.ac.at> + + * pdp11.md (divhi3, modhi3, divmodhi4): Rewrite. + +Wed Jul 26 10:15:52 1995 Hallvard B Furuseth (h.b.furuseth@usit.uio.no) + + * collect2.c (end_file): Fix typo in error message text. + +Wed Jul 26 09:22:22 1995 Jeff Law (law@snake.cs.utah.edu) + + * xm-pa.h (USE_C_ALLOCA): Always define. + * xm-pahpux.h (USE_C_ALLOCA): Likewise. + + * x-pa (CC): Remove useless definition. + * xm-pa.h (HAVE_STRERROR): Define. + (__BSD_NET2__): Define. + +Wed Jul 26 09:10:25 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * expr.c (preexpand_calls): Don't look past a CLEANUP_POINT_EXPR. + +Wed Jul 26 08:43:42 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * cse.c (cse_insn): When do special handling for (set REG0 REG1), + must delete REG_EQUAL note from insn if it mentions REG0. + + * loop.c (find_and_verify_loops): When moving blocks of code, verify + that the just destination is not in an inner nested loop. + (mark_loop_jump): Don't mark label as loop exit if it jumps to + an inner nested loop. + +Wed Jul 26 08:40:31 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (do_include, read_name_map): Omit leading "./" and + trailing "/" when it makes sense. + (skip_redundant_dir_prefix): New function. + +Wed Jul 26 08:36:41 1995 Michael Meissner <meissner@cygnus.com> + + * stmt.c (emit_nop): Do not emit a nop if there is a single + insn before a label or at the start of a function. + +Wed Jul 26 08:21:21 1995 Doug Evans <dje@cygnus.com> + + * Makefile.in (gfloat.h): Delete previous copy before updating. + +Wed Jul 26 08:18:29 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * Makefile.in (STAGESTUFF): Add stamp-crtS. + (crtbeginS.o, crtendS.o, stamp-crtS): New rules; just like + crtbegin.o et al, but compiled using -fPIC. + * configure (*-*-gnu*): Add crtbeginS.o and crtendS.o to $extra_parts. + +Wed Jul 26 08:11:52 1995 Michael Gschwind <mike@java.vlsivie.tuwien.ac.at> + + * pdp11.md: Fixed typos ('bhos' -> 'bhis'). + +Wed Jul 26 08:05:41 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * hp320.h, m68k.h, m68kv4.h (LEGITIMATE_PIC_OPERAND_P): Reject + CONST_DOUBLE with MEM with invalid pic address. + * reload1.c (real.h): Include it. + * Makefile.in (reload1.o): Depends on real.h. + +Wed Jul 26 07:58:22 1995 Ian Lance Taylor <ian@cygnus.com> + + * gcc.c (MULTILIB_DIRS): Provide default if not defined. + (multilib_defaults): New static variable. + (default_arg): New static function. + (set_multilib_dir): Ignore default arguments. + (print_multilib_info): Ignore entries which use default arguments. + +Tue Jul 25 10:06:09 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000.md (allocate_stack): Don't copy the LR register to + the new stack end. + * rs6000.c (rs6000_stack_info): Correctly store the LR in + the caller's frame, not the current frame, for V.4 calls. + * rs6000/eabi.asm (_save*, _rest*): Provide all mandated V.4 save + and restore functions, except for the save*_g functions which + return the GOT address. + +Fri Jul 21 14:24:25 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/eabi.h (__eabi): Load up r13 to be the small data + pointer, unless -mrelocatable. + + * rs6000/aix3newas.h (LINK_SPEC): Import machine independent + functions if -mcpu=common. + * rs6000/milli.exp: Import file referenced in aix3newas.h. + + * rs6000/eabi.asm (__eabi): Support for fixing up user initialized + pointers when -mrelocatable is used. + * rs6000/eabi.h (ASM_OUTPUT_INT): Record any pointers initialized + by the user if -mrelocatable, to be fixed up by __eabi. + (CONST_SECTION_ASM_OP): If -mrelocatable, put read-only stuff in .data, + not .rodata, to allow user initialized pointers to be updated by __eabi. + + * rs6000.h (TARGET_SWITCHES): Add -mdebug-{stack,arg}. + (TARGET_{ELF,NO_TOC,TOC}): Add defaults for non system V. + (rs6000_stack): New structure to describe stack layout. + (RS6000_{REG_SAVE,SAVE_AREA,VARARGS_*}): New macros used to + support both AIX and V.4 calling sequences. + (FP_ARG_*, GP_ARG_*): Ditto. + (FP_SAVE_INLINE): Ditto. + (STARTING_FRAME_OFFSET): Modify to support both AIX and V.4 + calling sequences. + (FIRST_PARM_OFFSET): Ditto. + (REG_PARM_STACK_SPACE): Ditto. + (STACK_POINTER_OFFSET): Ditto. + (FUNCTION_ARG_REGNO_P): Ditto. + ({,INIT_}CUMULATIVE_ARGS): Ditto. + (LEGITIMATE_LO_SUM_ADDRESS_P): Ditto. + (FUNCTION_ARG{,_ADVANCE,PARTIAL_NREGS,PASS_BY_REFERENCE}): Ditto. + (SETUP_INCOMING_VARARGS): Ditto. + (EXPAND_BUILTIN_SAVEREGS): Ditto. + (CAN_ELIMINATE): Ditto. + (INITIAL_ELIMINATION_OFFSET): Ditto. + (LEGITIMATE_CONSTANT_POOL_{BASE,ADDRESS}_P): Ditto. + (GO_IF_{LEGITIMATE_ADDRESS,MODE_DEPENDENT_ADDRESS}): Ditto. + (LEGITIMIZE_ADDRESS): Ditto. + (CONST_COSTS): Ditto. + (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Ditto. + (ASM_OUTPUT_REG_{PUSH,POP}): Use reg_names to print registers. + (function declarations): Add new rs6000.c function declarations, + and delete decls of deleted functions. + (SHIFT_COUNT_TRUNCATED): Parenthesize the expression. + + * rs6000.c (init_cumulative_args): New function to support AIX + and V.4 calling sequences. + (function_arg{,_advance,partial_nregs,pass_by_reference}): Ditto. + (setup_incoming_varargs): Ditto. + (expand_builtin_saveregs): Ditto. + (rs6000_stack_info): Ditto. + (debug_stack_info): Ditto. + (direct_return): Changes to support AIX and V.4 calling sequences. + (first_reg_to_save): Ditto. + (svr4_traceback): Ditto. + (output_{prolog,epilog}): Ditto. + (print_operand): Use reg_names to print registers. Add support + for V.4 HIGH/LO_SUM address modes. + (must_save_cr): Function deleted, in rewrite of AIX/V.4 calling + sequence support. + (rs6000_sa_size): Ditto. + (rs6000_pushes_stack): Ditto. + (output_toc): Add abort if no toc. + + * rs6000.md (call insns): Add a new argument to flag a V.4 + function needs to set bit 6 of the CR. + (elf_{low,high}): New V.4 functions to create addresses via HIGH + and LO_SUM patterns. + (movsi): Use elf_{low,high} if appropriate. + (mov{si,di}_update): Name these patterns for allocate_stack. + (allocate_stack): Support for V.4 stack layout. + (sync): New pattern for V.4 trampolines to issue the sync + instruction. + + * rs6000/sysv4.h (TARGET_SWTICHES): Add -mcall-{aix,sysv}, and + -mprototype. Remove separate flag bit for -mno-toc. + (SUBTARGET_OVERRIDE_OPTIONS): Don't test for -mno-toc. + (FP_ARG_*): Adjust for V.4 calling sequences. + (RS6000_*): Ditto. + (FP_SAVE_INLINE): Ditto. + (toc_section): Eliminate use of AIX style full TOC. + (TRAMPOLINE_{TEMPLATE,SIZE}): Redefine for V.4 support. + (INITIALIZE_TRAMPOLINE): Ditto. + + * rs6000/eabi.h (CPP_SPEC): Define _CALL_SYSV or _CALL_AIX, + depending on whether -mcall-sysv or -mcall-aix was used. + * rs6000/eabile.h (CPP_SPEC): Ditto. + * rs6000/sysv4le.h (CPP_SPEC): Ditto. + + * rs6000/t-eabigas (MULTILIB_{OPTIONS,DIRNAMES}): Delete no-toc + libraries, explicit big endian libraries. + * rs6000/t-ppcgas (MULTILIB_{OPTIONS,DIRNAMES}): Ditto. + + * rs6000/t-eabiaix: New file for eabi, using -mcall-aix as the + default. + * rs6000/eabiaix.h: Ditto. + + * rs6000/t-eabilegas: New file for eabi on little endian systems. + * rs6000/t-ppclegas: New file for V.4 on little endian systems. + + * rs6000/t-rs6000 (MULTILIB_{OPTIONS,DIRNAMES}): Build libgcc.a + for -mcpu=common. + + * configure (powerpc-*-eabiaix): New configuration for defaulting + to old-style AIX calling sequence. + (powerpcle*): Use new t-{eabi,ppc}legas files, to avoid building + explicit little endian multilib libraries. + +Fri Jul 21 13:23:06 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * toplev.c (main): Don't define sbrk #ifdef __alpha__. + +Tue Jul 18 19:23:44 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (do_include): Prefix -H output lines with spaces, not dots. + (output_dots): Remove. + + * cccp.c (main): cplusplus_comments now defaults to 1. + But clear it if -traditional or the new option -lang-c89 is given. + * gcc.c (default_compilers, cpp): Specify -lang-c89 if -ansi is given. + This turns off C++ comment recognition. + +Tue Jul 18 19:16:38 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * va-sparc.h (va_arg): Add support for 128 bit long double type. + +Tue Jul 18 19:11:18 1995 Jorn Rennecke (amylaar@meolyon.hanse.de) + + * c-common.c (decl_attributes, case A_ALIGNED): Handle is_type + case properly. + +Tue Jul 18 19:03:02 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (fold, case CONVERT_EXPR): Don't merge conversions + if outer is to handle a type with differing precision. + +Mon Jul 17 14:37:35 1995 Pat Rankin (rankin@eql.caltech.edu) + + * vax/vms.h (HAVE_ATEXIT): Define. + (DO_GLOBAL_CTORS_BODY): Don't call atexit; let __do_global_ctors do it. + * vax/xm-vms.h (HAVE_VPRINTF): Define. + +Mon Jul 17 06:41:19 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-typeck.c ({unsigned,signed}_type): Handle intXX_type_node types. + + * xm-alpha.h (sbrk): Add declaration. + + * convert.c (convert_to_integer): If TYPE is a enumeral type or + if its precision is not the same as the size of its mode, + convert in two steps. + + * m68k.md (tstdi, cmpdi): Use match_scratch, not match_operand. + +Fri Jul 14 19:23:42 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * c-decl.c (field_decl_cmp): Rewritten to make sure that a null + name always sorts low against other names. + * c-typeck.c (lookup_field): Change name comparison to match what + field_decl_cmp does. + +Fri Jul 14 18:46:24 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000.md (movsi): Convert a CONST_DOUBLE into a CONST_INT of + the low part. + +Fri Jul 14 18:30:52 1995 Doug Evans <dje@cygnus.com> + + * toplev.c (main): Reword dwarf/c++/-g warning. + +Fri Jul 14 18:19:34 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.h (NO_DEFER_POP): Remove last change. + * expr.c (stor_expr): Force stack adjust before NO_DEFER_POP. + (expand_expr, case COND_EXPR): Likewise. + * stmt.c (expand_start_stmt_expr): Likewise. + +Fri Jul 14 07:58:35 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * function.c (struct temp_slot): New fields base_offset, full_size. + (assign_stack_temp): For !FRAME_GROWS_DOWNWARD, set p->size to size. + Set new fields base_offset and full_size. + (combine_temp_slots): Use new fields base_offset and full_size instead + of slot and size. + + * loop.c (loop_number_exit_count): New global variable. + (loop_optimize): Allocate space for it. + (find_and_verify_loops, mark_loop_jump): Set it. + (strength_reduce, check_dbra_loop): Use loop_number_exit_count + instead of loop_number_exit_labels. + * loop.h (loop_number_exit_count): Declare it. + * unroll.c (find_splittable_{regs,givs}, final_[bg]iv_value): Use + loop_number_exit_count instead of loop_number_exit_labels. + (reg_dead_after_loop): Check loop_number_exit_count, and fail + if the count doesn't match loop_number_exit_labels. + + * cse.c (cse_insn): Ifdef out code that pre-truncates src_folded. + + * sparc.md (sethi_di_sp64): Return null string at end. + + * function.h (struct function): Add stdarg field. + * function.c (current_function_stdarg): New global variable. + (push_function_context_to): Save it. + (pop_function_context_from): Restore it. + (assign_parms): Set it. + (init_function_start): Clear it. + * output.h (current_function_stdarg): Declare it. + * i960.md: Modify all patterns which handle stores to memory to also + check current_function_varargs and current_function_stdarg. + + * reorg.c (fill_simple_delay_slots): When trying to take instruction + from after the branch, don't continue past target label. Local + variables passed_label and target_uses are no longer necessary. + +Thu Jul 13 19:30:04 1995 Jeff Law (law@snake.cs.utah.edu) + + * pa.c (output_bb): Fix error in long backwards branch with + nullified delay slot. + +Thu Jul 13 19:26:13 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * expmed.c (SHIFT_COUNT_TRUNCATED): Use #ifdef not #if. + +Mon Jul 10 20:16:44 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (rescan): Don't address outside of array when + preprocessing C++ comments. + +Mon Jul 10 20:05:46 1995 Michael Meissner <meissner@tiktok.cygnus.com> + + * rs6000.c (expand_block_move): Remove #if 0 conditionals + against using larger block moves. + + * t-rs6000 (EXTRA_PARTS): Copy milli.exp to release dir. + (milli.exp): Copy to build dir from machine dependend dir. + +Mon Jul 10 20:03:29 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + * arm.md (matcher for (shiftable_op (cond-exp) (reg))): If + shiftable_op is minus, then subtract from zero when cond fails. + +Mon Jul 10 19:58:26 1995 John F. Carr <jfc@mit.edu> + + * sparc.h (SELECT_SECTION): Use TREE_CODE_CLASS instead of directly + referencing tree_code_type. + +Mon Jul 10 19:54:31 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * protoize.c (reverse_def_dec_list): Delete const qualifiers from + local variables, and delete casts which were casting away const. + +Mon Jul 10 19:14:39 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-lang.c (finish_file): Add missing parm to start_function call. + + * jump.c (jump_optimize): Pass outer_code arg to rtx_cost. + + * varasm.c (assemble_name, bc_assemble_integer): Call + bc_emit_labelref with proper args. + + * function.c (setjmp_args_warning): Remove bogus arg. + +Mon Jul 10 18:20:54 1995 Fergus Henderson (fjh@cs.mu.oz.au) + + * gcc.c (p{fatal,error}_with_name, perror_exec): Quote filename. + +Mon Jul 10 18:12:51 1995 Gran Uddeborg (uddeborg@carmen.se) + + * i386/iscdbx.h (STARTFILE_SPEC): Handle -Xp. + +Wed Jul 5 02:42:17 1995 Per Bothner (bothner@spiff.gnu.ai.mit.edu) + + * cpphash.h (enum node_type): Remove unneeded and non-standard + forward declaration. + +Sat Jul 1 20:15:39 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * mips/t-mips, mips/t-mips-gas (MULTILIB_*, LIBGCC, INSTALL_LIBGCC): + Delete. + + * sparc/sol2.h (LINK_SPEC): Revert March 16 change. Do not add -R + for each -L. + + * collect2.c (libcompare): Verify that file name extensions are valid. + Put files with invalid extensions last in the sort. + + * integrate.c (integrate_decl_tree): Set DECL_ABTRACT_ORIGIN before + pushdecl call for local variables. + +Sat Jul 1 08:13:38 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + * cpplib.c (output_line_command): If not emitting #line directives + delay returning until after adjust_position has been called. + + * arm.md (mov{si,sf,df}cc): Call gen_compare_reg to generate + the condition code register. + +Sat Jul 1 06:55:09 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (decode_field_reference): New parm PAND_MASK. + (unextend): New parm MASK. + (fold_truthop): Pass new parms to decode_field_reference and unextend. + + * va-alpha.h (__va_tsize): Use __extension__ to avoid warning + on use of `long long'. + + * expr.h (NO_DEFER_POP): Do any pending stack adjusts. + + * recog.c (register_operand): Disallow subreg of reg not allowed to + change size. + +Thu Jun 29 05:51:57 1995 Jeff Law (law@snake.cs.utah.edu) + + * pa.md (reload addsi3): New pattern to avoid reload lossage + with register eliminations. + + * pa.c (output_cbranch): When checking for a jump to the given + insn's delay slot, handle the case where JUMP_LABEL for the + given insn does not point to the first label in a series of + labels. + (output_bb, output_dbra, output_movb): Likewise. + +Wed Jun 28 18:04:56 1995 Jeff Law (law@snake.cs.utah.edu) + + * pa.h (PIC_OFFEST_TABLE_REGNUM_SAVED): Define to %r4. + (CONDITIONAL_REGISTER_USAGE): Make it fixed when compiling + PIC code. + (INIT_EXPANDERS): Delete. + * pa.c (hppa_save_pic_table_rtx): Delete variable. + (hppa_expand_prologue): For PIC generation, copy the PIC + register into a fixed callee register at the end of the + prologue of non-leaf functions. + * pa.md (call expanders): Reload the PIC register from the + fixed callee saved register. Don't try to save the PIC + register before the call. + +Wed Jun 28 18:01:14 1995 Stan Cox (coxs@dg-rtp.dg.com) + + * m88k/dguxbcs.h (ASM_SPEC): Removed -h flag. + * m88k/dgux.h (ASM_SPEC): Likewise. + +Wed Jun 28 17:01:58 1995 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.c (processor_target_table): Remove CPU name synonyms. + * rs6000.h (CPP_SPEC): Likewise. + * rs6000/sysv4.h (CPP_SPEC): Likewise. + (ASM_SPEC): Likewise. + * rs6000/sysv4le.h (CPP_SPEC): Likewise. + * rs6000/eabile.h (CPP_SPEC): Likewise. + * rs6000/powerpc.h (CPP_SPEC): Likewise. + (ASM_SPEC): Set assembler target according to compiler target. + * rs6000/aix3newas.h (CPP_SPEC): Likewise. + (ASM_SPEC): Likewise. + * rs6000/aix41.h (CPP_SPEC): Likewise. + (ASM_SPEC): Likewise. + +Wed Jun 28 16:25:53 1995 Gran Uddeborg (uddeborg@carmen.se) + + * i386/x-isc3 (INSTALL_HEADERS_DIR): Delete; done by configure. + +Wed Jun 28 16:10:47 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * xm-rs6000.h (alloca): Extern decl added for non-GNU compiler. + +Wed Jun 28 11:31:30 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cpplib.c (progname): Remove definition from here. + + * final.c (final_scan_insn): Fix error in last change. + + * rtlanal.c (reg_set_p_1): Now static; add extra parm. + + * stmt.c: Delete redundant forward decls. + (expand_anon_union_decl): Correctly call expand_decl. + + * toplev.c (strip_off_ending): Strip off any ending; don't + pretend we know what valid endings are. + + * svr4.h (ASM_OUTPUT_SECTION_NAME): Don't crash if DECL is null. + + * rs6000.md ({load,store}_multiple): Don't use indirect_operand + in define_insn; use explicit MEM of register_operand instead. + +Tue Jun 27 11:42:56 1995 Stephen L Moshier <moshier@world.std.com> + + * i386/i386.c (print_operand, case `J'): Use jns for GE and js for + LT. + +Tue Jun 27 07:58:55 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * expr.c (expand_expr, TARGET_EXPR): Only use original_target + if !ignore. + +Tue Jun 27 07:27:26 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (fold_truthop): Commute unextend and convert on + l_const and r_const. + + * c-common.c (decl_attributes, case A_CONSTRUCTOR, A_DESTRUCTOR): + Set TREE_USED. + + * final.c (final_scan_insn): Don't call alter_cond unless + condition is on cc0. + + * stmt.c (expand_asm_operands): Handle input operands that may not + be in a register. + +Mon Jun 26 19:23:05 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + * arm/lib1funcs.asm (L_dvmd_tls): Renamed from L_divmodsi_tools. + * arm/t-semi (LIB1ASMFUNCS): Rename _dvmd_tls from _divmodsi_tools. + +Mon Jun 26 19:18:06 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * unroll.c (find_splittable_regs): When completely unrolling loop, + check for non-invariant initial biv values. + +Mon Jun 26 19:13:54 1995 Gran Uddeborg <uddeborg@carmen.se> + + * configure (i[345]86-*-isc*): Fix misspelled "rfile" to "ifile". + +Mon Jun 26 18:58:22 1995 Mike Stump <mrs@cygnus.com> + + * expr.c (expand_expr, case COND_EXPR): Protect the condition from + being evaluated more than once. + (do_jump, case TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR): Likewise. + +Mon Jun 26 18:52:36 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * fixincludes (string.h): Fix return value for mem{ccpy,chr,cpy,set} + and str{len,spn,cspn} on sysV68. + +Mon Jun 26 06:54:50 1995 Michael Meissner (meissner@cygnus.com) + + * i386/osfrose.h (LONG_DOUBLE_TYPE_SIZE): Go back to making long + double == double. + +Thu Jun 22 19:14:41 1995 Pat Rankin (rankin@eql.caltech.edu) + + * make-cc1.com (if DO_LINK): Skip c-parse.* processing when + only relinking. + (gas_message): Update to reflect current version, and give + a different message if/when no version of gas is found.xo + +Thu Jun 22 18:52:37 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + * arm/lib1funcs.asm (___modsi3): Correctly set SIGN register for + modulo involving negative numbers. + +Thu Jun 22 18:32:27 1995 Uwe Seimet (seimet@chemie.uni-kl.de) + + * xm-atari.h (HZ): Now 100 and don't define if already defined. + +Thu Jun 22 18:26:12 1995 Jeffrey A Law (law@snake.cs.utah.edu) + + * calls.c (expand_call): Correctly handle returning BLKmode + structures in registers when the size of the structure is not + a multiple of word_size. + * stmt.c (expand_return): Likewise. + + * pa-gux7.h (LIB_SPEC): Undefine before redefining. + * pa-hpux.h (LIB_SPEC): Likewise. + * pa-hpux7.h (LIB_SPEC): Likewise. + + * genmultilib: Work around hpux8 /bin/sh case bug. + + * pa.h (LIB_SPEC): Define to avoid -lg. + +Thu Jun 22 18:19:09 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * expr.c (expand_expr, TARGET_EXPR): Use original_target. + + * collect2.c (locatelib): Fix parsing of LD_LIBRARY_PATH. + +Thu Jun 22 18:15:54 1995 Paul Eggert <eggert@twinsun.com> + + * configure: Create an empty Makefile.sed first, to work + around a Nextstep 3.3 bug. + +Thu Jun 22 18:03:44 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Makefile.in (STAGESTUFF): Add stamp-crt. + (crtbegin.o, crtend.o): Now depend on stamp-crt. + (stamp-crt): New rule, to actually build crt{begin,end}.o. + + * collect2.c (main): Unlink export_file before we return. + +Thu Jun 22 14:25:56 1995 Michael Meissner (meissner@cygnus.com) + + * rs6000.h (STRIP_NAME_ENCODING): Store NAME and strlen(NAME) into + local variables; cast result of alloca to avoid compiler warnings. + +Tue Jun 20 18:25:29 1995 Douglas Rupp (drupp@cs.washington.edu) + + * alpha/config-nt.sed, i386/config-nt.sed: Edit to add + a missing $(exeext) for CCCP. + +Tue Jun 20 18:18:00 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * protoize.c (default_include): Use name and two ints to be + compatible with definition of INCLUDE_DEFAULTS. + +Mon Jun 19 19:24:29 1995 Ted Lemon <mellon@toccata.fugue.com> + + * mips/netbsd.h (ASM_DECLARE_FUNCTION_NAME): Don't emit function label. + +Mon Jun 19 18:34:55 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * fixincludes: Don't define wchar_t under C++. + +Mon Jun 19 17:12:41 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (collect_expansion): Work around enum bug in vax + ultrix 4.3 pcc. + * tree.c (simple_cst_equal): Likewise. + +Mon Jun 19 16:53:00 1995 Douglas Rupp (drupp@cs.washington.edu) + + * winnt/spawnv.c: New file. + +Mon Jun 19 16:30:29 1995 Glenn Brown <glenn@mars.myri.com> + + * caller-save.c (save_call_clobbered_regs): If AUTO_INC_DEC, mark + register indicated by REG_INC notes as live so they will be saved. + +Mon Jun 19 16:21:12 1995 Jeffrey A Law (law@snake.cs.utah.edu) + + * pa.h (PRINT_OPERAND_ADDRESS, case LOW_SUM): Fix logic bug + in last change. + +Mon Jun 19 14:11:49 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * integrate.c (integrate_decl_tree): Only set DECL_ABSTRACT_ORIGIN + if the decl returned by pushdecl is the one we started with. + + * mips.h (current_function_name): Delete declaration. + (ASM_DECLARE_FUNCTION_NAME): Don't set current_function_name. + * gnu.h (ASM_DECLARE_FUNCTION_NAME): Likewise. + * mips.c (current_function_decl): Delete declaration. + (function_prologue): New variable fnname. Use it instead of + current_function_name. + (function_epilogue): Likewise. + +Mon Jun 19 13:13:15 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * alpha.h (ASM_OUTPUT_ASCII): Always reset line count when + starting new line. + + * scan-decls.c (scan_decls): Fix typo when resetting PREV_ID_START. + + * i386/config-nt.sed, alpha/config-nt.sed: Change version to 2.7.1. + +Mon Jun 19 13:06:14 1995 DJ Delorie (dj@delorie.com) + + * msdos/top.sed: Support new build variables. + * msdos/configur.bat: Make options.h and specs.h. + Change realclean to maintainer-clean. + +Fri Jun 16 06:54:03 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Version 2.7.0 Released. + + * obstack.c: Always enable this code for now. + + * alpha.c (alpha_builtin_saveregs): Use ptr_mode and conversions + when need so works for both OSF and NT. + * va-alpha.h (__va_tsize): Round to long long not long. + +Thu Jun 15 17:54:52 1995 Bdale Garbee <bdale@gag.com> + + * configure (a29k-*-coff): Synonym for a29k-*-udi. + +Thu Jun 15 17:51:21 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * function.c (assign_parms): Do all conversions in CONVERSION_INSNS. + +Thu Jun 15 17:36:49 1995 Michael Meissner <meissner@cygnus.com> + + * reg-stack.c (record_reg_life): Call record_reg_life_pat with 0 + for douse argument so that USE's created to mark variables within + blocks don't get marked as set. + +Thu Jun 15 06:28:15 1995 Dennis Glatting (dennisg@CyberSAFE.COM) + + * configure: Change one sed command to work around m68k-next bug. + +Wed Jun 14 22:14:39 1995 Jason Merrill <jason@deneb.cygnus.com> + + * collect2.c (main): Don't turn off auto_export because of -g. + (main): Ignore the argument to -o. + + * alpha.h (LINK_SPEC): Don't pass -init __main anymore. + * alpha/osf12.h (LINK_SPEC): Ditto. + * mips/iris5.h (LINK_SPEC): Ditto. + + * collect2.c (main): Place o_file after an initial .o (like crt0.o). + If we have LD_INIT_SWITCH, use init and fini functions for + executables, too. Specify the unique function names. + (write_c_file_stat): Fix the case of destructors but no constructors. + Don't include the generic-named functions for executables. + (write_c_file): If we have LD_INIT_SWITCH, always use + write_c_file_stat. + + * collect2.c (main): Also add _GLOBAL__D? to export list. + + * ginclude/iso646.h: Do nothing if compiled as C++. + +Wed Jun 14 17:39:10 1995 Roland McGrath (roland@gnu.ai.mit.edu) + + * c-common.c (format_char_info, case 'm'): Set type to void. + (check_format_info): If type is void, ignore operand. + +Wed Jun 14 17:04:10 1995 Paul F. Kunz (Paul_Kunz@SLAC.Stanford.EDU) + + * expr.c (expand_builtin_apply_args): Put back original + register save and restore order. + +Wed Jun 14 16:56:22 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/eabi.h (INVOKE__main): Define, so __eabi is called after + main's arguments are saved. + + * rs6000.c (output_prolog): Don't call __eabi here, let + compiler call it after the arguments to main are saved. + (output_{prolog,epilog}): Don't use functions under V.4 to save + and restore floating point registers. + +Wed Jun 14 16:52:12 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k/mot3300.h (PCC_BITFIELD_TYPE_MATTERS): Defined. + +Wed Jun 14 16:48:53 1995 Jerry Frain (jerry@tivoli.com) + + * Makefile.in (stage[1-4]): Correctly link `as', `ld', and `collect2'. + +Wed Jun 14 05:52:04 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * objc-act.c (hack_method_prototype): Set DECL_CONTEXT of parms. + + * expmed.c (emit_store_flag): Always set LAST. + + * c-decl.c (start_function): New parameter for attributes. + * c-tree.h (start_function): Likewise. + * c-lang.c (finish_file): Pass extra parm to start_function. + * objc-act.c (build_module_descriptor, really_start_method): Likewise. + * c-parse.in (fndef, nested_function, notype_nested_function): + Likewise. + + * function.c (assign_parms): Use convert_to_mode instead of + gen_lowpart when converting incoming parm. + +Tue Jun 13 19:10:32 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * rs6000.md (decrement_and_branch): Finish last fix; update matching + constraint. + +Tue Jun 13 18:32:51 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> + + * fold-const.c (fold): When converting a COND_EXPR to an ABS_EXPR, + get the types right for ABS_EXPR to work. + +Mon Jun 12 17:09:55 1995 Michael Tiemann (tiemann@axon.cygnus.com) + + * reorg.c (fill_simple_delay_slots): Set MAYBE_NEVER according to + code of TRIAL_DELAY, not TRIAL. + +Mon Jun 12 15:02:37 1995 Doug Evans <dje@cygnus.com> + + * configure: Restore code to make ld symlink if ! use_collect2. + + * gcc.c (link_command_spec): Undo patch of May 11. + -nostdlib implies -nostartfiles again. + * dsp16xx.h (CROSS_LINK_SPEC): Likewise. + * i386/freebsd.h (LINK_SPEC): Undo patch of May 24. + Don't pass "-e start" if nostdlib. + * i386/sun.h (LINK_SPEC): Likewise. + * m68k/sun2o4.h (LINK_SPEC): Likewise. + * m68k/sun3.h (LINK_SPEC): Likewise. + * m68k/vxm68k.h (LINK_SPEC): Likewise. + * mips/netbsd.h (LINK_SPEC): Likewise. + * config/netbsd.h (LINK_SPEC): Likewise. + * rs6000/mach.h (LINK_SPEC): Likewise. + * sparc.h (LINK_SPEC): Likewise. + * sparc/vxsparc.h (LINK_SPEC): Likewise. + + * gcc.c (link_command_spec): New argument -nodefaultlibs. + +Sun Jun 11 20:47:53 1995 Stephen L Moshier (moshier@world.std.com) + + * Makefile.in (fix-header.o): Depends on xsys-protos.h. + +Sun Jun 11 15:07:58 1995 Tim Carver (timc@ibeam.intel.com) + + * reload1.c (emit_reload_insns): Don't call HARD_REGNO_NREGS + on psuedo when clearing reg_last_reload_reg. + +Sun Jun 11 14:07:05 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.md ({add,sub}di{_mem,3}): Patterns merged. + +Sun Jun 11 13:43:26 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> + + * m68k.md (cmpdi matcher): Set cc_status before returning. + + * config/xm-freebsd.h (DONT_DECLARE_SYS_SIGLIST): Define. + +Sun Jun 11 13:38:49 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * fixincludes (math.h): Keep declaration of abs on HPUX. + +Sun Jun 11 12:31:42 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stor-layout.c (variable_size): Do nothing if SIZE is constant. + + * stmt.c (expand_asm_operands): See if output operand permits + register. If not, mark output addressable, call expand_operand + on it, and give error if not MEM. + + * function.c (assign_parms): Handle promotions of both + passed and nominal modes separately and insert needed conversions. + (promoted_input_arg): Return 0 if nominal and passed modes differ. + + * stmt.c (all_cases_count, case INTEGER_TYPE): Fix typo in checking + for integer bounds. + +Sat Jun 10 08:55:25 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * libgcc2.c (_floatdidf): Correctly set float sizes. + + * c-decl.c (c_decode_option, case "-Wall"): Don't set extra_warnings. + + * Makefile.in (cpplib.o, fix-header.o): Update dependencies. + (cpperror.o, cppexp.o, cpphash.o): New rules, to show .h dependencies. + +Fri Jun 9 18:06:10 1995 Doug Evans <dje@canuck.cygnus.com> + + * cse.c (cse_basic_block): Fix test for whether block ends with a + barrier. Return next insn, not 0, if block ends in a barrier. + +Fri Jun 9 17:58:29 1995 Paul Eggert <eggert@twinsun.com> + + * fold-const.c (lshift_double): Replace `&' with `%' to fix typo. + ([lr]shift_double): Truncate shift count only if SHIFT_COUNT_TRUNCATED. + Remove unnecessary `count >= prec' test. + + * cexp.y (left_shift): Ignore integer overflow. + + * cexp.y (skip_evaluation): New variable. + (&&, ||, ?:): Increment it in unevaluated subexpressions. + (/, %, integer_overflow): Suppress diagnostics if skip_evaluation != 0. + (yyerror): Clear skip_evaluation. + +Fri Jun 9 17:49:05 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> + + * m68k.md (tstdi): Rewrite. + +Fri Jun 9 17:28:55 1995 Per Bothner <bothner@cygnus.com> + + * scan-decls.c (scan_decls): Handle declarations with + multiple comma-separated declarators. + +Thu Jun 8 19:16:12 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + * arm.md (mov[sd]f expands): Don't allow fp constants in pseudos + when TARGET_SOFT_FLOAT. + +Thu Jun 8 19:11:43 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * expmed.c (store_split_bit_field): When adjust arg in + BYTES_BIT_ENDIAN case, use number of bits in arg for MEM operands + and BITS_PER_WORD for other operands. + (extract_fixed_bit_field): Undo last change. + + * unroll.c (verify_addresses): New function. + (find_splittable_givs): Use it instead of memory_address_p. + +Thu Jun 8 18:58:18 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> + + * expmed.c (expand_divmod): Always check result of emit_store_flag. + +Thu Jun 8 12:02:34 1995 David D Zuhn (zoo@armadillo.com) + + * cpplib.c (cpp_push_buffer): Include filename in error message. + +Thu Jun 8 11:53:45 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * function.c (assign_parms): Don't call promote_mode on arg + unless PROMOTE_FUNCTION_ARGS defined. + + * rs6000.md (decrement_and_branch): Ensure label is operand 0. + + * rs6000.md (aux_truncdfsf2): New pattern. + (movsf): Use it instead of invalid SUBREG and truncdfsf2. + + * varasm.c (assemble_name): Disable warn_id_clash around + get_identifier call. + +Wed Jun 7 17:22:25 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * configure (gdb_needs_out_file_path): New variable. + (m68k-motorola-sysv): Set gdb_needs_out_file_path if not using gas. + (.gdbinit): If gdb_needs_out_file_path is set, add a 'dir' command + for $(out_file). + +Wed Jun 7 17:17:19 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> + + * fold-const.c (fold): When folding `<' type nodes, make true_value + and false_value have correct types. + +Wed Jun 7 05:06:42 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * collect2.c (COFF scan_prog_file): Use the AIX duplicate entry. + +Tue Jun 6 18:43:09 1995 Jeffrey A Law (law@snake.cs.utah.edu) + + * pa.h (FUNCTION_ARG_CALLEE_COPIES): Define. + +Tue Jun 6 18:21:18 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (expand_expr, case PLACEHOLDER_EXPR): Consider two types + identical if their TYPE_MAIN_VARIANTs are the same. + + * c-decl.c (start_decl): Set DECL_COMMON before calling + decl_attributes. + + * a29k.c (print_operands): Cast args to bcopy to char *. + + * c-decl.c (duplicate_decls): Don't clear DECL_CONTEXT of + new decl if it is a function. + +Tue Jun 6 17:57:44 1995 Eberhard Mattes (mattes@azu.informatik.uni-stuttgart.de) + + * gcc.c (do_spec_1, case 'g'): Handle %O as suffix if MKTEMP_EACH_FILE. + +Tue Jun 6 17:53:05 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000.c (expand_block_move): Update source and destination pointers + inside the loop moving the bytes, not outside. + +Tue Jun 6 14:58:37 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * m68k.h (CONDITIONAL_REGISTER_USAGE): Don't mark pic reg as fixed. + * m68k.c (finalize_pic): Emit USE insn at start and end of function. + +Tue Jun 6 13:46:57 1995 Jim Wilson <wilson@mole.gnu.ai.mit.edu> + + * sh.c (print_operand): Check for annulled branches. + (output_movedouble): Handle SUBREG addresses. + (output_branch): Handle annulled branches. + (sh_expand_prologue): Correct number of saved registers for + varargs functions. + * sh.h: Add some comments. + * sh.md: Add some comments. Cleanup formatting. + (type attribute): Add pstore and call. + (return define_delay): Reorganize to make clearer. + (call/sfunc define_delay): Define. + (cbranch define_delay): Define to have annul-true delay slot. + (subsi3): Use arith_reg_operand for operand 2. + (shift patterns): Use const_int_operand instead of immediate_operand + for shift counts. + (push): Add pstore constraint case. + (movsi_i): Move t/z constraint pair to the front of the list. + (calli, call_valuei): Add "call" attribute. + +Mon Jun 5 19:23:13 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * sched.c (attach_deaths): In last change, use find_reg_note instead + of find_regno_note. + +Mon Jun 5 19:17:31 1995 Tom Quiggle (quiggle@lovelace.engr.sgi.com) + + * mips/iris5.h (MACHINE_TYPE): Say "IRIX 5.x", not "5.0". + (NO_DOLLAR_IN_LABEL): Undefine. + * mips.h (sdb_begin_function_line): New declaration. + (PUT_SDB_FUNCTION_END): New definition. + +Mon Jun 5 18:56:10 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000.c (expand_block_move): Don't do block moves where we clobber + fixed numbers of regs, instead move just 1-8 bytes at a time. + + * Makefile.in (STAGESTUFF): Copy files produced by -da and + -save-temps to the stage subdirectories. + +Mon Jun 5 08:18:46 1995 Torbjorn Granlund <tege@bozo.matematik.su.se> + + * combine.c (reg_dead_at_p): When scanning backwards, stop at BARRIER. + + * m68k.c (print_operand): Handle 'R' for registers. + * m68k.md (cmpdi): Rewrite to avoid bogus matching constraints. + + * optabs.c (expand_binop): In last change, don't defererence TARGET + if it is 0. + + * pa.md (movsicc): Use MATCH_DUP for operand 4 and 5. + +Mon Jun 5 08:14:56 1995 Jeffrey A Law (law@cs.utah.edu) + + * pa.c (hppa_encode_label): Allocate stuff on permanent_obstack + rather than via malloc. + + * c-common.c (decl_attributes): Fix typo in size passed to alloca. + +Mon Jun 5 08:10:55 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.md: Use "some_operand" for patterns valid only during + reload and meant to handle adding more PLUS operators during + register elimination. + +Mon Jun 5 07:31:53 1995 Stephen L Moshier (moshier@world.std.com) + + * cse.c (simplify_unary_operation, case FLOAT, UNSIGNED_FLOAT): + Truncate to requested mode. + +Sat Jun 3 22:08:51 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * sched.c (attach_deaths): Don't add a REG_DEAD note if a REG_UNUSED + note is already present. + +Sat Jun 3 18:36:57 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * pa.h (hppa_builtin_saveregs): Add declaration. + +Sat Jun 3 18:11:26 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * Makefile.in (scan-decls.o): Depends on cpplib.h. + +Fri Jun 2 19:23:47 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * optabs.c (expand_binop): Don't use non-REG TARGET in 2-word case. + +Thu Jun 1 19:30:30 1995 Tor Egge (tegge@flipper.pvv.unit.no) + + * m88k.h (RETURN_POPS_ARGS): New argument. + * m88k/dolphin.ld: Added start of comment. + +Thu Jun 1 19:12:28 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * configure (a29k-*-bsd*): Fix typo in last change. + +Thu Jun 1 18:51:53 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * expmed.c (extract_fixed_bit_field): For REG case, compute total_bits + from mode instead of assuming BITS_PER_WORD. + +Thu Jun 1 18:34:31 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000.h (FIXED_R13): Default to 0. + ({FIXED,CALL_USED}_REGISTERS): Use FIXED_R13 for register 13. + * sysv4.h (FIXED_R13): Define to be 1. + +Wed May 31 20:57:26 1995 Torbjorn Granlund <tege@matematik.su.se> + + * m68k.md ([su]mulsi3_highpart): Pass correct number of arguments to + const_uint32_operand. + * m68k.c (const_uint32_operand): Reject negative numbers. + + * expmed.c (expand_mult_highpart): Use wide_op1 for all multiplies. + (expand_divmod): Undo Nov 12 change. Instead, add special case + for division by MIN_INT in signed TRUNC_DIV_EXPR case. + +Wed May 31 20:44:21 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.md (one_cmpldi2): New pattern. + ({a,l}shrdi{3,_const}): Allow 63 as shift count. + +Wed May 31 14:56:31 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * varasm.c (assemble_start_function, assemble_variable): + Make sure first_global_object_name is in permanent obstack. + + * reload1.c (alter_reg): Clean up setting of RTX_UNCHANGING_P + when making a MEM. + + * reorg.c (struct resources): New field unch_memory. + (CLEAR_RESOURCES, mark_target_live_regs, dbr_schedule): Clear it. + (mark_{referenced,set}_resources, redundant_insn): Set it. + (fill_simple_delay_slots): Likewise. + (resource_conflicts_p): Test it. + + * unroll.c (copy_loop_body): Fix typo in call to sets_cc0_p. + + * integrate.c (output_inline_function): Don't call expand_function_end. + + * calls.c (prepare_call_address): Only call use_reg on + static_chain_rtx if it is a REG. + + * configure (a29k-*-bsd*): Use t-a29k. + * t-a29k: New file. + * a29k/t-a29kbare (LIBGCC1_TEST): New null definition. + * a29k/t-vx29k (LIBGCC1_TEST): Likewise. + +Wed May 31 14:17:42 1995 Jeffrey A Law (law@snake.cs.utah.edu) + + * configure (hppa*-*-bsd*): Do not run fixincludes. + (hppa*-*-osf*): Likewise. + (hppa*-*-lites*): Likewise. + + * pa.h (PRINT_OPERAND_ADDRESS): Use "RR'" rather than "R'" for + symbolic addresses. + * pa.md (symbolic HIGH patterns): Likewise. + (symbolic LO_SUM pattern): Likewise. + +Wed May 31 14:11:53 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000.md (all movstri recognizers): Eliminate updating the pointers. + * rs6000.c (expand_block_move): Don't pass argument of # bytes to + increment pointers by to movstrsi expanders. + + * rs6000.c (rs6000_override_options): Fix typo with -mstring handling. + + * rs6000.h (TARGET_SWITCHES): Set MASK_STRING_SET explicitly + if -mno-string, so that it can override the processor default. + +Wed May 31 07:31:53 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * c-common.c (truthvalue_conversion, BIT_AND_EXPR): Make sure that + the result has boolean_type_node. + +Tue May 30 19:03:21 1995 J.T. Conklin <jtc@cygnus.com> + + * stddef.h: Undefine _BSD_XXX_T_ if _GCC_XXX_T is defined on BSD + Net/2 derived systems. + +Tue May 30 08:17:37 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.md (decrement_and_branch_until_zero): Operand 0 constraint + changed from "+g" to "+d*am". + (similar anonymous HImode pattern): Likewise. + + * m68k.md (tstdi): Use tst/subx #0 instead of neg/negx. + Allow "a" and ">" for operand 0. + +Mon May 29 19:24:43 1995 Niklas Hallqvist (niklas@appli.se) + + * m68k.md (addsi_lshrsi_31): Use match_dup, not constraint "1", + for matching inputs. + +Mon May 29 12:39:58 1995 Allen Briggs <briggs@rrinc.com> + + * i386/isc.h ({STARTFILE,LIB,CPP}_SPEC): Handle -Xp like -posix. + * i386/x-isc3 (X_CFLAGS): Add -Xp. + +Mon May 29 12:28:41 1995 J.T. Conklin (jtc@cygnus.com) + + * configure (sparc-*-netbsd): Add missing asterisk at end. + +Mon May 29 08:55:48 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * combine.c (recog_for_combine): New parm PADDED_SCRATCHES; set it. + (try_combine): Accumulate number of scratches and update max_scratch. + (simplify_set): Add extra parm to recog_for_combine. + + * romp.md (call): Put USE for r0 in CALL_INSN; call call_internal + to emit insn. + (call_internal): New name for anonymous call. + (call_value, call_value_internal): Likewise. + + * winnt/xm-winnt.h: Protect most definitions with #ifndef. + * alpha/xm-winnt.h: Include alpha/xm-alpha.h, then winnt/xm-winnt.h. + (POSIX): Undefine. + * xm-alpha.h: Don't include alloca.h for winnt. + +Sun May 28 18:34:01 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * configure: Make sed commands more uniform. + + * Makefile.in: Properly use $(srcdir) for files that have it + in their reference as a target of a rule. + (libgcc1.a): Add missing RANLIB_TEST use. + + * stmt.c (expand_computed_goto): Call do_pending_stack_adjust. + +Sun May 28 18:08:41 1995 Torbjorn Granlund <tege@mole.gnu.ai.mit.edu> + + * m68k.md (divmodhi4, udivmodhi4): Use "dmsK" for operand 2. + +Fri May 26 17:01:22 1995 Paul Eggert <eggert@twinsun.com> + + * fixincludes: Fix bogus recursive <stdlib.h> in NEWS-OS 4.0C. + +Fri May 26 08:02:14 1995 Michael Meissner (meissner@cygnus.com) + + * c-typeck.c (initializer_constant_valid_p): For the CONSTRUCTOR + case, if the type is a record, recurse, just like for unions. + +Thu May 25 07:56:14 1995 Paul Eggert <eggert@twinsun.com> + + * fixincludes: Add `sel', `tahoe', `r3000', `r4000' to the + list of pre-ANSI symbols that need to be surrounded with __ __. + Allow white space between `#' and `if' when looking for lines to patch. + + * objc/sarray.h (PRECOMPUTE_SELECTORS, struct soffset): + Use #ifdef __sparc__, not sparc. + + * m68k.md (addsi_lshrsi_31, ashldi_const, ashrdi_const, lshrdi_const): + Replace `mov' with `move'. + +Thu May 25 07:35:37 1995 Allen Briggs <briggs@rrinc.com> + + * libgcc2.c (L_eh, i386): Remove in-line comments in assembly + code--the '#' character is not valid for the SYSV as. + +Thu May 25 07:28:54 1995 Pat Rankin (rankin@eql.caltech.edu) + + * Makefile.in (BC_ALL): Restore it from May 22 change; vms uses it. + (STAGESTUFF): Use it. + +Thu May 25 07:11:56 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.c (alpha_emit_set_const): Don't call expand_binop for + other than add if SImode and can't create pseudos. + +Wed May 24 21:38:24 1995 Jim Wilson <wilson@cygnus.com> + + * sched.c (reemit_notes): New function. + (schedule_block): Call reemit_notes twice. Reorganize code for + handling SCHED_GROUP_P insns, so that reemit_notes works. + + * sh/sh.c (shiftcosts, genshifty_op): Add SH3 support. + * sh/sh.md (ashlsi3, lshrsi3): Add SH3 support. + (ashlsi3_d, ashrsi3_d, lshrsi3_d): New patterns for SH3. + (ashrsi2_31): Remove r/!r constraint. + +Wed May 24 17:00:47 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * tree.c (type_list_equal): Call simple_cst_equal before checking + types. + +Wed May 24 16:49:49 1995 Douglas Rupp (drupp@cs.washington.edu) + + * Makefile.in (libgcc2.a): Handle case of separate srcdir. + +Wed May 24 16:22:01 1995 Paul Eggert <eggert@twinsun.com> + + * configure: Define $(MAKE) if `make' doesn't. + +Wed May 24 15:50:51 1995 Doug Evans <dje@cygnus.com> + + * dsp16xx.h (CROSS_LINK_SPEC): ENDFILE_SPEC moved to -nostartfiles. + * i386/freebsd.h (LINK_SPEC): Don't pass "-e start" if nostartfiles + rather than nostdlib. + * i386/sun.h (LINK_SPEC): Likewise. + * m68k/sun2o4.h (LINK_SPEC): Likewise. + * m68k/sun3.h (LINK_SPEC): Likewise. + * m68k/vxm68k.h (LINK_SPEC): Likewise. + * mips/netbsd.h (LINK_SPEC): Likewise. + * config/netbsd.h (LINK_SPEC): Likewise. + * rs6000/mach.h (LINK_SPEC): Likewise. + * sparc.h (LINK_SPEC): Likewise. + * sparc/vxsparc.h (LINK_SPEC): Likewise. + + * m88k/m88k.h (FUNCTION_ARG_BOUNDARY): Use GET_MODE_BITSIZE. + +Wed May 24 15:44:04 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * fold-const.c (fold): Make sure that a folded TRUTH_NOT_EXPR + retains the same type. + + * c-common.c (truthvalue_conversion): Also accept TRUTH_NOT_EXPR. + +Wed May 24 15:41:51 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cplus-dem.c (strstr, strncmp, strlen): Remove declarations. + + * tree.c (type_list_equal, simple_cst_list_equal, index_type_equal): + Check for simple_cst_equal return value of -1. + +Wed May 24 10:05:24 1995 Michael Meissner <meissner@cygnus.com> + + * libgcc1-test.c (start, _start): Provide declarations, so that + the GNU linker doesn't give a warning message about defaulting the + start address. + + * rs6000/sysv4.h (STRIP_NAME_ENCODING): Redefine back to the + original defination, rather than the defination used in rs6000.h. + (ASM_OUTPUT_SOURCE_LINE): Use STRIP_NAME_ENCODING. + * rs6000.h (STRIP_NAME_ENCODING): Skip leading '*'. + + * rs6000.h (MASK_STRING_SET, TARGET_STRING_SET): Add target + flags bit for whether -mstring was actually used. + (TARGET_SWITCHES): Add MASK_STRING to all power targets. Set + MASK_STRING_SET for -mstring and -mno-string. + (TARGET_DEFAULT): Add MASK_STRING. + + * rs6000.c (rs6000_override_options): Add MASK_STRING to + all power targets. Make an explicit -mstring/-mno-string override + the -mcpu=processor default. + + * rs6000/eabile.h (CPP_SPEC): Copy from sysvle.h to provide the + appropriate little endian defaults. + + * rs6000/sysv4.h (ASM_OUTPUT_SOURCE_LINE): Use assemble_name to + output the canonical name. + +Wed May 24 01:21:15 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * rs6000.h (STRIP_NAME_ENCODING): Define. + (RS6000_OUTPUT_BASENAME): Use it. + +Tue May 23 19:54:21 1995 Doug Evans <dje@cygnus.com> + + * gcc.c (link_command_spec): Move ENDFILE_SPEC from -nostdlib + to -nostartfiles. + +Tue May 23 17:01:50 1995 Jim Wilson <wilson@cygnus.com> + + * alpha.md (negsi2-2): Change output pattern to #. + + * mips.c (embedded_pic_offset): Output RTL to initialize + embedded_pic_fnaddr_rtx. + (mips_finalize_pic): Delete. + * mips.h (mips_finalize_pic): Delete declaration. + (FINALIZE_PIC): Delete. + (INIT_EXPANDERS): Clear embedded_pic_fnaddr_rtx. + * mips.md (get_fnaddr): Add = to output contraint. + + * sh.c (shift_amounts): Correct entry for shifts by 29. + * sh.md (sett): New pattern. + (movsi_i): Change source constraint for move to T reg to be 'z'. + + * mips/ecoff.h (STARTFILE_SPEC): Define to null string. + * mips/elfl.h, mips/elfl64.h: Correct typo in comment. + + * mips/elflorion.h, mips/elforion.h (MIPS_CPU_DEFAULT): Delete. + * mips.c (override_options): Delete #ifdef MIPS_CPU_DEFAULT code. + Add #ifdef MIPS_CPU_DEFAULT_STRING code before the first + mips_cpu_string test. + +Tue May 23 07:22:36 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * romp.c (hash_rtx): Avoid warning on int-to-pointer conversion. + (output_fpops): Cast args to bcopy to char *. + + * cpplib.c (initialize_builtins): Add missing parm to timestamp call. + + * Makefile.in (install-libobjc): Don't depend on libobjc.a. + + * c-parse.in: Objc shift/reduce conflicts now 48. + (parm): Use setspecs/restore here. + (parmlist_or_identifiers): Not here. + +Mon May 22 19:30:30 1995 Doug Evans <dje@cygnus.com> + + * h8300.md (movsf_h8300h): Add missing post-inc case to constraints. + +Mon May 22 14:38:36 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000.c (rs6000_override_options): Do SUBTARGET_OVERRIDE_OPTIONS + here. + * rs6000.h (OVERRIDE_OPTIONS): Not here. + + * rs6000.c (expand_block_move): Handle moves without string + instructions by generating a series of loads and stores. + (output_prolog): Support -mno-toc on V.4 and eabi systems. + + * rs6000/sysv4.h (TARGET_SWITCHES): Add -mtoc and -mno-toc. + (SUBTARGET_OVERRIDE_OPTIONS): Add some warnings for incompatible + switches. + (TOC_SECTION_FUNCTION): Make -mno-toc like -mrelocatable in that + we don't put the minimal toc pointer in the global toc section. + (LINK_SPEC): Use -oformat to set link output format, not -m. + + * rs6000/t-eabigas (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Build + libgcc.a variants with -mno-toc support. + * rs6000/t-ppcgas (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Ditto. + +Mon May 22 07:10:52 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cplus-dem.c (mystrstr): Replacement for strstr. + + * configure: Split up long sed command. + * Makefile.in (SYMLINK): Deleted; unused. + (oldobjext): Deleted; no longer used. + (FLAGS_TO_PASS): Include objext and exeext. + (STAGESTUFF, protoize.o, unprotoize.o): Use $(objext), not .o. + (test_protoize_simple, compare{,3}, gnucompare{,3}): Likewise. + (STAGESTUFF, specs, gcc-cross, collect2): Add missing $(exeext). + (libgcc1.null, libgcc[12].a, stage[1-4]): Likewise. + (xgcc, cc1, cc1obj, enquire): Use $@ instead of filename for -o value. + (collect2, mips-tfile, mips-tdump, gen*): Likewise. + (bi-arity, bi-opcode, bi-opname, cccp, cppmain): Likewise. + (protoize, unprotoize, gen-protos, fix-header): Likewise. + (crtbegin.o, crtend.o): Don't use -o; move output to proper + filename (using objext) instead. + (BI_ALL, BC_ALL, bytecode): Deleted; unused. + (bi-*.o, cexp.o, stamp-{proto,fixinc}): Remove unneeded $(srcdir). + (getopt{,1}.o, SYSCALLS.c.X): Likewise. + (install-driver): New target. + (install-normal): Depend on it. + (install-common): Don't depend on xgcc. + (maketest): Deleted; no longer used. + (stage[1-4]): Use name collect-ld, not real-ld. + (risky-stage[1-4]): Use stage[1-4] as dependencies; don't copy. + * alpha/config-nt.bat, i386/config-nt.bat: Make {,h,t}config.h + and tm.h by writing a single #include line. + Update way specs.h and options.h are written. + * alpha/config-nt.sed, i386/config-nt.sed: Set new variables + into Makefile. + Build winnt.obj. + Edit CCCP definition. + * alpha/x-winnt, i386/x-winnt (oldobjext): Deleted. + Add rules for .c.obj, .adb.obj, and .ads.obj. + (LIB2FUNCS_EXTRA, spawnv.o): New rules. + * i386/x-winnt (objext): Now .obj, not .o. + + * gcc.c (HAVE_OBJECT_SUFFIX): New macro. + (process_command): Convert x.o to x.foo for OBJECT_SUFFIX of ".foo". + (do_spec_1): Avoid shadow variable "i" and always use for loop var. + + * c-decl.c (finish_decl_top_level): Removed; no longer used. + * objc-act.c: Numerous formatting changes. + (NULLT): Deleted; all uses changed to NULL_TREE. + (get_{static,object}_reference, objc_add_static_instance): + Use push_obstacks instead of saving obstacks manually. + (build_{selector,class}_reference_decl): Likewise. + (build_objc_string_decl, build_protocol_reference): Likewise. + (comp_{method,proto}_with_proto): Likewise. + (create_builtin_decl, synth_module_prologue): Set DECL_ARTIFICIAL + for internal objects. + (build_{selector,class}_reference_decl, add_objc_decls): Likewise. + (generate_objc_symtab_decl, build_module_descriptor): Likewise. + (build_protocol_reference): Likewise. + (build_objc_string_decl, synch_forward_declarations): Likewise. + Delete call to end_temporary_allocation. + (generate_static_references, generate_strings): Likewise. + (build_selector_translation_table, generate_category): Likewise. + (generate_{ivars,protocol}_list, build_protocol_reference): Likewise. + (build_objc_string_object): If next_runtime, put everything in + permanent obstack. + (objc_add_static_instance): Use build_decl instead of start_decl + and finish_decl_top_level. + (build_{class_reference,objc_string}_decl): Clear DECL_CONTEXT. + (start_class): Exit with FATAL_EXIT_CODE, not 1. + (add_objc_decls): Don't set DECL_IN_SYSTEM_HEADER. + + * tree.c (valid_machine_attribute): Handle attribute on + pointer-to-function types. + +Sun May 21 17:16:37 1995 J. T. Conklin <jtc@cygnus.com> + + * mips/netbsd.h (HAVE_STRERROR): Remove. + * mips/xm-netbsd.h: New file. + * mips/t-mips-netbsd: Deleted. + * configure (mips-dec-netbsd): Use xm-netbsd.h and t-libc-ok. + +Sun May 21 17:16:37 1995 Arne H. Juul (arnej@pvv.unit.no) + + * mips/netbsd.h: Use __start as entry point. Ifdef some + paths on CROSS_COMPILE. + +Sun May 21 08:39:26 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-parse.in (datadef, fndef, ivar_decl, mydecls): + Restore declspec_stack since setspecs is used. + (parmlist_or_identifiers): Use setspecs before parsing parms + and restore after parsing parms. + +Sun May 21 01:04:52 1995 Jeffrey A. Law <law@snake.cs.utah.edu> + + * pa.c (hppa_encode_label): New variable "permanent" to + where/how memory is allocated for the new label. All + callers changed. + +Sat May 20 16:53:30 1995 Mike Meissner <meissner@cygnus.com> + + * rs6000.md (insv, extz): Fail if the structure is QI or HI reg to + avoid paradoxical subreg's being created in RTL phase, which uses + SImode to load from memory if structure is later moved to stack. + +Sat May 20 06:44:59 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.md (udivmodhi4): Output "divu" instead of "divs". + +Sat May 20 06:11:32 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * reload.c (push_reload): Don't reload inside a SUBREG + when SUBREG_WORD is nonzero. + + * c-decl.c (shadow_tag_warned): Don't warn about useless keyword + if in system header file. + + * tree.c (simple_cst_equal): Don't look at language-specific + nodes since we don't know what's in them. + + * cpperror.c: #include config.h before any other .h file. + * collect2.c: Likewise. + + * i386/config-nt.bat: Add missing ^M on two lines. + Add case for Fortran; fix typo in Ada case. + * alpha/config-nt.bat: Add case for Fortran; fix typo in Ada case. + + * m68k/t-next (LIBGCC1, CROSS_LIBGCC1): Make not, not "libgcc1.null". + (OTHER_FIXINCLUDES_DIRS, LIMITS_H_TEST): Delete from here. + * m68k/x-next (OTHER_FIXINCLUDES_DIR, LIMITS_H_TEST): Move to here. + +Fri May 19 19:30:20 1995 Stan Cox (gcc@dg-rtp.dg.com) + + * crtstuff.c: Added reference to INIT_SECTION_PREAMBLE for systems that + do something which must be undone prior to __do_global_ctors. + +Fri May 19 19:27:08 1995 Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au> + + * i386/linux-aout.h (CPP_SPEC): Add defines for -fPIC. + * i386/linux-oldld.h (CPP_SPEC): Likewise. + +Fri May 19 17:46:28 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * collect2.c (strstr): Deleted. + * cplus-dem.c (strstr): Define ifndef POSIX. + +Fri May 19 11:16:51 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * cpplib.c (collect_expansion): Don't escape '@' inside string. + +Fri May 19 06:59:21 1995 Pat Rankin (rankin@eql.caltech.edu) + + * vmsconfig.com (process_objc_lib, configure_makefile): New routines. + (bc_all.list, ./vax.md, objc-objs.opt, objc-hdrs.list): New files + created at config time. + (bc_all.opt, ./md.): No longer created. + * make-cc1.com: Handle revised filenames from vmsconfig.com; + (DO_OBJCLIB): New variable, plus code to compile objc/*.{c,m}. + +Wed May 17 16:15:31 1995 Torbjorn Granlund <tege@cygnus.com> + + * i960.c (i960_output_ldconst): New code for XFmode. + Also, move SFmode code to immediately after DFmode code. + (S_MODES, D_MODES): Handle XFmode. + (XF_MODES): Was TF_MODES, handle XFmode instead of TFmode. + (hard_regno_mode_ok): Replace TFmode with XFmode. + (i960_output_long_double): New function. + + * i960.h (DATA_ALIGNMENT): Define. + (ROUND_TYPE_ALIGN): Align XFmode scalars at 128 bit boundaries. + (ROUND_TYPE_SIZE): Round up the size of XFmode objects to 128 bits. + (CONST_DOUBLE_OK_FOR_LETTER_P): Use CONST0_RTX and CONST1_RTX + so that all FP modes are recognized. + (ASM_OUTPUT_LONG_DOUBLE): Define. + + * i960.md: Change all TFmode patterns to have XFmode. + (movxf recognizer, frame version): Use movt, ldt, and stt. + (movxf recognizer, non-frame version): Delete. + (extenddfxf2): Delete * before f constraint. + (extendsfxf2): Likewise. + +Wed May 17 17:53:35 1995 Jim Wilson <wilson@mole.gnu.ai.mit.edu> + + * unroll.c (unroll_loop): Increment copy_start_luid if copy_start + is loop_start. + +Wed May 17 17:44:57 1995 Lee Iverson <leei@Canada.AI.SRI.COM> + + * fold-const.c (invert_truthvalue, case CLEANUP_POINT_EXPR): New case. + +Tue May 16 18:51:16 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/rs6000.h (TARGET_SWITCHES): Add -mstring to enable string + instructions, and -mno-string to disable them. + (MOVE_MAX): Don't test TARGET_MULTIPLE anymore. + (MAX_MOVE_MAX): Set to 8, not 16. + (expand_block_move): Add declaration. + + * rs6000/rs6000.c (expand_block_move): New function to expand + block moves when -mstring is used. + + * rs6000/rs6000.md (movti): Use TARGET_STRING, not TARGET_MULTIPLE. + (load_multiple, store_multiple): Ditto. + (string insns): Add 8, 6, 4, 2, and 1 register variants for using + the native string instructions if -mstring. + + * rs6000/sysv4.h (CPP_SPEC): If little endian, define + _LITTLE_ENDIAN and set littleendian assertion. If big endian, + define _BIG_ENDIAN and set bigendian assertion. + * rs6000/sysv4le.h (CPP_SPEC): Copy from sysv4.h, and change + default to little endian. + + * rs6000/rs6000.c (override_options): Check for -mmultiple and + -mstring on little endian systems here. + * rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Don't do the check + here. + +Tue May 16 18:36:41 1995 Douglas Rupp (drupp@cs.washington.edu) + + * alpha.c: Changed WINNT to _WIN32. + * alpha/config-nt.bat, i386/config-nt.bat: Added commands to + generate specs.h and options.h. + * i386/config-nt.sed: Changed link32 to link. + * winnt/ld.c (main): Removed call to free. + * configure.bat: Added line to echo usage on invalid input. + * gcc.c (fix_argv): Removed call to free. + * gcc.c, getpwd.c, protoize.c, sdbout.c: Changed WINNT to _WIN32. + * toplev.c: Likewise. + +Tue May 16 18:04:47 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * toplev.c (pfatal_with_name, fatal_io_error, vfatal): + Use FATAL_EXIT_CODE instead of magic number. + * cccp.c, cpplib.c, cpplib.h: Use FATAL_EXIT_CODE instead + of FAILURE_EXIT_CODE. + * fix-header.c, gen-protos.c: Likewise. + * cpperror.c, cppmain.c: Likewise. + Include config.h #ifndef EMACS. + * xm-alpha.h, xm-rs6000.h, xm-vms.h (FAILURE_EXIT_CODE): Remove. + +Tue May 16 17:46:57 1995 Adam Fedor <fedor@colorado.edu> + + * objc/archive.c (__objc_write_class): Write class version. + (__objc_write_selector, objc_{write,read}_selector): Handle null + selector. + + * objc/sarray.h (struct sarray): Make capacity size_t. + * objc/sarray.c (sarray_realloc): Make array index variables size_t. + +Tue May 16 06:59:08 1995 Paul Eggert <eggert@twinsun.com> + + * dsp16xx.c (print_operand_address): Fix misspellings in messages. + * i370/mvs.h (FUNCTION_PROFILER): Likewise. + * mips-tdump.c (type_to_string): Likewise. + * print-tree.c (print_node): Likewise. + + * protoize.c (edit_fn_definition): Fix mispelled local `have_flotsam'. + + * objc/sendmsg.c (__objc_init_install_dtable): Fix misspelling + in name of local label `already_initialized'. + + * winnt/winnt.h (STDC_VALUE): Was misspelled. + + * m68k/ccur-GAS.h (FUNCTION_BOUNDARY): Was misspelled. + + * 1750a.h (DEFAULT_PCC_STRUCT_RETURN): Was misspelled. + +Mon May 15 23:41:25 1995 Jeffrey A. Law <law@snake.cs.utah.edu> + + * pa.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Make sure to encode section + info for all libcalls. + +Mon May 15 20:58:00 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * collect2.c (strstr): Define ifndef POSIX. + + * defaults.h (SUPPORTS_WEAK): Provide default. + * aoutos.h, sparc/sunos4.h: Don't support weak symbols. + * netbsd.h, svr4.h, i386/freebsd.h, i386/osfrose.h, + m88k/m88k.h: Define ASM_WEAKEN_LABEL instead of WEAK_ASM_OP. + * c-pragma.h: Check ASM_WEAKEN_LABEL instead of WEAK_ASM_OP. + HANDLE_PRAGMA_WEAK is never defined in a tm.h file. + * c-decl.c (duplicate_decls): Propagate DECL_WEAK. + * tree.h (DECL_WEAK): New macro. + (tree_decl): Add weak_flag. + * varasm.c (assemble_start_function): Declare the symbol weak if + appropriate. + (assemble_variable): Ditto. + (assemble_alias): Ditto. Mark the decl as written. + (declare_weak): Check for weak declaration after definition. + Set DECL_WEAK. + (weak_finish): Use ASM_WEAKEN_LABEL. + * libgcc2.c: The C++ free-store management functions are weak + aliases on targets that always support them. + +Mon May 15 19:01:43 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * configure (out_object_file): New variable; put value in Makefile. + * Makefile.in (out_object_file): Use in place of aux-output.o. + + * fold-const.c (const_binop): Don't pass OVERFLOW to force_fit_type + if type is unsigned. + +Mon May 15 18:48:26 1995 Paul Eggert <eggert@twinsun.com> + + * install.sh (transformbasename): Fix misspelling. + + * tahoe.h (CHECK_FLOAT_VALUE): Fix misspelling of OVERFLOW parameter. + + * i386.h (VALID_MACHINE_{DECL,TYPE_ATTRIBUTE): Fix typo. + + * fx80.h (CHECK_FLOAT_VALUE): Fix misspelled use of parameter. + + * a29k.c (spec_reg_operand): Fix misspelling of `default:'. + +Mon May 15 18:36:41 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.md (b{eq,ne,ge,lt}0_di): Fixed for non-MOTOROLA syntax. + * m68k/xm-mot3300.h (alloca): Extern decl added for non-GNU compiler. + +Mon May 15 13:14:29 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * cppexp.c (cpp_reader): Test for '#' (start of assertion) *after* + skipping hspace, not before. + +Mon May 15 08:13:54 1995 Pat Rankin (rankin@eql.caltech.edu) + + * vmsconfig.com: Construct options.h and specs.h to #include + all "*/lang-{options|specs}.h" files found. + +Sun May 14 21:32:49 1995 Doug Evans <dje@cygnus.com> + + * alpha/alpha.md (movsicc, case NE): Don't generate unrecognizable + insn. + (movdicc, case NE): Likewise. + +Sun May 14 15:44:54 1995 Jim Wilson <wilson@mole.gnu.ai.mit.edu> + + * unroll.c (unroll_loop): Make local_regno have size + max_reg_before_loop. Don't do local register optimization if + copy_end has no INSN_LUID. + +Sun May 14 10:38:23 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * objc-act.c (start_method_def): Mark _self as possibly unused. + + * configure: Create specs.h and options.h from */lang-specs.h + and */lang-options.h. + Set lang_specs_files and lang_options_file variables in Makefile. + * Makefile.in (lang_{specs,options}_files): New variables. + (gcc.o): Depends on $(lang_specs_files). + (toplev.o): Depends on $(lang_options_file); merge two dep lists. + (distclean): Remove spes.h and options. + * gcc.c (default_compilers): Remove entries for Ada, C++, Chill, + and Fortran; #include specs.h instead. + * toplev.c (lang_options): Remove entries for Ada, C++, and Fortran; + include options.h instead. + +Sat May 13 23:11:21 1995 DJ Delorie <dj@delorie.com> + + * configure (i[345]86-go32-msdos, i[345]86-*-go32): New targets. + +Sat May 13 10:58:38 1995 Jim Wilson <wilson@cygnus.com> + + * loop.c (record_giv): When computing replaceable, use + back_branch_in_range_p instead of looking for branches to named + labels. + * loop.h (back_branch_in_range_p): Declare. + * unroll.c (back_branch_in_range_p): No longer static. + +Sat May 13 06:47:11 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * combine.c (simplify_shift_count, case LSHIFTRT): Don't merge + shifts of different modes if first is any right shift. + +Sat May 13 05:39:09 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + * configure (arm-semi-aout): New configuration. + * config.sub: Add support for semi-hosted ARM. + * arm/t-semi, arm/semi.h: New files. + +Fri May 12 21:51:22 1995 Doug Evans <dje@cygnus.com> + + * flow.c (find_basic_blocks): Only perform n_basic_blocks sanity + check on first pass, and on second pass ensure it has the correct + value. + +Fri May 12 19:23:11 1995 Jim Wilson <wilson@cygnus.com> + + * c-typeck.c (build_binary_op): Warn when ~unsigned is compared + against unsigned, and type promotions result in an unexpected + answer. + +Fri May 12 19:10:21 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * configure (*-*-gnu*): Always use ELF; set tm_file=${cpu_type}/gnu.h. + * config/i386/gnu.h: Contents replaced with old i386/gnuelf.h. + * config/i386/gnuelf.h: File removed. + +Fri May 12 17:29:57 1995 Ken Raeburn (raeburn@cygnus.com) + + * m68k/lb1sf68.asm (__IMMEDIATE_PREFIX__): Default to #. + (IMM): New macro. + (all code): Use IMM macro instead of hardcoding # for immediate + operands. + +Fri May 12 16:52:10 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * m68k.c (output_scc_di): New function. + (extend_operator) : Allow DImode target. + * m68k.h (HARD_REGNO_MODE_OK): Don't allow d7/a0 as DImode reg pair. + * m68k.md (tstdi, cmpdi, addsi_lshrsi_31, ashldi_extsi): New patterns. + (extendqidi2, extendhidi2, extendsidi2): Allow "general_operand" + instead of "register_operand" 0. + (adddid_sexthishl32, subdid_sexthishl32, subdi_dishl32): Likewise. + (adddi_dilshr32): Operand 0 constraint changed from "ro" to "do"; + Code generation fixed. + (adddi_mem, subdi_mem): Fixed for "<" and ">" operand 0. + (adddi3, subdi3): Operand 2 constraint changed from "ao" to "*ao" + (ashldi_sexthi, ashrdi_const32): Allow only "register_operand" + instead of "general_operand" 0. + (ash[lr]di_const, ash[lr]di3): Allow also 8 and 16 as shift count. + (subreg1ashrdi_const32): Pattern deleted. + (subreghi1ashrdi_const32, subregsi1ashrdi_const32): New pattern. + (lshrsi_31): New implementation. + (scc0_di, scc_di, beq0_di, bne0_di, bge0_di, blt0_di): New patterns. + +Fri May 12 16:50:49 1995 Jeffrey A. Law <law@mole.gnu.ai.mit.edu> + + * pa.md (bb patterns): Fix bugs in length computation exposed by + recent branch shortening and genattrtab changes. + +Fri May 12 16:22:27 1995 Ken Raeburn <raeburn@cygnus.com> + + * cccp.c (enum node_type): Add T_IMMEDIATE_PREFIX_TYPE. + (special_symbol): Handle it; emit value of IMMEDIATE_PREFIX. + (IMMEDIATE_PREFIX): Default to empty string. + (initialize_builtins): Install __IMMEDIATE_PREFIX__ builtin, + parallel to __REGISTER_PREFIX__. + +Fri May 12 14:40:03 1995 Pat Rankin (rankin@eql.caltech.edu) + + * cccp.c: #if VMS, don't define `stat' macro to be VMS_stat. + Compare enums explicitly to 0 to work around VAX C bug. + (do_include): Cast alloca's value. + + * make-cc1.com (bc_loop): Process comma-separated list rather + than space-separated one; restore .h suffix stripped by vmsconfig; + (loop1): More robust handling of directory prefix on file names. + * vmsconfig.com (TPU makefile.in): Reorganize and reformat code. + Make generated .opt files have more consistent format (all comma + separated, excess whitespace eliminated); + (additional_compiler): New routine. + (process_makefile): Use it to handle cc1plus via cp/Make-lang.in. + +Fri May 12 13:35:07 1995 Doug Evans <dje@cygnus.com> + + * arm.h: Replace ARM_REG_PREFIX with REGISTER_PREFIX. + Replace ARM_COMMENT_CHAR with ASM_COMMENT_START. + (REGISTER_PREFIX): Define. + (USER_LABEL_PREFIX, LOCAL_LABEL_PREFIX): Define. + (SECONDARY_OUTPUT_RELOAD_CLASS): Handle DFmodes only if + TARGET_HARD_FLOAT. + (PREDICATE_CODES): Add soft_df_operand. + * arm.c: Replace ARM_REG_PREFIX with REGISTER_PREFIX. + Replace ARM_COMMENT_CHAR with ASM_COMMENT_START. + (arm_asm_output_label): Use USER_LABEL_PREFIX. + (soft_df_operand): New function. + * arm.md (movsicc): New pattern. + (movsfcc, movdfcc, *movsicc_insn, *movsfcc_hard_insn): Likewise. + (*movsfcc_soft_insn, *movdfcc_insn): Likewise. + (*movdf_soft_insn): Rewrite. + (movsi matcher): Fix typo in type attribute. + +Fri May 12 10:25:40 1995 Michael Meissner (meissner@cygnus.com) + + * i386.h (TARGET_RTD): Use MASK_RTD, not MASK_REGPARM. + (TARGET_SWITCHES): Add -m{,no-}align-double switch. + (TARGET_OPTIONS): Add -mregparm= switch to set number of registers + to use for passing arguments. Add -malign-loops= switch to set + the alignment for loops. Add -malign-jumps= switch to set the + alignment for code that is jumped to. Add -malign-functions= + switch to set the initial alignment of functions. + (TARGET_REGPARM): Delete, in favor of -mregparm= + (TARGET_SWITCHES): Delete -mregparm, add -mdebug-arg switches. + (RETURN_POPS_ARGS): Call i386_return_pops_args to do the real work. + (VALID_MACHINE_DECL_ATTRIBUTE): Define as function call. + (VALID_MACHINE_TYPE_ATTRIBUTE): Define as function call. + (COMP_TYPE_ATTRIBUTES): Define as function call. + (REGPARM_MAX): Maximum number of regs to use for passing arguments. + (CUMULATIVE_ARGS): Make this a structure, not an int. + (INIT_CUMULATIVE_ARGS, FUNCTION_ARG{,_ADVANCE}): Call function. + (FUNCTION_ARG_PARTIAL_NREGS): Likewise. + (MAX_CODE_ALIGN): Maximum value to align loops/jumps to. + (BIGGEST_ALIGNMENT): Return 64 if -malign-double, 32 otherwise. + (ASM_OUTPUT_ALIGN_CODE): Use value of -malign-jumps= switch. + (ASM_OUTPUT_LOOP_ALIGN): Use value of -malign-loops= switch. + (toplevel): Declare all new functions and external variables added + in i386.c. + + * i386.c (i386_regparm_string, i386_regparm): New variables + for -mregparm= switch to set the number of registers to use for + passing arguments. + (i386_align_loops_string, i386_align_loops): New variables for + -malign-loops= switch to set alignment to use for loops. + (i386_align_jumps_string, i386_align_jumps): New variables for + -malign-jumps= switch to set alignment to use for labels that are + jumped to. + (override_options): Support new switches. + (i386_valid_decl_attribute_p): New function to validate decl + specific attributes. Presently returns 0. + (i386_valid_type_attribute_p): New function to validate type + specific attributes. Recognize "stdcall", which says function + with fixed numbers of arguments is responsible for popping stack, + "cdecl", which says to use the normal C calling sequence, even if + -mrtd is used, and "regparm", which specifies the number of + registers to use for passing arguments. + (i386_comp_type_attributes): New function, to validate whether + attributes are compatible. + (i386_return_pops_args): New function, to return whether or not + the function pops its argument list or not, taking into account + -mrtd, and the stdcall/cdecl attributes. + (init_cumulative_args): Rewrite as a function, taking variable + argument functions, and regparm support into account. + (function_arg{,_advance,_partial_nreg}): Likewise. + (print_operand): Support %J, to print appropriate jump insn. + + * i386.md (decrement_and_branch_until_zero): Define pattern, + so that loops that count down to zero, don't have an unneeded + compare after the decrement. Add a general insn recognizer for + add to a value and compare against zero. + + * i386/go32.h, i386/winnt.h (VALID_MACHINE_DECL_ATTRIBUTE): + Delete, code folded into the mainline. + (RETURN_POPS_ARGS): Likewise. + + * i386/winnt.h (ENCODE_SECTION_INFO): The stdcall attribute is now + stored on the type field, rather than the decl. + + * i386/gas.h (ASM_OUTPUT_ALIGN_CODE, ASM_OUTPUT_LOOP_ALIGN): Use + i386_align_{loops,jumps} variables to do alignment. + * i386/osfrose.h, i386/svr3dbx.h: Likewise. + +Fri May 12 12:48:19 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stor-layout.c (layout_type, case ARRAY_TYPE): Compute length using + MAX of length and zero if sizetype signed and neither bound constant. + + * i386/gnuelf.h, i386/linux-oldld.h, i386/lynx-ng.h, i386/v3gas.h: + Use <...> in #include instead of "...". + * m68k/lynx-ng.h, sparc/lynx-ng.h: Likewise. + + * c-parse.in (myparm): Handle attributes. + * objc-act.c (unused_list): New variable. + (build_tmp_function_decl): Call push_parm_decl with new format. + (start_class): Initialize unused_list. + (start_method_def): Call push_parm_decl with new format and + mark _cmp as possibly unused. + + * combine.c (simplify_shift_const): Don't change SHIFT_MODE + for LSHIFTRT either. + + * unroll.c (unroll_loop): Don't move reg if used in copy_end and + that is a JUMP_INSN. + +Fri May 12 12:31:37 1995 Doug Evans <dje@cygnus.com> + + * arm/lib1funcs.asm: New file. + +Fri May 12 11:52:03 1995 Kung Hsu <kung@cygnus.com> + + * configure (a29k-*-vxworks*): New target. + * config.sub (vxworks29k): New alias. + * a29k/t-vx29k: New file. + * a29k/vx29k.h: New file. + +Fri May 12 11:17:28 1995 Jim Wilson <wilson@mole.gnu.ai.mit.edu> + + * loop.c (check_dbra_loop): When reversing loop when + no_use_except_counting is false, there must be only one biv. + +Fri May 12 07:10:00 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * unroll.c (unroll_loop): Only use local_regno for pseudos. + + * genattrtab.c (write_test_expr, case MATCH_DUP): Use operands[N] + instead of JUMP_LABEL (which may not be set). + (walk_attr_value, case MATCH_DUP): Set must_extract. + + * c-parse.in: Adjust number of shift/reduce conflicts. + (parm): Support attributes. + * c-decl.c (push_parm_decl): Pass any attributes to decl_attributes. + +Fri May 12 00:36:26 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * cpplib.c (skip_quoted_string): Removed - no longer needed. + (skip_if_group): Use cpp_get_token instead of skip_quoted_string. + + * cpplib.h (struct cpp_reader): Remove start_line field. + Add multiline_string_line field. + + * cpplib.c (cpp_error_with_line, cpp_warning_with_line, + cpp_pedwarn_with_line): Take extra column number parameter. + (macroexpand, cpp_get_token): Fix reporting of unterminated strings. + (line_for_error): Removed - no longer needed. + +Fri May 12 02:21:34 1995 Jim Wilson <wilson@cygnus.com> + + * mips/svr4-t.h (MD_STARTFILE_PREFIX, MD_EXEC_PREFIX, + STARTFILE_SPEC, LINK_SPEC): Define. + * configure (mips-tandem-sysv4): Use t-mips not t-svr4. + +Thu May 11 19:18:54 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * cpplib.c (line_for_error): Make it work; add extra parameter. + (skip_quoted_string, cpp_get_token): Update calls to line_for_error. + (macroexpand): Remember initial line so we can report it if the + call is unterminated. Also, simplify error logic slightly. + (do_include): Cast alloca return value, to avoid pcc warning. + + * cppexp.c (parse_number): Cleanup some Cygnus crud for MPW. + +Thu May 11 21:35:23 1995 Torbjorn Granlund <tege@cygnus.com> + + From Moshier: + * i960.c (i960_output_ldconst): Let split_double handle DImode. + (i960_print_operand): Use REAL_VALUE_TO_DECIMAL for decimal strings. + (i960_output_double, i960_output_float): Likewise; also change arg + VALUE from `double' to `REAL_VALUE_TYPE'. + +Thu May 11 21:09:25 1995 Per Bothner (bothner@wombat.gnu.ai.mit.edu) + + * cpperror.c (cpp_print_containing_files): Remove some + Cygnus-local stuff. + +Thu May 11 21:06:47 1995 Doug Evans <dje@canuck.cygnus.com> + + * gcc.c (link_command_spec): Make -nostdlib no longer imply + -nostartfiles. + +Thu May 11 18:48:57 1995 Paul Eggert <eggert@twinsun.com> + + * c-common.c (convert_and_check): Don't diagnose overflow in constant + expression merely because conversion overflowed. + +Thu May 11 18:43:59 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-decl.c (grokdeclarator): Use PARM_FLAG to see if should + make PARM_DECL. + * c-parse.in (nested_function, notype_nested_function): + Allow old-style arg definitions (use xdecls). + + * c-decl.c (finish_struct): Properly update DECL_PACKED. + +Thu May 11 15:24:15 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * fold-const.c (fold): Also fold CLEANUP_POINT_EXPRs into + TRUTH_*_EXPRs and into the first operand. + (operand_equal_for_comparison_p): Also make sure the second operand + is integral. + +Thu May 11 14:22:03 1995 Ted Lemon <mellon@toccata.fugue.com> + + * config/mips/netbsd.h: New file. + * config/mips/t-mips-netbsd: New file. + * config/mips/x-netbsd: New file. + + * configure (mips-dec-netbsd*): Add entry. + + * mips.h (LOCAL_LABEL_PREFIX, USER_LABEL_PREFIX): Define. + (PUT_SDB_BLOCK_START, PUT_SDB_BLOCK_END, ASM_OUTPUT_LABEL_REF, + ASM_OUTPUT_INTERNAL_LABEL, ASM_GENERATE_INTERNAL_LABEL, + ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Use them. + + * mips.c (mips_output_lineno): Use LOCAL_LABEL_PREFIX. + +Thu May 11 14:22:03 1995 Stan Cox (gcc@dg-rtp.dg.com) + + * dwarfout.c (output_decl): Don't output DIE for struct or union type + with no name or with ERROR_MARK for the fields. + +Thu May 11 06:36:34 1995 Michael Meissner (meissner@cygnus.com) + + * flow.c (mark_used_regs): If a SUBREG does not have a REG in the + SUBREG_REG position, recursively call mark_used_regs, instead of + segfaulting. + +Thu May 11 06:44:34 1995 Pat Rankin (rankin@eql.caltech.edu) + + * expr.c (do_jump, case EQ_EXPR, NE_EXPR): Fix typo for complex. + +Wed May 10 12:34:46 1995 Michael Meissner <meissner@cygnus.com> + + * configure: Add support for the little endian variant of the + PowerPC System V.4 and Eabi targets. If the GNU assembler was not + specified, don't build libgcc.a variants on the PowerPC systems + that use -mrelocatable, -mlittle, and -mbig. + + * genmultilib: For MULTILIB_MATCHES arguments, map question marks + into equal signs after spliting the left and right side of + equivalent options, to all support for options like: -mcpu=403. + + * rs6000/rs6000.md (rs6000_immed_double_const): New function that + is like immed_double_const, except that it reverses the two words + in the constant if the target is little endian. + + * rs6000/rs6000.md (floatsidf2): Use rs6000_immed_double_const, + not immed_double_const. + (floatunssidf2): Ditto. + + * rs6000/rs6000.h: Add declarations for all functions in rs6000.c. + + * rs6000/sysv4.h (TARGET_SWITCHES): Add -mlittle, -mlittle-endian, + -mbig, and -mbig-endian for bi-endian support. + (ASM_SPEC): Pass -mlittle/-mbig to the assembler if it was passed + to us. + (LINK_SPEC): If explicit little or big endian support was + requested, tell the GNU linker to use the appropriate target + format. + + * rs6000/t-eabi (MULTILIB_*): Build libgcc.a variants for software + floating point. Remove mrelocatable libgcc.a variant. + + * rs6000/t-eabigas: New file, cloned from t-eabi. Build + mrelocatable libgcc.a variant in addition to the other variants. + + * rs6000/t-ppc: New file, for PowerPC System V.4 support without + the GNU assembler. + + * rs6000/t-ppcgas: New file, for PowerPC System V.4 support with + the GNU assembler. + + * rs6000/eabile.h: New file, little endian eabi config file. + * rs6000/sysv4le.h: New file, little endian V.4 config file. + +Wed May 10 14:22:28 1995 Doug Evans <dje@cygnus.com> + + * libgcc1-test.c (main_without__main): Renamed from `main'. + * Makefile.in (libgcc1-test): Tell the user to ignore warnings. + + * configure: Support --enable-foo, --disable-foo. + +Wed May 10 10:34:00 1995 Lee Iverson <leei@Canada.AI.SRI.COM> + + * unroll.c: Add declarations of static functions. + (unroll_loop): Renumber regs local to loop for each unrolled iteration. + +Wed May 10 08:27:03 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.c (alpha_set_emit_const): Cleanups to work properly + when run on 32-bit host. + + * configure: Instead of symlinking tm.h and {h,t,}config.h, + make them files that #include the proper file; pass to Makefile. + Pass out_file and md_file to Makefile instead of making symlinks. + * Makefile.in (out_file, md_file, tm_file, {build,host}_xm_file): + New symbols, to be overridden by configure. + (insn-*): Use $(md_file), not md. + (aux-output.o): Use $(out_file), not aux-output.c. + ($(MD_FILE)): Rework to use new conventions. + (gen*.o, bi-*.o): Depend on $(build_xm_file), not hconfig.h. + (scan.o, fix-header.o, scan-decls.o): Likewise. + (distclean): Adjust files removed for new convention. + +Tue May 9 19:26:42 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * rs6000/rs6000.h (LIBGCC_SPEC): Do link with libgcc when -shared. + + * Makefile.in (STAGESTUFF): Add underscore.c. + (underscore.c): Rename temporary files to begin with 'tmp-' so that + they will be removed by 'make mostlyclean'. + +Tue May 9 19:19:55 1995 Mike Stump <mrs@cygnus.com> + + * toplev.c (lang_options): Add new flag -ffor-scope. + +Tue May 9 19:11:47 1995 Lee Iverson (leei@ai.sri.com) + + * objc/init.c (objc_init_statics): Fix missing part of last change. + +Tue May 9 18:25:34 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * i386/gnu.h, i386/linux.h, i386/linux-aout.h, i386/lynx.h: + Use <...> in #include instead of "..." to avoid recursion. + * i386/netbsd.h, i386/xm-gnu.h, i386/xm-linux.h: Likewise. + * i386/xm-lynx.h, i386/xm-freebsd.h, i386/xm-netbsd.h: Likewise. + * m68k/lynx.h, m68k/netbsd.h, m68k/xm-lynx.h: Likewise. + * m68k/xm-netbsd.h, mips/gnu.h, ns32k/netbsd.h: Likewise. + * ns32k/xm-netbsd.h, rs6000/lynx.h, rs6000/xm-lynx.h: Likewise. + * sparc/lynx.h, sparc/netbsd.h, sparc/xm-lynx.h: Likewise. + * sparc/xm-netbsd.h, vax/netbsd.h, vax/xm-netbsd.h: Likewise. + +Tue May 9 15:52:05 1995 Michael Meissner <meissner@cygnus.com> + + * config.sub: Recognize powerpcle as the little endian varient of + the PowerPC. Recgonize ppc as a PowerPC variant, and ppcle as a + powerpcle variant. Convert pentium into i586, not i486. Add p5 + alias for i586. Map new x86 variants p6, k5, nexgen into i586 + temporarily. + +Tue May 9 15:43:27 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * rs6000/rs6000.h (LINK_SPEC, LIB_SPEC): Don't mess with libg + if -shared. + * rs6000/aix41ppc.h (LINK_SPEC): Ditto. + + * rs6000/powerpc.h: Don't emit .extern directives. + +Tue May 9 14:08:09 1995 Jim Wilson <wilson@cygnus.com> + + * sh/lib1funcs.asm (__ashrsi3, __ashlsi3, __lshrsi3): Use .byte + instead of .word offsets in switch table. + +Tue May 9 11:44:47 1995 Jeremy Bettis <jbettis@cse.unl.edu> + + * objc/sendmsg.c (__objc_send_initialize): Call superclass if object + does not implement +initialize. + +Tue May 9 02:44:16 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * rs6000/xm-rs6000.h (COLLECT_EXPORT_LIST): Define if not + cross-compiling. + * rs6000/xm-mach.h: #undef COLLECT_EXPORT_LIST. + * rs6000/rs6000.h (COLLECT_SCAN_OBJECTS): Lose. + + * collect2.c (collect_exit): Unlink export_file. + (prefix_from_string): Broken out from prefix_from_env. + (prefix_from_env): Call it. + (main): Under AIX, recognize -bE: and -bexport:, and don't + automatically export everything if we see one. Otherwise, scan the + objects individually and add all their symbols to an export file to be + passed to the linker. + (write_export_file): New function. + (scan_prog_file): Ignore symbols starting with '.' + + * c-common.c (declare_hidden_char_array): Mark decl artificial. + +Mon May 8 18:13:57 1995 Adam Fedor <fedor@colorado.edu> + + * objc/init.c (_objc_load_callback): Add declaration. + (__objc_exec_class): Call _objc_load_callback after every Class + or Category is added. + * objc/objc-api.h (_objc_load_callback): Add declaration. + +Mon May 8 17:56:28 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (expand_expr, case INDIRECT_REF): Set RTX_UNCHANGING_P + if both TREE_READONLY and TREE_STATIC set. + + * c-typeck.c (convert_for_assignment): Don't give errors about + adding const or volatile unless both sides point to functions. + +Mon May 8 11:48:23 1995 Michael Meissner <meissner@cygnus.com> + + * configure: If ../ld/Makefile, symlink ../ld/ld.new to collect-ld, + not real-ld. Don't test for $use_collect2 any more. + +Sun May 7 17:52:23 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * calls.c (expand_call): Improve -Winline warnings. + +Sun May 7 17:28:27 1995 DJ Delorie (dj@delorie.com) + + * configure.bat: Use "go32" instead of "msdos" for future expansion. + + * i386/go32.h: Add support for win32's stdcall functions. + + * configure.bat: Add ^M to end of each line. + * i386/config-nt.bat, alpha/config-nt.bat: Likewise. + +Sun May 7 02:12:26 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * tree.h (DECL_ARTIFICIAL): New macro. + + * function.c (expand_function_end): Don't warn about unused + anonymous or artificial parms. + +Fri May 5 18:41:22 1995 Jim Meyering (meyering@comco.com) + + * configure: Fix typo in name of "maintainer-clean". + +Fri May 5 14:58:01 1995 Jeffrey A. Law <law@snake.cs.utah.edu> + + * pa.c (emit_move_sequence): Force problematical constants + into memory during the reload pass when generating PIC. + +Fri May 5 13:30:33 1995 Doug Evans <dje@cygnus.com> + + * objc/NXConstStr.m: NXConstantString.h renamed to NXConststr.h. + +Fri May 5 07:10:15 1995 Stephen L Moshier (moshier@world.std.com) + + * real.c (emdnorm, toe64, etoe64): Significand of Intel long double + denormals is shifted down one bit. + +Fri May 5 07:04:12 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-typeck.c (process_init_element): Don't clear_momentary if + constructor_stack is not empty. + + * objc/Makefile (SHELL): Now /bin/sh. + + * c-typeck.c (build_binary_op): Also warn about ordered + comparison of pointer with zero if -Wall. + + * expr.c (do_jump, case EQ_EXPR, NE_EXPR): Properly compare complex. + +Thu May 4 18:01:25 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * objc/Makefile: NXConstantString renamed to NXConstStr. + * objc/NXConstStr.m: Renamed from objc/NXConstantString.m. + * objc/NXConstStr.h: Renamed from objc/NXConstantString.h. + +Thu May 4 17:38:21 1995 J.T. Conklin <jtc@netbsd.org> + + * configure (vax-*-netbsd*): New configuration. + * vax/netbsd.h, vax/xm-netbsd.h: New files. + +Thu May 4 16:39:05 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * collect2.c (main): Add check for 'collect-ld', just like + 'real-ld', except that old versions won't be looking for it in the + path. Don't look for 'real-ld' in the path anymore. Sigh. + + * collect2.c: #include demangle.h and obstack.h. + (obstack_chunk_alloc): Define. + (obstack_chunk_free): Define. + (generic): Don't define. Don't use. + (main): Initialize obstacks and demangling. + + * collect2.c (dump_file): Adjust space padding in output to + maintain tabulation with Solaris ld. Don't demangle if the + environment variable COLLECT_NO_DEMANGLE is set. + + * collect2.c (main): Redirect the output of the first link and + demangle it. Don't collect static c/dtors unless USE_COLLECT2 is + defined. Null-terminate the list of objects. + (dump_file): New function. + (file_exists): New function. + (collect_exit): Renamed from my_exit. Dump and remove the temporary + ld output file. + (collect_execute): Break out from fork_execute. Support redirection. + (fork_execute): Call it. + (fatal_perror, fatal, error): Make non-static. + (xcalloc, xmalloc): Don't use generic. + (xrealloc): Define. + (collect_wait): Break out for do_wait. Just return the exit status. + (do_wait): Call it. + + * collect2.c: Check SUNOS4_SHARED_LIBRARIES using #if, not #ifdef. + + * Makefile.in (collect2): Now uses cplus-dem.o and underscore.o. + (collect2.o): Pass MAYBE_USE_COLLECT2 to compile. + (underscore.c): Rules for creation. + + * cplus-dem.c, demangle.h: Copy from libiberty. + +Thu May 4 14:12:35 1995 Jim Wilson <wilson@cygnus.com> + + * sdbout.c (plain_type): Pass additional argument to plain_type_1. + (plain_type_1): New parameter level. Increment it when making + recursive calls. Force the type to void_type_mode before starting + a 7th level of recursion. + + * sh.c (general_movsrc_operand, general_movdst_operand): Delete + references to POST_DEC and PRE_INC. + * sh.h: Clean up whitespace, comments, etc. + (TARGET_SH, RTL_BIT, DT_BIT, C_BIT, R_BIT, TARGET_DUMP_RTL, + TARGET_DUMP_R, TARGET_CDUMP): Delete. + (TARGET_SWITCHES): Delete -mR, -mc, -mr options. + (CONST_DOUBLE_OK_FOR_LETTER_P): Delete 'G' contraint. + (FUNCTION_VALUE): Simplify. + (REG_OK_FOR_PRE_POST_P, IS_INDEX): Delete. + (BASE_REGISTER_RTX_P, INDEX_REGISTER_RTX_P): Rewrite to allow + SUBREGs. + (GO_IF_LEGITIMATE_INDEX): Delete unused REGNO argument. + (GO_IF_LEGITIMATE_ADDRESS): Use BASE_REGISTER_RTX_P instead of + REG_OK_FOR_PRE_POST_P. Don't accept PRE_INC or POST_DEC addresses. + (PREDICATE_CODES, PROMOTE_MODE): Define. + +Wed May 3 09:57:55 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/rs6000.md (non power abs insns): If not powerpc, use + sf/subfc instructions, not subf. + +Wed May 3 08:49:06 1995 Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au> + + * protoize.c (gen_aux_info_file): Use strerror #ifdef HAVE_STRERROR. + +Wed May 3 01:06:01 1995 Jeffrey A. Law <law@mole.gnu.ai.mit.edu> + + * pa.c (output_call): Fix typo/thinko in last change. + (output_function_epilogue): Align the data section before + emitting deferred plabels. + + From Torbjorn: + * pa.c (before functions): Declare deferred_plabels and + n_deferred_plabels. + (output_call): When generating pic, don't use LP and RP. Use 32 bit + plabel instead. + (output_function_epilogue): Output plabels accumulated in output_call. + +Tue May 2 17:15:08 1995 Jeffrey A. Law <law@mole.gnu.ai.mit.edu> + + * pa.c (hppa_expand_epilogue): Fix thinko in last change. + +Tue May 2 16:54:35 1995 Doug Evans <dje@cygnus.com> + + * jump.c (jump_optimize, can_reach_end determination): A barrier can + follow the return insn. + +Tue May 2 12:39:55 1995 Mike Stump <mrs@cygnus.com> + + * fold-const.c (fold): Ensure that we don't alter the expression's + type when folding CLEANUP_POINT_EXPRs. + +Tue May 2 13:36:08 1995 Michael Meissner <meissner@cygnus.com> + + * expmed.c (emit_store_flag): When creating store flag + instructions from simpler parts, such as XOR, ABS, etc. do not + reuse pseudo registers if expensive optimizations, instead create new + pseudos for each insn result. + +Tue May 2 01:25:29 1995 Jeffrey A. Law <law@snake.cs.utah.edu> + + * pa.c (hppa_expand_epilogue): Correctly handle restore of %rp + for functions with a stack size of exactly 8kbytes and no frame + pointer. + +Mon May 1 19:27:08 1995 Jim Wilson <wilson@cygnus.com> + + * sdbout.c (sdbout_one_type): Don't switch to text section if + in function with section attribute. + + * combine.c (combine_instrutions): Set subst_prev_insn to zero. + (try_combine, undo_all): Likewise. + (get_last_value): Return zero if subst_prev_insn set. + + * sparc.h (INIT_TARGET_OPTABS): Move INIT_SUBTARGET_OPTABS to end. + + * Makefile.in (install-dir): chmod a+rx all newly created directories. + + * expr.c (expand_expr, case SAVE_EXPR): Handle the case where + mode is VOIDmode. + +Fri Apr 28 15:39:38 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * cpplib.h (cpp_buffer): Note new escape combination "@ ". + * cpplib.c (macroexpand): Delete "@ " if stringifying. + (cpp_skip_hspace): Also skip "@ " if input buffer has_escapes. + (collect_expansion): Cleanup white-space handling. + (create_definition): Remove all leading spaces, not just first one. + (cpp_expand_to_buffer): Set has_escapes on resulting input buffer. + (macroexpand): Set output_escapes during whole function (and + specifically during calls of macarg). + (macroexpand): Set "@ " before and after expansion result. + (push_macro_expansion): Remove unneeded initial "@ ", not " ". + (cpp_get_token): Remove unneeded "@ " (not " ") at end of expansion. + (cpp_get_token): Handle "@ ". + + * cpplib.c (read_name_map): Add cpp_reader parameter. Access + map_list from former (instead of having it be static). + (open_include_file): Extra parameter (because of above changes). + (do_include, lookup_import): Update calls of open_include_file. + + * cpplib.c (do_include): Fix memory leak. + + * cpplib.c (delete_assertion): Also delete tokenlist. + (do_unassert): Don't delete tokenlist (handled by delete_assertion). + (cpp_cleanup): New function. Frees resources used by a cpp_reader. + * cpphash.c (cpp_hash_cleanup): New function. + (delete_macro): Enable commented-out code. + (file_cleanup): Free actual buffer. + + * cpplib.c (cpp_options): Add map_list. + + * cpplib.h (PARSE_GETC): Removed. Bogus and unused. + * cppmain.c (main): Remove commented-out code that used PARSE_GETC. + + * cpplib.c: Don't #include <string.h>. Causes clashes + on Nextstep (when index/rindex are macros). + (cpp_grow_buffer, int_parse_file): Cast to U_CHAR*, rather than char*. + +Sun Apr 30 08:11:23 1995 Alan Modra (alan@spri.levels.unisa.edu.au) + + * stdarg.h, varargs.h (va_arg): Don't assume __va_rounded_size (char) + has the value of 4. + +Sun Apr 30 07:13:43 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * vax.h (NOTICE_UPDATE_CC): Correctly handle aob insns. + + * expr.c (expand_expr, case CONSTRUCTOR): Don't set target to + zero if more then one word. + Pass size and alignment to move_by_pieces_ninsns in bytes, not bits. + + * cse.c (cse_insn): Properly set IN_MEMORY for SET_DEST. + + * tree.c (substitute_in_expr): Preserve TREE_READONLY. + + * c-common.c (enum attrs): Add A_UNUSED. + (init_attributes): Initialize it. + (decl_attributes, case A_UNUSED): New case. + +Sat Apr 29 15:42:03 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (do_include): Re-fix minor memory leak by using + alloca instead of xmalloc and free. + + * cccp.c (macarg): Except for reporting error, treat unterminated + macro call as if it were terminated, since `macroexpand' relies + on *argptr being filled in. + +Sat Apr 29 06:09:35 1995 Torbjorn Granlund <tege@cygnus.com> + + * pa.c (output_mul_insn): Simplify, it is never called with + UNSIGNEDP set. + + * pa.md (divsi3, udivsi3, modsi3, umodsi3): Simplify. + (ashlsi3): Clean up indentation and commentary. + +Fri Apr 28 12:48:01 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * integrate.c (expand_inline_function): Don't emit any notes until + after we've expanded the actual parameters. + +Fri Apr 28 11:51:06 1995 Stan Cox (gcc@dg-rtp.dg.com) + + * m88k/dgux.h: (ENDFILE_SPEC, LIB_SPEC) Fix crtbegin and crtend + (SELECT_RTX_SECTION) Put relocatable pic constants in data section + + * m88k/dguxbcs.h: (LIB_SPEC) Likewise + + * m88k/m88k.c: (symbolic_operand) Put relocatable pic constants in data + + * m88k/m88k.h: (FRAME_POINTER_REQUIRED) Add -momit-leaf-frame-pointer + + * m88k/m88k.md: (umulsidi3) Doesn't work for 88110 with mod/div changes + + * m88k/x-dgux: (GCC_FOR_TARGET) tdesc gets mixed up for crtbegin/crtend + +Fri Apr 28 06:36:47 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-typeck.c (pop_init_level, output_init_element): Pass + require_constant_* to digest_init. + + * alpha.c (alpha_emit_set_const): Now returns rtx and take MODE arg. + Rework to use a new pseudo for intermediate values if high opt level. + Also use expand_{bin,un}op. + * alpha.h (alpha_emit_set_const): Add declaration. + * alpha.md (mov[sd]i and splits): Change call to alpha_emit_set_const. + + * reg-stack.c (stack_result): Fix bug in last change. + +Fri Apr 28 01:08:43 1995 Doug Evans <dje@cygnus.com> + + * objc-act.c: Update calls to start_decl, finish_struct, + pass NULLs for attributes. + +Thu Apr 27 21:13:14 1995 Doug Evans <dje@cygnus.com> + + * sparc.md (tablejump): Only if ! TARGET_MEDANY. + (casesi): New pattern for TARGET_MEDANY case. + + * c-common.c (decl_attributes): Always continue if attribute not found. + * c-typeck.c (common_type): Call lookup_attribute instead of + value_member. + * tree.c (attribute_hash_list): New function. + (build_type_attribute_variant): Call it. + (valid_machine_attribute): Handle attributes with arguments. + (is_attribute_p): New function. + (lookup_attribute): New function. + (attribute_in_list): Deleted. + (attribute_list_contained): Check TREE_PURPOSE and TREE_VALUE. + * tree.h (valid_machine_attribute): Add prototype. + (is_attribute_p, lookup_attribute): Likewise. + * i386/winnt.h (RETURN_POPS_ARGS): Call lookup_attribute. + (ENCODE_SECTION_INFO): Likewise. + (CPP_PREDEFINES): Use __stdcall__, __cdecl__. + (VALID_MACHINE_DECL_ATTRIBUTE): Call is_attribute_p. + `args' must be NULL. + +Thu Apr 27 21:10:41 1995 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.md (insv): New anonymous patterns to combine insert with + arbitrary ashift, ashiftrt, lshiftrt, or zero_extract. (Based on + patch from John Brooks <jbrooks@ea.com>.) + (ashlsi3): Remove extraneous operand processing. + +Thu Apr 27 18:47:24 1995 Jim Wilson <wilson@cygnus.com> + + * sh/ashlsi3.c, sh/ashrsi3.c, sh/lshrsi3.c: Delete. + * sh/lib1funcs.asm (ashiftrt_r4_*): Rewrite for efficiency. + (ashrsi3, lshrsi3, lshrsi3): Add. + * t-sh (LIB1ASMFUNCS): Add new functions. + (LIBGCC2_CFLAGS): Delete. + (LIB2FUNCS_EXTRA): Remove deleted files. + (ashlsi3.c, ashrsi3.c, lshrsi3.c): Remove rules for deleted files. + + * stmt.c (expand_return): When returning BLKmode structure, use + operand_subword instead of doing arithmetic on the register number. + Also, for structures smaller than word_mode, copy it into a word_mode + temporary and then subreg it. + + * sparc.md: Delete two define_peepholes which print `bad peephole'. + +Thu Apr 27 16:17:01 1995 Torbjorn Granlund <tege@cygnus.com> + + * toplev.c (rest_of_compilation): Call shorten_branches even when + !optimize. + * final.c (shorten_branches): For non-optimizing compiles, break + after first pass. + +Thu Apr 27 14:22:50 1995 Michael Meissner <meissner@cygnus.com> + + * i386/linux-oldld.h: New file, that is cloned from linux-aout.h, + except that it does not pass -m i386linux to the linker. This is + to support the original GNU/Linux ld that is on most distributions. + + * configure (i[345]86-*-linux*oldld*): Use i386/linux-oldld.h as + the target file. + +Thu Apr 27 08:56:50 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * tree.c (valid_machine_attribute): Update last change. + +Thu Apr 27 08:06:33 1995 Philippe De Muyter (phdm@info.ucl.ac.be) + + * fix-header.c, cpplib.c: Don't include <sys/stat.h> twice. + * cpplib.c (cpp_grow_buffer, init_parse_file): Cast {xmalloc,xrealloc} + for token_buffer to U_CHAR* instead of char*. + + * m68k/x-mot3300: New file. + * configure (m68k-motorola-sysv*): Use x-mot3300 instead of x-alloca. + +Thu Apr 27 07:04:09 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (do_include): Fix minor memory leak. + + * cccp.c (struct argdata): Remove unused `comments' member. + (macarg): Don't set `comments' member. + + * cccp.c (collect_expansion): Assume leading white space + already removed. + Don't allocate unnecessary space for expansion. + + * cccp.c (deps_output): Don't generate overly long output lines. + Do not invoke self recursively with spacer == 0; this simplifies + the code a bit. + +Wed Apr 26 19:20:02 1995 Andrew McCallum <mccallum@leopard.cs.rochester.edu> + + * objc/Object.h: Changed Class * to Class in order to match NEXTSTEP + and OpenStep runtime. + * objc/Object.m, objc/Object.h, objc/archive.c, objc/class.c: Likewise. + * objc/encoding.c, objc/init.c, objc/objc-api.h, objc/objc.h: Likewise. + * objc/objects.c, objc/runtime.h, objc/selector.c: Likewise. + * objc/sendmsg.c, objc/typedstream.h: Likewise. + +Wed Apr 26 19:18:52 1995 Pieter Schoenmakers <tiggr@es.ele.tue.nl> + + * objc/objc-api.h (objc_static_instances): New struct to record + static instances of a certain class. + (objc_module): New tag STATICS to point to the table of + objc_statics_instances. + + * objc/init.c (OBJC_VERSION): Version 7. + (objc_init_statics): New function. + (__objc_exec_class): Invoke objc_init_statics if needed. + + * objc/NXConstantString.m, objc/NXConstantString.h: New files. + * objc/Makefile (OBJC_O): Added bare-bones implementation of + NXConstantString. + + * objc-act.c (OBJC_VERSION): Version 7. + (build_objc_string_object): Build a full declaration if not using + the next runtime. + (objc_add_static_instance): New function. + (init_module_descriptor): Add reference to static instances table. + (build_module_descriptor): Add field for static instances table. + (get_objc_string_decl): New function. + (generate_static_references): New function. + (finish_objc): Call generate_static_references if needed. + + * c-tree.h (finish_decl_top_level): New declaration. + * c-decl.c (finish_decl_top_level): New function. + +Wed Apr 26 18:04:32 1995 Dirk Steinberg (Dirk.Steinberg@gmd.de) + + * stddef.h: Treat _MACHINE_ANSI_H_ like _ANSI_H_. + +Wed Apr 26 14:09:59 1995 Jim Wilson <wilson@cygnus.com> + + * sparc.h (NEGTF2_LIBCALL): Define. + (INIT_TARGET_OPTABS): Add support for all TFmode *_LIBCALL macros. + * optabs.c (init_optabs): Delete all uses of undocumented TImode and + TFmode *_LIBCALL macros. + + * combine.c (simplify_rtx, case TRUNCATE): Add. Use force_to_mode. + (force_to_mode, case AND): Allow some simplifications when GET_MODE (x) + has more bits than HOST_BITS_PER_WIDE_INT. + * mips/mips.md (truncdiqi2+[456]): Add patterns to simplify ZERO_EXTEND + of a TRUNCATE. + +Wed Apr 26 13:01:22 1995 Doug Evans <dje@cygnus.com> + + * sparc.md (memop define_splits): Rewrite to not use memop. + Preserve MEM_IN_STRUCT_P, MEM_VOLATILE_P, RTX_UNCHANGING_P bits. + * sparc.c (memop): Deleted. + (splittable_symbolic_memory_operand): New function. + (splittable_immediate_memory_operand): New function. + +Wed Apr 26 12:54:26 1995 Jeffrey A. Law <law@snake.cs.utah.edu> + + * configure: Add hppa1.1-hp-lites support. + +Wed Apr 26 08:04:46 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * sh.md (ashrsi2_31): Don't use dead_or_set_p after reload. + * pyr.md: Remove bad peepholes that improperly use dead_or_set_p. + + * function.c (expand_function_end): Warn about unused parms + if both -Wunused and -W. + + * tree.h (TYPE_PARSE_INFO): Delete unused field. + (TYPE_PACKED): Add new macro. + (struct tree_type): Delete unused field `parse_info'. + Add new field `packed_flag'. + * c-tree.h (finish_enum, finish_struct): Add ATTRIBUTES argument. + * c-common.c (init_attributes): Don't require decl for A_PACKED. + (decl_attributes, case A_PACKED): Set TYPE_PACKED for type. + * c-parse.in: Update number of shift/reduce conflicts. + (structsp): Pass attribute arg to finish_struct. + Support attributes on enums and pass to finish_enum. + * c-decl.c (finish_struct): Add ATTRIBUTES argument, call + decl_attributes and set DECL_PACKED from TYPE_PACKED. + (finish_enum): Add ATTRIBUTES argument, call decl_attributes, + and make enum narrow if TYPE_PACKED. + * print-tree.c (print_node): Print TYPE_PACKED. + + * c-decl.c (init_decl_processing): Don't give builtin__constant_p an + argument type. + * expr.c (expand_builtin, case BUILT_IN_CONSTANT_P): A pointer to a + string constant is a constant. + + * c-typeck.c (output_init_element): Constructor is not simple if + a bitfield is being assigned a non-integer. + + * c-typeck.c (push_init_level): Update constructor_depth when we + push spelling level. + +Tue Apr 25 19:50:06 1995 Jeffrey A. Law <law@snake.cs.utah.edu> + + * pa.c (emit_move_sequence): Handle function label arithmetic for + PIC code generation too. + +Tue Apr 25 18:52:43 1995 Stephen R. van den Berg (berg@pool.informatik.rwth-aachen.de) + + * reg-stack.c (current_function_returns_real): Deleted (unused). + (FP_mode_reg): Trimmed to a smaller size, less overhead. + (FP_MODE_REG): New macro over which FP_mode_reg will be accessed. + (mark_regs_pat, straighten_stack): New functions. + (reg_to_stack): Amend initialisation of FP_mode_reg. + Mark FP registers mentioned in USE insns before NOTE_INSN_FUNCTION_BEG. + (get_true_reg): Eliminate FP subreg accesses in favour of the + actual FP register in use. + (record_reg_life_pat): Make it work on SUBREGs as well. Make use of + the new mark_regs_pat function. Handle USE insns if called unnested. + (record_reg_life): Don't check for QImode again, we know that it + is there. Process CALL_INSNs like all other insns, they might `use' + some FP argument registers if register passing. + (stack_result_p): Changed in stack_result and returning an rtx. + (stack_reg_life_analysis): Take a new stackentry state argument. + Use stack_result and the rtx to mark using mark_regs_pat. This ensures + that types that need multiple FP registers are handled correctly. + Delete the no_live_regs shortcut to save space. + Use stackentry state to determine filled registers. + (replace_reg): Accept COMPLEX_FLOAT as well. + (move_for_stack_reg): Optimise away some pointer dereferencing. + (subst_stack_regs): Make sure the stack is in the right order + and of the right size for register passing. + (goto_block_pat): Make sure the stack is in the right order + to return possible multi-register values from the function. + (convert_regs): Fix comment about CALL_INSN, it's no longer valid. + Make sure the stack is of the right size and in the right order + to return possible multi-register values from the function. + + * function.c (assign_parms): If STACK_REGS is defined, generate USE + insns before the function body, thus showing which registers are filled + with parameters. + * expr.c (expand_builtin_apply_args): Likewise. + Reverse order of saving registers, more compact code for i387. + (expand_builtin_apply): Likewise. + * emit-rtl.c (gen_highpart): Add comment about broken implementation. + * i386.md (untyped_call): Make it return a complex double. + + * c-parse.in (attrib): Permit null-length argument list to attributes. + + * tree.c (valid_machine_attribute): Use new function attribute_in_list, + makes sure type_attribute_variants are reused even when attributes have + parameters. + Assign any new type to TREE_TYPE (decl). + (attribute_in_list): New function. + (attribute_list_contained): Use it. + * tree.h (attribute_in_list): New declaration. + +Tue Apr 25 18:25:53 1995 Jim Wilson <wilson@cygnus.com> + + * expr.c (struct move_by_pieces): Add to_struct and from_struct fields. + (move_by_pieces): Set to_struct and from_struct fields. + (move_by_pieces_1): Set MEM_IN_STRUCT_P of to1 and from1. + (expand_builtin, case BUILT_IN_MEMCPY): New variable type. + Set MEM_IN_STRUCT_P of src_mem and dest_mem. + + * Makefile.in (clean): Delete libgcc1-asm.a. + + * m68k/vxm68k.h (CPP_SPEC): Define. + + * c-decl.c (pushdecl): Don't test DECL_EXTERNAL when deciding whether + to register a duplicate decl in the current block. + + * cross64.h (INIT_ENVIRONMENT): Define as string not putenv call. + * gcc.c (main): Pass INIT_ENVIRONMENT to putenv. + + * stmt.c (expand_return): When returning BLKmode structure in + registers, copy it to a psuedo-reg instead of to hard registers. + +Tue Apr 25 15:14:58 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000.h (LEGITIMIZE_ADDRESS): Don't create a DF address using two + regs if -msoft-float or -mcpu=403. + +Tue Apr 25 15:45:44 1995 Richard Henderson (richard@atheist.tamu.edu) + + * m68k.md (divhi3, udivhi3, modhi3, umodhi3): Deleted + these insns plus some surrounding trash. + (divmodhi4, udivmodhi4): Added these insns. + +Tue Apr 25 10:12:40 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.c (alpha_builtin_saveregs): Refine last change to work + for both stdarg and varargs. + + * tree.c (chain_member_purpose): Make similar to chain_member_value. + + * Makefile.in, configure: Change "realclean" to "maintainer-clean". + + * protoize.c: Removed __NetBSD__ from conditional. + Declare strerror if HAVE_STRERROR is defined; otherwise + declare sys_errlist and sys_nerr. + (my_strerror): New function. + (errno): Don't define if already defined as a macro. + + * alpha.c (current_file_function_operand): Return false if profiling. + + * expr.c (convert_move): Don't access a hard reg in an invalid + mode when doing a truncation. + + * alpha.c (add_operand): Test for exactly the constants allowed by + the constraints. + * alpha.h (CONST_OK_FOR_LETTER_P, case 'L'): Reject 0x80000000. + + * c-parse.in (initdcl, notype_initdcl): Pass attributes to + start_decl; delete call to decl_attributes. + * c-tree.h (start_decl): Two new tree parameters. + * c-decl.c (start_decl): New args for attributes; call decl_attributes. + + * c-decl.c (duplicate_decls): Don't look at TYPE_ACTUAL_ARG_TYPES + if it is not set. + + * xm-1750a.h: New file. + + * alpha.c (alpha_builtin_saveregs): Add to incoming args addr + if less than 6 named args, not less than or equal to. + +Mon Apr 24 15:25:19 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * mips-tfile.c (fatal, error): Make first arg const to avoid warning. + + * stmt.c (expand_end_bindings): Write a BARRIER after call + to abort in nonlocal handler. + + * stmt.c (expand_decl_init): Call preserve_temp_slots to keep + around any temp whose address was taken. + +Fri Apr 21 16:26:15 1995 Torbjorn Granlund <tege@adder.cygnus.com> + + * pa.md (call_internal_reg): Fix typos in length calculation. + (call_value_internal_reg): Likewise. + +Fri Apr 21 13:17:15 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * config/gnu.h (STANDARD_INCLUDE_DIR): New macro. + * config/mips/gnu.h (STANDARD_INCLUDE_DIR): Macro moved there. + +Fri Apr 21 08:23:58 1995 Tom Quiggle (quiggle@lovelace.engr.sgi.com) + + * toplev.c (lang_options): Add -I for GNAT. + * gcc.c (default_compilers): Pass -I to gnat1. + +Fri Apr 21 07:58:06 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * tree.c (integer_all_onesp): Test to size of mode, not TYPE_PRECISION. + + * toplev.c (main): Turn on -fforce-mem for -O2. + + * fold-const.c ([lr]rotate_double): Replace; old versions were bogus. + (fold, shift and rotate): Don't call tree_int_cst_sgn on non-integer. + (fold, case LROTATE_EXPR): If constant count, convert to RROTATE_EXPR. + (fold, case RROTATE_EXPR): Sometimes commute logical op with rotate. + Delete pair of counteracting shifts. + + * combine.c (simplify_logical, case AND): If still an AND, get + new values for op0 and op1. + +Thu Apr 20 17:52:10 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * sh.c: Completely rewritten. + * sh.h (FAST_BIT, CONSTLEN_2_BIT, CONSTLEN_3_BIT, CONSTLEN_0_BIT, + TARGET_FASTCODE, TARGET_CLEN3, TARGET_CLEN0, TARGET_OPTIONS): Delete. + (TARGET_SWITCHES): Delete -mclen3 and -mclen0 options. + (TARGET_DEFAULT): Is zero. + (OVERRIDE_OPTIONS): Delete code to set max_count_si and max_count_hi. + (SPECIAL_REG): New macro. + (HARD_REGNO_MODE_OK): Allow any mode in any general register. + (GO_IF_LEGITIMATE_ADDRESS): Delete constant + reg address case. + (MOVE_RATIO): Define to 2 when TARGET_SMALLCODE. + (max_si, max_hi, max_count_si, max_count_hi): Delete. + * sh.md: Delete spurious constraints from all define_expands. + (rotlsi3_1): Set T reg instead of clobbering it. + (ashrsi3): Use expand_ashiftrt instead of gen_shifty_op. + (movsi_i, movhi_i, movsf_i): Add conditions to reject patterns + needing a reload. + (movdi-2, movdf_k): Correct conditions to reject patterns needing + a reload. + ([inverse_]branch_{true,false}): Pass operands to output_branch. + (jump): Delete unnecessary braces. + (call, call_value): Don't use expand_acall. Force operand0 into + a register. + +Thu Apr 20 12:57:16 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * function.c (assign_parms): Use TREE_ADDRESSABLE rather than + TYPE_NEEDS_CONSTRUCTING to decide whether a parameter needs to be + passed by invisible reference. + + * calls.c (expand_call): Ditto. Abort if we try to pre-evaluate a + parameter of TREE_ADDRESSABLE type. + +Wed Apr 19 17:50:24 1995 Torbjorn Granlund <tege@cygnus.com> + + * pa.h (TARGET_SWITCHES): Fix typo. + +Tue Apr 18 18:06:03 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * expr.c (store_constructor): Use BYTES_BIG_ENDIAN rather + than BITS_BIG_ENDIAN to layout bits within bitstring. + * tree.c (get_set_constructor_bytes): Likewise. + +Tue Apr 18 17:22:46 1995 Per Bothner (bothner@wombat.gnu.ai.mit.edu) + + * config/m68k/{x-hp320,x-hp320g} (FIXPROTO_DEFINES): + Define _HPUX_SOURCE so putenv and other functions get seen. + +Tue Apr 18 03:57:35 1995 Michael Meissner (meissner@cygnus.com) + + * varasm.c (weak_decls): Make this a unique structure, instead of + a tree structure. + (handle_pragma_weak): Don't redeclare asm_out_file. Use new weak + structure to copy name and value to. Protect name and value by + copying them to the permanent obstack. + (declare_weak): Call handle_pragma_weak, instead of duplicating + the code. + (finish_weak): Rewrite to use new weak symbols list structure. + + * c-pragma.h: New file to define the c-pragma.c interfaces. + * c-pragma.c: Include it. + * varasm.c: Include it. + * c-lex.c: Include it. + * cp/lex.c: Include it. + + * varasm.c (handle_pragma_weak): No longer pass output file + stream, since weak pragmas are delayed until the end of the + compilation. + * c-pragma.c (handle_pragma_token): Call handle_pragma_weak + without file stream argument. + + * Makefile.in (varasm.o, c-lex.o, c-pragma.o): Add dependencies on + c-pragma.h. + + * config/rs6000.md (movdf): If -msoft-float, do not generate + memory to memory references, like is already done for the + -mhard-float case. Remove an extra test for -mhard-float inside + of -mhard-float code. + +Tue Apr 18 06:19:50 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (size_int): Arg is unsigned HOST_WIDE_INT. + * tree.h (size_int): Likewise. + +Mon Apr 17 23:36:57 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * rs6000/aix41.h: Restore March 11th changes, plus + (ASM_OUTPUT_EXTERNAL): Do add [DS] or [RW], just don't emit + anything. + * rs6000/aix3newas.h (ASM_OUTPUT_EXTERNAL): Ditto. + +Mon Apr 17 15:58:52 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * config/mips/x-iris (FIXPROTO_DEFINES): Add -D_LANGUAGE_C_PLUS_PLUS. + * config/mips/x-iris6: Likewise. + + * cpplib.c: Rename make_definition to cpp_define. + * cpplib.h (cpp_define): New declaration. + + * cpplib.c (special_symbol): For T_SPECLINE, calculate __LINE__ + in enclosing file buffer, not current buffer (if macro expanding). + (cpp_get_token): Fix thinko (in code for chopping unneeded space). + +Mon Apr 17 11:36:07 1995 Jim Wilson <wilson@cygnus.com> + + * abi64.h (CPP_SPECS): Define and use _ABI64 instead of + _MIPS_SIM_ABI64. + (SETUP_INCOMING_VARARGS): Set MEM_IN_STRUCT_P if big endian target. + * iris6.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Define. + + * combine.c (get_last_value): Ignore BARRIER when scanning backwards. + (move_deaths): New variables before_dead and after_dead. Set them + to instructions that have valid INSN_CUID values and use in test. + + * combine.c (subst_prev_insn): New variable. + (try_combine): Set it. + (get_last_value): Use it. + + * reload.c (find_reloads): Recompute reg_equiv_address from + reg_equiv_memory_loc before using it. + (find_reloads_toplev, make_memloc): Likewise. + + * expr.c (expand_builtin, case BUILT_IN_MEMCPY): Call force_operand + on dest_rtx before returning it. + + * function.c (instantiate_decls): Use temporary allocation if + DECL_DEFER_OUTPUT is set. + +Sat Apr 15 23:19:03 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * aoutos.h (ASM_OUTPUT_DEF): Define instead of SET_ASM_OP. + * sparc/sunos4.h (ASM_OUTPUT_DEF): Ditto. + + * varasm.c (weak_finish): Don't handle aliases. + (declare_weak): Ditto. + (assemble_alias): Handle aliases. + + * c-common.c (enum attrs): Add A_ALIAS. + (init_attributes): Ditto. + (decl_attributes): Ditto. + +Sat Apr 15 13:26:34 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * calls.c (expand_call): Call preserve_temp_slots on temps + made for BLKmode args returned in registers. + + * pa.c (override_options): Fix typo. + +Sat Apr 15 12:11:46 1995 Brendan Kehoe <brendan@cygnus.com> + + * alpha/alpha.c (output_epilog): Initialize fp_offset to 0, and + make sure it's non-zero before we try to use it to restore the + frame pointer. + +Fri Apr 14 19:45:05 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * ginclude/va-{clipper,pa,pyr,sparc,spur}.h (va_arg): Reorganize + to avoid BIND_EXPRs and COND_EXPRs of aggregate type. + +Fri Apr 14 19:31:14 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * config/svr4.h (ASM_OUTPUT_SECTION_NAME): Make the section + read-only executable "ax" if DECL is a FUNCTION_DECL; read-only + "a" (previously the case always) if DECL is TREE_READONLY; + otherwise writable "aw". + +Fri Apr 14 18:49:11 1995 Linus Torvalds <Linus.Torvalds@cs.Helsinki.FI> + + * alpha.md (probe_stack): Probe with write, not read. + (allocate_stack): Update and correct stack probe code. + * alpha.c (output_prolog): Changed stack probe at function entry. + +Fri Apr 14 18:42:34 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * jump.c (delete_insn): When deleting after label, delete + a BARRIER as well. + +Fri Apr 14 14:40:48 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * toplev.c (compile_file): Call weak_finish. + + * c-common.c (enum attrs): Add A_WEAK. + (init_attributes): Ditto. + (decl_attributes): Support __attribute__ ((weak)) by + calling declare_weak. + + * sparc/sunos4.h (HANDLE_PRAGMA_WEAK, WEAK_ASM_OP, SET_ASM_OP): + Define to support weak symbols with -fgnu-linker. + * aoutos.h: Ditto. + + * varasm.c (handle_pragma_weak): Add declared weak symbols to + weak_decls rather than emitting them immediately. + (declare_weak): Add the indicated declaration to weak_decls. + (weak_finish): Emit .weak directives for any weak symbols. + + * libgcc2.c: The C++ free-store management functions are weak. + +Fri Apr 14 13:00:29 1995 Michael Meissner (meissner@cygnus.com) + + * rs6000/rs6000.c (output_prolog): For eabi systems, emit main's + call to __eabi before setting up the minimal TOC used with the + -mrelocatable support. + + * rs6000/eabi.h (INVOKE__main): Don't define any more, + output_prolog will emit the call. + +Fri Apr 14 09:09:03 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * alpha.c (call_operand): Any reg is valid for NT. + (output_prologue): Never need GP for Windows/NT. + Set SYMBOL_REF_FLAG in current function decl. + +Thu Apr 13 20:19:30 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * alpha/xm-alpha.h (HAVE_VPRINTF): Define. + (HAVE_PUTENV): Define. + (POSIX): Define. + +Thu Apr 13 19:57:44 1995 Doug Evans <dje@cygnus.com> + + * emit-rtl.c (gen_sequence): If the insn has a non-null + CALL_INSN_FUNCTION_USAGE field, output it as a sequence so the + latter isn't discarded. + + * c-parse.in: Update expected conflict count. + +Thu Apr 13 08:10:20 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * configure.bat: Arg 2 is which machine (i386 or alpha). + * configure (alpha-*-winnt3*): New configuration. + * alpha.c: Don't #include stamp.h for WINNT. + (input_operand, case CONST): Allow ptr_mode and DImode. + * alpha.h (WINDOWS_NT): Provide default definition. + (ASM_OUTPUT_INT): Use output_addr_const. + (ASM_OUTPUT_ADDR_DIFF_ELT): Use .long for NT. + * alpha.md (calll, tablejump, movsi): New variants for NT. + * alpha/winnt.h, alpha/xm-winnt.h, alpha/x-winnt: New files. + * alpha/config-nt.bat, alpha/config-nt.sed: New files. + * i386/config-nt.bat: Add Ada fragments to Makefile. + * i386/config-nt.sed: Adjust for deletion of config.run in Makefile.in + Change version to 2.6.3. + Add some missing tabs. + * winnt/winnt.h (TARGET_MEM_FUNCTIONS): Define. + (LINK_SPEC): Delete "align:0x1000". + * winnt/xm-winnt.h (OBJECT_SUFFIX): Define. + * ginclude/stdarg.h, ginclude/varargs.h: Clean up code that + defines *DEFINED* symbols. + + * configure (a29k-*-sym1*): Same as a29k-*-bsd*. + * a29k.h (ASM_OUTPUT_SECTION_NAME): New macro. + +Wed Apr 12 14:36:03 1995 Jim Wilson <wilson@cygnus.com> + + * dbxout.c (dbxout_type_fields): Correct arguments to CHARS macro + in flag_minimal_debug case. + (dbxout_symbol_name): Use DECL_ASSEMBLER_NAME unconditionally. + * sdbout.c (sdbout_record_type_name): Correct indentation. + (sdbout_symbol): Use DECL_ASSEMBLER_NAME unconditionally. + (sdbout_one_type): Likewise. + +Tue Apr 11 13:24:13 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * fix-header.c (main): Fix loop over required_functions_list. + (fatal): Also print inc_filename. + + * cpplib.c (cpp_push_buffer): Added missing initializatuon of buf. + (cpp_file_buffer): Compare against CPP_NULL_BUFFER, not NULL. + (finclude): No longer call cpp_push_buffer - let callers do it. + (do_include): Add call to cpp_push_buffer. + (push_parse_file): Call cpp_push_buffer early, so initial + defines can use file and line from a valid cpp_buffer. + (nreverse_pending): New function. + (push_parse_file): Use nreverse_pending. + (push_parse_file): For -include files, just push them in reverse + order - we don't need to scan them now. + (cpp_error_from_errno, cpp_perror_with_name): Don't emit extra '\n'. + +Tue Apr 11 13:36:44 1995 Jim Wilson <wilson@cygnus.com> + + * configure (mips-dec-mach3): Add. + + * sh.c (shiftby_operand): Delete. + * sh.h (TARGET_SWITCHES): -m3 and -m3l also set SH2_BIT. + (OVERRIDE_OPTIONS): Don't add CPU_SH2 to CPU_SH3 when TARGET_SH3. + * sh.md (ashlsi3): Use nonmemory_operand as a predicate instead of + shiftby_operand. Don't use shiftby_operand in the output statement. + (lshrsi3): Likewise. + + * c-decl.c (poplevel): Do output inline function if + DECL_ABSTRACT_ORIGIN points to itself. + + * varasm.c (output_constant): Cast assemble_string argument to char *. + +Mon Apr 10 14:29:28 1995 Torbjorn Granlund <tege@adder.cygnus.com> + + * recog.c (constrain_operands, case 'E'): Make this work like + constraint character `F' when REAL_ARITHMETIC is defined. + * regclass.c (record_reg_classes, case 'E'): Likewise. + * reload.c (find_reloads, case 'E'): Likewise. + +Mon Apr 10 14:30:31 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/aix3newas.h, rs6000/aix41.h: Eliminate March 11th changes + to undefine ASM_OUTPUT_EXTERNAL{,_LIBCALL}, since this causes the + compiler not to bootstrap. + +Mon Apr 10 07:17:39 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cppalloc.c: #include config.h. + * cppexp.c: Add declarations of xmalloc and xrealloc. + (cpp_parse_expr): Cast args to bcopy to char *. + * cpphash.c: Add declaration of xmalloc. + * cpplib.c (init_parse_options, cpp_reader): Cast args to bcopy, + bcmp, and bzero to char *. + (add_import, push_parse_file, init_parse_file): Likewise. + + * c-common.c (enum attrs): New attribute, A_NOCOMMON. + (init_attribute): Initialize it. + (decl_attributes): Implement it. + * varasm.c (make_decl_rtl): Allow section attribute if -fno-common + or variable is not to be placed in common for some other reason. + + * combine.c (simplify_set): Don't move a SUBREG to dest if it + is changing the size of a hard reg in CLASS_CANNOT_CHANGE_SIZE. + + * reload.c (find_equiv_reg): If goal is a pseudo that got memory, + a store into memory makes it invalid. + * reload1.c (reload_as_needed): Call forget_old_reloads_1 on + pattern before reg elimination. + +Mon Apr 10 00:26:14 1995 Jeffrey A. Law <law@snake.cs.utah.edu> + + * pa.c (pa_reorg): Bump label use count for each entry in an + exploded ADDR_VEC. + +Sun Apr 9 09:22:51 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * i386.md (adddi3, subdi3): Need scratch reg whenever operand 0 in + mem and operands 1 not '0'. + (subdi3): Don't treat two non-equal MEMs as non-aliasing. + +Sat Apr 8 22:53:38 1995 Jeffrey A. Law <law@snake.cs.utah.edu> + + * pa.c (pa_reorg): Fix typo. + +Sat Apr 8 19:36:36 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/rs6000.h (SELECT_SECTION): TREE_CODE_CLASS must be called + with a tree code, not a tree value. + +Sat Apr 8 12:41:01 1995 Mike Stump <mrs@cygnus.com> + + * cpphash.c: Don't use const on compilers that don't support it. + +Sat Apr 8 16:32:22 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * expr.c (expand_increment): Handle case where INCREMENTED + has a non-trivial conversion. + +Fri Apr 7 19:33:21 1995 Phil Nelson (phil@cs.wwu.edu) + + * ns32k.h (TRAMPOLINE_TEMPLATE, TRANSFER_FROM_TRAMPOLINE): + Fix assembler syntax errors. + +Fri Apr 7 19:27:23 1995 Pat Rankin (rankin@eql.caltech.edu) + + * cccp.c (VMS_fstat, VMS_stat): New functions. + +Fri Apr 7 19:25:21 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (collect_expansion): If traditional, set stringify + member to SHARP_TOKEN regardless of the value of + stringify_sharp_token_type. + +Fri Apr 7 07:48:35 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (simplify_unary_operation): #ifdef POINTERS_EXTEND_UNSIGNED, + handle sign- or zero-extending addresses. + + * optabs.c (init{,_integral,_floating,_complex}_libfuncs): + Change SUFFIX to "char" to avoid confusion with prototype. + + * explow.c (convert_memory_address): No longer static. + New arg, TO_MODE. + Do something special for SYMBOL_REF, LABEL_REF, and CONST. + (memory_address): Add extra arg to call to convert_memory_address. + * rtl.h (convert_memory_address): Add extra arg. + * expr.c (expand_expr, case ADDR_EXPR): Always call + convert_memory_address when converting; add extra arg. + * stmt.c (expand_computed_goto): Convert from ptr_mode to Pmode. + + * gcc.c (OBJECT_SUFFIX): Default now ".o", not "o". + (all specs): Remove "." before %O; use %O in a few missing cases. + * i386/os2.h (OBJECT_SUFFIX): Delete from here. + * i386/xm-os2.h (OBJECT_SUFFIX): Move to here; now has period. + + * Makefile.in (STAGESTUFF): Use $(exeext) for executables. + +Fri Apr 7 03:32:29 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * config.sub: Accept -lites* as op sys. + +Thu Apr 6 23:08:50 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * cpplib.c (bcopy, bzero, bcmp): Remove #undefs. + * cppalloc.c (xcalloc): Re-implement using calloc, + rather than malloc+bzero. + * cpplib.c (SELF_DIR_DUMMY): New macro. + (do_include): Don't pass searchptr to finclude if it is dsp, + since that is on the stack, and would cause a dangling pointer. + If handling #include_next, recognize SELF_DIR_DUMMY. + +Fri Apr 7 00:54:24 1995 Jeffrey A. Law <law@snake.cs.utah.edu> + + * pa.h (MACHINE_DEPENDENT_REORG): Define. + * pa.md (switch_jump): New pattern for jumps which implement + a switch table. + * pa.c (pa_reorg): New function to explode jump tables. + (pa_adjust_insn_length): Account for jumps in switch tables with + unfilled delay slots. + +Thu Apr 6 14:31:10 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * c-typeck.c (build_binary_op): Don't call common_type for + uncommon pointer types. + +Wed Apr 5 13:53:17 1995 Per Bothner <bothner@kalessin.cygnus.com> + + Re-write fixproto/fix-header/etc to use cpplib: + * fix-header.c: Comment out support for adding missing extern "C" + using #ifdef ADD_MISSING_EXTERN_C instead of #if 0. + * fixproto: Removed case of required functions. Instead use ... + * fix-header.c (std_include_table): ... new required-functions table. + (cpp_file_line_for_message, cpp_print_containing_files, cpp_message): + New stub functions, to intercept cpplib error message. + * fixproto: Don't call $CPP, since fix-header now incorporates cpplib. + * gen-protos.c (fatal, hashf): New functions. + (main): Use hashf, instead of hash. + * scan-decls.c (scan_decls, skip_to_closing_brace): Re-write to + take a cpp_reader* as argument, not a FILE*. + * scan.h (hash): Make parameter const. + * scan.c (hash): Removed. + * scan.c (memory_full, xmalloc, xrealloc): Removed. + Use functions from cppalloc.c instead. + * Makefile.in (gen-prtos, fix-header, stmp-fixproto): Update. + +Wed Apr 5 13:24:14 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * cpplib.c (cpp_get_token): If traditional, return after comment, + instead of reading more, so end-of-line can be peeked at. + * cpperror.c (cpp_file_line_for_message, cpp_message): New + functions, that do the actual printing of error messages. + (cpp_print_file_and_line, cpp_error, cpp_warning, cpp_pedwarn, + cpp_error_with_line, cpp_warning_with_line, cpp_pedwarn_with_line, + cpp_pedwarn_with_file_and_line, cpp_error_from_errno, my_strerror, + cpp_perror_with_name): Re-write to use cpp_file_line_for_message + and cpp_message, and move to cpplib.c. + +Tue Apr 4 23:35:49 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * config/gnu.h (GNU_CPP_PREDEFINES): Remove -D__HURD__. + +Tue Apr 4 17:15:54 1995 Jeffrey A. Law <law@mole.gnu.ai.mit.edu> + + * pa.h (DO_GLOBAL_DTORS_BODY): Fix pointer -> integer assignment + problem. + + * reorg.c (fill_simple_delay_slots): Don't use a JUMP_INSN + a the target of another JUMP_INSN to fill a delay slot. + +Mon Apr 3 19:03:48 1995 Torbjorn Granlund <tege@adder.cygnus.com> + + * cse.c (simplify_unary_operation): Sign-extend constants when + they have the most significant bit set for the target. + + * m68k.md (umulsi3_highpart): Test for CONST_INT and CONST_DOUBLE, + not CONSTANT_P. + (smulsi3_highpart): Likewise. + * m68k.c (const_uint32_operand): New function. + (const_sint32_operand): New function. + * m68k.md (const_umulsi3_highpart): Use const_uint32_operand instead + of immediate_operand for op3. Delete mode. + (const_smulsi3_highpart): Analogous change. + +Mon Apr 3 19:03:48 1995 Jim Wilson <wilson@cygnus.com> + + * cse.c (simplify_binary_operation): Sign-extend constants when + they have the most significant bit set for the target. + + * combine.c (force_to_mode, case PLUS): Sign extend masks that are + negative in OP_MODE. + (simplify_and_const_int): Sign-extend constants when they have the + most significant bit set for the target. + (merge_outer_ops): Likewise. + (simplify_shift_const): Likewise. + +Mon Apr 3 18:23:48 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * toplev.c (lang_options): Add -f{no-,}repo. + +Mon Apr 3 18:13:15 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * combine.c (nonzero_bits, case REG): Check POINTERS_EXTEND_UNSIGNED. + (num_sign_bit_copies, case REG): Likewise. + * explow.c (convert_memory_address): New function. + (memory_address): Call if it needed. + (promote_mode, case POINTER_TYPE): Use Pmode and pointer extension. + (allocate_dynamic_stack_space): Convert size from ptr_mode. + * expr.c (clear_storage, expand_assignment, store_{expr,constructor}): + Use ptr_mode instead of Pmode in some places. + (expand_expr, expand_builtin): Likewise. + (push_block, store_expr): Convert size to Pmode. + (expand_expr, case ADDR_EXPR): Convert from Pmode to ptr_mode. + +Mon Apr 3 18:00:52 1995 Jim Wilson <wilson@cygnus.com> + + * explow.c (allocate_dynamic_stack_space): Correct typo in last + change. + + * sh.c (gen_shifty_op, case ASHIFTRT): Return 0 if shift count is not + a constant. + +Mon Apr 3 12:17:10 1995 Michael Meissner (meissner@cygnus.com) + + * expmed.c (extract_bit_field): When converting a SUBREG into a + REG, if the system is big endian, adjust the bit offset + appropriately. + +Mon Apr 3 00:08:45 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * config/i386/linux.h: Include "config/linux.h" instead of + "linux.h", to avoid recursion. + +Sun Apr 2 23:50:27 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * config/i386/gnuelf.h: Include i386/linux.h instead of + i386/linuxelf.h. + +Sun Apr 2 17:35:10 1995 Jim Wilson <wilson@cygnus.com> + + * cse.c (simplify_relational_operation): Don't simplify A-B for + compare of A and B when the compare is unsigned. + +Sun Apr 2 08:23:38 1995 Paul Eggert <eggert@twinsun.com> + + * fixincludes (stdio.h): BSDI 2.0 changed the spelling of _VA_LIST_ + to _BSD_VA_LIST_. + +Sun Apr 2 07:57:28 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * i386/xm-bsd386.h: New file. + * configure (i[345]86-*-bsd*): Add xm_file. + + * gcc.c (default_compilers): Pass -W and -w to gnat1. + + * winnt/winnt.h (STDC_VALUE): Add #undef. + * i386/winnt.h (LIB_SPEC): Likewise. + +Sun Apr 2 07:55:25 1995 Douglas Rupp (drupp@cs.washington.edu) + + * i386/winnt.h (RETURN_POPS_ARGS, ENCODE_SECTION_INFO): Call + chain_member_purpose, not chain_member_value. + (ASM_FILE_START, LIB_SPEC): Move to here. + * winnt/winnt.h (ASM_FILE_START, LIB_SPEC): Delete from here. + * tree.c (chain_member_purpose): New function. + +Sat Apr 1 12:19:14 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * c-typeck.c (build_binary_op): New variable build_type controls + type given to expression when created. Set to integer_type_node for + comparison ops instead of result_type so result_type still holds type + in which comparison is done. When checking for comparison between + signed and unsigned, use result_type rather than (possibly shortened) + type of op0. Don't warn about equality comparison of signed operand + to unsigned constant that fits in signed type. + +Sat Apr 1 09:47:02 1995 Douglas Rupp (drupp@cs.washington.edu) + + * i386/winnt.h (CPP_PREDEFINES): Add definitions for __stdcall + and __cdecl. + * winnt/winnt.h (LIB_SPEC): Add OLDNAMES.LIB. + * winnt/xm-winnt.h: Remove unneeded #define's for non-ANSI functions. + * fixinc.winnt: Remove unneeded fixes relating to __stdcall. + + * objc/Makefile (SHELL): New definition. + +Sat Apr 1 08:25:26 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * cse.c (cse_insn): When emitting a BARRIER, don't put it after + a deleted insn. + + * reload.c (push_reload): Initialize secondary_{in,out}_icode. + + * gcc.c (print_multilib_info): Don't use LAST_PATH if not set. + +Sat Apr 1 08:15:59 1995 Pat Rankin (rankin@eql.caltech.edu) + + * vax.md (extv, extzv): Don't use immediate value for operand 1. + +Sat Apr 1 07:48:29 1995 Yury Shevchuk (sizif@botik.yaroslavl.su) + + * stmt.c (expand_asm_operands): Properly ignore invalid reg in clobber. + +Sat Apr 1 07:02:24 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c: General code cleanup. + Add prototypes for static functions. + Remove unnecessary casts to (char *); add casts to (U_CHAR *). + Add parentheses suggested by `gcc -Wparentheses'. + Rename local variables as suggested by `gcc -Wshadow'. + <fcntl.h>, <stdlib.h>, <string.h>, <unistd.h>: New includes. + <sys/time.h>, <sys/resource.h>: Include only if defined(RLIMIT_STACK). + <time.h>: Include, unless <sys/time.h> already does. + (HAVE_FCNTL_H, HAVE_STDLIB_H, HAVE_SYS_TIME_H): New symbols. + (HAVE_UNISTD_H, STDC_HEADERS, TIME_WITH_SYS_TIME): Likewise. + (__attribute__, PROTO, VA_START, PRINTF_ALIST, PRINTF_DCL): New macros. + (PRINTF_PROTO{,_1,_2,_3}, DO_PROTO): Likewise. + (bcopy, bzero, bcmp): If #defined by configuration file, use that. + If STDC_HEADERS is defined, use standard C functions. + If BSTRING is defined, or USG and VMS are not defined, use + the C library. Otherwise, use my_bcopy, my_bzero, my_bcmp. + (localtime): Remove no-longer-necessary explicit declaration. + (getenv, index, rindex): Don't declare explicitly if the + appropriate system header should declare it. + (fdopen): Remove no-longer-used declaration. + (vprintf): Define a subsitute macro if !defined(HAVE_VPRINTF). + (main): Replace `fdopen (dup (fileno (stdout)), "w"))' + with `stdout'. + (get_lintcmd, rescan, create_definition): Use bcmp instead of strncmp + when both operands are known to be free of null bytes. + (check_macro_name, compare_defs, collect_expansion): Likewise. + (do_assert, compare_token_lists, assertion_lookup, do_line): Likewise. + (skip_if_group, lookup): Likewise. + (rescan): Remove unused label `startagain'. + Abort instead of printing nonsense if the stack is corrupted + when there was an unterminated successful conditional. + (pcfinclude): Include explicit double-cast through GENERICPTR + to identify particularly egregious type puns. + (create_definition, do_define, check_macro_name): Use %.*s + printf format to avoid painful copying-and-casting. + (do_once): Return void, not (unused) int. + (do_ident, do_pragma, do_sccs): Accept extra arguments so that + all directive-handler's types match. + (do_sccs): Define only if SCCS_DIRECTIVE is defined. + (skip_if_group, dump_single_macro): Add `default: break;' to + keep -Wswitch happy. + (error, warning, error_with_line, vwarning_with_line, pedwarn): Use + stdarg/vararg/vfprintf instead of passing bogus char * args around. + (pedwarn_with_line, pedwarn_with_file_and_line, fatal): Likewise. + (verror, vwarning, verror_with_line, vwarning_with_line): New fcns. + (dump_single_macro): Abort if ap points to garbage. + (make_definition, make_undef, make_assertion): Parameter now char *. + (xmalloc, xrealloc, xcalloc, savestring, index0): Make sizes size_t + instead of unsigned; make pointer parameters GENERICPTR, not char *. + (xcalloc): Use bzero to clear memory instead of using own loop. + +Fri Mar 31 08:33:07 1995 Ken Raeburn (raeburn@wombat.gnu.ai.mit.edu) + + * longlong.h (umul_ppmm mc68000): Use %# instead of #. + +Fri Mar 31 06:37:54 1995 Michael Meissner (meissner@cygnus.com) + + * stor-layout.c (layout_decl): Implment -fpack-struct. + (layout_record): Ditto. + + * flags.h (flag_pack_struct): New flag variable. + + * toplev.c (flag_pack_struct): New flag variable. + (f_options): Add -fpack-struct support. + + * Makefile.in (stor-layout.o): Add flags.h dependency. + +Fri Mar 31 08:40:16 1995 Douglas Rupp (drupp@cs.washington.edu) + + * configure (i[345]86-*-winnt3*): Add tmake_file. + * i386/x-winnt (winnt.o): Deleted. + * i386/t-winnt: New file. + +Fri Mar 31 07:26:37 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * m68k/netbsd.h, m68k/hp3bsd44.h: Remove #include of machine/ansi.h. + + * configure (a29k-*-bsd): Set tmake_file to t-libc-ok. + + * stmt.c (expand_asm_operands): Properly handle output that can't + be directly written into. + + * c-parse.in (structsp): Correct error in last change. + * c-common.c (init_attributes): A_FORMAT is only for decls. + +Thu Mar 30 18:27:34 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * libgcc2.c: Remove explicit 0-initializations of static variables. + +Thu Mar 30 18:22:39 1995 Fergus Henderson <fjh@cs.mu.oz.au> + + * c-typeck.c (internal_build_compound_expr): Warn if LHS of comma + expression has no side effects, or computes value which is not used. + * stmt.c (make warn_if_unused_value): No longer static. + * tree.h (warn_if_unused_value): Add declaration. + +Thu Mar 30 18:15:11 1995 Jim Wilson <wilson@cygnus.com> + + * combine.c (get_last_value): Revert back to use prev_nonnote_insn + instead of prev_real_insn. Modify test that ignores USE insns. + + * rs6000.h (SELECT_SECTION): Apply constant DECL_INITIAL test + only to DECLs. + + * explow.c (allocate_dynamic_stack_space): Test STACK_BOUNDARY against + BIGGEST_ALIGNMENT at run time instead of at compile time. + Give MUST_ALIGN macro a value, and test this value in if statements. + +Thu Mar 30 08:59:56 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-parse.in: Now have 27 shift/reduce conflicts. + (attribute_list): Just make chain of all attributes. + (attrib): Consistently put name as PURPOSE, args, if any, as VALUE. + (structsp): Allow attributes on any struct or union. + * c-common.c (enum attrs): New enum class. + (attrtab, attrtab_idx): New variables. + (add_attribute, init_attributes): New functions. + (decl_attributes): Major rewrite. + * tree.c (valid_machine_attribute): Now receive name and args. + +Thu Mar 30 07:20:14 1995 Paul Eggert <eggert@twinsun.com> + + * protoize.c: Use the phrase `preprocessing directive' consistently. + * cccp.c (handle_directive, do_line, skip_if_group): Likewise. + (output_line_directive): Renamed from output_line_command. + (no_line_directives): Renamed from no_line_commands. + + * cccp.c (rescan): Don't recognize preprocessing directives + within macro args. Warn if one is found. + +Thu Mar 30 06:20:36 1995 H.J. Lu (hjl@nynexst.com) + + * configure (i[345]86-*-linux*): Set xmake_file=x-linux, + tm_file=i386/linux.h, and don't set extra_parts. + (i[345]86-*-linux*aout*): New configuration. + (i[345]86-*-linuxelf): Deleted. + * config/linux{,-aout}.h, config/x-linux, config/xm-linux.h: New files. + * config/i386/linux-aout.h: New file. + * config/i386/linux.h: Extensive modifications to use ELF format + as default. + (LIB_SPEC): Don't use libc_p.a for -p. don't use libg.a + unless for -ggdb. + (LINUX_DEFAULT_ELF): Defined. + * config/i386/linuxelf.h,config/i386/x-linux: Files deleted. + * config/i386/xm-linux.h: Just include xm-i386.h and xm-linux.h. + +Wed Mar 29 19:09:36 1995 Mike Stump <mrs@cygnus.com> + + * libgcc2.c (__throw_type_match): Update to use new calling convention. + +Wed Mar 29 14:53:23 1995 Jim Wilson <wilson@cygnus.com> + + * gcc.c (process_command): Delete code modifying gcc_exec_prefix. + (main): Put it here after last use of gcc_exec_prefix. For cross + compiler, set startfile_prefixes if gcc_exec_prefix is set and + standard_startfile_prefix is a relative path. + + * combine.c (make_compound_operation, AND case): Undo July 7, 1994 + change. + + * mips/mips.md (call_internal1, call_value_internal1): Move %* from + start of assembler output to immediately before the jal. + + * mips/mips.c (function_prologue): Put SDB_DEBUGGING_INFO ifdef around + code for SDB_DEBUG support. + (mips_select_rtx_section, mips_select_section): Change rdata_section + to READONLY_DATA_SECTION and sdata_section to SMALL_DATA_SECTION. + * mips/mips.h (SMALL_DATA_SECTION): Define. + + * reorg.c (mark_referenced_resources): Make setjmp use all registers. + + * flow.c (mark_used_regs, case SUBREG): Only fall through to REG case + if operand is a REG. + + * i960/i960.h (TARGET_SWITCHES): Make -mold-align set + TARGET_FLAG_STRICT_ALIGN. + (STRICT_ALIGNMENT): Test TARGET_STRICT_ALIGN. + + * sh/sh.c (andcosts): Modify costs to match the hardware, and add + explanatory comments. + + * sparc/sol2.h (CPP_PREDEFINES): Add -D__SVR4. + +Wed Mar 29 14:30:30 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/rs6000.md (movsf): When moving to/from integer registers, + don't move floating point to memory if it is being simulated with + -msoft-float. + +Wed Mar 29 06:47:36 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-parse.in (initdcl): Only call decl_attributes once. + * c-common.c (decl_attributes): Clean up test for __mode__. + +Tue Mar 28 08:34:37 1995 John Hassey (hassey@dg-rtp.dg.com) + + * i386.md (adddi3): Don't treat two non-equal MEMs as non-aliasing. + +Tue Mar 28 08:20:49 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * a29k.h (CONSTANT_ADDRESS_P): Provide consistent definition. + +Tue Mar 28 07:26:41 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (do_xifdef, do_endif): Remove unnecessary pointer comparisons. + +Mon Mar 27 20:45:15 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * calls.c (expand_call, store_one_arg): Don't set KEEP in calls + to assign_stack_temp. + * function.c (preserve_temp_slots): Clear ADDR_TAKEN on item + that we are preserving. + +Mon Mar 27 14:39:35 1995 Ian Lance Taylor <ian@cygnus.com> + + * mips/mips.h (FIRST_PSEUDO_REGISTER): Increment. + (FIXED_REGISTERS, CALL_USED_REGISTERS): Add new register. + (MD_REG_LAST): Increment. + (ST_REG_FIRST, ST_REG_LAST): Increment. + (HILO_REGNUM): Define. + (enum reg_class): Add HILO_REG. + (REG_CLASS_NAMES): Add "HILO_REG". + (REG_CLASS_CONTENTS): Add HILO_REG initializer, and adjust ST_REGS + and ALL_REGS initializers. + (SECONDARY_RELOAD_CLASS): Remove. + (SECONDARY_INPUT_RELOAD_CLASS): Define. + (SECONDARY_OUTPUT_RELOAD_CLASS): Define. + (REGISTER_MOVE_COST): Treat HILO_REG as MD_REGS. + (REGISTER_NAMES): Add initialization line. + (DEBUG_REGISTER_NAMES): Add "accum". + * mips/mips.md: For each instruction which sets HI or LO, clobber + HILO_REGNUM with (clobber (match_scratch:MODE N "=a")). Change + each explicit reference to register 66 to register 67. + (mulsidi3): Change to define_expand. + (mulsidi3_internal): New name of old mulsidi3. + (mulsidi3_64bit): New insn. + (umulsidi3): Change to define_expand. + (umulsidi3_internal): New name of old umulsidi3. + (umulsidi3_64bit): New insn. + (madddi_64bit, umaddi_64bit): New insns. + (movdi_internal2): Add case for setting HILO_REG to zero. + (reload_indi, reload_outdi): New define_expands. + (movsi_internal1, movsi_internal2): Add cases for setting MD_REGS + to zero, and for setting a general reg to HILO_REG. + (reload_outsi): New define_expand. + * mips/mips.c (mips_reg_names): Add "accum". + (mips_sw_reg_names): Likewise. + (mips_regno_to_class): Map HILO_REGNUM to HILO_REG. + (mips_move_1word): Handle moving HILO_REGNUM to a general + register. Make sure that the normal MD_REG cases aren't used for + HILO_REGNUM. Handle moving zero to a MD_REG. + (mips_move_2words): Make sure that the normal MD_REG cases aren't + used for HILO_REGNUM. Handle moving zero to a MD_REG. + (override_options): Set mips_char_to_class for 'a' and 'b'. + (mips_secondary_reload_class): Add in_p argument. Handle + HILO_REGNUM. + +Mon Mar 27 07:16:05 1995 Warner Losh <imp@village.org> + + * gcc.c: Removed __NetBSD__ from conditional. + Declare strerror if HAVE_STRERROR is defined; otherwise + declare sys_errlist and sys_nerr. + (my_strerror): New function. + +Fri Mar 24 18:08:14 1995 Jason Merrill <jason@python.cygnus.com> + + * i386/linux.h (LIB_SPEC): Don't try to link with libraries we + know only exist in archive form unless -static. + +Fri Mar 24 16:12:16 1995 Doug Evans <dje@cygnus.com> + + * Makefile.in (multilib.h): Depend on Makefile, not config.status. + +Fri Mar 24 15:01:17 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/rs6000.h (TARGET_MULTIPLE_SET): New target_flags bit that + indicates -mmultiple or -mno-multiple was explicitly passed by the + user, and not set as part of the cpu defaults. + (TARGET_SWITCHES): Set TARGET_MULTIPLE_SET bit for both -mmultiple + and -mno-multiple. + + * rs6000/rs6000.c (rs6000_override_options): If -mmultiple or + -mno-multiple was explicitly used, don't override the setting with + the processor default. + +Wed Mar 22 21:42:13 1995 Doug Evans <dje@cygnus.com> + + * i960/i960.c (i960_function_arg_advance): Ensure all regs marked + as used if stack is also used (for va_start). + (i960_setup_incoming_varargs): Rewrite to be similar to Intel's + version, but don't allocate reg block unless necessary. + * ginclude/va-i960.h (varargs va_start): Save g14 explicitly. + Account for arguments preceding va_alist. + +Wed Mar 22 13:24:55 1995 Torbjorn Granlund <tege@adder.cygnus.com> + + * pa.c (singlemove_string): Handle SFmode constants again. Simplify. + (zdepi_cint_p): Make some variables HOST_WIDE_INT. + (lhs_lshift_cint_operand): Likewise. + (output_and): Likewise. + (output_ior): Likewise. + +Wed Mar 22 12:40:09 1995 Jim Wilson <wilson@chestnut.cygnus.com> + + * sh.md (udivsi3): Don't clobber register 6. + (udivsi3, divsi3, mulsi3_call): Use a pseudo-reg with regclass 'z' + for output rather than hard register 0. + (block_move_real): Don't clobber registers 4 and 5. + + * mips.c (mips_select_section): Apply constant DEC_INITIAL tests + only to VAR_DECLs. + +Wed Mar 22 03:53:17 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * config.sub (rm400, rm600): New machine names. + (sinix5.*, sinix): New os aliases. + (mips-siemens): Default os to sysv4. + +Mon Mar 20 21:56:47 1995 Per Bothner <bothner@kalessin.cygnus.com> + + Merged Paul Eggert's patch to cccp.c of Wed Mar 8 18:21:51 1995: + * cpplib.c (do_include): Fix type typo: pcfbuflimit is char *, not int. + + Merged Doug Evans' patch to cccp.c of Mon Feb 27 17:06:47 1995: + * cpplib.c (do_include): Check for redundant file before opening in + relative path case. Don't call fstat unnecessarily. + + Merged J.T. Conklin's patch to cccp.c of Wed Feb 22 20:29:31 1995: + * cpperror.c: Removed __NetBSD__ from conditional. + + Merged Kenner's patch to cccp.c & cexp.y of Tue Sep 20 17:49:47 1994: + * cppexp.c (struct operation): Make value by HOST_WIDE_INT. + (cpp_parse_expr): Change return type to HOST_WIDE_INT. + * cpplib (eval_if_expr): Likewise. + (do_if, do_elif): Update appropriately. + * cpplib.h (cpp_parse_expr): Removed, to avoid defining HOST_WIDE_INT. + + Merged Paul Eggert's patch to cccp.c of Mon Aug 8 19:42:09 1994: + * cpplib.c (create_definition): Warn about `#define a@', since a + diagnostic is now required (see ISO TC1's addition to subclause 6.8). + Also warn about `#define is-empty(x) (!x)'. + +Tue Mar 21 00:10:50 1995 Jeffrey A. Law <law@mole.gnu.ai.mit.edu> + + * x-pa (CC): Add "-Dbsd4_4". + +Mon Mar 20 18:40:31 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * toplev.c (print_error_function): New function hook. + (default_print_error_function): New function. Default value + of print_error_function. Code moved here from report_error_function. + (report_error_function): Use print_error_function hook. + +Mon Mar 20 20:27:43 1995 Doug Evans <dje@cygnus.com> + + * cccp.c (do_xifdef): Handle c++ comments. + (do_endif): Likewise. + +Mon Mar 20 15:31:45 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * configure (i386 configurations): Prepend i386/ to t-crt*. + +Mon Mar 20 07:58:04 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * stmt.c (fixup_gotos): Add missing call from last change. + + * objc/misc.c: Put Alpha-specific decls before #include of runtime.h. + + * alpha.h (EXTRA_SECTIONS): Write zeros first time in .rdata. + +Sat Mar 18 16:37:24 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * flow.c (mark_used_regs, case SUBREG): Set reg_changes_size even + for integer modes. + (mark_used_regs): Set reg_changes_size for RHS, if necessary. + * combine.c (gen_lowpart_for_combine): Set reg_changes_size, if needed. + * reload.c (push_reload): Reload a SUBREG if paradoxical and + class is CLASS_CANNOT_CHANGE_SIZE. + * reload1.c (gen_reload): Handle paradoxical SUBREGs. + * alpha.h (SECONDARY_{INPUT,OUTPUT}_RELOAD_CLASS): Need GENERAL_REGS + for paradoxical SUBREG and FLOAT_REGS. + (SECONDARY_NEEDED_MODE): Use actual mode for 4 bytes or wider. + * alpha.md (movsi): Allow FP regs and add case for store of FP reg. + Remove cvtlq from MEM to FP reg case. + + * rtl.h (emit_insns_after): Add declaration. + * stmt.c (fixup_gotos): Do a cleanup for a block when it is exited + even if label if not defined yet. + + * function.c (pop_function_context): Fix error in last change; + reference old value of current_function_decl before we modify it. + +Fri Mar 17 21:57:44 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * toplev.c (rest_of_compilation): Handle -Wreturn-type properly + for inlines we aren't compiling yet. + +Fri Mar 17 21:26:48 1995 Mike Stump <mrs@cygnus.com> + + * libgcc2.c (__register_exceptions): Handle empty tables. + +Fri Mar 17 11:48:31 1995 Douglas Rupp (drupp@cs.washington.edu) + + * i386/winnt.c (winnt_function_prologue): Deleted. + (gen_stdcall_suffix): New function. + +Thu Mar 16 17:36:52 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * svr4.h (LINK_SPEC): If the user did not specify -h name, use the + output file name, if any. + * sparc/sol2.h (LINK_SPEC): Ditto. Also, if the user did not + specify -R path, add an -R for each -L. + + Move SunOS 4-specific assembler switches into the appropriate place. + * m68k/sun[23].h (ASM_SPEC): Add %{R} %{j} %{J} %{h} %{d2} + %{keep-local-as-symbols:-L}. + * i386/sun.h (ASM_SPEC): Add %{R} %{keep-local-as-symbols:-L}. + * sparc/sparc.h (ASM_SPEC): Ditto. + * gcc.c (default_compilers): Remove %{R} %{j} %{J} %{h} %{d2} + %{keep-local-as-symbols:-L} from assembler rules. + +Thu Mar 16 16:58:09 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/eabi-ctors.c: New file, handle C++ static constructors + and destructors without requiring anything else from a libc. + + * rs6000/t-eabi (LIB2FUNCS_EXTRA): Build eabi-ctors.c. + + * rs6000/eabi.asm: Do not load up register 2 if there is no .got + section. Jump to the __do_global_ctors function at the end of + processing to call C++ static constructors, and it will return to + __eabi's caller. Use normal volatile registers, instead of saving + and restoring registers 30 and 31. + + * rs6000/eabi.h (STARTFILE_SPEC): Define as null. + (LIB_SPEC): Ditto. + (ENDFILE_SPEC): Ditto. + (LIBGCC_SPEC): Always look for libgcc.a. + +Thu Mar 16 17:05:14 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * stmt.c (warn_if_unused_value, case SAVE_EXPR): New case. + (warn_if_unused_value, case NOP_EXPR): OK if CALL_EXPR inside. + + * c-common.c (decl_attributes): Allow alignment for TYPE_DECLs. + + * Makefile.in (xsys-protos.h): Fix typo in -U operand. + +Thu Mar 16 13:49:10 1995 Per Bothner <bothner@rtl.cygnus.com> + + * cpplib.c, cpplib.h: New files - a C PreProcessor library. + * cpphash.c, cpphash.h, cppalloc.c, cpperror.c, cppexp.c: + New files - utility features used by cpplib. + * cppmain.c: New file - cpp replacement main program for cpplib. + * Makefile.in: New rules to build cppmain. + +Thu Mar 16 16:11:05 1995 Douglas Rupp (drupp@cs.washington.edu) + + * i386/winnt.h (FUNCTION_PROLOGUE, HAVE_probe, gen_probe): Deleted. + (ENCODE_SECTION_INFO, VALID_MACHINE_DECL_ATTRIBUTE): New macro. + +Thu Mar 16 15:58:24 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * combine.c (apply_distributive_law, case SUBREG): Fix typo when + checking for paradoxical SUBREG. + +Wed Mar 15 18:45:08 1995 Doug Evans <dje@cygnus.com> + + * libgcc1-test.c: Renamed from cross-test.c. + * Makefile.in (LIBGCC1_TEST): Renamed from CROSS_TEST. + (all.cross): Delete $(ENQUIRE) dependency. + (libgcc1-test): Renamed from cross-test. + Delete unnecessary gcc-cross and $(LIBGCC) dependencies. + Link with -nostartfiles -nostdlib + `$(GCC_FOR_TARGET) --print-libgcc-file-name`. + (libgcc1-test.o): Renamed from cross-test.o. + Change gcc-cross dependency to xgcc since the latter is used. + +Wed Mar 15 13:49:21 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * tree.c (save_tree_status): Now takes a tree 'context' instead of + a boolean 'toplevel' as an argument. If 'context' is not + current_function_decl, create a new obstack for the new function. + Also save inline_obstacks. + (restore_tree_status): No longer takes a second argument. Also + restore inline_obstacks. + (temporary_allocation): Clear inline_obstacks. + (permanent_allocation): Free up the obstacks in inline_obstacks. + + * function.h (struct function): New fields contains_functions and + inline_obstacks. + + * function.c (push_function_context_to): Now takes a tree + 'context' instead of a boolean 'toplevel' as an argument. + Also save current_function_contains_functions. + (push_function_context): Pass current_function_decl to it. + (pop_function_context_from): Takes 'context' instead of 'toplevel'. + Set current_function_contains_functions properly. + (pop_function_context): Pass current_function_decl to it. + +Wed Mar 15 14:53:09 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/rs6000.md (abssi2): Turn into a define_expand. If + TARGET_POWER, do old code that uses the abs instruction. If not, + do abs in three instructions, using a temporary register, which + enables generating more reasonable code for sne. Add a recognizer + for negative of the absolute value. Add define_splits for the + PowerPC. + (sne insn): Add a recognizer for sne on the PowerPc to use two + instructions, compared to the four generated using the absolute + value insn. + +Tue Mar 14 18:38:40 1995 J.T. Conklin <jtc@cygnus.com> + + * m68k.md ({add,sub,mul,div}[sdx]f3): Add new patterns for recognizing + SImode, HImode, and QImode operands. + +Mon Mar 13 18:59:36 EST 1995 David Edelsohn <edelsohn@mhpcc.edu> + + * rs6000.h (CPP_SPEC): Add PPC403. + (processor_type): Add PPC403. + (RTX_COSTS): Add PPC403. + * powerpc.h (CPP_SPEC): Add PPC403. + * sysv4.h (CPP_SPEC): Add PPC403. + * rs6000.c (processor_target_table): Add PPC403. + * rs6000.md (define_attr cpu and function units): Add PPC403. + +Mon Mar 13 14:40:23 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/rs6000.md (call, call_value insns): Do not put a nop + after a bl instruction on System V.4 and eABI. + + * rs6000/sysv.4 (SUBTARGET_SWITCHES): Add support for + -mno-traceback to suppress the V.4 traceback word. + (ASM_DECLARE_FUNCTION_NAME): Don't put out a traceback work if + -mno-traceback. + +Mon Mar 13 13:36:37 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * t-svr4, i386/t-{crtpic,sol2}, m88k/t-svr4, sparc/t-sol2: + Use -fPIC, rather than -fpic, for building crtstuff. + +Sat Mar 11 17:27:08 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * configure: Use aix3newas.h for AIX 3.2.4 and 5. + * rs6000/aix41.h: Undefine ASM_OUTPUT_EXTERNAL{,_LIBCALL}. + * rs6000/aix3newas.h: New file. Define ASM_SPEC to -u, and + undefine ASM_OUTPUT_EXTERNAL{,_LIBCALL}. + +Sat Mar 11 06:42:50 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * dbxout.c (dbxout_symbol): Properly handle decl whose DECL_NAME + points to a TYPE_DECL with a zero TYPE_NAME. + +Fri Mar 10 18:18:33 1995 Torbjorn Granlund <tege@cygnus.com> + + * pa.h (PROMOTE_MODE): Define. + +Fri Mar 10 14:37:58 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * sdbout.c (sdbout_record_type_name): If TYPE_NAME is + a TYPE_DECL, get name from DECL_NAME. + +Fri Mar 10 14:09:26 1995 Doug Evans <dje@cygnus.com> + + * arm/riscix.h (SUBTARGET_SWITCHES): Renamed from + ARM_EXTRA_TARGET_SWITCHES. + * arm/riscix1-1.h (SUBTARGET_SWITCHES): Likewise. + * arm.h (SUBTARGET_SWITCHES): Likewise. + (TARGET_HARD_FLOAT, TARGET_SOFT_FLOAT): Define. + (TARGET_SWITCHES): Add -msoft-float, -mhard-float. + (BYTES_BIG_ENDIAN): Delete #ifndef/#endif. + (CONDITIONAL_REGISTER_USAGE): If -msoft-float, disable fp regs. + (FUNCTION_VALUE): R16 is return reg only if !-msoft-float. + (LIBCALL_VALUE): Likewise. + * arm.md (all fp patterns): Conditionalize on TARGET_HARD_FLOAT. + (*movsf_soft_insn, *movdf_soft_insn): New patterns. + +Fri Mar 10 13:53:46 1995 Jim Wilson <wilson@cygnus.com> + + * reorg.c (steal_delay_list_from_target): Exit at the top if the + branch in SEQ is not a single set. + + * sh.md (movdi define_split, movdf define_split): Correct indentation + and formatting. Make the condition fail if an operand is a MEM + with an auto-inc address. + + * varasm.c (copy_constant): Copy operand of ADDR_EXPR if it is a + constant. + + * mips/abi64.h (SETUP_INCOMING_VARARGS): Correct arguments to + move_block_from_reg call. + + * expr.c (expand_assignment): When offset is zero, make new MEM + before setting MEM_VOLATILE_P. + + * reload.c (find_reloads, case 'o'): Accept a fully reloaded + auto-increment address. + + * combine.c (max_uid_cuid): New static variable. + (INSN_CUID): Call abort if INSN is out of range. + (combine_instructions): Set max_uid_cuid. Set uid_cuid directly + instead of through INSN_CUID. + (get_last_value): Use prev_real_insn instead of prev_nonnote_insn. + Ignore USE insns generated by combine. + +Fri Mar 10 13:47:08 1995 Rod Barman <rodb@cs.ubc.ca> + + * m68k/fpgnulib.c (__fixdfsi): Catch values < 0.5 in magnitude. + +Fri Mar 10 12:02:33 1995 Ian Lance Taylor <ian@cygnus.com> + + * fixincludes: Fix `typedef struct term;' on hppa1.1-hp-hpux9. + +Fri Mar 10 05:50:11 1995 Oliver Kellogg (Oliver.Kellogg@RST13.DASA.DBMAIL.d400.de) + + * 1750a.c (sectname): Reverse Init and Normal. + (print_operand_address, case PLUS): Add case for LABEL_REF. + (print_operand_address, case LABEL_REF): Split fom SYMBOL_REF. + (print_operand_address, case CODE_LABEL): New case. + (ASM_FILE_END): Delete. + * 1750a.h (FUNCTION_EPILOGUE): Restore stack before freeing local vars. + (DEFAULT_SIGNED_CHAR): Now 1. + (DATA_SECTION_ASM_OP): Use pseudo-op for read-only data (later copied). + (JUMP_TABLES_IN_TEXT_SECTION): Define. + (ASM_OUTPUT_ASCII): Split into multiple lines if long. + (ASM_OUTPUT_{CHAR,SHORT,INT,LONG_INT}): Split up. + (ASM_OUTPUT_COMMON): Call check_section. + +Thu Mar 9 12:46:53 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000.md (movsf): Do not call truncdfsf2 for non PowerPC + when expanding a store to memory and -msoft-float was used. + +Thu Mar 9 08:51:35 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * c-decl.c (start_function): Handle new parameter ATTRIBUTES. + * c-tree.h (start_function): Add new parameter. + * c-lang.c (finish_file): Pass new parm to start_function. + * objc-act.c (build_module_descriptor, really_start_method): Likewise. + * c-parse.in (fndef, nested_function): Pass prefix_attributes + to start_function. + (setspecs): Save prefix_attributes in declspec_stack. + (decl rules): Restore prefix_attributes along with current_declspecs. + (setattrs): Concatenate prefix_attributes to previous value. + * c-common.c (decl_attributes): Handle prefix and suffix attributes + the same way. + + * print-tree.c (print_node): Fix typo in printing large INTEGER_CST. + + * varasm.c (assemble_variable): Consistently use DECL_SIZE for + everything. + + * c-typeck.c (convert_for_assignment): Fix typo in testing for + pointer to function type. + + * varasm.c (record_constant_1): Handle NON_LVALUE_EXPR. + Rewrite to use switch instead of if/then/elseif/else. + +Wed Mar 8 18:21:51 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (do_include): Fix type typo: pcfbuflimit is char *, not int. + +Wed Mar 8 17:30:29 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * fold-const.c (force_fit_type): Always propagate OVERFLOW. + + * rtl.def (INLINE_HEADER): Add new "e" field. + * rtl.h (FORCED_LABELS): New field; other fields adjusted. + (gen_inline_header_rtx): New parm FORCED_LABELS. + * emit-rtl.c (gen_inline_header): Add new parm FORCED_LABELS. + * integrate.c (initialize_for_inline, output_inline_function): + Handle FORCED_LABELS. + +Wed Mar 8 13:47:20 1995 Jason Merrill (jason@cygnus.com) + + * alpha.h (WORD_SWITCH_TAKES_ARG): Add -rpath. + (LINK_SPEC): Pass through -taso and -rpath. + * alpha/osf12.h (LINK_SPEC): Ditto. + +Wed Mar 8 09:59:56 1995 Michael Meissner <meissner@cygnus.com> + + * rs6000/eabi.asm: Rewrite so that the initialized pointers go + into the .got2 section, which allows eabi.asm to be assembled with + the -mrelocatable option. Move the data picked up from the bl + instruction to before the traceback tag. + + * rs6000/sysv4.h (CPP_SPEC): Define _RELOCATABLE if -mrelocatable + switch is used. + + * libgcc2.c (__new_handler): Don't initialize the pointer variable + with the address of __default_new_handler, which may not work in + some shared library mechanisms. + (__builtin_new): If __new_handler is NULL, call the function + __default_new_handler. + +Tue Mar 7 17:34:59 1995 Ian Lance Taylor <ian@cygnus.com> + + * i960.h (PROCESS_PRAGMA): Define. + (ROUND_TYPE_ALIGN): Pass maximum of COMPUTED and SPECIFIED to + i960_round_align. + (ROUND_TYPE_SIZE): Delete. + * i960.c (process_pragma): Uncomment, and rewrite for gcc 2. + (i960_round_size): Delete. + (i960_round_align): Don't adjust suggested alignment downward. + Restrict alignment to value set by #pragma align. + +Tue Mar 7 12:14:46 1995 Doug Evans <dje@cygnus.com> + + * configure (sparc64-*-elf): Add crtbegin.o, crtend.o to extra_parts. + * sparc/sp64-elf.h (TARGET_VERSION): Define. + (CPP_PREDEFINES): Delete sun, sparc, unix. Delete OS assertions. + (ASM_SPEC): Define. + (LINK_SPEC): Delete solaris stuff, this is an embedded target. + (STARTFILE_SPEC, ENDFILE_SPEC): Define. + +Mon Mar 6 17:54:01 1995 Doug Evans <dje@cygnus.com> + + * Makefile.in (install-common): Fix typo in installation of cpp. + Likewise with gcc-cross. + +Mon Mar 6 02:29:05 1995 Jeffrey A. Law <law@mole.gnu.ai.mit.edu> + + * pa.md (movsicc): New expander. + +Fri Mar 3 13:34:20 1995 Michael Meissner (meissner@cygnus.com) + + * rs6000/sysv4.h (ASM_SPEC): If -mrelocatable was passed to + compiler, pass it on to the assembler. + +Fri Mar 3 12:11:28 1995 Ian Lance Taylor <ian@cygnus.com> + + * fixincludes: Add fixes for VxWorks header files. + * ginclude/stddef.h: If VxWorks typedef macros are defined, invoke + them as appropriate. + +Fri Mar 3 05:48:54 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (dump_single_macro): Fix typo: % wasn't properly + doubled in printf formats. + +Thu Mar 2 19:44:02 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * expr.c (expand_expr, CLEANUP_POINT_EXPR): Force the operand out + of memory before running cleanups. + +Thu Mar 2 19:15:24 1995 Paul Eggert <eggert@twinsun.com> + + * cccp.c (rescan): Prevent accidental token-pasting to + get !=, *=, /=, ==, or ^=. + +Thu Mar 2 15:37:13 1995 Jason Merrill <jason@phydeaux.cygnus.com> + + * c-typeck.c (build_binary_op): Avoid spurious warning + comparing enumerator to unsigned variable. + +Thu Mar 2 18:18:38 1995 J.T. Conklin <jtc@netbsd.org> + + * m68k.md (sqrtsf2,sqrtdf2): Use fp precision specifiers. + +Thu Mar 2 18:09:01 1995 Stephen L Moshier (moshier@world.std.com) + + * c-lex.c (yylex, case !NOT_FLOAT): Remove previous change. + +Thu Mar 2 15:26:50 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * Makefile.in (bootstrap*): Pass new STAGE_PREFIX to recursive makes. + +Wed Mar 1 14:52:16 1995 Ian Lance Taylor <ian@cygnus.com> + + * i960/i960-coff.h (ASM_FILE_START): Define. + (CTORS_SECTION_ASM_OP, DTORS_SECTION_ASM_OP): Define. + (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Define. + (CTORS_SECTION_FUNCTION, DTORS_SECTION_FUNCTION): Define. + (INT_ASM_OP): Define. + (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Define. + * i960/vx960-coff.h (CPP_PREDEFINES): Define. + (CPP_SPEC): Define. + (CC1_SPEC): Default to -mca. + +Wed Mar 1 11:10:54 1995 Michael Meissner (meissner@cygnus.com) + + * rs6000/rs6000.c (output_prologue): Do not emit the word that + gives the PC relative location to the local GOT table for the + -mrelocatable option here. + * rs6000/sysv4.h (ASM_DECLARE_FUNCTION_NAME): Emit it here. + + * t-eabi (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Build -msoft-float + and -mrelocatable versions of the library. + + * rs6000/powerpc.h (CPP_PREDEFINES): Define the cpu and machine as + powerpc, not rs6000. + + * libgcc2.c (_unwind_function): Clone for powerpc, using the + PowerPC mnemonics. + + * rs6000/rs6000.md (uminsi3, umaxsi3): Silence warnings that + -2147483648 is too large to fit in a signed integer on 32-bit + hosts. + +Wed Mar 1 06:48:31 1995 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * fold-const.c (decode_field_reference): Don't check TREE_CODE + of EXP; let get_inner_reference decide if have reference. + Allow no bit reference if have AND_MASK. + (all_ones_mask_p): Use tree_int_cst_equal, not operand_equal_p. + (unextend): New function. + (fold_truthop): For constant cases, use new function, rework + conversion, and warn if comparison can never be true. + + * expr.c (store_expr): Do conversion in two steps for promoted lhs. + +See ChangeLog.9 for earlier changes. diff --git a/gnu/usr.bin/gcc/ChangeLog.lib b/gnu/usr.bin/gcc/ChangeLog.lib new file mode 100644 index 00000000000..e87eabe6f55 --- /dev/null +++ b/gnu/usr.bin/gcc/ChangeLog.lib @@ -0,0 +1,3781 @@ +Wed Jan 1 17:54:47 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl> + + * pexecute.c (pexecute, [_WIN32]): Yes, mask termstat for mingw32. + +Mon Dec 22 18:59:34 1997 Pascal Obry <pascal.obry@der.edfgdf.fr> + + * pexecute.c (pexecute, [_WIN32]): For mingw32, don't mask termstat. + +Sat Dec 13 09:39:32 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * pexecute.c (fix_argv): Remove outer "const" from return type. + (pexecute): errmsg_arg is pointer to const. + +Sat Nov 29 08:06:34 1997 Jan-Jaap van der Heijden <janjaap@student.utwente.nl> + + * pexecute.c: Include signal.h for _WIN32. + +Wed Nov 26 17:31:44 1997 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl> + + * pexecute.c (pwait): For _WIN32, distinguish whether child process + caught fatal signal or reported nonzero exit code. + +Wed Nov 26 13:24:30 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * choose-temp.c (sys/file.h): Include if HAVE_SYS_FILE_H. + +Mon Nov 17 09:07:52 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * choose-temp.c (choose_temp_base): Remove incorrect code for VMS. + +Sun Oct 19 10:34:11 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * pexecute.c (fix_argv, pexecute): Cast result of xmalloc. + +Sat Oct 18 16:55:18 1997 Jason Merrill <jason@yorick.cygnus.com> + + * obstack.h (obstack_empty_p): New macro. + +Mon Sep 29 12:27:59 1997 Ian Lance Taylor <ian@cygnus.com> + + * pexecute.c: Use spawn if __CYGWIN32__. + +Wed Sep 10 15:14:20 1997 Jeffrey A Law (law@cygnus.com) + + * config.sub: Use "amigaos" instread of "amigados". Still + recognize "amigados" for backward compatability. + +Tue Sep 9 18:23:57 1997 Doug Evans <dje@cygnus.com> + + * config.sub: Recognize ARC cpu. + +1997-09-09 Richard Kenner Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * config.guess (alpha): Replace CPU-determining program with one + that's more precise and also supports pca56 and ev6. + Handle those in returned name. + +1997-09-08 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * config.guess (alpha:OSF1:*:*): For V4.0, get the letter suffix. + +1997-09-05 Jeffrey A Law (law@cygnus.com) + + * config.sub: Recognize v850-elf. + +1997-08-26 Richard Henderson <rth@cygnus.com> + + * config.guess (*:Linux:*:*): Recognize alpha-linux-gnulibc1. + +1997-08-17 Jeff Law <law@cygnus.com> + + * config.sub: Recognize tx39/r3900. + +1997-08-08 Paul Eggert <eggert@twinsun.com> + + * choose-temp.c, pexecute.c: + Include "config.h" first, as per autoconf manual. + +1997-08-01 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> + + * config.sub: Translate -svr4 to -sysv4 and -unixware to -sysv4.2uw. + +1997-07-26 Per Bothner <bothner@pogo.gnu.ai.mit.edu> + + * config.guess: Recognize SunOS 3.x. + From Tom Schmidt <tschmidt@micron.com>. + +1997-07-22 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> + + * getloadavg.c: Test `__unix' along with `unix'. + +Sun Jul 20 20:58:43 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * config.guess (alpha*): Run program to see if ev4, ev5, or ev56. + * config.sub (alphaev5, alphaev56): New CPU types. + +Wed Jul 16 10:46:14 1997 Richard Earnshaw <rearnsha@cambridge.arm.com> + + * config.guess (arm32:NetBSD:*:*): Canonicalize to normal format + for ARM systems. + +Tue Jul 15 09:13:05 1997 Jim Meyering <meyering@psilocin.gnu.ai.mit.edu> + + * getloadavg.c: Add comment describing HAVE_PSTAT_GETDYNAMIC. + +1997-07-14 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> + + * config.guess (pc:*:*:*): New entry, for DJGPP. + +1997-07-07 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> + + * config.guess (i?86:UNIX_SV:4.2MP:2.*): Recognize unixware. + +1997-07-06 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> + + * getloadavg.c [OSF_ALPHA]: + Include sys/mbuf.h, sys/socket.h, net/route.h. + +1997-06-30 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> + + * getloadavg.c [__GNU__]: Test for not NeXT. + +Fri Jun 27 15:20:29 1997 Scott Christley <scottc@net-community.com> + + * config.sub (-mingw32*): New OS. + * config.guess (i*:MINGW*:*): New case. + * pexecute.c (fix_argv): New function. + (pexecute): Win32 but not Cygwin32 needs its arguments fixed. + Add underscore to cwait function call. + +Mon Jun 23 10:51:53 1997 Jeffrey A Law (law@cygnus.com) + + * config.sub (mn10200): Recognize new basic machine. + +1997-06-22 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> + + * config.guess: Add mips-sony-newsos6. + +1997-06-09 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> + + * config.guess: Use i?86, not i.86. + Don't test /usr/lib/ldscripts; instead, test whether ld_help_string + does not contain "supported emulations". + Use a case statement to distinguish systems when there IS + "supported emulations". + +1997-06-07 H.J. Lu (hjl@gnu.ai.mit.edu) + + * config.guess (*:Linux:*:*): Always use ${VENDOR}. + +1997-06-05 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> + + * config.guess (*:Linux:*:*): Don't test for elf_i.86 or m68kelf. + + * config.guess (*:Linux:*:*): Recognize sparclinux. + Don't recognize UNAME_MACHINE = sparc. + Make the sample program check for libc version + and handle various machine types. + + * config.sub (mipsel*-linux* and mips*-linux*): + Set `os' to -linux-gnu directly, don't go via -linux. + +Mon May 26 12:46:25 1997 Paul Eggert <eggert@twinsun.com> + + * getopt.c, getopt.h, getopt1.c: Moved to libc-copy/copies. + +Wed May 7 15:17:59 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> + + * config.guess: Recognize either / or - as a machine/suptype + separator from uname -m to cope with older systems that have the + older uname. Suggested by Michael Snyder (msnyder@cygnus.com). + +Mon May 5 18:05:35 1997 Per Bothner <bothner@frobnitz.gnu.ai.mit.edu> + + * config.guess: CLIX patch from Thomas Dickey via + urs@akk.uni-karlsruhe.de (Urs Janssen). + +Thu Apr 17 13:59:13 1997 Per Fogelstrom <pefo@openbsd.org> + + * config.guess: Fixes for MIPS OpenBSD systems. + +Fri Apr 11 16:39:06 1997 Niklas Hallqvist <niklas@appli.se> + + * config.guess: Recognize OpenBSD systems correctly. + +Mon Mar 24 15:38:37 1997 Doug Evans <dje@cygnus.com> + + * config.sub: Recognize m32r and mn10300 cpus. + +Sat Feb 22 22:36:44 1997 Miles Bader <miles@gnu.ai.mit.edu> + + * getloadavg.c [__GNU__] (NeXT, host_self): New macros, to make + hurd systems use the NeXT code for getting load averages. + +Sat Feb 15 19:03:48 1997 Geoffrey Noer (noer@cygnus.com) + + * pexecute.c: Remove special cases for cygwin32. + (pwait): Remove local definition of `pid'. + +Wed Jan 15 22:36:59 1997 Jim Meyering <meyering@kropotkin.gnu.ai.mit.edu> + + * getloadavg.c [hpux && HAVE_PSTAT_GETDYNAMIC]: Use HPUX's + pstat_getdynamic function so we don't need any special privileges + to determine load averages. Patch from Kaveh Ghazi, based on a + sample implementation from Richard J. Rauenzahn. + Indent cpp-directives to reflect nesting. + +Tue Jan 7 14:29:37 1997 David J. MacKenzie <djm@geech.gnu.ai.mit.edu> + + * config.guess: Add hppa1.1-hitachi-hiuxmpp support, passed along + by rms. + +Sat Jan 4 22:43:21 1997 Miles Bader <miles@gnu.ai.mit.edu> + + * config.guess (*:GNU:*:*): The machine/subtype separator printed + by uname -m is now `-', not '/'. + +Fri Jan 3 08:38:49 1997 Philippe De Muyter (phdm@info.ucl.ac.be) + + * config.guess (M68*:*:R3V[567]*:*): Use uppercase 'M'. + +Tue Dec 31 15:51:13 1996 Ian Lance Taylor <ian@cygnus.com> + + * config.guess, config.sub: Recognize mips-unknown-linux-gnu. + +Tue Dec 10 09:44:57 1996 Paul Eggert <eggert@twinsun.com> + + * choose-temp.c (choose_temp_base): Don't dump core if TMPDIR is empty. + + * choose-temp.c (try): Insist that temp dir be searchable. + +Sat Dec 7 17:48:02 1996 Dave Love <d.love@dl.ac.uk> + + * config.guess (PENTIUM:CPunix:4.0*:*): New case. + +Sun Nov 24 19:41:31 1996 Per Bothner <bothner@frobnitz.gnu.ai.mit.edu> + + * config.guess: Recognize machten. + From Eric W. Bates <ericx@vineyard.net>. + +Sun Nov 24 18:17:53 1996 Dave Love <d.love@dl.ac.uk> + + * config.guess (PENTIUM:CPunix:4.0*:*): New case. + +Fri Nov 22 11:44:13 1996 David J. MacKenzie <djm@geech.gnu.ai.mit.edu> + + * config.guess: Undo accidental lowercasing in + m68k-motorola-sysv regexp. + +Wed Nov 20 16:27:37 1996 David J. MacKenzie <djm@churchy.gnu.ai.mit.edu> + + * config.guess, config.sub: Additions for the Fujitsu UXP/V. + From joda@pdc.kth.se (Johan Danielsson). + +Tue Nov 19 13:34:12 1996 David J. MacKenzie <djm@churchy.gnu.ai.mit.edu> + + * getpagesize.h: If no sys/param.h, default to 8k. + Indent for readability. + +Wed Nov 13 14:59:46 1996 Per Bothner <bothner@deneb.cygnus.com> + + * config.guess: Patch for Dansk Data Elektronik servers, + from Niels Skou Olsen <nso@dde.dk>. + + For ncr, use /bin/uname rather than uname, since GNU uname does not + support -p. Suggested by Mark Mitchell <mmitchell@usa.net>. + + Patch for MIPS R4000 running System V, + from Eric S. Raymond <esr@snark.thyrsus.com>. + + Fix thinko for nextstep. + + Patch for OSF1 in i?86, from Dan Murphy <dlm@osf.org> via Harlan Stenn. + + Sat Jun 24 18:58:17 1995 Morten Welinder <terra+@cs.cmu.edu> + * config.guess: Guess mips-dec-mach_bsd4.3. + + Thu Oct 10 04:07:04 1996 Harlan Stenn <harlan@pfcs.com> + * config.guess (i?86-ncr-sysv*): Emit just enough of the minor + release numbers. + * config.guess (mips-mips-riscos*): Emit just enough of the + release number. + + Tue Oct 8 10:37:22 1996 Frank Vance <fvance@waii.com> + * config.guess (sparc-auspex-sunos*): Added. + (f300-fujitsu-*): Added. + + Wed Sep 25 22:00:35 1996 Jeff Woolsey <woolsey@jlw.com> + * config.guess: Recognize a Tadpole as a sparc. + +Wed Nov 13 00:53:09 1996 David J. MacKenzie <djm@churchy.gnu.ai.mit.edu> + + * config.guess: Don't assume that NextStep version is either 2 or + 3. NextStep 4 (aka OpenStep 4) has come out now. + +Tue Nov 12 18:26:15 1996 Doug Rupp (rupp@gnat.com) + + * pexecute.c (vfork): Supply new definition for VMS. + (pwait): Use waitpid instead of wait for VMS. + +Mon Nov 11 23:52:03 1996 David J. MacKenzie <djm@churchy.gnu.ai.mit.edu> + + * config.guess: Support Cray T90 that reports itself as "CRAY TS". + From Rik Faith <faith@cs.unc.edu>. + +Fri Nov 8 11:34:58 1996 David J. MacKenzie <djm@geech.gnu.ai.mit.edu> + + * config.sub: Contributions from bug-gnu-utils to: + Support plain "hppa" (no version given) architecture, reported by + OpenStep. + OpenBSD like NetBSD. + LynxOs is not a hardware supplier. + + * config.guess: Contributions from bug-gnu-utils to add support for: + OpenBSD like NetBSD. + Stratus systems. + More Pyramid systems. + i[n>4]86 Intel chips. + M680[n>4]0 Motorola chips. + Use unknown instead of lynx for hardware manufacturer. + +Mon Oct 28 17:15:52 1996 Christian Limpach <chris@nice.ch> + + * config.sub: Recognize hppa-next as a valid CPU-COMPANY combination. + +Wed Oct 23 17:36:39 1996 Doug Rupp (rupp@gnat.com) + + * choose-temp.c (choose_temp_base): On VMS, use proper syntax + for current directory. + +Wed Oct 9 23:30:18 1996 Jim Meyering <meyering@wombat.gnu.ai.mit.edu> + + * getloadavg.c: [__hpux]: Define hpux. From Eric Backus. + [__sun]: Define sun. Reported by Kaveh Ghazi. + +Mon Sep 23 22:45:15 1996 Sean McNeil <sean@mcneil.com> + + * config.sub (-vxsim*): New operating system. + + 1996-09-12 Richard Stallman <rms@ethanol.gnu.ai.mit.edu> + + * config.guess: Use pc instead of unknown, for pc clone systems. + Change linux to linux-gnu. + +Thu Sep 12 20:12:26 1996 Richard Stallman <rms@ethanol.gnu.ai.mit.edu> + + * config.sub: Use pc instead of unknown, for pc clones. + Use -linux-gnu for Linux-based GNU systems. + +1996-09-04 Richard Stallman <rms@ethanol.gnu.ai.mit.edu> + + * getloadavg.c (getloadavg): Add new code for SUNOS_5 to use -lkstat. + +Sat Aug 17 15:23:39 1996 Geoffrey Noer <noer@cygnus.com> + + * choose-temp.c: Delete !defined(_WIN32) condition when including + sys/file.h (NO_SYS_FILE_H is still used). + * getopt.c: Change win32 test from WIN32 to _WIN32. + * pexecute.c: Update test for win32 (&& ! cygwin32). + +Mon Jul 15 23:51:11 1996 Karl Heuer <kwzh@gnu.ai.mit.edu> + + * config.guess: Avoid non-portable tr syntax. + +Mon Jul 15 11:53:00 1996 Jeffrey A Law (law@cygnus.com) + + * config.guess (HP 9000/811): Recognize this as a PA1.1 + machine. + +Thu Jul 11 17:02:23 1996 David J. MacKenzie <djm@geech.gnu.ai.mit.edu> + + * install-sh: Add MIT copyright notice. From gordoni@cygnus.com. + +Sun Jul 7 13:27:04 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil> + + * config.sub: Recognize rtems as an o/s. + +Tue Jul 2 16:45:02 1996 Torbjorn Granlund <tege@spiff.gnu.ai.mit.edu> + + * config.guess: Generalize C90 alternative to all x90 machines. + +Fri Jun 28 13:29:05 1996 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * config.guess (mips:*:*:UMIPS): Fix typo in last change. + +Tue Jun 25 22:43:48 1996 Doug Evans <dje@cygnus.com> + + * pexecute.c (PEXECUTE_VERBOSE): Define. + (MPW pexecute): Check flags & PEXECUTE_VERBOSE instead of verbose_flag. + +Mon Jun 24 14:32:22 1996 Jim Wilson <wilson@cygnus.com> + + * getopt.c (getpid): Don't redefine it if __CYGWIN32__ is defined. + +Thu Jun 20 12:20:33 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * config.guess (*:Linux:*:*): Add support for PowerPC Linux. + +Mon Jun 10 16:10:57 1996 Doug Evans <dje@cygnus.com> + + * pexecute.c: New file. + +Fri Jun 7 18:16:52 1996 Harlan Stenn <harlan@pfcs.com> + + * config.guess (i?86-ncr-sysv*): Emit minor release numbers. + Recognize the NCR 4850 machine and NCR Pentium-based platforms. + +Wed Jun 5 00:09:17 1996 Per Bothner <bothner@wombat.gnu.ai.mit.edu> + + * config.guess: Combine mips-mips-riscos cases, and use cpp to + distinguish sysv/svr4/bsd variants. + Based on a patch from Harlan Stenn <harlan@pfcs.com>. + +Mon Jun 3 08:49:14 1996 Karl Heuer <kwzh@gnu.ai.mit.edu> + + * config.guess (*:Linux:*:*): Add guess for sparc-unknown-linux. + +Mon May 27 20:16:42 1996 Karl Heuer <kwzh@gnu.ai.mit.edu> + + * getloadavg.c [SOLARIS2]: Define SUNOS_5. + +Fri May 24 18:34:53 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> + + * config.guess (AViiON:dgux:*:*): Fix typo in recognizing mc88110. + +Wed May 22 17:20:59 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> + + * getloadavg.c [WIN32]: No-op as for [MSDOS]. + + * getopt.c [WIN32] (getpid): Define using GetCurrentProcessId. + + * getopt.c [VMS]: Include unixlib.h, string.h. + +Tue May 21 18:55:59 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> + + * config.sub: Restore `hp9k2[0-9][0-9] | hp9k31[0-9])' case line + apparently accidentally removed in the last change. + +Mon May 20 11:58:15 1996 Jeffrey A. Law <law@cygnus.com> + + * config.sub: Recognize -proelf as a basic system type. + +Fri May 3 02:35:56 1996 Noah Friedman <friedman@prep.ai.mit.edu> + + * mkinstalldirs: Don't report an error if mkdir fails because + a directory was created by another process. + +Sun Apr 21 09:50:09 1996 Stephen L Moshier (moshier@world.std.com) + + * choose-temp.c: Include sys/types.h before sys/file.h for sco3.2v5. + +Tue Apr 9 14:37:31 1996 Ulrich Drepper <drepper@cygnus.com> + + * obstack.h [__STDC__] (obstack_init, obstack_begin, + obstack_specify_allocation, obstack_specify_allocation_with_arg, + obstack_chunkfun, obstack_freefun): Duplicate definition with complete + type cast. + +Wed Apr 17 14:28:43 1996 Doug Evans <dje@cygnus.com> + + * choose-temp.c: Don't include sys/file.h ifdef NO_SYS_FILE_H. + #include <stdio.h>. + (choose_temp_base): Make tmp,usrtmp, static locals. + +Mon Apr 15 14:08:12 1996 Doug Evans <dje@canuck.cygnus.com> + + * choose-temp.c: New file. + +Fri Apr 12 20:03:59 1996 Per Bothner <bothner@spiff.gnu.ai.mit.edu> + + * config.guess: Combine two OSF1 rules. + Also recognize field test versions. From mjr@zk3.dec.com. + + * config.guess (dgux): Use /usr/bin/uname rather than uname, + because GNU uname does not support -p. From pmr@pajato.com. + +Mon Apr 8 16:16:20 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * config.guess (prep*:SunOS:5.*:*): Turn into + powerpele-unknown-solaris2. + +Thu Mar 28 02:06:03 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> + + * error.c (_): New macro, define iff undefined. + (private_strerror): Use it for message string. + (error_at_line): New function. + (error_one_per_line): New variable. + * error.h (error_at_line, error_one_per_line): Declare them. + +Thu Mar 21 14:42:26 1996 Doug Evans <dje@cygnus.com> + + * config.sub (os): sunos[3456] -> sunos[34], + sunos[56] have their own entries. + +Wed Mar 20 09:59:30 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> + + * signame.c [HAVE_STRING_H]: Include string.h. + +Tue Mar 19 20:07:39 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> + + * alloca.c (NULL): Define only if not already defined. + + * alloca.c [HAVE_STRING_H]: Include string.h. + [HAVE_STDLIB_H]: Include stdlib.h. + +Thu Mar 14 19:12:52 1996 Ian Lance Taylor <ian@cygnus.com> + + * config.guess: Recognize mips-*-sysv*, with a specific case for + NEC (which has its own compiler and libraries). + +Sat Mar 9 23:52:33 1996 Jim Meyering (meyering@na-net.ornl.gov) + + * getdate.y (RelativeMonth): Add 1900 to the year so that relative + date specs that push the year through the end of the century work. + For example, `date -d "01/01/1998 3 years" +%Y' now prints 2001. + From Peter Dalgaard (pd@kubism.ku.dk). + +Tue Mar 5 18:43:43 1996 Richard Henderson <rth@tamu.edu> + + * config.sub: Add -apple and -aux. + +Tue Mar 5 03:02:53 1996 Erik Naggum <erik@naggum.no> + + * config.sub (moss): Fix previous change. + +Mon Mar 4 18:03:38 1996 Bryan Ford (baford@cs.utah.edu) + + * config.sub: Accept -moss* as op sys. + +Fri Mar 1 09:57:54 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> + + * config.sub: Recognize cpu-vendor [ctj]90-cray, default + c90-cray-unicos. From tege. + +Wed Feb 28 19:55:05 1996 Miles Bader <miles@gnu.ai.mit.edu> + + * getopt.c (_getopt_internal): Always set OPTOPT to *something* if + returning '?', so it can be distinguished from an option. + +Thu Feb 22 15:51:09 1996 Karl Heuer <kwzh@gnu.ai.mit.edu> + + * getdate.y (Convert): Accept dates beyond 1999. + +Tue Feb 13 13:20:32 1996 Miles Bader <miles@gnu.ai.mit.edu> + + * getopt.c (_getopt_internal): Give FIRST_NONOPT & LAST_NONOPT + rational values if OPTIND has been moved back by the user. + +Mon Feb 12 18:23:35 1996 Doug Evans <dje@cygnus.com> + + * config.sub: Recognize sparclet cpu. + +Sun Feb 11 18:40:11 1996 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * config.sub: Fix typo in previous change. + +Sat Feb 10 08:28:12 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de> + + * config.sub (-psos*): New case. + +Thu Feb 8 15:37:52 1996 Brendan Kehoe <brendan@lisa.cygnus.com> + + * config.guess (UNAME_VERSION): Recognize X4.x as an OSF version. + +Sun Feb 4 16:51:11 1996 Steve Chamberlain <sac@slash.cygnus.com> + + * config.guess (*:CYGWIN*): New + +Mon Feb 12 15:33:59 1996 Christian Bauernfeind <chrisbfd@theorie3.physik.uni-erlangen.de> + + * config.guess: Support m68k-cbm-sysv4. + +Sat Feb 10 12:06:42 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * config.guess (*:Linux:*:*): Guess m68k-unknown-linux and + m68k-unknown-linuxaout from linker help string. Put quotes around + $ld_help_string. + +Wed Feb 7 15:31:09 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * getopt.c [__GNU_LIBRARY__]: Include <unistd.h>. + + * getopt.c (nonoption_flags, nonoption_flags_len): New variables. + (_getopt_initialize): If not POSIXLY_CORRECT, check for special + environment variable from Bash 2.0 and set those vars from it. + (_getopt_internal): Do not consider as options argv elts whose + nonoption_flags elt from the shell is '1'. + +Thu Feb 1 09:10:02 1996 Steve Chamberlain <sac@slash.cygnus.com> + + * config.sub (-cygwin32): New. + +Wed Jan 31 14:13:25 1996 Richard Henderson <rth@tamu.edu> + + * config.sub: Add support for A/UX. + * config.guess: Recognize A/UX. + +Tue Jan 23 13:15:50 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * obstack.h [__STDC__] (struct obstack, _obstack_begin, + _obstack_begin_1): Use prototypes in function decls. + * obstack.c (CALL_CHUNKFUN, CALL_FREEFUN): Cast function type for + call w/o extra_arg. + + * error.c (error_print_progname) [__STDC__]: Declare with + prototype. + [_LIBC]: Include errno.h to declare program_invocation_name. + + * getopt.c [__STDC__] (exchange, _getopt_initialize): Declare + prototypes for these. + +Mon Jan 22 08:53:45 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * xmalloc.c [__STDC__] (fixup_null_alloc): Declare prototype. + +Sun Jan 21 01:08:09 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * error.h: Declare error_print_progname. Add comments. + +Wed Jan 17 17:39:51 1996 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * config.sub: Default OS to nextstep if machine vendor is Next. + -ns2 is an alias for -nextstep. + +Wed Jan 17 09:51:58 1996 Doug Evans <dje@cygnus.com> + + * config.sub: Recognize go32* as an os. + +Sun Jan 7 02:00:27 1996 Karl Heuer <kwzh@gnu.ai.mit.edu> + + * alloca.c (alloca): If malloc fails, just abort. + +Mon Jan 15 20:59:49 1996 J. Kean Johnston <hug@netcom.com> + + * config.sub (sco5): New case. + +Tue Dec 19 15:56:15 1995 Eli Zaretskii <eliz@is.elta.co.il> + + * getloadavg.c (getloadavg) [MSDOS]: Return 0 load instead of + failing the call. + +Fri Dec 15 22:34:08 1995 Stan Coxs <coxs@dg-rtp.dg.com> + + * config.guess (AViiON): Add ix86-dg-dgux + * config.sub (i*86*) Change [345] to [3456] + +Thu Dec 7 09:03:24 1995 Tom Horsley <Tom.Horsley@mail.hcsc.com> + + * config.guess (powerpc-harris-powerunix): Add guess for port + to new target. + +Wed Dec 6 09:44:53 1995 Paul Eggert <eggert@twinsun.com> + + * install-sh (transformbasename): Fix misspelling in initialization. + +Wed Dec 6 06:58:23 1995 Richard Earnshaw (rearnsha@armltd.co.uk) + + * config.sub: Recognize aof in the OS field. + +Tue Dec 5 18:36:41 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * error.c [_LIBC]: Adapt for use in GNU libc. + +Mon Dec 4 13:21:51 1995 Jeffrey A. Law <law@mole.gnu.ai.mit.edu> + + * config.guess: Recognize HP model 816 machines as having + a PA1.1 processor. + +Thu Nov 30 16:57:33 1995 Per Bothner <bothner@wombat.gnu.ai.mit.edu> + + * config.guess: Recognize Pentium under SCO. + From Robert Lipe <robertl@arnet.com>. + +Tue Nov 21 16:59:12 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * getdate.y: If config.h defines FORCE_ALLOCA_H, include alloca.h. + +Mon Oct 16 11:34:00 1995 Jeffrey A. Law <law@mole.gnu.ai.mit.edu> + + * config.guess: Recognize HP model 819 machines as having + a PA 1.1 processor. + +Sat Sep 30 14:03:17 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * getopt.c (_): New macro, define if not already defined. + (gettext): Never define as a macro. + (_getopt_internal): Use ``_("message")'' instead of + `gettext ("message")''. + +Mon Aug 14 19:27:56 1995 Per Bothner <bothner@kalessin.cygnus.com> + + * config.guess (*Linux*): Add missing "exit"s. + Also, need specific check for alpha-unknown-linux (uses COFF). + +Fri Jul 28 00:16:31 1995 Jeffrey A. Law <law@rtl.cygnus.com> + + * config.guess: Recognize lynx-2.3. + +Thu Jul 27 13:31:05 1995 Fred Fish (fnf@cygnus.com) + + * config.guess (*:Linux:*:*): First try asking the linker what the + default object file format is (elf, aout, or coff). Then if this + fails, try previous methods. + +Mon Aug 7 16:48:13 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * getloadavg.c [ps2]: Use nlist instead of knlist #ifdef _AIX. + +Fri Aug 4 10:27:54 1995 Jim Meyering (meyering@comco.com) + + * getopt.c (_getopt_internal) [lint]: Initialize INDFOUND to + avoid warning from gcc. + +Tue Aug 1 14:29:43 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * getloadavg.c (getloadavg): Set FD_CLOEXEC flag on /dev/kmem file + descriptor. + +Wed Jul 26 00:26:34 1995 David J. MacKenzie <djm@geech.gnu.ai.mit.edu> + + * mkinstalldirs: Remove weird unnecessary shell construction. + +Wed Jun 28 17:57:27 1995 David Edelsohn <edelsohn@mhpcc.edu> + + * config.guess (AIX4): More robust release numbering discovery. + +Thu Jun 22 19:01:24 1995 Kenneth Stailey (kstailey@eagle.dol-esa.gov) + + * config.guess (i386-sequent-ptx): Properly get version number. + +Thu Jun 22 18:36:42 1995 Uwe Seimet (seimet@iris1.chemie.uni-kl.de) + + * config.guess (mips:*:4*:UMIPS): New case. + +Tue Jun 20 02:41:41 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * getloadavg.c [convex] (LOAD_AVE_TYPE, LDAV_CVT): Define to + double, no conversion. + + * obstack.c (OBSTACK_INTERFACE_VERSION): New macro. Rewrote + conditionals to use that macro to ensure that the installed GNU + libc supports the interface the obstack.h corresponding to this + obstack.c needs, and only then elide the code in this file. + +Sun May 28 18:53:29 1995 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * config.guess (21064:Windows_NT:50:3): New case. + +Fri May 19 16:52:50 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * error.c (error_message_count): New variable. + (error): Increment it. + * error.h: Declare error_message_count. + +Mon May 15 17:47:55 1995 Per Bothner (bothner@spiff.gnu.ai.mit.edu) + + * config.guess: Recognize Cray90 (from Pete TerMaat). + +Thu May 11 17:13:14 1995 Per Bothner (bothner@wombat.gnu.ai.mit.edu) + + * config.guess: Recognize PCs running Solaris2. + (Patch from Bruno Haible <haible@ma2s2.mathematik.uni-karlsruhe.de>.) + * config.guess: Merge two CRAY*Y-MP entries. + Ignore system field for Cray xmp and cray2 since "uname -s" on + a Cray gets you the hostname, which is useless. + (According to Pete TerMaat <pete@guava.cray.com>.) + +Wed May 10 11:03:56 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * getloadavg.c: AIX support from Tim Bell <tbel@afsmail.cern.ch>: + [_AIX] (LOAD_AVE_TYPE, FSCALE, NLIST_STRUCT): Define these for AIX. + (getloadavg) [_AIX]: Use `knlist' instead of `nlist'. + +Fri May 5 05:50:56 1995 Allen Briggs (briggs@puma.bevd.blacksburg.va.us) + + * config.guess: Add more NetBSD cases: atari, sun3*, and mac68k. + +Wed May 3 16:22:31 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * crt0.c: Add APOLLO alternative. + +Sat Apr 29 15:48:03 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * signame.c: Move include of config.h before all others. + +Thu Apr 27 11:33:29 1995 Michael Meissner (meissner@cygnus.com) + + * config.guess (*:Linux:*:*): Check for whether the pre-BFD linker is + installed, and if so return linuxoldld as the system name. + +Thu Apr 27 13:11:11 1995 Jim Meyering (meyering@comco.com) + + * error.h: Use __-protected versions of `format' and `printf' + attributes only with gcc-2.7 and later. + +Thu Apr 27 09:22:33 1995 Peder Chr. Norgaard <pcn@tbit.dk> + + * config.guess (i[34]86:*:3.2:*) test for /usr/options/cb.name + before calling uname. + +Wed Apr 26 17:19:34 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * signame.c [HAVE_UNISTD_H]: Include unistd.h so it can declare + sys_siglist. + +Wed Apr 26 14:00:00 1995 Michael Meissner (meissner@cygnus.com) + + * config.guess (*:Linux:*:*): Determine whether the default compiler is + a.out or ELF based. + (parisc*:Lites*:*:*): New entry from Jeff Law. + +Wed Apr 26 11:48:21 1995 Jim Meyering (meyering@comco.com) + + * error.h: New file. + +Wed Apr 26 10:27:50 1995 Travis L Priest (T.L.Priest@larc.nasa.gov) + + * config.guess (CRAY*Y-MP:*:*:*): New entry. + +Wed Apr 26 12:54:26 1995 Jeffrey A. Law <law@snake.cs.utah.edu> + + * config.guess: Add hppa1.1-hp-lites support. + +Thu Apr 6 19:55:54 1995 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * crt0.c [__bsdi__]: Maybe declare __progname. + +Fri Mar 24 00:52:31 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * getopt.c (_getopt_internal): When optind is zero, bump it to 1 + after initializing; we don't want to scan ARGV[0], which is the + program name. + +Tue Mar 21 16:44:37 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * signame.c (signame_init): Define SIGINFO. + +Tue Mar 7 01:41:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * signame.c (strsignal): Cast sys_siglist elt to char *. + +Thu Feb 23 18:42:16 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * signame.h [! __STDC__]: Don't use prototype for strsignal decl. + +Wed Feb 22 19:08:43 1995 Niklas Hallqvist (niklas@appli.se) + + * config.guess: Recognize NetBSD/Amiga as m68k-cbm-netbsd. + +Tue Feb 21 22:13:19 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * signame.h (strsignal): Declare it. + * signame.c [! HAVE_STRSIGNAL] (strsignal): New function. + +Wed Feb 8 10:03:36 1995 David J. MacKenzie <djm@geech.gnu.ai.mit.edu> + + * install-sh config.guess mkinstalldirs: Add a blank in the #! + line for 4.2BSD, Dynix, etc. + +Sat Feb 4 12:59:59 1995 Jim Wilson <wilson@cygnus.com> + + * config.guess (IRIX): Sed - to _. + +Sat Jan 28 20:09:49 1995 Daniel Hagerty <hag@duality.gnu.ai.mit.edu> + + * error.c: Under older versions of SCO, strerror is a preprocessor + macro. Added a check for this. + +Fri Jan 27 09:55:28 1995 Jim Meyering (meyering@comco.com) + + * getdate.y: Remove obsolete comments. Rewrite others. + +Mon Jan 23 19:41:57 1995 Karl Heuer <kwzh@hal.gnu.ai.mit.edu> + + * config.guess (i[34]86:*:3.2:*): Test for ISC before SCO; newer + ISC releases have uname -X. + +Tue Jan 10 09:26:41 1995 Jim Meyering (meyering@comco.com) + + * getdate.y (ToSeconds): Interpret 12am as 00:00 and 12pm as 12:00. + Before, `date -d 'Jan 1 12am'' printed `...12:00:00...'. + From Takeshi Sone <ts1@tsn.or.jp>. + +Sat Jan 7 11:57:40 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * getloadavg.c: Include config.h first. + +Wed Jan 4 15:52:17 1995 Per Bothner (bothner@spiff.gnu.ai.mit.edu) + + * config.guess: Recognize BSD/OS as bsdi. + Patch from Chris Torek <torek@BSDI.COM>. + +Wed Dec 21 15:51:08 1994 Warner Losh (imp@boulder.openware.com) + + * config.guess (sun4:SunOS:*:*): Handle Solbourne OS/MP systems. + +Tue Dec 6 02:29:42 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * config.guess (dummy.c) [sony]: Include <sys/param.h> and emit + newsos4 #ifdef NEWSOS4. + +Tue Nov 29 17:01:29 1994 Mark Dapoz (md@bsc.no) + + * config.guess (ibmrt): Add more cases for various forms of BSD. + +Tue Nov 29 16:19:54 1994 Paul Eggert <eggert@twinsun.com> + + * getopt.c (_getopt_internal): Add gettext wrappers around + message strings. + + * xmalloc.c (fixup_null_alloc): Add gettext wrapper. + Capitalize initial letter of error message, for consistency + with regex.c. + +Fri Nov 25 19:22:24 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * crt0.c (start1): Add self reference. + +Wed Nov 23 16:51:11 1994 R. Bernstein (rocky@panix.com) + + * config.guess: Add cases for romp-ibm-aix and romp-ibm-bsd. + +Mon Nov 14 19:03:29 1994 Per Bothner (bothner@spiff.gnu.ai.mit.edu) + + * config.guess: Support paragon as i860-intel-osf1. (From RMS.) + +Fri Nov 11 14:04:58 1994 Andreas Luik (luik@isa.de) + + * obstack.h: Add one missing test on value of __STDC__. + +Sat Nov 05 08:08:52 1994 Jim Meyering (meyering@comco.com) + + * obstack.h: NextStep 2.0 cc is really gcc 1.93 but it defines + __GNUC__ = 2 and does not implement __extension__. So add + `|| (__NeXT__ && !__GNUC_MINOR__)' to the test for whether to + define-away __extension__. Reported by Kaveh Ghazi. + +Thu Nov 03 14:36:58 1994 Jim Meyering (meyering@comco.com) + + * filemode.c (rwx): Use S_IRUSR, S_IWUSR, S_IXUSR instead of + obsolete S_IREAD, S_IWRITE, S_IEXEC. + Make sure the former three are defined. + +Tue Nov 1 14:24:39 1994 Per Bothner (bothner@spiff.gnu.ai.mit.edu) + + * config.guess (*-unknown-freebsd): Remove [-(] from + UNAME_RELEASE. Patch from Warner Losh <imp@village.org>. + +Mon Oct 31 07:02:15 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * getopt.h: Change #if __STDC__ to #if defined (__STDC__) && + __STDC__. + * getopt.c: Change #ifndef __STDC__ to #if !defined (__STDC__) || + !__STDC__. + * getopt1.c: Likewise. + * obstack.c: Change #ifdef __STDC__ to #if defined (__STDC__) && + __STDC__. + * obstack.h: Likewise. + +Wed Oct 26 20:34:59 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * getloadavg.c [alliant && i860] (FSCALE): Move defn before + #ifndef FSCALE. + +Tue Oct 25 19:10:41 1994 Paul Eggert <eggert@twinsun.com> + + * xmalloc.c (fixup_null_alloc): New function. + (xmalloc, xrealloc): Use it to fix up returned NULL values, + instead of preemptively adjusting a zero N to 1. + +Tue Oct 25 11:22:30 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu> + + * xmalloc.c (xmalloc, xrealloc): If 0 bytes requested, pretend + it's 1, for diff. + +Thu Oct 20 18:47:53 1994 Per Bothner (bothner@wombat.gnu.ai.mit.edu) + + * config.guess: Better support for NCR - covers more machines, + and prints sysv4.3 if uname says the OS is 4.3. + Patch from Tom McConnell <tmcconne@sedona.intel.com>. + +Wed Oct 19 15:55:38 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu> + + * config.guess: Add licensing exception for Autoconf. + +Tue Oct 18 19:26:31 1994 David Edelsohn (edelsohn@npac.syr.edu) + + * config.guess: Revise support for AIX 4.1 on POWER and PowerPC. + +Mon Oct 17 19:16:38 1994 David Edelsohn <edelsohn@npac.syr.edu> + + * config.guess: Add support for AIX 4.1 and architecture. + +Wed Oct 12 16:51:35 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu) + + * error.c: Add hook for alternate name printing function. + From Franc,ois Pinard. + Use varargs for _doprnt too. + + * xmalloc.c: Add hook for alternate exit status. + From Franc,ois Pinard. + +Mon Oct 10 17:35:19 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * getpagesize.h: If NBPC is not defined, try PAGESIZE. + +Fri Oct 07 18:53:28 1994 Jim Meyering (meyering@comco.com) + + * filemode.c: Remove #if 0'd block around mode_t definition. + From Andreas Luik (luik@marx.isa.de). + +Thu Oct 06 21:15:16 1994 Jim Meyering (meyering@comco.com) + + * pathmax.h: Fix typo: HAVE_SYS_PATH_MAX_H -> HAVE_SYS_PARAM_H. + From Andreas Schwab (schwab@issan.informatik.uni-dortmund.de). + +Thu Oct 6 18:02:32 1994 Per Bothner (bothner@wombat.gnu.ai.mit.edu) + + * config.guess: Patch from Chris Smith <csmith@mozart.convex.com> + to handle old Convex systems without uname. + +Tue Oct 4 03:02:39 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * getdate.y (main): Use MAX_BUFF_LEN consistently. + Clear the last element of buf. + +Mon Oct 3 01:48:48 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * config.guess: Recognize GNU. + +Thu Sep 29 18:47:34 1994 Jerry Frain (jerry@sneffels.tivoli.com) + + * config.guess (i[34]86:UNIX_SV:4.*:*): Remove "UNIX_SV" for + Unixware; move DYNIX above this one now that this is wildcard. + +Wed Sep 28 17:00:12 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * getloadavg.c [alliant && i860] (LOAD_AVE_TYPE, FSCALE, + NLIST_STRUCT): Define. + +Mon Sep 26 17:53:05 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * alloca.c error.c filemode.c getopt.c getopt1.c getdate.y + getloadavg.c getugroups.c getusershell.c signame.c: + Remove CONFIG_BROKETS ifdef. No one should use "config.h". + +Sat Sep 24 21:20:12 1994 Jim Meyering (meyering@comco.com) + + * getdate.y [struct _TABLE]: Add `const' to NAME member dcl. + +Fri Sep 23 02:39:55 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * crt0.c [__FreeBSD__] (__progname): Declared. + +Tue Sep 20 23:27:02 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * getdate.y: Whitespace reformatted. + (MAX_BUFF_LEN): New macro. + (main): Use fgets, not gets. Use MAX_BUFF_LEN to declare buff. + +Mon Sep 19 18:25:40 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * config.guess (HP-UX): Patch from Harlan Stenn + <harlan@landmark.com> to also emit release level. + +Wed Sep 7 13:15:25 1994 Jim Wilson (wilson@sphagnum.cygnus.com) + + * config.guess (sun4*:SunOS:*:*): Change '-JL' to '_JL'. + +Fri Sep 16 20:16:36 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * getloadavg.c (getloadavg): Add OSF_ALPHA support. + +Fri Sep 16 18:34:22 1994 Paul Eggert <eggert@twinsun.com> + + * getdate.y (difftm): Don't store a long value into an int variable. + +Thu Sep 08 00:26:29 1994 Jim Meyering (meyering@comco.com) + + * getdate.y: Accept `MESZ' timezone. + +Sun Aug 28 18:13:45 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * config.guess (*-unknown-freebsd*): Get rid of possible + trailing "(Release)" in version string. + Patch from Paul Richards <paul@isl.cf.ac.uk>. + +Sat Aug 27 15:00:49 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * config.guess: Fix i486-ncr-sysv43 -> i486-ncr-sysv4.3. + Fix type: *-next-neststep -> *-next-nextstep. + +Sat Jun 4 17:23:54 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * configure.in: Use mh-ncrsvr43. Patch from + Tom McConnell <tmcconne@sedona.intel.com>. + +Sat Aug 27 17:21:04 1994 Jim Meyering (meyering@comco.com) + + * filemode.c [STAT_MACRO_BROKEN]: Remove spurious #ifdef's. + +Fri Aug 26 19:17:22 1994 Per Bothner (bothner@spiff.gnu.ai.mit.edu) + + * config.guess (netbsd, freebsd, linux): Accept any machine, + not just i[34]86. + +Fri Aug 26 18:45:25 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * config.guess: Recognize powerpc-ibm-aix3.2.5. + +Fri Aug 26 15:12:50 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * config.guess: Merges from Cygnus version. + (alpha-dec-osf*): More general. + (*-hp-hpux*): Combine cases. + (*-next-ns[23]): Rename to *-next-neststep[23]. + Make code fragment shorter. + (config.guess, i386-unknown-bsd): Don't recognize __bsdi__ here; + it is handled using uname. + + Sat Jul 16 12:03:08 1994 Stan Shebs (shebs@andros.cygnus.com) + + * config.guess: Recognize m88k-harris-csux7. + + Tue Jun 28 13:43:25 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * config.guess: Recognize Mach. + + Wed Apr 6 20:44:56 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * config.guess: Add SINIX support. + + Sun Mar 6 23:13:38 1994 Hisashi MINAMINO (minamino@sra.co.jp) + + * config.guess: about target *-hitachi-hiuxwe2, fixed + machine guessing order. [Hitachi's CPU_IS_HP_MC68K + macro is incorrect.] + + Thu Feb 24 07:09:04 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * config.guess: Handle OSF1 running on HPPA processors + + Fri Feb 11 15:33:33 1994 Stu Grossman (grossman at cygnus.com) + + * config.guess: Add Lynx/rs6000 config support. + +Thu Aug 25 20:28:51 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * config.guess (Pyramid*:OSx*:*:*): New case. + (PATH): Add /.attbin at end for finding uname. + (dummy.c): Handle i860-alliant-bsd. Follow whitespace conventions. + +Wed Aug 17 18:21:02 1994 Tor Egge (tegge@pvv.unit.no) + + * config.guess (M88*:DolphinOS:*:*): New case. + +Thu Aug 11 17:00:13 1994 Stan Cox (coxs@dg-rtp.dg.com) + + * config.guess (AViiON:dgux:*:*): Use TARGET_BINARY_INTERFACE + to select whether to use ELF or COFF. + +Thu Jul 28 19:16:24 1994 Uwe Seimet (seimet@chemie.uni-kl.de) + + * config.guess: Recognize m68k-atari-sysv4. + +Sun Jul 24 16:20:53 1994 Richard Stallman <rms@mole.gnu.ai.mit.edu> + + * config.guess: Recognize i860-stardent-sysv and i860-unknown-sysv. + +Sat Jul 23 02:15:01 1994 Karl Heuer (karl@hal.gnu.ai.mit.edu) + + * config.guess (isc): Distinguish isc from generic sysv32. + +Mon Jul 11 23:55:13 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getopt.c (posixly_correct): New variable. + (_getopt_initialize): Set posixly_correct from envvar. + (_getopt_internal): Don't use "illegal" in error message + unless posixly_correct. + +Sun Jul 03 08:46:58 1994 Jim Meyering (meyering@comco.com) + + * pathmax.h: Add HAVE_SYS_PARAM_H to and remove !MS_DOS from + preprocessor conditional guarding inclusion of sys/param.h. + +Mon Jun 20 23:45:34 1994 Jim Meyering (meyering@comco.com) + + * modechange.c (mode_compile) [lint]: Initialize CHANGE to suppress + used uninitialized compiler warning. + +Wed Jun 15 19:07:49 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * config.guess (alpha): Supoort OSF/1 V2.0 and later. + +Tue Jun 14 17:50:05 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * obstack.h (obstack_grow{,0}): Cast WHERE to char * before + passing to bcopy. + +Mon Jun 6 04:59:28 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config.guess: Add support for bsdi. + +Sat Jun 4 01:24:59 1994 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * getloadavg.c: Put #include of errno.h and decl of errno before + #ifndef HAVE_GETLOADAVG. + +Thu Jun 2 13:42:39 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * alloca.c [emacs]: Block input around the garbage reclamation. + Include blockinput.h. + +Tue May 10 16:53:55 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * config.guess: Add trap cmd to remove dummy.c and dummy when + interrupted. + +Sun May 1 10:23:10 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config.guess: Guess the OS version for HPUX. + +Wed Apr 27 15:14:26 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * install.sh: If $dstdir exists, don't check whether each + component does. + +Mon Apr 25 14:39:06 1994 Poul-Henning Kamp (phk@login.dkuug.dk) + + * config.guess: Recognize FreeBSD. + +Sun Apr 24 17:56:58 1994 Jim Meyering (meyering@comco.com) + + * getdate.y (difftm, get_date): Revert my April 18 changes. + Paul Eggert pointed out that that hack probably wouldn't work + for places like Chile that had DST in effect on 31 Dec 1970. + * (get_date): Instead, add 60 minutes to timezone if DST is in + effect locally. From andy@eng.kvaerner.no (Andrew Walker). + Remove static declaration of `RCS.' + +Fri Apr 22 22:15:28 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * install.sh: Add -d, -t, -b options. Make leading directories. + Don't partially install files. + From zoo@cygnus.com. + +Wed Apr 20 18:07:13 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * config.guess (dummy.c): Redirect stderr for `hostinfo' command. + (dummy): Redirect stderr from compilation of dummy.c. + +Wed Apr 20 06:36:32 1994 Philippe De Muyter (phdm@info.ucl.ac.be) + + * config.guess: Recognize UnixWare 1.1 (UNAME_SYSTEM is SYSTEM_V + instead of UNIX_SV for UnixWare 1.0). + +Mon Apr 18 22:01:27 1994 Jim Meyering (meyering@comco.com) + + * getdate.y (difftm): Remove function. + (get_date): Get timezone *without DST bias* from localtime(&zero). + Modeled after the hack in localtime.pl from the perl distribution. + This fixes an error that had `date -d '4apr94'' producing + `Sun Apr 3 23:00:00 CDT 1994'. + +Fri Apr 15 22:46:59 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getdate.y: Delete special alloca code. + +Tue Apr 12 15:05:08 1994 Noah Friedman (friedman@prep.ai.mit.edu) + + * config.guess: Merge rms' new entry for i486-ncr-sysv4 with the + previously existing one. + +Mon Apr 11 00:54:33 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getopt.c [not __GNU_LIBRARY__] [__GCC__] [not __STDC__]: + Declare strlen to return int. Don't include stddef.h. + + * config.guess: Add 3[34]??,3[34]??:*:4.0:* for i486-ncr-sysv4. + +Sat Apr 9 14:59:28 1994 Christian Kranz (kranz@sent5.uni-duisburg.de) + + * config.guess: Distinguish between NeXTStep 2.1 and 3.x. + +Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu) + + * obstack.h, getopt.c: Delete use of IN_GCC to control whether + stddef.h or gstddef.h is included. + +Fri Mar 25 23:01:17 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * mkinstalldirs: Preserve leading slash in file names. + From Jim Meyering. + +Sun Mar 20 01:29:20 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * alloca.s [emacs]: Use <...> to include config.h. + +Tue Mar 1 21:53:03 1994 Karl Heuer (kwzh@hal.gnu.ai.mit.edu) + + * config.guess (UNAME_VERSION): Recognize aix3.2.4 and aix3.2.5. + +Thu Feb 24 14:54:23 1994 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * getopt.c: Remove #ifdef GETOPT_COMPAT and #if 0 code. + (_getopt_initialize): New function, broken out of _getopt_internal. + (_getopt_internal): + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + +Thu Feb 10 14:44:16 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC]: + Test just __STDC__, not emacs. + +Wed Feb 9 17:46:31 1994 Karl Heuer (kwzh@mole.gnu.ai.mit.edu) + + * getdate.y (difftm): Simplify return expression. + +Wed Feb 9 00:14:00 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC] + [emacs] [not __STDC__]: Don't include stddef.h. Don't declare strlen. + +Tue Feb 8 14:14:31 1994 David J. MacKenzie (djm at douglas.gnu.ai.mit.edu) + + Handle obstack_chunk_alloc returning NULL. This allows + obstacks to be used by libraries, without forcing them + to call exit or longjmp. + * obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk): + If CALL_CHUNKFUN returns NULL, set alloc_failed, else clear it. + (_obstack_begin, _obstack_begin_1): Return 1 if successful, 0 if not. + * obstack.h (struct obstack): Add alloc_failed flag. + _obstack_begin, _obstack_begin_1): Declare to return int, not void. + (obstack_finish): If alloc_failed, return NULL. + (obstack_base, obstack_next_free, objstack_object_size): + If alloc_failed, return 0. + (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow, + obstack_int_grow, obstack_blank): If alloc_failed, do nothing that + could corrupt the obstack. + (obstack_chunkfun, obstack_freefun): New macros, used in GDB. + +Sun Jan 30 17:58:06 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * config.guess: Recognize vax hosts. + +Mon Jan 24 18:40:06 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * config.guess: Clean up NeXT support, to allow nextstep + on Intel machines. Make OS be nextstep. + +Sun Jan 23 18:47:22 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * config.guess: Add alternate forms for Convex. + +Thu Jan 6 14:00:23 1994 david d `zoo' zuhn (zoo@cygnus.com) + + * config.guess: add support for Tektronix 68k and 88k boxes; + better Apollo, Sony NEWS information + +Sun Dec 26 03:58:32 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * filemode.c (ftypelet): Don't use mode_t. Take long arg. + (mode_t): Don't ever define it. + (mode_string): Cast ftypelet's arg to long. + +Fri Dec 24 19:43:00 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * getopt.c (_NO_PROTO): Define before config.h is included. + +Wed Dec 22 17:01:19 1993 Jim Meyering (meyering@comco.com) + + * getdate.y (date): Parse dates like 17-JUN-1991. + +Tue Dec 07 14:52:39 1993 Jim Meyering (meyering@comco.com) + + Mon Dec 6 11:13:07 1993 Jason Merrill (jason@deneb.cygnus.com) + + * getdate.y (number): Change parsing of number > 10000 to + YYMMDD rather than YYHHmm. + +Sat Nov 20 17:47:50 1993 Noah Friedman (friedman@gnu.ai.mit.edu) + + * error.c (error): fflush stdout before writing to stderr. + +Tue Nov 09 10:05:48 1993 Jim Meyering (meyering@comco.com) + + * getdate.y (ToSeconds): Add a `default: abort ();' case. + +Thu Nov 4 12:59:19 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) + + * config.guess: add support for {i386,m68k,sparc} LynxOS; Hitachi + HPPA machines; Acorn Risc Machines; DG/UX; Motorola SVr3 on m88k + +Wed Nov 3 08:06:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c (getloadavg) [__NetBSD__]: Fix typo. + +Tue Nov 02 16:03:41 1993 Jim Meyering (meyering@comco.com) + + * getdate.y [!defined(USG) && defined(HAVE_FTIME)]: Don't test + these when deciding whether to include sys/timeb.h. Test only + HAVE_SYS_TIMEB_H. + +Sat Oct 16 23:31:34 1993 Jim Meyering (meyering@comco.com) + + * getusershell.c (getusershell): Always return a string allocated + by malloc. + +Tue Oct 12 00:53:26 1993 Jim Meyering (meyering@comco.com) + + * getugroups.c [HAVE_CONFIG_H, CONFIG_BROKETS]: Include <config.h> + or "config.h". + * getusershell.c: Ditto. + +Thu Oct 07 19:08:00 1993 Jim Meyering (meyering@comco.com) + + * getdate.y [!__GNUC__ && !HAVE_ALLOCA_H]: Declare alloca as void* + rather than char*. The latter conflicts with a dcl from bison.simple. + +Tue Oct 05 14:52:02 1993 Jim Meyering (meyering@comco.com) + + * error.c [CONFIG_BROKETS]: Include <config.h> only under + this condition, else "config.h". + * modechange.c: Likewise. + + * filemode.c, modechange.c [STAT_MACROS_BROKEN]: Test this. + +Sun Oct 3 15:33:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c (getloadavg) [__NetBSD__]: New netbsd support using + /kern/loadavg. + +Mon Sep 20 15:59:03 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * alloca.c [emacs || CONFIG_BROKETS]: Include <config.h> only under + these, else "config.h". + * filemode.c: Likewise. + * signame.c, getloadavg.c, getopt.c, getopt1.c: Likewise. + +Wed Sep 15 00:03:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * config.guess: New version from Cygnus; has netbsd support. + +Mon Sep 13 19:25:24 1993 david d 'zoo' zuhn (zoo@geech.gnu.ai.mit.edu) + + * config.guess: add support for OSF/1 v1.3 and 4.4 and 4.3BSD + on hp300 machines + +Fri Sep 10 00:22:04 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * config.guess: Recognize netbsd on i[34]86 and hp300. + + * alloca.c: Include <config.h> instead of "config.h". + * crt0.c: Likewise. + * filemode.c: Likewise. + * getdate.y: Likewise. + +Fri Aug 27 10:27:13 1993 Paul Eggert (eggert@twinsun.com) + + * xmalloc.c: Include "config.h" if HAVE_CONFIG_H. Use size_t, + not int, when needed. + (VOID): New macro. Use it when needed. + (error): Declaration uses varargs if required. + +Fri Aug 27 09:59:26 1993 Paul Eggert (eggert@wombat.gnu.ai.mit.edu) + + * error.c: Include "config.h" if HAVE_CONFIG_H. + +Wed Aug 25 17:46:01 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * signame.c [! HAVE_SYS_SIGLIST] [! SYS_SIGLIST_DECLARED]: Declare + sys_siglist. + +Mon Aug 16 15:10:30 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * alloca.c: Reverse sense of GCC 2 #ifdef. + +Sat Aug 14 23:26:30 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * config.guess: Detect mips-mips-ricos... + Handle 9000/4??:HP-UX like 9000/3??:HP-UX. + Fix 9000/7??:4.3bsd... + +Thu Aug 12 16:18:12 1993 Paul Eggert (eggert@twinsun.com) + + * getdate.y (get_date): To determine the time zone, compare localtime + to gmtime output, instead of trying to use buggy and unportable + OS timezone primitives. + (difftm): New function. + (HAVE_GETTIMEOFDAY): Remove. + (timezone): Undef it if defined (not if sgi). + +Thu Aug 12 18:16:49 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c, getopt.c, getopt1.c [HAVE_CONFIG_H]: Include + <config.h> instead of "config.h". + +Wed Aug 11 03:27:12 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * alloca.c: Do nothing if compiling with GCC version 2. + +Tue Aug 10 17:27:27 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * alloca.c: Always declare malloc, whether or not it is defined + as xmalloc. + +Sat Aug 7 16:55:06 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * getopt1.c: Declare const the way getopt.c does. + +Mon Aug 2 16:48:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [OSF_ALPHA]: #undef and redefine FSCALE. + +Sun Aug 1 16:39:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [TEST] (main): If NAPTIME is zero, don't set it to 5. + Break out of loop at end if NAPTIME is zero. + [! HAVE_GETLOADAVG]: Protect all but [TEST] portion with this. + +Fri Jul 30 18:28:40 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * getpagesize.h: Don't define HAVE_GETPAGESIZE; assume + configure has detected it. + +Thu Jul 29 23:20:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [__linux__]: Test this instead of [LINUX]. + +Mon Jul 26 13:36:55 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c (OSF_ALPHA): Test [__alpha] as well as [__alpha__]. + + * signame.h (psignal) [!HAVE_PSIGNAL]: Don't test [! HAVE_SYS_SIGLIST]. + * signame.c (psignal) [!HAVE_PSIGNAL]: Test this instead of + [! HAVE_SYS_SIGLIST]. + + * getloadavg.c [sgi || sequent]: #undef FSCALE before defining it. + +Wed Jul 21 17:08:07 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * obstack.c [__STDC__]: Declare prototype for _obstack_allocated_p. + +Wed Jul 14 00:55:24 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * config.guess: Add case for Bull dpx/2. + +Tue Jul 13 12:38:13 1993 Jim Meyering (meyering@comco.com) + + * alloca.c: Enable the Cray stack-segment unwinding code only + if configure defines CRAY_STACKSEG_END. The C-90 doesn't need + (and can't use) any of the Cray-specific code. + +Mon Jul 12 18:13:16 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * getloadavg.c (getloadavg) [NEXT]: It's ok if the user asks + for >1 numbers -- just return 1. + +Wed Jul 7 14:03:45 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getopt.c: Separate __STDC__ conditional from const conditional. + +Tue Jul 6 19:03:25 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * getloadavg.c (getloadavg) [SUNOS_5]: Set `offset' from + kvm_nlist. Don't do the nlist but do initialize the struct + nlist for use by kvm_nlist. + +Mon Jun 28 14:55:05 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * pathmax.h: Use !__GNUC__ instead of USG to check for whether + to include limits.h on non-POSIX systems. + +Sat Jun 26 15:26:13 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getopt.c [not __GNU_LIBRARY__, but __GNUC__] (strlen): + Include stddef.h or gstddef.h, and declare strlen. + +Fri Jun 25 15:44:11 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getopt.c (exchange): Declare missing variables I. + +Tue Jun 22 00:03:11 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getopt.c (exchange): Use just one slot of temporary space. + (alloca, __alloca): All definitions deleted. + (my_bcopy): All definitions deleted. + +Wed Jun 16 17:09:47 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * crt0.c: [hp9000s300, ! OLD_HP_ASSEMBLER] Add flag_68040 to + the list of flags already present. + +Thu Jun 10 16:28:34 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * config.guess: New version from Cygnus. + +Wed Jun 9 16:28:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [! LOAD_AVE_TYPE]: Protect LOAD_AVE_TYPE definitions + with this. Use "#if defined (ardent) && defined (titan)", instead + of the bogus "#ifdef ardent && titan". Fix typo tex4300 -> tek4300. + +Wed Jun 9 05:19:56 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * getopt.c: Remove "|| defined(__sgi)" from the conditions for + #including "alloca.h"; autoconf ought to be able to figure + this out accurately, and that change was supposedly made for + the sake of Emacs, which does use autoconf. + + * getloadavg.c: Break up #if lines longer than 256 characters, + for VMS. + +Tue Jun 8 07:56:45 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * config.guess: Add clause to the first big case statement to + detect Motorola Delta 68k, up to r3v7. + +Sun Jun 6 03:52:21 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * filemode.c: Include config.h if HAVE_CONFIG_H. + (mode_t): Define, if NO_MODE_T. + +Fri May 28 03:21:21 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * getopt.c: If __sgi is defined, #include <alloca.h> too. + +Mon May 24 20:43:38 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * alloca.c [!emacs]: Define malloc as xmalloc. Declare xmalloc. + +Mon May 24 17:40:32 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c (getloadavg) [OSF_MIPS]: Don't define + LDAV_PRIVILEGED. Cast LOAD_AVE.tl_lscale to double. + +Mon May 24 11:53:18 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * alloca.c: Make this safe for Emacs. + [! emacs] Declare malloc. + (alloca): Call malloc, not xmalloc. + +Mon May 24 00:59:13 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getloadavg.c (getloadavg) [NO_GET_LOAD_AVG]: Just fail. + +Sun May 23 21:56:11 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * getdate.y [__GNUC__] (alloca): #undef this before we give + our new definition. + +Sun May 23 13:53:12 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * alloca.c: Call xmalloc (once again). + [emacs]: Define xmalloc as malloc. + [!emacs]: Declare xmalloc. + +Sun May 23 05:47:31 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * mkinstalldirs (errstatus): New variable. + Use inner `for' loop instead of `while test' on $#. + +Sat May 22 20:14:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * mkinstalldirs: Set IFS to % instead of / and use sed to translate + /s in the directory name into %s first. Initialize PATHCOMP always + to empty. + +Fri May 21 19:32:43 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * alloca.c (free): Don't #define this to be xfree whenever + emacs is #defined. That's only appropriate for some of the + files in Emacs which use alloca. + (xmalloc): Remove this declaration. It's inappropriate. + (alloca): Call malloc, not xmalloc. + +Thu May 20 16:22:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c (getloadavg) [LINUX]: Close FD if read fails. + Check return value of sscanf. + +Wed May 19 21:16:24 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * getloadavg.c (getloadavg): Add support for Linux, from + Michael K. Johnson. + +Wed May 19 13:47:02 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [__osf__ && (mips || __mips__)]: Include + <sys/table.h> and #define OSF_MIPS. + (getloadavg) [OSF_MIPS]: Special code using `table'. + +Mon May 17 15:55:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [butterfly]: Define NLIST_STRUCT; not LOAD_AVE_TYPE. + +Sun May 16 22:00:06 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * a.out.gnu.h [sequent && i386] (N_MAGIC, N_MACHTYPE, N_FLAGS, + N_SET_INFO, M_SET_MAGIC, N_SET_MACHTYPE, N_SET_FLAGS, [OZN]MAGIC, + N_BADMAG, N_ADDRADJ, N_DATOFF, N_TRELOFF, N_SYMOFF, N_TXTADDR, + N_COMM, N_FN, PAGE_SIZE, SEGMENT_SIZE): Define. + +Sat May 15 00:50:03 1993 Jim Meyering (meyering@comco.com) + + * getdate.y: Fix the time.h versus sys/time.h problem once and + for all. Packages that use this file should use autoconf's + AC_TIME_WITH_SYS_TIME and AC_HAVE_HEADERS(sys/time.h) macros. + +Fri May 14 16:38:56 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [butterfly] (LOAD_AVE_TYPE): Define as long. + +Thu May 13 01:49:31 1993 Jim Meyering (meyering@comco.com) + + * error.c: Move extern dcl of program_name out of error. + +Sun May 9 15:21:11 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [HPUX && ! hpux]: Define hpux. + +Sat May 8 20:35:04 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getloadavg.c: Rename initialized to getloadavg_initialized. + +Sat May 8 13:32:15 1993 Jim Meyering (meyering@comco.com) + + * alloca.c: Indent and reformat comments. + + * alloca.c (i00afunc): New functions for determining relative + stack frame ordering for Crays. From Otto Tennant. + +Fri May 7 15:54:30 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [NeXT]: Include <mach/mach.h> #ifdef + HAVE_MACH_MACH_H, else <mach.h>. + +Wed May 5 13:31:55 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c (LDAV_SYMBOL) [hpux && ! hp9000s300]: Use this + conditional, not just [hpux], to define as "avenrun". + + * getloadavg.c [unix && m68k && mc68000 && mc68020 && + _MACH_IND_SYS_TYPES]: Define tek4300. + [tek4300] (LOAD_AVE_TYPE): Define as long. + [tek4300] (FSCALE): Define as 100.0. + +Mon May 3 22:17:45 1993 Jim Meyering (meyering@comco.com) + + * getugroups.c: Don't define GETGROUPS_T. Now configure does it. + +Mon May 3 17:12:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c (getloadavg) [VMS]: Don't define LDAV_DONE. + + * getloadavg.c [ardent && titan] + (LOAD_AVE_TYPE): Define as long. + (FSCALE): Define as 65536.0. + (LDAV_SYMBOL): Define as "avenrun". + +Tue Apr 27 14:07:18 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * getdate.y: If HAVE_SYS_TIMEB_H is #defined, then include + <sys/timeb.h> instead of defining struct timeb ourselves. + +Thu Apr 22 17:23:42 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c (getloadavg) [!LDAV_DONE && LOAD_AVE_TYPE && !VMS]: + Don't #define LDAV_DONE here. + [!LDAV_DONE && LOAD_AVE_TYPE]: Define it here instead. + +Mon Apr 19 18:09:18 1993 Jim Meyering (meyering@comco.com) + + * getdate.y: Use TM_IN_SYS_TIME. + +Fri Apr 16 18:10:06 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * getdate.y [emacs] (static): If the Emacs configuration files + have #defined static to be the empty string, then #undefine + it; this file doesn't need that hack. + +Fri Apr 16 12:13:37 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * obstack.c, getopt.c, getopt1.c: Surround code with + #if defined (_LIBC) || !defined (__GNU_LIBRARY__) + +Fri Apr 16 10:52:12 1993 Michael Meissner (meissner@osf.org) + + * getopt.h (getopt): Do not declare getopt with a prototype of + (void) for a non-ANSI compiler. If not GNU library and a + standard compiler, do not declare a prototype for getopt, just + like the comments say, due to different libraries having + different signatures for getopt. + +Thu Apr 15 16:36:03 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c: Move #include <sys/types.h> to top and out of [USG]. + [sgi, UMAX]: Don't include it again later. + +Wed Apr 14 13:06:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c: "#ifdef !define ..." -> "#if !defined ..." + + * getopt.c (_NO_PROTO): Don't define if already defined. + +Tue Apr 13 14:56:33 1993 Jim Meyering (meyering@comco.com) + + * getdate.y [HAVE_MEMCPY && !HAVE_BCOPY]: Define bcopy in terms + of memcpy for old versions of bison that generate parsers that + use bcopy. + +Tue Apr 13 00:48:41 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * getloadavg.c: Changes for Mach from Thorston Ohl + <ohl@chico.harvard.edu>: + #include <mach/mach.h>, instead of <mach.h>. + (getloadavg): Don't forget to test LDAV_DONE in the CPP + conditional protecting the last load average technique. + +Mon Apr 12 23:03:20 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * getloadavg.c: Changes for VMS from Richard Levitte: + (LOAD_AVE_TYPE, NLIST_STRUCT): Collapse multi-line #if + directives into one line; VMS CPP can't handle that. + [VMS] (getloadavg): Add static `initialized' variable, and + set the dsc$w_length and dsc$a_pointer fields of descriptior + instead of the size and ptr fields. + +Mon Apr 12 13:55:34 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getopt.c (my_index): Rename arg STRING to STR. + +Sun Apr 11 17:37:19 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getopt.h: Declare optopt. + + * getopt.c (my_index): First arg is `const char *'. + (my_bcopy): Likewise. + +Tue Apr 6 13:23:28 1993 Jim Meyering (meyering@comco.com) + + * getdate.y [hp9000 && !hpux]: Change erroneous #ifdef to #if. + +Mon Apr 5 17:28:35 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * getdate.y: #include <sys/times.h> whenever HAVE_GETTIMEOFDAY + is #defined. If it isn't defined, try to guess it. + (main): If HAVE_GETTIMEOFDAY is #defined, use it. + +Sun Apr 4 11:24:59 1993 Jim Meyering (meyering@comco.com) + + * getdate.y [sgi]: Undefine timezone before including <time.h>. + + * getdate.y [time.h vs sys/time.h]: Fix boolean algebra typo from + Mar 31 consolidation. + + * getdate.y: Move static dcls of yyerror and yylex to a point + following the definition of those symbols to getdate_{yyerror,yylex}. + + * getdate.y [_AIX]: AIX needs time.h as well as sys/time.h. + +Fri Apr 2 13:30:03 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getopt.c: Define _NO_PROTO before including <stdio.h>. + +Wed Mar 31 18:38:05 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * getdate.y: Consolidate the expressions saying when to + #include <sys/time.h>, to avoid multiple inclusions. + + * getdate.y (yylex, yyerror): Added forward static declarations. + + * getdate.y: Note that David Mackenzie's change of March 16 + 1992 introduces another shift/reduce conflict. + +Wed Mar 31 17:30:29 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * alloca.c [emacs]: Define free as xfree. + (alloca): Use free, not xfree. + +Mon Mar 29 13:46:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * a.out.gnu.h [i386] (SEGMENT_SIZE): Don't use this defn on [sequent]. + [sequent && i386]: #include "/usr/include/a.out.h" explicitly, + since in glibc this is installed as <a.out.h>. + +Mon Mar 15 17:34:53 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * getopt.c (optopt): Initialize it. + +Sun Mar 14 16:39:57 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * getpagesize.h: Add definition for VMS. + +Wed Mar 10 20:57:21 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * getloadavg.c: If USG is defined, #include <sys/types.h>. + Move the test for HAVE_FCNTL_H and _POSIX_VERSION down after this. + + * alloca.c: Use xfree instead of free. + +Wed Mar 10 15:22:56 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * getloadavg.c [__osf__ && __alpha__] (OSF_ALPHA): Define this. + [OSF_ALPHA] (LOAD_AVE_TYPE): Define as long. + [OSF_ALPHA] (NLIST_STRUCT): Define this. + +Wed Feb 24 12:45:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [NeXT]: #undef FSCALE to indicate that the nlist + method is not the desireable one. + (getloadavg) [NeXT]: Return with errno==EINVAL if called with NELEM>1, + since we can get only the one-minute load average on this system. + +Mon Feb 22 08:59:03 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * getloadavg.c (LDAV_CVT): If LDAV_CVT has already been + defined above in terms of Emacs's LOAD_AVE_CVT, don't redefine + it just because we have FSCALE. + +Sun Feb 21 14:52:01 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getopt.c (optopt): New variable. + (_getopt_internal): On any failure for a single-letter option, set + `optopt' to the losing option character. + When a required arg is missing, return ':' instead of '?' if the + first char in OPTSTRING (possibly after the - or +) is a ':'. + Use 1003.2-standard formats for error messages (it specifies + precise formats for unrecognized option and for missing arg). + + * signame.c: #include <sys/types.h> before <signal.h>. + +Thu Jan 28 17:10:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c (LOAD_AVE_TYPE) [sequent]: Define as long. + (FSCALE) [sequent]: Define as 1000.0, like sgi. + (LDAV_CVT) [FSCALE]: Move outside if #ifndef FSCALE. + +Fri Jan 22 14:51:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c (NLIST_STRUCT): Put defined(sony_news) inside the + parens so we don't redefine NLIST_STRUCT when it's already defined. + + * signame.h [!__STDC__] (psignal): Surround decl with #ifndef + HAVE_SYS_SIGLIST || HAVE_PSIGNAL. + (sys_siglist): Surround decl with #ifndef HAVE_SYS_SIGLIST. + +Sun Jan 17 19:55:30 1993 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getopt.c, getopt1.c: Do define const if IN_GCC. + +Thu Jan 14 15:35:33 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * getopt.c, getopt1.c: Don't redefine const; let callers do it. + +Wed Jan 13 15:38:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getopt.c [_AIX]: Put #pragma alloca before all else. + +Tue Jan 12 16:48:04 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * getloadavg.c: Removed #ifdef TEST around #include of errno.h. + +Mon Jan 11 15:17:29 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * getloadavg.c [ultrix]: Define BSD. + + * signame.h [!HAVE_SYS_SIGLIST && !HAVE_PSIGNAL]: Put psignal decl + inside these #ifs. + [!HAVE_SYS_SIGLIST]: Put sys_siglist decl inside this #if. + +Fri Jan 8 17:36:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [HAVE_CONFIG_H]: Test this only for actually + including "config.h". Everything else that HAVE_CONFIG_H used to + turn off is now turned on always. + (KERNEL_FILE) [sequent, hpux], (LDAV_SYMBOL) [alliant]: Don't + define if already defined. + [!LDAV_DONE && LOAD_AVE_TYPE && !VMS]: Define LDAV_PRIVILEGED. + + * getloadavg.c (getloadavg) [!LDAV_DONE]: Set errno to zero. + +Wed Jan 6 18:17:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * signame.c: #include "signame.h" after possibly defining `const', + so signame.h and signame.c consistently use it or don't use it. + + * signame.h: Use "#if defined (__STDC__) && __STDC__", in place of + "#ifdef __STDC__". + +Sat Jan 2 18:32:01 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * getopt.c: Turn off GETOPT_COMPAT by default. + +Thu Dec 31 12:34:41 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * signame.c [HAVE_CONFIG_H]: #include "config.h". + +Tue Dec 8 21:10:29 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * getloadavg.c: Include fcntl.h if HAVE_FCNTL_H, not USG. + + * getdate.y: Include alloca.h if HAVE_ALLOCA_H, not sparc. + +Tue Dec 1 13:27:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * getopt.c, getopt1.c, getdate.y, alloca.c, getloadavg.c + [HAVE_CONFIG_H]: Include config.h. + +Tue Nov 24 09:42:29 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * getugroups.c: Use HAVE_STRING_H, not USG. + +Mon Nov 23 14:36:33 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * signame.c (init_sigs): Renamed to signame_init, made global. + (sig_abbrev, sig_number): Changed callers. + * signame.h (signame_init): Declare it. + + * signame.c (init_sigs): Add SIGDANGER. + +Thu Nov 19 21:34:43 1992 Jim Blandy (jimb@totoro.cs.oberlin.edu) + + * getloadavg.c: #include <sys/param.h> whether or not the + "emacs" CPP symbol is defined. + +Mon Nov 16 13:35:30 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * a.out.gnu.h (SEGMENT_SIZE): Define as PAGE_SIZE if undefined. + (PAGE_SIZE): Define as 16 if undefined; for i386-minix, which has + no predefine we can test. + +Thu Nov 12 23:31:53 1992 Jim Meyering (meyering@hal.gnu.ai.mit.edu) + + * getdate.y, getusershell.c: Give statically initialized arrays + const attribute. + +Sat Nov 7 13:50:27 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * getopt1.c: Only include stdlib.h for __GNU_LIBRARY__. + [!__STDC__]: Don't define const if it was already defined. + +Sat Nov 7 03:28:08 1992 Jim Blandy (jimb@apple-gunkies.gnu.ai.mit.edu) + + * getdate.y [emacs]: Include <config.h>; under Emacs, we get + some additional configuration information from that. + +Sat Nov 7 00:53:35 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * getopt.c [!__STDC__]: Don't define const if it was already defined. + +Tue Nov 3 20:12:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * getloadavg.c: Added `!defined (LDAV_DONE) &&' to all the #if's + for different system types. We want to get one and only one of the + chunks of code which defines LDAV_DONE. + +Tue Oct 27 23:51:02 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * getloadavg.c [sequent]: implies NLIST_STRUCT. + [SYSV || _POSIX_VERSION]: include fcntl.h, not sys/file.h. + +Mon Oct 26 22:43:25 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * install.sh: Move or copy first to temp file, then mv to real dest. + +Mon Oct 19 18:35:04 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * obstack.h (__need_ptrdiff_t): Don't define, if __NeXT__. + +Sat Oct 17 03:17:01 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getopt.c: Include string.h only with GNU library. + +Fri Oct 16 17:40:54 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * getopt.h (no_argument, required_argument, optional_argument): + Define as macros. + (enum _argtype): Removed. + +Fri Oct 2 18:18:35 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * signame.c (NSIG): #define if not #define'd. + +Thu Oct 1 23:33:55 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * getpagesize.h: That should have been HAVE_UNISTD_H, Mike . . . + (no initial underscore). + + * pathmax.h [__MSDOS__]: Don't include sys/param.h. + +Wed Sep 30 13:54:36 1992 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) + + * getpagesize.h: Test for _HAVE_UNISTD_H, because + _POSIX_VERSION is defined by unistd.h, and thus can't be used + in deciding whether to include it. + +Tue Sep 29 07:36:29 1992 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * getloadavg.c: if symbol `sony_news' is defined, define + NLIST_STRUCT and declare LOAD_AVE_TYPE as long. + +Thu Sep 17 20:10:03 1992 Karl Berry (karl@geech.gnu.ai.mit.edu) + + * regex.[ch]: made links into ../regex/, per rms' suggestion. + Please put further ChangeLog entries there. + +Tue Sep 15 20:13:30 1992 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) + + * getpagesize.h: Posix-ify. + +Mon Sep 14 23:48:55 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * getloadavg.c: Define SUNOS_5 if appropriate. + +Mon Sep 14 16:31:01 1992 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) + + * getdate.y: AIX needs sys/time.h as well as time.h. + +Sun Sep 13 07:17:09 1992 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * getdate.y: Don't forget to include the file which defines + struct timeval and struct timezone, if we're using those. + +Fri Sep 11 10:42:24 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * getopt.h: Only prototype getopt for the GNU libc. + +Fri Sep 11 07:46:21 1992 Karl Berry (karl@hal.gnu.ai.mit.edu) + + * regex.h (_RE_ARGS) [!__STDC__]: expand to empty parens. + +Fri Sep 11 00:57:56 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * regex.c (SET_LIST_BIT): Always treat c as positive. + +Thu Sep 10 19:38:59 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * getugroups.c: Always declare getgrent. getgroups fills in + an array of int on 386BSD, too. + +Thu Sep 10 16:35:10 1992 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * getdate.y: Generalize previous change; always use + gettimeofday to find the current time zone's Greenwich offset, + unless we're being compiled under USG or some other system + which already has CPP conditionals saying how to get the time + zone offset. + + * getdate.y: Don't divide the Greenwich offset returned by + gettimeofday by 60; it's already expressed in minutes, so it + doesn't need to be converted. + +Wed Sep 9 21:49:20 1992 Karl Berry (karl@apple-gunkies.gnu.ai.mit.edu) + + * regex.[ch]: version 0.10, incorporating below changes and + more. See /gd/gnu/lib/regex-*/ChangeLog. + +Wed Sep 9 03:09:55 1992 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * malloc.c: if USG, define macros for bcopy and bzero. + Don't redefine USG for hpux if already defined. + +Tue Sep 1 16:46:47 1992 Jim Blandy (jimb@pogo.cs.oberlin.edu) + + * getdate.y: If __ultrix__ is defined, then we don't have the + timezone array, but we do have ftime, so use that instead. + +Fri Aug 28 15:52:40 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * getloadavg.c [SUNOS_5]: New code from Epoch 4.2. + +Thu Aug 27 16:38:22 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * getloadavg.c: Don't check NLIST_STRUCT to decide whether to + define LOAD_AVE_TYPE. + +Wed Aug 26 16:45:54 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * getloadavg.c (FSCALE): Don't #define if already defined. + +Mon Aug 24 13:00:34 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * getopt.c: Include string.h if USG or STDC_HEADERS as well as + if __GNU_LIBRARY__. + +Sun Aug 23 02:51:31 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * regex.[ch] (re_comp): Remove const from return value, to + avoid conflict with 386BSD unistd.h. + +Sat Aug 22 18:30:58 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * getloadavg.c: Define FCALE, then LDAV_CVT in terms of that. + +Fri Aug 21 16:02:20 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * getloadavg.c (_SEQUENT_): Define NLIST_STRUCT. + +Wed Aug 19 16:35:33 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [NLIST_NAME_UNION]: Test this intead of convex. + +Tue Aug 18 23:06:47 1992 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * regex.c (DO_RANGE): Make end and this_char integers, and + fetch this_char's initial value using an 'unsigned char *', so that + character ranges including '\177' through '\377' will work. + +Tue Aug 18 17:32:40 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * getopt.c, getopt1.c, getopt.h: Change license back to GPL from LGPL. + +Fri Aug 14 07:38:34 1992 Torbjorn Granlund (tege@jupiter.sics.se) + + * obstack.h: Fix spelling errors. + +Sat Aug 1 18:12:07 1992 Michael Meissner (meissner@osf.org) + + * obstack.c (CALL_FREEFUN): Recode to use if/else instead of + ?:, since the MIPS compiler does not like ?: expressions where + the two alternate values are both void. + +Sat Aug 1 00:11:25 1992 Fred Fish (fnf at fishpond) + + * obstack.h (obstack_specify_allocation): Use malloc/free + compatible calling convention. + * obstack.h (obstack_specify_allocation_with_arg): Use mmalloc/ + mfree compatible calling convention. + +Wed Jul 29 18:53:13 1992 Karl Berry (karl@hal) + + * regex.c: version 0.9; fixes bug wrt always finding the longest + match. See /gd/gnu/lib/regex-*/ChangeLog. + +Sun Jul 26 18:24:13 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [NeXT]: #undef BSD after <sys/param.h>. + +Sun Jul 26 17:04:20 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * obstack.h (struct obstack): extra_arg is now char *. + (obstack_alloc_arg): Deleted. + (obstack_specify_allocation): Take new arg, to specify extra_arg. + Call _obstack_begin_1. + * obstack.c (_obstack_begin_1): New function. + +Fri Jul 24 16:29:17 1992 Fred Fish (fnf at fishpond) + + * obstack.h (struct obstack): Change maybe_empty_object to + bitfield. Add use_extra_arg bitfield and extra_arg. + * obstack.h (obstack_init, obstack_begin): Cast type of + obstack_chunk_free as well as obstack_chunk_alloc. + * obstack.h (obstack_specify_allocation, obstack_alloc_arg): + New macros. + * obstack.c (CALL_CHUNKFUN, CALL_FREEFUN): New macros to hide + details of chunk allocator/deallocator calls. + * obstack.c (_obstack_begin, _obstack_newchunk): Use CALL_CHUNKFUN. + * obstack.c (_obstack_free, _obstack_newchunk): Use CALL_FREEFUN. + +Fri Jul 24 16:09:37 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * getugroups.c [_POSIX_SOURCE]: Define endgrent as empty. + + * getloadavg.c [HAVE_UNISTD_H]: Include unistd.h. + +Sun Jul 19 23:29:27 1992 John Gilmore (gnu@cygnus.com) + + * stab.def: Order values numerically, and add some stabs + used by Solaris. + +Fri Jul 17 20:21:20 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * getopt.c: Only include stdlib.h for GNU C library, due to + conflicting getopt prototypes. + +Fri Jul 17 05:49:07 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * obstack.c (DEFAULT_ALIGNMENT): Cast to widest integer type to + avoid possible warning if int is narrower than pointer. + +Fri Jul 17 03:47:16 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * getdate.y: Use HAVE_FTIME instead of FTIME_MISSING. + * signame.c: Use HAVE_SYS_SIGLIST instead of SYS_SIGLIST_MISSING. + +Tue Jul 14 18:53:46 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getopt.c (exchange): Cast args to my_bcopy to (char *). + +Tue Jul 14 14:34:33 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * getopt.c: Include stdlib.h and string.h if STDC_HEADERS as + well as if __GNU_LIBRARY__. + +Sat Jul 11 13:24:12 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * obstack.h: Define __need_ptrdiff_t for gstddef.h. + +Fri Jul 10 15:01:25 1992 Karl Berry (karl@hal) + + * regex.[ch]: new version (0.8), incorporating the changes + below. See /gd/gnu/regex/ChangeLog. + +Fri Jul 10 03:46:24 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * obstack.h: Get ptrdiff_t from gstddef.h when building GCC with GCC. + +Thu Jul 9 21:38:37 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getloadavg.c [DGUX]: Cast first arg to dg_sys_info to (long int *). + +Wed Jul 8 19:43:26 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * error.c (private_strerror): Ok if errnum == sys_nerr. + +Wed Jul 8 12:38:37 1992 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * regex.c: Applied tentative patches from Karl Berry: + Miscellaneous doc fixes and reformatting. + (REGEX_REALLOCATE): Parenthesize call to realloc. + Test HAVE_ALLOCA_H, instead of testing for things like sparc, + etc. Don't declare alloca under AIX, since that's done with + the pragma at the top of the file. + (IS_IN_FIRST_STRING): Renamed to FIRST_STRING_P. + (re_match_2): Uses of IS_IN_FIRST_STRING changed. + (TALLOC): Parenthesize call to malloc. + (REGEX_TALLOC): New macro. + (FREE_NONNULL): New macro. + (FREE_VARIABLES): Use FREE_NONNULL instead of always freeing. + (re_match_2): Don't use initializers in declarations of + regstart, regend, old_regstart, old_regend, reg_info, + best_regstart, best_regend, reg_dummy, and reg_info_dummy. + Initialize them only if we actually use the registers. + New variable match_end for use instead of best_regend[0], in + case we don't allocate the registers. Don't fuss with + best_regend[0] directly. + +Sat Jul 4 07:53:45 1992 Karl Berry (karl@hal) + + * regex.c (re_compile_fastmap): init succeed_n_p (to false). + +Fri Jul 3 14:45:29 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * error.c: Change FOO_MISSING to HAVE_FOO. + +Thu Jul 2 15:47:20 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * getloadavg.c: Tweak #defines for SVR4. + Include sys/param.h if unix, not if BSD. + +Wed Jul 1 11:48:37 1992 Karl Berry (karl@hal) + + * regex.[ch]: new version (0.7). See /gd/gnu/regex/ChangeLog. + +Sun Jun 28 06:05:39 1992 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) + + * obstack.h: Define a type for the result of __PTR_TO_INT. + +Sat Jun 27 10:50:59 1992 Jim Blandy (jimb@pogo.cs.oberlin.edu) + + * xregex.c (re_match_2): When we have accepted a match and + restored d from best_regend[0], we need to set dend + appropriately as well. It may happen that dend == end_match_1 + while the restored d is in string2, so we should be prepared + to set dend to end_match_2 in this case. + +Tue Jun 23 22:27:36 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * getloadavg.c (getloadavg) [DGUX]: Don't initialize structure; + the error handling doesn't work that way now. + +Fri Jun 19 13:14:57 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * install.sh: Use - instead of :- in variable assignments. + +Tue Jun 16 19:32:46 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getopt.c [HAVE_ALLOCA_H]: Test to include <alloca.h>. + +Thu Jun 11 15:15:38 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * arscan.c: Removed. It is now part of Make. + +Mon Jun 8 18:03:28 1992 Jim Blandy (jimb@pogo.cs.oberlin.edu) + + * regex.h (RE_NREGS): Doc fix. + + * xregex.c (re_set_registers): New function. + * regex.h (re_set_registers): Declaration for new function. + +Wed Jun 3 16:59:49 1992 Karl Berry (karl@geech.gnu.ai.mit.edu) + + * regex.[ch]: new version (0.6). See ~karl/regex/ChangeLog. + +Sat May 23 22:28:54 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * getopt.c [LIBC]: No longer need to #include <ansidecl.h>. + + * getopt.h, getopt.c, getopt1.c: Changed copyright notice to LGPL. + +Fri May 22 14:50:25 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getopt.c: Change sparc conditional so that sun && sparc + causes use of alloca.h. + +Thu May 14 16:50:28 1992 Karl Berry (karl@kropotkin.gnu.ai.mit.edu) + + * regex.c, regex.h: new version (0.5). See ~karl/regex/ChangeLog. + +Tue May 12 03:27:19 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * getopt.c (_getopt_internal): Don't allow it. + +Tue May 12 00:33:31 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * getopt.c (_getopt_internal): Allow optional arg to be in ARGV elt + after switch. + +Thu May 7 11:46:18 1992 Jim Blandy (jimb@pogo.cs.oberlin.edu) + + * crt0.c (_start): When m68000 is #defined, don't use the + simple C version of _start that simply calls start1; GCC 2.1 + without optimization has _start push a word of garbage on the + stack, which screws up the CRT0_DUMMIES hack. Instead, use an + assembly-language version of _start. + +Mon May 4 16:26:49 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * getopt.h: #ifdef __STDC__ -> #if __STDC__. + +Thu Apr 30 18:53:52 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * a.out.gnu.h [NeXT]: Define PAGE_SIZE, and not SEGMENT_SIZE. + +Sun Apr 26 02:33:50 1992 Jim Blandy (jimb@pogo.cs.oberlin.edu) + + * crt0.c: Don't #include "config.h" unless emacs is #defined. + +Tue Apr 21 17:45:54 1992 Jim Blandy (jimb@pogo.cs.oberlin.edu) + + * regex.c (re_match_2): If we've already allocated memory for + the search buffers, don't allocate them again. + +Mon Apr 13 20:17:47 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * getopt.h: Make the multiple inclusion protection look like + the rest of libc's. + +Wed Apr 1 06:10:15 1992 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * regex.c [emacs]: Include <sys/types.h>, since regex.h wants it. + +Tue Mar 31 12:01:32 1992 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * crt0.c: The changes below are the results of a merge with + the Emacs 19 sources: + (start1): Declare this static before all uses. + Add conditionals for ALLIANT_2800. + + * (_start) for alliant: Set _curbrk and _minbrk from _setbrk, + to help with Emacs dumping. + +Mon Mar 30 18:00:41 1992 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * malloc.c [VMS]: Include vlimit.h. + (calloc): Add a quick implementation of this, in case + something from another library uses it. + (get_lim_data): There are several versions of this function, + tailored for different operating systems; the appropriate + version is chosen by checking for preprocessor symbols which + indicate which operating system Emacs is being compiled for. + Re-arrange the preprocessor conditionals so that the generic + "none of the above" version is last, in the final "else" clause. + + * alloca.c: Do nothing if alloca is defined as a macro. + +Fri Mar 20 02:53:14 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * a.out.gnu.h: Added missing backslash in #if. + +Mon Mar 16 23:46:18 1992 David J. MacKenzie (djm@apple-gunkies.gnu.ai.mit.edu) + + * getdate.y: Support ISO 8601 format. yyyy-mm-dd. + +Sun Mar 15 22:50:30 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * a.out.gnu.h [NeXT || mips] (SEGMENT_SIZE): Define as PAGE_SIZE. + [NeXT] (PAGE_SIZE): Define as 0x2000. + [mips] (PAGE_SIZE): Define as 4096. + + * getopt.c [sparc && svr4]: No <alloca.h>. + +Thu Mar 12 14:26:48 1992 Karl Berry (karl@apple-gunkies.gnu.ai.mit.edu) + + * regex.[ch]: new version (0.4). See ~karl/regex/ChangeLog. + +Tue Mar 10 22:26:14 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * a.out.gnu.h [sun && mc68000]: SEGMENT_SIZE == 0x2000. + +Thu Feb 27 21:37:53 1992 Michael I Bushnell (mib@geech.gnu.ai.mit.edu) + + * getdate.y: `#undef timezone' on SGI systems to avoid naming + clash. + (get_date): Use underscore version for SGI. + [This fix is from beebe@mach.utah.edu.] + +Tue Feb 25 21:23:50 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) + + * getopt.c [__GNU_LIBRARY__]: #include <string.h>. + +Thu Feb 20 13:04:57 1992 Karl Berry (karl@wombat.gnu.ai.mit.edu) + + * regex.[ch]: new version (0.3). See ~karl/regex/ChangeLog for all + the details. + +Wed Feb 19 23:04:05 1992 Charles Hannum (mycroft@gnu.ai.mit.edu) + + * regex.c [_AIX]: Move #pragma alloca to top of file to accommodate + AIX C compiler. + +Mon Feb 17 03:44:03 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) + + * a.out.gnu.h [sparc] (_N_HDROFF): Define as (-sizeof (struct exec)). + That is as if SEGMENT_SIZE were 0, but that would be wrong. + + * a.out.gnu.h [i386] (SEGMENT_SIZE): Define. + +Sun Feb 16 03:10:23 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) + + * a.out.gnu.h [sparc] (PAGE_SIZE, SEGMENT_SIZE): Define. + (PAGSIZ): Define as PAGE_SIZE. + (SEGSIZ): Define as SEGMENT_SIZE. + +Thu Jan 30 19:03:29 1992 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * regex.c (re_search_2): Improve comments. + +Tue Jan 28 00:28:15 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * getopt.h (struct option): Change has_arg back to an int. + +Mon Jan 27 23:03:33 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * getopt.c (_getopt_internal): Don't use a relational operator (>) + on the has_arg field, which is now an enum. + +Fri Jan 17 21:34:02 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) + + * getopt.h: Don't declare envopt. + + * envopt.c: Tweaks to compile under libc. + +Fri Jan 17 21:23:02 1992 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * getopt.c: Describe the new args to _getopt_internal. + +Fri Jan 17 19:26:54 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * getopt.h: Remove decls of _getopt_* and option_index. + Make `name' elt of `struct option' const char *. + Make `has_arg' an enum (integer values same). + * getopt.c (_getopt_internal): Renamed from getopt, taking 3 new args + in place of global vars _getopt_long_options, _getopt_long_only, + and option_index (which are all now gone). + (getopt): New fn, front end to _getopt_internal. + * getopt1.c (getopt_long, getopt_long_only): Use _getopt_internal. + +Tue Jan 7 02:08:10 1992 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * regex.c (malloc, realloc): Don't specify arg types--can + cause error. + +Mon Jan 6 12:53:42 1992 Karl Berry (karl at apple-gunkies.gnu.ai.mit.edu) + + * regex.[ch]: new versions. See ~karl/regex/ChangeLog for all + the details. + +Tue Dec 24 22:42:59 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * obstack.h: Indentation fix. + +Mon Dec 23 23:41:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * regex.c, putenv.c, getugroups.c: Change POSIX ifdefs to + HAVE_UNISTD_H and _POSIX_VERSION. + +Wed Dec 18 14:24:35 1991 Michael Meissner (meissner at osf.org) + + * getopt.h (whole file): Protect getopt.h from being included + twice. + +Fri Dec 6 13:00:42 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * getopt.c (getopt): Cast argv to (char **) (with no const) + when passing to exchange, to be explicit about what's happening. + + * getopt.c: Change POSIX_ME_HARDER to POSIXLY_CORRECT. + +Thu Dec 5 12:12:18 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * getopt.c (my_bcopy, my_index): New functions. + Use instead of bcopy and index. + Avoid conditionals on USG, NeXT, hpux, __GNU_LIBRARY__, etc. + + * getopt1.c, getopt.h (getopt_long*): Like yesterday's getopt change. + +Wed Dec 4 10:51:45 1991 Ron Guilmette (rfg at ncd.com) + + * getopt.c, getopt.h (getopt): Correct the type of the second + parameter so that it agrees with ANSI/POSIX standards. + + * getopt.h: Make all function declarations explicitly `extern'. + +Tue Dec 3 01:34:59 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * getopt.c: Fix some wrong comments. + +Mon Dec 2 17:49:50 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * getopt.c (getopt): Support `+' to introduce long-named + options, as well as `--', if GETOPT_COMPAT is defined. + It is defined by default. + +Sun Dec 1 21:12:32 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * getopt.c (getopt): Long-named options are introduced by `--' + instead of `+'. + Protect all fprintfs with checks of opterr. + Include getopt.h instead of redeclaring things, to stay in sync. + * getopt1.c (getopt_long): No longer disable long options if + POSIX_ME_HARDER is set. + (main): Handle -d. Remove unused var. + +Mon Nov 4 23:06:54 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * regex.h [!__STDC__]: regerror was declared to return size_t * + instead of size_t. + +Sat Nov 2 21:26:42 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * error.c: Use STRERROR_MISSING instead of STDC_HEADERS to + control compiling strerror. + +Fri Oct 18 00:33:43 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * getugroups.c: GID_T -> GETGROUPS_T, for clarity. + +Wed Oct 9 14:14:31 1991 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getopt.c: Treat hpux like USG. + +Tue Oct 8 21:36:52 1991 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * alloca.c: Add some parens to make precedence clearer. + +Sat Oct 5 13:17:59 1991 Richard Stallman (rms@mole.gnu.ai.mit.edu) + + * getopt.c: Treat NeXT like USG. + +Sat Sep 28 02:01:45 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu) + + * regex.c: Include stdlib.h only if STDC_HEADERS, not if POSIX + (POSIX.1 doesn't require it to exist). + +Wed Sep 4 17:32:51 1991 Kathryn A. Hargreaves (letters at apple-gunkies) + + * regex.[ch]: Put current version (0.1) here, after backing up old + files. For ChangeLog details, please refer to the ChangeLog + file in my regex directory. + +Sat Aug 24 04:22:01 1991 David J. MacKenzie (djm at apple-gunkies) + + * getopt1.c: Declare getenv. + +Mon Aug 19 01:35:48 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * regex.c, getopt.c: Indent '#pragma alloca' so non-ANSI + compilers won't choke on it. + +Mon Aug 12 16:43:17 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * getopt.c: _POSIX_OPTION_ORDER renamed to POSIX_ME_HARDER. + * getopt1.c: Support POSIX_ME_HARDER. + +Wed Aug 7 00:53:00 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) + + * getdate.y: Add patch from perf@efd.lth.se to support + explicit "dst", for European timezones. + +Tue Jul 30 17:00:23 1991 David J. MacKenzie (djm at apple-gunkies) + + * getdate.y: Rename NEED_TZSET to FTIME_MISSING. + +Fri Jul 26 23:09:22 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * regex.h: Delete `#pragma once'. + +Fri Jul 26 17:07:39 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * a.out.gnu.h [sparc]: #define SEGMENT_SIZE 0. Is that right?? + +Wed Jul 24 03:29:26 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * getopt.c, regex.c: Put alloca stuff first, where RS6000 requires it. + * getopt.c: Use const instead of CONST, and define it to + nothing if not __STDC__. + + * xmalloc.c (xmalloc, xrealloc): Exit with value 2 on error, + not 1, so cmp can use it. + +Tue Jul 23 15:01:26 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * getugroups.c: GID_T is int if ultrix as well as if sun. + +Mon Jul 22 17:39:35 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * getugroups.c: If POSIX and not sun (bogus!), take an array + of gid_t instead of an array of int. + +Tue Jul 16 21:24:43 1991 Michael Meissner (meissner at wookumz.gnu.ai.mit.edu) + + * obstack.h (__extension__): If compiling with a 1.xx GCC + compiler define __extension__ as nothing. + +Tue Jul 16 20:25:22 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * obstack.h [not __GNUC__] (obstack_finish): Add extra parens for clarity. + (conditionals for __GNUC__): Do not test __STRICT_ANSI__. + [__GNUC__] (most macros): Use __extension__ to avoid -pedantic warning. + +Tue Jul 16 17:12:02 1991 Michael Meissner (meissner at wookumz.gnu.ai.mit.edu) + + * obstack.h (obstack_finish): If compiling with a non-GCC + compiler, use the argument (h) to point to the obstack + structure, rather than the __o1 pointer, which only exists in + the GNU side of the macros. + (#if __GNUC__ && __STDC__): If -pedantic is used do not use + the GNU CC ({}) optimizations, since these cause warnings to + be omitted. + +Tue Jul 16 01:59:58 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) + + * getdate.y (TimezoneTable): #if 0 zones which would require + storing a float in a time_t. + +Fri Jul 12 17:01:58 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * obstack.h (struct obstack): New flag maybe_empty_object. + (obstack_finish, both versions): Set the flag if allocate empty object. + Don't make the object nonempty. This replaces May 7 change. + * obstack.c (_obstack_begin, _obstack_newchunk): Clear the flag. + (_obstack_newchunk): Don't free "empty" chunk if flag is set. + (_obstack_free): Set the flag if we change chunks. + +Sat Jul 6 21:09:31 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) + + * getdate.y [NEED_TZSET]: Declare `timezone'. + +Thu Jun 20 01:11:31 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) + + * getopt.c: Separate decls of getenv and malloc from decls of + index and bcopy, to reduce duplicated code. + +Tue Jun 11 00:11:07 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) + + * regex.c (re_match_2): In case wordbeg, check whether we are + at the start of the string before checking the previous + character, not after, just like in case wordend. + + * getdate.y: Declare alloca for old bisons. + +Mon May 20 13:13:32 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * obstack.c (obstack_free, _obstack_free): Define both, the same way. + +Sun May 19 18:37:38 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu) + + * getdate.y: Rename getdate to get_date to avoid conflict with SVR4. + +Fri May 17 21:09:14 1991 David J. MacKenzie (djm at churchy.gnu.ai.mit.edu) + + * filemode.c (ftypelet): Only test for S_ISBLK if it's defined. + +Sat May 11 14:49:43 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * obstack.h (obstack_finish): Typo in last change (non-GNUC version). + +Tue May 7 15:38:51 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * obstack.h (obstack_finish): Make each object at least 1 byte. + +Tue Apr 30 13:58:16 1991 Richard Stallman (rms at mole.gnu.ai.mit.edu) + + * getopt.c, regex.c [_AIX]: Do #pragma alloca. + +Wed Apr 10 19:08:02 1991 Per Bothner (bothner at pogo.gnu.ai.mit.edu) + + * signame.h: Make sys_siglist be const char[] if __STDC__ + is defined (thus making it compatible with signame.c). + +Tue Apr 2 16:49:02 1991 Roland McGrath (roland at churchy.gnu.ai.mit.edu) + + * glob.c: Put #ifndef alloca around alloca goop. + (glob_vector): Put #ifdef SHELL around label used only there. + +Tue Apr 2 14:32:47 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) + + * glob.c: Attempt to reconcile with bash and make versions of + #ifdefs and #includes. + + * glob.c (glob_vector): If _POSIX_SOURCE, don't use + (non-POSIX) d_ino field of struct dirent. (from bfox) + +Sun Mar 17 16:25:23 1991 Richard Stallman (rms@mole.ai.mit.edu) + + * regex.c (PUSH_FAILURE_POINT): Was multiplying stack size by + a big number. Multiply by 2 instead. + + * signame.c (init_sigs): Define i. + +Fri Feb 22 12:38:22 1991 Mike Haertel (mike at apple-gunkies) + + * obstack.c (_obstack_allocated_p): Use >=, not >, when + comparing with the beginning of the chunk, for the exact + same reason as RMS' change below. + +Thu Feb 21 21:29:50 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * obstack.h [not __GNUC__] (obstack_free): Use >, not >=, + when comparing with beginning of chunk. + + * getopt.c (bcopy): Never declare it. + +Thu Feb 21 09:18:47 1991 David J. MacKenzie (djm at geech.ai.mit.edu) + + * glob.c: Don't declare bcopy if it is a macro. + Use BSD strings for NeXT. Don't include memory.h on POSIX. + +Mon Feb 18 23:41:20 1991 David J. MacKenzie (djm at geech.ai.mit.edu) + + * glob.c: Add special code for bash, #ifdef SHELL. + (glob_pattern_p): Only recognize `[' as a metacharacter if + there is a matching `]', for POSIX.2. (from bfox) + +Mon Jan 28 00:30:39 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * crt0.c [m68k]: Add conditionals for sun_68881, sun_fpa, sun_soft. + +Sun Jan 27 15:18:26 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * getopt.c (bcopy): Don't declare it if it's a macro. + +Thu Jan 24 22:16:14 1991 Richard Stallman (rms at mole.ai.mit.edu) + + * regex.c (re_compile_pattern): Don't translate chars in char set + until the time the bits are set for them. + +Sat Dec 15 18:36:50 1990 David J. MacKenzie (djm at apple-gunkies) + + * filemode.c: Define each S_ISFOO function if not defined by + sys/stat.h. + +Sat Dec 15 15:10:14 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * obstack.h (obstack_init): Cast the chunk alloc function. + (obstack_begin): Likewise. + +Thu Dec 13 17:58:07 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * obstack.h: At all calls to _obstack_newchunk, + enclose in (..., 0), so that both alternatives are ints. + +Thu Dec 6 11:39:11 EST 1990 Jay Fenlason (hack@ai.mit.edu) + + * getdate.y: Add support for 'date' style yymmddhhss dates. + +Mon Dec 3 14:09:40 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * obstack.h: + At all calls to _obstack_newchunk, cast the other alternative to void. + +Sat Dec 2 21:56:25 1990 Roland McGrath (roland at albert.ai.mit.edu) + + * a.out.gnu.h (N_COMM): Define this. + +Thu Nov 30 00:04:35 1990 Roland McGrath (roland at geech.ai.mit.edu) + + * a.out.gnu.h (_N_HDROFF): Use SEGMENT_SIZE rather than a hard-coded + 1024. What moron did this?? + +Wed Nov 29 17:41:09 1990 Roland McGrath (roland at albert.ai.mit.edu) + + * a.out.gnu.h [vax, hp300, pyr] (SEGMENT_SIZE): Define as PAGE_SIZE, + not page_size. + +Wed Nov 14 00:35:16 1990 David J. MacKenzie (djm at apple-gunkies) + + * regex.c (SIGN_EXTEND_CHAR): If UNSIGNED_CHAR is defined, use + an alternate definition (suggested in the GNU grep README). + +Thu Nov 8 12:08:52 1990 David J. MacKenzie (djm at apple-gunkies) + + * filemode.c (ftypelet): Pass a mode_t instead of unsigned + short, so it works on Evans' Minix. If _POSIX_SOURCE is not + defined, define mode_t as unsigned short. Define S_ISTYPE + macros if needed. Use them. + + * modechange.c: Use S_ISDIR. Define if needed. + +Fri Oct 26 16:50:01 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * obstack.c (_obstack_newchunk): If old_chunk becomes empty, free it. + +Mon Oct 15 13:50:17 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * obstack.h (obstack_free): In non-GNU C case, don't use + value of _obstack_free. + +Sun Oct 14 18:51:51 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * crt0.c (new hp assembler): Double flag_fpa and flag_68881 if %d2!=0. + + * alloca.s [MOTOROLA_DELTA]: Avoid putting sp above stack top. + +Mon Oct 1 16:20:02 EDT 1990 Jay Fenlason (hack@ai.mit.edu) + + * obstack.h Declare _obstack_free and _obstack_begin as void instead + of int. Otherwise, GCC won't let you compile obstack.c + +Fri Sep 28 23:53:28 1990 Richard Stallman (rms at mole.ai.mit.edu) + + * obstack.h: Declare the functions we use from obstack.c. + (obstack_blank): In both definitions, rearrange pointer math to avoid + pointing past end of allocated memory. + +Wed Sep 19 21:09:26 1990 Richard Kenner (kenner at vlsi1.ultra.nyu.edu) + + * obstack.h (obstack_int_grow): In non-GCC case, don't try to + post-increment a cast. + +Mon Sep 3 22:18:38 1990 David J. MacKenzie (djm at apple-gunkies) + + * error.c [DOPRNT_MISSING]: Pass args as a fixed number of + `char *'. + +Sun Sep 2 20:51:02 1990 David J. MacKenzie (djm at apple-gunkies) + + * regex.c: Use standard string functions if STDC_HEADERS is + defined. + +Fri Aug 31 06:59:47 1990 Jim Kingdon (kingdon at albert.ai.mit.edu) + + * getopt1.c (getopt_long{,_only}): If opt_index is NULL, don't + try to store into *opt_index. + +Tue Aug 28 18:45:16 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * regex.c: Include some system header files if appropriate. + +Wed Aug 15 14:38:15 1990 David J. MacKenzie (djm at apple-gunkies) + + * regex.c: Define isgraph if ctype.h doesn't (as on Sequents). + +Sun Aug 12 00:20:19 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * getopt.c (getopt): If optstring starts with '+', don't + permute; this is for utilities like time, nice, xargs, and + env, which don't want to mix up their options with those of + the programs they run, but don't want to turn off permuting + for those programs by setting _POSIX_OPTION_ORDER. + +Fri Aug 3 14:25:35 1990 David J. MacKenzie (djm at pogo.ai.mit.edu) + + * getopt.c (main), getopt1.c (main): Read option chars into an + int, not a char. + + * getopt.c (getopt): Increment `optind' after finding + unrecognized or ambiguous long named option. + +Thu Jul 5 09:50:25 1990 David J. MacKenzie (djm at apple-gunkies) + + * getopt.c: If long option's `flag' field is zero, return the + contents of the `val' field. + +Fri Jun 29 01:30:22 1990 David J. MacKenzie (djm at apple-gunkies) + + * getopt.h: Mention in comment how to handle long options that + don't just store a constant in an int. + +Mon Jun 25 18:15:46 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * filemode.c (ftypelet): Distinguish between regular files and + unknown file types using '-' and '?'. + +Sat Jun 16 11:18:26 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * getopt.c: If STDC_HEADERS or __GNU_LIBRARY__ is defined, + include ANSI C header files. + +Thu Jun 14 13:21:42 1990 David J. MacKenzie (djm at apple-gunkies) + + * glob.c (glob_match): Eliminate '^' as a character class + negator, leaving just the POSIX '!'. + +Thu Jun 7 01:01:40 1990 Roland McGrath (mcgrath at paris.Berkeley.EDU) + + * glob.c: __GNU_LIBRARY__ implies DIRENT and STDC_HEADERS. + +Thu Jun 7 03:45:33 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * glob.c: Use <dirent.h> if DIRENT is defined, not _POSIX_SOURCE. + +Wed Jun 6 00:05:03 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * glob.c (glob_filename): Remove tilde expansion code. + +Tue Jun 5 00:35:48 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * error.c: Use VPRINTF_MISSING instead of VPRINTF to control + use of _doprnt. + (error): Use strerror. + (strerror) [!STDC_HEADERS]: New function. + + * glob.c: Optionally support POSIX and STDC headers. + (glob_filename): Make tilde expansion work for patterns + containing subdirectories. + +Mon Jun 4 16:31:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * glob.c (glob_match): Allow '!' as well as '^' to negate + character classes. Check for end of filename when comparing + with char class. Check for end of pattern after backslash in + character class. + (glob_vector): Only calculate D_NAMLEN once, for efficiency. + Don't allocate name_vector if a previous malloc failed. + (glob_dir_to_array): Make string copying more efficient. + (glob_filename): directory_size was off by 1. + Reallocation of result had '1' instead of 'l'. + +Thu May 31 01:45:16 1990 David J. MacKenzie (djm at apple-gunkies) + + * glob.c: Reformat to resemble the bash version more. + + * filemode.c: If _POSIX_SOURCE is defined, use POSIX macro + names for mode bits. + +Sat May 19 15:17:42 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * filemode.c (mode_string): New function. + (filemodestring): Reimplement in terms of mode_string. + (ftypelet): Take an unsigned short instead of a struct stat *. + Fix up comments. + +Thu May 10 12:57:11 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * error.c: If __STDC__, use stdarg instead of varargs. + +Tue May 1 16:07:32 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * alloca.s [hp9000s300]: Avoid using sp as temporary. + +Fri Apr 20 16:58:24 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * obstack.c, obstack.h (obstack_free): Use >, not >=, to compare + object with chunk address. + +Mon Apr 9 15:11:22 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) + + * a.out.encap.h: Protect against multiple inclusion. + +Fri Apr 6 23:27:46 1990 Jim Kingdon (kingdon at apple-gunkies.ai.mit.edu) + + * a.out.gnu.h (enum machine_type): Put missing comma after M_SPARC. + +Mon Apr 2 04:49:18 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) + + * malloc.c: Make get_lim_data always "static void" regardless + of #ifdefs. Declare it before using it. + +Mon Mar 26 00:36:52 1990 David J. MacKenzie (djm at spike.ai.mit.edu) + + * getopt.c (getopt): For long-named options that take optional + args, never use the next argv-element as an arg; args for + these must be part of the same argv-element, separated from + the option name by a '='. This makes them consistent with how + short-named options with optional args are handled. + + * getopt.h, getopt.c, getopt1.c: Add some const declarations + if __STDC__. + +Sun Mar 4 12:11:31 1990 Kathy Hargreaves (kathy at hayley) + + * regex.h: Added syntax bit RE_NO_EMPTY_RANGES which is set if + an ending range point has to collate higher or equal to the + starting range point. + Added syntax bit RE_NO_HYPHEN_RANGE_END which is set if a hyphen + can't be an ending range point. + Set to two above bits in RE_SYNTAX_POSIX_BASIC and + RE_SYNTAX_POSIX_EXTENDED. + + regex.c: (re_compile_pattern): Don't allow empty ranges if the + RE_NO_EMPTY_RANGES syntax bit is set. + Don't let a hyphen be a range end if the RE_NO_HYPHEN_RANGE_END + syntax bit is set. + (ESTACK_PUSH_2): renamed this PUSH_FAILURE_POINT and made it + push all the used registers on the stack, as well as the number + of the highest numbered register used, and (as before) the two + failure points. + (re_match_2): Fixed up comments. + Added arrays best_regstart[], best_regstart_seg1[], best_regend[], + and best_regend_seg1[] to keep track of the best match so far + whenever reach the end of the pattern but not the end of the + string, and there are still failure points on the stack with + which to backtrack; if so, do the saving and force a fail. + If reach the end of the pattern but not the end of the string, + but there are no more failure points to try, restore the best + match so far, set the registers and return. + Compacted some code. + In stop_memory case, if the subexpression we've just left is in + a loop, push onto the stack the loop's on_failure_jump failure + point along with the current pointer into the string (d). + In finalize_jump case, in addition to popping the failure + points, pop the saved registers. + In the fail case, restore the registers, as well as the failure + points. + + +Sun Feb 18 15:08:10 1990 Kathy Hargreaves (kathy at hayley) + + * regex.c: (global): Defined a macro GET_BUFFER_SPACE which + makes sure you have a specified number of buffer bytes + allocated. + Redefined the macro BUFPUSH to use this. + Added comments. + + (re_compile_pattern): Call GET_BUFFER_SPACE before storing or + inserting any jumps. + + (re_match_2): Set d to string1 + pos and dend to end_match_1 + only if string1 isn't null. + Force exit from a loop if it's around empty parentheses. + In stop_memory case, if found some jumps, increment p2 before + extracting address to which to jump. Also, don't need to know + how many more times can jump_n. + In begline case, d must equal string1 or string2, in that order, + only if they are not null. + In maybe_finalize_jump case, skip over start_memorys' and + stop_memorys' register numbers, too. + +Thu Feb 15 15:53:55 1990 Kathy Hargreaves (kathy at hayley) + + * regex.c (BUFPUSH): off by one goof in deciding whether to + EXTEND_BUFFER. + +Wed Jan 24 17:07:46 1990 Kathy Hargreaves (kathy at hayley) + + * regex.h: Moved definition of NULL to here. + Got rid of ``In other words...'' comment. + Added to some comments. + + regex.c: (re_compile_pattern): Tried to bulletproof some code, + i.e., checked if backward references (e.g., p[-1]) were within + the range of pattern. + + (re_compile_fastmap): Fixed a bug in succeed_n part where was + getting the amount to jump instead of how many times to jump. + + (re_search_2): Changed the name of the variable ``total'' to + ``total_size.'' + Condensed some code. + + (re_match_2): Moved the comment about duplicate from above the + start_memory case to above duplicate case. + + (global): Rewrote some comments. + Added commandline arguments to testing. + + +Wed Jan 17 11:47:27 1990 Kathy Hargreaves (kathy at hayley) + + * regex.c: (global): Defined a macro STORE_NUMBER which stores a + number into two contiguous bytes. Also defined STORE_NUMBER_AND_INCR + which does the same thing and then increments the pointer to the + storage place to point after the number. + Defined a macro EXTRACT_NUMBER which extracts a number from two + continguous bytes. Also defined EXTRACT_NUMBER_AND_INCR which + does the same thing and then increments the pointer to the + source to point to after where the number was. + + +Tue Jan 16 12:09:19 1990 Kathy Hargreaves (kathy at hayley) + + * regex.h: Incorporated rms' changes. + Defined RE_NO_BK_REFS syntax bit which is set when want to + interpret back reference patterns as literals. + Defined RE_NO_EMPTY_BRACKETS syntax bit which is set when want + empty bracket expressions to be illegal. + Defined RE_CONTEXTUAL_ILLEGAL_OPS syntax bit which is set when want + it to be illegal for *, +, ? and { to be first in an re or come + immediately after a | or a (, and for ^ not to appear in a + nonleading position and $ in a nontrailing position (outside of + bracket expressions, that is). + Defined RE_LIMITED_OPS syntax bit which is set when want +, ? + and | to always be literals instead of ops. + Fixed up the Posix syntax. + Changed the syntax bit comments from saying, e.g., ``0 means...'' + to ``If this bit is set, it means...''. + Changed the syntax bit defines to use shifts instead of integers. + + * regex.c: (global): Incorporated rms' changes. + + (re_compile_pattern): Incorporated rms' changes + Made it illegal for a $ to appear anywhere but inside a bracket + expression or at the end of an re when RE_CONTEXTUAL_ILLEGAL_OPS + is set. Made the same hold for $ except it has to be at the + beginning of an re instead of the end. + Made the re "[]" illegal if RE_NO_EMPTY_BRACKETS is set. + Made it illegal for | to be first or last in an re, or immediately + follow another | or a (. + Added and embellished some comments. + Allowed \{ to be interpreted as a literal if RE_NO_BK_CURLY_BRACES + is set. + Made it illegal for *, +, ?, and { to appear first in an re, or + immediately follow a | or a ( when RE_CONTEXTUAL_ILLEGAL_OPS is set. + Made back references interpreted as literals if RE_NO_BK_REFS is set. + Made recursive intervals either illegal (if RE_NO_BK_CURLY_BRACES + isn't set) or interpreted as literals (if is set), if RE_INTERVALS + is set. + Made it treat +, ? and | as literals if RE_LIMITED_OPS is set. + Cleaned up some code. + + +Thu Dec 21 15:31:32 1989 Kathy Hargreaves (kathy at hayley) + + * regex.c: (global): Moved RE_DUP_MAX to regex.h and made it + equal 2^15 - 1 instead of 1000. + Defined NULL to be zero. + Moved the definition of BYTEWIDTH to regex.h. + Made the global variable obscure_syntax nonstatic so the tests in + another file could use it. + + (re_compile_pattern): Defined a maximum length (CHAR_CLASS_MAX_LENGTH) + for character class strings (i.e., what's between the [: and the + :]'s). + Defined a macro SET_LIST_BIT(c) which sets the bit for C in a + character set list. + Took out comments that EXTEND_BUFFER clobbers C. + Made the string "^" match itself, if not RE_CONTEXT_IND_OPS. + Added character classes to bracket expressions. + Change the laststart pointer saved with the start of each + subexpression to point to start_memory instead of after the + following register number. This is because the subexpression + might be in a loop. + Added comments and compacted some code. + Made intervals only work if preceded by an re matching a single + character or a subexpression. + Made back references to nonexistent subexpressions illegal if + using POSIX syntax. + Made intervals work on the last preceding character of a + concatenation of characters, e.g., ab{0,} matches abbb, not abab. + Moved macro PREFETCH to outside the routine. + + (re_compile_fastmap): Added succeed_n to work analogously to + on_failure_jump if n is zero and jump_n to work analogously to + the other backward jumps. + + (re_match_2): Defined macro SET_REGS_MATCHED to set which + current subexpressions had matches within them. + Changed some comments. + Added reg_active and reg_matched_something arrays to keep track + of in which subexpressions currently have matched something. + Defined MATCHING_IN_FIRST_STRING and replaced ``dend == end_match_1'' + with it to make code easier to understand. + Fixed so can apply * and intervals to arbitrarily nested + subexpressions. (Lots of previous bugs here.) + Changed so won't match a newline if syntax bit RE_DOT_NOT_NULL is set. + Made the upcase array nonstatic so the testing file could use it also. + + (main.c): Moved the tests out to another file. + + (tests.c): Moved all the testing stuff here. + + +Sat Nov 18 19:30:30 1989 Kathy Hargreaves (kathy at hayley) + + * regex.c: (re_compile_pattern): Defined RE_DUP_MAX, the maximum + number of times an interval can match a pattern. + Added macro GET_UNSIGNED_NUMBER (used to get below): + Added variables lower_bound and upper_bound for upper and lower + bounds of intervals. + Added variable num_fetches so intervals could do backtracking. + Added code to handle '{' and "\{" and intervals. + Added to comments. + + (store_jump_n): (Added) Stores a jump with a number following the + relative address (for intervals). + + (insert_jump_n): (Added) Inserts a jump_n. + + (re_match_2): Defined a macro ESTACK_PUSH_2 for the error stack; + it checks for overflow and reallocates if necessary. + + * regex.h: Added bits (RE_INTERVALS and RE_NO_BK_CURLY_BRACES) + to obscure syntax to indicate whether or not + a syntax handles intervals and recognizes either \{ and + \} or { and } as operators. Also added two syntaxes + RE_SYNTAX_POSIX_BASIC and RE_POSIX_EXTENDED and two command codes + to the enumeration regexpcode; they are succeed_n and jump_n. + + +Sat Nov 18 19:30:30 1989 Kathy Hargreaves (kathy at hayley) + + * regex.c: (re_compile_pattern): Defined INIT_BUFF_SIZE to get rid + of repeated constants in code. Tested with value 1. + Renamed PATPUSH as BUFPUSH, since it pushes things onto the + buffer, not the pattern. Also made this macro extend the buffer + if it's full (so could do the following): + Took out code at top of loop that checks to see if buffer is going + to be full after 10 additions (and reallocates if necessary). + + (insert_jump): Rearranged declaration lines so comments would read + better. + + (re_match_2): Compacted exactn code and added more comments. + + (main): Defined macros TEST_MATCH and MATCH_SELF to do + testing; took out loop so could use these instead. + + +Tue Oct 24 20:57:18 1989 Kathy Hargreaves (kathy at hayley) + + * regex.c (re_set_syntax): Gave argument `syntax' a type. + (store_jump, insert_jump): made them void functions. + +Tue Mar 6 23:29:26 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) + + * signame.c (sig_number): Return -1 if not found. + +Fri Mar 2 16:32:20 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) + + * signame.h [!__STDC__]: Remove comments cuz they're in [__STDC__]. + signame.{c,h}: Make sig_abbrev return char *, not const char *. + +Thu Mar 1 14:10:32 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * getopt.c (getopt): If _getopt_long_only, for options that + start with '-' and are not a valid long-named option, only + interpret them as short options if the first letter is a valid + short option. Otherwise the error message would be printed + naming the short option letter instead of the whole option, and + if, for example, there is a 'T' long option, '-Tfoo' would print + "prog: invalid option `-T'" (which is wrong). + +Wed Feb 28 19:38:49 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * signame.h: Use ANSI C prototypes ifdef __STDC__. + * signame.c: Add const declarations ifdef __STDC__. + +Wed Feb 28 19:06:36 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) + + * signame.c (SIGPWR): Change name to "Power failure". + +Wed Feb 28 18:46:36 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * getopt.h: ifdef out decl of _getopt_option_name. + +Wed Feb 28 15:05:54 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) + + * getopt.c (getopt): Change typo (optstr -> optstring). + + * getopt.c: Remove all _getopt_option_name stuff. + If RETURN_IN_ORDER, return one, not zero, to distinguish between + this and a long option. + + * signame.{c,h}: New files. + +Tue Feb 27 13:32:45 1990 David J. MacKenzie (djm at rice-chex) + + * getopt.c (getopt): In RETURN_IN_ORDER mode, set + _getopt_option_name to zero when returning a non-option arg in + optarg, to distinguish it from getting a long-named option + that takes an arg. + Print the correct option-introducing character (can be + either `+' or `-') in error messages for long-named options. + If _getopt_long_only is nonzero, no long options match an + option arg that starts with a dash, and there are valid short + options, try matching the arg against the short options. + +Thu Feb 22 19:50:49 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) + + * obstack.c (_obstack_begin): Use slightly smaller default size + so that it still fits in one block if malloc range checking is + in use. + +Mon Feb 19 15:41:14 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) + + * getopt1.c (getopt_long_only): New function. + getopt.h: Declare getopt_long_only and _getopt_long_only. + getopt.c: Define _getopt_long_only. + (getopt): If _getopt_long_only, accept '-' as well as '+' to start + long option. + +Sat Feb 3 16:28:00 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * alloca.s [MOTOROLA_DELTA]: New alternative for 68k. + +Sun Jan 28 22:29:17 1990 David J. MacKenzie (djm at hobbes.ai.mit.edu) + + * getopt1.c (main): Fix bug that prevented the first long + option from being recognized. + + * getopt.c: Move comment on the return value for long-named + options to a more appropriate place. + +Wed Jan 24 19:11:27 1990 David J. MacKenzie (djm at hobbes.ai.mit.edu) + + * glob.c (glob_filename): Change '==' to '=' in what was + clearly supposed to be an assignment statement. + +Mon Jan 22 18:14:40 1990 David J. MacKenzie (djm at rice-chex) + + * regcmp.c (regcmp): Allocate whole return value with one call + to malloc, so freeing the buffer works the same way as it does + on System V. + +Tue Jan 16 22:17:03 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) + + * a.out.gnu.h [hp300, pyr]: Define SEGMENT_SIZE to be page_size + +Wed Jan 10 06:57:10 1990 David J. MacKenzie (djm at hobbes.ai.mit.edu) + + * glob.c: Use <sys/ndir.h> if SYSNDIR is defined (some Xenix + systems need this). + +Mon Jan 8 12:33:55 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * regex.c (re_compile_pattern): Add missing break in prev change. + +Mon Jan 1 12:16:56 1990 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * regex.c (re_compile_pattern): Ignore \<, etc., checking + context of $. + +Mon Dec 25 12:00:16 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * obstack.h (obstack_object_size, obstack_room): Eliminate _obstack. + +Sat Dec 23 16:20:13 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * regex.c (re_compile_fastmap): Put back deleted local k. + +Wed Dec 20 02:03:43 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu) + + * getopt.h: Add function decls/prototypes for getopt and + getopt_long. + + * getopt.c: Bring some comments up to date with the code. + +Tue Dec 19 03:12:48 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu) + + * regex.h: Add function prototypes if __STDC__ is defined. + + * regex.c: Declare some external functions if emacs is not + defined. Add a few casts. + (re_compile_fastmap): Remove unused variable. + +Mon Dec 18 14:12:53 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu) + + * getopt.c: Declare some external functions. + +Mon Nov 20 19:57:00 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * a.out.gnu.h: Wrap N_MAGIC in #ifndef...#endif. + +Fri Nov 17 03:12:28 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * a.out.gnu.h: Wrap many things in #ifndef...#endif so file + can be used in addition to a system-supplied a.out.h. + +Tue Oct 31 17:03:06 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * getopt1.c (getopt_long): Delete mistaken test for index == 0. + +Wed Oct 25 17:50:51 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * getopt.c (getopt): Set option_index properly for long options. + +Tue Oct 24 23:41:06 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * getopt1.c (main): Fix initializers. + + * getopt.c (getopt): Was off by 1, checking for missing arg + for long option. + +Wed Oct 18 13:15:18 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * getopt.c: Improve comments and an error message. + Don't initialize most variables, for the sake of unexec. + +Tue Oct 17 03:06:14 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * getopt.c (getopt): Uniformly don't recognize `+' as option + if program doesn't use long options. + + * getopt.c (getopt): Complain about ambiguous option abbreviations. + But accept any exact match even if ambiguous. + + * getopt.c (getopt): Report error for unrecognized long options. + +Sat Sep 30 14:47:29 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * malloc.c: "#else rcheck" -> "#else /* rcheck */". + +Tue Sep 19 19:00:58 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * regex.h: Define RE_SYNTAX_POSIX_AWK. + +Sun Sep 17 15:20:46 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * regex.h: Last change in RE_SYNTAX_AWK broke RE_SYNTAX_EGREP. + +Sat Sep 16 01:53:53 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * regex.c (re_search_2): Stupid error propagating return code -2. + +Tue Sep 12 13:50:05 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * crt0.c [ISI68K]: Reinstall label __start. + +Tue Sep 5 15:43:24 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * malloc.c: Define USG if hpux defined. + +Mon Aug 28 17:50:27 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * regex.c (re_compile_pattern): With RE_AWK_CLASS_HACK, \ quotes + all characters inside [...]. + +Sat Aug 26 00:20:26 1989 Richard Stallman (rms at apple-gunkies.ai.mit.edu) + + * regex.h: Define RE_AWK_CLASS_HACK and change RE_SYNTAX_AWK. + * regex.c (re_compile_pattern): Change syntax of \ inside [...] + when RE_AWK_CLASS_HACK is set. + + * regex.c (re_match_2): Declare strings to search as char *, + and cast inside the function. + +Sat Aug 19 14:55:19 1989 Richard Stallman (rms at apple-gunkies.ai.mit.edu) + + * regex.c (EXTEND_BUFFER): Don't clobber c; do pointer arith + to update b in portable fashion. + +Thu Aug 17 15:56:36 1989 Joseph Arceneaux (jla at spiff) + + * regex.c (EXTEND_BUFFER): Set c to bufp->buffer - old_buffer. + +Sun Aug 13 15:21:02 1989 Richard Stallman (rms at hobbes.ai.mit.edu) + + * obstack.h: Typos in comments. + +Sun Jul 30 20:24:52 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * obstack.c (_obstack_newchunk): Never copy bytes past the end + of the object. Copy by COPYING_UNIT only for complete units + that fit in the object; then copy remaining bytes singly. + If obstack has less than the default alignment, + copy all bytes singly. + +Thu Jul 20 01:51:56 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * crt0.c: Delete spaces at ends of lines. + [ISI68K]: Unconditionally enclose asms in function `_start'. + Delete assembler definition of that function. + Use a6, not fp, as register name. + +Sun Jul 16 16:32:52 1989 Jim Kingdon (kingdon at hobbes.ai.mit.edu) + + * a.out.encap.h: Remove #ifdef ALTOS code because according to + Jyrki Kuoppala <jkp@sauna.hut.fi> it doesn't do what he put it + in to do (which was work around a kernel bug). + +Thu Jun 29 19:59:16 1989 Randall Smith (randy at apple-gunkies.ai.mit.edu) + + * malloc.c (valloc): Changed to be conditionalized on ! hpux + instead of ! HPUX (hpux this is generated by the OS). + +Tue Jun 20 21:14:57 1989 Roland McGrath (roland at hobbes.ai.mit.edu) + + * Makefile: include ../Makerules. + Added .y->.tab.c implicit rule and rule to make unctime.tab.o. + Use $(archpfx) in front of object files. + Made some rules use $({LINK,COMPILE}.?) instead of $(CC), etc. + +Sat Jun 17 14:22:53 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * regex.h (struct re_pattern_buffer): Make ALLOCATED and USED long. + * regex.c (EXTEND_BUFFER): Use long constants to compare with them. + Move assignment outside if-condition. + Do pointer relocation arithmetic in strictly correct order. + +Sat Jun 10 00:26:01 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * glob.c [USG]: Define rindex; declare getpwent, etc. + +Wed Jun 7 22:36:51 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * alloca.s [hp9000s300]: Increase MAXREG for fpregs. + + * crt0.c: For new hp assembler, define float_loc as fixed location. + +Wed May 31 17:51:41 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * a.out.gnu.h: Define SEGMENT_SIZE for Altos. + +Mon May 22 17:59:17 1989 Roland McGrath (mcgrath at tully.Berkeley.EDU) + + * glob.c: Several changes for USG compatibility, etc. that have been + in the version distributed with Make for a while. + Today added new variable glob_tilde which makes glob_filename expand + ~ or ~USER, and made glob_filename, when given a directory with the + file name pattern, return the directory alone. + +Wed May 17 16:45:36 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * getopt.c (getopt): Add feature for long-named options; + starting with `+'. + +Mon May 8 17:21:40 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * crt0.c [sps7]: Handle mostly like orion, etc. + +Fri May 5 15:26:58 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * obstack.c (_obstack_free): If __STDC__, define this as well as + obstack_free. + + * crt0.c [hp9000s300]: Give fixed address to fpa_loc, per cph. + +Tue May 2 14:42:26 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * crt0.c [hp9000s300]: Allocate fpa_loc and float_loc. + +Sun Apr 23 00:22:37 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * a.out.encap.h (COFF_MAGIC, SEGMENT_SIZE, N_DATADDR): + Alternate definitions if ALTOS or if m68k. + + * getopt.c: If __GNUC__, use builtin alloca. + Define index if USG. + +Wed Apr 19 13:03:18 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * crt0.c [m68000]: Call finitfp_() if nec on Sun. + +Fri Apr 7 22:22:38 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * malloc.c: Rename BSD42 to BSD4_2, as in Emacs. + If `emacs', let config.h decide whether to define that. + (morecore): Change malloc_sbrk_used, etc., after error check. + +Thu Mar 23 18:21:56 1989 Randall Smith (randy at apple-gunkies.ai.mit.edu) + + * glob.c: Added new copyright notice. + +Thu Mar 16 16:56:54 1989 Randall Smith (randy at gluteus.ai.mit.edu) + + * malloc.c (malloc): Made sure that the MAGIC1 bytes written at + the end of the space were positioned with regard to the new + offset. + +Fri Mar 10 16:50:12 1989 Randall Smith (randy at sugar-bombs.ai.mit.edu) + + * malloc.c (realloc): Make sure that the start of the mhead is + found correctly even when sizeof (struct mhead) doesn't divide 8 + properley. + + * malloc.c (morecore): Added code to reset sigmask to correct + value on a "no-more-room" return. + + * malloc.c (malloc, free, realloc): Leave 8 bytes of space, not 4, + before the actual data block. + +Fri Mar 3 10:52:14 1989 Randall Smith (randy at apple-gunkies.ai.mit.edu) + + * a.out.encap.h, stab.def: Modified to use new GNU General Public + License. + +Thu Mar 2 15:45:46 1989 Randall Smith (randy at apple-gunkies.ai.mit.edu) + + * a.out.gnu.h [nlist]: Made n_type an unsigned char (for compilers + where chars default to signed, which can screw up comparisons) and + made n_value an unsigned long. + +Wed Mar 1 13:04:25 1989 Randall Smith (randy at apple-gunkies.ai.mit.edu) + + * getopt.c: Changed copyright header to reflect new GNU General + public license. + +Fri Feb 24 13:00:21 1989 Randall Smith (randy at gluteus.ai.mit.edu) + + * regex.c, regex.h: Changed copyright header to reflect new GNU + General public license. + +Sun Feb 19 08:02:01 1989 Richard Stallman (rms at apple-gunkies.ai.mit.edu) + + * getopt.c: If option argument is missing, return `?'. + +Fri Feb 10 13:31:05 1989 Randall Smith (randy at plantaris.ai.mit.edu) + + * stab.def: Changed comment on LSYM; also used for type + descriptions. + +Wed Feb 1 23:15:39 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * filemode.c (setst): Give `T' if sticky but not executable. + +Mon Jan 9 10:31:20 1989 Pace Willisson (pace at prep.ai.mit.edu) + + * a.out.gnu.h: Change a_magic to a_info, and define macros + to access it. Programs that refer to the magic number should + access it with N_MAGIC (exec), and set it with N_SET_MAGIC (exec, + val). This is a step to having a header that is unambiguous + between big and little endian machines. + + * a.out.encap.h: Use macros to access a_info fields. + +Wed Dec 28 18:58:53 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * crt0.c (hp9000s300): Changes from Jinx: new flag `flag_fpa' + set with a subx. d0 loaded from a0 and doubled before first subx. + +Tue Dec 20 22:13:49 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * a.out.gnu.h (N_DATADDR): Always define this if not already defined. + (SEGMENT_SIZE): Define this for the vax. + +Tue Dec 20 14:57:38 1988 Pace Willisson (pace at prep.at.mit.edu) + + * a.out.gnu.h: Changed exec header to have two bytes + (a_machtype and a_flags) instead of a_encap. a_machtype + is the same as on modern sun systems; a_flags can have + machine specific flags. (There may be some endian problems + here: You would like to have the magic number be the + first two bytes in the file, and then then next two could + be these options. It looks like the 68000 definitions + have to declare the options first to force this to happen.) + Defined M_386 for a_machtype. + Added definitions for N_DATOFF, N_TRELOFF, N_DRELOFF, + N_DATADDR, N_BSSADDR (which are present in sun release 4.0) + + * a.out.encap.h: Defined A_ENCAP as an a_flags value. Changed + uses of a_encap to a_flags & A_ENCAP + +Wed Dec 7 11:18:30 1988 Randall Smith (randy at apple-gunkies.ai.mit.edu) + + * malloc.c: Added functions malloc_mem_used and malloc_mem_free to + return total amount of space allocated to program, and total space + left in free pool before sbrk must be called. + +Tue Nov 22 13:05:25 1988 Randall Smith (randy at cream-of-wheat.ai.mit.edu) + + * glob.c: Incorporated some bug fixes and changes sent by Brian. + None of them look disasterous. + +Fri Oct 21 12:40:24 1988 Randall Smith (randy at cream-of-wheat.ai.mit.edu) + + * malloc.c (free): Added code (within #ifdef rcheck) to given + slightly more verbose warnings then an abort if free was called + with garbage. + +Local Variables: +add-log-time-format: current-time-string +mode: indented-text +left-margin: 8 +version-control: never +End: diff --git a/gnu/usr.bin/gcc/acconfig.h b/gnu/usr.bin/gcc/acconfig.h new file mode 100644 index 00000000000..41c0cf8b1d6 --- /dev/null +++ b/gnu/usr.bin/gcc/acconfig.h @@ -0,0 +1,24 @@ +/* Define if you have a working <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* Whether malloc must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_MALLOC + +/* Whether realloc must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_REALLOC + +/* Whether calloc must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_CALLOC + +/* Whether free must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_FREE + +/* Whether index must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_INDEX + +/* Whether rindex must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_RINDEX + +/* Whether getenv must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_GETENV +@TOP@ diff --git a/gnu/usr.bin/gcc/aclocal.m4 b/gnu/usr.bin/gcc/aclocal.m4 new file mode 100644 index 00000000000..07424f1e9a0 --- /dev/null +++ b/gnu/usr.bin/gcc/aclocal.m4 @@ -0,0 +1,33 @@ +dnl See whether we need a declaration for a function. +AC_DEFUN(GCC_NEED_DECLARATION, +[AC_MSG_CHECKING([whether $1 must be declared]) +AC_CACHE_VAL(gcc_cv_decl_needed_$1, +[AC_TRY_COMPILE([ +#include <stdio.h> +#ifdef HAVE_STRING_H +#include <string.h> +#else +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif +#endif +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifndef HAVE_RINDEX +#define rindex strrchr +#endif +#ifndef HAVE_INDEX +#define index strchr +#endif], +[char *(*pfn) = (char *(*)) $1], +gcc_cv_decl_needed_$1=no, gcc_cv_decl_needed_$1=yes)]) +AC_MSG_RESULT($gcc_cv_decl_needed_$1) +if test $gcc_cv_decl_needed_$1 = yes; then + gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + AC_DEFINE_UNQUOTED($gcc_tr_decl) +fi +])dnl diff --git a/gnu/usr.bin/gcc/bitmap.c b/gnu/usr.bin/gcc/bitmap.c new file mode 100644 index 00000000000..f982f46392a --- /dev/null +++ b/gnu/usr.bin/gcc/bitmap.c @@ -0,0 +1,645 @@ +/* Functions to support general ended bitmaps. + Copyright (C) 1997 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include "config.h" +#include <stdio.h> +#include "rtl.h" +#include "flags.h" +#include "obstack.h" +#include "regs.h" +#include "basic-block.h" + +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + +#ifdef NEED_DECLARATION_FREE +extern void free PROTO((void *)); +#endif + +/* Obstack to allocate bitmap elements from. */ +static struct obstack bitmap_obstack; +static int bitmap_obstack_init = FALSE; + + +#ifndef INLINE +#ifndef __GNUC__ +#define INLINE +#else +#define INLINE __inline__ +#endif +#endif + +/* Global data */ +bitmap_element bitmap_zero; /* An element of all zero bits. */ +bitmap_element *bitmap_free; /* Freelist of bitmap elements. */ + +static void bitmap_element_free PROTO((bitmap, bitmap_element *)); +static bitmap_element *bitmap_element_allocate PROTO((bitmap)); +static int bitmap_element_zerop PROTO((bitmap_element *)); +static void bitmap_element_link PROTO((bitmap, bitmap_element *)); +static bitmap_element *bitmap_find_bit PROTO((bitmap, unsigned int)); + +/* Free a bitmap element */ + +static INLINE void +bitmap_element_free (head, elt) + bitmap head; + bitmap_element *elt; +{ + bitmap_element *next = elt->next; + bitmap_element *prev = elt->prev; + + if (prev) + prev->next = next; + + if (next) + next->prev = prev; + + if (head->first == elt) + head->first = next; + + /* Since the first thing we try is to insert before current, + make current the next entry in preference to the previous. */ + if (head->current == elt) + head->current = next != 0 ? next : prev; + + elt->next = bitmap_free; + bitmap_free = elt; +} + +/* Allocate a bitmap element. The bits are cleared, but nothing else is. */ + +static INLINE bitmap_element * +bitmap_element_allocate (head) + bitmap head; +{ + bitmap_element *element; + int i; + + if (bitmap_free != 0) + { + element = bitmap_free; + bitmap_free = element->next; + } + else + { + /* We can't use gcc_obstack_init to initialize the obstack since + print-rtl.c now calls bitmap functions, and bitmap is linked + into the gen* functions. */ + if (!bitmap_obstack_init) + { + bitmap_obstack_init = TRUE; + + /* Let particular systems override the size of a chunk. */ +#ifndef OBSTACK_CHUNK_SIZE +#define OBSTACK_CHUNK_SIZE 0 +#endif + /* Let them override the alloc and free routines too. */ +#ifndef OBSTACK_CHUNK_ALLOC +#define OBSTACK_CHUNK_ALLOC xmalloc +#endif +#ifndef OBSTACK_CHUNK_FREE +#define OBSTACK_CHUNK_FREE free +#endif + +#if !defined(__GNUC__) || (__GNUC__ < 2) +#define __alignof__(type) 0 +#endif + + obstack_specify_allocation (&bitmap_obstack, OBSTACK_CHUNK_SIZE, + __alignof__ (bitmap_element), + (void *(*) ()) OBSTACK_CHUNK_ALLOC, + (void (*) ()) OBSTACK_CHUNK_FREE); + } + + element = (bitmap_element *) obstack_alloc (&bitmap_obstack, + sizeof (bitmap_element)); + } + +#if BITMAP_ELEMENT_WORDS == 2 + element->bits[0] = element->bits[1] = 0; +#else + for (i = 0; i < BITMAP_ELEMENT_WORDS; i++) + element->bits[i] = 0; +#endif + + return element; +} + +/* Return nonzero if all bits in an element are zero. */ + +static INLINE int +bitmap_element_zerop (element) + bitmap_element *element; +{ +#if BITMAP_ELEMENT_WORDS == 2 + return (element->bits[0] | element->bits[1]) == 0; +#else + int i; + + for (i = 0; i < BITMAP_ELEMENT_WORDS; i++) + if (element->bits[i] != 0) + return 0; + + return 1; +#endif +} + +/* Link the bitmap element into the current bitmap linked list. */ + +static INLINE void +bitmap_element_link (head, element) + bitmap head; + bitmap_element *element; +{ + unsigned int indx = element->indx; + bitmap_element *ptr; + + /* If this is the first and only element, set it in. */ + if (head->first == 0) + { + element->next = element->prev = 0; + head->first = element; + } + + /* If this index is less than that of the current element, it goes someplace + before the current element. */ + else if (indx < head->indx) + { + for (ptr = head->current; + ptr->prev != 0 && ptr->prev->indx > indx; + ptr = ptr->prev) + ; + + if (ptr->prev) + ptr->prev->next = element; + else + head->first = element; + + element->prev = ptr->prev; + element->next = ptr; + ptr->prev = element; + } + + /* Otherwise, it must go someplace after the current element. */ + else + { + for (ptr = head->current; + ptr->next != 0 && ptr->next->indx < indx; + ptr = ptr->next) + ; + + if (ptr->next) + ptr->next->prev = element; + + element->next = ptr->next; + element->prev = ptr; + ptr->next = element; + } + + /* Set up so this is the first element searched. */ + head->current = element; + head->indx = indx; +} + +/* Clear a bitmap by freeing the linked list. */ + +void INLINE +bitmap_clear (head) + bitmap head; +{ + bitmap_element *element, *next; + + for (element = head->first; element != 0; element = next) + { + next = element->next; + element->next = bitmap_free; + bitmap_free = element; + } + + head->first = head->current = 0; +} + +/* Copy a bitmap to another bitmap */ + +void +bitmap_copy (to, from) + bitmap to; + bitmap from; +{ + bitmap_element *from_ptr, *to_ptr = 0; + int i; + + bitmap_clear (to); + + /* Copy elements in forward direction one at a time */ + for (from_ptr = from->first; from_ptr; from_ptr = from_ptr->next) + { + bitmap_element *to_elt = bitmap_element_allocate (to); + + to_elt->indx = from_ptr->indx; + +#if BITMAP_ELEMENT_WORDS == 2 + to_elt->bits[0] = from_ptr->bits[0]; + to_elt->bits[1] = from_ptr->bits[1]; +#else + for (i = 0; i < BITMAP_ELEMENT_WORDS; i++) + to_elt->bits[i] = from_ptr->bits[i]; +#endif + + /* Here we have a special case of bitmap_element_link, for the case + where we know the links are being entered in sequence. */ + if (to_ptr == 0) + { + to->first = to->current = to_elt; + to->indx = from_ptr->indx; + to_elt->next = to_elt->prev = 0; + } + else + { + to_elt->prev = to_ptr; + to_elt->next = 0; + to_ptr->next = to_elt; + } + + to_ptr = to_elt; + } +} + +/* Find a bitmap element that would hold a bitmap's bit. + Update the `current' field even if we can't find an element that + would hold the bitmap's bit to make eventual allocation + faster. */ + +static INLINE bitmap_element * +bitmap_find_bit (head, bit) + bitmap head; + unsigned int bit; +{ + bitmap_element *element; + unsigned HOST_WIDE_INT indx = bit / BITMAP_ELEMENT_ALL_BITS; + + if (head->current == 0) + return 0; + + if (head->indx > indx) + for (element = head->current; + element->prev != 0 && element->indx > indx; + element = element->prev) + ; + + else + for (element = head->current; + element->next != 0 && element->indx < indx; + element = element->next) + ; + + /* `element' is the nearest to the one we want. If it's not the one we + want, the one we want doesn't exist. */ + head->current = element; + head->indx = element->indx; + if (element != 0 && element->indx != indx) + element = 0; + + return element; +} + +/* Clear a single bit in a bitmap. */ + +void +bitmap_clear_bit (head, bit) + bitmap head; + int bit; +{ + bitmap_element *ptr = bitmap_find_bit (head, bit); + + if (ptr != 0) + { + unsigned bit_num = bit % (unsigned) HOST_BITS_PER_WIDE_INT; + unsigned word_num = ((bit / (unsigned) HOST_BITS_PER_WIDE_INT) + % BITMAP_ELEMENT_WORDS); + ptr->bits[word_num] &= ~ (((unsigned HOST_WIDE_INT) 1) << bit_num); + + /* If we cleared the entire word, free up the element */ + if (bitmap_element_zerop (ptr)) + bitmap_element_free (head, ptr); + } +} + + +/* Set a single bit in a bitmap. */ + +void +bitmap_set_bit (head, bit) + bitmap head; + int bit; +{ + bitmap_element *ptr = bitmap_find_bit (head, bit); + unsigned word_num + = ((bit / (unsigned) HOST_BITS_PER_WIDE_INT) % BITMAP_ELEMENT_WORDS); + unsigned bit_num = bit % (unsigned) HOST_BITS_PER_WIDE_INT; + unsigned HOST_WIDE_INT bit_val = ((unsigned HOST_WIDE_INT) 1) << bit_num; + + if (ptr == 0) + { + ptr = bitmap_element_allocate (head); + ptr->indx = bit / BITMAP_ELEMENT_ALL_BITS; + ptr->bits[word_num] = bit_val; + bitmap_element_link (head, ptr); + } + else + ptr->bits[word_num] |= bit_val; +} + +/* Return whether a bit is set within a bitmap. */ + +int +bitmap_bit_p (head, bit) + bitmap head; + int bit; +{ + bitmap_element *ptr; + unsigned bit_num; + unsigned word_num; + + ptr = bitmap_find_bit (head, bit); + if (ptr == 0) + return 0; + + bit_num = bit % (unsigned) HOST_BITS_PER_WIDE_INT; + word_num + = ((bit / (unsigned) HOST_BITS_PER_WIDE_INT) % BITMAP_ELEMENT_WORDS); + + return + (ptr->bits[word_num] & (((unsigned HOST_WIDE_INT) 1) << bit_num)) != 0; +} + +/* Store in bitmap TO the result of combining bitmap FROM1 and + FROM2 using a specific bit manipulation. */ + +void +bitmap_operation (to, from1, from2, operation) + bitmap to; + bitmap from1; + bitmap from2; + enum bitmap_bits operation; +{ + bitmap_element *delete_list = 0; + bitmap_element *from1_ptr = from1->first; + bitmap_element *from2_ptr = from2->first; + unsigned int indx1 + = (from1_ptr) ? from1_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0; + unsigned int indx2 + = (from2_ptr) ? from2_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0; + bitmap_element *to_ptr = 0; + bitmap_element *from1_tmp; + bitmap_element *from2_tmp; + unsigned int indx; + int i; + + /* To simplify things, always create a new list. If the old list was one + of the inputs, free it later. Otherwise, free it now. */ + if (to == from1 || to == from2) + { + delete_list = to->first; + to->first = to->current = 0; + } + else + bitmap_clear (to); + + while (from1_ptr != 0 || from2_ptr != 0) + { + /* Figure out whether we need to substitute zero elements for + missing links. */ + if (indx1 == indx2) + { + indx = indx1; + from1_tmp = from1_ptr; + from2_tmp = from2_ptr; + from1_ptr = from1_ptr->next; + indx1 = (from1_ptr) ? from1_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0; + from2_ptr = from2_ptr->next; + indx2 = (from2_ptr) ? from2_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0; + } + else if (indx1 < indx2) + { + indx = indx1; + from1_tmp = from1_ptr; + from2_tmp = &bitmap_zero; + from1_ptr = from1_ptr->next; + indx1 = (from1_ptr) ? from1_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0; + } + else + { + indx = indx2; + from1_tmp = &bitmap_zero; + from2_tmp = from2_ptr; + from2_ptr = from2_ptr->next; + indx2 = (from2_ptr) ? from2_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0; + } + + if (to_ptr == 0) + to_ptr = bitmap_element_allocate (to); + + /* Do the operation, and if any bits are set, link it into the + linked list. */ + switch (operation) + { + default: + abort (); + + case BITMAP_AND: +#if BITMAP_ELEMENT_WORDS == 2 + to_ptr->bits[0] = from1_tmp->bits[0] & from2_tmp->bits[0]; + to_ptr->bits[1] = from1_tmp->bits[1] & from2_tmp->bits[1]; +#else + for (i = BITMAP_ELEMENT_WORDS - 1; i >= 0; i--) + to_ptr->bits[i] = from1_tmp->bits[i] & from2_tmp->bits[i]; +#endif + break; + + case BITMAP_AND_COMPL: +#if BITMAP_ELEMENT_WORDS == 2 + to_ptr->bits[0] = from1_tmp->bits[0] & ~ from2_tmp->bits[0]; + to_ptr->bits[1] = from1_tmp->bits[1] & ~ from2_tmp->bits[1]; +#else + for (i = BITMAP_ELEMENT_WORDS - 1; i >= 0; i--) + to_ptr->bits[i] = from1_tmp->bits[i] & ~ from2_tmp->bits[i]; +#endif + break; + + case BITMAP_IOR: +#if BITMAP_ELEMENT_WORDS == 2 + to_ptr->bits[0] = from1_tmp->bits[0] | from2_tmp->bits[0]; + to_ptr->bits[1] = from1_tmp->bits[1] | from2_tmp->bits[1]; +#else + for (i = BITMAP_ELEMENT_WORDS - 1; i >= 0; i--) + to_ptr->bits[i] = from1_tmp->bits[i] | from2_tmp->bits[i]; +#endif + break; + } + + if (! bitmap_element_zerop (to_ptr)) + { + to_ptr->indx = indx; + bitmap_element_link (to, to_ptr); + to_ptr = 0; + } + } + + /* If we have an unallocated element due to the last element being 0, + release it back to the free pool. Don't bother calling + bitmap_element_free since it was never linked into a bitmap. */ + if (to_ptr != 0) + { + to_ptr->next = bitmap_free; + bitmap_free = to_ptr; + } + + /* If the output bitmap was one of the inputs, free up its + elements now that we're done. */ + for (; delete_list != 0; delete_list = to_ptr) + { + to_ptr = delete_list->next; + delete_list->next = bitmap_free; + bitmap_free = delete_list; + } +} + +/* Or into bitmap TO bitmap FROM1 and'ed with the complement of + bitmap FROM2. */ + +void +bitmap_ior_and_compl (to, from1, from2) + bitmap to; + bitmap from1; + bitmap from2; +{ + bitmap_head tmp; + + tmp.first = tmp.current = 0; + + bitmap_operation (&tmp, from1, from2, BITMAP_AND_COMPL); + bitmap_operation (to, to, &tmp, BITMAP_IOR); + bitmap_clear (&tmp); +} + +/* Initialize a bitmap header. */ + +bitmap +bitmap_initialize (head) + bitmap head; +{ + head->first = head->current = 0; + + return head; +} + +/* Debugging function to print out the contents of a bitmap. */ + +void +bitmap_debug_file (file, head) + FILE *file; + bitmap head; +{ + bitmap_element *ptr; + + fprintf (file, "\nfirst = "); + fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) head->first); + fprintf (file, " current = "); + fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) head->current); + fprintf (file, " indx = %u\n", head->indx); + + for (ptr = head->first; ptr; ptr = ptr->next) + { + int i, j, col = 26; + + fprintf (file, "\t"); + fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) ptr); + fprintf (file, " next = "); + fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) ptr->next); + fprintf (file, " prev = "); + fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) ptr->prev); + fprintf (file, " indx = %u\n\t\tbits = {", ptr->indx); + + for (i = 0; i < BITMAP_ELEMENT_WORDS; i++) + for (j = 0; j < HOST_BITS_PER_WIDE_INT; j++) + if ((ptr->bits[i] & (((unsigned HOST_WIDE_INT) 1) << j)) != 0) + { + if (col > 70) + { + fprintf (file, "\n\t\t\t"); + col = 24; + } + + fprintf (file, " %u", (ptr->indx * BITMAP_ELEMENT_ALL_BITS + + i * HOST_BITS_PER_WIDE_INT + j)); + col += 4; + } + + fprintf (file, " }\n"); + } +} + +/* Function to be called from the debugger to print the contents + of a bitmap. */ + +void +debug_bitmap (head) + bitmap head; +{ + bitmap_debug_file (stdout, head); +} + +/* Function to print out the contents of a bitmap. Unlike bitmap_debug_file, + it does not print anything but the bits. */ + +void +bitmap_print (file, head, prefix, suffix) + FILE *file; + bitmap head; + char *prefix; + char *suffix; +{ + char *comma = ""; + int i; + + fputs (prefix, file); + EXECUTE_IF_SET_IN_BITMAP (head, 0, i, + { + fprintf (file, "%s%d", comma, i); + comma = ", "; + }); + fputs (suffix, file); +} + +/* Release any memory allocated by bitmaps. */ + +void +bitmap_release_memory () +{ + bitmap_free = 0; + if (bitmap_obstack_init) + { + bitmap_obstack_init = FALSE; + obstack_free (&bitmap_obstack, NULL_PTR); + } +} diff --git a/gnu/usr.bin/gcc/bitmap.h b/gnu/usr.bin/gcc/bitmap.h new file mode 100644 index 00000000000..2df648965f5 --- /dev/null +++ b/gnu/usr.bin/gcc/bitmap.h @@ -0,0 +1,315 @@ +/* Functions to support general ended bitmaps. + Copyright (C) 1997 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Number of words to use for each element in the linked list. */ + +#ifndef BITMAP_ELEMENT_WORDS +#define BITMAP_ELEMENT_WORDS 2 +#endif + +/* Number of bits in each actual element of a bitmap. We get slightly better + code for bit % BITMAP_ELEMENT_ALL_BITS and bit / BITMAP_ELEMENT_ALL_BITS if + bits is unsigned, assuming it is a power of 2. */ + +#define BITMAP_ELEMENT_ALL_BITS \ + ((unsigned) (BITMAP_ELEMENT_WORDS * HOST_BITS_PER_WIDE_INT)) + +/* Bitmap set element. We use a linked list to hold only the bits that + are set. This allows for use to grow the bitset dynamically without + having to realloc and copy a giant bit array. The `prev' field is + undefined for an element on the free list. */ + +typedef struct bitmap_element_def +{ + struct bitmap_element_def *next; /* Next element. */ + struct bitmap_element_def *prev; /* Previous element. */ + unsigned int indx; /* regno/BITMAP_ELEMENT_ALL_BITS. */ + unsigned HOST_WIDE_INT bits[BITMAP_ELEMENT_WORDS]; /* Bits that are set. */ +} bitmap_element; + +/* Head of bitmap linked list. */ +typedef struct bitmap_head_def { + bitmap_element *first; /* First element in linked list. */ + bitmap_element *current; /* Last element looked at. */ + int indx; /* Index of last element looked at. */ +} bitmap_head, *bitmap; + +/* Enumeration giving the various operations we support. */ +enum bitmap_bits { + BITMAP_AND, /* TO = FROM1 & FROM2 */ + BITMAP_AND_COMPL, /* TO = FROM1 & ~ FROM2 */ + BITMAP_IOR /* TO = FROM1 | FROM2 */ +}; + +/* Global data */ +extern bitmap_element *bitmap_free; /* Freelist of bitmap elements */ +extern bitmap_element bitmap_zero; /* Zero bitmap element */ + +/* Clear a bitmap by freeing up the linked list. */ +extern void bitmap_clear PROTO((bitmap)); + +/* Copy a bitmap to another bitmap. */ +extern void bitmap_copy PROTO((bitmap, bitmap)); + +/* Perform an operation on two bitmaps, yielding a third. */ +extern void bitmap_operation PROTO((bitmap, bitmap, bitmap, enum bitmap_bits)); + +/* `or' into one bitmap the `and' of a second bitmap witih the complement + of a third. */ +extern void bitmap_ior_and_compl PROTO((bitmap, bitmap, bitmap)); + +/* Clear a single register in a register set. */ +extern void bitmap_clear_bit PROTO((bitmap, int)); + +/* Set a single register in a register set. */ +extern void bitmap_set_bit PROTO((bitmap, int)); + +/* Return true if a register is set in a register set. */ +extern int bitmap_bit_p PROTO((bitmap, int)); + +/* Debug functions to print a bitmap linked list. */ +extern void bitmap_debug PROTO((bitmap)); +extern void bitmap_debug_file PROTO((FILE *, bitmap)); + +/* Print a bitmap */ +extern void bitmap_print PROTO((FILE *, bitmap, char *, char *)); + +/* Initialize a bitmap header. */ +extern bitmap bitmap_initialize PROTO((bitmap)); + +/* Release all memory held by bitmaps. */ +extern void bitmap_release_memory PROTO((void)); + +/* Allocate a bitmap with oballoc. */ +#define BITMAP_OBSTACK_ALLOC(OBSTACK) \ + bitmap_initialize ((bitmap) obstack_alloc (OBSTACK, sizeof (bitmap_head))) + +/* Allocate a bitmap with alloca. */ +#define BITMAP_ALLOCA() \ + bitmap_initialize ((bitmap) alloca (sizeof (bitmap_head))) + +/* Do any cleanup needed on a bitmap when it is no longer used. */ +#define BITMAP_FREE(BITMAP) \ +do { \ + if (BITMAP) \ + { \ + bitmap_clear (BITMAP); \ + (BITMAP) = 0; \ + } \ +} while (0) + +/* Do any one-time initializations needed for bitmaps. */ +#define BITMAP_INIT_ONCE() + +/* Loop over all bits in BITMAP, starting with MIN, setting BITNUM to the + bit number and executing CODE for all bits that are set. */ + +#define EXECUTE_IF_SET_IN_BITMAP(BITMAP, MIN, BITNUM, CODE) \ +do { \ + bitmap_element *ptr_ = (BITMAP)->first; \ + unsigned int indx_ = (MIN) / BITMAP_ELEMENT_ALL_BITS; \ + unsigned bit_num_ = (MIN) % ((unsigned) HOST_BITS_PER_WIDE_INT); \ + unsigned word_num_ = (((MIN) / ((unsigned) HOST_BITS_PER_WIDE_INT)) \ + % BITMAP_ELEMENT_WORDS); \ + \ + \ + /* Find the block the minimum bit is in. */ \ + while (ptr_ != 0 && ptr_->indx < indx_) \ + ptr_ = ptr_->next; \ + \ + if (ptr_ != 0 && ptr_->indx != indx_) \ + { \ + bit_num_ = 0; \ + word_num_ = 0; \ + } \ + \ + for (; ptr_ != 0; ptr_ = ptr_->next) \ + { \ + for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ + { \ + unsigned HOST_WIDE_INT word_ = ptr_->bits[word_num_]; \ + \ + if (word_ != 0) \ + { \ + for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \ + { \ + unsigned HOST_WIDE_INT mask_ \ + = ((unsigned HOST_WIDE_INT) 1) << bit_num_; \ + \ + if ((word_ & mask_) != 0) \ + { \ + word_ &= ~ mask_; \ + (BITNUM) = (ptr_->indx * BITMAP_ELEMENT_ALL_BITS \ + + word_num_ * HOST_BITS_PER_WIDE_INT \ + + bit_num_); \ + CODE; \ + \ + if (word_ == 0) \ + break; \ + } \ + } \ + } \ + \ + bit_num_ = 0; \ + } \ + \ + word_num_ = 0; \ + } \ +} while (0) + +/* Loop over all bits in BITMAP1 and BITMAP2, starting with MIN, setting + BITNUM to the bit number and executing CODE for all bits that are set in + the first bitmap and not set in the second. */ + +#define EXECUTE_IF_AND_COMPL_IN_BITMAP(BITMAP1, BITMAP2, MIN, BITNUM, CODE) \ +do { \ + bitmap_element *ptr1_ = (BITMAP1)->first; \ + bitmap_element *ptr2_ = (BITMAP2)->first; \ + unsigned int indx_ = (MIN) / BITMAP_ELEMENT_ALL_BITS; \ + unsigned bit_num_ = (MIN) % ((unsigned) HOST_BITS_PER_WIDE_INT); \ + unsigned word_num_ = (((MIN) / ((unsigned) HOST_BITS_PER_WIDE_INT)) \ + % BITMAP_ELEMENT_WORDS); \ + \ + /* Find the block the minimum bit is in in the first bitmap. */ \ + while (ptr1_ != 0 && ptr1_->indx < indx_) \ + ptr1_ = ptr1_->next; \ + \ + if (ptr1_ != 0 && ptr1_->indx != indx_) \ + { \ + bit_num_ = 0; \ + word_num_ = 0; \ + } \ + \ + for (; ptr1_ != 0 ; ptr1_ = ptr1_->next) \ + { \ + /* Advance BITMAP2 to the equivalent link, using an all \ + zero element if an equivalent link doesn't exist. */ \ + bitmap_element *tmp2_; \ + \ + while (ptr2_ != 0 && ptr2_->indx < ptr1_->indx) \ + ptr2_ = ptr2_->next; \ + \ + tmp2_ = ((ptr2_ != 0 && ptr2_->indx == ptr1_->indx) \ + ? ptr2_ : &bitmap_zero); \ + \ + for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ + { \ + unsigned HOST_WIDE_INT word_ = (ptr1_->bits[word_num_] \ + & ~ tmp2_->bits[word_num_]); \ + if (word_ != 0) \ + { \ + for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \ + { \ + unsigned HOST_WIDE_INT mask_ \ + = ((unsigned HOST_WIDE_INT)1) << bit_num_; \ + \ + if ((word_ & mask_) != 0) \ + { \ + word_ &= ~ mask_; \ + (BITNUM) = (ptr1_->indx * BITMAP_ELEMENT_ALL_BITS \ + + word_num_ * HOST_BITS_PER_WIDE_INT \ + + bit_num_); \ + \ + CODE; \ + if (word_ == 0) \ + break; \ + } \ + } \ + } \ + \ + bit_num_ = 0; \ + } \ + \ + word_num_ = 0; \ + } \ +} while (0) + +/* Loop over all bits in BITMAP1 and BITMAP2, starting with MIN, setting + BITNUM to the bit number and executing CODE for all bits that are set in + the both bitmaps. */ + +#define EXECUTE_IF_AND_IN_BITMAP(BITMAP1, BITMAP2, MIN, BITNUM, CODE) \ +do { \ + bitmap_element *ptr1_ = (BITMAP1)->first; \ + bitmap_element *ptr2_ = (BITMAP2)->first; \ + unsigned int indx_ = (MIN) / BITMAP_ELEMENT_ALL_BITS; \ + unsigned bit_num_ = (MIN) % ((unsigned) HOST_BITS_PER_WIDE_INT); \ + unsigned word_num_ = (((MIN) / ((unsigned) HOST_BITS_PER_WIDE_INT)) \ + % BITMAP_ELEMENT_WORDS); \ + \ + /* Find the block the minimum bit is in in the first bitmap. */ \ + while (ptr1_ != 0 && ptr1_->indx < indx_) \ + ptr1_ = ptr1_->next; \ + \ + if (ptr1_ != 0 && ptr1_->indx != indx_) \ + { \ + bit_num_ = 0; \ + word_num_ = 0; \ + } \ + \ + for (; ptr1_ != 0 ; ptr1_ = ptr1_->next) \ + { \ + /* Advance BITMAP2 to the equivalent link */ \ + while (ptr2_ != 0 && ptr2_->indx < ptr1_->indx) \ + ptr2_ = ptr2_->next; \ + \ + if (ptr2_ == 0) \ + { \ + /* If there are no more elements in BITMAP2, exit loop now.*/ \ + ptr1_ = (bitmap_element *)0; \ + break; \ + } \ + else if (ptr2_->indx > ptr1_->indx) \ + { \ + bit_num_ = word_num_ = 0; \ + continue; \ + } \ + \ + for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \ + { \ + unsigned HOST_WIDE_INT word_ = (ptr1_->bits[word_num_] \ + & ptr2_->bits[word_num_]); \ + if (word_ != 0) \ + { \ + for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \ + { \ + unsigned HOST_WIDE_INT mask_ \ + = ((unsigned HOST_WIDE_INT)1) << bit_num_; \ + \ + if ((word_ & mask_) != 0) \ + { \ + word_ &= ~ mask_; \ + (BITNUM) = (ptr1_->indx * BITMAP_ELEMENT_ALL_BITS \ + + word_num_ * HOST_BITS_PER_WIDE_INT \ + + bit_num_); \ + \ + CODE; \ + if (word_ == 0) \ + break; \ + } \ + } \ + } \ + \ + bit_num_ = 0; \ + } \ + \ + word_num_ = 0; \ + } \ +} while (0) diff --git a/gnu/usr.bin/gcc/c-parse.c b/gnu/usr.bin/gcc/c-parse.c new file mode 100644 index 00000000000..5c1cc1bf1dc --- /dev/null +++ b/gnu/usr.bin/gcc/c-parse.c @@ -0,0 +1,3846 @@ + +/* A Bison parser, made from c-parse.y + by Bison version A2.5 (Andrew Consortium) + */ + +#define YYBISON 1 /* Identify Bison output. */ + +#define IDENTIFIER 258 +#define TYPENAME 259 +#define SCSPEC 260 +#define TYPESPEC 261 +#define TYPE_QUAL 262 +#define CONSTANT 263 +#define STRING 264 +#define ELLIPSIS 265 +#define SIZEOF 266 +#define ENUM 267 +#define STRUCT 268 +#define UNION 269 +#define IF 270 +#define ELSE 271 +#define WHILE 272 +#define DO 273 +#define FOR 274 +#define SWITCH 275 +#define CASE 276 +#define DEFAULT 277 +#define BREAK 278 +#define CONTINUE 279 +#define RETURN 280 +#define GOTO 281 +#define ASM_KEYWORD 282 +#define TYPEOF 283 +#define ALIGNOF 284 +#define ATTRIBUTE 285 +#define EXTENSION 286 +#define LABEL 287 +#define REALPART 288 +#define IMAGPART 289 +#define ASSIGN 290 +#define OROR 291 +#define ANDAND 292 +#define EQCOMPARE 293 +#define ARITHCOMPARE 294 +#define LSHIFT 295 +#define RSHIFT 296 +#define UNARY 297 +#define PLUSPLUS 298 +#define MINUSMINUS 299 +#define HYPERUNARY 300 +#define POINTSAT 301 +#define INTERFACE 302 +#define IMPLEMENTATION 303 +#define END 304 +#define SELECTOR 305 +#define DEFS 306 +#define ENCODE 307 +#define CLASSNAME 308 +#define PUBLIC 309 +#define PRIVATE 310 +#define PROTECTED 311 +#define PROTOCOL 312 +#define OBJECTNAME 313 +#define CLASS 314 +#define ALIAS 315 +#define OBJC_STRING 316 + +#line 56 "c-parse.y" + +#include "config.h" + +#include <stdio.h> +#include <errno.h> +#include <setjmp.h> + +#include "tree.h" +#include "input.h" +#include "c-lex.h" +#include "c-tree.h" +#include "flags.h" + +#ifdef MULTIBYTE_CHARS +#include <stdlib.h> +#include <locale.h> +#endif + + +/* Since parsers are distinct for each language, put the language string + definition here. */ +char *language_string = "GNU C"; + +#ifndef errno +extern int errno; +#endif + +void yyerror (); + +/* Like YYERROR but do call yyerror. */ +#define YYERROR1 { yyerror ("syntax error"); YYERROR; } + +/* Cause the `yydebug' variable to be defined. */ +#define YYDEBUG 1 + +#line 94 "c-parse.y" +typedef union {long itype; tree ttype; enum tree_code code; + char *filename; int lineno; int ends_in_label; } YYSTYPE; +#line 210 "c-parse.y" + +/* Number of statements (loosely speaking) and compound statements + seen so far. */ +static int stmt_count; +static int compstmt_count; + +/* Input file and line number of the end of the body of last simple_if; + used by the stmt-rule immediately after simple_if returns. */ +static char *if_stmt_file; +static int if_stmt_line; + +/* List of types and structure classes of the current declaration. */ +static tree current_declspecs = NULL_TREE; +static tree prefix_attributes = NULL_TREE; + +/* Stack of saved values of current_declspecs and prefix_attributes. */ +static tree declspec_stack; + +/* 1 if we explained undeclared var errors. */ +static int undeclared_variable_notice; + + +/* Tell yyparse how to print a token's value, if yydebug is set. */ + +#define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) +extern void yyprint (); +#include <stdio.h> + +#ifndef __cplusplus +#ifndef __STDC__ +#define const +#endif +#endif + + + +#define YYFINAL 682 +#define YYFLAG -32768 +#define YYNTBASE 84 + +#define YYTRANSLATE(x) ((unsigned)(x) <= 316 ? yytranslate[x] : 239) + +static const char yytranslate[] = { 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 80, 2, 2, 2, 52, 43, 2, 59, + 76, 50, 48, 81, 49, 58, 51, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 38, 77, 2, + 36, 2, 37, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 60, 2, 83, 42, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 82, 41, 78, 79, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 39, 40, 44, 45, 46, 47, 53, 54, 55, 56, + 57, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75 +}; + +#if YYDEBUG != 0 +static const short yyprhs[] = { 0, + 0, 1, 3, 4, 7, 8, 12, 14, 16, 22, + 25, 29, 34, 39, 42, 45, 48, 51, 53, 54, + 55, 63, 68, 69, 70, 78, 83, 84, 85, 92, + 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, + 116, 117, 119, 121, 125, 127, 130, 133, 136, 139, + 142, 147, 150, 155, 158, 161, 163, 165, 167, 172, + 173, 181, 183, 187, 191, 195, 199, 203, 207, 211, + 215, 219, 223, 227, 231, 232, 237, 238, 243, 244, + 245, 253, 254, 260, 264, 268, 270, 272, 274, 278, + 282, 283, 288, 293, 298, 302, 306, 309, 312, 314, + 317, 318, 320, 323, 327, 329, 331, 334, 337, 342, + 347, 350, 353, 357, 359, 361, 364, 367, 368, 369, + 374, 379, 383, 387, 390, 393, 396, 399, 403, 404, + 407, 410, 413, 416, 420, 421, 424, 427, 429, 431, + 434, 437, 439, 441, 444, 447, 450, 454, 455, 458, + 460, 462, 464, 469, 474, 476, 478, 480, 482, 486, + 488, 492, 493, 498, 499, 506, 510, 511, 518, 522, + 523, 525, 527, 530, 537, 539, 543, 544, 546, 551, + 558, 563, 565, 567, 569, 571, 573, 574, 579, 581, + 582, 585, 587, 591, 593, 594, 599, 601, 602, 611, + 612, 619, 620, 626, 627, 632, 633, 639, 640, 641, + 647, 648, 649, 655, 657, 659, 663, 667, 672, 676, + 680, 684, 686, 690, 695, 699, 703, 707, 709, 713, + 717, 721, 726, 730, 734, 736, 737, 745, 751, 754, + 755, 763, 769, 772, 773, 782, 783, 791, 794, 795, + 797, 798, 800, 802, 805, 806, 810, 813, 817, 819, + 823, 825, 827, 830, 832, 836, 841, 848, 854, 856, + 860, 862, 864, 868, 871, 874, 875, 877, 879, 882, + 883, 886, 890, 894, 897, 901, 906, 910, 913, 917, + 920, 922, 924, 927, 930, 931, 933, 936, 937, 938, + 940, 942, 945, 949, 951, 954, 956, 959, 966, 972, + 978, 981, 984, 989, 990, 995, 996, 997, 1001, 1006, + 1010, 1012, 1014, 1016, 1018, 1021, 1022, 1027, 1029, 1033, + 1034, 1035, 1043, 1049, 1052, 1053, 1054, 1055, 1068, 1069, + 1076, 1079, 1082, 1085, 1089, 1096, 1105, 1116, 1129, 1133, + 1138, 1140, 1142, 1143, 1150, 1154, 1160, 1163, 1166, 1167, + 1169, 1170, 1172, 1173, 1175, 1177, 1181, 1186, 1188, 1192, + 1193, 1196, 1199, 1200, 1205, 1208, 1209, 1211, 1213, 1217, + 1219, 1223, 1228, 1233, 1238, 1243, 1248, 1249, 1252, 1254, + 1257, 1259, 1263, 1265, 1269 +}; + +static const short yyrhs[] = { -1, + 85, 0, 0, 86, 88, 0, 0, 85, 87, 88, + 0, 90, 0, 89, 0, 27, 59, 99, 76, 77, + 0, 238, 88, 0, 122, 136, 77, 0, 129, 122, + 136, 77, 0, 125, 122, 135, 77, 0, 129, 77, + 0, 125, 77, 0, 1, 77, 0, 1, 78, 0, + 77, 0, 0, 0, 125, 122, 165, 91, 116, 92, + 196, 0, 125, 122, 165, 1, 0, 0, 0, 129, + 122, 168, 93, 116, 94, 196, 0, 129, 122, 168, + 1, 0, 0, 0, 122, 168, 95, 116, 96, 196, + 0, 122, 168, 1, 0, 3, 0, 4, 0, 43, + 0, 49, 0, 48, 0, 54, 0, 55, 0, 79, + 0, 80, 0, 101, 0, 0, 101, 0, 107, 0, + 101, 81, 107, 0, 113, 0, 50, 105, 0, 238, + 105, 0, 98, 105, 0, 40, 97, 0, 103, 102, + 0, 103, 59, 183, 76, 0, 104, 102, 0, 104, + 59, 183, 76, 0, 33, 105, 0, 34, 105, 0, + 11, 0, 29, 0, 102, 0, 59, 183, 76, 105, + 0, 0, 59, 183, 76, 82, 106, 150, 78, 0, + 105, 0, 107, 48, 107, 0, 107, 49, 107, 0, + 107, 50, 107, 0, 107, 51, 107, 0, 107, 52, + 107, 0, 107, 46, 107, 0, 107, 47, 107, 0, + 107, 45, 107, 0, 107, 44, 107, 0, 107, 43, + 107, 0, 107, 41, 107, 0, 107, 42, 107, 0, + 0, 107, 40, 108, 107, 0, 0, 107, 39, 109, + 107, 0, 0, 0, 107, 37, 110, 99, 38, 111, + 107, 0, 0, 107, 37, 112, 38, 107, 0, 107, + 36, 107, 0, 107, 35, 107, 0, 3, 0, 8, + 0, 115, 0, 59, 99, 76, 0, 59, 1, 76, + 0, 0, 59, 114, 198, 76, 0, 113, 59, 100, + 76, 0, 113, 60, 99, 83, 0, 113, 58, 97, + 0, 113, 57, 97, 0, 113, 54, 0, 113, 55, + 0, 9, 0, 115, 9, 0, 0, 118, 0, 118, + 10, 0, 203, 204, 119, 0, 117, 0, 191, 0, + 118, 117, 0, 117, 191, 0, 127, 122, 135, 77, + 0, 130, 122, 136, 77, 0, 127, 77, 0, 130, + 77, 0, 203, 204, 124, 0, 120, 0, 191, 0, + 121, 120, 0, 120, 191, 0, 0, 0, 125, 122, + 135, 77, 0, 129, 122, 136, 77, 0, 125, 122, + 159, 0, 129, 122, 162, 0, 125, 77, 0, 129, + 77, 0, 238, 124, 0, 133, 126, 0, 129, 133, + 126, 0, 0, 126, 134, 0, 126, 5, 0, 126, + 143, 0, 133, 128, 0, 130, 133, 128, 0, 0, + 128, 134, 0, 128, 5, 0, 130, 0, 143, 0, + 129, 130, 0, 129, 143, 0, 7, 0, 5, 0, + 130, 7, 0, 130, 5, 0, 133, 132, 0, 185, + 133, 132, 0, 0, 132, 134, 0, 6, 0, 169, + 0, 4, 0, 28, 59, 99, 76, 0, 28, 59, + 183, 76, 0, 6, 0, 7, 0, 169, 0, 138, + 0, 135, 81, 138, 0, 140, 0, 136, 81, 138, + 0, 0, 27, 59, 115, 76, 0, 0, 165, 137, + 142, 36, 139, 148, 0, 165, 137, 142, 0, 0, + 168, 137, 142, 36, 141, 148, 0, 168, 137, 142, + 0, 0, 143, 0, 144, 0, 143, 144, 0, 30, + 59, 59, 145, 76, 76, 0, 146, 0, 145, 81, + 146, 0, 0, 147, 0, 147, 59, 3, 76, 0, + 147, 59, 3, 81, 101, 76, 0, 147, 59, 100, + 76, 0, 97, 0, 5, 0, 6, 0, 7, 0, + 107, 0, 0, 82, 149, 150, 78, 0, 1, 0, + 0, 151, 174, 0, 152, 0, 151, 81, 152, 0, + 107, 0, 0, 82, 153, 150, 78, 0, 1, 0, + 0, 60, 107, 10, 107, 83, 36, 154, 152, 0, + 0, 60, 107, 83, 36, 155, 152, 0, 0, 60, + 107, 83, 156, 152, 0, 0, 97, 38, 157, 152, + 0, 0, 58, 97, 36, 158, 152, 0, 0, 0, + 165, 160, 116, 161, 198, 0, 0, 0, 168, 163, + 116, 164, 198, 0, 166, 0, 168, 0, 59, 166, + 76, 0, 166, 59, 233, 0, 166, 60, 99, 83, + 0, 166, 60, 83, 0, 50, 186, 166, 0, 143, + 123, 166, 0, 4, 0, 167, 59, 233, 0, 167, + 60, 99, 83, 0, 167, 60, 83, 0, 50, 186, + 167, 0, 143, 123, 167, 0, 4, 0, 168, 59, + 233, 0, 59, 168, 76, 0, 50, 186, 168, 0, + 168, 60, 99, 83, 0, 168, 60, 83, 0, 143, + 123, 168, 0, 3, 0, 0, 13, 97, 82, 170, + 176, 78, 142, 0, 13, 82, 176, 78, 142, 0, + 13, 97, 0, 0, 14, 97, 82, 171, 176, 78, + 142, 0, 14, 82, 176, 78, 142, 0, 14, 97, + 0, 0, 12, 97, 82, 172, 181, 175, 78, 142, + 0, 0, 12, 82, 173, 181, 175, 78, 142, 0, + 12, 97, 0, 0, 81, 0, 0, 81, 0, 177, + 0, 177, 178, 0, 0, 177, 178, 77, 0, 177, + 77, 0, 131, 122, 179, 0, 131, 0, 185, 122, + 179, 0, 185, 0, 1, 0, 238, 178, 0, 180, + 0, 179, 81, 180, 0, 203, 204, 165, 142, 0, + 203, 204, 165, 38, 107, 142, 0, 203, 204, 38, + 107, 142, 0, 182, 0, 181, 81, 182, 0, 1, + 0, 97, 0, 97, 36, 107, 0, 131, 184, 0, + 185, 184, 0, 0, 187, 0, 7, 0, 185, 7, + 0, 0, 186, 7, 0, 59, 187, 76, 0, 50, + 186, 187, 0, 50, 186, 0, 187, 59, 226, 0, + 187, 60, 99, 83, 0, 187, 60, 83, 0, 59, + 226, 0, 60, 99, 83, 0, 60, 83, 0, 189, + 0, 206, 0, 189, 206, 0, 189, 191, 0, 0, + 188, 0, 1, 77, 0, 0, 0, 194, 0, 195, + 0, 194, 195, 0, 32, 237, 77, 0, 198, 0, + 1, 198, 0, 82, 0, 197, 78, 0, 197, 192, + 193, 121, 190, 78, 0, 197, 192, 193, 1, 78, + 0, 197, 192, 193, 188, 78, 0, 200, 205, 0, + 200, 1, 0, 15, 59, 99, 76, 0, 0, 18, + 202, 205, 17, 0, 0, 0, 203, 204, 208, 0, + 203, 204, 219, 205, 0, 203, 204, 207, 0, 208, + 0, 219, 0, 198, 0, 216, 0, 99, 77, 0, + 0, 199, 16, 209, 205, 0, 199, 0, 199, 16, + 1, 0, 0, 0, 17, 210, 59, 99, 76, 211, + 205, 0, 201, 59, 99, 76, 77, 0, 201, 1, + 0, 0, 0, 0, 19, 59, 221, 77, 212, 221, + 77, 213, 221, 76, 214, 205, 0, 0, 20, 59, + 99, 76, 215, 205, 0, 23, 77, 0, 24, 77, + 0, 25, 77, 0, 25, 99, 77, 0, 27, 220, + 59, 99, 76, 77, 0, 27, 220, 59, 99, 38, + 222, 76, 77, 0, 27, 220, 59, 99, 38, 222, + 38, 222, 76, 77, 0, 27, 220, 59, 99, 38, + 222, 38, 222, 38, 225, 76, 77, 0, 26, 97, + 77, 0, 26, 50, 99, 77, 0, 77, 0, 217, + 0, 0, 19, 59, 113, 76, 218, 205, 0, 21, + 107, 38, 0, 21, 107, 10, 107, 38, 0, 22, + 38, 0, 97, 38, 0, 0, 7, 0, 0, 99, + 0, 0, 223, 0, 224, 0, 223, 81, 224, 0, + 9, 59, 99, 76, 0, 115, 0, 225, 81, 115, + 0, 0, 227, 228, 0, 230, 76, 0, 0, 231, + 77, 229, 228, 0, 1, 76, 0, 0, 10, 0, + 231, 0, 231, 81, 10, 0, 232, 0, 231, 81, + 232, 0, 125, 122, 167, 142, 0, 125, 122, 168, + 142, 0, 125, 122, 184, 142, 0, 129, 122, 168, + 142, 0, 129, 122, 184, 142, 0, 0, 234, 235, + 0, 228, 0, 236, 76, 0, 3, 0, 236, 81, + 3, 0, 97, 0, 237, 81, 97, 0, 31, 0 +}; + +#endif + +#if YYDEBUG != 0 +static const short yyrline[] = { 0, + 239, 244, 258, 260, 260, 261, 263, 265, 266, 274, + 278, 289, 294, 299, 301, 303, 304, 305, 310, 317, + 319, 324, 329, 335, 337, 342, 347, 353, 355, 360, + 367, 369, 372, 374, 376, 378, 380, 382, 384, 388, + 392, 395, 398, 401, 405, 407, 410, 413, 417, 445, + 451, 454, 457, 460, 462, 466, 470, 474, 476, 479, + 483, 510, 512, 514, 516, 518, 520, 522, 524, 526, + 528, 530, 532, 534, 536, 540, 542, 546, 548, 551, + 555, 557, 564, 567, 570, 576, 675, 676, 678, 684, + 686, 700, 723, 725, 727, 731, 737, 739, 744, 746, + 751, 753, 754, 764, 769, 771, 772, 773, 780, 786, + 791, 794, 802, 807, 809, 810, 811, 818, 829, 833, + 839, 844, 849, 854, 856, 858, 867, 870, 874, 876, + 878, 883, 887, 890, 894, 897, 899, 911, 914, 916, + 918, 922, 926, 928, 931, 944, 947, 951, 953, 961, + 962, 963, 967, 969, 975, 976, 977, 980, 982, 985, + 987, 990, 993, 999, 1006, 1008, 1015, 1022, 1025, 1032, + 1035, 1039, 1042, 1046, 1051, 1054, 1058, 1061, 1063, 1065, + 1067, 1074, 1076, 1077, 1078, 1083, 1085, 1090, 1098, 1103, + 1107, 1110, 1112, 1117, 1120, 1122, 1124, 1128, 1131, 1131, + 1134, 1134, 1137, 1137, 1140, 1140, 1143, 1145, 1156, 1164, + 1168, 1179, 1187, 1194, 1196, 1201, 1204, 1209, 1211, 1213, + 1220, 1222, 1230, 1236, 1238, 1240, 1247, 1249, 1255, 1261, + 1263, 1265, 1267, 1274, 1276, 1279, 1284, 1286, 1290, 1292, + 1294, 1296, 1300, 1302, 1305, 1308, 1311, 1314, 1318, 1320, + 1323, 1325, 1329, 1332, 1337, 1339, 1341, 1355, 1362, 1367, + 1373, 1378, 1380, 1385, 1387, 1391, 1395, 1399, 1409, 1411, + 1416, 1421, 1424, 1428, 1431, 1435, 1438, 1441, 1444, 1448, + 1451, 1455, 1459, 1461, 1463, 1465, 1467, 1469, 1471, 1473, + 1483, 1491, 1493, 1495, 1499, 1501, 1504, 1507, 1518, 1520, + 1525, 1527, 1530, 1544, 1547, 1550, 1552, 1554, 1562, 1570, + 1581, 1586, 1589, 1603, 1612, 1616, 1620, 1624, 1630, 1634, + 1639, 1642, 1647, 1650, 1651, 1668, 1673, 1676, 1688, 1690, + 1700, 1710, 1711, 1719, 1722, 1734, 1738, 1755, 1765, 1774, + 1779, 1784, 1789, 1793, 1797, 1808, 1815, 1822, 1829, 1840, + 1846, 1849, 1854, 1877, 1911, 1936, 1967, 1982, 1993, 1997, + 2001, 2004, 2009, 2011, 2014, 2016, 2020, 2025, 2028, 2034, + 2039, 2044, 2046, 2055, 2056, 2062, 2064, 2074, 2076, 2080, + 2083, 2089, 2099, 2108, 2117, 2127, 2141, 2146, 2151, 2153, + 2162, 2165, 2170, 2173, 2177 +}; +#endif + + +#if YYDEBUG != 0 + +static const char * const yytname[] = { "$","error","$undefined.","IDENTIFIER", +"TYPENAME","SCSPEC","TYPESPEC","TYPE_QUAL","CONSTANT","STRING","ELLIPSIS","SIZEOF", +"ENUM","STRUCT","UNION","IF","ELSE","WHILE","DO","FOR","SWITCH","CASE","DEFAULT", +"BREAK","CONTINUE","RETURN","GOTO","ASM_KEYWORD","TYPEOF","ALIGNOF","ATTRIBUTE", +"EXTENSION","LABEL","REALPART","IMAGPART","ASSIGN","'='","'?'","':'","OROR", +"ANDAND","'|'","'^'","'&'","EQCOMPARE","ARITHCOMPARE","LSHIFT","RSHIFT","'+'", +"'-'","'*'","'/'","'%'","UNARY","PLUSPLUS","MINUSMINUS","HYPERUNARY","POINTSAT", +"'.'","'('","'['","INTERFACE","IMPLEMENTATION","END","SELECTOR","DEFS","ENCODE", +"CLASSNAME","PUBLIC","PRIVATE","PROTECTED","PROTOCOL","OBJECTNAME","CLASS","ALIAS", +"OBJC_STRING","')'","';'","'}'","'~'","'!'","','","'{'","']'","program","extdefs", +"@1","@2","extdef","datadef","fndef","@3","@4","@5","@6","@7","@8","identifier", +"unop","expr","exprlist","nonnull_exprlist","unary_expr","sizeof","alignof", +"cast_expr","@9","expr_no_commas","@10","@11","@12","@13","@14","primary","@15", +"string","old_style_parm_decls","lineno_datadecl","datadecls","datadecl","lineno_decl", +"decls","setspecs","setattrs","decl","typed_declspecs","reserved_declspecs", +"typed_declspecs_no_prefix_attr","reserved_declspecs_no_prefix_attr","declmods", +"declmods_no_prefix_attr","typed_typespecs","reserved_typespecquals","typespec", +"typespecqual_reserved","initdecls","notype_initdecls","maybeasm","initdcl", +"@16","notype_initdcl","@17","maybe_attribute","attributes","attribute","attribute_list", +"attrib","any_word","init","@18","initlist_maybe_comma","initlist1","initelt", +"@19","@20","@21","@22","@23","@24","nested_function","@25","@26","notype_nested_function", +"@27","@28","declarator","after_type_declarator","parm_declarator","notype_declarator", +"structsp","@29","@30","@31","@32","maybecomma","maybecomma_warn","component_decl_list", +"component_decl_list2","component_decl","components","component_declarator", +"enumlist","enumerator","typename","absdcl","nonempty_type_quals","type_quals", +"absdcl1","stmts","lineno_stmt_or_labels","xstmts","errstmt","pushlevel","maybe_label_decls", +"label_decls","label_decl","compstmt_or_error","compstmt_start","compstmt","simple_if", +"if_prefix","do_stmt_start","@33","save_filename","save_lineno","lineno_labeled_stmt", +"lineno_stmt_or_label","stmt_or_label","stmt","@34","@35","@36","@37","@38", +"@39","@40","all_iter_stmt","all_iter_stmt_simple","@41","label","maybe_type_qual", +"xexpr","asm_operands","nonnull_asm_operands","asm_operand","asm_clobbers","parmlist", +"@42","parmlist_1","@43","parmlist_2","parms","parm","parmlist_or_identifiers", +"@44","parmlist_or_identifiers_1","identifiers","identifiers_or_typenames","extension", NULL +}; +#endif + +static const short yyr1[] = { 0, + 84, 84, 86, 85, 87, 85, 88, 88, 88, 88, + 89, 89, 89, 89, 89, 89, 89, 89, 91, 92, + 90, 90, 93, 94, 90, 90, 95, 96, 90, 90, + 97, 97, 98, 98, 98, 98, 98, 98, 98, 99, + 100, 100, 101, 101, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 103, 104, 105, 105, 106, + 105, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 108, 107, 109, 107, 110, 111, + 107, 112, 107, 107, 107, 113, 113, 113, 113, 113, + 114, 113, 113, 113, 113, 113, 113, 113, 115, 115, + 116, 116, 116, 117, 118, 118, 118, 118, 119, 119, + 119, 119, 120, 121, 121, 121, 121, 122, 123, 124, + 124, 124, 124, 124, 124, 124, 125, 125, 126, 126, + 126, 126, 127, 127, 128, 128, 128, 129, 129, 129, + 129, 130, 130, 130, 130, 131, 131, 132, 132, 133, + 133, 133, 133, 133, 134, 134, 134, 135, 135, 136, + 136, 137, 137, 139, 138, 138, 141, 140, 140, 142, + 142, 143, 143, 144, 145, 145, 146, 146, 146, 146, + 146, 147, 147, 147, 147, 148, 149, 148, 148, 150, + 150, 151, 151, 152, 153, 152, 152, 154, 152, 155, + 152, 156, 152, 157, 152, 158, 152, 160, 161, 159, + 163, 164, 162, 165, 165, 166, 166, 166, 166, 166, + 166, 166, 167, 167, 167, 167, 167, 167, 168, 168, + 168, 168, 168, 168, 168, 170, 169, 169, 169, 171, + 169, 169, 169, 172, 169, 173, 169, 169, 174, 174, + 175, 175, 176, 176, 177, 177, 177, 178, 178, 178, + 178, 178, 178, 179, 179, 180, 180, 180, 181, 181, + 181, 182, 182, 183, 183, 184, 184, 185, 185, 186, + 186, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 188, 189, 189, 189, 190, 190, 191, 192, 193, 193, + 194, 194, 195, 196, 196, 197, 198, 198, 198, 198, + 199, 199, 200, 202, 201, 203, 204, 205, 205, 206, + 207, 207, 208, 208, 208, 209, 208, 208, 208, 210, + 211, 208, 208, 208, 212, 213, 214, 208, 215, 208, + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 208, 216, 218, 217, 219, 219, 219, 219, 220, 220, + 221, 221, 222, 222, 223, 223, 224, 225, 225, 227, + 226, 228, 229, 228, 228, 230, 230, 230, 230, 231, + 231, 232, 232, 232, 232, 232, 234, 233, 235, 235, + 236, 236, 237, 237, 238 +}; + +static const short yyr2[] = { 0, + 0, 1, 0, 2, 0, 3, 1, 1, 5, 2, + 3, 4, 4, 2, 2, 2, 2, 1, 0, 0, + 7, 4, 0, 0, 7, 4, 0, 0, 6, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 3, 1, 2, 2, 2, 2, 2, + 4, 2, 4, 2, 2, 1, 1, 1, 4, 0, + 7, 1, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 0, 4, 0, 4, 0, 0, + 7, 0, 5, 3, 3, 1, 1, 1, 3, 3, + 0, 4, 4, 4, 3, 3, 2, 2, 1, 2, + 0, 1, 2, 3, 1, 1, 2, 2, 4, 4, + 2, 2, 3, 1, 1, 2, 2, 0, 0, 4, + 4, 3, 3, 2, 2, 2, 2, 3, 0, 2, + 2, 2, 2, 3, 0, 2, 2, 1, 1, 2, + 2, 1, 1, 2, 2, 2, 3, 0, 2, 1, + 1, 1, 4, 4, 1, 1, 1, 1, 3, 1, + 3, 0, 4, 0, 6, 3, 0, 6, 3, 0, + 1, 1, 2, 6, 1, 3, 0, 1, 4, 6, + 4, 1, 1, 1, 1, 1, 0, 4, 1, 0, + 2, 1, 3, 1, 0, 4, 1, 0, 8, 0, + 6, 0, 5, 0, 4, 0, 5, 0, 0, 5, + 0, 0, 5, 1, 1, 3, 3, 4, 3, 3, + 3, 1, 3, 4, 3, 3, 3, 1, 3, 3, + 3, 4, 3, 3, 1, 0, 7, 5, 2, 0, + 7, 5, 2, 0, 8, 0, 7, 2, 0, 1, + 0, 1, 1, 2, 0, 3, 2, 3, 1, 3, + 1, 1, 2, 1, 3, 4, 6, 5, 1, 3, + 1, 1, 3, 2, 2, 0, 1, 1, 2, 0, + 2, 3, 3, 2, 3, 4, 3, 2, 3, 2, + 1, 1, 2, 2, 0, 1, 2, 0, 0, 1, + 1, 2, 3, 1, 2, 1, 2, 6, 5, 5, + 2, 2, 4, 0, 4, 0, 0, 3, 4, 3, + 1, 1, 1, 1, 2, 0, 4, 1, 3, 0, + 0, 7, 5, 2, 0, 0, 0, 12, 0, 6, + 2, 2, 2, 3, 6, 8, 10, 12, 3, 4, + 1, 1, 0, 6, 3, 5, 2, 2, 0, 1, + 0, 1, 0, 1, 1, 3, 4, 1, 3, 0, + 2, 2, 0, 4, 2, 0, 1, 1, 3, 1, + 3, 4, 4, 4, 4, 4, 0, 2, 1, 2, + 1, 3, 1, 3, 1 +}; + +static const short yydefact[] = { 3, + 5, 0, 0, 0, 152, 143, 150, 142, 0, 0, + 0, 0, 0, 0, 395, 18, 4, 8, 7, 0, + 118, 118, 138, 129, 139, 172, 151, 0, 6, 16, + 17, 31, 32, 246, 248, 255, 239, 255, 243, 0, + 0, 0, 235, 280, 0, 0, 160, 119, 0, 15, + 0, 14, 0, 140, 129, 141, 145, 144, 127, 173, + 10, 0, 244, 0, 0, 236, 0, 240, 86, 87, + 99, 56, 57, 0, 0, 0, 33, 35, 34, 0, + 36, 37, 0, 38, 39, 0, 0, 40, 58, 0, + 0, 62, 43, 45, 88, 0, 278, 0, 276, 148, + 0, 276, 177, 0, 0, 11, 0, 0, 30, 0, + 387, 0, 0, 170, 222, 280, 0, 0, 158, 119, + 0, 214, 215, 0, 0, 128, 131, 155, 156, 130, + 132, 157, 271, 272, 251, 269, 0, 170, 262, 257, + 118, 254, 118, 0, 255, 170, 255, 54, 55, 49, + 46, 0, 0, 0, 0, 48, 0, 0, 0, 50, + 0, 52, 0, 0, 79, 77, 75, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, + 98, 0, 0, 41, 0, 100, 47, 153, 280, 370, + 0, 274, 277, 146, 154, 279, 148, 275, 183, 184, + 185, 182, 0, 175, 178, 281, 231, 230, 161, 162, + 234, 0, 229, 0, 233, 0, 0, 28, 0, 316, + 106, 317, 169, 171, 0, 0, 13, 0, 0, 22, + 0, 170, 387, 0, 12, 26, 0, 0, 252, 0, + 251, 238, 316, 256, 316, 263, 0, 242, 0, 90, + 89, 306, 298, 0, 0, 9, 44, 0, 0, 85, + 84, 0, 0, 0, 0, 73, 74, 72, 71, 70, + 68, 69, 63, 64, 65, 66, 67, 96, 95, 0, + 42, 0, 284, 0, 288, 0, 290, 0, 370, 0, + 149, 147, 0, 177, 41, 0, 0, 391, 377, 118, + 118, 389, 0, 378, 380, 388, 0, 232, 297, 0, + 108, 103, 107, 0, 167, 220, 216, 159, 221, 20, + 166, 217, 219, 0, 24, 273, 270, 170, 0, 258, + 264, 317, 260, 170, 170, 307, 299, 92, 60, 59, + 51, 53, 0, 0, 78, 76, 93, 94, 283, 282, + 371, 289, 285, 287, 0, 174, 176, 86, 0, 163, + 375, 276, 276, 372, 373, 0, 390, 0, 0, 29, + 304, 104, 118, 118, 135, 0, 0, 164, 218, 0, + 247, 170, 316, 0, 237, 241, 0, 0, 300, 301, + 0, 80, 83, 286, 179, 0, 181, 228, 280, 370, + 119, 170, 170, 170, 280, 170, 170, 0, 379, 381, + 392, 305, 111, 0, 112, 0, 135, 133, 189, 187, + 186, 168, 21, 0, 25, 245, 265, 0, 170, 393, + 0, 0, 0, 316, 0, 0, 115, 317, 292, 302, + 197, 86, 0, 0, 195, 0, 194, 0, 249, 192, + 0, 0, 284, 0, 387, 0, 382, 383, 384, 284, + 385, 386, 374, 0, 0, 162, 134, 137, 136, 0, + 165, 170, 0, 266, 303, 0, 309, 117, 116, 296, + 0, 310, 294, 317, 293, 0, 0, 0, 0, 204, + 61, 0, 191, 81, 180, 226, 280, 227, 223, 225, + 0, 109, 110, 0, 268, 170, 394, 308, 0, 152, + 0, 330, 314, 0, 0, 0, 0, 0, 0, 0, + 0, 359, 351, 0, 0, 113, 118, 118, 323, 328, + 0, 0, 320, 321, 324, 352, 322, 0, 206, 0, + 202, 0, 0, 193, 0, 224, 188, 267, 0, 0, + 316, 361, 0, 0, 357, 341, 342, 343, 0, 0, + 0, 360, 0, 358, 325, 124, 0, 125, 0, 0, + 312, 317, 311, 334, 0, 126, 0, 0, 200, 0, + 196, 205, 0, 0, 0, 362, 45, 0, 0, 0, + 355, 344, 0, 349, 0, 0, 122, 208, 0, 123, + 211, 329, 316, 0, 0, 207, 0, 0, 203, 313, + 0, 315, 353, 335, 339, 0, 350, 0, 120, 0, + 121, 0, 327, 318, 316, 0, 198, 201, 331, 316, + 361, 316, 356, 363, 0, 209, 212, 319, 333, 0, + 316, 354, 0, 340, 0, 0, 364, 365, 345, 0, + 0, 199, 332, 336, 0, 363, 0, 0, 210, 213, + 361, 0, 0, 346, 366, 0, 367, 0, 0, 337, + 368, 0, 347, 316, 0, 0, 338, 348, 369, 0, + 0, 0 +}; + +static const short yydefgoto[] = { 680, + 1, 2, 3, 17, 18, 19, 231, 377, 237, 380, + 113, 310, 446, 86, 153, 280, 88, 89, 90, 91, + 92, 391, 93, 265, 264, 262, 451, 263, 94, 154, + 95, 218, 219, 220, 372, 433, 434, 20, 108, 526, + 300, 59, 373, 418, 301, 23, 99, 194, 24, 130, + 118, 46, 114, 119, 424, 47, 376, 223, 224, 26, + 203, 204, 205, 422, 470, 448, 449, 450, 489, 640, + 608, 580, 543, 577, 597, 620, 650, 600, 622, 651, + 210, 122, 496, 123, 27, 145, 147, 137, 62, 493, + 240, 64, 65, 142, 330, 331, 135, 136, 101, 192, + 102, 104, 193, 435, 436, 481, 221, 337, 388, 389, + 390, 370, 253, 371, 530, 531, 532, 551, 572, 314, + 573, 439, 533, 534, 603, 550, 641, 631, 661, 674, + 632, 535, 536, 630, 537, 563, 588, 646, 647, 648, + 672, 285, 286, 302, 408, 303, 304, 305, 213, 214, + 306, 307, 431, 96 +}; + +static const short yypact[] = { 66, + 82, 2070, 2070, 286,-32768,-32768,-32768,-32768, 77, 84, + 103, 30, 55, 79,-32768,-32768,-32768,-32768,-32768, 60, + 113, 405, 142,-32768, 183,-32768,-32768, 2070,-32768,-32768, +-32768,-32768,-32768,-32768, 163,-32768, 170,-32768, 173, 1932, + 1866, 165,-32768,-32768, 60, 35,-32768, 183, 589,-32768, + 530,-32768, 60, 142,-32768, 183,-32768,-32768, 1138,-32768, +-32768, 458,-32768, 192, 267,-32768, 200,-32768,-32768,-32768, +-32768,-32768,-32768, 1932, 1932, 229,-32768,-32768,-32768, 1932, +-32768,-32768, 850,-32768,-32768, 1932, 206, 211,-32768, 1959, + 1986,-32768, 2136, 366, 288, 1932,-32768, 243, 161,-32768, + 271, 438, 842, 237, 150,-32768, 530, 60,-32768, 254, +-32768, 1408, 361, 183,-32768,-32768, 530, 106,-32768, 183, + 732, 389, 413, 112, 1354, 1138,-32768,-32768,-32768,-32768, + 183,-32768,-32768, 318, 297,-32768, 458, 183,-32768,-32768, + 412, 306, 639, 824,-32768, 183,-32768,-32768,-32768,-32768, +-32768, 315, 321, 322, 331,-32768, 352, 1932, 850,-32768, + 850,-32768, 1932, 1932, 401,-32768,-32768, 1932, 1932, 1932, + 1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932, 1932,-32768, +-32768, 229, 229, 1932, 1932,-32768,-32768,-32768,-32768, 161, + 1421,-32768, 442, 648,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768, 93,-32768, 394,-32768, 413,-32768,-32768, 443, + 413, 466,-32768, 907,-32768, 377, 407,-32768, 323, 59, +-32768,-32768, 456, 183, 199, 283,-32768, 530, 530,-32768, + 361, 183,-32768, 1474,-32768,-32768, 361, 1932, 229, 400, + 297,-32768,-32768,-32768,-32768,-32768, 409,-32768, 416,-32768, +-32768,-32768, 418, 423, 1755,-32768, 2136, 427, 432, 2136, + 2136, 1932, 479, 1932, 1932, 1725, 2193, 1903, 1130, 1357, + 960, 960, 455, 455,-32768,-32768,-32768,-32768,-32768, 450, + 211, 448, 310, 296,-32768, 628,-32768, 457,-32768, 1487, +-32768, 648, 465, 842, 2013, 52, 467,-32768,-32768,-32768, + 1088,-32768, 470, 257,-32768,-32768, 154,-32768,-32768, 57, +-32768,-32768,-32768, 861,-32768, 389,-32768,-32768, 389,-32768, + 512,-32768,-32768, 468,-32768, 2136,-32768, 183, 475, 473, +-32768,-32768, 473, 183, 183,-32768, 526,-32768,-32768,-32768, +-32768,-32768, 523, 1932, 2171, 2183,-32768,-32768, 442,-32768, +-32768,-32768,-32768,-32768, 482,-32768,-32768, 209, 490,-32768, +-32768, 177, 67,-32768,-32768, 1058,-32768, 576, 322,-32768, +-32768,-32768, 505, 451,-32768, 1343, 57,-32768,-32768, 57, +-32768, 183,-32768, 261,-32768,-32768, 229, 944, 526,-32768, + 1163,-32768, 2065,-32768,-32768, 1932,-32768,-32768,-32768, 67, + 183, 137, 242, 183,-32768, 242, 183, 628,-32768,-32768, +-32768,-32768,-32768, 530,-32768, 60,-32768, 387,-32768,-32768, + 2136,-32768,-32768, 1343,-32768,-32768,-32768, 1932, 187,-32768, + 276, 433, 672, 507, 508, 762,-32768,-32768,-32768,-32768, +-32768, 549, 229, 1932,-32768, 550, 2136, 514, 516,-32768, + 1932, 250, 188, 609,-32768, 1540,-32768,-32768,-32768, 216, +-32768,-32768,-32768, 309, 325, 155, 387,-32768,-32768, 1163, +-32768, 1642, 1932,-32768,-32768, 229,-32768,-32768,-32768,-32768, + 520,-32768,-32768,-32768,-32768, 1621, 564, 2109, 1163,-32768, +-32768, 1223,-32768, 2065,-32768, 459,-32768, 459,-32768,-32768, + 524,-32768,-32768, 532,-32768, 1642,-32768,-32768, 1701, 573, + 555,-32768,-32768, 559, 561, 1932, 584, 546, 547, 1879, + 201, 619,-32768, 590, 553,-32768, 567, 794,-32768, 611, + 1026, 61,-32768,-32768,-32768,-32768,-32768, 1812,-32768, 1932, + 600, 569, 1283,-32768, 302,-32768,-32768,-32768, 1932, 591, +-32768, 1932, 1932, 1565,-32768,-32768,-32768,-32768, 580, 1932, + 588,-32768, 610,-32768,-32768,-32768, 530,-32768, 60, 1106, +-32768,-32768,-32768,-32768, 1932,-32768, 1283, 2091,-32768, 1283, +-32768,-32768, 596, 1932, 665,-32768, 868, 630, 612, 1932, +-32768,-32768, 632,-32768, 1932, 350,-32768, 227, 355,-32768, + 955,-32768,-32768, 1701, 634,-32768, 675, 1283,-32768,-32768, + 637,-32768,-32768,-32768,-32768, 2158,-32768, 39,-32768, 361, +-32768, 361,-32768,-32768,-32768, 641,-32768,-32768,-32768,-32768, + 1932,-32768,-32768, 705, 642,-32768,-32768,-32768,-32768, 1283, +-32768,-32768, 646,-32768, 666, 47, 643,-32768,-32768, 322, + 322,-32768,-32768,-32768, 1932, 705, 651, 705,-32768,-32768, + 1932, 653, 48,-32768,-32768, 654,-32768, 466, 655,-32768, + 288, 303,-32768,-32768, 657, 466,-32768,-32768, 288, 735, + 740,-32768 +}; + +static const short yypgoto[] = {-32768, +-32768,-32768,-32768, 65,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768, -5,-32768, -40, 446, -137, 424,-32768,-32768, + -55,-32768, 399,-32768,-32768,-32768,-32768,-32768, 190,-32768, + -191, -207, 527,-32768,-32768, 314,-32768, 22, -98, 215, + 0, 700,-32768, 339, 7, -7, -15, 560, 11, -149, + -366, -45, -107, -52,-32768,-32768,-32768, 202, 14, 53, +-32768, 464,-32768, 337,-32768, -378,-32768, -409,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + -38, -68, -298, -13, -30,-32768,-32768,-32768,-32768,-32768, + 528, 41,-32768, 620, 522, 391, 635, 537, 1, -79, + -11, -89, -139, 344,-32768,-32768, -180,-32768,-32768,-32768, + 403, -278,-32768, -128,-32768,-32768,-32768,-32768, -95, -286, + -495, 358,-32768, 193,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768, 214,-32768, -556, 147,-32768, 146, +-32768, 531,-32768, -233,-32768,-32768,-32768, 449, -195,-32768, +-32768,-32768,-32768, 9 +}; + + +#define YYLAST 2245 + + +static const short yytable[] = { 87, + 98, 21, 21, 35, 37, 39, 49, 124, 22, 22, + 28, 28, 121, 232, 54, 25, 25, 222, 148, 149, + 296, 229, 198, 320, 151, 254, 225, 21, 132, 325, + 156, 105, 55, 48, 22, 56, 28, 322, 311, 125, + 187, 25, 51, 53, 291, 384, 281, 464, 226, 141, + 284, 100, 351, 143, 209, 585, 134, 369, 48, -102, + 186, 574, 43, 402, 120, -1, 48, 29, 312, 43, + 150, 216, 131, 144, 643, 100, 634, 60, 67, 32, + 33, -2, 544, 155, 656, 668, 32, 33, 40, 14, + 207, 504, 61, 100, 211, 132, 14, 202, 423, 283, + 60, 425, 232, 105, 666, 32, 33, 623, 60, 44, + 542, 106, 197, 41, 635, 107, 405, 48, 45, 575, + 120, 48, 657, 669, 222, 400, 191, 360, 141, 638, + 120, 134, 143, 582, 642, 222, 644, 42, 252, 131, + -102, 222, 291, 349, 282, 653, 57, 332, 58, 332, + 288, 486, 144, 197, 100, 498, 316, 281, 34, 258, + 319, 259, 243, 132, 245, 36, 14, 606, 293, 100, + 609, 100, 60, 294, 463, 318, 278, 279, 677, 43, + 398, 110, 227, 60, 38, 247, 228, 249, 235, 50, + 43, 398, 107, 324, 206, 455, 456, 509, 628, 340, + 596, 43, 115, 32, 33, 206, 14, 437, 111, 112, + 189, 207, 14, 111, 112, 211, 14, 14, 43, 190, + 191, 343, 206, 103, 473, 208, 399, 25, 14, 367, + 652, 32, 33, 134, 368, 400, 191, 399, 120, 43, + 412, 120, 120, 206, 63, 14, 400, 191, 116, 355, + 560, 66, 478, 110, 68, 483, -162, 117, 452, 499, + 284, 132, -162, 43, 115, 405, 14, 139, 469, 138, + 5, 14, 7, 97, 400, 191, 60, 146, 9, 10, + 11, 157, 404, 407, 395, 604, 44, 332, 202, 396, + 14, 158, 438, 54, 13, 45, 186, 15, 428, 25, + 111, 112, 454, -162, 43, 398, 374, -162, 206, 453, + 116, 55, 212, 349, 56, 460, 206, 469, 188, 117, + 349, 362, 363, 217, 375, 495, -105, -105, -105, -105, + 158, 14, -105, 365, -105, -105, -105, 366, 438, 242, + 484, 233, 234, 140, -253, 429, 195, 248, 403, 406, + -105, 497, 475, 238, 289, 290, 476, 529, 317, 189, + 45, 217, 30, 31, -316, -316, -316, -316, 190, 191, + 465, 350, -316, -316, -316, 401, 48, 239, 675, 25, + 529, 430, 244, 676, 417, 502, 105, 132, -316, 228, + 250, 468, 128, 129, 414, 416, 251, 120, 9, 10, + 11, 503, 466, 252, -105, 107, 255, 545, 5, 6, + 7, 8, 636, 48, 637, 501, 9, 10, 11, 180, + 181, 25, 182, 183, 184, 185, 619, 120, 256, 48, + 228, 621, 13, 321, 14, 107, 132, 487, -82, 207, + 211, 5, -101, 7, 196, 525, 207, 233, 234, 9, + 10, 11, 295, 60, 5, 57, 7, 58, 133, 308, + 32, 33, 9, 10, 11, 13, 401, 401, 525, 110, + 507, 111, 112, 48, 71, 529, 671, 328, 13, 559, + 524, 52, 187, 309, 679, 527, 334, 189, -259, -259, + 232, 315, 528, 335, 538, 336, 190, 191, 338, 25, + 289, 290, 341, 524, 177, 178, 179, 342, 583, 309, + 477, 586, 589, 160, 162, 561, 344, 455, 456, 593, + 54, 659, 660, 599, 222, 347, 222, 415, 598, 381, + 348, 207, 43, 115, 605, 385, 386, 527, 55, 352, + 356, 56, 361, 611, 528, 364, 538, 378, 567, 569, + 379, 25, 382, 383, 618, 601, 257, 387, 401, 14, + 392, 260, 261, 525, 394, 397, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 411, 116, + 120, 413, 48, 426, -295, 482, -31, 490, 117, 109, + 586, 491, -27, -27, -27, -27, 492, 508, 524, 539, + -27, -27, -27, 457, 458, 459, 546, 461, 462, 547, + -32, 43, 398, 549, 662, 110, -27, 552, -162, 553, + 586, 555, 556, 557, -162, 562, 570, 564, 297, 565, + 474, 5, 6, 7, 8, 579, 326, 299, 14, 9, + 10, 11, 5, 566, 7, 196, 581, 111, 112, 584, + 9, 10, 11, 128, 129, 13, 592, 14, 497, 9, + 10, 11, 345, 346, 594, -162, 13, 45, 595, -162, + -27, 610, 217, 505, -114, -114, -114, -114, -114, -114, + -114, 612, -114, -114, -114, -114, -114, 615, -114, -114, + -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, + -114, -114, -114, -376, -114, -114, 614, 548, 617, 626, + 627, -114, 629, 645, -114, -261, -261, 639, 649, -114, + -114, -114, 654, 658, 655, -114, -114, 664, 667, 670, + -114, 673, 230, 678, 681, -19, -19, -19, -19, 682, + 359, 587, 393, -19, -19, -19, 313, 479, -114, -114, + -114, -114, 576, -114, 126, 467, 292, 357, 110, -19, + 471, -162, 217, 246, -316, -316, 333, -162, 329, -316, + -316, 241, -316, 427, 421, 327, -316, 480, -316, -316, + -316, -316, -316, -316, -316, -316, -316, -316, -316, 447, + -316, 440, -316, 485, -316, -316, 624, 5, 6, 7, + 8, -316, 663, 665, -316, 9, 10, 11, -162, -316, + -316, -316, -162, -19, 410, -316, -316, 625, 0, 353, + -316, 13, 421, 14, 139, 0, 472, 5, 0, 7, + 97, 0, 0, 0, 0, 9, 10, 11, -316, -291, + -316, -316, 488, -316, 32, 33, 199, 200, 201, 494, + 152, 13, 69, 5, 15, 7, 97, 70, 71, 0, + 72, 9, 10, 11, 5, 6, 7, 8, 447, 0, + 568, 506, 9, 10, 11, 0, 0, 13, 73, 0, + 15, 0, 74, 75, 0, 0, 0, 447, 13, 76, + 447, 0, 77, 0, 0, 0, 0, 78, 79, 80, + 0, 0, 0, 81, 82, 0, 0, 297, 83, 298, + 5, 6, 7, 8, 554, 0, 299, 0, 9, 10, + 11, 180, 181, 0, 182, 183, 184, 185, 84, 85, + 0, -91, 0, 0, 13, 0, 14, 0, 578, 0, + 0, 447, 0, 613, 432, 0, -316, -316, -316, -316, + -316, -316, -316, 0, -316, -316, -316, -316, -316, 0, + -316, -316, -316, -316, -316, -316, -316, -316, -316, -316, + -316, -316, -316, -316, -316, 447, -316, -316, 447, 0, + 0, 110, -376, -316, -162, 0, -316, 0, 616, 0, + -162, -316, -316, -316, 0, 0, 0, -316, -316, 0, + 0, 0, -316, 0, 0, 0, 447, 175, 176, 177, + 178, 179, 0, 111, 112, 0, 0, 0, 0, 0, + -316, 0, -316, -316, 0, -316, 571, 0, -316, -316, + 0, -162, 0, -316, -316, -162, -316, 0, 447, 0, + -316, 0, -316, -316, -316, -316, -316, -316, -316, -316, + -316, -316, -316, 0, -316, 0, -316, 0, -316, -316, + 0, 5, 6, 7, 8, -316, 0, 409, -316, 9, + 10, 11, 0, -316, -316, -316, 0, 0, 0, -316, + -316, 0, 0, 0, -316, 13, 0, 14, 0, 0, + 0, 5, 6, 7, 8, 0, 0, 0, 0, 9, + 10, 11, -316, 0, -316, -316, 602, -316, -326, -326, + 0, 0, 0, -326, -326, 13, -326, 14, 0, 0, + -326, 0, -326, -326, -326, -326, -326, -326, -326, -326, + -326, -326, -326, 0, -326, 0, -326, 0, -326, -326, + 0, 0, 127, 128, 129, -326, 0, 0, -326, 9, + 10, 11, 0, -326, -326, -326, 0, 0, 0, -326, + -326, 0, 0, 441, -326, 442, 33, 14, 0, 0, + 70, 71, 0, 72, 172, 173, 174, 175, 176, 177, + 178, 179, -326, 0, -326, -326, 0, -326, 0, 0, + 0, 73, 0, 15, 0, 74, 75, 0, 0, 0, + 0, 0, 76, 0, 0, 77, 0, 0, 0, 0, + 78, 79, 80, 0, 0, 0, 81, 82, 0, 0, + 443, 83, 444, 441, 0, 442, 33, 0, 0, 0, + 70, 71, 0, 72, 0, 0, 0, 0, 0, 0, + -190, 84, 85, 0, 445, 0, 0, 0, 0, 0, + 0, 73, 0, 15, 0, 74, 75, 0, 0, 0, + 0, 0, 76, 0, 0, 77, 0, 0, 0, 0, + 78, 79, 80, 0, 0, 0, 81, 82, 0, 0, + 443, 83, 444, 441, 0, 442, 33, 0, 0, 0, + 70, 71, 0, 72, 0, 0, 0, 0, 0, 0, + -250, 84, 85, 0, 445, 0, 0, 0, 0, 0, + 0, 73, 0, 15, 0, 74, 75, 0, 0, 0, + 0, 0, 76, 0, 0, 77, 0, 0, 0, 0, + 78, 79, 80, 0, 0, 0, 81, 82, 0, 0, + 443, 83, 444, 419, 0, 69, 0, 0, 0, 0, + 70, 71, 0, 72, 236, 0, 0, -23, -23, -23, + -23, 84, 85, 0, 445, -23, -23, -23, 0, 0, + 0, 73, 0, 15, 0, 74, 75, 0, 0, 0, + 110, -23, 76, -162, 0, 77, 0, 0, 0, -162, + 78, 79, 80, 0, 0, 0, 81, 82, 0, 0, + 0, 83, 173, 174, 175, 176, 177, 178, 179, 0, + 69, 0, 111, 112, 0, 70, 71, 0, 72, 0, + 0, 84, 85, 69, 420, 0, 0, 0, 70, 71, + -162, 72, 0, 0, -162, -23, 73, 0, 15, 0, + 74, 75, 0, 0, 0, 0, 0, 76, 0, 73, + 77, 15, 0, 74, 75, 78, 79, 80, 0, 0, + 76, 81, 82, 77, 0, 0, 83, 0, 78, 79, + 80, 0, 0, 0, 81, 82, 69, 0, 0, 83, + 0, 70, 71, 0, 72, 0, 84, 85, 0, 69, + 215, 0, 0, 0, 70, 71, 0, 72, 0, 84, + 85, 0, 73, 287, 15, 0, 74, 75, 0, 0, + 0, 0, 0, 76, 0, 73, 77, 15, 0, 74, + 75, 78, 79, 80, 0, 0, 76, 81, 82, 77, + 0, 0, 83, 0, 78, 79, 80, 0, 0, 0, + 81, 82, 69, 0, 0, 83, 0, 70, 71, 0, + 72, 0, 84, 85, 0, 0, 323, 0, 0, 0, + 0, 0, 0, 0, 0, 84, 85, 0, 73, 354, + 15, 0, 74, 75, 590, 0, 0, 0, 0, 76, + 0, 0, 77, 0, 0, 0, 0, 78, 79, 80, + 0, 0, 0, 81, 82, 0, 0, 0, 83, 163, + 164, 165, 591, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 0, 84, 85, + 0, 0, 500, 442, 510, 6, 7, 8, 70, 71, + 0, 72, 9, 10, 11, 511, 0, 512, 513, 514, + 515, 516, 517, 518, 519, 520, 521, 522, 13, 73, + 14, 15, 0, 74, 75, 0, 0, 0, 0, 0, + 76, 0, 0, 77, 0, 0, 0, 0, 78, 79, + 80, 14, 0, 0, 81, 82, 163, 164, 165, 83, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 0, 0, 0, 523, 0, 84, + 85, 0, 252, 442, 33, 0, 0, 0, 70, 71, + 0, 72, 0, 0, 0, 511, 0, 512, 513, 514, + 515, 516, 517, 518, 519, 520, 521, 522, 0, 73, + 0, 15, 0, 74, 75, 0, 0, 0, 0, 0, + 76, 0, 0, 77, 0, 0, 0, 0, 78, 79, + 80, 0, 0, 0, 81, 82, 0, 69, 0, 83, + 0, 0, 70, 71, 0, 72, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 523, 0, 84, + 85, 0, 252, 73, 0, 15, 0, 74, 75, 0, + 0, 0, 0, 0, 76, 0, 0, 77, 0, 0, + 0, 0, 78, 79, 80, 0, 0, 0, 81, 82, + 0, 0, 0, 83, 69, 5, 6, 7, 8, 70, + 71, 0, 72, 9, 10, 11, 0, 0, 0, 0, + 0, 0, 0, 84, 85, 0, 339, 0, 0, 13, + 73, 14, 15, 0, 74, 75, 0, 0, 0, 0, + 0, 76, 0, 0, 77, 0, 0, 0, 0, 78, + 79, 80, 0, 0, 0, 81, 82, 0, 69, 5, + 83, 7, 97, 70, 71, 0, 72, 9, 10, 11, + 0, 69, 0, 0, 0, 0, 70, 71, 0, 72, + 84, 85, 0, 13, 73, 0, 15, 0, 74, 75, + 0, 0, 0, 0, 0, 76, 0, 73, 77, 15, + 0, 74, 75, 78, 79, 80, 0, 0, 76, 81, + 82, 77, 0, 0, 83, 0, 78, 79, 80, 0, + 0, 0, 81, 82, 69, 0, 0, 83, 0, 70, + 71, 0, 72, 0, 84, 85, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 558, 0, 84, 85, 0, + 73, 69, 15, 0, 74, 75, 70, 71, 0, 72, + 0, 76, 0, 0, 77, 0, 0, 0, 0, 78, + 79, 80, 0, 0, 0, 81, 82, 73, 69, 15, + 83, 74, 75, 70, 71, 0, 72, 0, 76, 0, + 0, 77, 0, 0, 0, 0, 78, 79, 80, 0, + 84, 85, 81, 82, 73, 358, 15, 159, 74, 75, + 70, 71, 0, 72, 0, 76, 0, 0, 77, 0, + 0, 0, 0, 78, 79, 80, 0, 84, 85, 81, + 82, 73, 0, 15, 161, 74, 75, 0, 0, 0, + 0, 0, 76, 0, 0, 77, 0, 0, 0, 0, + 78, 79, 80, 0, 84, 85, 81, 82, 0, 0, + 4, 83, -118, 5, 6, 7, 8, 0, 0, 0, + 0, 9, 10, 11, 0, 0, 0, 0, 0, 0, + 0, 84, 85, 0, 0, 0, 12, 13, 0, 14, + 15, 165, 0, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 0, 540, -118, + 0, 0, 0, 0, 0, 163, 164, 165, -118, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 163, 164, 165, 16, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 163, 164, 165, 607, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 0, 0, + 0, 541, 163, 164, 165, 633, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179 +}; + +static const short yycheck[] = { 40, + 41, 2, 3, 9, 10, 11, 20, 53, 2, 3, + 2, 3, 51, 121, 22, 2, 3, 113, 74, 75, + 212, 120, 102, 231, 80, 154, 116, 28, 59, 237, + 86, 45, 22, 20, 28, 22, 28, 233, 219, 53, + 96, 28, 21, 22, 194, 332, 184, 414, 117, 65, + 190, 41, 286, 65, 107, 551, 62, 1, 45, 1, + 9, 1, 3, 362, 51, 0, 53, 3, 10, 3, + 76, 112, 59, 65, 631, 65, 38, 25, 38, 3, + 4, 0, 492, 83, 38, 38, 3, 4, 59, 30, + 104, 470, 28, 83, 108, 126, 30, 103, 377, 189, + 48, 380, 210, 117, 661, 3, 4, 603, 56, 50, + 489, 77, 102, 59, 76, 81, 50, 104, 59, 59, + 107, 108, 76, 76, 220, 59, 60, 76, 144, 625, + 117, 137, 144, 543, 630, 231, 632, 59, 82, 126, + 82, 237, 292, 283, 185, 641, 5, 243, 7, 245, + 191, 438, 144, 143, 144, 454, 225, 295, 82, 159, + 229, 161, 141, 194, 143, 82, 30, 577, 76, 159, + 580, 161, 120, 81, 408, 228, 182, 183, 674, 3, + 4, 27, 77, 131, 82, 145, 81, 147, 77, 77, + 3, 4, 81, 234, 7, 59, 60, 484, 608, 255, + 567, 3, 4, 3, 4, 7, 30, 388, 59, 60, + 50, 225, 30, 59, 60, 229, 30, 30, 3, 59, + 60, 262, 7, 59, 38, 76, 50, 214, 30, 76, + 640, 3, 4, 239, 81, 59, 60, 50, 225, 3, + 369, 228, 229, 7, 82, 30, 59, 60, 50, 290, + 50, 82, 433, 27, 82, 436, 30, 59, 396, 455, + 400, 292, 36, 3, 4, 50, 30, 1, 418, 78, + 4, 30, 6, 7, 59, 60, 224, 78, 12, 13, + 14, 76, 362, 363, 76, 572, 50, 383, 294, 81, + 30, 81, 388, 301, 28, 59, 9, 31, 38, 286, + 59, 60, 401, 77, 3, 4, 314, 81, 7, 399, + 50, 301, 59, 453, 301, 405, 7, 467, 76, 59, + 460, 300, 301, 1, 314, 76, 4, 5, 6, 7, + 81, 30, 10, 77, 12, 13, 14, 81, 434, 138, + 436, 59, 60, 77, 78, 384, 76, 146, 362, 363, + 28, 50, 77, 36, 59, 60, 81, 486, 76, 50, + 59, 1, 77, 78, 4, 5, 6, 7, 59, 60, + 416, 76, 12, 13, 14, 362, 363, 81, 76, 366, + 509, 387, 77, 81, 374, 77, 400, 418, 28, 81, + 76, 5, 6, 7, 373, 374, 76, 384, 12, 13, + 14, 77, 416, 82, 82, 81, 76, 497, 4, 5, + 6, 7, 620, 400, 622, 456, 12, 13, 14, 54, + 55, 408, 57, 58, 59, 60, 77, 414, 77, 416, + 81, 77, 28, 232, 30, 81, 467, 443, 38, 453, + 454, 4, 82, 6, 7, 486, 460, 59, 60, 12, + 13, 14, 59, 401, 4, 5, 6, 7, 1, 83, + 3, 4, 12, 13, 14, 28, 453, 454, 509, 27, + 476, 59, 60, 460, 9, 604, 668, 78, 28, 520, + 486, 77, 538, 77, 676, 486, 78, 50, 77, 78, + 598, 36, 486, 78, 486, 78, 59, 60, 76, 486, + 59, 60, 76, 509, 50, 51, 52, 76, 549, 77, + 78, 552, 553, 90, 91, 521, 38, 59, 60, 560, + 528, 650, 651, 569, 620, 76, 622, 77, 567, 328, + 83, 545, 3, 4, 575, 334, 335, 538, 528, 83, + 76, 528, 76, 584, 538, 76, 538, 36, 527, 528, + 83, 538, 78, 81, 595, 569, 158, 32, 545, 30, + 38, 163, 164, 604, 83, 76, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 3, 50, + 567, 77, 569, 382, 78, 78, 38, 38, 59, 1, + 631, 78, 4, 5, 6, 7, 81, 78, 604, 36, + 12, 13, 14, 402, 403, 404, 83, 406, 407, 78, + 38, 3, 4, 59, 655, 27, 28, 59, 30, 59, + 661, 38, 77, 77, 36, 7, 16, 38, 1, 77, + 429, 4, 5, 6, 7, 36, 238, 10, 30, 12, + 13, 14, 4, 77, 6, 7, 78, 59, 60, 59, + 12, 13, 14, 6, 7, 28, 77, 30, 50, 12, + 13, 14, 264, 265, 77, 77, 28, 59, 59, 81, + 82, 76, 1, 472, 3, 4, 5, 6, 7, 8, + 9, 17, 11, 12, 13, 14, 15, 76, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 76, 33, 34, 77, 506, 77, 76, + 36, 40, 76, 9, 43, 77, 78, 77, 77, 48, + 49, 50, 77, 81, 59, 54, 55, 77, 76, 76, + 59, 77, 1, 77, 0, 4, 5, 6, 7, 0, + 295, 552, 344, 12, 13, 14, 220, 434, 77, 78, + 79, 80, 538, 82, 55, 417, 197, 294, 27, 28, + 424, 30, 1, 144, 3, 4, 245, 36, 241, 8, + 9, 137, 11, 383, 376, 239, 15, 434, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 391, + 29, 389, 31, 436, 33, 34, 604, 4, 5, 6, + 7, 40, 656, 658, 43, 12, 13, 14, 77, 48, + 49, 50, 81, 82, 366, 54, 55, 604, -1, 289, + 59, 28, 424, 30, 1, -1, 428, 4, -1, 6, + 7, -1, -1, -1, -1, 12, 13, 14, 77, 78, + 79, 80, 444, 82, 3, 4, 5, 6, 7, 451, + 1, 28, 3, 4, 31, 6, 7, 8, 9, -1, + 11, 12, 13, 14, 4, 5, 6, 7, 470, -1, + 77, 473, 12, 13, 14, -1, -1, 28, 29, -1, + 31, -1, 33, 34, -1, -1, -1, 489, 28, 40, + 492, -1, 43, -1, -1, -1, -1, 48, 49, 50, + -1, -1, -1, 54, 55, -1, -1, 1, 59, 3, + 4, 5, 6, 7, 516, -1, 10, -1, 12, 13, + 14, 54, 55, -1, 57, 58, 59, 60, 79, 80, + -1, 82, -1, -1, 28, -1, 30, -1, 540, -1, + -1, 543, -1, 76, 1, -1, 3, 4, 5, 6, + 7, 8, 9, -1, 11, 12, 13, 14, 15, -1, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 577, 33, 34, 580, -1, + -1, 27, 76, 40, 30, -1, 43, -1, 590, -1, + 36, 48, 49, 50, -1, -1, -1, 54, 55, -1, + -1, -1, 59, -1, -1, -1, 608, 48, 49, 50, + 51, 52, -1, 59, 60, -1, -1, -1, -1, -1, + 77, -1, 79, 80, -1, 82, 1, -1, 3, 4, + -1, 77, -1, 8, 9, 81, 11, -1, 640, -1, + 15, -1, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, -1, 29, -1, 31, -1, 33, 34, + -1, 4, 5, 6, 7, 40, -1, 10, 43, 12, + 13, 14, -1, 48, 49, 50, -1, -1, -1, 54, + 55, -1, -1, -1, 59, 28, -1, 30, -1, -1, + -1, 4, 5, 6, 7, -1, -1, -1, -1, 12, + 13, 14, 77, -1, 79, 80, 1, 82, 3, 4, + -1, -1, -1, 8, 9, 28, 11, 30, -1, -1, + 15, -1, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, -1, 29, -1, 31, -1, 33, 34, + -1, -1, 5, 6, 7, 40, -1, -1, 43, 12, + 13, 14, -1, 48, 49, 50, -1, -1, -1, 54, + 55, -1, -1, 1, 59, 3, 4, 30, -1, -1, + 8, 9, -1, 11, 45, 46, 47, 48, 49, 50, + 51, 52, 77, -1, 79, 80, -1, 82, -1, -1, + -1, 29, -1, 31, -1, 33, 34, -1, -1, -1, + -1, -1, 40, -1, -1, 43, -1, -1, -1, -1, + 48, 49, 50, -1, -1, -1, 54, 55, -1, -1, + 58, 59, 60, 1, -1, 3, 4, -1, -1, -1, + 8, 9, -1, 11, -1, -1, -1, -1, -1, -1, + 78, 79, 80, -1, 82, -1, -1, -1, -1, -1, + -1, 29, -1, 31, -1, 33, 34, -1, -1, -1, + -1, -1, 40, -1, -1, 43, -1, -1, -1, -1, + 48, 49, 50, -1, -1, -1, 54, 55, -1, -1, + 58, 59, 60, 1, -1, 3, 4, -1, -1, -1, + 8, 9, -1, 11, -1, -1, -1, -1, -1, -1, + 78, 79, 80, -1, 82, -1, -1, -1, -1, -1, + -1, 29, -1, 31, -1, 33, 34, -1, -1, -1, + -1, -1, 40, -1, -1, 43, -1, -1, -1, -1, + 48, 49, 50, -1, -1, -1, 54, 55, -1, -1, + 58, 59, 60, 1, -1, 3, -1, -1, -1, -1, + 8, 9, -1, 11, 1, -1, -1, 4, 5, 6, + 7, 79, 80, -1, 82, 12, 13, 14, -1, -1, + -1, 29, -1, 31, -1, 33, 34, -1, -1, -1, + 27, 28, 40, 30, -1, 43, -1, -1, -1, 36, + 48, 49, 50, -1, -1, -1, 54, 55, -1, -1, + -1, 59, 46, 47, 48, 49, 50, 51, 52, -1, + 3, -1, 59, 60, -1, 8, 9, -1, 11, -1, + -1, 79, 80, 3, 82, -1, -1, -1, 8, 9, + 77, 11, -1, -1, 81, 82, 29, -1, 31, -1, + 33, 34, -1, -1, -1, -1, -1, 40, -1, 29, + 43, 31, -1, 33, 34, 48, 49, 50, -1, -1, + 40, 54, 55, 43, -1, -1, 59, -1, 48, 49, + 50, -1, -1, -1, 54, 55, 3, -1, -1, 59, + -1, 8, 9, -1, 11, -1, 79, 80, -1, 3, + 83, -1, -1, -1, 8, 9, -1, 11, -1, 79, + 80, -1, 29, 83, 31, -1, 33, 34, -1, -1, + -1, -1, -1, 40, -1, 29, 43, 31, -1, 33, + 34, 48, 49, 50, -1, -1, 40, 54, 55, 43, + -1, -1, 59, -1, 48, 49, 50, -1, -1, -1, + 54, 55, 3, -1, -1, 59, -1, 8, 9, -1, + 11, -1, 79, 80, -1, -1, 83, -1, -1, -1, + -1, -1, -1, -1, -1, 79, 80, -1, 29, 83, + 31, -1, 33, 34, 10, -1, -1, -1, -1, 40, + -1, -1, 43, -1, -1, -1, -1, 48, 49, 50, + -1, -1, -1, 54, 55, -1, -1, -1, 59, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, -1, 79, 80, + -1, -1, 83, 3, 4, 5, 6, 7, 8, 9, + -1, 11, 12, 13, 14, 15, -1, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, -1, 33, 34, -1, -1, -1, -1, -1, + 40, -1, -1, 43, -1, -1, -1, -1, 48, 49, + 50, 30, -1, -1, 54, 55, 35, 36, 37, 59, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, -1, -1, -1, 77, -1, 79, + 80, -1, 82, 3, 4, -1, -1, -1, 8, 9, + -1, 11, -1, -1, -1, 15, -1, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, -1, 29, + -1, 31, -1, 33, 34, -1, -1, -1, -1, -1, + 40, -1, -1, 43, -1, -1, -1, -1, 48, 49, + 50, -1, -1, -1, 54, 55, -1, 3, -1, 59, + -1, -1, 8, 9, -1, 11, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 77, -1, 79, + 80, -1, 82, 29, -1, 31, -1, 33, 34, -1, + -1, -1, -1, -1, 40, -1, -1, 43, -1, -1, + -1, -1, 48, 49, 50, -1, -1, -1, 54, 55, + -1, -1, -1, 59, 3, 4, 5, 6, 7, 8, + 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, + -1, -1, -1, 79, 80, -1, 82, -1, -1, 28, + 29, 30, 31, -1, 33, 34, -1, -1, -1, -1, + -1, 40, -1, -1, 43, -1, -1, -1, -1, 48, + 49, 50, -1, -1, -1, 54, 55, -1, 3, 4, + 59, 6, 7, 8, 9, -1, 11, 12, 13, 14, + -1, 3, -1, -1, -1, -1, 8, 9, -1, 11, + 79, 80, -1, 28, 29, -1, 31, -1, 33, 34, + -1, -1, -1, -1, -1, 40, -1, 29, 43, 31, + -1, 33, 34, 48, 49, 50, -1, -1, 40, 54, + 55, 43, -1, -1, 59, -1, 48, 49, 50, -1, + -1, -1, 54, 55, 3, -1, -1, 59, -1, 8, + 9, -1, 11, -1, 79, 80, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 77, -1, 79, 80, -1, + 29, 3, 31, -1, 33, 34, 8, 9, -1, 11, + -1, 40, -1, -1, 43, -1, -1, -1, -1, 48, + 49, 50, -1, -1, -1, 54, 55, 29, 3, 31, + 59, 33, 34, 8, 9, -1, 11, -1, 40, -1, + -1, 43, -1, -1, -1, -1, 48, 49, 50, -1, + 79, 80, 54, 55, 29, 3, 31, 59, 33, 34, + 8, 9, -1, 11, -1, 40, -1, -1, 43, -1, + -1, -1, -1, 48, 49, 50, -1, 79, 80, 54, + 55, 29, -1, 31, 59, 33, 34, -1, -1, -1, + -1, -1, 40, -1, -1, 43, -1, -1, -1, -1, + 48, 49, 50, -1, 79, 80, 54, 55, -1, -1, + 1, 59, 3, 4, 5, 6, 7, -1, -1, -1, + -1, 12, 13, 14, -1, -1, -1, -1, -1, -1, + -1, 79, 80, -1, -1, -1, 27, 28, -1, 30, + 31, 37, -1, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, -1, 10, 50, + -1, -1, -1, -1, -1, 35, 36, 37, 59, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 35, 36, 37, 77, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 35, 36, 37, 83, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, -1, -1, + -1, 83, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52 +}; +/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ +#line 3 "/usr/share/bison.simple" + +/* Skeleton output parser for bison, + Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +#ifndef alloca +#ifdef __GNUC__ +#define alloca __builtin_alloca +#else /* not GNU C. */ +#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) +#include <alloca.h> +#else /* not sparc */ +#if defined (MSDOS) && !defined (__TURBOC__) +#include <malloc.h> +#else /* not MSDOS, or __TURBOC__ */ +#if defined(_AIX) +#include <malloc.h> + #pragma alloca +#else /* not MSDOS, __TURBOC__, or _AIX */ +#ifdef __hpux +#ifdef __cplusplus +extern "C" { +void *alloca (unsigned int); +}; +#else /* not __cplusplus */ +void *alloca (); +#endif /* not __cplusplus */ +#endif /* __hpux */ +#endif /* not _AIX */ +#endif /* not MSDOS, or __TURBOC__ */ +#endif /* not sparc. */ +#endif /* not GNU C. */ +#endif /* alloca not defined. */ + +/* This is the parser code that is written into each bison parser + when the %semantic_parser declaration is not specified in the grammar. + It was written by Richard Stallman by simplifying the hairy parser + used when %semantic_parser is specified. */ + +/* Note: there must be only one dollar sign in this file. + It is replaced by the list of actions, each action + as one case of the switch. */ + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY -2 +#define YYEOF 0 +#define YYACCEPT return(0) +#define YYABORT return(1) +#define YYERROR goto yyerrlab1 +/* Like YYERROR except do call yyerror. + This remains here temporarily to ease the + transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ +#define YYFAIL goto yyerrlab +#define YYRECOVERING() (!!yyerrstatus) +#define YYBACKUP(token, value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { yychar = (token), yylval = (value); \ + yychar1 = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { yyerror ("syntax error: cannot back up"); YYERROR; } \ +while (0) + +#define YYTERROR 1 +#define YYERRCODE 256 + +#ifndef YYPURE +#define YYLEX yylex() +#endif + +#ifdef YYPURE +#ifdef YYLSP_NEEDED +#ifdef YYLEX_PARAM +#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +#else +#define YYLEX yylex(&yylval, &yylloc) +#endif +#else /* not YYLSP_NEEDED */ +#ifdef YYLEX_PARAM +#define YYLEX yylex(&yylval, YYLEX_PARAM) +#else +#define YYLEX yylex(&yylval) +#endif +#endif /* not YYLSP_NEEDED */ +#endif + +/* If nonreentrant, generate the variables here */ + +#ifndef YYPURE + +int yychar; /* the lookahead symbol */ +YYSTYPE yylval; /* the semantic value of the */ + /* lookahead symbol */ + +#ifdef YYLSP_NEEDED +YYLTYPE yylloc; /* location data for the lookahead */ + /* symbol */ +#endif + +int yynerrs; /* number of parse errors so far */ +#endif /* not YYPURE */ + +#if YYDEBUG != 0 +int yydebug; /* nonzero means print parse trace */ +/* Since this is uninitialized, it does not stop multiple parsers + from coexisting. */ +#endif + +/* YYINITDEPTH indicates the initial size of the parser's stacks */ + +#ifndef YYINITDEPTH +#define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH is the maximum size the stacks can grow to + (effective only if the built-in stack extension method is used). */ + +#if YYMAXDEPTH == 0 +#undef YYMAXDEPTH +#endif + +#ifndef YYMAXDEPTH +#define YYMAXDEPTH 10000 +#endif + +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +int yyparse (void); +#endif + +#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) +#else /* not GNU C or C++ */ +#ifndef __cplusplus + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__yy_memcpy (from, to, count) + char *from; + char *to; + int count; +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#else /* __cplusplus */ + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__yy_memcpy (char *from, char *to, int count) +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#endif +#endif + +#line 192 "/usr/share/bison.simple" + +/* The user can define YYPARSE_PARAM as the name of an argument to be passed + into yyparse. The argument should have type void *. + It should actually point to an object. + Grammar actions can access the variable by casting it + to the proper pointer type. */ + +#ifdef YYPARSE_PARAM +#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +#else +#define YYPARSE_PARAM +#define YYPARSE_PARAM_DECL +#endif + +int +yyparse(YYPARSE_PARAM) + YYPARSE_PARAM_DECL +{ + register int yystate; + register int yyn; + register short *yyssp; + register YYSTYPE *yyvsp; + int yyerrstatus; /* number of tokens to shift before error messages enabled */ + int yychar1 = 0; /* lookahead token as an internal (translated) token number */ + + short yyssa[YYINITDEPTH]; /* the state stack */ + YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ + + short *yyss = yyssa; /* refer to the stacks thru separate pointers */ + YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ + +#ifdef YYLSP_NEEDED + YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + +#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +#else +#define YYPOPSTACK (yyvsp--, yyssp--) +#endif + + int yystacksize = YYINITDEPTH; + +#ifdef YYPURE + int yychar; + YYSTYPE yylval; + int yynerrs; +#ifdef YYLSP_NEEDED + YYLTYPE yylloc; +#endif +#endif + + YYSTYPE yyval; /* the variable used to return */ + /* semantic values from the action */ + /* routines */ + + int yylen; + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Starting parse\n"); +#endif + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss - 1; + yyvsp = yyvs; +#ifdef YYLSP_NEEDED + yylsp = yyls; +#endif + +/* Push a new state, which is found in yystate . */ +/* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. */ +yynewstate: + + *++yyssp = yystate; + + if (yyssp >= yyss + yystacksize - 1) + { + /* Give user a chance to reallocate the stack */ + /* Use copies of these so that the &'s don't force the real ones into memory. */ + YYSTYPE *yyvs1 = yyvs; + short *yyss1 = yyss; +#ifdef YYLSP_NEEDED + YYLTYPE *yyls1 = yyls; +#endif + + /* Get the current used size of the three stacks, in elements. */ + int size = yyssp - yyss + 1; + +#ifdef yyoverflow + /* Each stack pointer address is followed by the size of + the data in use in that stack, in bytes. */ +#ifdef YYLSP_NEEDED + /* This used to be a conditional around just the two extra args, + but that might be undefined if yyoverflow is a macro. */ + yyoverflow("parser stack overflow", + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yyls1, size * sizeof (*yylsp), + &yystacksize); +#else + yyoverflow("parser stack overflow", + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yystacksize); +#endif + + yyss = yyss1; yyvs = yyvs1; +#ifdef YYLSP_NEEDED + yyls = yyls1; +#endif +#else /* no yyoverflow */ + /* Extend the stack our own way. */ + if (yystacksize >= YYMAXDEPTH) + { + yyerror("parser stack overflow"); + return 2; + } + yystacksize *= 2; + if (yystacksize > YYMAXDEPTH) + yystacksize = YYMAXDEPTH; + yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); + __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); + yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); + __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); +#ifdef YYLSP_NEEDED + yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); + __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); +#endif +#endif /* no yyoverflow */ + + yyssp = yyss + size - 1; + yyvsp = yyvs + size - 1; +#ifdef YYLSP_NEEDED + yylsp = yyls + size - 1; +#endif + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Stack size increased to %d\n", yystacksize); +#endif + + if (yyssp >= yyss + yystacksize - 1) + YYABORT; + } + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Entering state %d\n", yystate); +#endif + + goto yybackup; + yybackup: + +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to lookahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYFLAG) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* yychar is either YYEMPTY or YYEOF + or a valid token in external form. */ + + if (yychar == YYEMPTY) + { +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Reading a token: "); +#endif + yychar = YYLEX; + } + + /* Convert token to internal form (in yychar1) for indexing tables with */ + + if (yychar <= 0) /* This means end of input. */ + { + yychar1 = 0; + yychar = YYEOF; /* Don't call YYLEX any more */ + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Now at end of input.\n"); +#endif + } + else + { + yychar1 = YYTRANSLATE(yychar); + +#if YYDEBUG != 0 + if (yydebug) + { + fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); + /* Give the individual parser a way to print the precise meaning + of a token, for further debugging info. */ +#ifdef YYPRINT + YYPRINT (stderr, yychar, yylval); +#endif + fprintf (stderr, ")\n"); + } +#endif + } + + yyn += yychar1; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) + goto yydefault; + + yyn = yytable[yyn]; + + /* yyn is what to do for this token type in this state. + Negative => reduce, -yyn is rule number. + Positive => shift, yyn is new state. + New state is final state => don't bother to shift, + just return success. + 0, or most negative number => error. */ + + if (yyn < 0) + { + if (yyn == YYFLAG) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + else if (yyn == 0) + goto yyerrlab; + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the lookahead token. */ + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); +#endif + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif + + /* count tokens shifted since error; after three, turn off error status. */ + if (yyerrstatus) yyerrstatus--; + + yystate = yyn; + goto yynewstate; + +/* Do the default action for the current state. */ +yydefault: + + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + +/* Do a reduction. yyn is the number of a rule to reduce with. */ +yyreduce: + yylen = yyr2[yyn]; + if (yylen > 0) + yyval = yyvsp[1-yylen]; /* implement default value of the action */ + +#if YYDEBUG != 0 + if (yydebug) + { + int i; + + fprintf (stderr, "Reducing via rule %d (line %d), ", + yyn, yyrline[yyn]); + + /* Print the symbols being reduced, and their result. */ + for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) + fprintf (stderr, "%s ", yytname[yyrhs[i]]); + fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); + } +#endif + + + switch (yyn) { + +case 1: +#line 240 "c-parse.y" +{ if (pedantic) + pedwarn ("ANSI C forbids an empty source file"); + finish_file (); + ; + break;} +case 2: +#line 245 "c-parse.y" +{ + /* In case there were missing closebraces, + get us back to the global binding level. */ + while (! global_bindings_p ()) + poplevel (0, 0, 0); + finish_file (); + ; + break;} +case 3: +#line 259 "c-parse.y" +{yyval.ttype = NULL_TREE; ; + break;} +case 5: +#line 260 "c-parse.y" +{yyval.ttype = NULL_TREE; ; + break;} +case 9: +#line 267 "c-parse.y" +{ STRIP_NOPS (yyvsp[-2].ttype); + if ((TREE_CODE (yyvsp[-2].ttype) == ADDR_EXPR + && TREE_CODE (TREE_OPERAND (yyvsp[-2].ttype, 0)) == STRING_CST) + || TREE_CODE (yyvsp[-2].ttype) == STRING_CST) + assemble_asm (yyvsp[-2].ttype); + else + error ("argument of `asm' is not a constant string"); ; + break;} +case 10: +#line 275 "c-parse.y" +{ pedantic = yyvsp[-1].itype; ; + break;} +case 11: +#line 280 "c-parse.y" +{ if (pedantic) + error ("ANSI C forbids data definition with no type or storage class"); + else if (!flag_traditional) + warning ("data definition has no type or storage class"); + + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 12: +#line 290 "c-parse.y" +{ current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 13: +#line 295 "c-parse.y" +{ current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 14: +#line 300 "c-parse.y" +{ pedwarn ("empty declaration"); ; + break;} +case 15: +#line 302 "c-parse.y" +{ shadow_tag (yyvsp[-1].ttype); ; + break;} +case 18: +#line 306 "c-parse.y" +{ if (pedantic) + pedwarn ("ANSI C does not allow extra `;' outside of a function"); ; + break;} +case 19: +#line 312 "c-parse.y" +{ if (! start_function (current_declspecs, yyvsp[0].ttype, + prefix_attributes, NULL_TREE, 0)) + YYERROR1; + reinit_parse_for_function (); ; + break;} +case 20: +#line 317 "c-parse.y" +{ store_parm_decls (); ; + break;} +case 21: +#line 319 "c-parse.y" +{ finish_function (0); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-5].itype); ; + break;} +case 22: +#line 325 "c-parse.y" +{ current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 23: +#line 330 "c-parse.y" +{ if (! start_function (current_declspecs, yyvsp[0].ttype, + prefix_attributes, NULL_TREE, 0)) + YYERROR1; + reinit_parse_for_function (); ; + break;} +case 24: +#line 335 "c-parse.y" +{ store_parm_decls (); ; + break;} +case 25: +#line 337 "c-parse.y" +{ finish_function (0); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-5].itype); ; + break;} +case 26: +#line 343 "c-parse.y" +{ current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 27: +#line 348 "c-parse.y" +{ if (! start_function (NULL_TREE, yyvsp[0].ttype, + prefix_attributes, NULL_TREE, 0)) + YYERROR1; + reinit_parse_for_function (); ; + break;} +case 28: +#line 353 "c-parse.y" +{ store_parm_decls (); ; + break;} +case 29: +#line 355 "c-parse.y" +{ finish_function (0); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-5].itype); ; + break;} +case 30: +#line 361 "c-parse.y" +{ current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 33: +#line 373 "c-parse.y" +{ yyval.code = ADDR_EXPR; ; + break;} +case 34: +#line 375 "c-parse.y" +{ yyval.code = NEGATE_EXPR; ; + break;} +case 35: +#line 377 "c-parse.y" +{ yyval.code = CONVERT_EXPR; ; + break;} +case 36: +#line 379 "c-parse.y" +{ yyval.code = PREINCREMENT_EXPR; ; + break;} +case 37: +#line 381 "c-parse.y" +{ yyval.code = PREDECREMENT_EXPR; ; + break;} +case 38: +#line 383 "c-parse.y" +{ yyval.code = BIT_NOT_EXPR; ; + break;} +case 39: +#line 385 "c-parse.y" +{ yyval.code = TRUTH_NOT_EXPR; ; + break;} +case 40: +#line 389 "c-parse.y" +{ yyval.ttype = build_compound_expr (yyvsp[0].ttype); ; + break;} +case 41: +#line 394 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 43: +#line 400 "c-parse.y" +{ yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; + break;} +case 44: +#line 402 "c-parse.y" +{ chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; + break;} +case 46: +#line 408 "c-parse.y" +{ yyval.ttype = build_indirect_ref (yyvsp[0].ttype, "unary *"); ; + break;} +case 47: +#line 411 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; + pedantic = yyvsp[-1].itype; ; + break;} +case 48: +#line 414 "c-parse.y" +{ yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); + overflow_warning (yyval.ttype); ; + break;} +case 49: +#line 418 "c-parse.y" +{ tree label = lookup_label (yyvsp[0].ttype); + if (pedantic) + pedwarn ("ANSI C forbids `&&'"); + if (label == 0) + yyval.ttype = null_pointer_node; + else + { + TREE_USED (label) = 1; + yyval.ttype = build1 (ADDR_EXPR, ptr_type_node, label); + TREE_CONSTANT (yyval.ttype) = 1; + } + ; + break;} +case 50: +#line 446 "c-parse.y" +{ skip_evaluation--; + if (TREE_CODE (yyvsp[0].ttype) == COMPONENT_REF + && DECL_C_BIT_FIELD (TREE_OPERAND (yyvsp[0].ttype, 1))) + error ("`sizeof' applied to a bit-field"); + yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ; + break;} +case 51: +#line 452 "c-parse.y" +{ skip_evaluation--; + yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ttype)); ; + break;} +case 52: +#line 455 "c-parse.y" +{ skip_evaluation--; + yyval.ttype = c_alignof_expr (yyvsp[0].ttype); ; + break;} +case 53: +#line 458 "c-parse.y" +{ skip_evaluation--; + yyval.ttype = c_alignof (groktypename (yyvsp[-1].ttype)); ; + break;} +case 54: +#line 461 "c-parse.y" +{ yyval.ttype = build_unary_op (REALPART_EXPR, yyvsp[0].ttype, 0); ; + break;} +case 55: +#line 463 "c-parse.y" +{ yyval.ttype = build_unary_op (IMAGPART_EXPR, yyvsp[0].ttype, 0); ; + break;} +case 56: +#line 467 "c-parse.y" +{ skip_evaluation++; ; + break;} +case 57: +#line 471 "c-parse.y" +{ skip_evaluation++; ; + break;} +case 59: +#line 477 "c-parse.y" +{ tree type = groktypename (yyvsp[-2].ttype); + yyval.ttype = build_c_cast (type, yyvsp[0].ttype); ; + break;} +case 60: +#line 480 "c-parse.y" +{ start_init (NULL_TREE, NULL, 0); + yyvsp[-2].ttype = groktypename (yyvsp[-2].ttype); + really_start_incremental_init (yyvsp[-2].ttype); ; + break;} +case 61: +#line 484 "c-parse.y" +{ char *name; + tree result = pop_init_level (0); + tree type = yyvsp[-5].ttype; + finish_init (); + + if (pedantic) + pedwarn ("ANSI C forbids constructor expressions"); + if (TYPE_NAME (type) != 0) + { + if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) + name = IDENTIFIER_POINTER (TYPE_NAME (type)); + else + name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); + } + else + name = ""; + yyval.ttype = result; + if (TREE_CODE (type) == ARRAY_TYPE && TYPE_SIZE (type) == 0) + { + int failure = complete_array_type (type, yyval.ttype, 1); + if (failure) + abort (); + } + ; + break;} +case 63: +#line 513 "c-parse.y" +{ yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 64: +#line 515 "c-parse.y" +{ yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 65: +#line 517 "c-parse.y" +{ yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 66: +#line 519 "c-parse.y" +{ yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 67: +#line 521 "c-parse.y" +{ yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 68: +#line 523 "c-parse.y" +{ yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 69: +#line 525 "c-parse.y" +{ yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 70: +#line 527 "c-parse.y" +{ yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 71: +#line 529 "c-parse.y" +{ yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 72: +#line 531 "c-parse.y" +{ yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 73: +#line 533 "c-parse.y" +{ yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 74: +#line 535 "c-parse.y" +{ yyval.ttype = parser_build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 75: +#line 537 "c-parse.y" +{ yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); + skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; + break;} +case 76: +#line 540 "c-parse.y" +{ skip_evaluation -= yyvsp[-3].ttype == boolean_false_node; + yyval.ttype = parser_build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ; + break;} +case 77: +#line 543 "c-parse.y" +{ yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); + skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; + break;} +case 78: +#line 546 "c-parse.y" +{ skip_evaluation -= yyvsp[-3].ttype == boolean_true_node; + yyval.ttype = parser_build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-3].ttype, yyvsp[0].ttype); ; + break;} +case 79: +#line 549 "c-parse.y" +{ yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[-1].ttype)); + skip_evaluation += yyvsp[-1].ttype == boolean_false_node; ; + break;} +case 80: +#line 552 "c-parse.y" +{ skip_evaluation += ((yyvsp[-4].ttype == boolean_true_node) + - (yyvsp[-4].ttype == boolean_false_node)); ; + break;} +case 81: +#line 555 "c-parse.y" +{ skip_evaluation -= yyvsp[-6].ttype == boolean_true_node; + yyval.ttype = build_conditional_expr (yyvsp[-6].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ; + break;} +case 82: +#line 558 "c-parse.y" +{ if (pedantic) + pedwarn ("ANSI C forbids omitting the middle term of a ?: expression"); + /* Make sure first operand is calculated only once. */ + yyvsp[0].ttype = save_expr (yyvsp[-1].ttype); + yyvsp[-1].ttype = truthvalue_conversion (default_conversion (yyvsp[0].ttype)); + skip_evaluation += yyvsp[-1].ttype == boolean_true_node; ; + break;} +case 83: +#line 565 "c-parse.y" +{ skip_evaluation -= yyvsp[-4].ttype == boolean_true_node; + yyval.ttype = build_conditional_expr (yyvsp[-4].ttype, yyvsp[-3].ttype, yyvsp[0].ttype); ; + break;} +case 84: +#line 568 "c-parse.y" +{ yyval.ttype = build_modify_expr (yyvsp[-2].ttype, NOP_EXPR, yyvsp[0].ttype); + C_SET_EXP_ORIGINAL_CODE (yyval.ttype, MODIFY_EXPR); ; + break;} +case 85: +#line 571 "c-parse.y" +{ yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); + /* This inhibits warnings in truthvalue_conversion. */ + C_SET_EXP_ORIGINAL_CODE (yyval.ttype, ERROR_MARK); ; + break;} +case 86: +#line 578 "c-parse.y" +{ + yyval.ttype = lastiddecl; + if (!yyval.ttype || yyval.ttype == error_mark_node) + { + if (yychar == YYEMPTY) + yychar = YYLEX; + if (yychar == '(') + { + { + /* Ordinary implicit function declaration. */ + yyval.ttype = implicitly_declare (yyvsp[0].ttype); + assemble_external (yyval.ttype); + TREE_USED (yyval.ttype) = 1; + } + } + else if (current_function_decl == 0) + { + error ("`%s' undeclared here (not in a function)", + IDENTIFIER_POINTER (yyvsp[0].ttype)); + yyval.ttype = error_mark_node; + } + else + { + { + if (IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype) != error_mark_node + || IDENTIFIER_ERROR_LOCUS (yyvsp[0].ttype) != current_function_decl) + { + error ("`%s' undeclared (first use this function)", + IDENTIFIER_POINTER (yyvsp[0].ttype)); + + if (! undeclared_variable_notice) + { + error ("(Each undeclared identifier is reported only once"); + error ("for each function it appears in.)"); + undeclared_variable_notice = 1; + } + } + yyval.ttype = error_mark_node; + /* Prevent repeated error messages. */ + IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype) = error_mark_node; + IDENTIFIER_ERROR_LOCUS (yyvsp[0].ttype) = current_function_decl; + } + } + } + else if (TREE_TYPE (yyval.ttype) == error_mark_node) + yyval.ttype = error_mark_node; + else if (C_DECL_ANTICIPATED (yyval.ttype)) + { + /* The first time we see a build-in function used, + if it has not been declared. */ + C_DECL_ANTICIPATED (yyval.ttype) = 0; + if (yychar == YYEMPTY) + yychar = YYLEX; + if (yychar == '(') + { + /* Omit the implicit declaration we + would ordinarily do, so we don't lose + the actual built in type. + But print a diagnostic for the mismatch. */ + if (TREE_CODE (yyval.ttype) != FUNCTION_DECL) + error ("`%s' implicitly declared as function", + IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); + else if ((TYPE_MODE (TREE_TYPE (TREE_TYPE (yyval.ttype))) + != TYPE_MODE (integer_type_node)) + && (TREE_TYPE (TREE_TYPE (yyval.ttype)) + != void_type_node)) + pedwarn ("type mismatch in implicit declaration for built-in function `%s'", + IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); + /* If it really returns void, change that to int. */ + if (TREE_TYPE (TREE_TYPE (yyval.ttype)) == void_type_node) + TREE_TYPE (yyval.ttype) + = build_function_type (integer_type_node, + TYPE_ARG_TYPES (TREE_TYPE (yyval.ttype))); + } + else + pedwarn ("built-in function `%s' used without declaration", + IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); + + /* Do what we would ordinarily do when a fn is used. */ + assemble_external (yyval.ttype); + TREE_USED (yyval.ttype) = 1; + } + else + { + assemble_external (yyval.ttype); + TREE_USED (yyval.ttype) = 1; + } + + if (TREE_CODE (yyval.ttype) == CONST_DECL) + { + yyval.ttype = DECL_INITIAL (yyval.ttype); + /* This is to prevent an enum whose value is 0 + from being considered a null pointer constant. */ + yyval.ttype = build1 (NOP_EXPR, TREE_TYPE (yyval.ttype), yyval.ttype); + TREE_CONSTANT (yyval.ttype) = 1; + } + ; + break;} +case 88: +#line 677 "c-parse.y" +{ yyval.ttype = combine_strings (yyvsp[0].ttype); ; + break;} +case 89: +#line 679 "c-parse.y" +{ char class = TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)); + if (class == 'e' || class == '1' + || class == '2' || class == '<') + C_SET_EXP_ORIGINAL_CODE (yyvsp[-1].ttype, ERROR_MARK); + yyval.ttype = yyvsp[-1].ttype; ; + break;} +case 90: +#line 685 "c-parse.y" +{ yyval.ttype = error_mark_node; ; + break;} +case 91: +#line 687 "c-parse.y" +{ if (current_function_decl == 0) + { + error ("braced-group within expression allowed only inside a function"); + YYERROR; + } + /* We must force a BLOCK for this level + so that, if it is not expanded later, + there is a way to turn off the entire subtree of blocks + that are contained in it. */ + keep_next_level (); + push_iterator_stack (); + push_label_level (); + yyval.ttype = expand_start_stmt_expr (); ; + break;} +case 92: +#line 701 "c-parse.y" +{ tree rtl_exp; + if (pedantic) + pedwarn ("ANSI C forbids braced-groups within expressions"); + pop_iterator_stack (); + pop_label_level (); + rtl_exp = expand_end_stmt_expr (yyvsp[-2].ttype); + /* The statements have side effects, so the group does. */ + TREE_SIDE_EFFECTS (rtl_exp) = 1; + + if (TREE_CODE (yyvsp[-1].ttype) == BLOCK) + { + /* Make a BIND_EXPR for the BLOCK already made. */ + yyval.ttype = build (BIND_EXPR, TREE_TYPE (rtl_exp), + NULL_TREE, rtl_exp, yyvsp[-1].ttype); + /* Remove the block from the tree at this point. + It gets put back at the proper place + when the BIND_EXPR is expanded. */ + delete_block (yyvsp[-1].ttype); + } + else + yyval.ttype = yyvsp[-1].ttype; + ; + break;} +case 93: +#line 724 "c-parse.y" +{ yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ; + break;} +case 94: +#line 726 "c-parse.y" +{ yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ; + break;} +case 95: +#line 728 "c-parse.y" +{ + yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); + ; + break;} +case 96: +#line 732 "c-parse.y" +{ + tree expr = build_indirect_ref (yyvsp[-2].ttype, "->"); + + yyval.ttype = build_component_ref (expr, yyvsp[0].ttype); + ; + break;} +case 97: +#line 738 "c-parse.y" +{ yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ; + break;} +case 98: +#line 740 "c-parse.y" +{ yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ; + break;} +case 100: +#line 747 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; + break;} +case 103: +#line 756 "c-parse.y" +{ c_mark_varargs (); + if (pedantic) + pedwarn ("ANSI C does not permit use of `varargs.h'"); ; + break;} +case 104: +#line 766 "c-parse.y" +{ ; + break;} +case 109: +#line 782 "c-parse.y" +{ current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 110: +#line 787 "c-parse.y" +{ current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 111: +#line 792 "c-parse.y" +{ shadow_tag_warned (yyvsp[-1].ttype, 1); + pedwarn ("empty declaration"); ; + break;} +case 112: +#line 795 "c-parse.y" +{ pedwarn ("empty declaration"); ; + break;} +case 113: +#line 804 "c-parse.y" +{ ; + break;} +case 118: +#line 819 "c-parse.y" +{ yyval.itype = suspend_momentary (); + pending_xref_error (); + declspec_stack = tree_cons (prefix_attributes, + current_declspecs, + declspec_stack); + split_specs_attrs (yyvsp[0].ttype, + ¤t_declspecs, &prefix_attributes); ; + break;} +case 119: +#line 830 "c-parse.y" +{ prefix_attributes = chainon (prefix_attributes, yyvsp[0].ttype); ; + break;} +case 120: +#line 835 "c-parse.y" +{ current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 121: +#line 840 "c-parse.y" +{ current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 122: +#line 845 "c-parse.y" +{ current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-1].itype); ; + break;} +case 123: +#line 850 "c-parse.y" +{ current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-1].itype); ; + break;} +case 124: +#line 855 "c-parse.y" +{ shadow_tag (yyvsp[-1].ttype); ; + break;} +case 125: +#line 857 "c-parse.y" +{ pedwarn ("empty declaration"); ; + break;} +case 126: +#line 859 "c-parse.y" +{ pedantic = yyvsp[-1].itype; ; + break;} +case 127: +#line 869 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; + break;} +case 128: +#line 871 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; + break;} +case 129: +#line 875 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 130: +#line 877 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; + break;} +case 131: +#line 879 "c-parse.y" +{ if (extra_warnings) + warning ("`%s' is not at beginning of declaration", + IDENTIFIER_POINTER (yyvsp[0].ttype)); + yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; + break;} +case 132: +#line 884 "c-parse.y" +{ yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; + break;} +case 133: +#line 889 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; + break;} +case 134: +#line 891 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; + break;} +case 135: +#line 896 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 136: +#line 898 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; + break;} +case 137: +#line 900 "c-parse.y" +{ if (extra_warnings) + warning ("`%s' is not at beginning of declaration", + IDENTIFIER_POINTER (yyvsp[0].ttype)); + yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; + break;} +case 138: +#line 913 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; ; + break;} +case 139: +#line 915 "c-parse.y" +{ yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ; + break;} +case 140: +#line 917 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-1].ttype); ; + break;} +case 141: +#line 919 "c-parse.y" +{ yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; + break;} +case 142: +#line 924 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); + TREE_STATIC (yyval.ttype) = 1; ; + break;} +case 143: +#line 927 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; + break;} +case 144: +#line 929 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); + TREE_STATIC (yyval.ttype) = 1; ; + break;} +case 145: +#line 932 "c-parse.y" +{ if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) + warning ("`%s' is not at beginning of declaration", + IDENTIFIER_POINTER (yyvsp[0].ttype)); + yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); + TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; + break;} +case 146: +#line 946 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; + break;} +case 147: +#line 948 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; + break;} +case 148: +#line 952 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 149: +#line 954 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; + break;} +case 152: +#line 964 "c-parse.y" +{ /* For a typedef name, record the meaning, not the name. + In case of `foo foo, bar;'. */ + yyval.ttype = lookup_name (yyvsp[0].ttype); ; + break;} +case 153: +#line 968 "c-parse.y" +{ yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ; + break;} +case 154: +#line 970 "c-parse.y" +{ yyval.ttype = groktypename (yyvsp[-1].ttype); ; + break;} +case 162: +#line 992 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 163: +#line 994 "c-parse.y" +{ if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); + yyval.ttype = yyvsp[-1].ttype; + ; + break;} +case 164: +#line 1001 "c-parse.y" +{ yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, + yyvsp[-1].ttype, prefix_attributes); + start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; + break;} +case 165: +#line 1006 "c-parse.y" +{ finish_init (); + finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; + break;} +case 166: +#line 1009 "c-parse.y" +{ tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, + yyvsp[0].ttype, prefix_attributes); + finish_decl (d, NULL_TREE, yyvsp[-1].ttype); + ; + break;} +case 167: +#line 1017 "c-parse.y" +{ yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, + yyvsp[-1].ttype, prefix_attributes); + start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; + break;} +case 168: +#line 1022 "c-parse.y" +{ finish_init (); + decl_attributes (yyvsp[-1].ttype, yyvsp[-3].ttype, prefix_attributes); + finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; + break;} +case 169: +#line 1026 "c-parse.y" +{ tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, + yyvsp[0].ttype, prefix_attributes); + finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; + break;} +case 170: +#line 1034 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 171: +#line 1036 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; ; + break;} +case 172: +#line 1041 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; ; + break;} +case 173: +#line 1043 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; + break;} +case 174: +#line 1048 "c-parse.y" +{ yyval.ttype = yyvsp[-2].ttype; ; + break;} +case 175: +#line 1053 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; ; + break;} +case 176: +#line 1055 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 177: +#line 1060 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 178: +#line 1062 "c-parse.y" +{ yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; + break;} +case 179: +#line 1064 "c-parse.y" +{ yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; + break;} +case 180: +#line 1066 "c-parse.y" +{ yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; + break;} +case 181: +#line 1068 "c-parse.y" +{ yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; + break;} +case 187: +#line 1086 "c-parse.y" +{ really_start_incremental_init (NULL_TREE); + /* Note that the call to clear_momentary + is in process_init_element. */ + push_momentary (); ; + break;} +case 188: +#line 1091 "c-parse.y" +{ yyval.ttype = pop_init_level (0); + if (yyval.ttype == error_mark_node + && ! (yychar == STRING || yychar == CONSTANT)) + pop_momentary (); + else + pop_momentary_nofree (); ; + break;} +case 189: +#line 1099 "c-parse.y" +{ yyval.ttype = error_mark_node; ; + break;} +case 190: +#line 1105 "c-parse.y" +{ if (pedantic) + pedwarn ("ANSI C forbids empty initializer braces"); ; + break;} +case 194: +#line 1119 "c-parse.y" +{ process_init_element (yyvsp[0].ttype); ; + break;} +case 195: +#line 1121 "c-parse.y" +{ push_init_level (0); ; + break;} +case 196: +#line 1123 "c-parse.y" +{ process_init_element (pop_init_level (0)); ; + break;} +case 198: +#line 1129 "c-parse.y" +{ set_init_index (yyvsp[-4].ttype, yyvsp[-2].ttype); ; + break;} +case 200: +#line 1132 "c-parse.y" +{ set_init_index (yyvsp[-2].ttype, NULL_TREE); ; + break;} +case 202: +#line 1135 "c-parse.y" +{ set_init_index (yyvsp[-1].ttype, NULL_TREE); ; + break;} +case 204: +#line 1138 "c-parse.y" +{ set_init_label (yyvsp[-1].ttype); ; + break;} +case 206: +#line 1141 "c-parse.y" +{ set_init_label (yyvsp[-1].ttype); ; + break;} +case 208: +#line 1147 "c-parse.y" +{ push_c_function_context (); + if (! start_function (current_declspecs, yyvsp[0].ttype, + prefix_attributes, NULL_TREE, 1)) + { + pop_c_function_context (); + YYERROR1; + } + reinit_parse_for_function (); ; + break;} +case 209: +#line 1156 "c-parse.y" +{ store_parm_decls (); ; + break;} +case 210: +#line 1164 "c-parse.y" +{ finish_function (1); + pop_c_function_context (); ; + break;} +case 211: +#line 1170 "c-parse.y" +{ push_c_function_context (); + if (! start_function (current_declspecs, yyvsp[0].ttype, + prefix_attributes, NULL_TREE, 1)) + { + pop_c_function_context (); + YYERROR1; + } + reinit_parse_for_function (); ; + break;} +case 212: +#line 1179 "c-parse.y" +{ store_parm_decls (); ; + break;} +case 213: +#line 1187 "c-parse.y" +{ finish_function (1); + pop_c_function_context (); ; + break;} +case 216: +#line 1203 "c-parse.y" +{ yyval.ttype = yyvsp[-1].ttype; ; + break;} +case 217: +#line 1205 "c-parse.y" +{ yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; + break;} +case 218: +#line 1210 "c-parse.y" +{ yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; + break;} +case 219: +#line 1212 "c-parse.y" +{ yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; + break;} +case 220: +#line 1214 "c-parse.y" +{ yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; + break;} +case 221: +#line 1221 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; ; + break;} +case 223: +#line 1232 "c-parse.y" +{ yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; + break;} +case 224: +#line 1237 "c-parse.y" +{ yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; + break;} +case 225: +#line 1239 "c-parse.y" +{ yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; + break;} +case 226: +#line 1241 "c-parse.y" +{ yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; + break;} +case 227: +#line 1248 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; ; + break;} +case 229: +#line 1257 "c-parse.y" +{ yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; + break;} +case 230: +#line 1262 "c-parse.y" +{ yyval.ttype = yyvsp[-1].ttype; ; + break;} +case 231: +#line 1264 "c-parse.y" +{ yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; + break;} +case 232: +#line 1266 "c-parse.y" +{ yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; + break;} +case 233: +#line 1268 "c-parse.y" +{ yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; + break;} +case 234: +#line 1275 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; ; + break;} +case 236: +#line 1281 "c-parse.y" +{ yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); + /* Start scope of tag before parsing components. */ + ; + break;} +case 237: +#line 1285 "c-parse.y" +{ yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 238: +#line 1287 "c-parse.y" +{ yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), + yyvsp[-2].ttype, yyvsp[0].ttype); + ; + break;} +case 239: +#line 1291 "c-parse.y" +{ yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; + break;} +case 240: +#line 1293 "c-parse.y" +{ yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; + break;} +case 241: +#line 1295 "c-parse.y" +{ yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 242: +#line 1297 "c-parse.y" +{ yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE), + yyvsp[-2].ttype, yyvsp[0].ttype); + ; + break;} +case 243: +#line 1301 "c-parse.y" +{ yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; + break;} +case 244: +#line 1303 "c-parse.y" +{ yyvsp[0].itype = suspend_momentary (); + yyval.ttype = start_enum (yyvsp[-1].ttype); ; + break;} +case 245: +#line 1306 "c-parse.y" +{ yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), yyvsp[0].ttype); + resume_momentary (yyvsp[-5].itype); ; + break;} +case 246: +#line 1309 "c-parse.y" +{ yyvsp[0].itype = suspend_momentary (); + yyval.ttype = start_enum (NULL_TREE); ; + break;} +case 247: +#line 1312 "c-parse.y" +{ yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), yyvsp[0].ttype); + resume_momentary (yyvsp[-5].itype); ; + break;} +case 248: +#line 1315 "c-parse.y" +{ yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); ; + break;} +case 252: +#line 1326 "c-parse.y" +{ if (pedantic) pedwarn ("comma at end of enumerator list"); ; + break;} +case 253: +#line 1331 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; ; + break;} +case 254: +#line 1333 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); + pedwarn ("no semicolon at end of struct or union"); ; + break;} +case 255: +#line 1338 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 256: +#line 1340 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; + break;} +case 257: +#line 1342 "c-parse.y" +{ if (pedantic) + pedwarn ("extra semicolon in struct or union specified"); ; + break;} +case 258: +#line 1357 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-1].itype); ; + break;} +case 259: +#line 1363 "c-parse.y" +{ if (pedantic) + pedwarn ("ANSI C forbids member declarations with no members"); + shadow_tag(yyvsp[0].ttype); + yyval.ttype = NULL_TREE; ; + break;} +case 260: +#line 1368 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-1].itype); ; + break;} +case 261: +#line 1374 "c-parse.y" +{ if (pedantic) + pedwarn ("ANSI C forbids member declarations with no members"); + shadow_tag(yyvsp[0].ttype); + yyval.ttype = NULL_TREE; ; + break;} +case 262: +#line 1379 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 263: +#line 1381 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; + pedantic = yyvsp[-1].itype; ; + break;} +case 265: +#line 1388 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 266: +#line 1393 "c-parse.y" +{ yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); + decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; + break;} +case 267: +#line 1397 "c-parse.y" +{ yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); + decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; + break;} +case 268: +#line 1400 "c-parse.y" +{ yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); + decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; + break;} +case 270: +#line 1412 "c-parse.y" +{ if (yyvsp[-2].ttype == error_mark_node) + yyval.ttype = yyvsp[-2].ttype; + else + yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-2].ttype); ; + break;} +case 271: +#line 1417 "c-parse.y" +{ yyval.ttype = error_mark_node; ; + break;} +case 272: +#line 1423 "c-parse.y" +{ yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; + break;} +case 273: +#line 1425 "c-parse.y" +{ yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 274: +#line 1430 "c-parse.y" +{ yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; + break;} +case 275: +#line 1432 "c-parse.y" +{ yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; + break;} +case 276: +#line 1437 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 278: +#line 1443 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; + break;} +case 279: +#line 1445 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; + break;} +case 280: +#line 1450 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 281: +#line 1452 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; + break;} +case 282: +#line 1457 "c-parse.y" +{ yyval.ttype = yyvsp[-1].ttype; ; + break;} +case 283: +#line 1460 "c-parse.y" +{ yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; + break;} +case 284: +#line 1462 "c-parse.y" +{ yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; + break;} +case 285: +#line 1464 "c-parse.y" +{ yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; + break;} +case 286: +#line 1466 "c-parse.y" +{ yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; + break;} +case 287: +#line 1468 "c-parse.y" +{ yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; + break;} +case 288: +#line 1470 "c-parse.y" +{ yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; + break;} +case 289: +#line 1472 "c-parse.y" +{ yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; + break;} +case 290: +#line 1474 "c-parse.y" +{ yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); ; + break;} +case 291: +#line 1485 "c-parse.y" +{ + if (pedantic && yyvsp[0].ends_in_label) + pedwarn ("ANSI C forbids label at end of compound statement"); + ; + break;} +case 293: +#line 1494 "c-parse.y" +{ yyval.ends_in_label = yyvsp[0].ends_in_label; ; + break;} +case 294: +#line 1496 "c-parse.y" +{ yyval.ends_in_label = 0; ; + break;} +case 298: +#line 1508 "c-parse.y" +{ emit_line_note (input_filename, lineno); + pushlevel (0); + clear_last_expr (); + push_momentary (); + expand_start_bindings (0); + ; + break;} +case 300: +#line 1521 "c-parse.y" +{ if (pedantic) + pedwarn ("ANSI C forbids label declarations"); ; + break;} +case 303: +#line 1532 "c-parse.y" +{ tree link; + for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) + { + tree label = shadow_label (TREE_VALUE (link)); + C_DECLARED_LABEL_FLAG (label) = 1; + declare_nonlocal_label (label); + } + ; + break;} +case 304: +#line 1546 "c-parse.y" +{; + break;} +case 306: +#line 1550 "c-parse.y" +{ compstmt_count++; ; + break;} +case 307: +#line 1553 "c-parse.y" +{ yyval.ttype = convert (void_type_node, integer_zero_node); ; + break;} +case 308: +#line 1555 "c-parse.y" +{ emit_line_note (input_filename, lineno); + expand_end_bindings (getdecls (), 1, 0); + yyval.ttype = poplevel (1, 1, 0); + if (yychar == CONSTANT || yychar == STRING) + pop_momentary_nofree (); + else + pop_momentary (); ; + break;} +case 309: +#line 1563 "c-parse.y" +{ emit_line_note (input_filename, lineno); + expand_end_bindings (getdecls (), kept_level_p (), 0); + yyval.ttype = poplevel (kept_level_p (), 0, 0); + if (yychar == CONSTANT || yychar == STRING) + pop_momentary_nofree (); + else + pop_momentary (); ; + break;} +case 310: +#line 1571 "c-parse.y" +{ emit_line_note (input_filename, lineno); + expand_end_bindings (getdecls (), kept_level_p (), 0); + yyval.ttype = poplevel (kept_level_p (), 0, 0); + if (yychar == CONSTANT || yychar == STRING) + pop_momentary_nofree (); + else + pop_momentary (); ; + break;} +case 313: +#line 1591 "c-parse.y" +{ emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); + c_expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), 0, + compstmt_count); + yyval.itype = stmt_count; + if_stmt_file = yyvsp[-5].filename; + if_stmt_line = yyvsp[-4].lineno; + position_after_white_space (); ; + break;} +case 314: +#line 1605 "c-parse.y" +{ stmt_count++; + compstmt_count++; + emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); + /* See comment in `while' alternative, above. */ + emit_nop (); + expand_start_loop_continue_elsewhere (1); + position_after_white_space (); ; + break;} +case 315: +#line 1613 "c-parse.y" +{ expand_loop_continue_here (); ; + break;} +case 316: +#line 1617 "c-parse.y" +{ yyval.filename = input_filename; ; + break;} +case 317: +#line 1621 "c-parse.y" +{ yyval.lineno = lineno; ; + break;} +case 318: +#line 1626 "c-parse.y" +{ ; + break;} +case 319: +#line 1631 "c-parse.y" +{ ; + break;} +case 320: +#line 1636 "c-parse.y" +{ yyval.ends_in_label = yyvsp[0].ends_in_label; ; + break;} +case 321: +#line 1641 "c-parse.y" +{ yyval.ends_in_label = 0; ; + break;} +case 322: +#line 1643 "c-parse.y" +{ yyval.ends_in_label = 1; ; + break;} +case 323: +#line 1649 "c-parse.y" +{ stmt_count++; ; + break;} +case 325: +#line 1652 "c-parse.y" +{ stmt_count++; + emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); +/* It appears that this should not be done--that a non-lvalue array + shouldn't get an error if the value isn't used. + Section 3.2.2.1 says that an array lvalue gets converted to a pointer + if it appears as a top-level expression, + but says nothing about non-lvalue arrays. */ +#if 0 + /* Call default_conversion to get an error + on referring to a register array if pedantic. */ + if (TREE_CODE (TREE_TYPE (yyvsp[-1].ttype)) == ARRAY_TYPE + || TREE_CODE (TREE_TYPE (yyvsp[-1].ttype)) == FUNCTION_TYPE) + yyvsp[-1].ttype = default_conversion (yyvsp[-1].ttype); +#endif + iterator_expand (yyvsp[-1].ttype); + clear_momentary (); ; + break;} +case 326: +#line 1669 "c-parse.y" +{ c_expand_start_else (); + yyvsp[-1].itype = stmt_count; + position_after_white_space (); ; + break;} +case 327: +#line 1673 "c-parse.y" +{ c_expand_end_cond (); + if (extra_warnings && stmt_count == yyvsp[-3].itype) + warning ("empty body in an else-statement"); ; + break;} +case 328: +#line 1677 "c-parse.y" +{ c_expand_end_cond (); + /* This warning is here instead of in simple_if, because we + do not want a warning if an empty if is followed by an + else statement. Increment stmt_count so we don't + give a second error if this is a nested `if'. */ + if (extra_warnings && stmt_count++ == yyvsp[0].itype) + warning_with_file_and_line (if_stmt_file, if_stmt_line, + "empty body in an if-statement"); ; + break;} +case 329: +#line 1689 "c-parse.y" +{ c_expand_end_cond (); ; + break;} +case 330: +#line 1691 "c-parse.y" +{ stmt_count++; + emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); + /* The emit_nop used to come before emit_line_note, + but that made the nop seem like part of the preceding line. + And that was confusing when the preceding line was + inside of an if statement and was not really executed. + I think it ought to work to put the nop after the line number. + We will see. --rms, July 15, 1991. */ + emit_nop (); ; + break;} +case 331: +#line 1701 "c-parse.y" +{ /* Don't start the loop till we have succeeded + in parsing the end test. This is to make sure + that we end every loop we start. */ + expand_start_loop (1); + emit_line_note (input_filename, lineno); + expand_exit_loop_if_false (NULL_PTR, + truthvalue_conversion (yyvsp[-1].ttype)); + position_after_white_space (); ; + break;} +case 332: +#line 1710 "c-parse.y" +{ expand_end_loop (); ; + break;} +case 333: +#line 1713 "c-parse.y" +{ emit_line_note (input_filename, lineno); + expand_exit_loop_if_false (NULL_PTR, + truthvalue_conversion (yyvsp[-2].ttype)); + expand_end_loop (); + clear_momentary (); ; + break;} +case 334: +#line 1720 "c-parse.y" +{ expand_end_loop (); + clear_momentary (); ; + break;} +case 335: +#line 1724 "c-parse.y" +{ stmt_count++; + emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); + /* See comment in `while' alternative, above. */ + emit_nop (); + if (yyvsp[-1].ttype) c_expand_expr_stmt (yyvsp[-1].ttype); + /* Next step is to call expand_start_loop_continue_elsewhere, + but wait till after we parse the entire for (...). + Otherwise, invalid input might cause us to call that + fn without calling expand_end_loop. */ + ; + break;} +case 336: +#line 1736 "c-parse.y" +{ yyvsp[0].lineno = lineno; + yyval.filename = input_filename; ; + break;} +case 337: +#line 1739 "c-parse.y" +{ + /* Start the loop. Doing this after parsing + all the expressions ensures we will end the loop. */ + expand_start_loop_continue_elsewhere (1); + /* Emit the end-test, with a line number. */ + emit_line_note (yyvsp[-2].filename, yyvsp[-3].lineno); + if (yyvsp[-4].ttype) + expand_exit_loop_if_false (NULL_PTR, + truthvalue_conversion (yyvsp[-4].ttype)); + /* Don't let the tree nodes for $9 be discarded by + clear_momentary during the parsing of the next stmt. */ + push_momentary (); + yyvsp[-3].lineno = lineno; + yyvsp[-2].filename = input_filename; + position_after_white_space (); ; + break;} +case 338: +#line 1755 "c-parse.y" +{ /* Emit the increment expression, with a line number. */ + emit_line_note (yyvsp[-4].filename, yyvsp[-5].lineno); + expand_loop_continue_here (); + if (yyvsp[-3].ttype) + c_expand_expr_stmt (yyvsp[-3].ttype); + if (yychar == CONSTANT || yychar == STRING) + pop_momentary_nofree (); + else + pop_momentary (); + expand_end_loop (); ; + break;} +case 339: +#line 1766 "c-parse.y" +{ stmt_count++; + emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); + c_expand_start_case (yyvsp[-1].ttype); + /* Don't let the tree nodes for $3 be discarded by + clear_momentary during the parsing of the next stmt. */ + push_momentary (); + position_after_white_space (); ; + break;} +case 340: +#line 1774 "c-parse.y" +{ expand_end_case (yyvsp[-3].ttype); + if (yychar == CONSTANT || yychar == STRING) + pop_momentary_nofree (); + else + pop_momentary (); ; + break;} +case 341: +#line 1780 "c-parse.y" +{ stmt_count++; + emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); + if ( ! expand_exit_something ()) + error ("break statement not within loop or switch"); ; + break;} +case 342: +#line 1785 "c-parse.y" +{ stmt_count++; + emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); + if (! expand_continue_loop (NULL_PTR)) + error ("continue statement not within a loop"); ; + break;} +case 343: +#line 1790 "c-parse.y" +{ stmt_count++; + emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); + c_expand_return (NULL_TREE); ; + break;} +case 344: +#line 1794 "c-parse.y" +{ stmt_count++; + emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); + c_expand_return (yyvsp[-1].ttype); ; + break;} +case 345: +#line 1798 "c-parse.y" +{ stmt_count++; + emit_line_note (yyvsp[-7].filename, yyvsp[-6].lineno); + STRIP_NOPS (yyvsp[-2].ttype); + if ((TREE_CODE (yyvsp[-2].ttype) == ADDR_EXPR + && TREE_CODE (TREE_OPERAND (yyvsp[-2].ttype, 0)) == STRING_CST) + || TREE_CODE (yyvsp[-2].ttype) == STRING_CST) + expand_asm (yyvsp[-2].ttype); + else + error ("argument of `asm' is not a constant string"); ; + break;} +case 346: +#line 1809 "c-parse.y" +{ stmt_count++; + emit_line_note (yyvsp[-9].filename, yyvsp[-8].lineno); + c_expand_asm_operands (yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE, + yyvsp[-6].ttype == ridpointers[(int)RID_VOLATILE], + input_filename, lineno); ; + break;} +case 347: +#line 1816 "c-parse.y" +{ stmt_count++; + emit_line_note (yyvsp[-11].filename, yyvsp[-10].lineno); + c_expand_asm_operands (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, + yyvsp[-8].ttype == ridpointers[(int)RID_VOLATILE], + input_filename, lineno); ; + break;} +case 348: +#line 1824 "c-parse.y" +{ stmt_count++; + emit_line_note (yyvsp[-13].filename, yyvsp[-12].lineno); + c_expand_asm_operands (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, + yyvsp[-10].ttype == ridpointers[(int)RID_VOLATILE], + input_filename, lineno); ; + break;} +case 349: +#line 1830 "c-parse.y" +{ tree decl; + stmt_count++; + emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); + decl = lookup_label (yyvsp[-1].ttype); + if (decl != 0) + { + TREE_USED (decl) = 1; + expand_goto (decl); + } + ; + break;} +case 350: +#line 1841 "c-parse.y" +{ if (pedantic) + pedwarn ("ANSI C forbids `goto *expr;'"); + stmt_count++; + emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); + expand_computed_goto (convert (ptr_type_node, yyvsp[-1].ttype)); ; + break;} +case 353: +#line 1856 "c-parse.y" +{ + /* The value returned by this action is */ + /* 1 if everything is OK */ + /* 0 in case of error or already bound iterator */ + + yyval.itype = 0; + if (TREE_CODE (yyvsp[-1].ttype) != VAR_DECL) + error ("invalid `for (ITERATOR)' syntax"); + else if (! ITERATOR_P (yyvsp[-1].ttype)) + error ("`%s' is not an iterator", + IDENTIFIER_POINTER (DECL_NAME (yyvsp[-1].ttype))); + else if (ITERATOR_BOUND_P (yyvsp[-1].ttype)) + error ("`for (%s)' inside expansion of same iterator", + IDENTIFIER_POINTER (DECL_NAME (yyvsp[-1].ttype))); + else + { + yyval.itype = 1; + iterator_for_loop_start (yyvsp[-1].ttype); + } + ; + break;} +case 354: +#line 1877 "c-parse.y" +{ + if (yyvsp[-1].itype) + iterator_for_loop_end (yyvsp[-3].ttype); + ; + break;} +case 355: +#line 1912 "c-parse.y" +{ register tree value = check_case_value (yyvsp[-1].ttype); + register tree label + = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); + + stmt_count++; + + if (value != error_mark_node) + { + tree duplicate; + int success = pushcase (value, convert_and_check, + label, &duplicate); + if (success == 1) + error ("case label not within a switch statement"); + else if (success == 2) + { + error ("duplicate case value"); + error_with_decl (duplicate, "this is the first entry for that value"); + } + else if (success == 3) + warning ("case value out of range"); + else if (success == 5) + error ("case label within scope of cleanup or variable array"); + } + position_after_white_space (); ; + break;} +case 356: +#line 1937 "c-parse.y" +{ register tree value1 = check_case_value (yyvsp[-3].ttype); + register tree value2 = check_case_value (yyvsp[-1].ttype); + register tree label + = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); + + if (pedantic) + pedwarn ("ANSI C forbids case ranges"); + stmt_count++; + + if (value1 != error_mark_node && value2 != error_mark_node) + { + tree duplicate; + int success = pushcase_range (value1, value2, + convert_and_check, label, + &duplicate); + if (success == 1) + error ("case label not within a switch statement"); + else if (success == 2) + { + error ("duplicate case value"); + error_with_decl (duplicate, "this is the first entry for that value"); + } + else if (success == 3) + warning ("case value out of range"); + else if (success == 4) + warning ("empty case range"); + else if (success == 5) + error ("case label within scope of cleanup or variable array"); + } + position_after_white_space (); ; + break;} +case 357: +#line 1968 "c-parse.y" +{ + tree duplicate; + register tree label + = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); + int success = pushcase (NULL_TREE, 0, label, &duplicate); + stmt_count++; + if (success == 1) + error ("default label not within a switch statement"); + else if (success == 2) + { + error ("multiple default labels in one switch"); + error_with_decl (duplicate, "this is the first default label"); + } + position_after_white_space (); ; + break;} +case 358: +#line 1983 "c-parse.y" +{ tree label = define_label (input_filename, lineno, yyvsp[-1].ttype); + stmt_count++; + emit_nop (); + if (label) + expand_label (label); + position_after_white_space (); ; + break;} +case 359: +#line 1995 "c-parse.y" +{ emit_line_note (input_filename, lineno); + yyval.ttype = NULL_TREE; ; + break;} +case 360: +#line 1998 "c-parse.y" +{ emit_line_note (input_filename, lineno); ; + break;} +case 361: +#line 2003 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 363: +#line 2010 "c-parse.y" +{ yyval.ttype = NULL_TREE; ; + break;} +case 366: +#line 2017 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; + break;} +case 367: +#line 2022 "c-parse.y" +{ yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; + break;} +case 368: +#line 2027 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ; + break;} +case 369: +#line 2029 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ; + break;} +case 370: +#line 2035 "c-parse.y" +{ pushlevel (0); + clear_parm_order (); + declare_parm_level (0); ; + break;} +case 371: +#line 2039 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; + parmlist_tags_warning (); + poplevel (0, 0, 0); ; + break;} +case 373: +#line 2047 "c-parse.y" +{ tree parm; + if (pedantic) + pedwarn ("ANSI C forbids forward parameter declarations"); + /* Mark the forward decls as such. */ + for (parm = getdecls (); parm; parm = TREE_CHAIN (parm)) + TREE_ASM_WRITTEN (parm) = 1; + clear_parm_order (); ; + break;} +case 374: +#line 2055 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; ; + break;} +case 375: +#line 2057 "c-parse.y" +{ yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; + break;} +case 376: +#line 2063 "c-parse.y" +{ yyval.ttype = get_parm_info (0); ; + break;} +case 377: +#line 2065 "c-parse.y" +{ yyval.ttype = get_parm_info (0); + /* Gcc used to allow this as an extension. However, it does + not work for all targets, and thus has been disabled. + Also, since func (...) and func () are indistinguishable, + it caused problems with the code in expand_builtin which + tries to verify that BUILT_IN_NEXT_ARG is being used + correctly. */ + error ("ANSI C requires a named argument before `...'"); + ; + break;} +case 378: +#line 2075 "c-parse.y" +{ yyval.ttype = get_parm_info (1); ; + break;} +case 379: +#line 2077 "c-parse.y" +{ yyval.ttype = get_parm_info (0); ; + break;} +case 380: +#line 2082 "c-parse.y" +{ push_parm_decl (yyvsp[0].ttype); ; + break;} +case 381: +#line 2084 "c-parse.y" +{ push_parm_decl (yyvsp[0].ttype); ; + break;} +case 382: +#line 2091 "c-parse.y" +{ yyval.ttype = build_tree_list (build_tree_list (current_declspecs, + yyvsp[-1].ttype), + build_tree_list (prefix_attributes, + yyvsp[0].ttype)); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 383: +#line 2100 "c-parse.y" +{ yyval.ttype = build_tree_list (build_tree_list (current_declspecs, + yyvsp[-1].ttype), + build_tree_list (prefix_attributes, + yyvsp[0].ttype)); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 384: +#line 2109 "c-parse.y" +{ yyval.ttype = build_tree_list (build_tree_list (current_declspecs, + yyvsp[-1].ttype), + build_tree_list (prefix_attributes, + yyvsp[0].ttype)); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 385: +#line 2118 "c-parse.y" +{ yyval.ttype = build_tree_list (build_tree_list (current_declspecs, + yyvsp[-1].ttype), + build_tree_list (prefix_attributes, + yyvsp[0].ttype)); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 386: +#line 2128 "c-parse.y" +{ yyval.ttype = build_tree_list (build_tree_list (current_declspecs, + yyvsp[-1].ttype), + build_tree_list (prefix_attributes, + yyvsp[0].ttype)); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 387: +#line 2142 "c-parse.y" +{ pushlevel (0); + clear_parm_order (); + declare_parm_level (1); ; + break;} +case 388: +#line 2146 "c-parse.y" +{ yyval.ttype = yyvsp[0].ttype; + parmlist_tags_warning (); + poplevel (0, 0, 0); ; + break;} +case 390: +#line 2154 "c-parse.y" +{ tree t; + for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) + if (TREE_VALUE (t) == NULL_TREE) + error ("`...' in old-style identifier list"); + yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); ; + break;} +case 391: +#line 2164 "c-parse.y" +{ yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; + break;} +case 392: +#line 2166 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; + break;} +case 393: +#line 2172 "c-parse.y" +{ yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; + break;} +case 394: +#line 2174 "c-parse.y" +{ yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; + break;} +case 395: +#line 2179 "c-parse.y" +{ yyval.itype = pedantic; + pedantic = 0; ; + break;} +} + /* the action file gets copied in in place of this dollarsign */ +#line 487 "/usr/share/bison.simple" + + yyvsp -= yylen; + yyssp -= yylen; +#ifdef YYLSP_NEEDED + yylsp -= yylen; +#endif + +#if YYDEBUG != 0 + if (yydebug) + { + short *ssp1 = yyss - 1; + fprintf (stderr, "state stack now"); + while (ssp1 != yyssp) + fprintf (stderr, " %d", *++ssp1); + fprintf (stderr, "\n"); + } +#endif + + *++yyvsp = yyval; + +#ifdef YYLSP_NEEDED + yylsp++; + if (yylen == 0) + { + yylsp->first_line = yylloc.first_line; + yylsp->first_column = yylloc.first_column; + yylsp->last_line = (yylsp-1)->last_line; + yylsp->last_column = (yylsp-1)->last_column; + yylsp->text = 0; + } + else + { + yylsp->last_line = (yylsp+yylen-1)->last_line; + yylsp->last_column = (yylsp+yylen-1)->last_column; + } +#endif + + /* Now "shift" the result of the reduction. + Determine what state that goes to, + based on the state we popped back to + and the rule number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTBASE] + *yyssp; + if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTBASE]; + + goto yynewstate; + +yyerrlab: /* here on detecting error */ + + if (! yyerrstatus) + /* If not already recovering from an error, report this error. */ + { + ++yynerrs; + +#ifdef YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (yyn > YYFLAG && yyn < YYLAST) + { + int size = 0; + char *msg; + int x, count; + + count = 0; + /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + size += strlen(yytname[x]) + 15, count++; + msg = (char *) malloc(size + 15); + if (msg != 0) + { + strcpy(msg, "parse error"); + + if (count < 5) + { + count = 0; + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + { + strcat(msg, count == 0 ? ", expecting `" : " or `"); + strcat(msg, yytname[x]); + strcat(msg, "'"); + count++; + } + } + yyerror(msg); + free(msg); + } + else + yyerror ("parse error; also virtual memory exceeded"); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror("parse error"); + } + + goto yyerrlab1; +yyerrlab1: /* here on error raised explicitly by an action */ + + if (yyerrstatus == 3) + { + /* if just tried and failed to reuse lookahead token after an error, discard it. */ + + /* return failure if at end of input */ + if (yychar == YYEOF) + YYABORT; + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); +#endif + + yychar = YYEMPTY; + } + + /* Else will try to reuse lookahead token + after shifting the error token. */ + + yyerrstatus = 3; /* Each real token shifted decrements this */ + + goto yyerrhandle; + +yyerrdefault: /* current state does not do anything special for the error token. */ + +#if 0 + /* This is wrong; only states that explicitly want error tokens + should shift them. */ + yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ + if (yyn) goto yydefault; +#endif + +yyerrpop: /* pop the current state because it cannot handle the error token */ + + if (yyssp == yyss) YYABORT; + yyvsp--; + yystate = *--yyssp; +#ifdef YYLSP_NEEDED + yylsp--; +#endif + +#if YYDEBUG != 0 + if (yydebug) + { + short *ssp1 = yyss - 1; + fprintf (stderr, "Error: state stack now"); + while (ssp1 != yyssp) + fprintf (stderr, " %d", *++ssp1); + fprintf (stderr, "\n"); + } +#endif + +yyerrhandle: + + yyn = yypact[yystate]; + if (yyn == YYFLAG) + goto yyerrdefault; + + yyn += YYTERROR; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) + goto yyerrdefault; + + yyn = yytable[yyn]; + if (yyn < 0) + { + if (yyn == YYFLAG) + goto yyerrpop; + yyn = -yyn; + goto yyreduce; + } + else if (yyn == 0) + goto yyerrpop; + + if (yyn == YYFINAL) + YYACCEPT; + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Shifting error token, "); +#endif + + *++yyvsp = yylval; +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif + + yystate = yyn; + goto yynewstate; +} +#line 2183 "c-parse.y" + diff --git a/gnu/usr.bin/gcc/c-parse.h b/gnu/usr.bin/gcc/c-parse.h new file mode 100644 index 00000000000..21b3d0caf6b --- /dev/null +++ b/gnu/usr.bin/gcc/c-parse.h @@ -0,0 +1,64 @@ +typedef union {long itype; tree ttype; enum tree_code code; + char *filename; int lineno; int ends_in_label; } YYSTYPE; +#define IDENTIFIER 258 +#define TYPENAME 259 +#define SCSPEC 260 +#define TYPESPEC 261 +#define TYPE_QUAL 262 +#define CONSTANT 263 +#define STRING 264 +#define ELLIPSIS 265 +#define SIZEOF 266 +#define ENUM 267 +#define STRUCT 268 +#define UNION 269 +#define IF 270 +#define ELSE 271 +#define WHILE 272 +#define DO 273 +#define FOR 274 +#define SWITCH 275 +#define CASE 276 +#define DEFAULT 277 +#define BREAK 278 +#define CONTINUE 279 +#define RETURN 280 +#define GOTO 281 +#define ASM_KEYWORD 282 +#define TYPEOF 283 +#define ALIGNOF 284 +#define ATTRIBUTE 285 +#define EXTENSION 286 +#define LABEL 287 +#define REALPART 288 +#define IMAGPART 289 +#define ASSIGN 290 +#define OROR 291 +#define ANDAND 292 +#define EQCOMPARE 293 +#define ARITHCOMPARE 294 +#define LSHIFT 295 +#define RSHIFT 296 +#define UNARY 297 +#define PLUSPLUS 298 +#define MINUSMINUS 299 +#define HYPERUNARY 300 +#define POINTSAT 301 +#define INTERFACE 302 +#define IMPLEMENTATION 303 +#define END 304 +#define SELECTOR 305 +#define DEFS 306 +#define ENCODE 307 +#define CLASSNAME 308 +#define PUBLIC 309 +#define PRIVATE 310 +#define PROTECTED 311 +#define PROTOCOL 312 +#define OBJECTNAME 313 +#define CLASS 314 +#define ALIAS 315 +#define OBJC_STRING 316 + + +extern YYSTYPE yylval; diff --git a/gnu/usr.bin/gcc/cexp.c b/gnu/usr.bin/gcc/cexp.c new file mode 100644 index 00000000000..f7c51a7d233 --- /dev/null +++ b/gnu/usr.bin/gcc/cexp.c @@ -0,0 +1,2169 @@ + +/* A Bison parser, made from cexp.y + by Bison version A2.5 (Andrew Consortium) + */ + +#define YYBISON 1 /* Identify Bison output. */ + +#define INT 258 +#define CHAR 259 +#define NAME 260 +#define ERROR 261 +#define OR 262 +#define AND 263 +#define EQUAL 264 +#define NOTEQUAL 265 +#define LEQ 266 +#define GEQ 267 +#define LSH 268 +#define RSH 269 +#define UNARY 270 + +#line 27 "cexp.y" + +#include "config.h" +#include <setjmp.h> +/* #define YYDEBUG 1 */ + + +#ifdef HAVE_STRING_H +# include <string.h> +#endif + +#ifdef HAVE_STDLIB_H +# include <stdlib.h> +#endif + +#ifdef HAVE_LIMITS_H +# include <limits.h> +#endif + +#ifdef MULTIBYTE_CHARS +#include <locale.h> +#endif + +#include <stdio.h> + +typedef unsigned char U_CHAR; + +/* This is used for communicating lists of keywords with cccp.c. */ +struct arglist { + struct arglist *next; + U_CHAR *name; + int length; + int argno; +}; + +/* Define a generic NULL if one hasn't already been defined. */ + +#ifndef NULL +#define NULL 0 +#endif + +#ifndef GENERIC_PTR +#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) +#define GENERIC_PTR void * +#else +#define GENERIC_PTR char * +#endif +#endif + +#ifndef NULL_PTR +#define NULL_PTR ((GENERIC_PTR) 0) +#endif + +/* Find the largest host integer type and set its size and type. + Watch out: on some crazy hosts `long' is shorter than `int'. */ + +#ifndef HOST_WIDE_INT +# if HAVE_INTTYPES_H +# include <inttypes.h> +# define HOST_WIDE_INT intmax_t +# define unsigned_HOST_WIDE_INT uintmax_t +# else +# if (HOST_BITS_PER_LONG <= HOST_BITS_PER_INT && HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_INT) +# define HOST_WIDE_INT int +# else +# if (HOST_BITS_PER_LONGLONG <= HOST_BITS_PER_LONG || ! (defined LONG_LONG_MAX || defined LLONG_MAX)) +# define HOST_WIDE_INT long +# else +# define HOST_WIDE_INT long long +# endif +# endif +# endif +#endif + +#ifndef unsigned_HOST_WIDE_INT +#define unsigned_HOST_WIDE_INT unsigned HOST_WIDE_INT +#endif + +#ifndef CHAR_BIT +#define CHAR_BIT 8 +#endif + +#ifndef HOST_BITS_PER_WIDE_INT +#define HOST_BITS_PER_WIDE_INT (CHAR_BIT * sizeof (HOST_WIDE_INT)) +#endif + +#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) +# define __attribute__(x) +#endif + +#ifndef PROTO +# if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) +# define PROTO(ARGS) ARGS +# else +# define PROTO(ARGS) () +# endif +#endif + +#if defined (__STDC__) && defined (HAVE_VPRINTF) +# include <stdarg.h> +# define VA_START(va_list, var) va_start (va_list, var) +# define PRINTF_ALIST(msg) char *msg, ... +# define PRINTF_DCL(msg) +# define PRINTF_PROTO(ARGS, m, n) PROTO (ARGS) __attribute__ ((format (__printf__, m, n))) +#else +# include <varargs.h> +# define VA_START(va_list, var) va_start (va_list) +# define PRINTF_ALIST(msg) msg, va_alist +# define PRINTF_DCL(msg) char *msg; va_dcl +# define PRINTF_PROTO(ARGS, m, n) () __attribute__ ((format (__printf__, m, n))) +# define vfprintf(file, msg, args) \ + { \ + char *a0 = va_arg(args, char *); \ + char *a1 = va_arg(args, char *); \ + char *a2 = va_arg(args, char *); \ + char *a3 = va_arg(args, char *); \ + fprintf (file, msg, a0, a1, a2, a3); \ + } +#endif + +#define PRINTF_PROTO_1(ARGS) PRINTF_PROTO(ARGS, 1, 2) + +HOST_WIDE_INT parse_c_expression PROTO((char *, int)); + +static int yylex PROTO((void)); +static void yyerror PROTO((char *)) __attribute__ ((noreturn)); +static HOST_WIDE_INT expression_value; +#ifdef TEST_EXP_READER +static int expression_signedp; +#endif + +static jmp_buf parse_return_error; + +/* Nonzero means count most punctuation as part of a name. */ +static int keyword_parsing = 0; + +/* Nonzero means do not evaluate this expression. + This is a count, since unevaluated expressions can nest. */ +static int skip_evaluation; + +/* Nonzero means warn if undefined identifiers are evaluated. */ +static int warn_undef; + +/* some external tables of character types */ +extern unsigned char is_idstart[], is_idchar[], is_space[]; + +/* Flag for -pedantic. */ +extern int pedantic; + +/* Flag for -traditional. */ +extern int traditional; + +/* Flag for -lang-c89. */ +extern int c89; + +#ifndef CHAR_TYPE_SIZE +#define CHAR_TYPE_SIZE BITS_PER_UNIT +#endif + +#ifndef INT_TYPE_SIZE +#define INT_TYPE_SIZE BITS_PER_WORD +#endif + +#ifndef LONG_TYPE_SIZE +#define LONG_TYPE_SIZE BITS_PER_WORD +#endif + +#ifndef WCHAR_TYPE_SIZE +#define WCHAR_TYPE_SIZE INT_TYPE_SIZE +#endif + +#ifndef MAX_CHAR_TYPE_SIZE +#define MAX_CHAR_TYPE_SIZE CHAR_TYPE_SIZE +#endif + +#ifndef MAX_INT_TYPE_SIZE +#define MAX_INT_TYPE_SIZE INT_TYPE_SIZE +#endif + +#ifndef MAX_LONG_TYPE_SIZE +#define MAX_LONG_TYPE_SIZE LONG_TYPE_SIZE +#endif + +#ifndef MAX_WCHAR_TYPE_SIZE +#define MAX_WCHAR_TYPE_SIZE WCHAR_TYPE_SIZE +#endif + +#define MAX_CHAR_TYPE_MASK (MAX_CHAR_TYPE_SIZE < HOST_BITS_PER_WIDE_INT \ + ? (~ (~ (HOST_WIDE_INT) 0 << MAX_CHAR_TYPE_SIZE)) \ + : ~ (HOST_WIDE_INT) 0) + +#define MAX_WCHAR_TYPE_MASK (MAX_WCHAR_TYPE_SIZE < HOST_BITS_PER_WIDE_INT \ + ? ~ (~ (HOST_WIDE_INT) 0 << MAX_WCHAR_TYPE_SIZE) \ + : ~ (HOST_WIDE_INT) 0) + +/* Suppose A1 + B1 = SUM1, using 2's complement arithmetic ignoring overflow. + Suppose A, B and SUM have the same respective signs as A1, B1, and SUM1. + Suppose SIGNEDP is negative if the result is signed, zero if unsigned. + Then this yields nonzero if overflow occurred during the addition. + Overflow occurs if A and B have the same sign, but A and SUM differ in sign, + and SIGNEDP is negative. + Use `^' to test whether signs differ, and `< 0' to isolate the sign. */ +#define overflow_sum_sign(a, b, sum, signedp) \ + ((~((a) ^ (b)) & ((a) ^ (sum)) & (signedp)) < 0) + +struct constant; + +GENERIC_PTR xmalloc PROTO((size_t)); +HOST_WIDE_INT parse_escape PROTO((char **, HOST_WIDE_INT)); +int check_assertion PROTO((U_CHAR *, int, int, struct arglist *)); +struct hashnode *lookup PROTO((U_CHAR *, int, int)); +void error PRINTF_PROTO_1((char *, ...)); +void pedwarn PRINTF_PROTO_1((char *, ...)); +void warning PRINTF_PROTO_1((char *, ...)); + +static int parse_number PROTO((int)); +static HOST_WIDE_INT left_shift PROTO((struct constant *, unsigned_HOST_WIDE_INT)); +static HOST_WIDE_INT right_shift PROTO((struct constant *, unsigned_HOST_WIDE_INT)); +static void integer_overflow PROTO((void)); + +/* `signedp' values */ +#define SIGNED (~0) +#define UNSIGNED 0 + +#line 251 "cexp.y" +typedef union { + struct constant {HOST_WIDE_INT value; int signedp;} integer; + struct name {U_CHAR *address; int length;} name; + struct arglist *keywords; +} YYSTYPE; +#include <stdio.h> + +#ifndef __cplusplus +#ifndef __STDC__ +#define const +#endif +#endif + + + +#define YYFINAL 77 +#define YYFLAG -32768 +#define YYNTBASE 34 + +#define YYTRANSLATE(x) ((unsigned)(x) <= 270 ? yytranslate[x] : 43) + +static const char yytranslate[] = { 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 29, 2, 31, 2, 27, 14, 2, 32, + 33, 25, 23, 9, 24, 2, 26, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 8, 2, 17, + 2, 18, 7, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 13, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 12, 2, 30, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, + 6, 10, 11, 15, 16, 19, 20, 21, 22, 28 +}; + +#if YYDEBUG != 0 +static const short yyprhs[] = { 0, + 0, 2, 4, 8, 11, 14, 17, 20, 23, 24, + 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, + 71, 75, 79, 83, 87, 91, 95, 99, 100, 105, + 106, 111, 112, 113, 121, 123, 125, 127, 128, 133 +}; + +static const short yyrhs[] = { 35, + 0, 36, 0, 35, 9, 36, 0, 24, 36, 0, + 29, 36, 0, 23, 36, 0, 30, 36, 0, 31, + 5, 0, 0, 31, 5, 37, 32, 42, 33, 0, + 32, 35, 33, 0, 36, 25, 36, 0, 36, 26, + 36, 0, 36, 27, 36, 0, 36, 23, 36, 0, + 36, 24, 36, 0, 36, 21, 36, 0, 36, 22, + 36, 0, 36, 15, 36, 0, 36, 16, 36, 0, + 36, 19, 36, 0, 36, 20, 36, 0, 36, 17, + 36, 0, 36, 18, 36, 0, 36, 14, 36, 0, + 36, 13, 36, 0, 36, 12, 36, 0, 0, 36, + 11, 38, 36, 0, 0, 36, 10, 39, 36, 0, + 0, 0, 36, 7, 40, 36, 8, 41, 36, 0, + 3, 0, 4, 0, 5, 0, 0, 32, 42, 33, + 42, 0, 5, 42, 0 +}; + +#endif + +#if YYDEBUG != 0 +static const short yyrline[] = { 0, + 281, 291, 292, 299, 304, 307, 309, 312, 316, 318, + 323, 328, 341, 358, 371, 377, 383, 389, 395, 398, + 401, 408, 415, 422, 429, 432, 435, 438, 441, 444, + 447, 450, 452, 455, 458, 460, 462, 470, 472, 485 +}; +#endif + + +#if YYDEBUG != 0 + +static const char * const yytname[] = { "$","error","$undefined.","INT","CHAR", +"NAME","ERROR","'?'","':'","','","OR","AND","'|'","'^'","'&'","EQUAL","NOTEQUAL", +"'<'","'>'","LEQ","GEQ","LSH","RSH","'+'","'-'","'*'","'/'","'%'","UNARY","'!'", +"'~'","'#'","'('","')'","start","exp1","exp","@1","@2","@3","@4","@5","keywords", NULL +}; +#endif + +static const short yyr1[] = { 0, + 34, 35, 35, 36, 36, 36, 36, 36, 37, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 38, 36, 39, + 36, 40, 41, 36, 36, 36, 36, 42, 42, 42 +}; + +static const short yyr2[] = { 0, + 1, 1, 3, 2, 2, 2, 2, 2, 0, 6, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 0, 4, 0, + 4, 0, 0, 7, 1, 1, 1, 0, 4, 2 +}; + +static const short yydefact[] = { 0, + 35, 36, 37, 0, 0, 0, 0, 0, 0, 1, + 2, 6, 4, 5, 7, 8, 0, 0, 32, 30, + 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 11, 3, + 0, 0, 0, 27, 26, 25, 19, 20, 23, 24, + 21, 22, 17, 18, 15, 16, 12, 13, 14, 38, + 0, 31, 29, 38, 38, 0, 33, 40, 0, 10, + 0, 38, 34, 39, 0, 0, 0 +}; + +static const short yydefgoto[] = { 75, + 10, 11, 38, 43, 42, 41, 71, 66 +}; + +static const short yypact[] = { 12, +-32768,-32768,-32768, 12, 12, 12, 12, 1, 12, 4, + 79,-32768,-32768,-32768,-32768, -21, 31, 12,-32768,-32768, +-32768, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 30,-32768, 79, + 12, 12, 12, 110, 124, 137, 148, 148, 155, 155, + 155, 155, 160, 160, -17, -17,-32768,-32768,-32768, 2, + 58, 34, 95, 2, 2, 54,-32768,-32768, 55,-32768, + 12, 2, 79,-32768, 63, 188,-32768 +}; + +static const short yypgoto[] = {-32768, + 180, -4,-32768,-32768,-32768,-32768,-32768, -60 +}; + + +#define YYLAST 189 + + +static const short yytable[] = { 12, + 13, 14, 15, 68, 69, 16, 64, 35, 36, 37, + -9, 74, 18, 40, 1, 2, 3, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 65, 4, 5, 61, 62, 63, 18, + 6, 7, 8, 9, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 60, 76, 39, 19, 67, 73, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 19, 70, 72, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 31, 32, 33, 34, 35, + 36, 37, 33, 34, 35, 36, 37, 77, 17 +}; + +static const short yycheck[] = { 4, + 5, 6, 7, 64, 65, 5, 5, 25, 26, 27, + 32, 72, 9, 18, 3, 4, 5, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 32, 23, 24, 41, 42, 43, 9, + 29, 30, 31, 32, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 32, 0, 33, 7, 8, 71, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 7, 33, 33, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 21, 22, 23, 24, 25, + 26, 27, 23, 24, 25, 26, 27, 0, 9 +}; +/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ +#line 3 "/usr/share/bison.simple" + +/* Skeleton output parser for bison, + Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +#ifndef alloca +#ifdef __GNUC__ +#define alloca __builtin_alloca +#else /* not GNU C. */ +#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) +#include <alloca.h> +#else /* not sparc */ +#if defined (MSDOS) && !defined (__TURBOC__) +#include <malloc.h> +#else /* not MSDOS, or __TURBOC__ */ +#if defined(_AIX) +#include <malloc.h> + #pragma alloca +#else /* not MSDOS, __TURBOC__, or _AIX */ +#ifdef __hpux +#ifdef __cplusplus +extern "C" { +void *alloca (unsigned int); +}; +#else /* not __cplusplus */ +void *alloca (); +#endif /* not __cplusplus */ +#endif /* __hpux */ +#endif /* not _AIX */ +#endif /* not MSDOS, or __TURBOC__ */ +#endif /* not sparc. */ +#endif /* not GNU C. */ +#endif /* alloca not defined. */ + +/* This is the parser code that is written into each bison parser + when the %semantic_parser declaration is not specified in the grammar. + It was written by Richard Stallman by simplifying the hairy parser + used when %semantic_parser is specified. */ + +/* Note: there must be only one dollar sign in this file. + It is replaced by the list of actions, each action + as one case of the switch. */ + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY -2 +#define YYEOF 0 +#define YYACCEPT return(0) +#define YYABORT return(1) +#define YYERROR goto yyerrlab1 +/* Like YYERROR except do call yyerror. + This remains here temporarily to ease the + transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ +#define YYFAIL goto yyerrlab +#define YYRECOVERING() (!!yyerrstatus) +#define YYBACKUP(token, value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { yychar = (token), yylval = (value); \ + yychar1 = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { yyerror ("syntax error: cannot back up"); YYERROR; } \ +while (0) + +#define YYTERROR 1 +#define YYERRCODE 256 + +#ifndef YYPURE +#define YYLEX yylex() +#endif + +#ifdef YYPURE +#ifdef YYLSP_NEEDED +#ifdef YYLEX_PARAM +#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +#else +#define YYLEX yylex(&yylval, &yylloc) +#endif +#else /* not YYLSP_NEEDED */ +#ifdef YYLEX_PARAM +#define YYLEX yylex(&yylval, YYLEX_PARAM) +#else +#define YYLEX yylex(&yylval) +#endif +#endif /* not YYLSP_NEEDED */ +#endif + +/* If nonreentrant, generate the variables here */ + +#ifndef YYPURE + +int yychar; /* the lookahead symbol */ +YYSTYPE yylval; /* the semantic value of the */ + /* lookahead symbol */ + +#ifdef YYLSP_NEEDED +YYLTYPE yylloc; /* location data for the lookahead */ + /* symbol */ +#endif + +int yynerrs; /* number of parse errors so far */ +#endif /* not YYPURE */ + +#if YYDEBUG != 0 +int yydebug; /* nonzero means print parse trace */ +/* Since this is uninitialized, it does not stop multiple parsers + from coexisting. */ +#endif + +/* YYINITDEPTH indicates the initial size of the parser's stacks */ + +#ifndef YYINITDEPTH +#define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH is the maximum size the stacks can grow to + (effective only if the built-in stack extension method is used). */ + +#if YYMAXDEPTH == 0 +#undef YYMAXDEPTH +#endif + +#ifndef YYMAXDEPTH +#define YYMAXDEPTH 10000 +#endif + +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +int yyparse (void); +#endif + +#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) +#else /* not GNU C or C++ */ +#ifndef __cplusplus + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__yy_memcpy (from, to, count) + char *from; + char *to; + int count; +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#else /* __cplusplus */ + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__yy_memcpy (char *from, char *to, int count) +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#endif +#endif + +#line 192 "/usr/share/bison.simple" + +/* The user can define YYPARSE_PARAM as the name of an argument to be passed + into yyparse. The argument should have type void *. + It should actually point to an object. + Grammar actions can access the variable by casting it + to the proper pointer type. */ + +#ifdef YYPARSE_PARAM +#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +#else +#define YYPARSE_PARAM +#define YYPARSE_PARAM_DECL +#endif + +int +yyparse(YYPARSE_PARAM) + YYPARSE_PARAM_DECL +{ + register int yystate; + register int yyn; + register short *yyssp; + register YYSTYPE *yyvsp; + int yyerrstatus; /* number of tokens to shift before error messages enabled */ + int yychar1 = 0; /* lookahead token as an internal (translated) token number */ + + short yyssa[YYINITDEPTH]; /* the state stack */ + YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ + + short *yyss = yyssa; /* refer to the stacks thru separate pointers */ + YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ + +#ifdef YYLSP_NEEDED + YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + +#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +#else +#define YYPOPSTACK (yyvsp--, yyssp--) +#endif + + int yystacksize = YYINITDEPTH; + +#ifdef YYPURE + int yychar; + YYSTYPE yylval; + int yynerrs; +#ifdef YYLSP_NEEDED + YYLTYPE yylloc; +#endif +#endif + + YYSTYPE yyval; /* the variable used to return */ + /* semantic values from the action */ + /* routines */ + + int yylen; + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Starting parse\n"); +#endif + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss - 1; + yyvsp = yyvs; +#ifdef YYLSP_NEEDED + yylsp = yyls; +#endif + +/* Push a new state, which is found in yystate . */ +/* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. */ +yynewstate: + + *++yyssp = yystate; + + if (yyssp >= yyss + yystacksize - 1) + { + /* Give user a chance to reallocate the stack */ + /* Use copies of these so that the &'s don't force the real ones into memory. */ + YYSTYPE *yyvs1 = yyvs; + short *yyss1 = yyss; +#ifdef YYLSP_NEEDED + YYLTYPE *yyls1 = yyls; +#endif + + /* Get the current used size of the three stacks, in elements. */ + int size = yyssp - yyss + 1; + +#ifdef yyoverflow + /* Each stack pointer address is followed by the size of + the data in use in that stack, in bytes. */ +#ifdef YYLSP_NEEDED + /* This used to be a conditional around just the two extra args, + but that might be undefined if yyoverflow is a macro. */ + yyoverflow("parser stack overflow", + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yyls1, size * sizeof (*yylsp), + &yystacksize); +#else + yyoverflow("parser stack overflow", + &yyss1, size * sizeof (*yyssp), + &yyvs1, size * sizeof (*yyvsp), + &yystacksize); +#endif + + yyss = yyss1; yyvs = yyvs1; +#ifdef YYLSP_NEEDED + yyls = yyls1; +#endif +#else /* no yyoverflow */ + /* Extend the stack our own way. */ + if (yystacksize >= YYMAXDEPTH) + { + yyerror("parser stack overflow"); + return 2; + } + yystacksize *= 2; + if (yystacksize > YYMAXDEPTH) + yystacksize = YYMAXDEPTH; + yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); + __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); + yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); + __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); +#ifdef YYLSP_NEEDED + yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); + __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); +#endif +#endif /* no yyoverflow */ + + yyssp = yyss + size - 1; + yyvsp = yyvs + size - 1; +#ifdef YYLSP_NEEDED + yylsp = yyls + size - 1; +#endif + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Stack size increased to %d\n", yystacksize); +#endif + + if (yyssp >= yyss + yystacksize - 1) + YYABORT; + } + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Entering state %d\n", yystate); +#endif + + goto yybackup; + yybackup: + +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to lookahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYFLAG) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* yychar is either YYEMPTY or YYEOF + or a valid token in external form. */ + + if (yychar == YYEMPTY) + { +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Reading a token: "); +#endif + yychar = YYLEX; + } + + /* Convert token to internal form (in yychar1) for indexing tables with */ + + if (yychar <= 0) /* This means end of input. */ + { + yychar1 = 0; + yychar = YYEOF; /* Don't call YYLEX any more */ + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Now at end of input.\n"); +#endif + } + else + { + yychar1 = YYTRANSLATE(yychar); + +#if YYDEBUG != 0 + if (yydebug) + { + fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); + /* Give the individual parser a way to print the precise meaning + of a token, for further debugging info. */ +#ifdef YYPRINT + YYPRINT (stderr, yychar, yylval); +#endif + fprintf (stderr, ")\n"); + } +#endif + } + + yyn += yychar1; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) + goto yydefault; + + yyn = yytable[yyn]; + + /* yyn is what to do for this token type in this state. + Negative => reduce, -yyn is rule number. + Positive => shift, yyn is new state. + New state is final state => don't bother to shift, + just return success. + 0, or most negative number => error. */ + + if (yyn < 0) + { + if (yyn == YYFLAG) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + else if (yyn == 0) + goto yyerrlab; + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the lookahead token. */ + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); +#endif + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif + + /* count tokens shifted since error; after three, turn off error status. */ + if (yyerrstatus) yyerrstatus--; + + yystate = yyn; + goto yynewstate; + +/* Do the default action for the current state. */ +yydefault: + + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + +/* Do a reduction. yyn is the number of a rule to reduce with. */ +yyreduce: + yylen = yyr2[yyn]; + if (yylen > 0) + yyval = yyvsp[1-yylen]; /* implement default value of the action */ + +#if YYDEBUG != 0 + if (yydebug) + { + int i; + + fprintf (stderr, "Reducing via rule %d (line %d), ", + yyn, yyrline[yyn]); + + /* Print the symbols being reduced, and their result. */ + for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) + fprintf (stderr, "%s ", yytname[yyrhs[i]]); + fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); + } +#endif + + + switch (yyn) { + +case 1: +#line 282 "cexp.y" +{ + expression_value = yyvsp[0].integer.value; +#ifdef TEST_EXP_READER + expression_signedp = yyvsp[0].integer.signedp; +#endif + ; + break;} +case 3: +#line 293 "cexp.y" +{ if (pedantic) + pedwarn ("comma operator in operand of `#if'"); + yyval.integer = yyvsp[0].integer; ; + break;} +case 4: +#line 300 "cexp.y" +{ yyval.integer.value = - yyvsp[0].integer.value; + yyval.integer.signedp = yyvsp[0].integer.signedp; + if ((yyval.integer.value & yyvsp[0].integer.value & yyval.integer.signedp) < 0) + integer_overflow (); ; + break;} +case 5: +#line 305 "cexp.y" +{ yyval.integer.value = ! yyvsp[0].integer.value; + yyval.integer.signedp = SIGNED; ; + break;} +case 6: +#line 308 "cexp.y" +{ yyval.integer = yyvsp[0].integer; ; + break;} +case 7: +#line 310 "cexp.y" +{ yyval.integer.value = ~ yyvsp[0].integer.value; + yyval.integer.signedp = yyvsp[0].integer.signedp; ; + break;} +case 8: +#line 313 "cexp.y" +{ yyval.integer.value = check_assertion (yyvsp[0].name.address, yyvsp[0].name.length, + 0, NULL_PTR); + yyval.integer.signedp = SIGNED; ; + break;} +case 9: +#line 317 "cexp.y" +{ keyword_parsing = 1; ; + break;} +case 10: +#line 319 "cexp.y" +{ yyval.integer.value = check_assertion (yyvsp[-4].name.address, yyvsp[-4].name.length, + 1, yyvsp[-1].keywords); + keyword_parsing = 0; + yyval.integer.signedp = SIGNED; ; + break;} +case 11: +#line 324 "cexp.y" +{ yyval.integer = yyvsp[-1].integer; ; + break;} +case 12: +#line 329 "cexp.y" +{ yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; + if (yyval.integer.signedp) + { + yyval.integer.value = yyvsp[-2].integer.value * yyvsp[0].integer.value; + if (yyvsp[-2].integer.value + && (yyval.integer.value / yyvsp[-2].integer.value != yyvsp[0].integer.value + || (yyval.integer.value & yyvsp[-2].integer.value & yyvsp[0].integer.value) < 0)) + integer_overflow (); + } + else + yyval.integer.value = ((unsigned_HOST_WIDE_INT) yyvsp[-2].integer.value + * yyvsp[0].integer.value); ; + break;} +case 13: +#line 342 "cexp.y" +{ if (yyvsp[0].integer.value == 0) + { + if (!skip_evaluation) + error ("division by zero in #if"); + yyvsp[0].integer.value = 1; + } + yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; + if (yyval.integer.signedp) + { + yyval.integer.value = yyvsp[-2].integer.value / yyvsp[0].integer.value; + if ((yyval.integer.value & yyvsp[-2].integer.value & yyvsp[0].integer.value) < 0) + integer_overflow (); + } + else + yyval.integer.value = ((unsigned_HOST_WIDE_INT) yyvsp[-2].integer.value + / yyvsp[0].integer.value); ; + break;} +case 14: +#line 359 "cexp.y" +{ if (yyvsp[0].integer.value == 0) + { + if (!skip_evaluation) + error ("division by zero in #if"); + yyvsp[0].integer.value = 1; + } + yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; + if (yyval.integer.signedp) + yyval.integer.value = yyvsp[-2].integer.value % yyvsp[0].integer.value; + else + yyval.integer.value = ((unsigned_HOST_WIDE_INT) yyvsp[-2].integer.value + % yyvsp[0].integer.value); ; + break;} +case 15: +#line 372 "cexp.y" +{ yyval.integer.value = yyvsp[-2].integer.value + yyvsp[0].integer.value; + yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; + if (overflow_sum_sign (yyvsp[-2].integer.value, yyvsp[0].integer.value, + yyval.integer.value, yyval.integer.signedp)) + integer_overflow (); ; + break;} +case 16: +#line 378 "cexp.y" +{ yyval.integer.value = yyvsp[-2].integer.value - yyvsp[0].integer.value; + yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; + if (overflow_sum_sign (yyval.integer.value, yyvsp[0].integer.value, + yyvsp[-2].integer.value, yyval.integer.signedp)) + integer_overflow (); ; + break;} +case 17: +#line 384 "cexp.y" +{ yyval.integer.signedp = yyvsp[-2].integer.signedp; + if ((yyvsp[0].integer.value & yyvsp[0].integer.signedp) < 0) + yyval.integer.value = right_shift (&yyvsp[-2].integer, -yyvsp[0].integer.value); + else + yyval.integer.value = left_shift (&yyvsp[-2].integer, yyvsp[0].integer.value); ; + break;} +case 18: +#line 390 "cexp.y" +{ yyval.integer.signedp = yyvsp[-2].integer.signedp; + if ((yyvsp[0].integer.value & yyvsp[0].integer.signedp) < 0) + yyval.integer.value = left_shift (&yyvsp[-2].integer, -yyvsp[0].integer.value); + else + yyval.integer.value = right_shift (&yyvsp[-2].integer, yyvsp[0].integer.value); ; + break;} +case 19: +#line 396 "cexp.y" +{ yyval.integer.value = (yyvsp[-2].integer.value == yyvsp[0].integer.value); + yyval.integer.signedp = SIGNED; ; + break;} +case 20: +#line 399 "cexp.y" +{ yyval.integer.value = (yyvsp[-2].integer.value != yyvsp[0].integer.value); + yyval.integer.signedp = SIGNED; ; + break;} +case 21: +#line 402 "cexp.y" +{ yyval.integer.signedp = SIGNED; + if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp) + yyval.integer.value = yyvsp[-2].integer.value <= yyvsp[0].integer.value; + else + yyval.integer.value = ((unsigned_HOST_WIDE_INT) yyvsp[-2].integer.value + <= yyvsp[0].integer.value); ; + break;} +case 22: +#line 409 "cexp.y" +{ yyval.integer.signedp = SIGNED; + if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp) + yyval.integer.value = yyvsp[-2].integer.value >= yyvsp[0].integer.value; + else + yyval.integer.value = ((unsigned_HOST_WIDE_INT) yyvsp[-2].integer.value + >= yyvsp[0].integer.value); ; + break;} +case 23: +#line 416 "cexp.y" +{ yyval.integer.signedp = SIGNED; + if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp) + yyval.integer.value = yyvsp[-2].integer.value < yyvsp[0].integer.value; + else + yyval.integer.value = ((unsigned_HOST_WIDE_INT) yyvsp[-2].integer.value + < yyvsp[0].integer.value); ; + break;} +case 24: +#line 423 "cexp.y" +{ yyval.integer.signedp = SIGNED; + if (yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp) + yyval.integer.value = yyvsp[-2].integer.value > yyvsp[0].integer.value; + else + yyval.integer.value = ((unsigned_HOST_WIDE_INT) yyvsp[-2].integer.value + > yyvsp[0].integer.value); ; + break;} +case 25: +#line 430 "cexp.y" +{ yyval.integer.value = yyvsp[-2].integer.value & yyvsp[0].integer.value; + yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ; + break;} +case 26: +#line 433 "cexp.y" +{ yyval.integer.value = yyvsp[-2].integer.value ^ yyvsp[0].integer.value; + yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ; + break;} +case 27: +#line 436 "cexp.y" +{ yyval.integer.value = yyvsp[-2].integer.value | yyvsp[0].integer.value; + yyval.integer.signedp = yyvsp[-2].integer.signedp & yyvsp[0].integer.signedp; ; + break;} +case 28: +#line 439 "cexp.y" +{ skip_evaluation += !yyvsp[-1].integer.value; ; + break;} +case 29: +#line 441 "cexp.y" +{ skip_evaluation -= !yyvsp[-3].integer.value; + yyval.integer.value = (yyvsp[-3].integer.value && yyvsp[0].integer.value); + yyval.integer.signedp = SIGNED; ; + break;} +case 30: +#line 445 "cexp.y" +{ skip_evaluation += !!yyvsp[-1].integer.value; ; + break;} +case 31: +#line 447 "cexp.y" +{ skip_evaluation -= !!yyvsp[-3].integer.value; + yyval.integer.value = (yyvsp[-3].integer.value || yyvsp[0].integer.value); + yyval.integer.signedp = SIGNED; ; + break;} +case 32: +#line 451 "cexp.y" +{ skip_evaluation += !yyvsp[-1].integer.value; ; + break;} +case 33: +#line 453 "cexp.y" +{ skip_evaluation += !!yyvsp[-4].integer.value - !yyvsp[-4].integer.value; ; + break;} +case 34: +#line 455 "cexp.y" +{ skip_evaluation -= !!yyvsp[-6].integer.value; + yyval.integer.value = yyvsp[-6].integer.value ? yyvsp[-3].integer.value : yyvsp[0].integer.value; + yyval.integer.signedp = yyvsp[-3].integer.signedp & yyvsp[0].integer.signedp; ; + break;} +case 35: +#line 459 "cexp.y" +{ yyval.integer = yylval.integer; ; + break;} +case 36: +#line 461 "cexp.y" +{ yyval.integer = yylval.integer; ; + break;} +case 37: +#line 463 "cexp.y" +{ if (warn_undef && !skip_evaluation) + warning ("`%.*s' is not defined", + yyvsp[0].name.length, yyvsp[0].name.address); + yyval.integer.value = 0; + yyval.integer.signedp = SIGNED; ; + break;} +case 38: +#line 471 "cexp.y" +{ yyval.keywords = 0; ; + break;} +case 39: +#line 473 "cexp.y" +{ struct arglist *temp; + yyval.keywords = (struct arglist *) xmalloc (sizeof (struct arglist)); + yyval.keywords->next = yyvsp[-2].keywords; + yyval.keywords->name = (U_CHAR *) "("; + yyval.keywords->length = 1; + temp = yyval.keywords; + while (temp != 0 && temp->next != 0) + temp = temp->next; + temp->next = (struct arglist *) xmalloc (sizeof (struct arglist)); + temp->next->next = yyvsp[0].keywords; + temp->next->name = (U_CHAR *) ")"; + temp->next->length = 1; ; + break;} +case 40: +#line 486 "cexp.y" +{ yyval.keywords = (struct arglist *) xmalloc (sizeof (struct arglist)); + yyval.keywords->name = yyvsp[-1].name.address; + yyval.keywords->length = yyvsp[-1].name.length; + yyval.keywords->next = yyvsp[0].keywords; ; + break;} +} + /* the action file gets copied in in place of this dollarsign */ +#line 487 "/usr/share/bison.simple" + + yyvsp -= yylen; + yyssp -= yylen; +#ifdef YYLSP_NEEDED + yylsp -= yylen; +#endif + +#if YYDEBUG != 0 + if (yydebug) + { + short *ssp1 = yyss - 1; + fprintf (stderr, "state stack now"); + while (ssp1 != yyssp) + fprintf (stderr, " %d", *++ssp1); + fprintf (stderr, "\n"); + } +#endif + + *++yyvsp = yyval; + +#ifdef YYLSP_NEEDED + yylsp++; + if (yylen == 0) + { + yylsp->first_line = yylloc.first_line; + yylsp->first_column = yylloc.first_column; + yylsp->last_line = (yylsp-1)->last_line; + yylsp->last_column = (yylsp-1)->last_column; + yylsp->text = 0; + } + else + { + yylsp->last_line = (yylsp+yylen-1)->last_line; + yylsp->last_column = (yylsp+yylen-1)->last_column; + } +#endif + + /* Now "shift" the result of the reduction. + Determine what state that goes to, + based on the state we popped back to + and the rule number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTBASE] + *yyssp; + if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTBASE]; + + goto yynewstate; + +yyerrlab: /* here on detecting error */ + + if (! yyerrstatus) + /* If not already recovering from an error, report this error. */ + { + ++yynerrs; + +#ifdef YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (yyn > YYFLAG && yyn < YYLAST) + { + int size = 0; + char *msg; + int x, count; + + count = 0; + /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + size += strlen(yytname[x]) + 15, count++; + msg = (char *) malloc(size + 15); + if (msg != 0) + { + strcpy(msg, "parse error"); + + if (count < 5) + { + count = 0; + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + { + strcat(msg, count == 0 ? ", expecting `" : " or `"); + strcat(msg, yytname[x]); + strcat(msg, "'"); + count++; + } + } + yyerror(msg); + free(msg); + } + else + yyerror ("parse error; also virtual memory exceeded"); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror("parse error"); + } + + goto yyerrlab1; +yyerrlab1: /* here on error raised explicitly by an action */ + + if (yyerrstatus == 3) + { + /* if just tried and failed to reuse lookahead token after an error, discard it. */ + + /* return failure if at end of input */ + if (yychar == YYEOF) + YYABORT; + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); +#endif + + yychar = YYEMPTY; + } + + /* Else will try to reuse lookahead token + after shifting the error token. */ + + yyerrstatus = 3; /* Each real token shifted decrements this */ + + goto yyerrhandle; + +yyerrdefault: /* current state does not do anything special for the error token. */ + +#if 0 + /* This is wrong; only states that explicitly want error tokens + should shift them. */ + yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ + if (yyn) goto yydefault; +#endif + +yyerrpop: /* pop the current state because it cannot handle the error token */ + + if (yyssp == yyss) YYABORT; + yyvsp--; + yystate = *--yyssp; +#ifdef YYLSP_NEEDED + yylsp--; +#endif + +#if YYDEBUG != 0 + if (yydebug) + { + short *ssp1 = yyss - 1; + fprintf (stderr, "Error: state stack now"); + while (ssp1 != yyssp) + fprintf (stderr, " %d", *++ssp1); + fprintf (stderr, "\n"); + } +#endif + +yyerrhandle: + + yyn = yypact[yystate]; + if (yyn == YYFLAG) + goto yyerrdefault; + + yyn += YYTERROR; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) + goto yyerrdefault; + + yyn = yytable[yyn]; + if (yyn < 0) + { + if (yyn == YYFLAG) + goto yyerrpop; + yyn = -yyn; + goto yyreduce; + } + else if (yyn == 0) + goto yyerrpop; + + if (yyn == YYFINAL) + YYACCEPT; + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Shifting error token, "); +#endif + + *++yyvsp = yylval; +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif + + yystate = yyn; + goto yynewstate; +} +#line 491 "cexp.y" + + +/* During parsing of a C expression, the pointer to the next character + is in this variable. */ + +static char *lexptr; + +/* Take care of parsing a number (anything that starts with a digit). + Set yylval and return the token type; update lexptr. + LEN is the number of characters in it. */ + +/* maybe needs to actually deal with floating point numbers */ + +static int +parse_number (olen) + int olen; +{ + register char *p = lexptr; + register int c; + register unsigned_HOST_WIDE_INT n = 0, nd, max_over_base; + register int base = 10; + register int len = olen; + register int overflow = 0; + register int digit, largest_digit = 0; + int spec_long = 0; + + yylval.integer.signedp = SIGNED; + + if (*p == '0') { + base = 8; + if (len >= 3 && (p[1] == 'x' || p[1] == 'X')) { + p += 2; + base = 16; + len -= 2; + } + } + + max_over_base = (unsigned_HOST_WIDE_INT) -1 / base; + + for (; len > 0; len--) { + c = *p++; + + if (c >= '0' && c <= '9') + digit = c - '0'; + else if (base == 16 && c >= 'a' && c <= 'f') + digit = c - 'a' + 10; + else if (base == 16 && c >= 'A' && c <= 'F') + digit = c - 'A' + 10; + else { + /* `l' means long, and `u' means unsigned. */ + while (1) { + if (c == 'l' || c == 'L') + { + if (!pedantic < spec_long) + yyerror ("too many `l's in integer constant"); + spec_long++; + } + else if (c == 'u' || c == 'U') + { + if (! yylval.integer.signedp) + yyerror ("two `u's in integer constant"); + yylval.integer.signedp = UNSIGNED; + } + else { + if (c == '.' || c == 'e' || c == 'E' || c == 'p' || c == 'P') + yyerror ("Floating point numbers not allowed in #if expressions"); + else { + char *buf = (char *) alloca (p - lexptr + 40); + sprintf (buf, "missing white space after number `%.*s'", + (int) (p - lexptr - 1), lexptr); + yyerror (buf); + } + } + + if (--len == 0) + break; + c = *p++; + } + /* Don't look for any more digits after the suffixes. */ + break; + } + if (largest_digit < digit) + largest_digit = digit; + nd = n * base + digit; + overflow |= (max_over_base < n) | (nd < n); + n = nd; + } + + if (base <= largest_digit) + pedwarn ("integer constant contains digits beyond the radix"); + + if (overflow) + pedwarn ("integer constant out of range"); + + /* If too big to be signed, consider it unsigned. */ + if (((HOST_WIDE_INT) n & yylval.integer.signedp) < 0) + { + if (base == 10) + warning ("integer constant is so large that it is unsigned"); + yylval.integer.signedp = UNSIGNED; + } + + lexptr = p; + yylval.integer.value = n; + return INT; +} + +struct token { + char *operator; + int token; +}; + +static struct token tokentab2[] = { + {"&&", AND}, + {"||", OR}, + {"<<", LSH}, + {">>", RSH}, + {"==", EQUAL}, + {"!=", NOTEQUAL}, + {"<=", LEQ}, + {">=", GEQ}, + {"++", ERROR}, + {"--", ERROR}, + {NULL, ERROR} +}; + +/* Read one token, getting characters through lexptr. */ + +static int +yylex () +{ + register int c; + register int namelen; + register unsigned char *tokstart; + register struct token *toktab; + int wide_flag; + HOST_WIDE_INT mask; + + retry: + + tokstart = (unsigned char *) lexptr; + c = *tokstart; + /* See if it is a special token of length 2. */ + if (! keyword_parsing) + for (toktab = tokentab2; toktab->operator != NULL; toktab++) + if (c == *toktab->operator && tokstart[1] == toktab->operator[1]) { + lexptr += 2; + if (toktab->token == ERROR) + { + char *buf = (char *) alloca (40); + sprintf (buf, "`%s' not allowed in operand of `#if'", toktab->operator); + yyerror (buf); + } + return toktab->token; + } + + switch (c) { + case '\n': + return 0; + + case ' ': + case '\t': + case '\r': + lexptr++; + goto retry; + + case 'L': + /* Capital L may start a wide-string or wide-character constant. */ + if (lexptr[1] == '\'') + { + lexptr++; + wide_flag = 1; + mask = MAX_WCHAR_TYPE_MASK; + goto char_constant; + } + if (lexptr[1] == '"') + { + lexptr++; + wide_flag = 1; + mask = MAX_WCHAR_TYPE_MASK; + goto string_constant; + } + break; + + case '\'': + wide_flag = 0; + mask = MAX_CHAR_TYPE_MASK; + char_constant: + lexptr++; + if (keyword_parsing) { + char *start_ptr = lexptr - 1; + while (1) { + c = *lexptr++; + if (c == '\\') + c = parse_escape (&lexptr, mask); + else if (c == '\'') + break; + } + yylval.name.address = tokstart; + yylval.name.length = lexptr - start_ptr; + return NAME; + } + + /* This code for reading a character constant + handles multicharacter constants and wide characters. + It is mostly copied from c-lex.c. */ + { + register HOST_WIDE_INT result = 0; + register int num_chars = 0; + unsigned width = MAX_CHAR_TYPE_SIZE; + int max_chars; + char *token_buffer; + + if (wide_flag) + { + width = MAX_WCHAR_TYPE_SIZE; +#ifdef MULTIBYTE_CHARS + max_chars = MB_CUR_MAX; +#else + max_chars = 1; +#endif + } + else + max_chars = MAX_LONG_TYPE_SIZE / width; + + token_buffer = (char *) alloca (max_chars + 1); + + while (1) + { + c = *lexptr++; + + if (c == '\'' || c == EOF) + break; + + if (c == '\\') + { + c = parse_escape (&lexptr, mask); + } + + num_chars++; + + /* Merge character into result; ignore excess chars. */ + if (num_chars <= max_chars) + { + if (width < HOST_BITS_PER_WIDE_INT) + result = (result << width) | c; + else + result = c; + token_buffer[num_chars - 1] = c; + } + } + + token_buffer[num_chars] = 0; + + if (c != '\'') + error ("malformatted character constant"); + else if (num_chars == 0) + error ("empty character constant"); + else if (num_chars > max_chars) + { + num_chars = max_chars; + error ("character constant too long"); + } + else if (num_chars != 1 && ! traditional) + warning ("multi-character character constant"); + + /* If char type is signed, sign-extend the constant. */ + if (! wide_flag) + { + int num_bits = num_chars * width; + + if (lookup ((U_CHAR *) "__CHAR_UNSIGNED__", + sizeof ("__CHAR_UNSIGNED__") - 1, -1) + || ((result >> (num_bits - 1)) & 1) == 0) + yylval.integer.value + = result & (~ (unsigned_HOST_WIDE_INT) 0 + >> (HOST_BITS_PER_WIDE_INT - num_bits)); + else + yylval.integer.value + = result | ~(~ (unsigned_HOST_WIDE_INT) 0 + >> (HOST_BITS_PER_WIDE_INT - num_bits)); + } + else + { +#ifdef MULTIBYTE_CHARS + /* Set the initial shift state and convert the next sequence. */ + result = 0; + /* In all locales L'\0' is zero and mbtowc will return zero, + so don't use it. */ + if (num_chars > 1 + || (num_chars == 1 && token_buffer[0] != '\0')) + { + wchar_t wc; + (void) mbtowc (NULL_PTR, NULL_PTR, 0); + if (mbtowc (& wc, token_buffer, num_chars) == num_chars) + result = wc; + else + pedwarn ("Ignoring invalid multibyte character"); + } +#endif + yylval.integer.value = result; + } + } + + /* This is always a signed type. */ + yylval.integer.signedp = SIGNED; + + return CHAR; + + /* some of these chars are invalid in constant expressions; + maybe do something about them later */ + case '/': + case '+': + case '-': + case '*': + case '%': + case '|': + case '&': + case '^': + case '~': + case '!': + case '@': + case '<': + case '>': + case '[': + case ']': + case '.': + case '?': + case ':': + case '=': + case '{': + case '}': + case ',': + case '#': + if (keyword_parsing) + break; + case '(': + case ')': + lexptr++; + return c; + + case '"': + mask = MAX_CHAR_TYPE_MASK; + string_constant: + if (keyword_parsing) { + char *start_ptr = lexptr; + lexptr++; + while (1) { + c = *lexptr++; + if (c == '\\') + c = parse_escape (&lexptr, mask); + else if (c == '"') + break; + } + yylval.name.address = tokstart; + yylval.name.length = lexptr - start_ptr; + return NAME; + } + yyerror ("string constants not allowed in #if expressions"); + return ERROR; + } + + if (c >= '0' && c <= '9' && !keyword_parsing) { + /* It's a number */ + for (namelen = 1; ; namelen++) { + int d = tokstart[namelen]; + if (! ((is_idchar[d] || d == '.') + || ((d == '-' || d == '+') + && (c == 'e' || c == 'E' + || ((c == 'p' || c == 'P') && ! c89)) + && ! traditional))) + break; + c = d; + } + return parse_number (namelen); + } + + /* It is a name. See how long it is. */ + + if (keyword_parsing) { + for (namelen = 0;; namelen++) { + if (is_space[tokstart[namelen]]) + break; + if (tokstart[namelen] == '(' || tokstart[namelen] == ')') + break; + if (tokstart[namelen] == '"' || tokstart[namelen] == '\'') + break; + } + } else { + if (!is_idstart[c]) { + yyerror ("Invalid token in expression"); + return ERROR; + } + + for (namelen = 0; is_idchar[tokstart[namelen]]; namelen++) + ; + } + + lexptr += namelen; + yylval.name.address = tokstart; + yylval.name.length = namelen; + return NAME; +} + + +/* Parse a C escape sequence. STRING_PTR points to a variable + containing a pointer to the string to parse. That pointer + is updated past the characters we use. The value of the + escape sequence is returned. + + RESULT_MASK is used to mask out the result; + an error is reported if bits are lost thereby. + + A negative value means the sequence \ newline was seen, + which is supposed to be equivalent to nothing at all. + + If \ is followed by a null character, we return a negative + value and leave the string pointer pointing at the null character. + + If \ is followed by 000, we return 0 and leave the string pointer + after the zeros. A value of 0 does not mean end of string. */ + +HOST_WIDE_INT +parse_escape (string_ptr, result_mask) + char **string_ptr; + HOST_WIDE_INT result_mask; +{ + register int c = *(*string_ptr)++; + switch (c) + { + case 'a': + return TARGET_BELL; + case 'b': + return TARGET_BS; + case 'e': + case 'E': + if (pedantic) + pedwarn ("non-ANSI-standard escape sequence, `\\%c'", c); + return 033; + case 'f': + return TARGET_FF; + case 'n': + return TARGET_NEWLINE; + case 'r': + return TARGET_CR; + case 't': + return TARGET_TAB; + case 'v': + return TARGET_VT; + case '\n': + return -2; + case 0: + (*string_ptr)--; + return 0; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + { + register HOST_WIDE_INT i = c - '0'; + register int count = 0; + while (++count < 3) + { + c = *(*string_ptr)++; + if (c >= '0' && c <= '7') + i = (i << 3) + c - '0'; + else + { + (*string_ptr)--; + break; + } + } + if (i != (i & result_mask)) + { + i &= result_mask; + pedwarn ("octal escape sequence out of range"); + } + return i; + } + case 'x': + { + register unsigned_HOST_WIDE_INT i = 0, overflow = 0; + register int digits_found = 0, digit; + for (;;) + { + c = *(*string_ptr)++; + if (c >= '0' && c <= '9') + digit = c - '0'; + else if (c >= 'a' && c <= 'f') + digit = c - 'a' + 10; + else if (c >= 'A' && c <= 'F') + digit = c - 'A' + 10; + else + { + (*string_ptr)--; + break; + } + overflow |= i ^ (i << 4 >> 4); + i = (i << 4) + digit; + digits_found = 1; + } + if (!digits_found) + yyerror ("\\x used with no following hex digits"); + if (overflow | (i != (i & result_mask))) + { + i &= result_mask; + pedwarn ("hex escape sequence out of range"); + } + return i; + } + default: + return c; + } +} + +static void +yyerror (s) + char *s; +{ + error ("%s", s); + skip_evaluation = 0; + longjmp (parse_return_error, 1); +} + +static void +integer_overflow () +{ + if (!skip_evaluation && pedantic) + pedwarn ("integer overflow in preprocessor expression"); +} + +static HOST_WIDE_INT +left_shift (a, b) + struct constant *a; + unsigned_HOST_WIDE_INT b; +{ + /* It's unclear from the C standard whether shifts can overflow. + The following code ignores overflow; perhaps a C standard + interpretation ruling is needed. */ + if (b >= HOST_BITS_PER_WIDE_INT) + return 0; + else + return (unsigned_HOST_WIDE_INT) a->value << b; +} + +static HOST_WIDE_INT +right_shift (a, b) + struct constant *a; + unsigned_HOST_WIDE_INT b; +{ + if (b >= HOST_BITS_PER_WIDE_INT) + return a->signedp ? a->value >> (HOST_BITS_PER_WIDE_INT - 1) : 0; + else if (a->signedp) + return a->value >> b; + else + return (unsigned_HOST_WIDE_INT) a->value >> b; +} + +/* This page contains the entry point to this file. */ + +/* Parse STRING as an expression, and complain if this fails + to use up all of the contents of STRING. + STRING may contain '\0' bytes; it is terminated by the first '\n' + outside a string constant, so that we can diagnose '\0' properly. + If WARN_UNDEFINED is nonzero, warn if undefined identifiers are evaluated. + We do not support C comments. They should be removed before + this function is called. */ + +HOST_WIDE_INT +parse_c_expression (string, warn_undefined) + char *string; + int warn_undefined; +{ + lexptr = string; + warn_undef = warn_undefined; + + /* if there is some sort of scanning error, just return 0 and assume + the parsing routine has printed an error message somewhere. + there is surely a better thing to do than this. */ + if (setjmp (parse_return_error)) + return 0; + + if (yyparse () != 0) + abort (); + + if (*lexptr != '\n') + error ("Junk after end of expression."); + + return expression_value; /* set by yyparse () */ +} + +#ifdef TEST_EXP_READER + +#if YYDEBUG +extern int yydebug; +#endif + +int pedantic; +int traditional; + +int main PROTO((int, char **)); +static void initialize_random_junk PROTO((void)); +static void print_unsigned_host_wide_int PROTO((unsigned_HOST_WIDE_INT)); + +/* Main program for testing purposes. */ +int +main (argc, argv) + int argc; + char **argv; +{ + int n, c; + char buf[1024]; + unsigned_HOST_WIDE_INT u; + + pedantic = 1 < argc; + traditional = 2 < argc; +#if YYDEBUG + yydebug = 3 < argc; +#endif + initialize_random_junk (); + + for (;;) { + printf ("enter expression: "); + n = 0; + while ((buf[n] = c = getchar ()) != '\n' && c != EOF) + n++; + if (c == EOF) + break; + parse_c_expression (buf, 1); + printf ("parser returned "); + u = (unsigned_HOST_WIDE_INT) expression_value; + if (expression_value < 0 && expression_signedp) { + u = -u; + printf ("-"); + } + if (u == 0) + printf ("0"); + else + print_unsigned_host_wide_int (u); + if (! expression_signedp) + printf("u"); + printf ("\n"); + } + + return 0; +} + +static void +print_unsigned_host_wide_int (u) + unsigned_HOST_WIDE_INT u; +{ + if (u) { + print_unsigned_host_wide_int (u / 10); + putchar ('0' + (int) (u % 10)); + } +} + +/* table to tell if char can be part of a C identifier. */ +unsigned char is_idchar[256]; +/* table to tell if char can be first char of a c identifier. */ +unsigned char is_idstart[256]; +/* table to tell if c is horizontal or vertical space. */ +unsigned char is_space[256]; + +/* + * initialize random junk in the hash table and maybe other places + */ +static void +initialize_random_junk () +{ + register int i; + + /* + * Set up is_idchar and is_idstart tables. These should be + * faster than saying (is_alpha (c) || c == '_'), etc. + * Must do set up these things before calling any routines tthat + * refer to them. + */ + for (i = 'a'; i <= 'z'; i++) { + ++is_idchar[i - 'a' + 'A']; + ++is_idchar[i]; + ++is_idstart[i - 'a' + 'A']; + ++is_idstart[i]; + } + for (i = '0'; i <= '9'; i++) + ++is_idchar[i]; + ++is_idchar['_']; + ++is_idstart['_']; + ++is_idchar['$']; + ++is_idstart['$']; + + ++is_space[' ']; + ++is_space['\t']; + ++is_space['\v']; + ++is_space['\f']; + ++is_space['\n']; + ++is_space['\r']; +} + +void +error (PRINTF_ALIST (msg)) + PRINTF_DCL (msg) +{ + va_list args; + + VA_START (args, msg); + fprintf (stderr, "error: "); + vfprintf (stderr, msg, args); + fprintf (stderr, "\n"); + va_end (args); +} + +void +pedwarn (PRINTF_ALIST (msg)) + PRINTF_DCL (msg) +{ + va_list args; + + VA_START (args, msg); + fprintf (stderr, "pedwarn: "); + vfprintf (stderr, msg, args); + fprintf (stderr, "\n"); + va_end (args); +} + +void +warning (PRINTF_ALIST (msg)) + PRINTF_DCL (msg) +{ + va_list args; + + VA_START (args, msg); + fprintf (stderr, "warning: "); + vfprintf (stderr, msg, args); + fprintf (stderr, "\n"); + va_end (args); +} + +int +check_assertion (name, sym_length, tokens_specified, tokens) + U_CHAR *name; + int sym_length; + int tokens_specified; + struct arglist *tokens; +{ + return 0; +} + +struct hashnode * +lookup (name, len, hash) + U_CHAR *name; + int len; + int hash; +{ + return (DEFAULT_SIGNED_CHAR) ? 0 : ((struct hashnode *) -1); +} + +GENERIC_PTR +xmalloc (size) + size_t size; +{ + return (GENERIC_PTR) malloc (size); +} +#endif diff --git a/gnu/usr.bin/gcc/choose-temp.c b/gnu/usr.bin/gcc/choose-temp.c new file mode 100644 index 00000000000..d8808ba02c3 --- /dev/null +++ b/gnu/usr.bin/gcc/choose-temp.c @@ -0,0 +1,146 @@ +/* Utility to pick a temporary filename prefix. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + +This file is part of the libiberty library. +Libiberty is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +Libiberty is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with libiberty; see the file COPYING.LIB. If not, +write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* This file exports one function: choose_temp_base. */ + +/* This file lives in at least two places: libiberty and gcc. + Don't change one without the other. */ + +#ifdef IN_GCC +#include "config.h" +#endif + +#ifdef HAVE_SYS_FILE_H +#include <sys/types.h> +#include <sys/file.h> /* May get R_OK, etc. on some systems. */ +#endif + +#ifndef R_OK +#define R_OK 4 +#define W_OK 2 +#define X_OK 1 +#endif + +#include <stdio.h> /* May get P_tmpdir. */ + +#ifdef IN_GCC +#include "gansidecl.h" +extern char *xmalloc (); +#else +#include "ansidecl.h" +#include "libiberty.h" +#if defined (__MSDOS__) || defined (_WIN32) +#define DIR_SEPARATOR '\\' +#endif +#endif + +#ifndef DIR_SEPARATOR +#define DIR_SEPARATOR '/' +#endif + +/* On MSDOS, write temp files in current dir + because there's no place else we can expect to use. */ +/* ??? Although the current directory is tried as a last resort, + this is left in so that on MSDOS it is preferred to /tmp on the + off chance that someone requires this, since that was the previous + behaviour. */ +#ifdef __MSDOS__ +#ifndef P_tmpdir +#define P_tmpdir "." +#endif +#endif + +/* Name of temporary file. + mktemp requires 6 trailing X's. */ +#define TEMP_FILE "ccXXXXXX" + +/* Subroutine of choose_temp_base. + If BASE is non-NULL, return it. + Otherwise it checks if DIR is a usable directory. + If success, DIR is returned. + Otherwise NULL is returned. */ + +static char * +try (dir, base) + char *dir, *base; +{ + if (base != 0) + return base; + if (dir != 0 + && access (dir, R_OK | W_OK | X_OK) == 0) + return dir; + return 0; +} + +/* Return a prefix for temporary file names or NULL if unable to find one. + The current directory is chosen if all else fails so the program is + exited if a temporary directory can't be found (mktemp fails). + The buffer for the result is obtained with xmalloc. */ + +char * +choose_temp_base () +{ + char *base = 0; + char *temp_filename; + int len; + static char tmp[] = { DIR_SEPARATOR, 't', 'm', 'p', 0 }; + static char usrtmp[] = { DIR_SEPARATOR, 'u', 's', 'r', DIR_SEPARATOR, 't', 'm', 'p', 0 }; + +#ifndef MPW + base = try (getenv ("TMPDIR"), base); + base = try (getenv ("TMP"), base); + base = try (getenv ("TEMP"), base); + +#ifdef P_tmpdir + base = try (P_tmpdir, base); +#endif + + /* Try /usr/tmp, then /tmp. */ + base = try (usrtmp, base); + base = try (tmp, base); + + /* If all else fails, use the current directory! */ + if (base == 0) + base = "."; + +#else /* MPW */ + base = ":"; +#endif + + len = strlen (base); + temp_filename = xmalloc (len + 1 /*DIR_SEPARATOR*/ + + strlen (TEMP_FILE) + 1); + strcpy (temp_filename, base); + +#ifndef MPW + if (len != 0 + && temp_filename[len-1] != '/' + && temp_filename[len-1] != DIR_SEPARATOR) + temp_filename[len++] = DIR_SEPARATOR; +#else /* MPW */ + if (temp_filename[len-1] != ':') + temp_filename[len++] = ':'; +#endif /* MPW */ + strcpy (temp_filename + len, TEMP_FILE); + + mktemp (temp_filename); + if (strlen (temp_filename) == 0) + abort (); + return temp_filename; +} diff --git a/gnu/usr.bin/gcc/config.in b/gnu/usr.bin/gcc/config.in new file mode 100644 index 00000000000..a99b05fc19c --- /dev/null +++ b/gnu/usr.bin/gcc/config.in @@ -0,0 +1,108 @@ +/* config.in. Generated automatically from configure.in by autoheader. */ +/* Define if you have a working <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* Whether malloc must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_MALLOC + +/* Whether realloc must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_REALLOC + +/* Whether calloc must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_CALLOC + +/* Whether free must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_FREE + +/* Whether index must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_INDEX + +/* Whether rindex must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_RINDEX + +/* Whether getenv must be declared even if <stdlib.h> is included. */ +#undef NEED_DECLARATION_GETENV + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if `sys_siglist' is declared by <signal.h>. */ +#undef SYS_SIGLIST_DECLARED + +/* Define if you can safely include both <sys/time.h> and <time.h>. */ +#undef TIME_WITH_SYS_TIME + +/* Define if you have the bcmp function. */ +#undef HAVE_BCMP + +/* Define if you have the bcopy function. */ +#undef HAVE_BCOPY + +/* Define if you have the bzero function. */ +#undef HAVE_BZERO + +/* Define if you have the getrlimit function. */ +#undef HAVE_GETRLIMIT + +/* Define if you have the index function. */ +#undef HAVE_INDEX + +/* Define if you have the kill function. */ +#undef HAVE_KILL + +/* Define if you have the popen function. */ +#undef HAVE_POPEN + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + +/* Define if you have the rindex function. */ +#undef HAVE_RINDEX + +/* Define if you have the setrlimit function. */ +#undef HAVE_SETRLIMIT + +/* Define if you have the strerror function. */ +#undef HAVE_STRERROR + +/* Define if you have the vprintf function. */ +#undef HAVE_VPRINTF + +/* Define if you have the <fcntl.h> header file. */ +#undef HAVE_FCNTL_H + +/* Define if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the <stddef.h> header file. */ +#undef HAVE_STDDEF_H + +/* Define if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define if you have the <sys/file.h> header file. */ +#undef HAVE_SYS_FILE_H + +/* Define if you have the <sys/param.h> header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the <sys/resource.h> header file. */ +#undef HAVE_SYS_RESOURCE_H + +/* Define if you have the <sys/time.h> header file. */ +#undef HAVE_SYS_TIME_H + +/* Define if you have the <sys/times.h> header file. */ +#undef HAVE_SYS_TIMES_H + +/* Define if you have the <time.h> header file. */ +#undef HAVE_TIME_H + +/* Define if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H diff --git a/gnu/usr.bin/gcc/configure.frag b/gnu/usr.bin/gcc/configure.frag new file mode 100644 index 00000000000..4bdac943f6d --- /dev/null +++ b/gnu/usr.bin/gcc/configure.frag @@ -0,0 +1,77 @@ +# configure.frag for GNU CC +# Process the host/target/language Makefile fragments. + +# Copyright (C) 1997 Free Software Foundation, Inc. + +#This file is part of GNU CC. + +#GNU CC is free software; you can redistribute it and/or modify +#it under the terms of the GNU General Public License as published by +#the Free Software Foundation; either version 2, or (at your option) +#any later version. + +#GNU CC is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with GNU CC; see the file COPYING. If not, write to +#the Free Software Foundation, 59 Temple Place - Suite 330, +#Boston, MA 02111-1307, USA. + +# First parameter is the source directory, second is list of subdirectories, +# third is list of host makefile fragments, fourth is list of target makefile +# fragments. + +srcdir=$1 +subdirs=$2 +xmake_files=$3 +tmake_files=$4 + +# Copy all the host makefile fragments into Make-host. + +rm -f Make-host +touch Make-host +for f in .. $xmake_files +do + if [ -f $f ] + then + cat $f >> Make-host + fi +done + +# Copy all the target makefile fragments into Make-target. + +rm -f Make-target +touch Make-target +for f in .. $tmake_files +do + if [ -f $f ] + then + cat $f >> Make-target + fi +done + +# Ensure the language build subdirectories exist. + +for subdir in . $subdirs +do + if [ $subdir != . ] + then + test -d $subdir || mkdir $subdir + fi +done + +# Now copy each language's Make-lang.in file to Make-lang. + +rm -f Make-lang +touch Make-lang + +for subdir in . $subdirs +do + if [ $subdir != . ] + then + cat $srcdir/$subdir/Make-lang.in >> Make-lang + fi +done diff --git a/gnu/usr.bin/gcc/configure.in b/gnu/usr.bin/gcc/configure.in new file mode 100644 index 00000000000..dc56c959d63 --- /dev/null +++ b/gnu/usr.bin/gcc/configure.in @@ -0,0 +1,3271 @@ +# configure.in for GNU CC +# Process this file with autoconf to generate a configuration script. + +# Copyright (C) 1997 Free Software Foundation, Inc. + +#This file is part of GNU CC. + +#GNU CC is free software; you can redistribute it and/or modify +#it under the terms of the GNU General Public License as published by +#the Free Software Foundation; either version 2, or (at your option) +#any later version. + +#GNU CC is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with GNU CC; see the file COPYING. If not, write to +#the Free Software Foundation, 59 Temple Place - Suite 330, +#Boston, MA 02111-1307, USA. + +# Initialization and defaults +AC_INIT(tree.c) +AC_CONFIG_HEADER(auto-config.h:config.in) + +native_prefix=/usr +remove=rm +hard_link=ln +symbolic_link='ln -s' +copy=cp + +# Check for additional parameters + +# With GNU ld +AC_ARG_WITH(gnu-ld, +[ --with-gnu-ld arrange to work with GNU ld.], +gnu_ld=yes, +gnu_ld=no) + +# With GNU as +AC_ARG_WITH(gnu-as, +[ --with-gnu-as arrange to work with GNU as.], +gas=yes, +gas=no) + +# With stabs +AC_ARG_WITH(stabs, +[ --with-stabs arrange to use stabs instead of host debug format.], +stabs=yes, +stabs=no) + +# With ELF +AC_ARG_WITH(elf, +[ --with-elf arrange to use ELF instead of host debug format.], +elf=yes, +elf=no) + +# Specify the local prefix +AC_ARG_WITH(local-prefix, +[ --with-local-prefix=DIR specifies directory to put local include.], +local_prefix=$with_local_prefix, +local_prefix=/usr/local) + +# Default local prefix if it is empty +if [[ x$local_prefix = x ]]; then + local_prefix=/usr/local +fi + +# Specify the g++ header file directory +AC_ARG_WITH(gxx-include-dir, +[ --with-gxx-include-dir=DIR + specifies directory to put g++ header files.], +gxx_include_dir=$with_gxx_include_dir, +gxx_include_dir='${prefix}/include/g++') + +# Default g++ header file directory if it is empty +if [[ x$gxx_include_dir = x ]]; then + gxx_include_dir='${prefix}/include/g++' +fi + +# Enable use of cpplib for C. +AC_ARG_ENABLE(c-cpplib, +[ --enable-c-cpplib Use cpplib for C.], +if [[[ x$enable_c_cpplib != xno ]]]; then + extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o" + extra_c_flags=-DUSE_CPPLIB=1 +fi) + +# Enable threads +# Pass with no value to take the default +# Pass with a value to specify a thread package +AC_ARG_ENABLE(threads, +[ --enable-threads enable thread usage for target GCC. + --enable-threads=LIB use LIB thread package for target GCC.], +if [[[ x$enable_threads = xno ]]]; then + enable_threads='' +fi, +enable_threads='') + +# Check if a valid thread package +case x${enable_threads} in + x | xno) + # No threads + thread_file='single' + ;; + xyes) + # default + thread_file='' + ;; + xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \ + xsolaris | xwin32) + thread_file=$enable_threads + ;; + *) + echo "$enable_threads is an unknown thread package" 1>&2 + exit 1 + ;; +esac + +# Determine the host, build, and target systems +AC_CANONICAL_SYSTEM + +# Find the native compiler +AC_PROG_CC +AC_PROG_MAKE_SET + +# Find some useful tools +AC_PROG_AWK +AC_PROG_LEX +AC_PROG_RANLIB +AC_PROG_YACC +AC_PROG_INSTALL + +AC_HEADER_STDC +AC_HEADER_TIME +AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h) + +# Use <inttypes.h> only if it exists, +# doesn't clash with <sys/types.h>, and declares intmax_t. +AC_MSG_CHECKING(for inttypes.h) +AC_CACHE_VAL(gcc_cv_header_inttypes_h, +[AC_TRY_COMPILE( + [#include <sys/types.h> +#include <inttypes.h>], + [intmax_t i = -1;], + gcc_cv_header_inttypes_h=yes, + gcc_cv_header_inttypes_h=no)]) +AC_MSG_RESULT($gcc_cv_header_inttypes_h) +if test $gcc_cv_header_inttypes_h = yes; then + AC_DEFINE(HAVE_INTTYPES_H) +fi + +AC_CHECK_FUNCS(strerror) +AC_CHECK_FUNCS(putenv) +AC_CHECK_FUNCS(popen) +AC_CHECK_FUNCS(vprintf) +AC_CHECK_FUNCS(bcopy) +AC_CHECK_FUNCS(bzero) +AC_CHECK_FUNCS(bcmp) +AC_CHECK_FUNCS(index) +AC_CHECK_FUNCS(rindex) +AC_CHECK_FUNCS(kill) +AC_CHECK_FUNCS(getrlimit) +AC_CHECK_FUNCS(setrlimit) + +GCC_NEED_DECLARATION(malloc) +GCC_NEED_DECLARATION(realloc) +GCC_NEED_DECLARATION(calloc) +GCC_NEED_DECLARATION(free) +GCC_NEED_DECLARATION(index) +GCC_NEED_DECLARATION(rindex) +GCC_NEED_DECLARATION(getenv) + +AC_DECL_SYS_SIGLIST + +# File extensions +manext='.1' +objext='.o' +AC_SUBST(manext) +AC_SUBST(objext) + +build_xm_file= +build_broken_install= +build_install_headers_dir=install-headers-tar +build_exeext= +host_xm_file= +host_xmake_file= +host_truncate_target= + +# Decode the host machine, then the target machine. +# For the host machine, we save the xm_file variable as host_xm_file; +# then we decode the target machine and forget everything else +# that came from the host machine. +for machine in $build $host $target; do + + out_file= + xmake_file= + tmake_file= + extra_headers= + extra_passes= + extra_parts= + extra_programs= + extra_objs= + extra_host_objs= + extra_gcc_objs= + float_format= + # Set this to force installation and use of collect2. + use_collect2= + # Set this to override the default target model. + target_cpu_default= + # Set this to force use of install.sh. + broken_install= + # Set this to control which fixincludes program to use. + fixincludes=fixincludes + # Set this to control how the header file directory is installed. + install_headers_dir=install-headers-tar + # Set this to a non-empty list of args to pass to cpp if the target + # wants its .md file passed through cpp. + md_cppflags= + # Set this if directory names should be truncated to 14 characters. + truncate_target= + # Set this if gdb needs a dir command with `dirname $out_file` + gdb_needs_out_file_path= + # Set this if the build machine requires executables to have a + # file name suffix. + exeext= + + # Set default cpu_type, tm_file and xm_file so it can be updated in + # each machine entry. + cpu_type=`echo $machine | sed 's/-.*$//'` + case $machine in + alpha*-*-*) + cpu_type=alpha + ;; + arm*-*-*) + cpu_type=arm + ;; + c*-convex-*) + cpu_type=convex + ;; + i[[3456]]86-*-*) + cpu_type=i386 + ;; + hppa*-*-*) + cpu_type=pa + ;; + m68000-*-*) + cpu_type=m68k + ;; + mips*-*-*) + cpu_type=mips + ;; + powerpc*-*-*) + cpu_type=rs6000 + ;; + pyramid-*-*) + cpu_type=pyr + ;; + sparc*-*-*) + cpu_type=sparc + ;; + esac + + tm_file=${cpu_type}/${cpu_type}.h + xm_file=${cpu_type}/xm-${cpu_type}.h + + case $machine in + # Support site-specific machine types. + *local*) + cpu_type=`echo $machine | sed -e 's/-.*//'` + rest=`echo $machine | sed -e "s/$cpu_type-//"` + xm_file=${cpu_type}/xm-$rest.h + tm_file=${cpu_type}/$rest.h + if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \ + then xmake_file=${cpu_type}/x-$rest; \ + else true; \ + fi + if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \ + then tmake_file=${cpu_type}/t-$rest; \ + else true; \ + fi + ;; + 1750a-*-*) + ;; + a29k-*-bsd* | a29k-*-sym1*) + tm_file="${tm_file} a29k/unix.h" + xm_file=a29k/xm-unix.h + xmake_file=a29k/x-unix + use_collect2=yes + ;; + a29k-*-udi | a29k-*-coff) + tm_file="${tm_file} dbxcoff.h a29k/udi.h" + tmake_file=a29k/t-a29kbare + ;; + a29k-*-vxworks*) + tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h" + tmake_file=a29k/t-vx29k + extra_parts="crtbegin.o crtend.o" + ;; + a29k-*-*) # Default a29k environment. + use_collect2=yes + ;; + alpha*-*-linux-gnuecoff*) + tm_file="${tm_file} alpha/linux.h" + xm_file="${xm_file} alpha/xm-linux.h" + target_cpu_default="MASK_GAS" + gas=no + xmake_file=none + fixincludes=Makefile.in + gas=yes gnu_ld=yes + ;; + alpha*-*-linux-gnulibc1*) + tm_file="${tm_file} alpha/linux.h alpha/elf.h" + xm_file="${xm_file} alpha/xm-linux.h" + target_cpu_default="MASK_GAS" + tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux" + xmake_file=none + fixincludes=Makefile.in + gas=yes gnu_ld=yes + if [[ x$enable_threads = xyes ]]; then + thread_file='posix' + fi + ;; + alpha*-*-linux-gnu*) + tm_file="${tm_file} alpha/linux.h alpha/elf.h" + xm_file="${xm_file} alpha/xm-linux.h" + target_cpu_default="MASK_GAS" + tmake_file="t-linux alpha/t-linux" + xmake_file=none + fixincludes=Makefile.in + gas=yes gnu_ld=yes + if [[ x$enable_threads = xyes ]]; then + thread_file='posix' + fi + ;; + alpha*-dec-osf*) + if [[ x$stabs = xyes ]] + then + tm_file="${tm_file} dbx.h" + fi + if [[ x$gas != xyes ]] + then + extra_passes="mips-tfile mips-tdump" + fi + broken_install=yes + use_collect2=yes + case $machine in + *-*-osf1.2) + tm_file="${tm_file} alpha/osf12.h alpha/osf2or3.h" + ;; + *-*-osf[[23]]*) + tm_file="${tm_file} alpha/osf2or3.h" + ;; + *-*-osf4*) + # Some versions of OSF4 (specifically X4.0-9 296.7) have + # a broken tar, so we use cpio instead. + install_headers_dir=install-headers-cpio + ;; + esac + case $machine in + *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*) + target_cpu_default=MASK_SUPPORT_ARCH + ;; + esac + ;; + alpha*-*-winnt3*) + tm_file="${tm_file} alpha/win-nt.h" + target_cpu_default=MASK_WINDOWS_NT + xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h" + tmake_file=t-libc-ok + xmake_file=winnt/x-winnt + extra_host_objs=oldnames.o + extra_gcc_objs="spawnv.o oldnames.o" + fixincludes=fixinc.winnt + if [[ x$gnu_ld != xyes ]] + then + extra_programs=ld.exe + fi + if [[ x$enable_threads = xyes ]]; then + thread_file='win32' + fi + ;; + alpha*-dec-vms*) + tm_file=alpha/vms.h + xm_file="${xm_file} alpha/xm-vms.h" + tmake_file=alpha/t-vms + fixincludes=Makefile.in + ;; + arc-*-elf*) + extra_parts="crtinit.o crtfini.o" + ;; + arm-*-coff* | armel-*-coff*) + tm_file=arm/coff.h + tmake_file=arm/t-bare + ;; + arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions) + tm_file=arm/riscix1-1.h + use_collect2=yes + ;; + arm-*-riscix*) # Acorn RISC machine + if [[ x$gas = xyes ]] + then + tm_file=arm/rix-gas.h + else + tm_file=arm/riscix.h + fi + xmake_file=arm/x-riscix + tmake_file=arm/t-riscix + use_collect2=yes + ;; + arm-semi-aout | armel-semi-aout) + tm_file=arm/semi.h + tmake_file=arm/t-semi + fixincludes=Makefile.in # There is nothing to fix + ;; + arm-semi-aof | armel-semi-aof) + tm_file=arm/semiaof.h + tmake_file=arm/t-semiaof + fixincludes=Makefile.in # There is nothing to fix + ;; + arm-*-netbsd*) + tm_file=arm/netbsd.h + xm_file=arm/xm-netbsd.h + tmake_file="t-netbsd arm/t-netbsd" + # On NetBSD, the headers are already okay, except for math.h. + fixincludes=fixinc.math + ;; + arm-*-linux-gnuaout*) # ARM GNU/Linux + cpu_type=arm + xm_file=arm/xm-linux.h + xmake_file=x-linux + tm_file=arm/linux-gas.h + tmake_file=arm/t-linux + fixincludes=Makefile.in + broken_install=yes + gnu_ld=yes + ;; + arm-*-aout) + tm_file=arm/aout.h + tmake_file=arm/t-bare + ;; + c1-convex-*) # Convex C1 + target_cpu_default=1 + use_collect2=yes + fixincludes=Makefile.in + ;; + c2-convex-*) # Convex C2 + target_cpu_default=2 + use_collect2=yes + fixincludes=Makefile.in + ;; + c32-convex-*) + target_cpu_default=4 + use_collect2=yes + fixincludes=Makefile.in + ;; + c34-convex-*) + target_cpu_default=8 + use_collect2=yes + fixincludes=Makefile.in + ;; + c38-convex-*) + target_cpu_default=16 + use_collect2=yes + fixincludes=Makefile.in + ;; + clipper-intergraph-clix*) + tm_file="${tm_file} svr3.h clipper/clix.h" + xm_file=clipper/xm-clix.h + xmake_file=clipper/x-clix + extra_headers=va-clipper.h + extra_parts="crtbegin.o crtend.o" + install_headers_dir=install-headers-cpio + broken_install=yes + ;; + dsp16xx-*) + ;; + elxsi-elxsi-*) + use_collect2=yes + ;; +# This hasn't been upgraded to GCC 2. +# fx80-alliant-*) # Alliant FX/80 +# ;; + h8300-*-*) + float_format=i32 + ;; + hppa1.1-*-pro*) + tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h" + xm_file=pa/xm-papro.h + tmake_file=pa/t-pro + ;; + hppa1.1-*-osf*) + target_cpu_default=1 + tm_file="${tm_file} pa/pa-osf.h" + use_collect2=yes + fixincludes=Makefile.in + ;; + hppa1.1-*-rtems*) + tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h" + xm_file=pa/xm-papro.h + tmake_file=pa/t-pro + ;; + hppa1.0-*-osf*) + tm_file="${tm_file} pa/pa-osf.h" + use_collect2=yes + fixincludes=Makefile.in + ;; + hppa1.1-*-bsd*) + target_cpu_default=1 + use_collect2=yes + fixincludes=Makefile.in + ;; + hppa1.0-*-bsd*) + use_collect2=yes + fixincludes=Makefile.in + ;; + hppa1.0-*-hpux7*) + tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h" + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + if [[ x$gas = xyes ]] + then + tm_file="${tm_file} pa/gas.h" + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; + hppa1.0-*-hpux8.0[[0-2]]*) + tm_file="${tm_file} pa/pa-hpux.h" + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + if [[ x$gas = xyes ]] + then + tm_file="${tm_file} pa/pa-gas.h" + else + tm_file="pa/pa-oldas.h ${tm_file}" + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; + hppa1.1-*-hpux8.0[[0-2]]*) + target_cpu_default=1 + tm_file="${tm_file} pa/pa-hpux.h" + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + if [[ x$gas = xyes ]] + then + tm_file="${tm_file} pa/pa-gas.h" + else + tm_file="pa/pa-oldas.h ${tm_file}" + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; + hppa1.1-*-hpux8*) + target_cpu_default=1 + tm_file="${tm_file} pa/pa-hpux.h" + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + if [[ x$gas = xyes ]] + then + tm_file="${tm_file} pa/pa-gas.h" + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; + hppa1.0-*-hpux8*) + tm_file="${tm_file} pa/pa-hpux.h" + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + if [[ x$gas = xyes ]] + then + tm_file="${tm_file} pa/pa-gas.h" + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; + hppa1.1-*-hpux10*) + target_cpu_default=1 + tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h" + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + if [[ x$gas = xyes ]] + then + tm_file="${tm_file} pa/pa-gas.h" + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; + hppa1.0-*-hpux10*) + tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h" + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + if [[ x$gas = xyes ]] + then + tm_file="${tm_file} pa/pa-gas.h" + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; + hppa1.1-*-hpux*) + target_cpu_default=1 + tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h" + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + if [[ x$gas = xyes ]] + then + tm_file="${tm_file} pa/pa-gas.h" + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; + hppa1.0-*-hpux*) + tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h" + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + if [[ x$gas = xyes ]] + then + tm_file="${tm_file} pa/pa-gas.h" + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; + hppa1.1-*-hiux*) + target_cpu_default=1 + tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h" + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + if [[ x$gas = xyes ]] + then + tm_file="${tm_file} pa/pa-gas.h" + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; + hppa1.0-*-hiux*) + tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h" + xm_file=pa/xm-pahpux.h + xmake_file=pa/x-pa-hpux + if [[ x$gas = xyes ]] + then + tm_file="${tm_file} pa/pa-gas.h" + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + ;; + hppa*-*-lites*) + target_cpu_default=1 + use_collect2=yes + fixincludes=Makefile.in + ;; + i370-*-mvs*) + ;; + i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX + if [[ x$gas = xyes ]] + then + tm_file=i386/aix386.h + extra_parts="crtbegin.o crtend.o" + tmake_file=i386/t-crtstuff + else + tm_file=i386/aix386ng.h + use_collect2=yes + fi + xm_file=i386/xm-aix.h + xmake_file=i386/x-aix + broken_install=yes + ;; + i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4 + xm_file=i386/xm-sysv4.h + xmake_file=i386/x-ncr3000 + if [[ x$stabs = xyes -a x$gas = xyes ]] + then + tm_file=i386/sysv4gdb.h + else + tm_file=i386/sysv4.h + fi + extra_parts="crtbegin.o crtend.o" + tmake_file=i386/t-crtpic + ;; + i[[3456]]86-next-*) + tm_file=i386/next.h + xm_file=i386/xm-next.h + tmake_file=i386/t-next + xmake_file=i386/x-next + extra_objs=nextstep.o + if [[ x$enable_threads = xyes ]]; then + thread_file='mach' + fi + ;; + i[[3456]]86-sequent-bsd*) # 80386 from Sequent + use_collect2=yes + if [[ x$gas = xyes ]] + then + tm_file=i386/seq-gas.h + else + tm_file=i386/sequent.h + fi + ;; + i[[3456]]86-sequent-ptx1*) + xm_file=i386/xm-sysv3.h + xmake_file=i386/x-sysv3 + tm_file=i386/seq-sysv3.h + tmake_file=i386/t-crtstuff + fixincludes=fixinc.ptx + extra_parts="crtbegin.o crtend.o" + install_headers_dir=install-headers-cpio + broken_install=yes + ;; + i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*) + xm_file=i386/xm-sysv3.h + xmake_file=i386/x-sysv3 + tm_file=i386/seq2-sysv3.h + tmake_file=i386/t-crtstuff + extra_parts="crtbegin.o crtend.o" + fixincludes=fixinc.ptx + install_headers_dir=install-headers-cpio + broken_install=yes + ;; + i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*) + xm_file=i386/xm-sysv4.h + xmake_file=x-svr4 + tm_file=i386/ptx4-i.h + tmake_file=t-svr4 + extra_parts="crtbegin.o crtend.o" + fixincludes=fixinc.ptx + install_headers_dir=install-headers-cpio + broken_install=yes + ;; + i386-sun-sunos*) # Sun i386 roadrunner + xm_file=i386/xm-sun.h + tm_file=i386/sun.h + use_collect2=yes + ;; + i[[3456]]86-*-aout*) + tm_file=i386/i386-aout.h + tmake_file=i386/t-i386bare + ;; + i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*) + tm_file=i386/bsd386.h + xm_file=i386/xm-bsd386.h +# tmake_file=t-libc-ok + ;; + i[[3456]]86-*-bsd*) + tm_file=i386/386bsd.h + xm_file=i386/xm-bsd386.h +# tmake_file=t-libc-ok +# Next line turned off because both 386BSD and BSD/386 use GNU ld. +# use_collect2=yes + ;; + i[[3456]]86-*-freebsdelf*) + tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h" + # On FreeBSD, the headers are already ok, except for math.h. + fixincludes=fixinc.math + tmake_file=i386/t-freebsd + gas=yes + gnu_ld=yes + stabs=yes + ;; + i[[3456]]86-*-freebsd*) + tm_file=i386/freebsd.h + # On FreeBSD, the headers are already ok, except for math.h. + fixincludes=fixinc.math + tmake_file=i386/t-freebsd + ;; + i[[3456]]86-*-netbsd*) + tm_file=i386/netbsd.h + # On NetBSD, the headers are already okay, except for math.h. + fixincludes=fixinc.math + tmake_file=t-netbsd + ;; + i[[3456]]86-*-coff*) + tm_file=i386/i386-coff.h + tmake_file=i386/t-i386bare + ;; + i[[3456]]86-*-isc*) # 80386 running ISC system + xm_file=i386/xm-isc.h + case $machine in + i[[345]]86-*-isc[[34]]*) + xmake_file=i386/x-isc3 + ;; + *) + xmake_file=i386/x-isc + ;; + esac + if [[ x$gas = xyes -a x$stabs = xyes ]] + then + tm_file=i386/iscdbx.h + tmake_file=i386/t-svr3dbx + extra_parts="svr3.ifile svr3z.ifile" + else + tm_file=i386/isccoff.h + tmake_file=i386/t-crtstuff + extra_parts="crtbegin.o crtend.o" + fi + install_headers_dir=install-headers-cpio + broken_install=yes + ;; + i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux + xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers + xmake_file=x-linux-aout + tmake_file="t-linux-aout i386/t-crtstuff" + tm_file=i386/linux-oldld.h + fixincludes=Makefile.in + broken_install=yes + gnu_ld=yes + ;; + i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux + xm_file=i386/xm-linux.h # with a.out format + xmake_file=x-linux-aout + tmake_file="t-linux-aout i386/t-crtstuff" + tm_file=i386/linux-aout.h + fixincludes=Makefile.in #The headers are ok already. + broken_install=yes + gnu_ld=yes + ;; + i[[3456]]86-*-linux-gnulibc1) + xm_file=i386/xm-linux.h # Intel 80386's running GNU/Linux + xmake_file=x-linux # with ELF format using the + tm_file=i386/linux.h # GNU/Linux C library 5 + tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + fixincludes=Makefile.in # The headers are ok already. + broken_install=yes + gnu_ld=yes + if [[ x$enable_threads = xyes ]]; then + thread_file='single' + fi + ;; + i[[3456]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux + xm_file=i386/xm-linux.h # with ELF format using glibc 2 + xmake_file=x-linux # aka GNU/Linux C library 6 + tm_file=i386/linux.h + tmake_file="t-linux i386/t-crtstuff" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + fixincludes=Makefile.in # The headers are ok already. + broken_install=yes + gnu_ld=yes + if [[ x$enable_threads = xyes ]]; then + thread_file='posix' + fi + ;; + i[[3456]]86-*-gnu*) + ;; + i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*) + xm_file=i386/xm-go32.h + tm_file=i386/go32.h + tmake_file=i386/t-go32 + ;; + i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*) + tm_file=i386/moss.h + tmake_file=t-libc-ok + fixincludes=Makefile.in + gnu_ld=yes + gas=yes + ;; + i[[3456]]86-*-lynxos*) + if [[ x$gas = xyes ]] + then + tm_file=i386/lynx.h + else + tm_file=i386/lynx-ng.h + fi + xm_file=i386/xm-lynx.h + tmake_file=i386/t-i386bare + xmake_file=x-lynx + ;; + i[[3456]]86-*-mach*) + tm_file=i386/mach.h +# tmake_file=t-libc-ok + use_collect2=yes + ;; + i[[3456]]86-*-osfrose*) # 386 using OSF/rose + if [[ x$elf = xyes ]] + then + tm_file=i386/osfelf.h + use_collect2= + else + tm_file=i386/osfrose.h + use_collect2=yes + fi + xm_file=i386/xm-osf.h + xmake_file=i386/x-osfrose + tmake_file=i386/t-osf + extra_objs=halfpic.o + ;; + i[[345]]86-go32-rtems*) + cpu_type=i386 + xm_file=i386/xm-go32.h + tm_file=i386/go32-rtems.h + tmake_file="i386/t-go32 t-rtems" + ;; + i[[345]]86-*-rtems*) + cpu_type=i386 + tm_file=i386/rtems.h + tmake_file="i386/t-i386bare t-rtems" + ;; + i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5 + xm_file=i386/xm-sco5.h + xmake_file=i386/x-sco5 + fixincludes=fixinc.sco + broken_install=yes + tm_file=i386/sco5.h + tmake_file=i386/t-sco5 + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" + ;; + i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system + xm_file=i386/xm-sco.h + xmake_file=i386/x-sco4 + fixincludes=fixinc.sco + broken_install=yes + install_headers_dir=install-headers-cpio + if [[ x$stabs = xyes ]] + then + tm_file=i386/sco4dbx.h + tmake_file=i386/t-svr3dbx + extra_parts="svr3.ifile svr3z.rfile" + else + tm_file=i386/sco4.h + tmake_file=i386/t-crtstuff + extra_parts="crtbegin.o crtend.o" + fi + truncate_target=yes + ;; + i[[3456]]86-*-sco*) # 80386 running SCO system + xm_file=i386/xm-sco.h + xmake_file=i386/x-sco + broken_install=yes + install_headers_dir=install-headers-cpio + if [[ x$stabs = xyes ]] + then + tm_file=i386/scodbx.h + tmake_file=i386/t-svr3dbx + extra_parts="svr3.ifile svr3z.rfile" + else + tm_file=i386/sco.h + extra_parts="crtbegin.o crtend.o" + tmake_file=i386/t-crtstuff + fi + truncate_target=yes + ;; + i[[3456]]86-*-solaris2*) + xm_file=i386/xm-sysv4.h + if [[ x$stabs = xyes ]] + then + tm_file=i386/sol2dbg.h + else + tm_file=i386/sol2.h + fi + tmake_file=i386/t-sol2 + extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o" + xmake_file=x-svr4 + fixincludes=fixinc.math + broken_install=yes + if [[ x$enable_threads = xyes ]]; then + thread_file='solaris' + fi + ;; + i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4 + xm_file=i386/xm-sysv4.h + tm_file=i386/sysv4.h + if [[ x$stabs = xyes ]] + then + tm_file="${tm_file} dbx.h" + fi + tmake_file=i386/t-crtpic + xmake_file=x-svr4 + extra_parts="crtbegin.o crtend.o" + ;; + i[[3456]]86-*-sysv*) # Intel 80386's running system V + xm_file=i386/xm-sysv3.h + xmake_file=i386/x-sysv3 + if [[ x$gas = xyes ]] + then + if [[ x$stabs = xyes ]] + then + tm_file=i386/svr3dbx.h + tmake_file=i386/t-svr3dbx + extra_parts="svr3.ifile svr3z.rfile" + else + tm_file=i386/svr3gas.h + extra_parts="crtbegin.o crtend.o" + tmake_file=i386/t-crtstuff + fi + else + tm_file=i386/sysv3.h + extra_parts="crtbegin.o crtend.o" + tmake_file=i386/t-crtstuff + fi + ;; + i386-*-vsta) # Intel 80386's running VSTa kernel + xm_file=i386/xm-vsta.h + tm_file=i386/vsta.h + tmake_file=i386/t-vsta + xmake_file=i386/x-vsta + ;; + i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32) + xm_file="${xm_file} i386/xm-cygwin32.h" + tmake_file=i386/t-cygwin32 + tm_file=i386/cygwin32.h + xmake_file=i386/x-cygwin32 + extra_objs=winnt.o + fixincludes=Makefile.in + if [[ x$enable_threads = xyes ]]; then + thread_file='win32' + fi + exeext=.exe + ;; + i[[3456]]86-*-mingw32) + tm_file=i386/mingw32.h + xm_file="${xm_file} i386/xm-mingw32.h" + tmake_file=i386/t-cygwin32 + extra_objs=winnt.o + xmake_file=i386/x-cygwin32 + fixincludes=Makefile.in + if [[ x$enable_threads = xyes ]]; then + thread_file='win32' + fi + exeext=.exe + ;; + i[[3456]]86-*-winnt3*) + tm_file=i386/win-nt.h + out_file=i386/i386.c + xm_file=i386/xm-winnt.h + xmake_file=winnt/x-winnt + tmake_file=i386/t-winnt + extra_host_objs="winnt.o oldnames.o" + extra_gcc_objs="spawnv.o oldnames.o" + fixincludes=fixinc.winnt + if [[ x$gnu_ld != xyes ]] + then + extra_programs=ld.exe + fi + if [[ x$enable_threads = xyes ]]; then + thread_file='win32' + fi + ;; + i[[3456]]86-dg-dgux) + xm_file=i386/xm-dgux.h + out_file=i386/dgux.c + tm_file=i386/dgux.h + tmake_file=i386/t-dgux + xmake_file=i386/x-dgux + fixincludes=fixinc.dgux + install_headers_dir=install-headers-cpio + ;; + i860-alliant-*) # Alliant FX/2800 + tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h" + xm_file="${xm_file}" + xmake_file=i860/x-fx2800 + tmake_file=i860/t-fx2800 + extra_parts="crtbegin.o crtend.o" + ;; + i860-*-bsd*) + tm_file="${tm_file} i860/bsd.h" + if [[ x$gas = xyes ]] + then + tm_file="${tm_file} i860/bsd-gas.h" + fi + use_collect2=yes + ;; + i860-*-mach*) + tm_file="${tm_file} i860/mach.h" + tmake_file=t-libc-ok + ;; + i860-*-osf*) # Intel Paragon XP/S, OSF/1AD + tm_file="${tm_file} svr3.h i860/paragon.h" + xm_file="${xm_file} xm-svr3.h" + tmake_file=t-osf + broken_install=yes + ;; + i860-*-sysv3*) + tm_file="${tm_file} svr3.h i860/sysv3.h" + xm_file="${tm_file} xm-svr3.h" + xmake_file=i860/x-sysv3 + extra_parts="crtbegin.o crtend.o" + ;; + i860-*-sysv4*) + tm_file="${tm_file} svr4.h i860/sysv4.h" + xm_file="${xm_file} xm-svr3.h" + xmake_file=i860/x-sysv4 + tmake_file=t-svr4 + extra_parts="crtbegin.o crtend.o" + ;; + i960-wrs-vxworks5 | i960-wrs-vxworks5.0*) + tm_file="${tm_file} i960/vx960.h" + tmake_file=i960/t-vxworks960 + use_collect2=yes + ;; + i960-wrs-vxworks5*) + tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h" + tmake_file=i960/t-vxworks960 + use_collect2=yes + ;; + i960-wrs-vxworks*) + tm_file="${tm_file} i960/vx960.h" + tmake_file=i960/t-vxworks960 + use_collect2=yes + ;; + i960-*-coff*) + tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h" + tmake_file=i960/t-960bare + use_collect2=yes + ;; + i960-*-rtems) + tmake_file="i960/t-960bare t-rtems" + tm_file="${tm_file} dbxcoff.h i960/rtems.h" + use_collect2=yes + ;; + i960-*-*) # Default i960 environment. + use_collect2=yes + ;; + m32r-*-elf*) + extra_parts="crtinit.o crtfini.o" + ;; + m68000-convergent-sysv*) + tm_file=m68k/ctix.h + xm_file=m68k/xm-3b1.h + use_collect2=yes + extra_headers=math-68881.h + ;; + m68000-hp-bsd*) # HP 9000/200 running BSD + tm_file=m68k/hp2bsd.h + xmake_file=m68k/x-hp2bsd + use_collect2=yes + extra_headers=math-68881.h + ;; + m68000-hp-hpux*) # HP 9000 series 300 + xm_file=m68k/xm-hp320.h + if [[ x$gas = xyes ]] + then + xmake_file=m68k/x-hp320g + tm_file=m68k/hp310g.h + else + xmake_file=m68k/x-hp320 + tm_file=m68k/hp310.h + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + extra_headers=math-68881.h + ;; + m68000-sun-sunos3*) + tm_file=m68k/sun2.h + use_collect2=yes + extra_headers=math-68881.h + ;; + m68000-sun-sunos4*) + tm_file=m68k/sun2o4.h + use_collect2=yes + extra_headers=math-68881.h + ;; + m68000-att-sysv*) + xm_file=m68k/xm-3b1.h + if [[ x$gas = xyes ]] + then + tm_file=m68k/3b1g.h + else + tm_file=m68k/3b1.h + fi + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-apple-aux*) # Apple Macintosh running A/UX + xm_file=m68k/xm-aux.h + tmake_file=m68k/t-aux + broken_install=yes + install_headers_dir=install-headers-cpio + extra_headers=math-68881.h + extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o" + tm_file= + if [[ "$gnu_ld" = yes ]] + then + tm_file="${tm_file} m68k/auxgld.h" + else + tm_file="${tm_file} m68k/auxld.h" + fi + if [[ "$gas" = yes ]] + then + tm_file="${tm_file} m68k/auxgas.h" + else + tm_file="${tm_file} m68k/auxas.h" + fi + tm_file="${tm_file} m68k/a-ux.h" + ;; + m68k-apollo-*) + tm_file=m68k/apollo68.h + xmake_file=m68k/x-apollo68 + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-altos-sysv*) # Altos 3068 + if [[ x$gas = xyes ]] + then + tm_file=m68k/altos3068.h + xm_file=m68k/xm-altos3068.h + else + echo "The Altos is supported only with the GNU assembler" 1>&2 + exit 1 + fi + extra_headers=math-68881.h + ;; + m68k-bull-sysv*) # Bull DPX/2 + if [[ x$gas = xyes ]] + then + if [[ x$stabs = xyes ]] + then + tm_file=m68k/dpx2cdbx.h + else + tm_file=m68k/dpx2g.h + fi + else + tm_file=m68k/dpx2.h + fi + xm_file=m68k/xm-m68kv.h + xmake_file=m68k/x-dpx2 + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-atari-sysv4*) # Atari variant of V.4. + tm_file=m68k/atari.h + xm_file=m68k/xm-atari.h + tmake_file=t-svr4 + extra_parts="crtbegin.o crtend.o" + extra_headers=math-68881.h + ;; + m68k-motorola-sysv*) + tm_file=m68k/mot3300.h + xm_file=m68k/xm-mot3300.h + if [[ x$gas = xyes ]] + then + xmake_file=m68k/x-mot3300-gas + if [[ x$gnu_ld = xyes ]] + then + tmake_file=m68k/t-mot3300-gald + else + tmake_file=m68k/t-mot3300-gas + use_collect2=yes + fi + else + xmake_file=m68k/x-mot3300 + if [[ x$gnu_ld = xyes ]] + then + tmake_file=m68k/t-mot3300-gld + else + tmake_file=m68k/t-mot3300 + use_collect2=yes + fi + fi + gdb_needs_out_file_path=yes + extra_parts="crt0.o mcrt0.o" + extra_headers=math-68881.h + ;; + m68k-ncr-sysv*) # NCR Tower 32 SVR3 + tm_file=m68k/tower-as.h + xm_file="${xm_file} xm-svr3.h" + xmake_file=m68k/x-tower + extra_parts="crtbegin.o crtend.o" + extra_headers=math-68881.h + ;; + m68k-plexus-sysv*) + tm_file=m68k/plexus.h + xm_file=m68k/xm-plexus.h + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-tti-*) + tm_file=m68k/pbb.h + xm_file=m68k/xm-m68kv.h + extra_headers=math-68881.h + ;; + m68k-crds-unos*) + xm_file=m68k/xm-crds.h + xmake_file=m68k/x-crds + tm_file=m68k/crds.h + broken_install=yes + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-cbm-sysv4*) # Commodore variant of V.4. + tm_file=m68k/amix.h + xm_file=m68k/xm-amix.h + xmake_file=m68k/x-amix + tmake_file=t-svr4 + extra_parts="crtbegin.o crtend.o" + extra_headers=math-68881.h + ;; + m68k-ccur-rtu) + tm_file=m68k/ccur-GAS.h + xmake_file=m68k/x-ccur + extra_headers=math-68881.h + use_collect2=yes + broken_install=yes + ;; + m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd + tm_file=m68k/hp3bsd44.h + xmake_file=m68k/x-hp3bsd44 + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix + tm_file=m68k/hp3bsd.h + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-isi-bsd*) + if [[ x$with_fp = xno ]] + then + tm_file=m68k/isi-nfp.h + else + tm_file=m68k/isi.h + fi + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7. + xm_file=m68k/xm-hp320.h + if [[ x$gas = xyes ]] + then + xmake_file=m68k/x-hp320g + tm_file=m68k/hp320g.h + else + xmake_file=m68k/x-hp320 + tm_file=m68k/hpux7.h + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-hp-hpux*) # HP 9000 series 300 + xm_file=m68k/xm-hp320.h + if [[ x$gas = xyes ]] + then + xmake_file=m68k/x-hp320g + tm_file=m68k/hp320g.h + else + xmake_file=m68k/x-hp320 + tm_file=m68k/hp320.h + fi + broken_install=yes + install_headers_dir=install-headers-cpio + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-sun-mach*) + tm_file=m68k/sun3mach.h + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-sony-newsos3*) + if [[ x$gas = xyes ]] + then + tm_file=m68k/news3gas.h + else + tm_file=m68k/news3.h + fi + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-sony-bsd* | m68k-sony-newsos*) + if [[ x$gas = xyes ]] + then + tm_file=m68k/newsgas.h + else + tm_file=m68k/news.h + fi + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-next-nextstep2*) + tm_file=m68k/next21.h + xm_file=m68k/xm-next.h + tmake_file=m68k/t-next + xmake_file=m68k/x-next + extra_objs=nextstep.o + extra_headers=math-68881.h + use_collect2=yes + ;; + m68k-next-nextstep3*) + tm_file=m68k/next.h + xm_file=m68k/xm-next.h + tmake_file=m68k/t-next + xmake_file=m68k/x-next + extra_objs=nextstep.o + extra_headers=math-68881.h + if [[ x$enable_threads = xyes ]]; then + thread_file='mach' + fi + ;; + m68k-sun-sunos3*) + if [[ x$with_fp = xno ]] + then + tm_file=m68k/sun3n3.h + else + tm_file=m68k/sun3o3.h + fi + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-sun-sunos*) # For SunOS 4 (the default). + if [[ x$with_fp = xno ]] + then + tm_file=m68k/sun3n.h + else + tm_file=m68k/sun3.h + fi + use_collect2=yes + extra_headers=math-68881.h + ;; + m68k-wrs-vxworks*) + tm_file=m68k/vxm68k.h + tmake_file=m68k/t-vxworks68 + extra_headers=math-68881.h + ;; + m68k-*-aout*) + tmake_file=m68k/t-m68kbare + tm_file="m68k/m68k-aout.h libgloss.h" + extra_headers=math-68881.h + ;; + m68k-*-coff*) + tmake_file=m68k/t-m68kbare + tm_file="m68k/m68k-coff.h dbx.h libgloss.h" + extra_headers=math-68881.h + ;; + m68k-*-lynxos*) + if [[ x$gas = xyes ]] + then + tm_file=m68k/lynx.h + else + tm_file=m68k/lynx-ng.h + fi + xm_file=m68k/xm-lynx.h + xmake_file=x-lynx + tmake_file=m68k/t-lynx + extra_headers=math-68881.h + ;; + m68k-*-netbsd*) + tm_file=m68k/netbsd.h + # On NetBSD, the headers are already okay, except for math.h. + fixincludes=fixinc.math + tmake_file=t-netbsd + ;; + m68k-*-sysv3*) # Motorola m68k's running system V.3 + xm_file=m68k/xm-m68kv.h + xmake_file=m68k/x-m68kv + extra_parts="crtbegin.o crtend.o" + extra_headers=math-68881.h + ;; + m68k-*-sysv4*) # Motorola m68k's running system V.4 + tm_file=m68k/m68kv4.h + xm_file=m68k/xm-m68kv.h + tmake_file=t-svr4 + extra_parts="crtbegin.o crtend.o" + extra_headers=math-68881.h + ;; + m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux + xm_file=m68k/xm-linux.h # with a.out format + xmake_file=x-linux + tm_file=m68k/linux-aout.h + tmake_file="t-linux-aout m68k/t-linux-aout" + fixincludes=Makefile.in # The headers are ok already. + extra_headers=math-68881.h + gnu_ld=yes + ;; + m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux + xm_file=m68k/xm-linux.h # with ELF format using the + xmake_file=x-linux # GNU/Linux C library 5 + tm_file=m68k/linux.h + tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + fixincludes=Makefile.in # The headers are ok already. + extra_headers=math-68881.h + gnu_ld=yes + ;; + m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux + xm_file=m68k/xm-linux.h # with ELF format using glibc 2 + xmake_file=x-linux # aka the GNU/Linux C library 6. + tm_file=m68k/linux.h + tmake_file="t-linux m68k/t-linux" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + fixincludes=Makefile.in # The headers are ok already. + extra_headers=math-68881.h + gnu_ld=yes + if [[ x$enable_threads = xyes ]]; then + thread_file='posix' + fi + ;; + m68k-*-psos*) + tmake_file=m68k/t-m68kbare + tm_file=m68k/m68k-psos.h + extra_headers=math-68881.h + ;; + m68k-*-rtems*) + tmake_file="m68k/t-m68kbare t-rtems" + tm_file=m68k/rtems.h + extra_headers=math-68881.h + ;; + + m88k-dg-dgux*) + case $machine in + m88k-dg-dguxbcs*) + tm_file=m88k/dguxbcs.h + tmake_file=m88k/t-dguxbcs + ;; + *) + tm_file=m88k/dgux.h + tmake_file=m88k/t-dgux + ;; + esac + extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld" + broken_install=yes + xmake_file=m88k/x-dgux + if [[ x$gas = xyes ]] + then + tmake_file=m88k/t-dgux-gas + fi + fixincludes=fixinc.dgux + ;; + m88k-dolphin-sysv3*) + tm_file=m88k/dolph.h + extra_parts="crtbegin.o crtend.o" + xm_file=m88k/xm-sysv3.h + xmake_file=m88k/x-dolph + if [[ x$gas = xyes ]] + then + tmake_file=m88k/t-m88k-gas + fi + ;; + m88k-tektronix-sysv3) + tm_file=m88k/tekXD88.h + extra_parts="crtbegin.o crtend.o" + xm_file=m88k/xm-sysv3.h + xmake_file=m88k/x-tekXD88 + if [[ x$gas = xyes ]] + then + tmake_file=m88k/t-m88k-gas + fi + ;; + m88k-*-aout*) + tm_file=m88k/m88k-aout.h + ;; + m88k-*-coff*) + tm_file=m88k/m88k-coff.h + tmake_file=m88k/t-bug + ;; + m88k-*-luna*) + tm_file=m88k/luna.h + extra_parts="crtbegin.o crtend.o" + if [[ x$gas = xyes ]] + then + tmake_file=m88k/t-luna-gas + else + tmake_file=m88k/t-luna + fi + ;; + m88k-*-sysv3*) + tm_file=m88k/sysv3.h + extra_parts="crtbegin.o crtend.o" + xm_file=m88k/xm-sysv3.h + xmake_file=m88k/x-sysv3 + if [[ x$gas = xyes ]] + then + tmake_file=m88k/t-m88k-gas + fi + ;; + m88k-*-sysv4*) + tm_file=m88k/sysv4.h + extra_parts="crtbegin.o crtend.o" + xmake_file=m88k/x-sysv4 + tmake_file=m88k/t-sysv4 + ;; + mips-sgi-irix6*) # SGI System V.4., IRIX 6 + tm_file=mips/iris6.h + xm_file=mips/xm-iris6.h + broken_install=yes + fixincludes=fixinc.irix + xmake_file=mips/x-iris6 + tmake_file=mips/t-iris6 + if [[ x$enable_threads = xyes ]]; then + thread_file='irix' + fi + ;; + mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64 + tm_file=mips/cross64.h + xm_file=mips/xm-iris5.h + broken_install=yes + fixincludes=Makefile.in + xmake_file=mips/x-iris + tmake_file=mips/t-cross64 + # See comment in mips/iris[56].h files. + use_collect2=yes + if [[ x$enable_threads = xyes ]]; then + thread_file='irix' + fi + ;; + mips-sni-sysv4) + if [[ x$gas = xyes ]] + then + if [[ x$stabs = xyes ]] + then + tm_file=mips/iris5gdb.h + else + tm_file=mips/sni-gas.h + fi + else + tm_file=mips/sni-svr4.h + fi + xm_file=mips/xm-sysv.h + xmake_file=mips/x-sni-svr4 + tmake_file=mips/t-mips-gas + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + broken_install=yes + ;; + mips-sgi-irix5*) # SGI System V.4., IRIX 5 + if [[ x$gas = xyes ]] + then + tm_file=mips/iris5gas.h + if [[ x$stabs = xyes ]] + then + tm_file="${tm_file} dbx.h" + fi + else + tm_file=mips/iris5.h + fi + xm_file=mips/xm-iris5.h + broken_install=yes + fixincludes=fixinc.irix + xmake_file=mips/x-iris + # mips-tfile doesn't work yet + tmake_file=mips/t-mips-gas + # See comment in mips/iris5.h file. + use_collect2=yes + if [[ x$enable_threads = xyes ]]; then + thread_file='irix' + fi + ;; + mips-sgi-irix4loser*) # Mostly like a MIPS. + tm_file=mips/iris4loser.h + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + xm_file=mips/xm-iris4.h + broken_install=yes + xmake_file=mips/x-iris + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-mips-gas + else + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + if [[ x$enable_threads = xyes ]]; then + thread_file='irix' + fi + ;; + mips-sgi-irix4*) # Mostly like a MIPS. + tm_file=mips/iris4.h + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + xm_file=mips/xm-iris4.h + broken_install=yes + xmake_file=mips/x-iris + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-mips-gas + else + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + if [[ x$enable_threads = xyes ]]; then + thread_file='irix' + fi + ;; + mips-sgi-*) # Mostly like a MIPS. + tm_file=mips/iris3.h + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + xm_file=mips/xm-iris3.h + broken_install=yes + xmake_file=mips/x-iris3 + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-mips-gas + else + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + ;; + mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose. + tm_file=mips/osfrose.h + xmake_file=mips/x-osfrose + tmake_file=mips/t-osfrose + extra_objs=halfpic.o + use_collect2=yes + ;; + mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL + tm_file=mips/dec-osf1.h + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + xmake_file=mips/x-dec-osf1 + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-mips-gas + else + tmake_file=mips/t-ultrix + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + ;; + mips-dec-bsd*) # Decstation running 4.4 BSD + tm_file=mips/dec-bsd.h + fixincludes= + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-mips-gas + else + tmake_file=mips/t-ultrix + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + ;; + mips-dec-netbsd*) # Decstation running NetBSD + tm_file=mips/netbsd.h + # On NetBSD, the headers are already okay, except for math.h. + fixincludes=fixinc.math + tmake_file=t-netbsd + if [[ x$prefix = xNONE ]]; then + prefix=$native_prefix + fi + prefix=$native_prefix + ;; + mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news. + tm_file=mips/news4.h + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-mips-gas + else + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + xmake_file=mips/x-sony + ;; + mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0. + # That is based on svr4. + # t-svr4 is not right because this system doesn't use ELF. + tm_file=mips/news5.h + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + xm_file=mips/xm-news.h + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-mips-gas + else + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + ;; + mips-tandem-sysv4*) # Tandem S2 running NonStop UX + tm_file=mips/svr4-t.h + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + xm_file=mips/xm-sysv4.h + xmake_file=mips/x-sysv + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-mips-gas + extra_parts="crtbegin.o crtend.o" + else + tmake_file=mips/t-mips + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + broken_install=yes + ;; + mips-*-ultrix* | mips-dec-mach3) # Decstation. + tm_file=mips/ultrix.h + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + xmake_file=mips/x-ultrix + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-mips-gas + else + tmake_file=mips/t-ultrix + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + ;; + mips-*-riscos[[56789]]bsd*) + tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0 + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-bsd-gas + else + tmake_file=mips/t-bsd + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + broken_install=yes + ;; + mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*) + tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0 + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-bsd-gas + else + tmake_file=mips/t-bsd + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + broken_install=yes + ;; + mips-*-riscos[[56789]]sysv4*) + tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0 + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + xm_file=mips/xm-sysv4.h + xmake_file=mips/x-sysv + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-svr4-gas + else + tmake_file=mips/t-svr4 + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + broken_install=yes + ;; + mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*) + tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0 + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + xm_file=mips/xm-sysv.h + xmake_file=mips/x-sysv + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-svr4-gas + else + tmake_file=mips/t-svr4 + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + broken_install=yes + ;; + mips-*-riscos[[56789]]sysv*) + tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0 + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + xm_file=mips/xm-sysv.h + xmake_file=mips/x-sysv + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-svr3-gas + else + tmake_file=mips/t-svr3 + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + broken_install=yes + ;; + mips-*-sysv* | mips-*-riscos*sysv*) + tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0 + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + xm_file=mips/xm-sysv.h + xmake_file=mips/x-sysv + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-svr3-gas + else + tmake_file=mips/t-svr3 + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + broken_install=yes + ;; + mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0. + tm_file=mips/mips-5.h + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-mips-gas + else + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + broken_install=yes + ;; + mips-*-gnu*) + ;; + mipsel-*-ecoff*) + tm_file=mips/ecoffl.h + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + tmake_file=mips/t-ecoff + ;; + mips-*-ecoff*) + tm_file=mips/ecoff.h + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + tmake_file=mips/t-ecoff + broken_install=yes + ;; + mipsel-*-elf*) + tm_file="mips/elfl.h libgloss.h" + tmake_file=mips/t-ecoff + ;; + mips-*-elf*) + tm_file="mips/elf.h libgloss.h" + tmake_file=mips/t-ecoff + ;; + mips64el-*-elf*) + tm_file="mips/elfl64.h libgloss.h" + tmake_file=mips/t-ecoff + ;; + mips64orionel-*-elf*) + tm_file="mips/elflorion.h libgloss.h" + tmake_file=mips/t-ecoff + ;; + mips64-*-elf*) + tm_file="mips/elf64.h libgloss.h" + tmake_file=mips/t-ecoff + ;; + mips64orion-*-elf*) + tm_file="mips/elforion.h libgloss.h" + tmake_file=mips/t-ecoff + ;; + mips64orion-*-rtems*) + tm_file=mips/rtems64.h + tmake_file="mips/t-ecoff t-rtems" + ;; + mipstx39el-*-elf*) + tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h" + tmake_file=mips/t-ecoff + ;; + mipstx39-*-elf*) + tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h" + tmake_file=mips/t-ecoff + ;; + mips-*-*) # Default MIPS RISC-OS 4.0. + if [[ x$stabs = xyes ]]; then + tm_file="${tm_file} dbx.h" + fi + if [[ x$gas = xyes ]] + then + tmake_file=mips/t-mips-gas + else + extra_passes="mips-tfile mips-tdump" + fi + if [[ x$gnu_ld != xyes ]] + then + use_collect2=yes + fi + ;; + mn10200-*-*) + cpu_type=mn10200 + tm_file="mn10200/mn10200.h" + if [[ x$stabs = xyes ]] + then + tm_file="${tm_file} dbx.h" + fi + use_collect2=no + ;; + mn10300-*-*) + cpu_type=mn10300 + tm_file="mn10300/mn10300.h" + if [[ x$stabs = xyes ]] + then + tm_file="${tm_file} dbx.h" + fi + use_collect2=no + ;; + ns32k-encore-bsd*) + tm_file=ns32k/encore.h + use_collect2=yes + ;; + ns32k-sequent-bsd*) + tm_file=ns32k/sequent.h + use_collect2=yes + ;; + ns32k-tek6100-bsd*) + tm_file=ns32k/tek6100.h + broken_install=yes + use_collect2=yes + ;; + ns32k-tek6200-bsd*) + tm_file=ns32k/tek6200.h + broken_install=yes + use_collect2=yes + ;; +# This has not been updated to GCC 2. +# ns32k-ns-genix*) +# xm_file=ns32k/xm-genix.h +# xmake_file=ns32k/x-genix +# tm_file=ns32k/genix.h +# broken_install=yes +# use_collect2=yes +# ;; + ns32k-merlin-*) + tm_file=ns32k/merlin.h + use_collect2=yes + ;; + ns32k-pc532-mach*) + tm_file=ns32k/pc532-mach.h + use_collect2=yes + ;; + ns32k-pc532-minix*) + tm_file=ns32k/pc532-min.h + xm_file=ns32k/xm-pc532-min.h + use_collect2=yes + ;; + ns32k-pc532-netbsd*) + tm_file=ns32k/netbsd.h + # On NetBSD, the headers are already okay, except for math.h. + fixincludes=fixinc.math + tmake_file=t-netbsd + ;; + pdp11-*-bsd) + tm_file="${tm_file} pdp11/2bsd.h" + ;; + pdp11-*-*) + ;; + pyramid-*-*) + cpu_type=pyr + xmake_file=pyr/x-pyr + use_collect2=yes + ;; + romp-*-aos*) + use_collect2=yes + ;; + romp-*-mach*) + xmake_file=romp/x-mach + use_collect2=yes + ;; + powerpc-*-sysv* | powerpc-*-elf*) + tm_file=rs6000/sysv4.h + xm_file=rs6000/xm-sysv4.h + extra_headers=ppc-asm.h + if [[ x$gas = xyes ]] + then + tmake_file="rs6000/t-ppcos rs6000/t-ppccomm" + else + tmake_file="rs6000/t-ppc rs6000/t-ppccomm" + fi + xmake_file=rs6000/x-sysv4 + ;; + powerpc-*-eabiaix*) + tm_file=rs6000/eabiaix.h + tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm" + fixincludes=Makefile.in + extra_headers=ppc-asm.h + ;; + powerpc-*-eabisim*) + tm_file=rs6000/eabisim.h + tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm" + fixincludes=Makefile.in + extra_headers=ppc-asm.h + ;; + powerpc-*-eabi*) + tm_file=rs6000/eabi.h + if [[ x$gas = xyes ]] + then + tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm" + else + tmake_file="rs6000/t-ppc rs6000/t-ppccomm" + fi + fixincludes=Makefile.in + extra_headers=ppc-asm.h + ;; + powerpc-*-rtems*) + tm_file=rs6000/rtems.h + if [[ x$gas = xyes ]] + then + tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm" + else + tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm" + fi + fixincludes=Makefile.in + extra_headers=ppc-asm.h + ;; + powerpc-*-linux-gnu*) + tm_file=rs6000/linux.h + xm_file=rs6000/xm-sysv4.h + out_file=rs6000/rs6000.c + if [[ x$gas = xyes ]] + then + tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm" + else + tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm" + fi + xmake_file=x-linux + fixincludes=Makefile.in + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + extra_headers=ppc-asm.h + if [[ x$enable_threads = xyes ]]; then + thread_file='posix' + fi + ;; + powerpc-*-vxworks*) + cpu_type=rs6000 + xm_file=rs6000/xm-sysv4.h + tm_file=rs6000/vxppc.h + tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm" + extra_headers=ppc-asm.h + ;; + powerpcle-*-sysv* | powerpcle-*-elf*) + tm_file=rs6000/sysv4le.h + xm_file=rs6000/xm-sysv4.h + if [[ x$gas = xyes ]] + then + tmake_file="rs6000/t-ppcos rs6000/t-ppccomm" + else + tmake_file="rs6000/t-ppc rs6000/t-ppccomm" + fi + xmake_file=rs6000/x-sysv4 + extra_headers=ppc-asm.h + ;; + powerpcle-*-eabisim*) + tm_file=rs6000/eabilesim.h + tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm" + fixincludes=Makefile.in + extra_headers=ppc-asm.h + ;; + powerpcle-*-eabi*) + tm_file=rs6000/eabile.h + if [[ x$gas = xyes ]] + then + tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm" + else + tmake_file="rs6000/t-ppc rs6000/t-ppccomm" + fi + fixincludes=Makefile.in + extra_headers=ppc-asm.h + ;; + powerpcle-*-winnt* ) + tm_file=rs6000/win-nt.h + tmake_file=rs6000/t-winnt +# extra_objs=pe.o + fixincludes=Makefile.in + if [[ x$enable_threads = xyes ]]; then + thread_file='win32' + fi + extra_headers=ppc-asm.h + ;; + powerpcle-*-pe | powerpcle-*-cygwin32) + tm_file=rs6000/cygwin32.h + xm_file=rs6000/xm-cygwin32.h + tmake_file=rs6000/t-winnt + xmake_file=rs6000/x-cygwin32 +# extra_objs=pe.o + fixincludes=Makefile.in + if [[ x$enable_threads = xyes ]]; then + thread_file='win32' + fi + exeext=.exe + extra_headers=ppc-asm.h + ;; + powerpcle-*-solaris2*) + tm_file=rs6000/sol2.h + xm_file=rs6000/xm-sysv4.h + if [[ x$gas = xyes ]] + then + tmake_file="rs6000/t-ppcos rs6000/t-ppccomm" + else + tmake_file="rs6000/t-ppc rs6000/t-ppccomm" + fi + xmake_file=rs6000/x-sysv4 + fixincludes=fixinc.math + extra_headers=ppc-asm.h + ;; + rs6000-ibm-aix3.[[01]]*) + tm_file=rs6000/aix31.h + xmake_file=rs6000/x-aix31 + use_collect2=yes + ;; + rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*) + tm_file=rs6000/aix3newas.h + if [[ x$host != x$target ]] + then + tmake_file=rs6000/t-xnewas + else + tmake_file=rs6000/t-newas + fi + use_collect2=yes + ;; + rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*) + tm_file=rs6000/aix41.h + if [[ x$host != x$target ]] + then + tmake_file=rs6000/t-xnewas + else + tmake_file=rs6000/t-newas + fi + xmake_file=rs6000/x-aix31 + use_collect2=yes + ;; + rs6000-ibm-aix*) + use_collect2=yes + ;; + rs6000-bull-bosx) + use_collect2=yes + ;; + rs6000-*-mach*) + tm_file=rs6000/mach.h + xm_file=rs6000/xm-mach.h + xmake_file=rs6000/x-mach + use_collect2=yes + ;; + rs6000-*-lynxos*) + tm_file=rs6000/lynx.h + xm_file=rs6000/xm-lynx.h + tmake_file=rs6000/t-rs6000 + xmake_file=rs6000/x-lynx + use_collect2=yes + ;; + sh-*-elf*) + tm_file=sh/elf.h + float_format=sh + ;; + sh-*-rtems*) + tmake_file="sh/t-sh t-rtems" + tm_file=sh/rtems.h + float_format=sh + ;; + sh-*-*) + float_format=sh + ;; + sparc-tti-*) + tm_file=sparc/pbd.h + xm_file=sparc/xm-pbd.h + ;; + sparc-wrs-vxworks* | sparclite-wrs-vxworks*) + tm_file=sparc/vxsparc.h + tmake_file=sparc/t-vxsparc + use_collect2=yes + ;; + sparc-*-aout*) + tmake_file=sparc/t-sparcbare + tm_file="sparc/aout.h libgloss.h" + ;; + sparc-*-netbsd*) + tm_file=sparc/netbsd.h + # On NetBSD, the headers are already okay, except for math.h. + fixincludes=fixinc.math + tmake_file=t-netbsd + ;; + sparc-*-bsd*) + tm_file=sparc/bsd.h + ;; + sparc-*-elf*) + tm_file=sparc/elf.h + tmake_file=sparc/t-elf + extra_parts="crti.o crtn.o crtbegin.o crtend.o" + #float_format=i128 + float_format=i64 + ;; + sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out + xm_file="sparc/xm-sparc.h sparc/xm-linux.h" + tm_file=sparc/linux-aout.h + xmake_file=x-linux + fixincludes=Makefile.in # The headers are ok already. + broken_install=yes + gnu_ld=yes + ;; + sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5 + xm_file="sparc/xm-sparc.h sparc/xm-linux.h" + xmake_file=x-linux + tm_file=sparc/linux.h + tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + fixincludes=Makefile.in # The headers are ok already. + broken_install=yes + gnu_ld=yes + ;; + sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6 + xm_file="sparc/xm-sparc.h sparc/xm-linux.h" + xmake_file=x-linux + tm_file=sparc/linux.h + tmake_file="t-linux sparc/t-linux" + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + fixincludes=Makefile.in # The headers are ok already. + broken_install=yes + gnu_ld=yes + if [[ x$enable_threads = xyes ]]; then + thread_file='posix' + fi + ;; + sparc-*-lynxos*) + if [[ x$gas = xyes ]] + then + tm_file=sparc/lynx.h + else + tm_file=sparc/lynx-ng.h + fi + xm_file=sparc/xm-lynx.h + tmake_file=sparc/t-sunos41 + xmake_file=x-lynx + ;; + sparc-*-rtems*) + tmake_file="sparc/t-sparcbare t-rtems" + tm_file=sparc/rtems.h + ;; + sparc-*-solaris2*) + tm_file=sparc/sol2.h + xm_file=sparc/xm-sol2.h + tmake_file=sparc/t-sol2 + xmake_file=sparc/x-sysv4 + extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o" + fixincludes=fixinc.math + float_format=i128 + broken_install=yes + if [[ x$enable_threads = xyes ]]; then + thread_file='solaris' + fi + ;; + sparc-*-sunos4.0*) + tm_file=sparc/sunos4.h + tmake_file=sparc/t-sunos40 + use_collect2=yes + ;; + sparc-*-sunos4*) + tm_file=sparc/sunos4.h + tmake_file=sparc/t-sunos41 + use_collect2=yes + if [[ x$gas = xyes ]]; then + tm_file="${tm_file} sparc/sun4gas.h" + fi + ;; + sparc-*-sunos3*) + tm_file=sparc/sun4o3.h + use_collect2=yes + ;; + sparc-*-sysv4*) + tm_file=sparc/sysv4.h + xm_file=sparc/xm-sysv4.h + tmake_file=t-svr4 + xmake_file=sparc/x-sysv4 + extra_parts="crtbegin.o crtend.o" + ;; + sparc-*-vxsim*) + xm_file=sparc/xm-sol2.h + tm_file=sparc/vxsim.h + tmake_file=sparc/t-vxsparc + xmake_file=sparc/x-sysv4 + ;; + sparclet-*-aout*) + tm_file="sparc/splet.h libgloss.h" + tmake_file=sparc/t-splet + ;; + sparclite-*-coff*) + tm_file="sparc/litecoff.h libgloss.h" + tmake_file=sparc/t-sparclite + ;; + sparclite-*-aout*) + tm_file="sparc/lite.h aoutos.h libgloss.h" + tmake_file=sparc/t-sparclite + ;; + sparc64-*-aout*) + tmake_file=sparc/t-sp64 + tm_file=sparc/sp64-aout.h + ;; + sparc64-*-elf*) + tmake_file=sparc/t-sp64 + tm_file=sparc/sp64-elf.h + extra_parts="crtbegin.o crtend.o" + ;; + sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux + tmake_file=sparc/t-sp64 + xm_file="sparc/xm-sp64.h sparc/xm-linux.h" + tm_file=sparc/linux64.h + xmake_file=x-linux + fixincludes=Makefile.in # The headers are ok already. + gnu_ld=yes + ;; +# This hasn't been upgraded to GCC 2. +# tahoe-harris-*) # Harris tahoe, using COFF. +# tm_file=tahoe/harris.h +# ;; +# tahoe-*-bsd*) # tahoe running BSD +# ;; +# This hasn't been upgraded to GCC 2. +# tron-*-*) +# cpu_type=gmicro +# use_collect2=yes +# ;; + v850-*-*) + cpu_type=v850 + tm_file="v850/v850.h" + xm_file="v850/xm-v850.h" + if [[ x$stabs = xyes ]] + then + tm_file="${tm_file} dbx.h" + fi + use_collect2=no + ;; + vax-*-bsd*) # vaxen running BSD + use_collect2=yes + float_format=vax + ;; + vax-*-sysv*) # vaxen running system V + tm_file="${tm_file} vax/vaxv.h" + xm_file="${xm_file} vax/xm-vaxv.h" + float_format=vax + ;; + vax-*-netbsd*) + tm_file="${tm_file} netbsd.h vax/netbsd.h" + # On NetBSD, the headers are already okay, except for math.h. + fixincludes=fixinc.math + tmake_file=t-netbsd + float_format=vax + ;; + vax-*-ultrix*) # vaxen running ultrix + tm_file="${tm_file} vax/ultrix.h" + use_collect2=yes + float_format=vax + ;; + vax-*-vms*) # vaxen running VMS + xm_file=vax/xm-vms.h + tm_file=vax/vms.h + float_format=vax + ;; + vax-*-*) # vax default entry + float_format=vax + ;; + we32k-att-sysv*) + xm_file="${xm_file} xm-svr3" + use_collect2=yes + ;; + *) + echo "Configuration $machine not supported" 1>&2 + exit 1 + ;; + esac + + case $machine in + *-*-linux-gnu*) + ;; # Existing Linux/GNU systems do not use the GNU setup. + *-*-gnu*) + # On the GNU system, the setup is just about the same on + # each different CPU. The specific machines that GNU + # supports are matched above and just set $cpu_type. + xm_file=${cpu_type}/xm-gnu.h + tm_file=${cpu_type}/gnu.h + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" + # GNU always uses ELF. + elf=yes + # GNU tools are the only tools. + gnu_ld=yes + gas=yes + # On GNU, the headers are already okay. + fixincludes=Makefile.in + xmake_file=x-linux # These details are the same as Linux. + tmake_file=t-gnu # These are not. + ;; + *-*-sysv4*) + fixincludes=fixinc.svr4 + xmake_try_sysv=x-sysv + broken_install=yes + install_headers_dir=install-headers-cpio + ;; + *-*-sysv*) + broken_install=yes + install_headers_dir=install-headers-cpio + ;; + esac + + # Distinguish i[3456]86 + # Also, do not run mips-tfile on MIPS if using gas. + # Process --with-cpu= for PowerPC/rs6000 + target_cpu_default2= + case $machine in + i486-*-*) + target_cpu_default2=1 + ;; + i586-*-*) + target_cpu_default2=2 + ;; + i686-*-*) + target_cpu_default2=3 + ;; + alpha*-*-*) + case $machine in + alphaev6*) + target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX" + ;; + alphapca56*) + target_cpu_default2="MASK_CPU_EV5|MASK_BWX|TASK_MAX" + ;; + alphaev56*) + target_cpu_default2="MASK_CPU_EV5|MASK_BWX" + ;; + alphaev5*) + target_cpu_default2="MASK_CPU_EV5" + ;; + esac + + if [[ x$gas = xyes ]] + then + if [[ x$target_cpu_default2 = x ]] + then + target_cpu_default2="MASK_GAS" + else + target_cpu_default2="${target_cpu_default2}|MASK_GAS" + fi + fi + ;; + arm*-*-*) + case "x$with_cpu" in + x) + # The most generic + target_cpu_default2="TARGET_CPU_generic" + ;; + + # Distinguish cores, and major variants + # arm7m doesn't exist, but D & I don't affect code + xarm[23678] | xarm250 | xarm[67][01]0 \ + | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \ + | xarm7100 | xarm7500 | xarm7500fe | xarm810 \ + | xstrongarm | xstrongarm110) + target_cpu_default2="TARGET_CPU_$with_cpu" + ;; + + xyes | xno) + echo "--with-cpu must be passed a value" 1>&2 + exit 1 + ;; + + *) + if [[ x$pass2done = xyes ]] + then + echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2 + exit 1 + fi + ;; + esac + ;; + + mips*-*-ecoff* | mips*-*-elf*) + if [[ x$gas = xyes ]] + then + if [[ x$gnu_ld = xyes ]] + then + target_cpu_default2=20 + else + target_cpu_default2=16 + fi + fi + ;; + mips*-*-*) + if [[ x$gas = xyes ]] + then + target_cpu_default2=16 + fi + ;; + powerpc*-*-* | rs6000-*-*) + case "x$with_cpu" in + x) + ;; + + xcommon | xpower | xpower2 | xpowerpc | xrios \ + | xrios1 | xrios2 | xrsc | xrsc1 \ + | x601 | x602 | x603 | x603e | x604 | x604e | x620 \ + | x403 | x505 | x801 | x821 | x823 | x860) + target_cpu_default2="\"$with_cpu\"" + ;; + + xyes | xno) + echo "--with-cpu must be passed a value" 1>&2 + exit 1 + ;; + + *) + if [[ x$pass2done = xyes ]] + then + echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2 + exit 1 + fi + ;; + esac + ;; + sparc*-*-*) + case ".$with_cpu" in + .) + target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`" + ;; + .supersparc | .ultrasparc | .v7 | .v8 | .v9) + target_cpu_default2="TARGET_CPU_$with_cpu" + ;; + *) + if [[ x$pass2done = xyes ]] + then + echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2 + exit 1 + fi + ;; + esac + ;; + esac + + if [[ x$target_cpu_default2 != x ]] + then + if [[ x$target_cpu_default != x ]] + then + target_cpu_default="(${target_cpu_default}|${target_cpu_default2})" + else + target_cpu_default=$target_cpu_default2 + fi + fi + + # No need for collect2 if we have the GNU linker. + case x$gnu_ld in + xyes) + use_collect2= + ;; + esac + +# Save data on machine being used to compile GCC in build_xm_file. +# Save data on host machine in vars host_xm_file and host_xmake_file. + if [[ x$pass1done = x ]] + then + if [[ x"$xm_file" = x ]] + then build_xm_file=$cpu_type/xm-$cpu_type.h + else build_xm_file=$xm_file + fi + build_broken_install=$broken_install + build_install_headers_dir=$install_headers_dir + build_exeext=$exeext + pass1done=yes + else + if [[ x$pass2done = x ]] + then + if [[ x"$xm_file" = x ]] + then host_xm_file=$cpu_type/xm-$cpu_type.h + else host_xm_file=$xm_file + fi + if [[ x"$xmake_file" = x ]] + then xmake_file=$cpu_type/x-$cpu_type + fi + host_xmake_file="$xmake_file" + host_truncate_target=$truncate_target + host_extra_gcc_objs=$extra_gcc_objs + host_extra_objs=$extra_host_objs + pass2done=yes + fi + fi +done + +extra_objs="${host_extra_objs} ${extra_objs}" + +# Default the target-machine variables that were not explicitly set. +if [[ x"$tm_file" = x ]] +then tm_file=$cpu_type/$cpu_type.h; fi + +if [[ x$extra_headers = x ]] +then extra_headers=; fi + +if [[ x"$xm_file" = x ]] +then xm_file=$cpu_type/xm-$cpu_type.h; fi + +md_file=$cpu_type/$cpu_type.md + +if [[ x$out_file = x ]] +then out_file=$cpu_type/$cpu_type.c; fi + +if [[ x"$tmake_file" = x ]] +then tmake_file=$cpu_type/t-$cpu_type +fi + +if [[ x$float_format = x ]] +then float_format=i64 +fi + +# Say what files are being used for the output code and MD file. +echo "Using \`$srcdir/config/$out_file' to output insns." +echo "Using \`$srcdir/config/$md_file' as machine description file." + +count=a +for f in $tm_file; do + count=${count}x +done +if [[ $count = ax ]]; then + echo "Using \`$srcdir/config/$tm_file' as target machine macro file." +else + echo "Using the following target machine macro files:" + for f in $tm_file; do + echo " $srcdir/config/$f" + done +fi + +count=a +for f in $host_xm_file; do + count=${count}x +done +if [[ $count = ax ]]; then + echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." +else + echo "Using the following host machine macro files:" + for f in $host_xm_file; do + echo " $srcdir/config/$f" + done +fi + +if [[ "$host_xm_file" != "$build_xm_file" ]]; then + count=a + for f in $build_xm_file; do + count=${count}x + done + if [[ $count = ax ]]; then + echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." + else + echo "Using the following build machine macro files:" + for f in $build_xm_file; do + echo " $srcdir/config/$f" + done + fi +fi + +if [[ x$thread_file = x ]] +then thread_file='single' +fi + +# Set up the header files. +# $links is the list of header files to create. +# $vars is the list of shell variables with file names to include. +# auto-conf.h is the file containing items generated by autoconf and is +# the first file included by config.h. +host_xm_file="auto-config.h ${host_xm_file}" +vars="host_xm_file tm_file xm_file build_xm_file" +links="config.h tm.h tconfig.h hconfig.h" + +rm -f config.bak +if [[ -f config.status ]]; then mv -f config.status config.bak; fi + +# Make the links. +while [[ -n "$vars" ]] +do + # set file to car of files, files to cdr of files + set $vars; var=$1; shift; vars=$* + set $links; link=$1; shift; links=$* + + rm -f $link + + # Define TARGET_CPU_DEFAULT if the system wants one. + # This substitutes for lots of *.h files. + if [[ x$target_cpu_default != x -a $link = tm.h ]] + then + echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link + fi + + for file in `eval echo '$'$var`; do + echo "#include \"$file\"" >>$link + done +done + +# Truncate the target if necessary +if [[ x$host_truncate_target != x ]]; then + target=`echo $target | sed -e 's/\(..............\).*/\1/'` +fi + +# Get the version number from the toplevel +version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c` + +# Are we using gcc as the native compiler? +case $host in +*linux* | *cygwin32* | *mingw32*) + if [[ x$prefix = xNONE ]]; then + prefix=$native_prefix + fi + ;; +esac + +# Get an absolute path to the GCC top-level source directory +holddir=`pwd` +cd $srcdir +topdir=`pwd` +cd $holddir + +# Conditionalize the makefile for this host machine. +# Make-host contains the concatenation of all host makefile fragments +# [there can be more than one]. This file is built by configure.frag. +host_overrides=Make-host +dep_host_xmake_file= +for f in .. ${host_xmake_file} +do + if [[ -f ${srcdir}/config/$f ]] + then + dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f" + fi +done + +# Conditionalize the makefile for this target machine. +# Make-target contains the concatenation of all host makefile fragments +# [there can be more than one]. This file is built by configure.frag. +target_overrides=Make-target +dep_tmake_file= +for f in .. ${tmake_file} +do + if [[ -f ${srcdir}/config/$f ]] + then + dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f" + fi +done + +# If the host doesn't support symlinks, modify CC in +# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. +# Otherwise, we can use "CC=$(CC)". +rm -f symtest.tem +if $symbolic_link symtest1.tem symtest.tem 2>/dev/null +then + cc_set_by_configure="\$(CC)" + stage_prefix_set_by_configure="\$(STAGE_PREFIX)" +else + symbolic_link="cp -p" + cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" + stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" +fi +rm -f symtest.tem + +out_object_file=`basename $out_file .c`.o + +tm_file_list= +for f in $tm_file; do + tm_file_list="${tm_file_list} \$(srcdir)/config/$f" +done + +host_xm_file_list= +for f in $host_xm_file; do + host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" +done + +build_xm_file_list= +for f in $build_xm_file; do + build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" +done + +# Define macro CROSS_COMPILE in compilation +# if this is a cross-compiler. +# Also use all.cross instead of all.internal +# and add cross-make to Makefile. +cross_overrides="/dev/null" +if [[ x$host != x$target ]] +then + cross_defines="CROSS=-DCROSS_COMPILE" + cross_overrides="${topdir}/cross-make" +fi + +# When building gcc with a cross-compiler, we need to fix a few things. +# This must come after cross-make as we want all.build to override +# all.cross. +build_overrides="/dev/null" +if [[ x$build != x$host ]] +then + build_overrides="${topdir}/build-make" +fi + +# Expand extra_headers to include complete path. +# This substitutes for lots of t-* files. +extra_headers_list= +if [[ "x$extra_headers" = x ]] +then true +else + # Prepend ${srcdir}/ginclude/ to every entry in extra_headers. + for file in $extra_headers; + do + extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}" + done +fi + +# Add a definition of USE_COLLECT2 if system wants one. +# Also tell toplev.c what to do. +# This substitutes for lots of t-* files. +if [[ x$use_collect2 = x ]] +then + will_use_collect2= + maybe_use_collect2= +else + will_use_collect2="ld" + maybe_use_collect2="-DUSE_COLLECT2" +fi + +# NEED TO CONVERT +# Set MD_DEPS if the real md file is in md.pre-cpp. +# Set MD_CPP to the cpp to pass the md file through. Md files use ';' +# for line oriented comments, so we must always use a GNU cpp. If +# building gcc with a cross compiler, use the cross compiler just +# built. Otherwise, we can use the cpp just built. +md_file_sub= +if [[ "x$md_cppflags" = x ]] +then + md_file_sub=$srcdir/config/$md_file +else + md_file=md +fi + +# If we have gas in the build tree, make a link to it. +if [[ -f ../gas/Makefile ]]; then + rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null +fi + +# If we have ld in the build tree, make a link to it. +if [[ -f ../ld/Makefile ]]; then + if [[ x$use_collect2 = x ]]; then + rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null + else + rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null + fi +fi + +# Figure out what language subdirectories are present. +subdirs= +for lang in ${srcdir}/*/config-lang.in .. +do + case $lang in + ..) ;; + # The odd quoting in the next line works around + # an apparent bug in bash 1.12 on linux. + ${srcdir}/[[*]]/config-lang.in) ;; + *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;; + esac +done + +# Make empty files to contain the specs and options for each language. +# Then add #include lines to for a compiler that has specs and/or options. + +lang_specs_files= +lang_options_files= +rm -f specs.h options.h +touch specs.h options.h +for subdir in . $subdirs +do + if [[ -f $srcdir/$subdir/lang-specs.h ]]; then + echo "#include \"$subdir/lang-specs.h\"" >>specs.h + lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" + fi + if [[ -f $srcdir/$subdir/lang-options.h ]]; then + echo "#include \"$subdir/lang-options.h\"" >>options.h + lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h" + fi +done + +# These (without "all_") are set in each config-lang.in. +# `language' must be a single word so is spelled singularly. +all_languages= +all_boot_languages= +all_compilers= +all_stagestuff= +all_diff_excludes= +all_outputs=Makefile +# List of language makefile fragments. +all_lang_makefiles= +all_headers= +all_lib2funcs= + +# Add the language fragments. +# Languages are added via two mechanisms. Some information must be +# recorded in makefile variables, these are defined in config-lang.in. +# We accumulate them and plug them into the main Makefile. +# The other mechanism is a set of hooks for each of the main targets +# like `clean', `install', etc. + +language_fragments="Make-lang" +language_hooks="Make-hooks" +oldstyle_subdirs= + +for s in .. $subdirs +do + if [[ $s != ".." ]] + then + language= + boot_language= + compilers= + stagestuff= + diff_excludes= + headers= + outputs= + lib2funcs= + . ${srcdir}/$s/config-lang.in + if [[ "x$language" = x ]] + then + echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 + exit 1 + fi + all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in" + all_languages="$all_languages $language" + if [[ "x$boot_language" = xyes ]] + then + all_boot_languages="$all_boot_languages $language" + fi + all_compilers="$all_compilers $compilers" + all_stagestuff="$all_stagestuff $stagestuff" + all_diff_excludes="$all_diff_excludes $diff_excludes" + all_headers="$all_headers $headers" + all_outputs="$all_outputs $outputs" + if [[ x$outputs = x ]] + then + oldstyle_subdirs="$oldstyle_subdirs $s" + fi + all_lib2funcs="$all_lib2funcs $lib2funcs" + fi +done + +# Since we can't use `::' targets, we link each language in +# with a set of hooks, reached indirectly via lang.${target}. + +rm -f Make-hooks +touch Make-hooks +target_list="all.build all.cross start.encap rest.encap \ + info dvi \ + install-normal install-common install-info install-man \ + uninstall distdir \ + mostlyclean clean distclean extraclean maintainer-clean \ + stage1 stage2 stage3 stage4" +for t in $target_list +do + x= + for l in .. $all_languages + do + if [[ $l != ".." ]]; then + x="$x $l.$t" + fi + done + echo "lang.$t: $x" >> Make-hooks +done + +# If we're not building in srcdir, create .gdbinit. + +if [[ ! -f Makefile.in ]]; then + echo "dir ." > .gdbinit + echo "dir ${srcdir}" >> .gdbinit + if [[ x$gdb_needs_out_file_path = xyes ]] + then + echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit + fi + if [[ "x$subdirs" != x ]]; then + for s in $subdirs + do + echo "dir ${srcdir}/$s" >> .gdbinit + done + fi + echo "source ${srcdir}/.gdbinit" >> .gdbinit +fi + +# Process the language and host/target makefile fragments. +${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" + +# Substitute configuration variables +AC_SUBST(subdirs) +AC_SUBST(all_languages) +AC_SUBST(all_boot_languages) +AC_SUBST(all_compilers) +AC_SUBST(all_lang_makefiles) +AC_SUBST(all_stagestuff) +AC_SUBST(all_diff_excludes) +AC_SUBST(all_lib2funcs) +AC_SUBST(all_headers) +AC_SUBST(extra_passes) +AC_SUBST(extra_programs) +AC_SUBST(extra_parts) +AC_SUBST(extra_c_objs) +AC_SUBST(extra_c_flags) +AC_SUBST(extra_objs) +AC_SUBST(host_extra_gcc_objs) +AC_SUBST(extra_headers_list) +AC_SUBST(dep_host_xmake_file) +AC_SUBST(dep_tmake_file) +AC_SUBST(out_file) +AC_SUBST(out_object_file) +AC_SUBST(md_file) +AC_SUBST(tm_file_list) +AC_SUBST(build_xm_file_list) +AC_SUBST(host_xm_file_list) +AC_SUBST(lang_specs_files) +AC_SUBST(lang_options_files) +AC_SUBST(thread_file) +AC_SUBST(version) +AC_SUBST(local_prefix) +AC_SUBST(gxx_include_dir) +AC_SUBST(fixincludes) +AC_SUBST(build_install_headers_dir) +AC_SUBST(build_exeext) +AC_SUBST(float_format) +AC_SUBST(will_use_collect2) +AC_SUBST(maybe_use_collect2) +AC_SUBST(cc_set_by_configure) +AC_SUBST(stage_prefix_set_by_configure) +AC_SUBST(symbolic_link) + +AC_SUBST_FILE(target_overrides) +AC_SUBST_FILE(host_overrides) +AC_SUBST(cross_defines) +AC_SUBST_FILE(cross_overrides) +AC_SUBST_FILE(build_overrides) +AC_SUBST_FILE(language_fragments) +AC_SUBST_FILE(language_hooks) + +# Echo that links are built +if [[ x$host = x$target ]] +then + str1="native " +else + str1="cross-" + str2=" from $host" +fi + +if [[ x$host != x$build ]] +then + str3=" on a $build system" +fi + +if [[ "x$str2" != x ]] || [[ "x$str3" != x ]] +then + str4= +fi + +echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2 + +if [[ "x$str2" != x ]] || [[ "x$str3" != x ]] +then + echo " ${str2}${str3}." 1>&2 +fi + +# Configure the subdirectories +# AC_CONFIG_SUBDIRS($subdirs) + +# Create the Makefile +# and configure language subdirectories +AC_OUTPUT($all_outputs, +[ +. $srcdir/configure.lang +case x$CONFIG_HEADERS in +xauto-config.h:config.in) +echo > cstamp-h ;; +esac +# If the host supports symlinks, point stage[1234] at ../stage[1234] so +# bootstrapping and the installation procedure can still use +# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, +# FLAGS_TO_PASS has been modified to solve the problem there. +# This is virtually a duplicate of what happens in configure.lang; we do +# an extra check to make sure this only happens if ln -s can be used. +if [[ "$symbolic_link" = "ln -s" ]]; then + for d in .. ${subdirs} ; do + if [[ $d != .. ]]; then + STARTDIR=`pwd` + cd $d + for t in stage1 stage2 stage3 stage4 include + do + rm -f $t + $symbolic_link ../$t $t 2>/dev/null + done + cd $STARTDIR + fi + done +else true ; fi +], +[ +host='${host}' +build='${build}' +target='${target}' +target_alias='${target_alias}' +srcdir='${srcdir}' +subdirs='${subdirs}' +oldstyle_subdirs='${oldstyle_subdirs}' +symbolic_link='${symbolic_link}' +program_transform_set='${program_transform_set}' +program_transform_name='${program_transform_name}' +dep_host_xmake_file='${dep_host_xmake_file}' +host_xmake_file='${host_xmake_file}' +dep_tmake_file='${dep_tmake_file}' +tmake_file='${tmake_file}' +thread_file='${thread_file}' +version='${version}' +local_prefix='${local_prefix}' +build_install_headers_dir='${build_install_headers_dir}' +build_exeext='${build_exeext}' +out_file='${out_file}' +gdb_needs_out_file_path='${gdb_needs_out_file_path}' +SET_MAKE='${SET_MAKE}' +build_broken_install='${build_broken_install}' +target_list='${target_list}' +target_overrides='${target_overrides}' +host_overrides='${host_overrides}' +cross_defines='${cross_defines}' +cross_overrides='${cross_overrides}' +build_overrides='${build_overrides}' +]) diff --git a/gnu/usr.bin/gcc/configure.lang b/gnu/usr.bin/gcc/configure.lang new file mode 100644 index 00000000000..df28127fb89 --- /dev/null +++ b/gnu/usr.bin/gcc/configure.lang @@ -0,0 +1,233 @@ +# configure.lang for GNU CC +# This script is run by configure for configuration of language +# subdirectories which conform to the old GCC configure mechanism +# for such subdirectories. + +# Copyright (C) 1997 Free Software Foundation, Inc. + +#This file is part of GNU CC. + +#GNU CC is free software; you can redistribute it and/or modify +#it under the terms of the GNU General Public License as published by +#the Free Software Foundation; either version 2, or (at your option) +#any later version. + +#GNU CC is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with GNU CC; see the file COPYING. If not, write to +#the Free Software Foundation, 59 Temple Place - Suite 330, +#Boston, MA 02111-1307, USA. + +savesrcdir=$srcdir + +for subdir in . $oldstyle_subdirs +do + # We only want to do this in language subdirs, but we have to handle + # the case of $oldstyle_subdirs = "". + if [ $subdir = . ] + then + continue + fi + + oldsrcdir=$savesrcdir + + # Re-adjust the path + case $oldsrcdir in + /*) + srcdir=$oldsrcdir/$subdir + ;; + *) + oldsrcdir=../${oldsrcdir} + srcdir=$oldsrcdir/$subdir + ;; + esac + mainsrcdir=$oldsrcdir + STARTDIR=`pwd` + test -d $subdir || mkdir $subdir + cd $subdir + + # Create Makefile.tem from Makefile.in. + # Make it set VPATH if necessary so that the sources are found. + # Also change its value of srcdir. + # Also create a .gdbinit file which runs the one in srcdir + # and tells GDB to look there for source files. + case $srcdir in + . | ./$subdir | .././$subdir) + rm -f Makefile.tem + cp Makefile.in Makefile.tem + chmod +w Makefile.tem + ;; + *) + rm -f Makefile.tem + echo "VPATH = ${srcdir}" \ + | cat - ${srcdir}/Makefile.in \ + | sed "s@^srcdir = \.@srcdir = ${srcdir}@" > Makefile.tem + rm -f .gdbinit + echo "dir ." > .gdbinit + echo "dir ${srcdir}" >> .gdbinit + echo "dir ${mainsrcdir}" >> .gdbinit + if [ x$gdb_needs_out_file_path = xyes ] + then + echo "dir ${mainsrcdir}/config/"`dirname ${out_file}` >> .gdbinit + fi + echo "source ${mainsrcdir}/.gdbinit" >> .gdbinit + ;; + esac + + # Conditionalize the makefile for this host machine. + rm -f Makefile.xx Makefile.ll + merged_frags= + for f in .. ${host_xmake_file} + do + if [ -f ${mainsrcdir}/config/$f ] + then + cat ${mainsrcdir}/config/$f >> Makefile.ll + if [ x"${merged_frags}" != x ] + then + merged_frags="${merged_frags} and " + fi + merged_frags="${merged_frags}${f}" + fi + done + if [ x"${merged_frags}" != x ] + then + sed -e "/####host/ r Makefile.ll" Makefile.tem > Makefile.xx + echo "Merged ${merged_frags}." + rm -f Makefile.tem + mv Makefile.xx Makefile.tem + rm -f Makefile.ll + fi + + # Add a definition for MAKE if system wants one. + case "$SET_MAKE" in + ?*) + rm -f Makefile.xx + (echo "$SET_MAKE"; cat Makefile.tem) >Makefile.xx + rm -f Makefile.tem + mv Makefile.xx Makefile.tem + esac + + # Add a definition for INSTALL if system wants one. + # This substitutes for lots of x-* files. + if [ x$build_broken_install = x ] + then true + else + rm -f Makefile.xx + abssrcdir=`cd ${srcdir}; pwd` + sed "s|^INSTALL = .*|INSTALL = ${abssrcdir}/install.sh -c|" Makefile.tem > Makefile.xx + rm -f Makefile.tem + mv Makefile.xx Makefile.tem + fi + + # If using -program-transform-name, override the installation names. + if [ "x${program_transform_set}" = "xyes" ] ; then + sed -e "s/^program_transform_name[ ]*=.*$/program_transform_name = +$program_transform_name/" \ + -e "s/^program_transform_cross_name[ +]*=.*$/program_transform_cross_name = $program_transform_name/" \ + Makefile.tem > Makefile.xx + rm -f Makefile.tem + mv Makefile.xx Makefile.tem + fi + + # Conditionalize the makefile for this target machine. + rm -f Makefile.xx Makefile.ll + merged_frags= + for f in .. ${tmake_file} + do + if [ -f ${mainsrcdir}/config/$f ] + then + cat ${mainsrcdir}/config/$f >> Makefile.ll + if [ x"${merged_frags}" != x ] + then + merged_frags="${merged_frags} and " + fi + merged_frags="${merged_frags}$f" + fi + done + if [ x"${merged_frags}" != x ] + then + sed -e "/####target/ r Makefile.ll" Makefile.tem > Makefile.xx + echo "Merged ${merged_frags}." + rm -f Makefile.tem + mv Makefile.xx Makefile.tem + rm -f Makefile.ll + fi + + # If the host supports + # symlinks, point stage[123] at ../stage[123] so bootstrapping and the + # installation procedure can still use CC="stage1/xgcc -Bstage1/". + # If the host doesn't support symlinks, FLAGS_TO_PASS has been + # modified to solve the problem there. + for t in stage1 stage2 stage3 stage4 include + do + rm -f $t + $symbolic_link ../$t $t 2>/dev/null + done + + # Remove all formfeeds, since some Makes get confused by them. + # Also arrange to give the variables `target', `target_alias', + # `host_xmake_file', `tmake_file', `prefix', `local_prefix', + # `exec_prefix', `INSTALL_HEADERS_DIR', `exeext' + # values in the Makefile from the values they have in this script. + rm -f Makefile.xx + # Create an empty Makefile.sed first, to work around a Nextstep 3.3 bug. + echo 's|||' > Makefile.sed + rm Makefile.sed + echo 's|||' > Makefile.sed + echo "s|^target=.*$|target=${target}|" >> Makefile.sed + echo "s|^target_alias=.*$|target=${target_alias}|" >> Makefile.sed + echo "s|^xmake_file=.*$|xmake_file=${dep_host_xmake_file}|" >> Makefile.sed + echo "s|^tmake_file=.*$|tmake_file=${dep_tmake_file}|" >> Makefile.sed + echo "s|^version=.*$|version=${version}|" >> Makefile.sed + echo "s|^GCC_THREAD_FILE=.*$|GCC_THREAD_FILE=${thread_file}|" >> Makefile.sed + echo "s|^prefix[ ]*=.*|prefix = $prefix|" >> Makefile.sed + echo "s|^local_prefix[ ]*=.*|local_prefix = $local_prefix|" >> Makefile.sed + echo "s|^exec_prefix[ ]*=.*|exec_prefix = $exec_prefix|" >> Makefile.sed + echo "s|^INSTALL_HEADERS_DIR[ ]*=.*$|INSTALL_HEADERS_DIR = ${build_install_headers_dir}|" >> Makefile.sed + echo "s|^exeext[ ]*=.*$|exeext = ${build_exeext}|" >> Makefile.sed + sed -f Makefile.sed Makefile.tem > Makefile.xx + rm -f Makefile.tem Makefile.sed + mv Makefile.xx Makefile.tem + + # Install Makefile for real, after making final changes. + # Define macro CROSS_COMPILE in compilation + # if this is a cross-compiler. + # Also use all.cross instead of all.internal + # and add cross-make to Makefile. + if [ x$host != x$target ] + then + rm -f Makefile.xx + echo "CROSS=-DCROSS_COMPILE" > Makefile.xx + sed -e "/####cross/ r ${mainsrcdir}/cross-make" Makefile.tem >> Makefile.xx + rm -f Makefile.tem + mv Makefile.xx Makefile.tem + fi + + # When building gcc with a cross-compiler, we need to fix a few things. + # This must come after cross-make as we want all.build to override + # all.cross. + if [ x$build != x$host ] + then + rm -f Makefile.xx + echo "build= $build" > Makefile.xx + echo "host= $host" >> Makefile.xx + sed -e "s|objc-runtime$||" \ + -e "/####build/ r ${mainsrcdir}/build-make" Makefile.tem >> Makefile.xx + rm -f Makefile.tem + mv Makefile.xx Makefile.tem + fi + + rm -f Makefile + mv Makefile.tem Makefile + echo "Created \`$subdir/Makefile'." + + cd $STARTDIR +done # end of current-dir SUBDIRS loop + +# Restore this, remember we're invoked with `.'. +srcdir=$savesrcdir diff --git a/gnu/usr.bin/gcc/cstamp-h.in b/gnu/usr.bin/gcc/cstamp-h.in new file mode 100644 index 00000000000..9788f70238c --- /dev/null +++ b/gnu/usr.bin/gcc/cstamp-h.in @@ -0,0 +1 @@ +timestamp diff --git a/gnu/usr.bin/gcc/dwarf2.h b/gnu/usr.bin/gcc/dwarf2.h new file mode 100644 index 00000000000..db19904802c --- /dev/null +++ b/gnu/usr.bin/gcc/dwarf2.h @@ -0,0 +1,548 @@ +/* Declarations and definitions of codes relating to the DWARF2 symbolic + debugging information format. + Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc. + Contributed by Gary Funck (gary@intrepid.com). Derived from the + DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.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 file is derived from the DWARF specification (a public document) + Revision 2.0.0 (July 27, 1993) developed by the UNIX International + Programming Languages Special Interest Group (UI/PLSIG) and distributed + by UNIX International. Copies of this specification are available from + UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054. */ + +/* This file is shared between GCC and GDB, and should not contain + prototypes. */ + +/* Tag names and codes. */ + +enum dwarf_tag + { + DW_TAG_padding = 0x00, + DW_TAG_array_type = 0x01, + DW_TAG_class_type = 0x02, + DW_TAG_entry_point = 0x03, + DW_TAG_enumeration_type = 0x04, + DW_TAG_formal_parameter = 0x05, + DW_TAG_imported_declaration = 0x08, + DW_TAG_label = 0x0a, + DW_TAG_lexical_block = 0x0b, + DW_TAG_member = 0x0d, + DW_TAG_pointer_type = 0x0f, + DW_TAG_reference_type = 0x10, + DW_TAG_compile_unit = 0x11, + DW_TAG_string_type = 0x12, + DW_TAG_structure_type = 0x13, + DW_TAG_subroutine_type = 0x15, + DW_TAG_typedef = 0x16, + DW_TAG_union_type = 0x17, + DW_TAG_unspecified_parameters = 0x18, + DW_TAG_variant = 0x19, + DW_TAG_common_block = 0x1a, + DW_TAG_common_inclusion = 0x1b, + DW_TAG_inheritance = 0x1c, + DW_TAG_inlined_subroutine = 0x1d, + DW_TAG_module = 0x1e, + DW_TAG_ptr_to_member_type = 0x1f, + DW_TAG_set_type = 0x20, + DW_TAG_subrange_type = 0x21, + DW_TAG_with_stmt = 0x22, + DW_TAG_access_declaration = 0x23, + DW_TAG_base_type = 0x24, + DW_TAG_catch_block = 0x25, + DW_TAG_const_type = 0x26, + DW_TAG_constant = 0x27, + DW_TAG_enumerator = 0x28, + DW_TAG_file_type = 0x29, + DW_TAG_friend = 0x2a, + DW_TAG_namelist = 0x2b, + DW_TAG_namelist_item = 0x2c, + DW_TAG_packed_type = 0x2d, + DW_TAG_subprogram = 0x2e, + DW_TAG_template_type_param = 0x2f, + DW_TAG_template_value_param = 0x30, + DW_TAG_thrown_type = 0x31, + DW_TAG_try_block = 0x32, + DW_TAG_variant_part = 0x33, + DW_TAG_variable = 0x34, + DW_TAG_volatile_type = 0x35, + /* SGI/MIPS Extensions */ + DW_TAG_MIPS_loop = 0x4081, + /* GNU extensions */ + DW_TAG_format_label = 0x4101, /* for FORTRAN 77 and Fortran 90 */ + DW_TAG_function_template = 0x4102, /* for C++ */ + DW_TAG_class_template = 0x4103 /* for C++ */ + }; + +#define DW_TAG_lo_user 0x4080 +#define DW_TAG_hi_user 0xffff + +/* flag that tells whether entry has a child or not */ +#define DW_children_no 0 +#define DW_children_yes 1 + +/* Form names and codes. */ +enum dwarf_form + { + DW_FORM_addr = 0x01, + DW_FORM_block2 = 0x03, + DW_FORM_block4 = 0x04, + DW_FORM_data2 = 0x05, + DW_FORM_data4 = 0x06, + DW_FORM_data8 = 0x07, + DW_FORM_string = 0x08, + DW_FORM_block = 0x09, + DW_FORM_block1 = 0x0a, + DW_FORM_data1 = 0x0b, + DW_FORM_flag = 0x0c, + DW_FORM_sdata = 0x0d, + DW_FORM_strp = 0x0e, + DW_FORM_udata = 0x0f, + DW_FORM_ref_addr = 0x10, + DW_FORM_ref1 = 0x11, + DW_FORM_ref2 = 0x12, + DW_FORM_ref4 = 0x13, + DW_FORM_ref8 = 0x14, + DW_FORM_ref_udata = 0x15, + DW_FORM_indirect = 0x16 + }; + +/* Attribute names and codes. */ + +enum dwarf_attribute + { + DW_AT_sibling = 0x01, + DW_AT_location = 0x02, + DW_AT_name = 0x03, + DW_AT_ordering = 0x09, + DW_AT_subscr_data = 0x0a, + DW_AT_byte_size = 0x0b, + DW_AT_bit_offset = 0x0c, + DW_AT_bit_size = 0x0d, + DW_AT_element_list = 0x0f, + DW_AT_stmt_list = 0x10, + DW_AT_low_pc = 0x11, + DW_AT_high_pc = 0x12, + DW_AT_language = 0x13, + DW_AT_member = 0x14, + DW_AT_discr = 0x15, + DW_AT_discr_value = 0x16, + DW_AT_visibility = 0x17, + DW_AT_import = 0x18, + DW_AT_string_length = 0x19, + DW_AT_common_reference = 0x1a, + DW_AT_comp_dir = 0x1b, + DW_AT_const_value = 0x1c, + DW_AT_containing_type = 0x1d, + DW_AT_default_value = 0x1e, + DW_AT_inline = 0x20, + DW_AT_is_optional = 0x21, + DW_AT_lower_bound = 0x22, + DW_AT_producer = 0x25, + DW_AT_prototyped = 0x27, + DW_AT_return_addr = 0x2a, + DW_AT_start_scope = 0x2c, + DW_AT_stride_size = 0x2e, + DW_AT_upper_bound = 0x2f, + DW_AT_abstract_origin = 0x31, + DW_AT_accessibility = 0x32, + DW_AT_address_class = 0x33, + DW_AT_artificial = 0x34, + DW_AT_base_types = 0x35, + DW_AT_calling_convention = 0x36, + DW_AT_count = 0x37, + DW_AT_data_member_location = 0x38, + DW_AT_decl_column = 0x39, + DW_AT_decl_file = 0x3a, + DW_AT_decl_line = 0x3b, + DW_AT_declaration = 0x3c, + DW_AT_discr_list = 0x3d, + DW_AT_encoding = 0x3e, + DW_AT_external = 0x3f, + DW_AT_frame_base = 0x40, + DW_AT_friend = 0x41, + DW_AT_identifier_case = 0x42, + DW_AT_macro_info = 0x43, + DW_AT_namelist_items = 0x44, + DW_AT_priority = 0x45, + DW_AT_segment = 0x46, + DW_AT_specification = 0x47, + DW_AT_static_link = 0x48, + DW_AT_type = 0x49, + DW_AT_use_location = 0x4a, + DW_AT_variable_parameter = 0x4b, + DW_AT_virtuality = 0x4c, + DW_AT_vtable_elem_location = 0x4d, + /* SGI/MIPS Extensions */ + DW_AT_MIPS_fde = 0x2001, + DW_AT_MIPS_loop_begin = 0x2002, + DW_AT_MIPS_tail_loop_begin = 0x2003, + DW_AT_MIPS_epilog_begin = 0x2004, + DW_AT_MIPS_loop_unroll_factor = 0x2005, + DW_AT_MIPS_software_pipeline_depth = 0x2006, + DW_AT_MIPS_linkage_name = 0x2007, + DW_AT_MIPS_stride = 0x2008, + DW_AT_MIPS_abstract_name = 0x2009, + DW_AT_MIPS_clone_origin = 0x200a, + DW_AT_MIPS_has_inlines = 0x200b, + /* GNU extensions. */ + DW_AT_sf_names = 0x2101, + DW_AT_src_info = 0x2102, + DW_AT_mac_info = 0x2103, + DW_AT_src_coords = 0x2104, + DW_AT_body_begin = 0x2105, + DW_AT_body_end = 0x2106 + }; + +#define DW_AT_lo_user 0x2000 /* implementation-defined range start */ +#define DW_AT_hi_user 0x3ff0 /* implementation-defined range end */ + +/* Location atom names and codes. */ + +enum dwarf_location_atom + { + DW_OP_addr = 0x03, + DW_OP_deref = 0x06, + DW_OP_const1u = 0x08, + DW_OP_const1s = 0x09, + DW_OP_const2u = 0x0a, + DW_OP_const2s = 0x0b, + DW_OP_const4u = 0x0c, + DW_OP_const4s = 0x0d, + DW_OP_const8u = 0x0e, + DW_OP_const8s = 0x0f, + DW_OP_constu = 0x10, + DW_OP_consts = 0x11, + DW_OP_dup = 0x12, + DW_OP_drop = 0x13, + DW_OP_over = 0x14, + DW_OP_pick = 0x15, + DW_OP_swap = 0x16, + DW_OP_rot = 0x17, + DW_OP_xderef = 0x18, + DW_OP_abs = 0x19, + DW_OP_and = 0x1a, + DW_OP_div = 0x1b, + DW_OP_minus = 0x1c, + DW_OP_mod = 0x1d, + DW_OP_mul = 0x1e, + DW_OP_neg = 0x1f, + DW_OP_not = 0x20, + DW_OP_or = 0x21, + DW_OP_plus = 0x22, + DW_OP_plus_uconst = 0x23, + DW_OP_shl = 0x24, + DW_OP_shr = 0x25, + DW_OP_shra = 0x26, + DW_OP_xor = 0x27, + DW_OP_bra = 0x28, + DW_OP_eq = 0x29, + DW_OP_ge = 0x2a, + DW_OP_gt = 0x2b, + DW_OP_le = 0x2c, + DW_OP_lt = 0x2d, + DW_OP_ne = 0x2e, + DW_OP_skip = 0x2f, + DW_OP_lit0 = 0x30, + DW_OP_lit1 = 0x31, + DW_OP_lit2 = 0x32, + DW_OP_lit3 = 0x33, + DW_OP_lit4 = 0x34, + DW_OP_lit5 = 0x35, + DW_OP_lit6 = 0x36, + DW_OP_lit7 = 0x37, + DW_OP_lit8 = 0x38, + DW_OP_lit9 = 0x39, + DW_OP_lit10 = 0x3a, + DW_OP_lit11 = 0x3b, + DW_OP_lit12 = 0x3c, + DW_OP_lit13 = 0x3d, + DW_OP_lit14 = 0x3e, + DW_OP_lit15 = 0x3f, + DW_OP_lit16 = 0x40, + DW_OP_lit17 = 0x41, + DW_OP_lit18 = 0x42, + DW_OP_lit19 = 0x43, + DW_OP_lit20 = 0x44, + DW_OP_lit21 = 0x45, + DW_OP_lit22 = 0x46, + DW_OP_lit23 = 0x47, + DW_OP_lit24 = 0x48, + DW_OP_lit25 = 0x49, + DW_OP_lit26 = 0x4a, + DW_OP_lit27 = 0x4b, + DW_OP_lit28 = 0x4c, + DW_OP_lit29 = 0x4d, + DW_OP_lit30 = 0x4e, + DW_OP_lit31 = 0x4f, + DW_OP_reg0 = 0x50, + DW_OP_reg1 = 0x51, + DW_OP_reg2 = 0x52, + DW_OP_reg3 = 0x53, + DW_OP_reg4 = 0x54, + DW_OP_reg5 = 0x55, + DW_OP_reg6 = 0x56, + DW_OP_reg7 = 0x57, + DW_OP_reg8 = 0x58, + DW_OP_reg9 = 0x59, + DW_OP_reg10 = 0x5a, + DW_OP_reg11 = 0x5b, + DW_OP_reg12 = 0x5c, + DW_OP_reg13 = 0x5d, + DW_OP_reg14 = 0x5e, + DW_OP_reg15 = 0x5f, + DW_OP_reg16 = 0x60, + DW_OP_reg17 = 0x61, + DW_OP_reg18 = 0x62, + DW_OP_reg19 = 0x63, + DW_OP_reg20 = 0x64, + DW_OP_reg21 = 0x65, + DW_OP_reg22 = 0x66, + DW_OP_reg23 = 0x67, + DW_OP_reg24 = 0x68, + DW_OP_reg25 = 0x69, + DW_OP_reg26 = 0x6a, + DW_OP_reg27 = 0x6b, + DW_OP_reg28 = 0x6c, + DW_OP_reg29 = 0x6d, + DW_OP_reg30 = 0x6e, + DW_OP_reg31 = 0x6f, + DW_OP_breg0 = 0x70, + DW_OP_breg1 = 0x71, + DW_OP_breg2 = 0x72, + DW_OP_breg3 = 0x73, + DW_OP_breg4 = 0x74, + DW_OP_breg5 = 0x75, + DW_OP_breg6 = 0x76, + DW_OP_breg7 = 0x77, + DW_OP_breg8 = 0x78, + DW_OP_breg9 = 0x79, + DW_OP_breg10 = 0x7a, + DW_OP_breg11 = 0x7b, + DW_OP_breg12 = 0x7c, + DW_OP_breg13 = 0x7d, + DW_OP_breg14 = 0x7e, + DW_OP_breg15 = 0x7f, + DW_OP_breg16 = 0x80, + DW_OP_breg17 = 0x81, + DW_OP_breg18 = 0x82, + DW_OP_breg19 = 0x83, + DW_OP_breg20 = 0x84, + DW_OP_breg21 = 0x85, + DW_OP_breg22 = 0x86, + DW_OP_breg23 = 0x87, + DW_OP_breg24 = 0x88, + DW_OP_breg25 = 0x89, + DW_OP_breg26 = 0x8a, + DW_OP_breg27 = 0x8b, + DW_OP_breg28 = 0x8c, + DW_OP_breg29 = 0x8d, + DW_OP_breg30 = 0x8e, + DW_OP_breg31 = 0x8f, + DW_OP_regx = 0x90, + DW_OP_fbreg = 0x91, + DW_OP_bregx = 0x92, + DW_OP_piece = 0x93, + DW_OP_deref_size = 0x94, + DW_OP_xderef_size = 0x95, + DW_OP_nop = 0x96 + }; + +#define DW_OP_lo_user 0x80 /* implementation-defined range start */ +#define DW_OP_hi_user 0xff /* implementation-defined range end */ + +/* Type encodings. */ + +enum dwarf_type + { + DW_ATE_void = 0x0, + DW_ATE_address = 0x1, + DW_ATE_boolean = 0x2, + DW_ATE_complex_float = 0x3, + DW_ATE_float = 0x4, + DW_ATE_signed = 0x5, + DW_ATE_signed_char = 0x6, + DW_ATE_unsigned = 0x7, + DW_ATE_unsigned_char = 0x8 + }; + +#define DW_ATE_lo_user 0x80 +#define DW_ATE_hi_user 0xff + +/* Array ordering names and codes. */ +enum dwarf_array_dim_ordering + { + DW_ORD_row_major = 0, + DW_ORD_col_major = 1 + }; + +/* access attribute */ +enum dwarf_access_attribute + { + DW_ACCESS_public = 1, + DW_ACCESS_protected = 2, + DW_ACCESS_private = 3 + }; + +/* visibility */ +enum dwarf_visibility_attribute + { + DW_VIS_local = 1, + DW_VIS_exported = 2, + DW_VIS_qualified = 3 + }; + +/* virtuality */ +enum dwarf_virtuality_attribute + { + DW_VIRTUALITY_none = 0, + DW_VIRTUALITY_virtual = 1, + DW_VIRTUALITY_pure_virtual = 2 + }; + +/* case sensitivity */ +enum dwarf_id_case + { + DW_ID_case_sensitive = 0, + DW_ID_up_case = 1, + DW_ID_down_case = 2, + DW_ID_case_insensitive = 3 + }; + +/* calling convention */ +enum dwarf_calling_convention + { + DW_CC_normal = 0x1, + DW_CC_program = 0x2, + DW_CC_nocall = 0x3 + }; + +#define DW_CC_lo_user 0x40 +#define DW_CC_hi_user 0xff + +/* inline attribute */ +enum dwarf_inline_attribute + { + DW_INL_not_inlined = 0, + DW_INL_inlined = 1, + DW_INL_declared_not_inlined = 2, + DW_INL_declared_inlined = 3 + }; + +/* discriminant lists */ +enum dwarf_discrim_list + { + DW_DSC_label = 0, + DW_DSC_range = 1 + }; + +/* line number opcodes */ +enum dwarf_line_number_ops + { + DW_LNS_extended_op = 0, + DW_LNS_copy = 1, + DW_LNS_advance_pc = 2, + DW_LNS_advance_line = 3, + DW_LNS_set_file = 4, + DW_LNS_set_column = 5, + DW_LNS_negate_stmt = 6, + DW_LNS_set_basic_block = 7, + DW_LNS_const_add_pc = 8, + DW_LNS_fixed_advance_pc = 9 + }; + +/* line number extended opcodes */ +enum dwarf_line_number_x_ops + { + DW_LNE_end_sequence = 1, + DW_LNE_set_address = 2, + DW_LNE_define_file = 3 + }; + +/* call frame information */ +enum dwarf_call_frame_info + { + DW_CFA_advance_loc = 0x40, + DW_CFA_offset = 0x80, + DW_CFA_restore = 0xc0, + DW_CFA_nop = 0x00, + DW_CFA_set_loc = 0x01, + DW_CFA_advance_loc1 = 0x02, + DW_CFA_advance_loc2 = 0x03, + DW_CFA_advance_loc4 = 0x04, + DW_CFA_offset_extended = 0x05, + DW_CFA_restore_extended = 0x06, + DW_CFA_undefined = 0x07, + DW_CFA_same_value = 0x08, + DW_CFA_register = 0x09, + DW_CFA_remember_state = 0x0a, + DW_CFA_restore_state = 0x0b, + DW_CFA_def_cfa = 0x0c, + DW_CFA_def_cfa_register = 0x0d, + DW_CFA_def_cfa_offset = 0x0e, + /* SGI/MIPS specific */ + DW_CFA_MIPS_advance_loc8 = 0x1d, + + /* GNU extensions */ + DW_CFA_GNU_window_save = 0x2d, + DW_CFA_GNU_args_size = 0x2e + }; + +#define DW_CIE_ID 0xffffffff +#define DW_CIE_VERSION 1 + +#define DW_CFA_extended 0 +#define DW_CFA_low_user 0x1c +#define DW_CFA_high_user 0x3f + +#define DW_CHILDREN_no 0x00 +#define DW_CHILDREN_yes 0x01 + +#define DW_ADDR_none 0 + +/* Source language names and codes. */ + +enum dwarf_source_language + { + DW_LANG_C89 = 0x0001, + DW_LANG_C = 0x0002, + DW_LANG_Ada83 = 0x0003, + DW_LANG_C_plus_plus = 0x0004, + DW_LANG_Cobol74 = 0x0005, + DW_LANG_Cobol85 = 0x0006, + DW_LANG_Fortran77 = 0x0007, + DW_LANG_Fortran90 = 0x0008, + DW_LANG_Pascal83 = 0x0009, + DW_LANG_Modula2 = 0x000a, + DW_LANG_Mips_Assembler = 0x8001 + }; + + +#define DW_LANG_lo_user 0x8000 /* implementation-defined range start */ +#define DW_LANG_hi_user 0xffff /* implementation-defined range start */ + +/* Names and codes for macro information. */ + +enum dwarf_macinfo_record_type + { + DW_MACINFO_define = 1, + DW_MACINFO_undef = 2, + DW_MACINFO_start_file = 3, + DW_MACINFO_end_file = 4, + DW_MACINFO_vendor_ext = 255 + }; diff --git a/gnu/usr.bin/gcc/dwarf2out.c b/gnu/usr.bin/gcc/dwarf2out.c new file mode 100644 index 00000000000..b1f748cdd97 --- /dev/null +++ b/gnu/usr.bin/gcc/dwarf2out.c @@ -0,0 +1,9652 @@ +/* Output Dwarf2 format symbol table information from the GNU C compiler. + Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc. + Contributed by Gary Funck (gary@intrepid.com). + Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com). + Extensively modified by Jason Merrill (jason@cygnus.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. */ + +/* The first part of this file deals with the DWARF 2 frame unwind + information, which is also used by the GCC efficient exception handling + mechanism. The second part, controlled only by an #ifdef + DWARF2_DEBUGGING_INFO, deals with the other DWARF 2 debugging + information. */ + +#include "config.h" +#include "defaults.h" +#include <stdio.h> +#include "tree.h" +#include "flags.h" +#include "rtl.h" +#include "hard-reg-set.h" +#include "regs.h" +#include "insn-config.h" +#include "reload.h" +#include "output.h" +#include "expr.h" +#include "except.h" +#include "dwarf2.h" + +/* We cannot use <assert.h> in GCC source, since that would include + GCC's assert.h, which may not be compatible with the host compiler. */ +#undef assert +#ifdef NDEBUG +# define assert(e) +#else +# define assert(e) do { if (! (e)) abort (); } while (0) +#endif + +/* Decide whether we want to emit frame unwind information for the current + translation unit. */ + +int +dwarf2out_do_frame () +{ + return (write_symbols == DWARF2_DEBUG +#ifdef DWARF2_UNWIND_INFO + || (flag_exceptions && ! exceptions_via_longjmp) +#endif + ); +} + +#if defined (DWARF2_DEBUGGING_INFO) || defined (DWARF2_UNWIND_INFO) + +#ifndef __GNUC__ +#define inline +#endif + +/* How to start an assembler comment. */ +#ifndef ASM_COMMENT_START +#define ASM_COMMENT_START ";#" +#endif + +typedef struct dw_cfi_struct *dw_cfi_ref; +typedef struct dw_fde_struct *dw_fde_ref; +typedef union dw_cfi_oprnd_struct *dw_cfi_oprnd_ref; + +/* Call frames are described using a sequence of Call Frame + Information instructions. The register number, offset + and address fields are provided as possible operands; + their use is selected by the opcode field. */ + +typedef union dw_cfi_oprnd_struct +{ + unsigned long dw_cfi_reg_num; + long int dw_cfi_offset; + char *dw_cfi_addr; +} +dw_cfi_oprnd; + +typedef struct dw_cfi_struct +{ + dw_cfi_ref dw_cfi_next; + enum dwarf_call_frame_info dw_cfi_opc; + dw_cfi_oprnd dw_cfi_oprnd1; + dw_cfi_oprnd dw_cfi_oprnd2; +} +dw_cfi_node; + +/* All call frame descriptions (FDE's) in the GCC generated DWARF + refer to a single Common Information Entry (CIE), defined at + the beginning of the .debug_frame section. This used of a single + CIE obviates the need to keep track of multiple CIE's + in the DWARF generation routines below. */ + +typedef struct dw_fde_struct +{ + char *dw_fde_begin; + char *dw_fde_current_label; + char *dw_fde_end; + dw_cfi_ref dw_fde_cfi; +} +dw_fde_node; + +/* Maximum size (in bytes) of an artificially generated label. */ +#define MAX_ARTIFICIAL_LABEL_BYTES 30 + +/* Make sure we know the sizes of the various types dwarf can describe. These + are only defaults. If the sizes are different for your target, you should + override these values by defining the appropriate symbols in your tm.h + file. */ + +#ifndef CHAR_TYPE_SIZE +#define CHAR_TYPE_SIZE BITS_PER_UNIT +#endif +#ifndef PTR_SIZE +#define PTR_SIZE (POINTER_SIZE / BITS_PER_UNIT) +#endif + +/* The size in bytes of a DWARF field indicating an offset or length + relative to a debug info section, specified to be 4 bytes in the DWARF-2 + specification. The SGI/MIPS ABI defines it to be the same as PTR_SIZE. */ + +#ifndef DWARF_OFFSET_SIZE +#define DWARF_OFFSET_SIZE 4 +#endif + +#define DWARF_VERSION 2 + +/* Round SIZE up to the nearest BOUNDARY. */ +#define DWARF_ROUND(SIZE,BOUNDARY) \ + (((SIZE) + (BOUNDARY) - 1) & ~((BOUNDARY) - 1)) + +/* Offsets recorded in opcodes are a multiple of this alignment factor. */ +#ifdef STACK_GROWS_DOWNWARD +#define DWARF_CIE_DATA_ALIGNMENT (-UNITS_PER_WORD) +#else +#define DWARF_CIE_DATA_ALIGNMENT UNITS_PER_WORD +#endif + +/* A pointer to the base of a table that contains frame description + information for each routine. */ +static dw_fde_ref fde_table; + +/* Number of elements currently allocated for fde_table. */ +static unsigned fde_table_allocated; + +/* Number of elements in fde_table currently in use. */ +static unsigned fde_table_in_use; + +/* Size (in elements) of increments by which we may expand the + fde_table. */ +#define FDE_TABLE_INCREMENT 256 + +/* A list of call frame insns for the CIE. */ +static dw_cfi_ref cie_cfi_head; + +/* The number of the current function definition for which debugging + information is being generated. These numbers range from 1 up to the + maximum number of function definitions contained within the current + compilation unit. These numbers are used to create unique label id's + unique to each function definition. */ +static unsigned current_funcdef_number = 0; + +/* Some DWARF extensions (e.g., MIPS/SGI) implement a subprogram + attribute that accelerates the lookup of the FDE associated + with the subprogram. This variable holds the table index of the FDE + associated with the current function (body) definition. */ +static unsigned current_funcdef_fde; + +/* Forward declarations for functions defined in this file. */ + +static char *stripattributes PROTO((char *)); +static char *dwarf_cfi_name PROTO((unsigned)); +static dw_cfi_ref new_cfi PROTO((void)); +static void add_cfi PROTO((dw_cfi_ref *, dw_cfi_ref)); +static unsigned long size_of_uleb128 PROTO((unsigned long)); +static unsigned long size_of_sleb128 PROTO((long)); +static void output_uleb128 PROTO((unsigned long)); +static void output_sleb128 PROTO((long)); +static void add_fde_cfi PROTO((char *, dw_cfi_ref)); +static void lookup_cfa_1 PROTO((dw_cfi_ref, unsigned long *, + long *)); +static void lookup_cfa PROTO((unsigned long *, long *)); +static void reg_save PROTO((char *, unsigned, unsigned, + long)); +static void initial_return_save PROTO((rtx)); +static void output_cfi PROTO((dw_cfi_ref, dw_fde_ref)); +static void output_call_frame_info PROTO((int)); +static unsigned reg_number PROTO((rtx)); + +/* Definitions of defaults for assembler-dependent names of various + pseudo-ops and section names. + Theses may be overridden in the tm.h file (if necessary) for a particular + assembler. */ + +#ifdef OBJECT_FORMAT_ELF +#ifndef UNALIGNED_SHORT_ASM_OP +#define UNALIGNED_SHORT_ASM_OP ".2byte" +#endif +#ifndef UNALIGNED_INT_ASM_OP +#define UNALIGNED_INT_ASM_OP ".4byte" +#endif +#ifndef UNALIGNED_DOUBLE_INT_ASM_OP +#define UNALIGNED_DOUBLE_INT_ASM_OP ".8byte" +#endif +#endif /* OBJECT_FORMAT_ELF */ + +#ifndef ASM_BYTE_OP +#define ASM_BYTE_OP ".byte" +#endif + +/* Data and reference forms for relocatable data. */ +#define DW_FORM_data (DWARF_OFFSET_SIZE == 8 ? DW_FORM_data8 : DW_FORM_data4) +#define DW_FORM_ref (DWARF_OFFSET_SIZE == 8 ? DW_FORM_ref8 : DW_FORM_ref4) + +/* Pseudo-op for defining a new section. */ +#ifndef SECTION_ASM_OP +#define SECTION_ASM_OP ".section" +#endif + +/* The default format used by the ASM_OUTPUT_SECTION macro (see below) to + print the SECTION_ASM_OP and the section name. The default here works for + almost all svr4 assemblers, except for the sparc, where the section name + must be enclosed in double quotes. (See sparcv4.h). */ +#ifndef SECTION_FORMAT +#ifdef PUSHSECTION_FORMAT +#define SECTION_FORMAT PUSHSECTION_FORMAT +#else +#define SECTION_FORMAT "\t%s\t%s\n" +#endif +#endif + +#ifndef FRAME_SECTION +#define FRAME_SECTION ".debug_frame" +#endif + +#ifndef FUNC_BEGIN_LABEL +#define FUNC_BEGIN_LABEL "LFB" +#endif +#ifndef FUNC_END_LABEL +#define FUNC_END_LABEL "LFE" +#endif +#define CIE_AFTER_SIZE_LABEL "LSCIE" +#define CIE_END_LABEL "LECIE" +#define CIE_LENGTH_LABEL "LLCIE" +#define FDE_AFTER_SIZE_LABEL "LSFDE" +#define FDE_END_LABEL "LEFDE" +#define FDE_LENGTH_LABEL "LLFDE" + +/* Definitions of defaults for various types of primitive assembly language + output operations. These may be overridden from within the tm.h file, + but typically, that is unnecessary. */ + +#ifndef ASM_OUTPUT_SECTION +#define ASM_OUTPUT_SECTION(FILE, SECTION) \ + fprintf ((FILE), SECTION_FORMAT, SECTION_ASM_OP, SECTION) +#endif + +#ifndef ASM_OUTPUT_DWARF_DATA1 +#define ASM_OUTPUT_DWARF_DATA1(FILE,VALUE) \ + fprintf ((FILE), "\t%s\t0x%x", ASM_BYTE_OP, VALUE) +#endif + +#ifdef UNALIGNED_INT_ASM_OP + +#ifndef UNALIGNED_OFFSET_ASM_OP +#define UNALIGNED_OFFSET_ASM_OP \ + (DWARF_OFFSET_SIZE == 8 ? UNALIGNED_DOUBLE_INT_ASM_OP : UNALIGNED_INT_ASM_OP) +#endif + +#ifndef UNALIGNED_WORD_ASM_OP +#define UNALIGNED_WORD_ASM_OP \ + (PTR_SIZE == 8 ? UNALIGNED_DOUBLE_INT_ASM_OP : UNALIGNED_INT_ASM_OP) +#endif + +#ifndef ASM_OUTPUT_DWARF_DELTA2 +#define ASM_OUTPUT_DWARF_DELTA2(FILE,LABEL1,LABEL2) \ + do { fprintf ((FILE), "\t%s\t", UNALIGNED_SHORT_ASM_OP); \ + assemble_name (FILE, LABEL1); \ + fprintf (FILE, "-"); \ + assemble_name (FILE, LABEL2); \ + } while (0) +#endif + +#ifndef ASM_OUTPUT_DWARF_DELTA4 +#define ASM_OUTPUT_DWARF_DELTA4(FILE,LABEL1,LABEL2) \ + do { fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP); \ + assemble_name (FILE, LABEL1); \ + fprintf (FILE, "-"); \ + assemble_name (FILE, LABEL2); \ + } while (0) +#endif + +#ifndef ASM_OUTPUT_DWARF_DELTA +#define ASM_OUTPUT_DWARF_DELTA(FILE,LABEL1,LABEL2) \ + do { fprintf ((FILE), "\t%s\t", UNALIGNED_OFFSET_ASM_OP); \ + assemble_name (FILE, LABEL1); \ + fprintf (FILE, "-"); \ + assemble_name (FILE, LABEL2); \ + } while (0) +#endif + +#ifndef ASM_OUTPUT_DWARF_ADDR_DELTA +#define ASM_OUTPUT_DWARF_ADDR_DELTA(FILE,LABEL1,LABEL2) \ + do { fprintf ((FILE), "\t%s\t", UNALIGNED_WORD_ASM_OP); \ + assemble_name (FILE, LABEL1); \ + fprintf (FILE, "-"); \ + assemble_name (FILE, LABEL2); \ + } while (0) +#endif + +#ifndef ASM_OUTPUT_DWARF_ADDR +#define ASM_OUTPUT_DWARF_ADDR(FILE,LABEL) \ + do { fprintf ((FILE), "\t%s\t", UNALIGNED_WORD_ASM_OP); \ + assemble_name (FILE, LABEL); \ + } while (0) +#endif + +#ifndef ASM_OUTPUT_DWARF_ADDR_CONST +#define ASM_OUTPUT_DWARF_ADDR_CONST(FILE,ADDR) \ + fprintf ((FILE), "\t%s\t%s", UNALIGNED_WORD_ASM_OP, (ADDR)) +#endif + +#ifndef ASM_OUTPUT_DWARF_OFFSET +#define ASM_OUTPUT_DWARF_OFFSET(FILE,LABEL) \ + do { fprintf ((FILE), "\t%s\t", UNALIGNED_OFFSET_ASM_OP); \ + assemble_name (FILE, LABEL); \ + } while (0) +#endif + +#ifndef ASM_OUTPUT_DWARF_DATA2 +#define ASM_OUTPUT_DWARF_DATA2(FILE,VALUE) \ + fprintf ((FILE), "\t%s\t0x%x", UNALIGNED_SHORT_ASM_OP, (unsigned) VALUE) +#endif + +#ifndef ASM_OUTPUT_DWARF_DATA4 +#define ASM_OUTPUT_DWARF_DATA4(FILE,VALUE) \ + fprintf ((FILE), "\t%s\t0x%x", UNALIGNED_INT_ASM_OP, (unsigned) VALUE) +#endif + +#ifndef ASM_OUTPUT_DWARF_DATA +#define ASM_OUTPUT_DWARF_DATA(FILE,VALUE) \ + fprintf ((FILE), "\t%s\t0x%lx", UNALIGNED_OFFSET_ASM_OP, \ + (unsigned long) VALUE) +#endif + +#ifndef ASM_OUTPUT_DWARF_ADDR_DATA +#define ASM_OUTPUT_DWARF_ADDR_DATA(FILE,VALUE) \ + fprintf ((FILE), "\t%s\t0x%lx", UNALIGNED_WORD_ASM_OP, \ + (unsigned long) VALUE) +#endif + +#ifndef ASM_OUTPUT_DWARF_DATA8 +#define ASM_OUTPUT_DWARF_DATA8(FILE,HIGH_VALUE,LOW_VALUE) \ + do { \ + if (WORDS_BIG_ENDIAN) \ + { \ + fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_INT_ASM_OP, HIGH_VALUE); \ + fprintf ((FILE), "\t%s\t0x%x", UNALIGNED_INT_ASM_OP, LOW_VALUE);\ + } \ + else \ + { \ + fprintf ((FILE), "\t%s\t0x%x\n", UNALIGNED_INT_ASM_OP, LOW_VALUE);\ + fprintf ((FILE), "\t%s\t0x%x", UNALIGNED_INT_ASM_OP, HIGH_VALUE); \ + } \ + } while (0) +#endif + +#ifndef ASM_OUTPUT_DWARF_VALUE4 +#define ASM_OUTPUT_DWARF_VALUE4(FILE,LABEL) \ + do { fprintf ((FILE), "\t%s\t", UNALIGNED_INT_ASM_OP); \ + assemble_name (FILE, LABEL); \ + } while (0) +#endif + +#else /* UNALIGNED_INT_ASM_OP */ + +/* We don't have unaligned support, let's hope the normal output works for + .debug_frame. */ + +#define ASM_OUTPUT_DWARF_ADDR(FILE,LABEL) \ + assemble_integer (gen_rtx (SYMBOL_REF, Pmode, LABEL), PTR_SIZE, 1) + +#define ASM_OUTPUT_DWARF_OFFSET(FILE,LABEL) \ + assemble_integer (gen_rtx (SYMBOL_REF, SImode, LABEL), 4, 1) + +#define ASM_OUTPUT_DWARF_DELTA2(FILE,LABEL1,LABEL2) \ + assemble_integer (gen_rtx (MINUS, HImode, \ + gen_rtx (SYMBOL_REF, Pmode, LABEL1), \ + gen_rtx (SYMBOL_REF, Pmode, LABEL2)), \ + 2, 1) + +#define ASM_OUTPUT_DWARF_DELTA4(FILE,LABEL1,LABEL2) \ + assemble_integer (gen_rtx (MINUS, SImode, \ + gen_rtx (SYMBOL_REF, Pmode, LABEL1), \ + gen_rtx (SYMBOL_REF, Pmode, LABEL2)), \ + 4, 1) + +#define ASM_OUTPUT_DWARF_ADDR_DELTA(FILE,LABEL1,LABEL2) \ + assemble_integer (gen_rtx (MINUS, Pmode, \ + gen_rtx (SYMBOL_REF, Pmode, LABEL1), \ + gen_rtx (SYMBOL_REF, Pmode, LABEL2)), \ + PTR_SIZE, 1) + +#define ASM_OUTPUT_DWARF_DELTA(FILE,LABEL1,LABEL2) \ + ASM_OUTPUT_DWARF_DELTA4 (FILE,LABEL1,LABEL2) + +#define ASM_OUTPUT_DWARF_DATA4(FILE,VALUE) \ + assemble_integer (GEN_INT (VALUE), 4, 1) + +#define ASM_OUTPUT_DWARF_VALUE4(FILE,LABEL) \ + assemble_integer (gen_rtx (SYMBOL_REF, Pmode, LABEL), 4, 1) + +#endif /* UNALIGNED_INT_ASM_OP */ + +#ifdef SET_ASM_OP +#ifndef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL +#define ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL(FILE, SY, HI, LO) \ + do { fprintf ((FILE), "\t%s\t", SET_ASM_OP); \ + assemble_name (FILE, SY); \ + fprintf ((FILE), ","); \ + assemble_name (FILE, HI); \ + fprintf ((FILE), "-"); \ + assemble_name (FILE, LO); \ + fprintf ((FILE), "\n"); \ + } while (0) +#endif +#endif /* SET_ASM_OP */ + +/* This is similar to the default ASM_OUTPUT_ASCII, except that no trailing + newline is produced. When flag_debug_asm is asserted, we add commentary + at the end of the line, so we must avoid output of a newline here. */ +#ifndef ASM_OUTPUT_DWARF_STRING +#define ASM_OUTPUT_DWARF_STRING(FILE,P) \ + do { \ + register int slen = strlen(P); \ + register char *p = (P); \ + register int i; \ + fprintf (FILE, "\t.ascii \""); \ + for (i = 0; i < slen; i++) \ + { \ + register int c = p[i]; \ + if (c == '\"' || c == '\\') \ + putc ('\\', FILE); \ + if (c >= ' ' && c < 0177) \ + putc (c, FILE); \ + else \ + { \ + fprintf (FILE, "\\%o", c); \ + } \ + } \ + fprintf (FILE, "\\0\""); \ + } \ + while (0) +#endif + +/* The DWARF 2 CFA column which tracks the return address. Normally this + is the column for PC, or the first column after all of the hard + registers. */ +#ifndef DWARF_FRAME_RETURN_COLUMN +#ifdef PC_REGNUM +#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (PC_REGNUM) +#else +#define DWARF_FRAME_RETURN_COLUMN FIRST_PSEUDO_REGISTER +#endif +#endif + +/* The mapping from gcc register number to DWARF 2 CFA column number. By + default, we just provide columns for all registers. */ +#ifndef DWARF_FRAME_REGNUM +#define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG) +#endif + +/* Hook used by __throw. */ + +rtx +expand_builtin_dwarf_fp_regnum () +{ + return GEN_INT (DWARF_FRAME_REGNUM (HARD_FRAME_POINTER_REGNUM)); +} + +/* The offset from the incoming value of %sp to the top of the stack frame + for the current function. */ +#ifndef INCOMING_FRAME_SP_OFFSET +#define INCOMING_FRAME_SP_OFFSET 0 +#endif + +/* Return a pointer to a copy of the section string name S with all + attributes stripped off. */ + +static inline char * +stripattributes (s) + char *s; +{ + char *stripped = xstrdup (s); + char *p = stripped; + + while (*p && *p != ',') + p++; + + *p = '\0'; + return stripped; +} + +/* Return the register number described by a given RTL node. */ + +static unsigned +reg_number (rtl) + register rtx rtl; +{ + register unsigned regno = REGNO (rtl); + + if (regno >= FIRST_PSEUDO_REGISTER) + { + warning ("internal regno botch: regno = %d\n", regno); + regno = 0; + } + + regno = DBX_REGISTER_NUMBER (regno); + return regno; +} + +struct reg_size_range +{ + int beg; + int end; + int size; +}; + +/* Given a register number in REG_TREE, return an rtx for its size in bytes. + We do this in kind of a roundabout way, by building up a list of + register size ranges and seeing where our register falls in one of those + ranges. We need to do it this way because REG_TREE is not a constant, + and the target macros were not designed to make this task easy. */ + +rtx +expand_builtin_dwarf_reg_size (reg_tree, target) + tree reg_tree; + rtx target; +{ + int size; + struct reg_size_range ranges[5]; + tree t, t2; + + int i = 0; + int n_ranges = 0; + int last_size = -1; + + for (; i < FIRST_PSEUDO_REGISTER; ++i) + { + /* The return address is out of order on the MIPS, and we don't use + copy_reg for it anyway, so we don't care here how large it is. */ + if (DWARF_FRAME_REGNUM (i) == DWARF_FRAME_RETURN_COLUMN) + continue; + + size = GET_MODE_SIZE (reg_raw_mode[i]); + if (size != last_size) + { + ranges[n_ranges].beg = i; + ranges[n_ranges].size = last_size = GET_MODE_SIZE (reg_raw_mode[i]); + ++n_ranges; + assert (n_ranges < 5); + } + ranges[n_ranges-1].end = i; + } + + /* The usual case: fp regs surrounded by general regs. */ + if (n_ranges == 3 && ranges[0].size == ranges[2].size) + { + assert ((DWARF_FRAME_REGNUM (ranges[1].end) + - DWARF_FRAME_REGNUM (ranges[1].beg)) + == ranges[1].end - ranges[1].beg); + t = fold (build (GE_EXPR, integer_type_node, reg_tree, + build_int_2 (DWARF_FRAME_REGNUM (ranges[1].beg), 0))); + t2 = fold (build (LE_EXPR, integer_type_node, reg_tree, + build_int_2 (DWARF_FRAME_REGNUM (ranges[1].end), 0))); + t = fold (build (TRUTH_ANDIF_EXPR, integer_type_node, t, t2)); + t = fold (build (COND_EXPR, integer_type_node, t, + build_int_2 (ranges[1].size, 0), + build_int_2 (ranges[0].size, 0))); + } + else + { + --n_ranges; + t = build_int_2 (ranges[n_ranges].size, 0); + size = DWARF_FRAME_REGNUM (ranges[n_ranges].beg); + for (; n_ranges--; ) + { + assert ((DWARF_FRAME_REGNUM (ranges[n_ranges].end) + - DWARF_FRAME_REGNUM (ranges[n_ranges].beg)) + == ranges[n_ranges].end - ranges[n_ranges].beg); + assert (DWARF_FRAME_REGNUM (ranges[n_ranges].beg) < size); + size = DWARF_FRAME_REGNUM (ranges[n_ranges].beg); + t2 = fold (build (LE_EXPR, integer_type_node, reg_tree, + build_int_2 (DWARF_FRAME_REGNUM + (ranges[n_ranges].end), 0))); + t = fold (build (COND_EXPR, integer_type_node, t2, + build_int_2 (ranges[n_ranges].size, 0), t)); + } + } + return expand_expr (t, target, Pmode, 0); +} + +/* Convert a DWARF call frame info. operation to its string name */ + +static char * +dwarf_cfi_name (cfi_opc) + register unsigned cfi_opc; +{ + switch (cfi_opc) + { + case DW_CFA_advance_loc: + return "DW_CFA_advance_loc"; + case DW_CFA_offset: + return "DW_CFA_offset"; + case DW_CFA_restore: + return "DW_CFA_restore"; + case DW_CFA_nop: + return "DW_CFA_nop"; + case DW_CFA_set_loc: + return "DW_CFA_set_loc"; + case DW_CFA_advance_loc1: + return "DW_CFA_advance_loc1"; + case DW_CFA_advance_loc2: + return "DW_CFA_advance_loc2"; + case DW_CFA_advance_loc4: + return "DW_CFA_advance_loc4"; + case DW_CFA_offset_extended: + return "DW_CFA_offset_extended"; + case DW_CFA_restore_extended: + return "DW_CFA_restore_extended"; + case DW_CFA_undefined: + return "DW_CFA_undefined"; + case DW_CFA_same_value: + return "DW_CFA_same_value"; + case DW_CFA_register: + return "DW_CFA_register"; + case DW_CFA_remember_state: + return "DW_CFA_remember_state"; + case DW_CFA_restore_state: + return "DW_CFA_restore_state"; + case DW_CFA_def_cfa: + return "DW_CFA_def_cfa"; + case DW_CFA_def_cfa_register: + return "DW_CFA_def_cfa_register"; + case DW_CFA_def_cfa_offset: + return "DW_CFA_def_cfa_offset"; + + /* SGI/MIPS specific */ + case DW_CFA_MIPS_advance_loc8: + return "DW_CFA_MIPS_advance_loc8"; + + /* GNU extensions */ + case DW_CFA_GNU_window_save: + return "DW_CFA_GNU_window_save"; + case DW_CFA_GNU_args_size: + return "DW_CFA_GNU_args_size"; + + default: + return "DW_CFA_<unknown>"; + } +} + +/* Return a pointer to a newly allocated Call Frame Instruction. */ + +static inline dw_cfi_ref +new_cfi () +{ + register dw_cfi_ref cfi = (dw_cfi_ref) xmalloc (sizeof (dw_cfi_node)); + + cfi->dw_cfi_next = NULL; + cfi->dw_cfi_oprnd1.dw_cfi_reg_num = 0; + cfi->dw_cfi_oprnd2.dw_cfi_reg_num = 0; + + return cfi; +} + +/* Add a Call Frame Instruction to list of instructions. */ + +static inline void +add_cfi (list_head, cfi) + register dw_cfi_ref *list_head; + register dw_cfi_ref cfi; +{ + register dw_cfi_ref *p; + + /* Find the end of the chain. */ + for (p = list_head; (*p) != NULL; p = &(*p)->dw_cfi_next) + ; + + *p = cfi; +} + +/* Generate a new label for the CFI info to refer to. */ + +char * +dwarf2out_cfi_label () +{ + static char label[20]; + static unsigned long label_num = 0; + + ASM_GENERATE_INTERNAL_LABEL (label, "LCFI", label_num++); + ASM_OUTPUT_LABEL (asm_out_file, label); + + return label; +} + +/* Add CFI to the current fde at the PC value indicated by LABEL if specified, + or to the CIE if LABEL is NULL. */ + +static void +add_fde_cfi (label, cfi) + register char *label; + register dw_cfi_ref cfi; +{ + if (label) + { + register dw_fde_ref fde = &fde_table[fde_table_in_use - 1]; + + if (*label == 0) + label = dwarf2out_cfi_label (); + + if (fde->dw_fde_current_label == NULL + || strcmp (label, fde->dw_fde_current_label) != 0) + { + register dw_cfi_ref xcfi; + + fde->dw_fde_current_label = label = xstrdup (label); + + /* Set the location counter to the new label. */ + xcfi = new_cfi (); + xcfi->dw_cfi_opc = DW_CFA_advance_loc4; + xcfi->dw_cfi_oprnd1.dw_cfi_addr = label; + add_cfi (&fde->dw_fde_cfi, xcfi); + } + + add_cfi (&fde->dw_fde_cfi, cfi); + } + + else + add_cfi (&cie_cfi_head, cfi); +} + +/* Subroutine of lookup_cfa. */ + +static inline void +lookup_cfa_1 (cfi, regp, offsetp) + register dw_cfi_ref cfi; + register unsigned long *regp; + register long *offsetp; +{ + switch (cfi->dw_cfi_opc) + { + case DW_CFA_def_cfa_offset: + *offsetp = cfi->dw_cfi_oprnd1.dw_cfi_offset; + break; + case DW_CFA_def_cfa_register: + *regp = cfi->dw_cfi_oprnd1.dw_cfi_reg_num; + break; + case DW_CFA_def_cfa: + *regp = cfi->dw_cfi_oprnd1.dw_cfi_reg_num; + *offsetp = cfi->dw_cfi_oprnd2.dw_cfi_offset; + break; + default: + break; + } +} + +/* Find the previous value for the CFA. */ + +static void +lookup_cfa (regp, offsetp) + register unsigned long *regp; + register long *offsetp; +{ + register dw_cfi_ref cfi; + + *regp = (unsigned long) -1; + *offsetp = 0; + + for (cfi = cie_cfi_head; cfi; cfi = cfi->dw_cfi_next) + lookup_cfa_1 (cfi, regp, offsetp); + + if (fde_table_in_use) + { + register dw_fde_ref fde = &fde_table[fde_table_in_use - 1]; + for (cfi = fde->dw_fde_cfi; cfi; cfi = cfi->dw_cfi_next) + lookup_cfa_1 (cfi, regp, offsetp); + } +} + +/* The current rule for calculating the DWARF2 canonical frame address. */ +static unsigned long cfa_reg; +static long cfa_offset; + +/* The register used for saving registers to the stack, and its offset + from the CFA. */ +static unsigned cfa_store_reg; +static long cfa_store_offset; + +/* The running total of the size of arguments pushed onto the stack. */ +static long args_size; + +/* Entry point to update the canonical frame address (CFA). + LABEL is passed to add_fde_cfi. The value of CFA is now to be + calculated from REG+OFFSET. */ + +void +dwarf2out_def_cfa (label, reg, offset) + register char *label; + register unsigned reg; + register long offset; +{ + register dw_cfi_ref cfi; + unsigned long old_reg; + long old_offset; + + cfa_reg = reg; + cfa_offset = offset; + if (cfa_store_reg == reg) + cfa_store_offset = offset; + + reg = DWARF_FRAME_REGNUM (reg); + lookup_cfa (&old_reg, &old_offset); + + if (reg == old_reg && offset == old_offset) + return; + + cfi = new_cfi (); + + if (reg == old_reg) + { + cfi->dw_cfi_opc = DW_CFA_def_cfa_offset; + cfi->dw_cfi_oprnd1.dw_cfi_offset = offset; + } + +#ifndef MIPS_DEBUGGING_INFO /* SGI dbx thinks this means no offset. */ + else if (offset == old_offset && old_reg != (unsigned long) -1) + { + cfi->dw_cfi_opc = DW_CFA_def_cfa_register; + cfi->dw_cfi_oprnd1.dw_cfi_reg_num = reg; + } +#endif + + else + { + cfi->dw_cfi_opc = DW_CFA_def_cfa; + cfi->dw_cfi_oprnd1.dw_cfi_reg_num = reg; + cfi->dw_cfi_oprnd2.dw_cfi_offset = offset; + } + + add_fde_cfi (label, cfi); +} + +/* Add the CFI for saving a register. REG is the CFA column number. + LABEL is passed to add_fde_cfi. + If SREG is -1, the register is saved at OFFSET from the CFA; + otherwise it is saved in SREG. */ + +static void +reg_save (label, reg, sreg, offset) + register char * label; + register unsigned reg; + register unsigned sreg; + register long offset; +{ + register dw_cfi_ref cfi = new_cfi (); + + cfi->dw_cfi_oprnd1.dw_cfi_reg_num = reg; + + if (sreg == -1) + { + if (reg & ~0x3f) + /* The register number won't fit in 6 bits, so we have to use + the long form. */ + cfi->dw_cfi_opc = DW_CFA_offset_extended; + else + cfi->dw_cfi_opc = DW_CFA_offset; + + offset /= DWARF_CIE_DATA_ALIGNMENT; + assert (offset >= 0); + cfi->dw_cfi_oprnd2.dw_cfi_offset = offset; + } + else + { + cfi->dw_cfi_opc = DW_CFA_register; + cfi->dw_cfi_oprnd2.dw_cfi_reg_num = sreg; + } + + add_fde_cfi (label, cfi); +} + +/* Add the CFI for saving a register window. LABEL is passed to reg_save. + This CFI tells the unwinder that it needs to restore the window registers + from the previous frame's window save area. + + ??? Perhaps we should note in the CIE where windows are saved (instead of + assuming 0(cfa)) and what registers are in the window. */ + +void +dwarf2out_window_save (label) + register char * label; +{ + register dw_cfi_ref cfi = new_cfi (); + cfi->dw_cfi_opc = DW_CFA_GNU_window_save; + add_fde_cfi (label, cfi); +} + +/* Add a CFI to update the running total of the size of arguments + pushed onto the stack. */ + +void +dwarf2out_args_size (label, size) + char *label; + long size; +{ + register dw_cfi_ref cfi = new_cfi (); + cfi->dw_cfi_opc = DW_CFA_GNU_args_size; + cfi->dw_cfi_oprnd1.dw_cfi_offset = size; + add_fde_cfi (label, cfi); +} + +/* Entry point for saving a register to the stack. REG is the GCC register + number. LABEL and OFFSET are passed to reg_save. */ + +void +dwarf2out_reg_save (label, reg, offset) + register char * label; + register unsigned reg; + register long offset; +{ + reg_save (label, DWARF_FRAME_REGNUM (reg), -1, offset); +} + +/* Entry point for saving the return address in the stack. + LABEL and OFFSET are passed to reg_save. */ + +void +dwarf2out_return_save (label, offset) + register char * label; + register long offset; +{ + reg_save (label, DWARF_FRAME_RETURN_COLUMN, -1, offset); +} + +/* Entry point for saving the return address in a register. + LABEL and SREG are passed to reg_save. */ + +void +dwarf2out_return_reg (label, sreg) + register char * label; + register unsigned sreg; +{ + reg_save (label, DWARF_FRAME_RETURN_COLUMN, sreg, 0); +} + +/* Record the initial position of the return address. RTL is + INCOMING_RETURN_ADDR_RTX. */ + +static void +initial_return_save (rtl) + register rtx rtl; +{ + unsigned reg = -1; + long offset = 0; + + switch (GET_CODE (rtl)) + { + case REG: + /* RA is in a register. */ + reg = reg_number (rtl); + break; + case MEM: + /* RA is on the stack. */ + rtl = XEXP (rtl, 0); + switch (GET_CODE (rtl)) + { + case REG: + assert (REGNO (rtl) == STACK_POINTER_REGNUM); + offset = 0; + break; + case PLUS: + assert (REGNO (XEXP (rtl, 0)) == STACK_POINTER_REGNUM); + offset = INTVAL (XEXP (rtl, 1)); + break; + case MINUS: + assert (REGNO (XEXP (rtl, 0)) == STACK_POINTER_REGNUM); + offset = -INTVAL (XEXP (rtl, 1)); + break; + default: + abort (); + } + break; + case PLUS: + /* The return address is at some offset from any value we can + actually load. For instance, on the SPARC it is in %i7+8. Just + ignore the offset for now; it doesn't matter for unwinding frames. */ + assert (GET_CODE (XEXP (rtl, 1)) == CONST_INT); + initial_return_save (XEXP (rtl, 0)); + return; + default: + abort (); + } + + reg_save (NULL, DWARF_FRAME_RETURN_COLUMN, reg, offset - cfa_offset); +} + +/* Check INSN to see if it looks like a push or a stack adjustment, and + make a note of it if it does. EH uses this information to find out how + much extra space it needs to pop off the stack. */ + +static void +dwarf2out_stack_adjust (insn) + rtx insn; +{ + long offset; + char *label; + + if (GET_CODE (insn) == BARRIER) + { + /* When we see a BARRIER, we know to reset args_size to 0. Usually + the compiler will have already emitted a stack adjustment, but + doesn't bother for calls to noreturn functions. */ +#ifdef STACK_GROWS_DOWNWARD + offset = -args_size; +#else + offset = args_size; +#endif + } + else if (GET_CODE (PATTERN (insn)) == SET) + { + rtx src, dest; + enum rtx_code code; + + insn = PATTERN (insn); + src = SET_SRC (insn); + dest = SET_DEST (insn); + + if (dest == stack_pointer_rtx) + { + /* (set (reg sp) (plus (reg sp) (const_int))) */ + code = GET_CODE (src); + if (! (code == PLUS || code == MINUS) + || XEXP (src, 0) != stack_pointer_rtx + || GET_CODE (XEXP (src, 1)) != CONST_INT) + return; + + offset = INTVAL (XEXP (src, 1)); + } + else if (GET_CODE (dest) == MEM) + { + /* (set (mem (pre_dec (reg sp))) (foo)) */ + src = XEXP (dest, 0); + code = GET_CODE (src); + + if (! (code == PRE_DEC || code == PRE_INC) + || XEXP (src, 0) != stack_pointer_rtx) + return; + + offset = GET_MODE_SIZE (GET_MODE (dest)); + } + else + return; + + if (code == PLUS || code == PRE_INC) + offset = -offset; + } + else + return; + + if (offset == 0) + return; + + if (cfa_reg == STACK_POINTER_REGNUM) + cfa_offset += offset; + +#ifndef STACK_GROWS_DOWNWARD + offset = -offset; +#endif + args_size += offset; + if (args_size < 0) + args_size = 0; + + label = dwarf2out_cfi_label (); + dwarf2out_def_cfa (label, cfa_reg, cfa_offset); + dwarf2out_args_size (label, args_size); +} + +/* Record call frame debugging information for INSN, which either + sets SP or FP (adjusting how we calculate the frame address) or saves a + register to the stack. If INSN is NULL_RTX, initialize our state. */ + +void +dwarf2out_frame_debug (insn) + rtx insn; +{ + char *label; + rtx src, dest; + long offset; + + /* A temporary register used in adjusting SP or setting up the store_reg. */ + static unsigned cfa_temp_reg; + static long cfa_temp_value; + + if (insn == NULL_RTX) + { + /* Set up state for generating call frame debug info. */ + lookup_cfa (&cfa_reg, &cfa_offset); + assert (cfa_reg == DWARF_FRAME_REGNUM (STACK_POINTER_REGNUM)); + cfa_reg = STACK_POINTER_REGNUM; + cfa_store_reg = cfa_reg; + cfa_store_offset = cfa_offset; + cfa_temp_reg = -1; + cfa_temp_value = 0; + return; + } + + if (! RTX_FRAME_RELATED_P (insn)) + { + dwarf2out_stack_adjust (insn); + return; + } + + label = dwarf2out_cfi_label (); + + insn = PATTERN (insn); + /* Assume that in a PARALLEL prologue insn, only the first elt is + significant. Currently this is true. */ + if (GET_CODE (insn) == PARALLEL) + insn = XVECEXP (insn, 0, 0); + assert (GET_CODE (insn) == SET); + + src = SET_SRC (insn); + dest = SET_DEST (insn); + + switch (GET_CODE (dest)) + { + case REG: + /* Update the CFA rule wrt SP or FP. Make sure src is + relative to the current CFA register. */ + switch (GET_CODE (src)) + { + /* Setting FP from SP. */ + case REG: + assert (cfa_reg == REGNO (src)); + assert (REGNO (dest) == STACK_POINTER_REGNUM + || (frame_pointer_needed + && REGNO (dest) == HARD_FRAME_POINTER_REGNUM)); + cfa_reg = REGNO (dest); + break; + + case PLUS: + case MINUS: + if (dest == stack_pointer_rtx) + { + /* Adjusting SP. */ + switch (GET_CODE (XEXP (src, 1))) + { + case CONST_INT: + offset = INTVAL (XEXP (src, 1)); + break; + case REG: + assert (REGNO (XEXP (src, 1)) == cfa_temp_reg); + offset = cfa_temp_value; + break; + default: + abort (); + } + + if (XEXP (src, 0) == hard_frame_pointer_rtx) + { + /* Restoring SP from FP in the epilogue. */ + assert (cfa_reg == HARD_FRAME_POINTER_REGNUM); + cfa_reg = STACK_POINTER_REGNUM; + } + else + assert (XEXP (src, 0) == stack_pointer_rtx); + + if (GET_CODE (src) == PLUS) + offset = -offset; + if (cfa_reg == STACK_POINTER_REGNUM) + cfa_offset += offset; + if (cfa_store_reg == STACK_POINTER_REGNUM) + cfa_store_offset += offset; + } + else + { + /* Initializing the store base register. */ + assert (GET_CODE (src) == PLUS); + assert (XEXP (src, 1) == stack_pointer_rtx); + assert (GET_CODE (XEXP (src, 0)) == REG + && REGNO (XEXP (src, 0)) == cfa_temp_reg); + assert (cfa_reg == STACK_POINTER_REGNUM); + cfa_store_reg = REGNO (dest); + cfa_store_offset = cfa_offset - cfa_temp_value; + } + break; + + case CONST_INT: + cfa_temp_reg = REGNO (dest); + cfa_temp_value = INTVAL (src); + break; + + case IOR: + assert (GET_CODE (XEXP (src, 0)) == REG + && REGNO (XEXP (src, 0)) == cfa_temp_reg); + assert (REGNO (dest) == cfa_temp_reg); + assert (GET_CODE (XEXP (src, 1)) == CONST_INT); + cfa_temp_value |= INTVAL (XEXP (src, 1)); + break; + + default: + abort (); + } + dwarf2out_def_cfa (label, cfa_reg, cfa_offset); + break; + + case MEM: + /* Saving a register to the stack. Make sure dest is relative to the + CFA register. */ + assert (GET_CODE (src) == REG); + switch (GET_CODE (XEXP (dest, 0))) + { + /* With a push. */ + case PRE_INC: + case PRE_DEC: + offset = GET_MODE_SIZE (GET_MODE (dest)); + if (GET_CODE (XEXP (dest, 0)) == PRE_INC) + offset = -offset; + + assert (REGNO (XEXP (XEXP (dest, 0), 0)) == STACK_POINTER_REGNUM); + assert (cfa_store_reg == STACK_POINTER_REGNUM); + cfa_store_offset += offset; + if (cfa_reg == STACK_POINTER_REGNUM) + cfa_offset = cfa_store_offset; + + offset = -cfa_store_offset; + break; + + /* With an offset. */ + case PLUS: + case MINUS: + offset = INTVAL (XEXP (XEXP (dest, 0), 1)); + if (GET_CODE (src) == MINUS) + offset = -offset; + + assert (cfa_store_reg == REGNO (XEXP (XEXP (dest, 0), 0))); + offset -= cfa_store_offset; + break; + + default: + abort (); + } + dwarf2out_def_cfa (label, cfa_reg, cfa_offset); + dwarf2out_reg_save (label, REGNO (src), offset); + break; + + default: + abort (); + } +} + +/* Return the size of an unsigned LEB128 quantity. */ + +static inline unsigned long +size_of_uleb128 (value) + register unsigned long value; +{ + register unsigned long size = 0; + register unsigned byte; + + do + { + byte = (value & 0x7f); + value >>= 7; + size += 1; + } + while (value != 0); + + return size; +} + +/* Return the size of a signed LEB128 quantity. */ + +static inline unsigned long +size_of_sleb128 (value) + register long value; +{ + register unsigned long size = 0; + register unsigned byte; + + do + { + byte = (value & 0x7f); + value >>= 7; + size += 1; + } + while (!(((value == 0) && ((byte & 0x40) == 0)) + || ((value == -1) && ((byte & 0x40) != 0)))); + + return size; +} + +/* Output an unsigned LEB128 quantity. */ + +static void +output_uleb128 (value) + register unsigned long value; +{ + unsigned long save_value = value; + + fprintf (asm_out_file, "\t%s\t", ASM_BYTE_OP); + do + { + register unsigned byte = (value & 0x7f); + value >>= 7; + if (value != 0) + /* More bytes to follow. */ + byte |= 0x80; + + fprintf (asm_out_file, "0x%x", byte); + if (value != 0) + fprintf (asm_out_file, ","); + } + while (value != 0); + + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s ULEB128 0x%x", ASM_COMMENT_START, save_value); +} + +/* Output an signed LEB128 quantity. */ + +static void +output_sleb128 (value) + register long value; +{ + register int more; + register unsigned byte; + long save_value = value; + + fprintf (asm_out_file, "\t%s\t", ASM_BYTE_OP); + do + { + byte = (value & 0x7f); + /* arithmetic shift */ + value >>= 7; + more = !((((value == 0) && ((byte & 0x40) == 0)) + || ((value == -1) && ((byte & 0x40) != 0)))); + if (more) + byte |= 0x80; + + fprintf (asm_out_file, "0x%x", byte); + if (more) + fprintf (asm_out_file, ","); + } + + while (more); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s SLEB128 %d", ASM_COMMENT_START, save_value); +} + +/* Output a Call Frame Information opcode and its operand(s). */ + +static void +output_cfi (cfi, fde) + register dw_cfi_ref cfi; + register dw_fde_ref fde; +{ + if (cfi->dw_cfi_opc == DW_CFA_advance_loc) + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, + cfi->dw_cfi_opc + | (cfi->dw_cfi_oprnd1.dw_cfi_offset & 0x3f)); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_CFA_advance_loc 0x%x", + ASM_COMMENT_START, cfi->dw_cfi_oprnd1.dw_cfi_offset); + fputc ('\n', asm_out_file); + } + + else if (cfi->dw_cfi_opc == DW_CFA_offset) + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, + cfi->dw_cfi_opc + | (cfi->dw_cfi_oprnd1.dw_cfi_reg_num & 0x3f)); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_CFA_offset, column 0x%x", + ASM_COMMENT_START, cfi->dw_cfi_oprnd1.dw_cfi_reg_num); + + fputc ('\n', asm_out_file); + output_uleb128 (cfi->dw_cfi_oprnd2.dw_cfi_offset); + fputc ('\n', asm_out_file); + } + else if (cfi->dw_cfi_opc == DW_CFA_restore) + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, + cfi->dw_cfi_opc + | (cfi->dw_cfi_oprnd1.dw_cfi_reg_num & 0x3f)); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_CFA_restore, column 0x%x", + ASM_COMMENT_START, cfi->dw_cfi_oprnd1.dw_cfi_reg_num); + + fputc ('\n', asm_out_file); + } + else + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, cfi->dw_cfi_opc); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, + dwarf_cfi_name (cfi->dw_cfi_opc)); + + fputc ('\n', asm_out_file); + switch (cfi->dw_cfi_opc) + { + case DW_CFA_set_loc: + ASM_OUTPUT_DWARF_ADDR (asm_out_file, cfi->dw_cfi_oprnd1.dw_cfi_addr); + fputc ('\n', asm_out_file); + break; + case DW_CFA_advance_loc1: + /* TODO: not currently implemented. */ + abort (); + break; + case DW_CFA_advance_loc2: + ASM_OUTPUT_DWARF_DELTA2 (asm_out_file, + cfi->dw_cfi_oprnd1.dw_cfi_addr, + fde->dw_fde_current_label); + fputc ('\n', asm_out_file); + fde->dw_fde_current_label = cfi->dw_cfi_oprnd1.dw_cfi_addr; + break; + case DW_CFA_advance_loc4: + ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, + cfi->dw_cfi_oprnd1.dw_cfi_addr, + fde->dw_fde_current_label); + fputc ('\n', asm_out_file); + fde->dw_fde_current_label = cfi->dw_cfi_oprnd1.dw_cfi_addr; + break; +#ifdef MIPS_DEBUGGING_INFO + case DW_CFA_MIPS_advance_loc8: + /* TODO: not currently implemented. */ + abort (); + break; +#endif + case DW_CFA_offset_extended: + case DW_CFA_def_cfa: + output_uleb128 (cfi->dw_cfi_oprnd1.dw_cfi_reg_num); + fputc ('\n', asm_out_file); + output_uleb128 (cfi->dw_cfi_oprnd2.dw_cfi_offset); + fputc ('\n', asm_out_file); + break; + case DW_CFA_restore_extended: + case DW_CFA_undefined: + output_uleb128 (cfi->dw_cfi_oprnd1.dw_cfi_reg_num); + fputc ('\n', asm_out_file); + break; + case DW_CFA_same_value: + case DW_CFA_def_cfa_register: + output_uleb128 (cfi->dw_cfi_oprnd1.dw_cfi_reg_num); + fputc ('\n', asm_out_file); + break; + case DW_CFA_register: + output_uleb128 (cfi->dw_cfi_oprnd1.dw_cfi_reg_num); + fputc ('\n', asm_out_file); + output_uleb128 (cfi->dw_cfi_oprnd2.dw_cfi_reg_num); + fputc ('\n', asm_out_file); + break; + case DW_CFA_def_cfa_offset: + output_uleb128 (cfi->dw_cfi_oprnd1.dw_cfi_offset); + fputc ('\n', asm_out_file); + break; + case DW_CFA_GNU_window_save: + break; + case DW_CFA_GNU_args_size: + output_uleb128 (cfi->dw_cfi_oprnd1.dw_cfi_offset); + fputc ('\n', asm_out_file); + break; + default: + break; + } + } +} + +#if !defined (EH_FRAME_SECTION) +#if defined (EH_FRAME_SECTION_ASM_OP) +#define EH_FRAME_SECTION() eh_frame_section(); +#else +#if defined (ASM_OUTPUT_SECTION_NAME) +#define EH_FRAME_SECTION() \ + do { \ + named_section (NULL_TREE, ".eh_frame", 0); \ + } while (0) +#endif +#endif +#endif + +/* Output the call frame information used to used to record information + that relates to calculating the frame pointer, and records the + location of saved registers. */ + +static void +output_call_frame_info (for_eh) + int for_eh; +{ + register unsigned long i, j; + register dw_fde_ref fde; + register unsigned long fde_size; + register dw_cfi_ref cfi; + unsigned long fde_pad; + char l1[20], l2[20]; +#ifdef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL + char ld[20]; +#endif + + /* Do we want to include a pointer to the exception table? */ + int eh_ptr = for_eh && exception_table_p (); + + fputc ('\n', asm_out_file); + + /* We're going to be generating comments, so turn on app. */ + if (flag_debug_asm) + app_enable (); + + if (for_eh) + { +#ifdef EH_FRAME_SECTION + EH_FRAME_SECTION (); +#else + tree label = get_file_function_name ('F'); + + data_section (); + ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE)); + ASM_GLOBALIZE_LABEL (asm_out_file, IDENTIFIER_POINTER (label)); + ASM_OUTPUT_LABEL (asm_out_file, IDENTIFIER_POINTER (label)); +#endif + assemble_label ("__FRAME_BEGIN__"); + } + else + ASM_OUTPUT_SECTION (asm_out_file, FRAME_SECTION); + + /* Output the CIE. */ + ASM_GENERATE_INTERNAL_LABEL (l1, CIE_AFTER_SIZE_LABEL, for_eh); + ASM_GENERATE_INTERNAL_LABEL (l2, CIE_END_LABEL, for_eh); +#ifdef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL + ASM_GENERATE_INTERNAL_LABEL (ld, CIE_LENGTH_LABEL, for_eh); + if (for_eh) + ASM_OUTPUT_DWARF_VALUE4 (asm_out_file, ld); + else + ASM_OUTPUT_DWARF_OFFSET (asm_out_file, ld); +#else + if (for_eh) + ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, l2, l1); + else + ASM_OUTPUT_DWARF_DELTA (asm_out_file, l2, l1); +#endif + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Length of Common Information Entry", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_LABEL (asm_out_file, l1); + + if (for_eh) + /* Now that the CIE pointer is PC-relative for EH, + use 0 to identify the CIE. */ + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, 0); + else + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, DW_CIE_ID); + + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s CIE Identifier Tag", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + if (! for_eh && DWARF_OFFSET_SIZE == 8) + { + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, DW_CIE_ID); + fputc ('\n', asm_out_file); + } + + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_CIE_VERSION); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s CIE Version", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + if (eh_ptr) + { + /* The CIE contains a pointer to the exception region info for the + frame. Make the augmentation string three bytes (including the + trailing null) so the pointer is 4-byte aligned. The Solaris ld + can't handle unaligned relocs. */ + if (flag_debug_asm) + { + ASM_OUTPUT_DWARF_STRING (asm_out_file, "eh"); + fprintf (asm_out_file, "\t%s CIE Augmentation", ASM_COMMENT_START); + } + else + { + ASM_OUTPUT_ASCII (asm_out_file, "eh", 3); + } + fputc ('\n', asm_out_file); + + ASM_OUTPUT_DWARF_ADDR (asm_out_file, "__EXCEPTION_TABLE__"); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s pointer to exception region info", + ASM_COMMENT_START); + } + else + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s CIE Augmentation (none)", + ASM_COMMENT_START); + } + + fputc ('\n', asm_out_file); + output_uleb128 (1); + if (flag_debug_asm) + fprintf (asm_out_file, " (CIE Code Alignment Factor)"); + + fputc ('\n', asm_out_file); + output_sleb128 (DWARF_CIE_DATA_ALIGNMENT); + if (flag_debug_asm) + fprintf (asm_out_file, " (CIE Data Alignment Factor)"); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DWARF_FRAME_RETURN_COLUMN); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s CIE RA Column", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + + for (cfi = cie_cfi_head; cfi != NULL; cfi = cfi->dw_cfi_next) + output_cfi (cfi, NULL); + + /* Pad the CIE out to an address sized boundary. */ + ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE)); + ASM_OUTPUT_LABEL (asm_out_file, l2); +#ifdef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL + ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL (asm_out_file, ld, l2, l1); +#endif + + /* Loop through all of the FDE's. */ + for (i = 0; i < fde_table_in_use; ++i) + { + fde = &fde_table[i]; + + ASM_GENERATE_INTERNAL_LABEL (l1, FDE_AFTER_SIZE_LABEL, for_eh + i*2); + ASM_GENERATE_INTERNAL_LABEL (l2, FDE_END_LABEL, for_eh + i*2); +#ifdef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL + ASM_GENERATE_INTERNAL_LABEL (ld, FDE_LENGTH_LABEL, for_eh + i*2); + if (for_eh) + ASM_OUTPUT_DWARF_VALUE4 (asm_out_file, ld); + else + ASM_OUTPUT_DWARF_OFFSET (asm_out_file, ld); +#else + if (for_eh) + ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, l2, l1); + else + ASM_OUTPUT_DWARF_DELTA (asm_out_file, l2, l1); +#endif + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s FDE Length", ASM_COMMENT_START); + fputc ('\n', asm_out_file); + ASM_OUTPUT_LABEL (asm_out_file, l1); + + if (for_eh) + ASM_OUTPUT_DWARF_DELTA (asm_out_file, l1, "__FRAME_BEGIN__"); + else + ASM_OUTPUT_DWARF_OFFSET (asm_out_file, stripattributes (FRAME_SECTION)); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s FDE CIE offset", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_ADDR (asm_out_file, fde->dw_fde_begin); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s FDE initial location", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_ADDR_DELTA (asm_out_file, + fde->dw_fde_end, fde->dw_fde_begin); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s FDE address range", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + + /* Loop through the Call Frame Instructions associated with + this FDE. */ + fde->dw_fde_current_label = fde->dw_fde_begin; + for (cfi = fde->dw_fde_cfi; cfi != NULL; cfi = cfi->dw_cfi_next) + output_cfi (cfi, fde); + + /* Pad the FDE out to an address sized boundary. */ + ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE)); + ASM_OUTPUT_LABEL (asm_out_file, l2); +#ifdef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL + ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL (asm_out_file, ld, l2, l1); +#endif + } +#ifndef EH_FRAME_SECTION + if (for_eh) + { + /* Emit terminating zero for table. */ + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, 0); + fputc ('\n', asm_out_file); + } +#endif +#ifdef MIPS_DEBUGGING_INFO + /* Work around Irix 6 assembler bug whereby labels at the end of a section + get a value of 0. Putting .align 0 after the label fixes it. */ + ASM_OUTPUT_ALIGN (asm_out_file, 0); +#endif + + /* Turn off app to make assembly quicker. */ + if (flag_debug_asm) + app_disable (); +} + +/* Output a marker (i.e. a label) for the beginning of a function, before + the prologue. */ + +void +dwarf2out_begin_prologue () +{ + char label[MAX_ARTIFICIAL_LABEL_BYTES]; + register dw_fde_ref fde; + + ++current_funcdef_number; + + function_section (current_function_decl); + ASM_GENERATE_INTERNAL_LABEL (label, FUNC_BEGIN_LABEL, + current_funcdef_number); + ASM_OUTPUT_LABEL (asm_out_file, label); + + /* Expand the fde table if necessary. */ + if (fde_table_in_use == fde_table_allocated) + { + fde_table_allocated += FDE_TABLE_INCREMENT; + fde_table + = (dw_fde_ref) xrealloc (fde_table, + fde_table_allocated * sizeof (dw_fde_node)); + } + + /* Record the FDE associated with this function. */ + current_funcdef_fde = fde_table_in_use; + + /* Add the new FDE at the end of the fde_table. */ + fde = &fde_table[fde_table_in_use++]; + fde->dw_fde_begin = xstrdup (label); + fde->dw_fde_current_label = NULL; + fde->dw_fde_end = NULL; + fde->dw_fde_cfi = NULL; + + args_size = 0; +} + +/* Output a marker (i.e. a label) for the absolute end of the generated code + for a function definition. This gets called *after* the epilogue code has + been generated. */ + +void +dwarf2out_end_epilogue () +{ + dw_fde_ref fde; + char label[MAX_ARTIFICIAL_LABEL_BYTES]; + + /* Output a label to mark the endpoint of the code generated for this + function. */ + ASM_GENERATE_INTERNAL_LABEL (label, FUNC_END_LABEL, current_funcdef_number); + ASM_OUTPUT_LABEL (asm_out_file, label); + fde = &fde_table[fde_table_in_use - 1]; + fde->dw_fde_end = xstrdup (label); +} + +void +dwarf2out_frame_init () +{ + /* Allocate the initial hunk of the fde_table. */ + fde_table + = (dw_fde_ref) xmalloc (FDE_TABLE_INCREMENT * sizeof (dw_fde_node)); + bzero ((char *) fde_table, FDE_TABLE_INCREMENT * sizeof (dw_fde_node)); + fde_table_allocated = FDE_TABLE_INCREMENT; + fde_table_in_use = 0; + + /* Generate the CFA instructions common to all FDE's. Do it now for the + sake of lookup_cfa. */ + +#ifdef DWARF2_UNWIND_INFO + /* On entry, the Canonical Frame Address is at SP. */ + dwarf2out_def_cfa (NULL, STACK_POINTER_REGNUM, INCOMING_FRAME_SP_OFFSET); + initial_return_save (INCOMING_RETURN_ADDR_RTX); +#endif +} + +void +dwarf2out_frame_finish () +{ + /* Output call frame information. */ +#ifdef MIPS_DEBUGGING_INFO + if (write_symbols == DWARF2_DEBUG) + output_call_frame_info (0); + if (flag_exceptions && ! exceptions_via_longjmp) + output_call_frame_info (1); +#else + if (write_symbols == DWARF2_DEBUG + || (flag_exceptions && ! exceptions_via_longjmp)) + output_call_frame_info (1); +#endif +} + +#endif /* .debug_frame support */ + +/* And now, the support for symbolic debugging information. */ +#ifdef DWARF2_DEBUGGING_INFO + +extern char *getpwd (); + +/* NOTE: In the comments in this file, many references are made to + "Debugging Information Entries". This term is abbreviated as `DIE' + throughout the remainder of this file. */ + +/* An internal representation of the DWARF output is built, and then + walked to generate the DWARF debugging info. The walk of the internal + representation is done after the entire program has been compiled. + The types below are used to describe the internal representation. */ + +/* Each DIE may have a series of attribute/value pairs. Values + can take on several forms. The forms that are used in this + implementation are listed below. */ + +typedef enum +{ + dw_val_class_addr, + dw_val_class_loc, + dw_val_class_const, + dw_val_class_unsigned_const, + dw_val_class_long_long, + dw_val_class_float, + dw_val_class_flag, + dw_val_class_die_ref, + dw_val_class_fde_ref, + dw_val_class_lbl_id, + dw_val_class_section_offset, + dw_val_class_str +} +dw_val_class; + +/* Various DIE's use offsets relative to the beginning of the + .debug_info section to refer to each other. */ + +typedef long int dw_offset; + +/* Define typedefs here to avoid circular dependencies. */ + +typedef struct die_struct *dw_die_ref; +typedef struct dw_attr_struct *dw_attr_ref; +typedef struct dw_val_struct *dw_val_ref; +typedef struct dw_line_info_struct *dw_line_info_ref; +typedef struct dw_separate_line_info_struct *dw_separate_line_info_ref; +typedef struct dw_loc_descr_struct *dw_loc_descr_ref; +typedef struct pubname_struct *pubname_ref; +typedef dw_die_ref *arange_ref; + +/* Describe a double word constant value. */ + +typedef struct dw_long_long_struct +{ + unsigned long hi; + unsigned long low; +} +dw_long_long_const; + +/* Describe a floating point constant value. */ + +typedef struct dw_fp_struct +{ + long *array; + unsigned length; +} +dw_float_const; + +/* Each entry in the line_info_table maintains the file and + line number associated with the label generated for that + entry. The label gives the PC value associated with + the line number entry. */ + +typedef struct dw_line_info_struct +{ + unsigned long dw_file_num; + unsigned long dw_line_num; +} +dw_line_info_entry; + +/* Line information for functions in separate sections; each one gets its + own sequence. */ +typedef struct dw_separate_line_info_struct +{ + unsigned long dw_file_num; + unsigned long dw_line_num; + unsigned long function; +} +dw_separate_line_info_entry; + +/* The dw_val_node describes an attribute's value, as it is + represented internally. */ + +typedef struct dw_val_struct +{ + dw_val_class val_class; + union + { + char *val_addr; + dw_loc_descr_ref val_loc; + long int val_int; + long unsigned val_unsigned; + dw_long_long_const val_long_long; + dw_float_const val_float; + dw_die_ref val_die_ref; + unsigned val_fde_index; + char *val_str; + char *val_lbl_id; + char *val_section; + unsigned char val_flag; + } + v; +} +dw_val_node; + +/* Locations in memory are described using a sequence of stack machine + operations. */ + +typedef struct dw_loc_descr_struct +{ + dw_loc_descr_ref dw_loc_next; + enum dwarf_location_atom dw_loc_opc; + dw_val_node dw_loc_oprnd1; + dw_val_node dw_loc_oprnd2; +} +dw_loc_descr_node; + +/* Each DIE attribute has a field specifying the attribute kind, + a link to the next attribute in the chain, and an attribute value. + Attributes are typically linked below the DIE they modify. */ + +typedef struct dw_attr_struct +{ + enum dwarf_attribute dw_attr; + dw_attr_ref dw_attr_next; + dw_val_node dw_attr_val; +} +dw_attr_node; + +/* The Debugging Information Entry (DIE) structure */ + +typedef struct die_struct +{ + enum dwarf_tag die_tag; + dw_attr_ref die_attr; + dw_attr_ref die_attr_last; + dw_die_ref die_parent; + dw_die_ref die_child; + dw_die_ref die_child_last; + dw_die_ref die_sib; + dw_offset die_offset; + unsigned long die_abbrev; +} +die_node; + +/* The pubname structure */ + +typedef struct pubname_struct +{ + dw_die_ref die; + char * name; +} +pubname_entry; + +/* The limbo die list structure. */ +typedef struct limbo_die_struct +{ + dw_die_ref die; + struct limbo_die_struct *next; +} +limbo_die_node; + +/* How to start an assembler comment. */ +#ifndef ASM_COMMENT_START +#define ASM_COMMENT_START ";#" +#endif + +/* Define a macro which returns non-zero for a TYPE_DECL which was + implicitly generated for a tagged type. + + Note that unlike the gcc front end (which generates a NULL named + TYPE_DECL node for each complete tagged type, each array type, and + each function type node created) the g++ front end generates a + _named_ TYPE_DECL node for each tagged type node created. + These TYPE_DECLs have DECL_ARTIFICIAL set, so we know not to + generate a DW_TAG_typedef DIE for them. */ + +#define TYPE_DECL_IS_STUB(decl) \ + (DECL_NAME (decl) == NULL_TREE \ + || (DECL_ARTIFICIAL (decl) \ + && is_tagged_type (TREE_TYPE (decl)) \ + && ((decl == TYPE_STUB_DECL (TREE_TYPE (decl))) \ + /* This is necessary for stub decls that \ + appear in nested inline functions. */ \ + || (DECL_ABSTRACT_ORIGIN (decl) != NULL_TREE \ + && (decl_ultimate_origin (decl) \ + == TYPE_STUB_DECL (TREE_TYPE (decl))))))) + +/* Information concerning the compilation unit's programming + language, and compiler version. */ + +extern int flag_traditional; +extern char *version_string; +extern char *language_string; + +/* Fixed size portion of the DWARF compilation unit header. */ +#define DWARF_COMPILE_UNIT_HEADER_SIZE (2 * DWARF_OFFSET_SIZE + 3) + +/* Fixed size portion of debugging line information prolog. */ +#define DWARF_LINE_PROLOG_HEADER_SIZE 5 + +/* Fixed size portion of public names info. */ +#define DWARF_PUBNAMES_HEADER_SIZE (2 * DWARF_OFFSET_SIZE + 2) + +/* Fixed size portion of the address range info. */ +#define DWARF_ARANGES_HEADER_SIZE \ + (DWARF_ROUND (2 * DWARF_OFFSET_SIZE + 4, PTR_SIZE * 2) - DWARF_OFFSET_SIZE) + +/* Define the architecture-dependent minimum instruction length (in bytes). + In this implementation of DWARF, this field is used for information + purposes only. Since GCC generates assembly language, we have + no a priori knowledge of how many instruction bytes are generated + for each source line, and therefore can use only the DW_LNE_set_address + and DW_LNS_fixed_advance_pc line information commands. */ + +#ifndef DWARF_LINE_MIN_INSTR_LENGTH +#define DWARF_LINE_MIN_INSTR_LENGTH 4 +#endif + +/* Minimum line offset in a special line info. opcode. + This value was chosen to give a reasonable range of values. */ +#define DWARF_LINE_BASE -10 + +/* First special line opcde - leave room for the standard opcodes. */ +#define DWARF_LINE_OPCODE_BASE 10 + +/* Range of line offsets in a special line info. opcode. */ +#define DWARF_LINE_RANGE (254-DWARF_LINE_OPCODE_BASE+1) + +/* Flag that indicates the initial value of the is_stmt_start flag. + In the present implementation, we do not mark any lines as + the beginning of a source statement, because that information + is not made available by the GCC front-end. */ +#define DWARF_LINE_DEFAULT_IS_STMT_START 1 + +/* This location is used by calc_die_sizes() to keep track + the offset of each DIE within the .debug_info section. */ +static unsigned long next_die_offset; + +/* Record the root of the DIE's built for the current compilation unit. */ +static dw_die_ref comp_unit_die; + +/* A list of DIEs with a NULL parent waiting to be relocated. */ +static limbo_die_node *limbo_die_list = 0; + +/* Pointer to an array of filenames referenced by this compilation unit. */ +static char **file_table; + +/* Total number of entries in the table (i.e. array) pointed to by + `file_table'. This is the *total* and includes both used and unused + slots. */ +static unsigned file_table_allocated; + +/* Number of entries in the file_table which are actually in use. */ +static unsigned file_table_in_use; + +/* Size (in elements) of increments by which we may expand the filename + table. */ +#define FILE_TABLE_INCREMENT 64 + +/* Local pointer to the name of the main input file. Initialized in + dwarf2out_init. */ +static char *primary_filename; + +/* For Dwarf output, we must assign lexical-blocks id numbers in the order in + which their beginnings are encountered. We output Dwarf debugging info + that refers to the beginnings and ends of the ranges of code for each + lexical block. The labels themselves are generated in final.c, which + assigns numbers to the blocks in the same way. */ +static unsigned next_block_number = 2; + +/* A pointer to the base of a table of references to DIE's that describe + declarations. The table is indexed by DECL_UID() which is a unique + number identifying each decl. */ +static dw_die_ref *decl_die_table; + +/* Number of elements currently allocated for the decl_die_table. */ +static unsigned decl_die_table_allocated; + +/* Number of elements in decl_die_table currently in use. */ +static unsigned decl_die_table_in_use; + +/* Size (in elements) of increments by which we may expand the + decl_die_table. */ +#define DECL_DIE_TABLE_INCREMENT 256 + +/* A pointer to the base of a table of references to declaration + scopes. This table is a display which tracks the nesting + of declaration scopes at the current scope and containing + scopes. This table is used to find the proper place to + define type declaration DIE's. */ +static tree *decl_scope_table; + +/* Number of elements currently allocated for the decl_scope_table. */ +static unsigned decl_scope_table_allocated; + +/* Current level of nesting of declaration scopes. */ +static unsigned decl_scope_depth; + +/* Size (in elements) of increments by which we may expand the + decl_scope_table. */ +#define DECL_SCOPE_TABLE_INCREMENT 64 + +/* A pointer to the base of a list of references to DIE's that + are uniquely identified by their tag, presence/absence of + children DIE's, and list of attribute/value pairs. */ +static dw_die_ref *abbrev_die_table; + +/* Number of elements currently allocated for abbrev_die_table. */ +static unsigned abbrev_die_table_allocated; + +/* Number of elements in type_die_table currently in use. */ +static unsigned abbrev_die_table_in_use; + +/* Size (in elements) of increments by which we may expand the + abbrev_die_table. */ +#define ABBREV_DIE_TABLE_INCREMENT 256 + +/* A pointer to the base of a table that contains line information + for each source code line in .text in the compilation unit. */ +static dw_line_info_ref line_info_table; + +/* Number of elements currently allocated for line_info_table. */ +static unsigned line_info_table_allocated; + +/* Number of elements in separate_line_info_table currently in use. */ +static unsigned separate_line_info_table_in_use; + +/* A pointer to the base of a table that contains line information + for each source code line outside of .text in the compilation unit. */ +static dw_separate_line_info_ref separate_line_info_table; + +/* Number of elements currently allocated for separate_line_info_table. */ +static unsigned separate_line_info_table_allocated; + +/* Number of elements in line_info_table currently in use. */ +static unsigned line_info_table_in_use; + +/* Size (in elements) of increments by which we may expand the + line_info_table. */ +#define LINE_INFO_TABLE_INCREMENT 1024 + +/* A pointer to the base of a table that contains a list of publicly + accessible names. */ +static pubname_ref pubname_table; + +/* Number of elements currently allocated for pubname_table. */ +static unsigned pubname_table_allocated; + +/* Number of elements in pubname_table currently in use. */ +static unsigned pubname_table_in_use; + +/* Size (in elements) of increments by which we may expand the + pubname_table. */ +#define PUBNAME_TABLE_INCREMENT 64 + +/* A pointer to the base of a table that contains a list of publicly + accessible names. */ +static arange_ref arange_table; + +/* Number of elements currently allocated for arange_table. */ +static unsigned arange_table_allocated; + +/* Number of elements in arange_table currently in use. */ +static unsigned arange_table_in_use; + +/* Size (in elements) of increments by which we may expand the + arange_table. */ +#define ARANGE_TABLE_INCREMENT 64 + +/* A pointer to the base of a list of pending types which we haven't + generated DIEs for yet, but which we will have to come back to + later on. */ + +static tree *pending_types_list; + +/* Number of elements currently allocated for the pending_types_list. */ +static unsigned pending_types_allocated; + +/* Number of elements of pending_types_list currently in use. */ +static unsigned pending_types; + +/* Size (in elements) of increments by which we may expand the pending + types list. Actually, a single hunk of space of this size should + be enough for most typical programs. */ +#define PENDING_TYPES_INCREMENT 64 + +/* Record whether the function being analyzed contains inlined functions. */ +static int current_function_has_inlines; +static int comp_unit_has_inlines; + +/* A pointer to the ..._DECL node which we have most recently been working + on. We keep this around just in case something about it looks screwy and + we want to tell the user what the source coordinates for the actual + declaration are. */ +static tree dwarf_last_decl; + +/* Forward declarations for functions defined in this file. */ + +static void addr_const_to_string PROTO((char *, rtx)); +static char *addr_to_string PROTO((rtx)); +static int is_pseudo_reg PROTO((rtx)); +static tree type_main_variant PROTO((tree)); +static int is_tagged_type PROTO((tree)); +static char *dwarf_tag_name PROTO((unsigned)); +static char *dwarf_attr_name PROTO((unsigned)); +static char *dwarf_form_name PROTO((unsigned)); +static char *dwarf_stack_op_name PROTO((unsigned)); +static char *dwarf_type_encoding_name PROTO((unsigned)); +static tree decl_ultimate_origin PROTO((tree)); +static tree block_ultimate_origin PROTO((tree)); +static tree decl_class_context PROTO((tree)); +static void add_dwarf_attr PROTO((dw_die_ref, dw_attr_ref)); +static void add_AT_flag PROTO((dw_die_ref, + enum dwarf_attribute, + unsigned)); +static void add_AT_int PROTO((dw_die_ref, + enum dwarf_attribute, long)); +static void add_AT_unsigned PROTO((dw_die_ref, + enum dwarf_attribute, + unsigned long)); +static void add_AT_long_long PROTO((dw_die_ref, + enum dwarf_attribute, + unsigned long, unsigned long)); +static void add_AT_float PROTO((dw_die_ref, + enum dwarf_attribute, + unsigned, long *)); +static void add_AT_string PROTO((dw_die_ref, + enum dwarf_attribute, char *)); +static void add_AT_die_ref PROTO((dw_die_ref, + enum dwarf_attribute, + dw_die_ref)); +static void add_AT_fde_ref PROTO((dw_die_ref, + enum dwarf_attribute, + unsigned)); +static void add_AT_loc PROTO((dw_die_ref, + enum dwarf_attribute, + dw_loc_descr_ref)); +static void add_AT_addr PROTO((dw_die_ref, + enum dwarf_attribute, char *)); +static void add_AT_lbl_id PROTO((dw_die_ref, + enum dwarf_attribute, char *)); +static void add_AT_section_offset PROTO((dw_die_ref, + enum dwarf_attribute, char *)); +static int is_extern_subr_die PROTO((dw_die_ref)); +static dw_attr_ref get_AT PROTO((dw_die_ref, + enum dwarf_attribute)); +static char *get_AT_low_pc PROTO((dw_die_ref)); +static char *get_AT_hi_pc PROTO((dw_die_ref)); +static char *get_AT_string PROTO((dw_die_ref, + enum dwarf_attribute)); +static int get_AT_flag PROTO((dw_die_ref, + enum dwarf_attribute)); +static unsigned get_AT_unsigned PROTO((dw_die_ref, + enum dwarf_attribute)); +static int is_c_family PROTO((void)); +static int is_fortran PROTO((void)); +static void remove_AT PROTO((dw_die_ref, + enum dwarf_attribute)); +static void remove_children PROTO((dw_die_ref)); +static void add_child_die PROTO((dw_die_ref, dw_die_ref)); +static dw_die_ref new_die PROTO((enum dwarf_tag, dw_die_ref)); +static dw_die_ref lookup_type_die PROTO((tree)); +static void equate_type_number_to_die PROTO((tree, dw_die_ref)); +static dw_die_ref lookup_decl_die PROTO((tree)); +static void equate_decl_number_to_die PROTO((tree, dw_die_ref)); +static dw_loc_descr_ref new_loc_descr PROTO((enum dwarf_location_atom, + unsigned long, unsigned long)); +static void add_loc_descr PROTO((dw_loc_descr_ref *, + dw_loc_descr_ref)); +static void print_spaces PROTO((FILE *)); +static void print_die PROTO((dw_die_ref, FILE *)); +static void print_dwarf_line_table PROTO((FILE *)); +static void add_sibling_attributes PROTO((dw_die_ref)); +static void build_abbrev_table PROTO((dw_die_ref)); +static unsigned long size_of_string PROTO((char *)); +static unsigned long size_of_loc_descr PROTO((dw_loc_descr_ref)); +static unsigned long size_of_locs PROTO((dw_loc_descr_ref)); +static int constant_size PROTO((long unsigned)); +static unsigned long size_of_die PROTO((dw_die_ref)); +static void calc_die_sizes PROTO((dw_die_ref)); +static unsigned long size_of_prolog PROTO((void)); +static unsigned long size_of_line_info PROTO((void)); +static unsigned long size_of_pubnames PROTO((void)); +static unsigned long size_of_aranges PROTO((void)); +static enum dwarf_form value_format PROTO((dw_val_ref)); +static void output_value_format PROTO((dw_val_ref)); +static void output_abbrev_section PROTO((void)); +static void output_loc_operands PROTO((dw_loc_descr_ref)); +static unsigned long sibling_offset PROTO((dw_die_ref)); +static void output_die PROTO((dw_die_ref)); +static void output_compilation_unit_header PROTO((void)); +static char *dwarf2_name PROTO((tree, int)); +static void add_pubname PROTO((tree, dw_die_ref)); +static void output_pubnames PROTO((void)); +static void add_arrange PROTO((tree, dw_die_ref)); +static void output_arranges PROTO((void)); +static void output_line_info PROTO((void)); +static int is_body_block PROTO((tree)); +static dw_die_ref base_type_die PROTO((tree)); +static tree root_type PROTO((tree)); +static int is_base_type PROTO((tree)); +static dw_die_ref modified_type_die PROTO((tree, int, int, dw_die_ref)); +static int type_is_enum PROTO((tree)); +static dw_loc_descr_ref reg_loc_descriptor PROTO((rtx)); +static dw_loc_descr_ref based_loc_descr PROTO((unsigned, long)); +static int is_based_loc PROTO((rtx)); +static dw_loc_descr_ref mem_loc_descriptor PROTO((rtx)); +static dw_loc_descr_ref concat_loc_descriptor PROTO((rtx, rtx)); +static dw_loc_descr_ref loc_descriptor PROTO((rtx)); +static unsigned ceiling PROTO((unsigned, unsigned)); +static tree field_type PROTO((tree)); +static unsigned simple_type_align_in_bits PROTO((tree)); +static unsigned simple_type_size_in_bits PROTO((tree)); +static unsigned field_byte_offset PROTO((tree)); +static void add_AT_location_description PROTO((dw_die_ref, + enum dwarf_attribute, rtx)); +static void add_data_member_location_attribute PROTO((dw_die_ref, tree)); +static void add_const_value_attribute PROTO((dw_die_ref, rtx)); +static void add_location_or_const_value_attribute PROTO((dw_die_ref, tree)); +static void add_name_attribute PROTO((dw_die_ref, char *)); +static void add_bound_info PROTO((dw_die_ref, + enum dwarf_attribute, tree)); +static void add_subscript_info PROTO((dw_die_ref, tree)); +static void add_byte_size_attribute PROTO((dw_die_ref, tree)); +static void add_bit_offset_attribute PROTO((dw_die_ref, tree)); +static void add_bit_size_attribute PROTO((dw_die_ref, tree)); +static void add_prototyped_attribute PROTO((dw_die_ref, tree)); +static void add_abstract_origin_attribute PROTO((dw_die_ref, tree)); +static void add_pure_or_virtual_attribute PROTO((dw_die_ref, tree)); +static void add_src_coords_attributes PROTO((dw_die_ref, tree)); +static void ad_name_and_src_coords_attributes PROTO((dw_die_ref, tree)); +static void push_decl_scope PROTO((tree)); +static dw_die_ref scope_die_for PROTO((tree, dw_die_ref)); +static void pop_decl_scope PROTO((void)); +static void add_type_attribute PROTO((dw_die_ref, tree, int, int, + dw_die_ref)); +static char *type_tag PROTO((tree)); +static tree member_declared_type PROTO((tree)); +static char *decl_start_label PROTO((tree)); +static void gen_arrqay_type_die PROTO((tree, dw_die_ref)); +static void gen_set_type_die PROTO((tree, dw_die_ref)); +static void gen_entry_point_die PROTO((tree, dw_die_ref)); +static void pend_type PROTO((tree)); +static void output_pending_types_for_scope PROTO((dw_die_ref)); +static void gen_inlined_enumeration_type_die PROTO((tree, dw_die_ref)); +static void gen_inlined_structure_type_die PROTO((tree, dw_die_ref)); +static void gen_inlined_union_type_die PROTO((tree, dw_die_ref)); +static void gen_enumeration_type_die PROTO((tree, dw_die_ref)); +static dw_die_ref gen_formal_parameter_die PROTO((tree, dw_die_ref)); +static void gen_unspecified_parameters_die PROTO((tree, dw_die_ref)); +static void gen_formal_types_die PROTO((tree, dw_die_ref)); +static void gen_subprogram_die PROTO((tree, dw_die_ref)); +static void gen_variable_die PROTO((tree, dw_die_ref)); +static void gen_label_die PROTO((tree, dw_die_ref)); +static void gen_lexical_block_die PROTO((tree, dw_die_ref, int)); +static void gen_inlined_subprogram_die PROTO((tree, dw_die_ref, int)); +static void gen_field_die PROTO((tree, dw_die_ref)); +static void gen_ptr_to_mbr_type_die PROTO((tree, dw_die_ref)); +static void gen_compile_unit_die PROTO((char *)); +static void gen_string_type_die PROTO((tree, dw_die_ref)); +static void gen_inheritance_die PROTO((tree, dw_die_ref)); +static void gen_member_die PROTO((tree, dw_die_ref)); +static void gen_struct_or_union_type_die PROTO((tree, dw_die_ref)); +static void gen_subroutine_type_die PROTO((tree, dw_die_ref)); +static void gen_typedef_die PROTO((tree, dw_die_ref)); +static void gen_type_die PROTO((tree, dw_die_ref)); +static void gen_tagged_type_instantiation_die PROTO((tree, dw_die_ref)); +static void gen_block_die PROTO((tree, dw_die_ref, int)); +static void decls_for_scope PROTO((tree, dw_die_ref, int)); +static int is_redundant_typedef PROTO((tree)); +static void gen_decl_die PROTO((tree, dw_die_ref)); +static unsigned lookup_filename PROTO((char *)); + +/* Section names used to hold DWARF debugging information. */ +#ifndef DEBUG_INFO_SECTION +#define DEBUG_INFO_SECTION ".debug_info" +#endif +#ifndef ABBREV_SECTION +#define ABBREV_SECTION ".debug_abbrev" +#endif +#ifndef ARANGES_SECTION +#define ARANGES_SECTION ".debug_aranges" +#endif +#ifndef DW_MACINFO_SECTION +#define DW_MACINFO_SECTION ".debug_macinfo" +#endif +#ifndef DEBUG_LINE_SECTION +#define DEBUG_LINE_SECTION ".debug_line" +#endif +#ifndef LOC_SECTION +#define LOC_SECTION ".debug_loc" +#endif +#ifndef PUBNAMES_SECTION +#define PUBNAMES_SECTION ".debug_pubnames" +#endif +#ifndef STR_SECTION +#define STR_SECTION ".debug_str" +#endif + +/* Standard ELF section names for compiled code and data. */ +#ifndef TEXT_SECTION +#define TEXT_SECTION ".text" +#endif +#ifndef DATA_SECTION +#define DATA_SECTION ".data" +#endif +#ifndef BSS_SECTION +#define BSS_SECTION ".bss" +#endif + + +/* Definitions of defaults for formats and names of various special + (artificial) labels which may be generated within this file (when the -g + options is used and DWARF_DEBUGGING_INFO is in effect. + If necessary, these may be overridden from within the tm.h file, but + typically, overriding these defaults is unnecessary. */ + +static char text_end_label[MAX_ARTIFICIAL_LABEL_BYTES]; + +#ifndef TEXT_END_LABEL +#define TEXT_END_LABEL "Letext" +#endif +#ifndef DATA_END_LABEL +#define DATA_END_LABEL "Ledata" +#endif +#ifndef BSS_END_LABEL +#define BSS_END_LABEL "Lebss" +#endif +#ifndef INSN_LABEL_FMT +#define INSN_LABEL_FMT "LI%u_" +#endif +#ifndef BLOCK_BEGIN_LABEL +#define BLOCK_BEGIN_LABEL "LBB" +#endif +#ifndef BLOCK_END_LABEL +#define BLOCK_END_LABEL "LBE" +#endif +#ifndef BODY_BEGIN_LABEL +#define BODY_BEGIN_LABEL "Lbb" +#endif +#ifndef BODY_END_LABEL +#define BODY_END_LABEL "Lbe" +#endif +#ifndef LINE_CODE_LABEL +#define LINE_CODE_LABEL "LM" +#endif +#ifndef SEPARATE_LINE_CODE_LABEL +#define SEPARATE_LINE_CODE_LABEL "LSM" +#endif + +/* Convert a reference to the assembler name of a C-level name. This + macro has the same effect as ASM_OUTPUT_LABELREF, but copies to + a string rather than writing to a file. */ +#ifndef ASM_NAME_TO_STRING +#define ASM_NAME_TO_STRING(STR, NAME) \ + do { \ + if ((NAME)[0] == '*') \ + strcpy (STR, NAME+1); \ + else \ + strcpy (STR, NAME); \ + } \ + while (0) +#endif + +/* Convert an integer constant expression into assembler syntax. Addition + and subtraction are the only arithmetic that may appear in these + expressions. This is an adaptation of output_addr_const in final.c. + Here, the target of the conversion is a string buffer. We can't use + output_addr_const directly, because it writes to a file. */ + +static void +addr_const_to_string (str, x) + char *str; + rtx x; +{ + char buf1[256]; + char buf2[256]; + +restart: + str[0] = '\0'; + switch (GET_CODE (x)) + { + case PC: + if (flag_pic) + strcat (str, ","); + else + abort (); + break; + + case SYMBOL_REF: + ASM_NAME_TO_STRING (buf1, XSTR (x, 0)); + strcat (str, buf1); + break; + + case LABEL_REF: + ASM_GENERATE_INTERNAL_LABEL (buf1, "L", CODE_LABEL_NUMBER (XEXP (x, 0))); + ASM_NAME_TO_STRING (buf2, buf1); + strcat (str, buf2); + break; + + case CODE_LABEL: + ASM_GENERATE_INTERNAL_LABEL (buf1, "L", CODE_LABEL_NUMBER (x)); + ASM_NAME_TO_STRING (buf2, buf1); + strcat (str, buf2); + break; + + case CONST_INT: + sprintf (buf1, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); + strcat (str, buf1); + break; + + case CONST: + /* This used to output parentheses around the expression, but that does + not work on the 386 (either ATT or BSD assembler). */ + addr_const_to_string (buf1, XEXP (x, 0)); + strcat (str, buf1); + break; + + case CONST_DOUBLE: + if (GET_MODE (x) == VOIDmode) + { + /* We can use %d if the number is one word and positive. */ + if (CONST_DOUBLE_HIGH (x)) + sprintf (buf1, HOST_WIDE_INT_PRINT_DOUBLE_HEX, + CONST_DOUBLE_HIGH (x), CONST_DOUBLE_LOW (x)); + else if (CONST_DOUBLE_LOW (x) < 0) + sprintf (buf1, HOST_WIDE_INT_PRINT_HEX, CONST_DOUBLE_LOW (x)); + else + sprintf (buf1, HOST_WIDE_INT_PRINT_DEC, + CONST_DOUBLE_LOW (x)); + strcat (str, buf1); + } + else + /* We can't handle floating point constants; PRINT_OPERAND must + handle them. */ + output_operand_lossage ("floating constant misused"); + break; + + case PLUS: + /* Some assemblers need integer constants to appear last (eg masm). */ + if (GET_CODE (XEXP (x, 0)) == CONST_INT) + { + addr_const_to_string (buf1, XEXP (x, 1)); + strcat (str, buf1); + if (INTVAL (XEXP (x, 0)) >= 0) + strcat (str, "+"); + + addr_const_to_string (buf1, XEXP (x, 0)); + strcat (str, buf1); + } + else + { + addr_const_to_string (buf1, XEXP (x, 0)); + strcat (str, buf1); + if (INTVAL (XEXP (x, 1)) >= 0) + strcat (str, "+"); + + addr_const_to_string (buf1, XEXP (x, 1)); + strcat (str, buf1); + } + break; + + case MINUS: + /* Avoid outputting things like x-x or x+5-x, since some assemblers + can't handle that. */ + x = simplify_subtraction (x); + if (GET_CODE (x) != MINUS) + goto restart; + + addr_const_to_string (buf1, XEXP (x, 0)); + strcat (str, buf1); + strcat (str, "-"); + if (GET_CODE (XEXP (x, 1)) == CONST_INT + && INTVAL (XEXP (x, 1)) < 0) + { + strcat (str, ASM_OPEN_PAREN); + addr_const_to_string (buf1, XEXP (x, 1)); + strcat (str, buf1); + strcat (str, ASM_CLOSE_PAREN); + } + else + { + addr_const_to_string (buf1, XEXP (x, 1)); + strcat (str, buf1); + } + break; + + case ZERO_EXTEND: + case SIGN_EXTEND: + addr_const_to_string (buf1, XEXP (x, 0)); + strcat (str, buf1); + break; + + default: + output_operand_lossage ("invalid expression as operand"); + } +} + +/* Convert an address constant to a string, and return a pointer to + a copy of the result, located on the heap. */ + +static char * +addr_to_string (x) + rtx x; +{ + char buf[1024]; + addr_const_to_string (buf, x); + return xstrdup (buf); +} + +/* Test if rtl node points to a pseudo register. */ + +static inline int +is_pseudo_reg (rtl) + register rtx rtl; +{ + return (((GET_CODE (rtl) == REG) && (REGNO (rtl) >= FIRST_PSEUDO_REGISTER)) + || ((GET_CODE (rtl) == SUBREG) + && (REGNO (XEXP (rtl, 0)) >= FIRST_PSEUDO_REGISTER))); +} + +/* Return a reference to a type, with its const and volatile qualifiers + removed. */ + +static inline tree +type_main_variant (type) + register tree type; +{ + type = TYPE_MAIN_VARIANT (type); + + /* There really should be only one main variant among any group of variants + of a given type (and all of the MAIN_VARIANT values for all members of + the group should point to that one type) but sometimes the C front-end + messes this up for array types, so we work around that bug here. */ + + if (TREE_CODE (type) == ARRAY_TYPE) + while (type != TYPE_MAIN_VARIANT (type)) + type = TYPE_MAIN_VARIANT (type); + + return type; +} + +/* Return non-zero if the given type node represents a tagged type. */ + +static inline int +is_tagged_type (type) + register tree type; +{ + register enum tree_code code = TREE_CODE (type); + + return (code == RECORD_TYPE || code == UNION_TYPE + || code == QUAL_UNION_TYPE || code == ENUMERAL_TYPE); +} + +/* Convert a DIE tag into its string name. */ + +static char * +dwarf_tag_name (tag) + register unsigned tag; +{ + switch (tag) + { + case DW_TAG_padding: + return "DW_TAG_padding"; + case DW_TAG_array_type: + return "DW_TAG_array_type"; + case DW_TAG_class_type: + return "DW_TAG_class_type"; + case DW_TAG_entry_point: + return "DW_TAG_entry_point"; + case DW_TAG_enumeration_type: + return "DW_TAG_enumeration_type"; + case DW_TAG_formal_parameter: + return "DW_TAG_formal_parameter"; + case DW_TAG_imported_declaration: + return "DW_TAG_imported_declaration"; + case DW_TAG_label: + return "DW_TAG_label"; + case DW_TAG_lexical_block: + return "DW_TAG_lexical_block"; + case DW_TAG_member: + return "DW_TAG_member"; + case DW_TAG_pointer_type: + return "DW_TAG_pointer_type"; + case DW_TAG_reference_type: + return "DW_TAG_reference_type"; + case DW_TAG_compile_unit: + return "DW_TAG_compile_unit"; + case DW_TAG_string_type: + return "DW_TAG_string_type"; + case DW_TAG_structure_type: + return "DW_TAG_structure_type"; + case DW_TAG_subroutine_type: + return "DW_TAG_subroutine_type"; + case DW_TAG_typedef: + return "DW_TAG_typedef"; + case DW_TAG_union_type: + return "DW_TAG_union_type"; + case DW_TAG_unspecified_parameters: + return "DW_TAG_unspecified_parameters"; + case DW_TAG_variant: + return "DW_TAG_variant"; + case DW_TAG_common_block: + return "DW_TAG_common_block"; + case DW_TAG_common_inclusion: + return "DW_TAG_common_inclusion"; + case DW_TAG_inheritance: + return "DW_TAG_inheritance"; + case DW_TAG_inlined_subroutine: + return "DW_TAG_inlined_subroutine"; + case DW_TAG_module: + return "DW_TAG_module"; + case DW_TAG_ptr_to_member_type: + return "DW_TAG_ptr_to_member_type"; + case DW_TAG_set_type: + return "DW_TAG_set_type"; + case DW_TAG_subrange_type: + return "DW_TAG_subrange_type"; + case DW_TAG_with_stmt: + return "DW_TAG_with_stmt"; + case DW_TAG_access_declaration: + return "DW_TAG_access_declaration"; + case DW_TAG_base_type: + return "DW_TAG_base_type"; + case DW_TAG_catch_block: + return "DW_TAG_catch_block"; + case DW_TAG_const_type: + return "DW_TAG_const_type"; + case DW_TAG_constant: + return "DW_TAG_constant"; + case DW_TAG_enumerator: + return "DW_TAG_enumerator"; + case DW_TAG_file_type: + return "DW_TAG_file_type"; + case DW_TAG_friend: + return "DW_TAG_friend"; + case DW_TAG_namelist: + return "DW_TAG_namelist"; + case DW_TAG_namelist_item: + return "DW_TAG_namelist_item"; + case DW_TAG_packed_type: + return "DW_TAG_packed_type"; + case DW_TAG_subprogram: + return "DW_TAG_subprogram"; + case DW_TAG_template_type_param: + return "DW_TAG_template_type_param"; + case DW_TAG_template_value_param: + return "DW_TAG_template_value_param"; + case DW_TAG_thrown_type: + return "DW_TAG_thrown_type"; + case DW_TAG_try_block: + return "DW_TAG_try_block"; + case DW_TAG_variant_part: + return "DW_TAG_variant_part"; + case DW_TAG_variable: + return "DW_TAG_variable"; + case DW_TAG_volatile_type: + return "DW_TAG_volatile_type"; + case DW_TAG_MIPS_loop: + return "DW_TAG_MIPS_loop"; + case DW_TAG_format_label: + return "DW_TAG_format_label"; + case DW_TAG_function_template: + return "DW_TAG_function_template"; + case DW_TAG_class_template: + return "DW_TAG_class_template"; + default: + return "DW_TAG_<unknown>"; + } +} + +/* Convert a DWARF attribute code into its string name. */ + +static char * +dwarf_attr_name (attr) + register unsigned attr; +{ + switch (attr) + { + case DW_AT_sibling: + return "DW_AT_sibling"; + case DW_AT_location: + return "DW_AT_location"; + case DW_AT_name: + return "DW_AT_name"; + case DW_AT_ordering: + return "DW_AT_ordering"; + case DW_AT_subscr_data: + return "DW_AT_subscr_data"; + case DW_AT_byte_size: + return "DW_AT_byte_size"; + case DW_AT_bit_offset: + return "DW_AT_bit_offset"; + case DW_AT_bit_size: + return "DW_AT_bit_size"; + case DW_AT_element_list: + return "DW_AT_element_list"; + case DW_AT_stmt_list: + return "DW_AT_stmt_list"; + case DW_AT_low_pc: + return "DW_AT_low_pc"; + case DW_AT_high_pc: + return "DW_AT_high_pc"; + case DW_AT_language: + return "DW_AT_language"; + case DW_AT_member: + return "DW_AT_member"; + case DW_AT_discr: + return "DW_AT_discr"; + case DW_AT_discr_value: + return "DW_AT_discr_value"; + case DW_AT_visibility: + return "DW_AT_visibility"; + case DW_AT_import: + return "DW_AT_import"; + case DW_AT_string_length: + return "DW_AT_string_length"; + case DW_AT_common_reference: + return "DW_AT_common_reference"; + case DW_AT_comp_dir: + return "DW_AT_comp_dir"; + case DW_AT_const_value: + return "DW_AT_const_value"; + case DW_AT_containing_type: + return "DW_AT_containing_type"; + case DW_AT_default_value: + return "DW_AT_default_value"; + case DW_AT_inline: + return "DW_AT_inline"; + case DW_AT_is_optional: + return "DW_AT_is_optional"; + case DW_AT_lower_bound: + return "DW_AT_lower_bound"; + case DW_AT_producer: + return "DW_AT_producer"; + case DW_AT_prototyped: + return "DW_AT_prototyped"; + case DW_AT_return_addr: + return "DW_AT_return_addr"; + case DW_AT_start_scope: + return "DW_AT_start_scope"; + case DW_AT_stride_size: + return "DW_AT_stride_size"; + case DW_AT_upper_bound: + return "DW_AT_upper_bound"; + case DW_AT_abstract_origin: + return "DW_AT_abstract_origin"; + case DW_AT_accessibility: + return "DW_AT_accessibility"; + case DW_AT_address_class: + return "DW_AT_address_class"; + case DW_AT_artificial: + return "DW_AT_artificial"; + case DW_AT_base_types: + return "DW_AT_base_types"; + case DW_AT_calling_convention: + return "DW_AT_calling_convention"; + case DW_AT_count: + return "DW_AT_count"; + case DW_AT_data_member_location: + return "DW_AT_data_member_location"; + case DW_AT_decl_column: + return "DW_AT_decl_column"; + case DW_AT_decl_file: + return "DW_AT_decl_file"; + case DW_AT_decl_line: + return "DW_AT_decl_line"; + case DW_AT_declaration: + return "DW_AT_declaration"; + case DW_AT_discr_list: + return "DW_AT_discr_list"; + case DW_AT_encoding: + return "DW_AT_encoding"; + case DW_AT_external: + return "DW_AT_external"; + case DW_AT_frame_base: + return "DW_AT_frame_base"; + case DW_AT_friend: + return "DW_AT_friend"; + case DW_AT_identifier_case: + return "DW_AT_identifier_case"; + case DW_AT_macro_info: + return "DW_AT_macro_info"; + case DW_AT_namelist_items: + return "DW_AT_namelist_items"; + case DW_AT_priority: + return "DW_AT_priority"; + case DW_AT_segment: + return "DW_AT_segment"; + case DW_AT_specification: + return "DW_AT_specification"; + case DW_AT_static_link: + return "DW_AT_static_link"; + case DW_AT_type: + return "DW_AT_type"; + case DW_AT_use_location: + return "DW_AT_use_location"; + case DW_AT_variable_parameter: + return "DW_AT_variable_parameter"; + case DW_AT_virtuality: + return "DW_AT_virtuality"; + case DW_AT_vtable_elem_location: + return "DW_AT_vtable_elem_location"; + + case DW_AT_MIPS_fde: + return "DW_AT_MIPS_fde"; + case DW_AT_MIPS_loop_begin: + return "DW_AT_MIPS_loop_begin"; + case DW_AT_MIPS_tail_loop_begin: + return "DW_AT_MIPS_tail_loop_begin"; + case DW_AT_MIPS_epilog_begin: + return "DW_AT_MIPS_epilog_begin"; + case DW_AT_MIPS_loop_unroll_factor: + return "DW_AT_MIPS_loop_unroll_factor"; + case DW_AT_MIPS_software_pipeline_depth: + return "DW_AT_MIPS_software_pipeline_depth"; + case DW_AT_MIPS_linkage_name: + return "DW_AT_MIPS_linkage_name"; + case DW_AT_MIPS_stride: + return "DW_AT_MIPS_stride"; + case DW_AT_MIPS_abstract_name: + return "DW_AT_MIPS_abstract_name"; + case DW_AT_MIPS_clone_origin: + return "DW_AT_MIPS_clone_origin"; + case DW_AT_MIPS_has_inlines: + return "DW_AT_MIPS_has_inlines"; + + case DW_AT_sf_names: + return "DW_AT_sf_names"; + case DW_AT_src_info: + return "DW_AT_src_info"; + case DW_AT_mac_info: + return "DW_AT_mac_info"; + case DW_AT_src_coords: + return "DW_AT_src_coords"; + case DW_AT_body_begin: + return "DW_AT_body_begin"; + case DW_AT_body_end: + return "DW_AT_body_end"; + default: + return "DW_AT_<unknown>"; + } +} + +/* Convert a DWARF value form code into its string name. */ + +static char * +dwarf_form_name (form) + register unsigned form; +{ + switch (form) + { + case DW_FORM_addr: + return "DW_FORM_addr"; + case DW_FORM_block2: + return "DW_FORM_block2"; + case DW_FORM_block4: + return "DW_FORM_block4"; + case DW_FORM_data2: + return "DW_FORM_data2"; + case DW_FORM_data4: + return "DW_FORM_data4"; + case DW_FORM_data8: + return "DW_FORM_data8"; + case DW_FORM_string: + return "DW_FORM_string"; + case DW_FORM_block: + return "DW_FORM_block"; + case DW_FORM_block1: + return "DW_FORM_block1"; + case DW_FORM_data1: + return "DW_FORM_data1"; + case DW_FORM_flag: + return "DW_FORM_flag"; + case DW_FORM_sdata: + return "DW_FORM_sdata"; + case DW_FORM_strp: + return "DW_FORM_strp"; + case DW_FORM_udata: + return "DW_FORM_udata"; + case DW_FORM_ref_addr: + return "DW_FORM_ref_addr"; + case DW_FORM_ref1: + return "DW_FORM_ref1"; + case DW_FORM_ref2: + return "DW_FORM_ref2"; + case DW_FORM_ref4: + return "DW_FORM_ref4"; + case DW_FORM_ref8: + return "DW_FORM_ref8"; + case DW_FORM_ref_udata: + return "DW_FORM_ref_udata"; + case DW_FORM_indirect: + return "DW_FORM_indirect"; + default: + return "DW_FORM_<unknown>"; + } +} + +/* Convert a DWARF stack opcode into its string name. */ + +static char * +dwarf_stack_op_name (op) + register unsigned op; +{ + switch (op) + { + case DW_OP_addr: + return "DW_OP_addr"; + case DW_OP_deref: + return "DW_OP_deref"; + case DW_OP_const1u: + return "DW_OP_const1u"; + case DW_OP_const1s: + return "DW_OP_const1s"; + case DW_OP_const2u: + return "DW_OP_const2u"; + case DW_OP_const2s: + return "DW_OP_const2s"; + case DW_OP_const4u: + return "DW_OP_const4u"; + case DW_OP_const4s: + return "DW_OP_const4s"; + case DW_OP_const8u: + return "DW_OP_const8u"; + case DW_OP_const8s: + return "DW_OP_const8s"; + case DW_OP_constu: + return "DW_OP_constu"; + case DW_OP_consts: + return "DW_OP_consts"; + case DW_OP_dup: + return "DW_OP_dup"; + case DW_OP_drop: + return "DW_OP_drop"; + case DW_OP_over: + return "DW_OP_over"; + case DW_OP_pick: + return "DW_OP_pick"; + case DW_OP_swap: + return "DW_OP_swap"; + case DW_OP_rot: + return "DW_OP_rot"; + case DW_OP_xderef: + return "DW_OP_xderef"; + case DW_OP_abs: + return "DW_OP_abs"; + case DW_OP_and: + return "DW_OP_and"; + case DW_OP_div: + return "DW_OP_div"; + case DW_OP_minus: + return "DW_OP_minus"; + case DW_OP_mod: + return "DW_OP_mod"; + case DW_OP_mul: + return "DW_OP_mul"; + case DW_OP_neg: + return "DW_OP_neg"; + case DW_OP_not: + return "DW_OP_not"; + case DW_OP_or: + return "DW_OP_or"; + case DW_OP_plus: + return "DW_OP_plus"; + case DW_OP_plus_uconst: + return "DW_OP_plus_uconst"; + case DW_OP_shl: + return "DW_OP_shl"; + case DW_OP_shr: + return "DW_OP_shr"; + case DW_OP_shra: + return "DW_OP_shra"; + case DW_OP_xor: + return "DW_OP_xor"; + case DW_OP_bra: + return "DW_OP_bra"; + case DW_OP_eq: + return "DW_OP_eq"; + case DW_OP_ge: + return "DW_OP_ge"; + case DW_OP_gt: + return "DW_OP_gt"; + case DW_OP_le: + return "DW_OP_le"; + case DW_OP_lt: + return "DW_OP_lt"; + case DW_OP_ne: + return "DW_OP_ne"; + case DW_OP_skip: + return "DW_OP_skip"; + case DW_OP_lit0: + return "DW_OP_lit0"; + case DW_OP_lit1: + return "DW_OP_lit1"; + case DW_OP_lit2: + return "DW_OP_lit2"; + case DW_OP_lit3: + return "DW_OP_lit3"; + case DW_OP_lit4: + return "DW_OP_lit4"; + case DW_OP_lit5: + return "DW_OP_lit5"; + case DW_OP_lit6: + return "DW_OP_lit6"; + case DW_OP_lit7: + return "DW_OP_lit7"; + case DW_OP_lit8: + return "DW_OP_lit8"; + case DW_OP_lit9: + return "DW_OP_lit9"; + case DW_OP_lit10: + return "DW_OP_lit10"; + case DW_OP_lit11: + return "DW_OP_lit11"; + case DW_OP_lit12: + return "DW_OP_lit12"; + case DW_OP_lit13: + return "DW_OP_lit13"; + case DW_OP_lit14: + return "DW_OP_lit14"; + case DW_OP_lit15: + return "DW_OP_lit15"; + case DW_OP_lit16: + return "DW_OP_lit16"; + case DW_OP_lit17: + return "DW_OP_lit17"; + case DW_OP_lit18: + return "DW_OP_lit18"; + case DW_OP_lit19: + return "DW_OP_lit19"; + case DW_OP_lit20: + return "DW_OP_lit20"; + case DW_OP_lit21: + return "DW_OP_lit21"; + case DW_OP_lit22: + return "DW_OP_lit22"; + case DW_OP_lit23: + return "DW_OP_lit23"; + case DW_OP_lit24: + return "DW_OP_lit24"; + case DW_OP_lit25: + return "DW_OP_lit25"; + case DW_OP_lit26: + return "DW_OP_lit26"; + case DW_OP_lit27: + return "DW_OP_lit27"; + case DW_OP_lit28: + return "DW_OP_lit28"; + case DW_OP_lit29: + return "DW_OP_lit29"; + case DW_OP_lit30: + return "DW_OP_lit30"; + case DW_OP_lit31: + return "DW_OP_lit31"; + case DW_OP_reg0: + return "DW_OP_reg0"; + case DW_OP_reg1: + return "DW_OP_reg1"; + case DW_OP_reg2: + return "DW_OP_reg2"; + case DW_OP_reg3: + return "DW_OP_reg3"; + case DW_OP_reg4: + return "DW_OP_reg4"; + case DW_OP_reg5: + return "DW_OP_reg5"; + case DW_OP_reg6: + return "DW_OP_reg6"; + case DW_OP_reg7: + return "DW_OP_reg7"; + case DW_OP_reg8: + return "DW_OP_reg8"; + case DW_OP_reg9: + return "DW_OP_reg9"; + case DW_OP_reg10: + return "DW_OP_reg10"; + case DW_OP_reg11: + return "DW_OP_reg11"; + case DW_OP_reg12: + return "DW_OP_reg12"; + case DW_OP_reg13: + return "DW_OP_reg13"; + case DW_OP_reg14: + return "DW_OP_reg14"; + case DW_OP_reg15: + return "DW_OP_reg15"; + case DW_OP_reg16: + return "DW_OP_reg16"; + case DW_OP_reg17: + return "DW_OP_reg17"; + case DW_OP_reg18: + return "DW_OP_reg18"; + case DW_OP_reg19: + return "DW_OP_reg19"; + case DW_OP_reg20: + return "DW_OP_reg20"; + case DW_OP_reg21: + return "DW_OP_reg21"; + case DW_OP_reg22: + return "DW_OP_reg22"; + case DW_OP_reg23: + return "DW_OP_reg23"; + case DW_OP_reg24: + return "DW_OP_reg24"; + case DW_OP_reg25: + return "DW_OP_reg25"; + case DW_OP_reg26: + return "DW_OP_reg26"; + case DW_OP_reg27: + return "DW_OP_reg27"; + case DW_OP_reg28: + return "DW_OP_reg28"; + case DW_OP_reg29: + return "DW_OP_reg29"; + case DW_OP_reg30: + return "DW_OP_reg30"; + case DW_OP_reg31: + return "DW_OP_reg31"; + case DW_OP_breg0: + return "DW_OP_breg0"; + case DW_OP_breg1: + return "DW_OP_breg1"; + case DW_OP_breg2: + return "DW_OP_breg2"; + case DW_OP_breg3: + return "DW_OP_breg3"; + case DW_OP_breg4: + return "DW_OP_breg4"; + case DW_OP_breg5: + return "DW_OP_breg5"; + case DW_OP_breg6: + return "DW_OP_breg6"; + case DW_OP_breg7: + return "DW_OP_breg7"; + case DW_OP_breg8: + return "DW_OP_breg8"; + case DW_OP_breg9: + return "DW_OP_breg9"; + case DW_OP_breg10: + return "DW_OP_breg10"; + case DW_OP_breg11: + return "DW_OP_breg11"; + case DW_OP_breg12: + return "DW_OP_breg12"; + case DW_OP_breg13: + return "DW_OP_breg13"; + case DW_OP_breg14: + return "DW_OP_breg14"; + case DW_OP_breg15: + return "DW_OP_breg15"; + case DW_OP_breg16: + return "DW_OP_breg16"; + case DW_OP_breg17: + return "DW_OP_breg17"; + case DW_OP_breg18: + return "DW_OP_breg18"; + case DW_OP_breg19: + return "DW_OP_breg19"; + case DW_OP_breg20: + return "DW_OP_breg20"; + case DW_OP_breg21: + return "DW_OP_breg21"; + case DW_OP_breg22: + return "DW_OP_breg22"; + case DW_OP_breg23: + return "DW_OP_breg23"; + case DW_OP_breg24: + return "DW_OP_breg24"; + case DW_OP_breg25: + return "DW_OP_breg25"; + case DW_OP_breg26: + return "DW_OP_breg26"; + case DW_OP_breg27: + return "DW_OP_breg27"; + case DW_OP_breg28: + return "DW_OP_breg28"; + case DW_OP_breg29: + return "DW_OP_breg29"; + case DW_OP_breg30: + return "DW_OP_breg30"; + case DW_OP_breg31: + return "DW_OP_breg31"; + case DW_OP_regx: + return "DW_OP_regx"; + case DW_OP_fbreg: + return "DW_OP_fbreg"; + case DW_OP_bregx: + return "DW_OP_bregx"; + case DW_OP_piece: + return "DW_OP_piece"; + case DW_OP_deref_size: + return "DW_OP_deref_size"; + case DW_OP_xderef_size: + return "DW_OP_xderef_size"; + case DW_OP_nop: + return "DW_OP_nop"; + default: + return "OP_<unknown>"; + } +} + +/* Convert a DWARF type code into its string name. */ + +static char * +dwarf_type_encoding_name (enc) + register unsigned enc; +{ + switch (enc) + { + case DW_ATE_address: + return "DW_ATE_address"; + case DW_ATE_boolean: + return "DW_ATE_boolean"; + case DW_ATE_complex_float: + return "DW_ATE_complex_float"; + case DW_ATE_float: + return "DW_ATE_float"; + case DW_ATE_signed: + return "DW_ATE_signed"; + case DW_ATE_signed_char: + return "DW_ATE_signed_char"; + case DW_ATE_unsigned: + return "DW_ATE_unsigned"; + case DW_ATE_unsigned_char: + return "DW_ATE_unsigned_char"; + default: + return "DW_ATE_<unknown>"; + } +} + +/* Determine the "ultimate origin" of a decl. The decl may be an inlined + instance of an inlined instance of a decl which is local to an inline + function, so we have to trace all of the way back through the origin chain + to find out what sort of node actually served as the original seed for the + given block. */ + +static tree +decl_ultimate_origin (decl) + register tree decl; +{ + register tree immediate_origin = DECL_ABSTRACT_ORIGIN (decl); + + if (immediate_origin == NULL_TREE) + return NULL_TREE; + else + { + register tree ret_val; + register tree lookahead = immediate_origin; + + do + { + ret_val = lookahead; + lookahead = DECL_ABSTRACT_ORIGIN (ret_val); + } + while (lookahead != NULL && lookahead != ret_val); + + return ret_val; + } +} + +/* Determine the "ultimate origin" of a block. The block may be an inlined + instance of an inlined instance of a block which is local to an inline + function, so we have to trace all of the way back through the origin chain + to find out what sort of node actually served as the original seed for the + given block. */ + +static tree +block_ultimate_origin (block) + register tree block; +{ + register tree immediate_origin = BLOCK_ABSTRACT_ORIGIN (block); + + if (immediate_origin == NULL_TREE) + return NULL_TREE; + else + { + register tree ret_val; + register tree lookahead = immediate_origin; + + do + { + ret_val = lookahead; + lookahead = (TREE_CODE (ret_val) == BLOCK) + ? BLOCK_ABSTRACT_ORIGIN (ret_val) + : NULL; + } + while (lookahead != NULL && lookahead != ret_val); + + return ret_val; + } +} + +/* Get the class to which DECL belongs, if any. In g++, the DECL_CONTEXT + of a virtual function may refer to a base class, so we check the 'this' + parameter. */ + +static tree +decl_class_context (decl) + tree decl; +{ + tree context = NULL_TREE; + + if (TREE_CODE (decl) != FUNCTION_DECL || ! DECL_VINDEX (decl)) + context = DECL_CONTEXT (decl); + else + context = TYPE_MAIN_VARIANT + (TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl))))); + + if (context && TREE_CODE_CLASS (TREE_CODE (context)) != 't') + context = NULL_TREE; + + return context; +} + +/* Add an attribute/value pair to a DIE */ + +static inline void +add_dwarf_attr (die, attr) + register dw_die_ref die; + register dw_attr_ref attr; +{ + if (die != NULL && attr != NULL) + { + if (die->die_attr == NULL) + { + die->die_attr = attr; + die->die_attr_last = attr; + } + else + { + die->die_attr_last->dw_attr_next = attr; + die->die_attr_last = attr; + } + } +} + +/* Add a flag value attribute to a DIE. */ + +static inline void +add_AT_flag (die, attr_kind, flag) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; + register unsigned flag; +{ + register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + + attr->dw_attr_next = NULL; + attr->dw_attr = attr_kind; + attr->dw_attr_val.val_class = dw_val_class_flag; + attr->dw_attr_val.v.val_flag = flag; + add_dwarf_attr (die, attr); +} + +/* Add a signed integer attribute value to a DIE. */ + +static inline void +add_AT_int (die, attr_kind, int_val) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; + register long int int_val; +{ + register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + + attr->dw_attr_next = NULL; + attr->dw_attr = attr_kind; + attr->dw_attr_val.val_class = dw_val_class_const; + attr->dw_attr_val.v.val_int = int_val; + add_dwarf_attr (die, attr); +} + +/* Add an unsigned integer attribute value to a DIE. */ + +static inline void +add_AT_unsigned (die, attr_kind, unsigned_val) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; + register unsigned long unsigned_val; +{ + register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + + attr->dw_attr_next = NULL; + attr->dw_attr = attr_kind; + attr->dw_attr_val.val_class = dw_val_class_unsigned_const; + attr->dw_attr_val.v.val_unsigned = unsigned_val; + add_dwarf_attr (die, attr); +} + +/* Add an unsigned double integer attribute value to a DIE. */ + +static inline void +add_AT_long_long (die, attr_kind, val_hi, val_low) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; + register unsigned long val_hi; + register unsigned long val_low; +{ + register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + + attr->dw_attr_next = NULL; + attr->dw_attr = attr_kind; + attr->dw_attr_val.val_class = dw_val_class_long_long; + attr->dw_attr_val.v.val_long_long.hi = val_hi; + attr->dw_attr_val.v.val_long_long.low = val_low; + add_dwarf_attr (die, attr); +} + +/* Add a floating point attribute value to a DIE and return it. */ + +static inline void +add_AT_float (die, attr_kind, length, array) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; + register unsigned length; + register long *array; +{ + register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + + attr->dw_attr_next = NULL; + attr->dw_attr = attr_kind; + attr->dw_attr_val.val_class = dw_val_class_float; + attr->dw_attr_val.v.val_float.length = length; + attr->dw_attr_val.v.val_float.array = array; + add_dwarf_attr (die, attr); +} + +/* Add a string attribute value to a DIE. */ + +static inline void +add_AT_string (die, attr_kind, str) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; + register char *str; +{ + register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + + attr->dw_attr_next = NULL; + attr->dw_attr = attr_kind; + attr->dw_attr_val.val_class = dw_val_class_str; + attr->dw_attr_val.v.val_str = xstrdup (str); + add_dwarf_attr (die, attr); +} + +/* Add a DIE reference attribute value to a DIE. */ + +static inline void +add_AT_die_ref (die, attr_kind, targ_die) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; + register dw_die_ref targ_die; +{ + register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + + attr->dw_attr_next = NULL; + attr->dw_attr = attr_kind; + attr->dw_attr_val.val_class = dw_val_class_die_ref; + attr->dw_attr_val.v.val_die_ref = targ_die; + add_dwarf_attr (die, attr); +} + +/* Add an FDE reference attribute value to a DIE. */ + +static inline void +add_AT_fde_ref (die, attr_kind, targ_fde) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; + register unsigned targ_fde; +{ + register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + + attr->dw_attr_next = NULL; + attr->dw_attr = attr_kind; + attr->dw_attr_val.val_class = dw_val_class_fde_ref; + attr->dw_attr_val.v.val_fde_index = targ_fde; + add_dwarf_attr (die, attr); +} + +/* Add a location description attribute value to a DIE. */ + +static inline void +add_AT_loc (die, attr_kind, loc) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; + register dw_loc_descr_ref loc; +{ + register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + + attr->dw_attr_next = NULL; + attr->dw_attr = attr_kind; + attr->dw_attr_val.val_class = dw_val_class_loc; + attr->dw_attr_val.v.val_loc = loc; + add_dwarf_attr (die, attr); +} + +/* Add an address constant attribute value to a DIE. */ + +static inline void +add_AT_addr (die, attr_kind, addr) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; + char *addr; +{ + register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + + attr->dw_attr_next = NULL; + attr->dw_attr = attr_kind; + attr->dw_attr_val.val_class = dw_val_class_addr; + attr->dw_attr_val.v.val_addr = addr; + add_dwarf_attr (die, attr); +} + +/* Add a label identifier attribute value to a DIE. */ + +static inline void +add_AT_lbl_id (die, attr_kind, lbl_id) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; + register char *lbl_id; +{ + register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + + attr->dw_attr_next = NULL; + attr->dw_attr = attr_kind; + attr->dw_attr_val.val_class = dw_val_class_lbl_id; + attr->dw_attr_val.v.val_lbl_id = xstrdup (lbl_id); + add_dwarf_attr (die, attr); +} + +/* Add a section offset attribute value to a DIE. */ + +static inline void +add_AT_section_offset (die, attr_kind, section) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; + register char *section; +{ + register dw_attr_ref attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + + attr->dw_attr_next = NULL; + attr->dw_attr = attr_kind; + attr->dw_attr_val.val_class = dw_val_class_section_offset; + attr->dw_attr_val.v.val_section = section; + add_dwarf_attr (die, attr); + +} + +/* Test if die refers to an external subroutine. */ + +static inline int +is_extern_subr_die (die) + register dw_die_ref die; +{ + register dw_attr_ref a; + register int is_subr = FALSE; + register int is_extern = FALSE; + + if (die != NULL && die->die_tag == DW_TAG_subprogram) + { + is_subr = TRUE; + for (a = die->die_attr; a != NULL; a = a->dw_attr_next) + { + if (a->dw_attr == DW_AT_external + && a->dw_attr_val.val_class == dw_val_class_flag + && a->dw_attr_val.v.val_flag != 0) + { + is_extern = TRUE; + break; + } + } + } + + return is_subr && is_extern; +} + +/* Get the attribute of type attr_kind. */ + +static inline dw_attr_ref +get_AT (die, attr_kind) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; +{ + register dw_attr_ref a; + register dw_die_ref spec = NULL; + + if (die != NULL) + { + for (a = die->die_attr; a != NULL; a = a->dw_attr_next) + { + if (a->dw_attr == attr_kind) + return a; + + if (a->dw_attr == DW_AT_specification + || a->dw_attr == DW_AT_abstract_origin) + spec = a->dw_attr_val.v.val_die_ref; + } + + if (spec) + return get_AT (spec, attr_kind); + } + + return NULL; +} + +/* Return the "low pc" attribute value, typically associated with + a subprogram DIE. Return null if the "low pc" attribute is + either not prsent, or if it cannot be represented as an + assembler label identifier. */ + +static inline char * +get_AT_low_pc (die) + register dw_die_ref die; +{ + register dw_attr_ref a = get_AT (die, DW_AT_low_pc); + + if (a && a->dw_attr_val.val_class == dw_val_class_lbl_id) + return a->dw_attr_val.v.val_lbl_id; + + return NULL; +} + +/* Return the "high pc" attribute value, typically associated with + a subprogram DIE. Return null if the "high pc" attribute is + either not prsent, or if it cannot be represented as an + assembler label identifier. */ + +static inline char * +get_AT_hi_pc (die) + register dw_die_ref die; +{ + register dw_attr_ref a = get_AT (die, DW_AT_high_pc); + + if (a && a->dw_attr_val.val_class == dw_val_class_lbl_id) + return a->dw_attr_val.v.val_lbl_id; + + return NULL; +} + +/* Return the value of the string attribute designated by ATTR_KIND, or + NULL if it is not present. */ + +static inline char * +get_AT_string (die, attr_kind) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; +{ + register dw_attr_ref a = get_AT (die, attr_kind); + + if (a && a->dw_attr_val.val_class == dw_val_class_str) + return a->dw_attr_val.v.val_str; + + return NULL; +} + +/* Return the value of the flag attribute designated by ATTR_KIND, or -1 + if it is not present. */ + +static inline int +get_AT_flag (die, attr_kind) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; +{ + register dw_attr_ref a = get_AT (die, attr_kind); + + if (a && a->dw_attr_val.val_class == dw_val_class_flag) + return a->dw_attr_val.v.val_flag; + + return -1; +} + +/* Return the value of the unsigned attribute designated by ATTR_KIND, or 0 + if it is not present. */ + +static inline unsigned +get_AT_unsigned (die, attr_kind) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; +{ + register dw_attr_ref a = get_AT (die, attr_kind); + + if (a && a->dw_attr_val.val_class == dw_val_class_unsigned_const) + return a->dw_attr_val.v.val_unsigned; + + return 0; +} + +static inline int +is_c_family () +{ + register unsigned lang = get_AT_unsigned (comp_unit_die, DW_AT_language); + + return (lang == DW_LANG_C || lang == DW_LANG_C89 + || lang == DW_LANG_C_plus_plus); +} + +static inline int +is_fortran () +{ + register unsigned lang = get_AT_unsigned (comp_unit_die, DW_AT_language); + + return (lang == DW_LANG_Fortran77 || lang == DW_LANG_Fortran90); +} + +/* Remove the specified attribute if present. */ + +static inline void +remove_AT (die, attr_kind) + register dw_die_ref die; + register enum dwarf_attribute attr_kind; +{ + register dw_attr_ref a; + register dw_attr_ref removed = NULL;; + + if (die != NULL) + { + if (die->die_attr->dw_attr == attr_kind) + { + removed = die->die_attr; + if (die->die_attr_last == die->die_attr) + die->die_attr_last = NULL; + + die->die_attr = die->die_attr->dw_attr_next; + } + + else + for (a = die->die_attr; a->dw_attr_next != NULL; + a = a->dw_attr_next) + if (a->dw_attr_next->dw_attr == attr_kind) + { + removed = a->dw_attr_next; + if (die->die_attr_last == a->dw_attr_next) + die->die_attr_last = a; + + a->dw_attr_next = a->dw_attr_next->dw_attr_next; + break; + } + + if (removed != 0) + free (removed); + } +} + +/* Discard the children of this DIE. */ + +static inline void +remove_children (die) + register dw_die_ref die; +{ + register dw_die_ref child_die = die->die_child; + + die->die_child = NULL; + die->die_child_last = NULL; + + while (child_die != NULL) + { + register dw_die_ref tmp_die = child_die; + register dw_attr_ref a; + + child_die = child_die->die_sib; + + for (a = tmp_die->die_attr; a != NULL; ) + { + register dw_attr_ref tmp_a = a; + + a = a->dw_attr_next; + free (tmp_a); + } + + free (tmp_die); + } +} + +/* Add a child DIE below its parent. */ + +static inline void +add_child_die (die, child_die) + register dw_die_ref die; + register dw_die_ref child_die; +{ + if (die != NULL && child_die != NULL) + { + assert (die != child_die); + child_die->die_parent = die; + child_die->die_sib = NULL; + + if (die->die_child == NULL) + { + die->die_child = child_die; + die->die_child_last = child_die; + } + else + { + die->die_child_last->die_sib = child_die; + die->die_child_last = child_die; + } + } +} + +/* Return a pointer to a newly created DIE node. */ + +static inline dw_die_ref +new_die (tag_value, parent_die) + register enum dwarf_tag tag_value; + register dw_die_ref parent_die; +{ + register dw_die_ref die = (dw_die_ref) xmalloc (sizeof (die_node)); + + die->die_tag = tag_value; + die->die_abbrev = 0; + die->die_offset = 0; + die->die_child = NULL; + die->die_parent = NULL; + die->die_sib = NULL; + die->die_child_last = NULL; + die->die_attr = NULL; + die->die_attr_last = NULL; + + if (parent_die != NULL) + add_child_die (parent_die, die); + else + { + limbo_die_node *limbo_node; + + limbo_node = (limbo_die_node *) xmalloc (sizeof (limbo_die_node)); + limbo_node->die = die; + limbo_node->next = limbo_die_list; + limbo_die_list = limbo_node; + } + + return die; +} + +/* Return the DIE associated with the given type specifier. */ + +static inline dw_die_ref +lookup_type_die (type) + register tree type; +{ + return (dw_die_ref) TYPE_SYMTAB_POINTER (type); +} + +/* Equate a DIE to a given type specifier. */ + +static void +equate_type_number_to_die (type, type_die) + register tree type; + register dw_die_ref type_die; +{ + TYPE_SYMTAB_POINTER (type) = (char *) type_die; +} + +/* Return the DIE associated with a given declaration. */ + +static inline dw_die_ref +lookup_decl_die (decl) + register tree decl; +{ + register unsigned decl_id = DECL_UID (decl); + + return (decl_id < decl_die_table_in_use + ? decl_die_table[decl_id] : NULL); +} + +/* Equate a DIE to a particular declaration. */ + +static void +equate_decl_number_to_die (decl, decl_die) + register tree decl; + register dw_die_ref decl_die; +{ + register unsigned decl_id = DECL_UID (decl); + register unsigned i; + register unsigned num_allocated; + + if (decl_id >= decl_die_table_allocated) + { + num_allocated + = ((decl_id + 1 + DECL_DIE_TABLE_INCREMENT - 1) + / DECL_DIE_TABLE_INCREMENT) + * DECL_DIE_TABLE_INCREMENT; + + decl_die_table + = (dw_die_ref *) xrealloc (decl_die_table, + sizeof (dw_die_ref) * num_allocated); + + bzero ((char *) &decl_die_table[decl_die_table_allocated], + (num_allocated - decl_die_table_allocated) * sizeof (dw_die_ref)); + decl_die_table_allocated = num_allocated; + } + + if (decl_id >= decl_die_table_in_use) + decl_die_table_in_use = (decl_id + 1); + + decl_die_table[decl_id] = decl_die; +} + +/* Return a pointer to a newly allocated location description. Location + descriptions are simple expression terms that can be strung + together to form more complicated location (address) descriptions. */ + +static inline dw_loc_descr_ref +new_loc_descr (op, oprnd1, oprnd2) + register enum dwarf_location_atom op; + register unsigned long oprnd1; + register unsigned long oprnd2; +{ + register dw_loc_descr_ref descr + = (dw_loc_descr_ref) xmalloc (sizeof (dw_loc_descr_node)); + + descr->dw_loc_next = NULL; + descr->dw_loc_opc = op; + descr->dw_loc_oprnd1.val_class = dw_val_class_unsigned_const; + descr->dw_loc_oprnd1.v.val_unsigned = oprnd1; + descr->dw_loc_oprnd2.val_class = dw_val_class_unsigned_const; + descr->dw_loc_oprnd2.v.val_unsigned = oprnd2; + + return descr; +} + +/* Add a location description term to a location description expression. */ + +static inline void +add_loc_descr (list_head, descr) + register dw_loc_descr_ref *list_head; + register dw_loc_descr_ref descr; +{ + register dw_loc_descr_ref *d; + + /* Find the end of the chain. */ + for (d = list_head; (*d) != NULL; d = &(*d)->dw_loc_next) + ; + + *d = descr; +} + +/* Keep track of the number of spaces used to indent the + output of the debugging routines that print the structure of + the DIE internal representation. */ +static int print_indent; + +/* Indent the line the number of spaces given by print_indent. */ + +static inline void +print_spaces (outfile) + FILE *outfile; +{ + fprintf (outfile, "%*s", print_indent, ""); +} + +/* Print the information associated with a given DIE, and its children. + This routine is a debugging aid only. */ + +static void +print_die (die, outfile) + dw_die_ref die; + FILE *outfile; +{ + register dw_attr_ref a; + register dw_die_ref c; + + print_spaces (outfile); + fprintf (outfile, "DIE %4u: %s\n", + die->die_offset, dwarf_tag_name (die->die_tag)); + print_spaces (outfile); + fprintf (outfile, " abbrev id: %u", die->die_abbrev); + fprintf (outfile, " offset: %u\n", die->die_offset); + + for (a = die->die_attr; a != NULL; a = a->dw_attr_next) + { + print_spaces (outfile); + fprintf (outfile, " %s: ", dwarf_attr_name (a->dw_attr)); + + switch (a->dw_attr_val.val_class) + { + case dw_val_class_addr: + fprintf (outfile, "address"); + break; + case dw_val_class_loc: + fprintf (outfile, "location descriptor"); + break; + case dw_val_class_const: + fprintf (outfile, "%d", a->dw_attr_val.v.val_int); + break; + case dw_val_class_unsigned_const: + fprintf (outfile, "%u", a->dw_attr_val.v.val_unsigned); + break; + case dw_val_class_long_long: + fprintf (outfile, "constant (%u,%u)", + a->dw_attr_val.v.val_long_long.hi, + a->dw_attr_val.v.val_long_long.low); + break; + case dw_val_class_float: + fprintf (outfile, "floating-point constant"); + break; + case dw_val_class_flag: + fprintf (outfile, "%u", a->dw_attr_val.v.val_flag); + break; + case dw_val_class_die_ref: + if (a->dw_attr_val.v.val_die_ref != NULL) + fprintf (outfile, "die -> %u", + a->dw_attr_val.v.val_die_ref->die_offset); + else + fprintf (outfile, "die -> <null>"); + break; + case dw_val_class_lbl_id: + fprintf (outfile, "label: %s", a->dw_attr_val.v.val_lbl_id); + break; + case dw_val_class_section_offset: + fprintf (outfile, "section: %s", a->dw_attr_val.v.val_section); + break; + case dw_val_class_str: + if (a->dw_attr_val.v.val_str != NULL) + fprintf (outfile, "\"%s\"", a->dw_attr_val.v.val_str); + else + fprintf (outfile, "<null>"); + break; + default: + break; + } + + fprintf (outfile, "\n"); + } + + if (die->die_child != NULL) + { + print_indent += 4; + for (c = die->die_child; c != NULL; c = c->die_sib) + print_die (c, outfile); + + print_indent -= 4; + } +} + +/* Print the contents of the source code line number correspondence table. + This routine is a debugging aid only. */ + +static void +print_dwarf_line_table (outfile) + FILE *outfile; +{ + register unsigned i; + register dw_line_info_ref line_info; + + fprintf (outfile, "\n\nDWARF source line information\n"); + for (i = 1; i < line_info_table_in_use; ++i) + { + line_info = &line_info_table[i]; + fprintf (outfile, "%5d: ", i); + fprintf (outfile, "%-20s", file_table[line_info->dw_file_num]); + fprintf (outfile, "%6d", line_info->dw_line_num); + fprintf (outfile, "\n"); + } + + fprintf (outfile, "\n\n"); +} + +/* Print the information collected for a given DIE. */ + +void +debug_dwarf_die (die) + dw_die_ref die; +{ + print_die (die, stderr); +} + +/* Print all DWARF information collected for the compilation unit. + This routine is a debugging aid only. */ + +void +debug_dwarf () +{ + print_indent = 0; + print_die (comp_unit_die, stderr); + print_dwarf_line_table (stderr); +} + +/* Traverse the DIE, and add a sibling attribute if it may have the + effect of speeding up access to siblings. To save some space, + avoid generating sibling attributes for DIE's without children. */ + +static void +add_sibling_attributes(die) + register dw_die_ref die; +{ + register dw_die_ref c; + register dw_attr_ref attr; + if (die != comp_unit_die && die->die_child != NULL) + { + attr = (dw_attr_ref) xmalloc (sizeof (dw_attr_node)); + attr->dw_attr_next = NULL; + attr->dw_attr = DW_AT_sibling; + attr->dw_attr_val.val_class = dw_val_class_die_ref; + attr->dw_attr_val.v.val_die_ref = die->die_sib; + + /* Add the sibling link to the front of the attribute list. */ + attr->dw_attr_next = die->die_attr; + if (die->die_attr == NULL) + die->die_attr_last = attr; + + die->die_attr = attr; + } + + for (c = die->die_child; c != NULL; c = c->die_sib) + add_sibling_attributes (c); +} + +/* The format of each DIE (and its attribute value pairs) + is encoded in an abbreviation table. This routine builds the + abbreviation table and assigns a unique abbreviation id for + each abbreviation entry. The children of each die are visited + recursively. */ + +static void +build_abbrev_table (die) + register dw_die_ref die; +{ + register unsigned long abbrev_id; + register unsigned long n_alloc; + register dw_die_ref c; + register dw_attr_ref d_attr, a_attr; + for (abbrev_id = 1; abbrev_id < abbrev_die_table_in_use; ++abbrev_id) + { + register dw_die_ref abbrev = abbrev_die_table[abbrev_id]; + + if (abbrev->die_tag == die->die_tag) + { + if ((abbrev->die_child != NULL) == (die->die_child != NULL)) + { + a_attr = abbrev->die_attr; + d_attr = die->die_attr; + + while (a_attr != NULL && d_attr != NULL) + { + if ((a_attr->dw_attr != d_attr->dw_attr) + || (value_format (&a_attr->dw_attr_val) + != value_format (&d_attr->dw_attr_val))) + break; + + a_attr = a_attr->dw_attr_next; + d_attr = d_attr->dw_attr_next; + } + + if (a_attr == NULL && d_attr == NULL) + break; + } + } + } + + if (abbrev_id >= abbrev_die_table_in_use) + { + if (abbrev_die_table_in_use >= abbrev_die_table_allocated) + { + n_alloc = abbrev_die_table_allocated + ABBREV_DIE_TABLE_INCREMENT; + abbrev_die_table + = (dw_die_ref *) xrealloc (abbrev_die_table, + sizeof (dw_die_ref) * n_alloc); + + bzero ((char *) &abbrev_die_table[abbrev_die_table_allocated], + (n_alloc - abbrev_die_table_allocated) * sizeof (dw_die_ref)); + abbrev_die_table_allocated = n_alloc; + } + + ++abbrev_die_table_in_use; + abbrev_die_table[abbrev_id] = die; + } + + die->die_abbrev = abbrev_id; + for (c = die->die_child; c != NULL; c = c->die_sib) + build_abbrev_table (c); +} + +/* Return the size of a string, including the null byte. */ + +static unsigned long +size_of_string (str) + register char *str; +{ + register unsigned long size = 0; + register unsigned long slen = strlen (str); + register unsigned long i; + register unsigned c; + + for (i = 0; i < slen; ++i) + { + c = str[i]; + if (c == '\\') + ++i; + + size += 1; + } + + /* Null terminator. */ + size += 1; + return size; +} + +/* Return the size of a location descriptor. */ + +static unsigned long +size_of_loc_descr (loc) + register dw_loc_descr_ref loc; +{ + register unsigned long size = 1; + + switch (loc->dw_loc_opc) + { + case DW_OP_addr: + size += PTR_SIZE; + break; + case DW_OP_const1u: + case DW_OP_const1s: + size += 1; + break; + case DW_OP_const2u: + case DW_OP_const2s: + size += 2; + break; + case DW_OP_const4u: + case DW_OP_const4s: + size += 4; + break; + case DW_OP_const8u: + case DW_OP_const8s: + size += 8; + break; + case DW_OP_constu: + size += size_of_uleb128 (loc->dw_loc_oprnd1.v.val_unsigned); + break; + case DW_OP_consts: + size += size_of_sleb128 (loc->dw_loc_oprnd1.v.val_int); + break; + case DW_OP_pick: + size += 1; + break; + case DW_OP_plus_uconst: + size += size_of_uleb128 (loc->dw_loc_oprnd1.v.val_unsigned); + break; + case DW_OP_skip: + case DW_OP_bra: + size += 2; + break; + case DW_OP_breg0: + case DW_OP_breg1: + case DW_OP_breg2: + case DW_OP_breg3: + case DW_OP_breg4: + case DW_OP_breg5: + case DW_OP_breg6: + case DW_OP_breg7: + case DW_OP_breg8: + case DW_OP_breg9: + case DW_OP_breg10: + case DW_OP_breg11: + case DW_OP_breg12: + case DW_OP_breg13: + case DW_OP_breg14: + case DW_OP_breg15: + case DW_OP_breg16: + case DW_OP_breg17: + case DW_OP_breg18: + case DW_OP_breg19: + case DW_OP_breg20: + case DW_OP_breg21: + case DW_OP_breg22: + case DW_OP_breg23: + case DW_OP_breg24: + case DW_OP_breg25: + case DW_OP_breg26: + case DW_OP_breg27: + case DW_OP_breg28: + case DW_OP_breg29: + case DW_OP_breg30: + case DW_OP_breg31: + size += size_of_sleb128 (loc->dw_loc_oprnd1.v.val_int); + break; + case DW_OP_regx: + size += size_of_uleb128 (loc->dw_loc_oprnd1.v.val_unsigned); + break; + case DW_OP_fbreg: + size += size_of_sleb128 (loc->dw_loc_oprnd1.v.val_int); + break; + case DW_OP_bregx: + size += size_of_uleb128 (loc->dw_loc_oprnd1.v.val_unsigned); + size += size_of_sleb128 (loc->dw_loc_oprnd2.v.val_int); + break; + case DW_OP_piece: + size += size_of_uleb128 (loc->dw_loc_oprnd1.v.val_unsigned); + break; + case DW_OP_deref_size: + case DW_OP_xderef_size: + size += 1; + break; + default: + break; + } + + return size; +} + +/* Return the size of a series of location descriptors. */ + +static unsigned long +size_of_locs (loc) + register dw_loc_descr_ref loc; +{ + register unsigned long size = 0; + + for (; loc != NULL; loc = loc->dw_loc_next) + size += size_of_loc_descr (loc); + + return size; +} + +/* Return the power-of-two number of bytes necessary to represent VALUE. */ + +static int +constant_size (value) + long unsigned value; +{ + int log; + + if (value == 0) + log = 0; + else + log = floor_log2 (value); + + log = log / 8; + log = 1 << (floor_log2 (log) + 1); + + return log; +} + +/* Return the size of a DIE, as it is represented in the + .debug_info section. */ + +static unsigned long +size_of_die (die) + register dw_die_ref die; +{ + register unsigned long size = 0; + register dw_attr_ref a; + + size += size_of_uleb128 (die->die_abbrev); + for (a = die->die_attr; a != NULL; a = a->dw_attr_next) + { + switch (a->dw_attr_val.val_class) + { + case dw_val_class_addr: + size += PTR_SIZE; + break; + case dw_val_class_loc: + { + register unsigned long lsize + = size_of_locs (a->dw_attr_val.v.val_loc); + + /* Block length. */ + size += constant_size (lsize); + size += lsize; + } + break; + case dw_val_class_const: + size += 4; + break; + case dw_val_class_unsigned_const: + size += constant_size (a->dw_attr_val.v.val_unsigned); + break; + case dw_val_class_long_long: + size += 1 + 8; /* block */ + break; + case dw_val_class_float: + size += 1 + a->dw_attr_val.v.val_float.length * 4; /* block */ + break; + case dw_val_class_flag: + size += 1; + break; + case dw_val_class_die_ref: + size += DWARF_OFFSET_SIZE; + break; + case dw_val_class_fde_ref: + size += DWARF_OFFSET_SIZE; + break; + case dw_val_class_lbl_id: + size += PTR_SIZE; + break; + case dw_val_class_section_offset: + size += DWARF_OFFSET_SIZE; + break; + case dw_val_class_str: + size += size_of_string (a->dw_attr_val.v.val_str); + break; + default: + abort (); + } + } + + return size; +} + +/* Size the debugging information associated with a given DIE. + Visits the DIE's children recursively. Updates the global + variable next_die_offset, on each time through. Uses the + current value of next_die_offset to update the die_offset + field in each DIE. */ + +static void +calc_die_sizes (die) + dw_die_ref die; +{ + register dw_die_ref c; + die->die_offset = next_die_offset; + next_die_offset += size_of_die (die); + + for (c = die->die_child; c != NULL; c = c->die_sib) + calc_die_sizes (c); + + if (die->die_child != NULL) + /* Count the null byte used to terminate sibling lists. */ + next_die_offset += 1; +} + +/* Return the size of the line information prolog generated for the + compilation unit. */ + +static unsigned long +size_of_line_prolog () +{ + register unsigned long size; + register unsigned long ft_index; + + size = DWARF_LINE_PROLOG_HEADER_SIZE; + + /* Count the size of the table giving number of args for each + standard opcode. */ + size += DWARF_LINE_OPCODE_BASE - 1; + + /* Include directory table is empty (at present). Count only the + the null byte used to terminate the table. */ + size += 1; + + for (ft_index = 1; ft_index < file_table_in_use; ++ft_index) + { + /* File name entry. */ + size += size_of_string (file_table[ft_index]); + + /* Include directory index. */ + size += size_of_uleb128 (0); + + /* Modification time. */ + size += size_of_uleb128 (0); + + /* File length in bytes. */ + size += size_of_uleb128 (0); + } + + /* Count the file table terminator. */ + size += 1; + return size; +} + +/* Return the size of the line information generated for this + compilation unit. */ + +static unsigned long +size_of_line_info () +{ + register unsigned long size; + register unsigned long lt_index; + register unsigned long current_line; + register long line_offset; + register long line_delta; + register unsigned long current_file; + register unsigned long function; + unsigned long size_of_set_address; + + /* Size of a DW_LNE_set_address instruction. */ + size_of_set_address = 1 + size_of_uleb128 (1 + PTR_SIZE) + 1 + PTR_SIZE; + + /* Version number. */ + size = 2; + + /* Prolog length specifier. */ + size += DWARF_OFFSET_SIZE; + + /* Prolog. */ + size += size_of_line_prolog (); + + /* Set address register instruction. */ + size += size_of_set_address; + + current_file = 1; + current_line = 1; + for (lt_index = 1; lt_index < line_info_table_in_use; ++lt_index) + { + register dw_line_info_ref line_info; + + /* Advance pc instruction. */ + /* ??? See the DW_LNS_advance_pc comment in output_line_info. */ + if (0) + size += 1 + 2; + else + size += size_of_set_address; + + line_info = &line_info_table[lt_index]; + if (line_info->dw_file_num != current_file) + { + /* Set file number instruction. */ + size += 1; + current_file = line_info->dw_file_num; + size += size_of_uleb128 (current_file); + } + + if (line_info->dw_line_num != current_line) + { + line_offset = line_info->dw_line_num - current_line; + line_delta = line_offset - DWARF_LINE_BASE; + current_line = line_info->dw_line_num; + if (line_delta >= 0 && line_delta < (DWARF_LINE_RANGE - 1)) + /* 1-byte special line number instruction. */ + size += 1; + else + { + /* Advance line instruction. */ + size += 1; + size += size_of_sleb128 (line_offset); + /* Generate line entry instruction. */ + size += 1; + } + } + } + + /* Advance pc instruction. */ + if (0) + size += 1 + 2; + else + size += size_of_set_address; + + /* End of line number info. marker. */ + size += 1 + size_of_uleb128 (1) + 1; + + function = 0; + current_file = 1; + current_line = 1; + for (lt_index = 0; lt_index < separate_line_info_table_in_use; ) + { + register dw_separate_line_info_ref line_info + = &separate_line_info_table[lt_index]; + if (function != line_info->function) + { + function = line_info->function; + /* Set address register instruction. */ + size += size_of_set_address; + } + else + { + /* Advance pc instruction. */ + if (0) + size += 1 + 2; + else + size += size_of_set_address; + } + + if (line_info->dw_file_num != current_file) + { + /* Set file number instruction. */ + size += 1; + current_file = line_info->dw_file_num; + size += size_of_uleb128 (current_file); + } + + if (line_info->dw_line_num != current_line) + { + line_offset = line_info->dw_line_num - current_line; + line_delta = line_offset - DWARF_LINE_BASE; + current_line = line_info->dw_line_num; + if (line_delta >= 0 && line_delta < (DWARF_LINE_RANGE - 1)) + /* 1-byte special line number instruction. */ + size += 1; + else + { + /* Advance line instruction. */ + size += 1; + size += size_of_sleb128 (line_offset); + + /* Generate line entry instruction. */ + size += 1; + } + } + + ++lt_index; + + /* If we're done with a function, end its sequence. */ + if (lt_index == separate_line_info_table_in_use + || separate_line_info_table[lt_index].function != function) + { + current_file = 1; + current_line = 1; + + /* Advance pc instruction. */ + if (0) + size += 1 + 2; + else + size += size_of_set_address; + + /* End of line number info. marker. */ + size += 1 + size_of_uleb128 (1) + 1; + } + } + + return size; +} + +/* Return the size of the .debug_pubnames table generated for the + compilation unit. */ + +static unsigned long +size_of_pubnames () +{ + register unsigned long size; + register unsigned i; + + size = DWARF_PUBNAMES_HEADER_SIZE; + for (i = 0; i < pubname_table_in_use; ++i) + { + register pubname_ref p = &pubname_table[i]; + size += DWARF_OFFSET_SIZE + size_of_string (p->name); + } + + size += DWARF_OFFSET_SIZE; + return size; +} + +/* Return the size of the information in the .debug_aranges section. */ + +static unsigned long +size_of_aranges () +{ + register unsigned long size; + + size = DWARF_ARANGES_HEADER_SIZE; + + /* Count the address/length pair for this compilation unit. */ + size += 2 * PTR_SIZE; + size += 2 * PTR_SIZE * arange_table_in_use; + + /* Count the two zero words used to terminated the address range table. */ + size += 2 * PTR_SIZE; + return size; +} + +/* Select the encoding of an attribute value. */ + +static enum dwarf_form +value_format (v) + dw_val_ref v; +{ + switch (v->val_class) + { + case dw_val_class_addr: + return DW_FORM_addr; + case dw_val_class_loc: + switch (constant_size (size_of_locs (v->v.val_loc))) + { + case 1: + return DW_FORM_block1; + case 2: + return DW_FORM_block2; + default: + abort (); + } + case dw_val_class_const: + return DW_FORM_data4; + case dw_val_class_unsigned_const: + switch (constant_size (v->v.val_unsigned)) + { + case 1: + return DW_FORM_data1; + case 2: + return DW_FORM_data2; + case 4: + return DW_FORM_data4; + case 8: + return DW_FORM_data8; + default: + abort (); + } + case dw_val_class_long_long: + return DW_FORM_block1; + case dw_val_class_float: + return DW_FORM_block1; + case dw_val_class_flag: + return DW_FORM_flag; + case dw_val_class_die_ref: + return DW_FORM_ref; + case dw_val_class_fde_ref: + return DW_FORM_data; + case dw_val_class_lbl_id: + return DW_FORM_addr; + case dw_val_class_section_offset: + return DW_FORM_data; + case dw_val_class_str: + return DW_FORM_string; + default: + abort (); + } +} + +/* Output the encoding of an attribute value. */ + +static void +output_value_format (v) + dw_val_ref v; +{ + enum dwarf_form form = value_format (v); + + output_uleb128 (form); + if (flag_debug_asm) + fprintf (asm_out_file, " (%s)", dwarf_form_name (form)); + + fputc ('\n', asm_out_file); +} + +/* Output the .debug_abbrev section which defines the DIE abbreviation + table. */ + +static void +output_abbrev_section () +{ + unsigned long abbrev_id; + + dw_attr_ref a_attr; + for (abbrev_id = 1; abbrev_id < abbrev_die_table_in_use; ++abbrev_id) + { + register dw_die_ref abbrev = abbrev_die_table[abbrev_id]; + + output_uleb128 (abbrev_id); + if (flag_debug_asm) + fprintf (asm_out_file, " (abbrev code)"); + + fputc ('\n', asm_out_file); + output_uleb128 (abbrev->die_tag); + if (flag_debug_asm) + fprintf (asm_out_file, " (TAG: %s)", + dwarf_tag_name (abbrev->die_tag)); + + fputc ('\n', asm_out_file); + fprintf (asm_out_file, "\t%s\t0x%x", ASM_BYTE_OP, + abbrev->die_child != NULL ? DW_children_yes : DW_children_no); + + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s %s", + ASM_COMMENT_START, + (abbrev->die_child != NULL + ? "DW_children_yes" : "DW_children_no")); + + fputc ('\n', asm_out_file); + + for (a_attr = abbrev->die_attr; a_attr != NULL; + a_attr = a_attr->dw_attr_next) + { + output_uleb128 (a_attr->dw_attr); + if (flag_debug_asm) + fprintf (asm_out_file, " (%s)", + dwarf_attr_name (a_attr->dw_attr)); + + fputc ('\n', asm_out_file); + output_value_format (&a_attr->dw_attr_val); + } + + fprintf (asm_out_file, "\t%s\t0,0\n", ASM_BYTE_OP); + } +} + +/* Output location description stack opcode's operands (if any). */ + +static void +output_loc_operands (loc) + register dw_loc_descr_ref loc; +{ + register dw_val_ref val1 = &loc->dw_loc_oprnd1; + register dw_val_ref val2 = &loc->dw_loc_oprnd2; + + switch (loc->dw_loc_opc) + { + case DW_OP_addr: + ASM_OUTPUT_DWARF_ADDR_CONST (asm_out_file, val1->v.val_addr); + fputc ('\n', asm_out_file); + break; + case DW_OP_const1u: + case DW_OP_const1s: + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, val1->v.val_flag); + fputc ('\n', asm_out_file); + break; + case DW_OP_const2u: + case DW_OP_const2s: + ASM_OUTPUT_DWARF_DATA2 (asm_out_file, val1->v.val_int); + fputc ('\n', asm_out_file); + break; + case DW_OP_const4u: + case DW_OP_const4s: + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, val1->v.val_int); + fputc ('\n', asm_out_file); + break; + case DW_OP_const8u: + case DW_OP_const8s: + abort (); + fputc ('\n', asm_out_file); + break; + case DW_OP_constu: + output_uleb128 (val1->v.val_unsigned); + fputc ('\n', asm_out_file); + break; + case DW_OP_consts: + output_sleb128 (val1->v.val_int); + fputc ('\n', asm_out_file); + break; + case DW_OP_pick: + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, val1->v.val_int); + fputc ('\n', asm_out_file); + break; + case DW_OP_plus_uconst: + output_uleb128 (val1->v.val_unsigned); + fputc ('\n', asm_out_file); + break; + case DW_OP_skip: + case DW_OP_bra: + ASM_OUTPUT_DWARF_DATA2 (asm_out_file, val1->v.val_int); + fputc ('\n', asm_out_file); + break; + case DW_OP_breg0: + case DW_OP_breg1: + case DW_OP_breg2: + case DW_OP_breg3: + case DW_OP_breg4: + case DW_OP_breg5: + case DW_OP_breg6: + case DW_OP_breg7: + case DW_OP_breg8: + case DW_OP_breg9: + case DW_OP_breg10: + case DW_OP_breg11: + case DW_OP_breg12: + case DW_OP_breg13: + case DW_OP_breg14: + case DW_OP_breg15: + case DW_OP_breg16: + case DW_OP_breg17: + case DW_OP_breg18: + case DW_OP_breg19: + case DW_OP_breg20: + case DW_OP_breg21: + case DW_OP_breg22: + case DW_OP_breg23: + case DW_OP_breg24: + case DW_OP_breg25: + case DW_OP_breg26: + case DW_OP_breg27: + case DW_OP_breg28: + case DW_OP_breg29: + case DW_OP_breg30: + case DW_OP_breg31: + output_sleb128 (val1->v.val_int); + fputc ('\n', asm_out_file); + break; + case DW_OP_regx: + output_uleb128 (val1->v.val_unsigned); + fputc ('\n', asm_out_file); + break; + case DW_OP_fbreg: + output_sleb128 (val1->v.val_int); + fputc ('\n', asm_out_file); + break; + case DW_OP_bregx: + output_uleb128 (val1->v.val_unsigned); + fputc ('\n', asm_out_file); + output_sleb128 (val2->v.val_int); + fputc ('\n', asm_out_file); + break; + case DW_OP_piece: + output_uleb128 (val1->v.val_unsigned); + fputc ('\n', asm_out_file); + break; + case DW_OP_deref_size: + case DW_OP_xderef_size: + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, val1->v.val_flag); + fputc ('\n', asm_out_file); + break; + default: + break; + } +} + +/* Compute the offset of a sibling. */ + +static unsigned long +sibling_offset (die) + dw_die_ref die; +{ + unsigned long offset; + + if (die->die_child_last == NULL) + offset = die->die_offset + size_of_die (die); + else + offset = sibling_offset (die->die_child_last) + 1; + + return offset; +} + +/* Output the DIE and its attributes. Called recursively to generate + the definitions of each child DIE. */ + +static void +output_die (die) + register dw_die_ref die; +{ + register dw_attr_ref a; + register dw_die_ref c; + register unsigned long ref_offset; + register unsigned long size; + register dw_loc_descr_ref loc; + register int i; + + output_uleb128 (die->die_abbrev); + if (flag_debug_asm) + fprintf (asm_out_file, " (DIE (0x%x) %s)", + die->die_offset, dwarf_tag_name (die->die_tag)); + + fputc ('\n', asm_out_file); + + for (a = die->die_attr; a != NULL; a = a->dw_attr_next) + { + switch (a->dw_attr_val.val_class) + { + case dw_val_class_addr: + ASM_OUTPUT_DWARF_ADDR_CONST (asm_out_file, + a->dw_attr_val.v.val_addr); + break; + + case dw_val_class_loc: + size = size_of_locs (a->dw_attr_val.v.val_loc); + + /* Output the block length for this list of location operations. */ + switch (constant_size (size)) + { + case 1: + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, size); + break; + case 2: + ASM_OUTPUT_DWARF_DATA2 (asm_out_file, size); + break; + default: + abort (); + } + + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s %s", + ASM_COMMENT_START, dwarf_attr_name (a->dw_attr)); + + fputc ('\n', asm_out_file); + for (loc = a->dw_attr_val.v.val_loc; loc != NULL; + loc = loc->dw_loc_next) + { + /* Output the opcode. */ + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, loc->dw_loc_opc); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, + dwarf_stack_op_name (loc->dw_loc_opc)); + + fputc ('\n', asm_out_file); + + /* Output the operand(s) (if any). */ + output_loc_operands (loc); + } + break; + + case dw_val_class_const: + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, a->dw_attr_val.v.val_int); + break; + + case dw_val_class_unsigned_const: + switch (constant_size (a->dw_attr_val.v.val_unsigned)) + { + case 1: + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, + a->dw_attr_val.v.val_unsigned); + break; + case 2: + ASM_OUTPUT_DWARF_DATA2 (asm_out_file, + a->dw_attr_val.v.val_unsigned); + break; + case 4: + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, + a->dw_attr_val.v.val_unsigned); + break; + case 8: + ASM_OUTPUT_DWARF_DATA8 (asm_out_file, + a->dw_attr_val.v.val_long_long.hi, + a->dw_attr_val.v.val_long_long.low); + break; + default: + abort (); + } + break; + + case dw_val_class_long_long: + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 8); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s %s", + ASM_COMMENT_START, dwarf_attr_name (a->dw_attr)); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA8 (asm_out_file, + a->dw_attr_val.v.val_long_long.hi, + a->dw_attr_val.v.val_long_long.low); + + if (flag_debug_asm) + fprintf (asm_out_file, + "\t%s long long constant", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + break; + + case dw_val_class_float: + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, + a->dw_attr_val.v.val_float.length * 4); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s %s", + ASM_COMMENT_START, dwarf_attr_name (a->dw_attr)); + + fputc ('\n', asm_out_file); + for (i = 0; i < a->dw_attr_val.v.val_float.length; ++i) + { + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, + a->dw_attr_val.v.val_float.array[i]); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s fp constant word %d", + ASM_COMMENT_START, i); + + fputc ('\n', asm_out_file); + } + break; + + case dw_val_class_flag: + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, a->dw_attr_val.v.val_flag); + break; + + case dw_val_class_die_ref: + if (a->dw_attr_val.v.val_die_ref != NULL) + ref_offset = a->dw_attr_val.v.val_die_ref->die_offset; + else if (a->dw_attr == DW_AT_sibling) + ref_offset = sibling_offset(die); + else + abort (); + + ASM_OUTPUT_DWARF_DATA (asm_out_file, ref_offset); + break; + + case dw_val_class_fde_ref: + { + char l1[20]; + ASM_GENERATE_INTERNAL_LABEL + (l1, FDE_AFTER_SIZE_LABEL, a->dw_attr_val.v.val_fde_index * 2); + ASM_OUTPUT_DWARF_OFFSET (asm_out_file, l1); + fprintf (asm_out_file, " - %d", DWARF_OFFSET_SIZE); + } + break; + + case dw_val_class_lbl_id: + ASM_OUTPUT_DWARF_ADDR (asm_out_file, a->dw_attr_val.v.val_lbl_id); + break; + + case dw_val_class_section_offset: + ASM_OUTPUT_DWARF_OFFSET (asm_out_file, + stripattributes + (a->dw_attr_val.v.val_section)); + break; + + case dw_val_class_str: + if (flag_debug_asm) + ASM_OUTPUT_DWARF_STRING (asm_out_file, a->dw_attr_val.v.val_str); + else + ASM_OUTPUT_ASCII (asm_out_file, + a->dw_attr_val.v.val_str, + strlen (a->dw_attr_val.v.val_str) + 1); + break; + + default: + abort (); + } + + if (a->dw_attr_val.val_class != dw_val_class_loc + && a->dw_attr_val.val_class != dw_val_class_long_long + && a->dw_attr_val.val_class != dw_val_class_float) + { + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s %s", + ASM_COMMENT_START, dwarf_attr_name (a->dw_attr)); + + fputc ('\n', asm_out_file); + } + } + + for (c = die->die_child; c != NULL; c = c->die_sib) + output_die (c); + + if (die->die_child != NULL) + { + /* Add null byte to terminate sibling list. */ + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s end of children of DIE 0x%x", + ASM_COMMENT_START, die->die_offset); + + fputc ('\n', asm_out_file); + } +} + +/* Output the compilation unit that appears at the beginning of the + .debug_info section, and precedes the DIE descriptions. */ + +static void +output_compilation_unit_header () +{ + ASM_OUTPUT_DWARF_DATA (asm_out_file, next_die_offset - DWARF_OFFSET_SIZE); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Length of Compilation Unit Info.", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA2 (asm_out_file, DWARF_VERSION); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DWARF version number", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_OFFSET (asm_out_file, stripattributes (ABBREV_SECTION)); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Offset Into Abbrev. Section", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, PTR_SIZE); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Pointer Size (in bytes)", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); +} + +/* The DWARF2 pubname for a nested thingy looks like "A::f". The output + of decl_printable_name for C++ looks like "A::f(int)". Let's drop the + argument list, and maybe the scope. */ + +static char * +dwarf2_name (decl, scope) + tree decl; + int scope; +{ + return (*decl_printable_name) (decl, scope ? 1 : 0); +} + +/* Add a new entry to .debug_pubnames if appropriate. */ + +static void +add_pubname (decl, die) + tree decl; + dw_die_ref die; +{ + pubname_ref p; + + if (! TREE_PUBLIC (decl)) + return; + + if (pubname_table_in_use == pubname_table_allocated) + { + pubname_table_allocated += PUBNAME_TABLE_INCREMENT; + pubname_table = (pubname_ref) xrealloc + (pubname_table, pubname_table_allocated * sizeof (pubname_entry)); + } + + p = &pubname_table[pubname_table_in_use++]; + p->die = die; + + p->name = xstrdup (dwarf2_name (decl, 1)); +} + +/* Output the public names table used to speed up access to externally + visible names. For now, only generate entries for externally + visible procedures. */ + +static void +output_pubnames () +{ + register unsigned i; + register unsigned long pubnames_length = size_of_pubnames (); + + ASM_OUTPUT_DWARF_DATA (asm_out_file, pubnames_length); + + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Length of Public Names Info.", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA2 (asm_out_file, DWARF_VERSION); + + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DWARF Version", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_OFFSET (asm_out_file, stripattributes (DEBUG_INFO_SECTION)); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Offset of Compilation Unit Info.", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA (asm_out_file, next_die_offset); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Compilation Unit Length", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + for (i = 0; i < pubname_table_in_use; ++i) + { + register pubname_ref pub = &pubname_table[i]; + + ASM_OUTPUT_DWARF_DATA (asm_out_file, pub->die->die_offset); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DIE offset", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + + if (flag_debug_asm) + { + ASM_OUTPUT_DWARF_STRING (asm_out_file, pub->name); + fprintf (asm_out_file, "%s external name", ASM_COMMENT_START); + } + else + { + ASM_OUTPUT_ASCII (asm_out_file, pub->name, strlen (pub->name) + 1); + } + + fputc ('\n', asm_out_file); + } + + ASM_OUTPUT_DWARF_DATA (asm_out_file, 0); + fputc ('\n', asm_out_file); +} + +/* Add a new entry to .debug_aranges if appropriate. */ + +static void +add_arange (decl, die) + tree decl; + dw_die_ref die; +{ + if (! DECL_SECTION_NAME (decl)) + return; + + if (arange_table_in_use == arange_table_allocated) + { + arange_table_allocated += ARANGE_TABLE_INCREMENT; + arange_table + = (arange_ref) xrealloc (arange_table, + arange_table_allocated * sizeof (dw_die_ref)); + } + + arange_table[arange_table_in_use++] = die; +} + +/* Output the information that goes into the .debug_aranges table. + Namely, define the beginning and ending address range of the + text section generated for this compilation unit. */ + +static void +output_aranges () +{ + register unsigned i; + register unsigned long aranges_length = size_of_aranges (); + + ASM_OUTPUT_DWARF_DATA (asm_out_file, aranges_length); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Length of Address Ranges Info.", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA2 (asm_out_file, DWARF_VERSION); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DWARF Version", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_OFFSET (asm_out_file, stripattributes (DEBUG_INFO_SECTION)); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Offset of Compilation Unit Info.", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, PTR_SIZE); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Size of Address", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Size of Segment Descriptor", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, 4); + if (PTR_SIZE == 8) + fprintf (asm_out_file, ",0,0"); + + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Pad to %d byte boundary", + ASM_COMMENT_START, 2 * PTR_SIZE); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_ADDR (asm_out_file, TEXT_SECTION); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Address", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_ADDR_DELTA (asm_out_file, text_end_label, TEXT_SECTION); + if (flag_debug_asm) + fprintf (asm_out_file, "%s Length", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + for (i = 0; i < arange_table_in_use; ++i) + { + dw_die_ref a = arange_table[i]; + + if (a->die_tag == DW_TAG_subprogram) + ASM_OUTPUT_DWARF_ADDR (asm_out_file, get_AT_low_pc (a)); + else + { + char *name = get_AT_string (a, DW_AT_MIPS_linkage_name); + if (! name) + name = get_AT_string (a, DW_AT_name); + + ASM_OUTPUT_DWARF_ADDR (asm_out_file, name); + } + + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Address", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + if (a->die_tag == DW_TAG_subprogram) + ASM_OUTPUT_DWARF_ADDR_DELTA (asm_out_file, get_AT_hi_pc (a), + get_AT_low_pc (a)); + else + ASM_OUTPUT_DWARF_ADDR_DATA (asm_out_file, + get_AT_unsigned (a, DW_AT_byte_size)); + + if (flag_debug_asm) + fprintf (asm_out_file, "%s Length", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + } + + /* Output the terminator words. */ + ASM_OUTPUT_DWARF_ADDR_DATA (asm_out_file, 0); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_ADDR_DATA (asm_out_file, 0); + fputc ('\n', asm_out_file); +} + +/* Output the source line number correspondence information. This + information goes into the .debug_line section. + + If the format of this data changes, then the function size_of_line_info + must also be adjusted the same way. */ + +static void +output_line_info () +{ + char line_label[MAX_ARTIFICIAL_LABEL_BYTES]; + char prev_line_label[MAX_ARTIFICIAL_LABEL_BYTES]; + register unsigned opc; + register unsigned n_op_args; + register unsigned long ft_index; + register unsigned long lt_index; + register unsigned long current_line; + register long line_offset; + register long line_delta; + register unsigned long current_file; + register unsigned long function; + + ASM_OUTPUT_DWARF_DATA (asm_out_file, size_of_line_info ()); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Length of Source Line Info.", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA2 (asm_out_file, DWARF_VERSION); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DWARF Version", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA (asm_out_file, size_of_line_prolog ()); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Prolog Length", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DWARF_LINE_MIN_INSTR_LENGTH); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Minimum Instruction Length", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DWARF_LINE_DEFAULT_IS_STMT_START); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Default is_stmt_start flag", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + fprintf (asm_out_file, "\t%s\t%d", ASM_BYTE_OP, DWARF_LINE_BASE); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Line Base Value (Special Opcodes)", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + fprintf (asm_out_file, "\t%s\t%u", ASM_BYTE_OP, DWARF_LINE_RANGE); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Line Range Value (Special Opcodes)", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + fprintf (asm_out_file, "\t%s\t%u", ASM_BYTE_OP, DWARF_LINE_OPCODE_BASE); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s Special Opcode Base", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + for (opc = 1; opc < DWARF_LINE_OPCODE_BASE; ++opc) + { + switch (opc) + { + case DW_LNS_advance_pc: + case DW_LNS_advance_line: + case DW_LNS_set_file: + case DW_LNS_set_column: + case DW_LNS_fixed_advance_pc: + n_op_args = 1; + break; + default: + n_op_args = 0; + break; + } + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, n_op_args); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s opcode: 0x%x has %d args", + ASM_COMMENT_START, opc, n_op_args); + fputc ('\n', asm_out_file); + } + + if (flag_debug_asm) + fprintf (asm_out_file, "%s Include Directory Table\n", ASM_COMMENT_START); + + /* Include directory table is empty, at present */ + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + fputc ('\n', asm_out_file); + if (flag_debug_asm) + fprintf (asm_out_file, "%s File Name Table\n", ASM_COMMENT_START); + + for (ft_index = 1; ft_index < file_table_in_use; ++ft_index) + { + if (flag_debug_asm) + { + ASM_OUTPUT_DWARF_STRING (asm_out_file, file_table[ft_index]); + fprintf (asm_out_file, "%s File Entry: 0x%x", + ASM_COMMENT_START, ft_index); + } + else + { + ASM_OUTPUT_ASCII (asm_out_file, + file_table[ft_index], + strlen (file_table[ft_index]) + 1); + } + + fputc ('\n', asm_out_file); + + /* Include directory index */ + output_uleb128 (0); + fputc ('\n', asm_out_file); + + /* Modification time */ + output_uleb128 (0); + fputc ('\n', asm_out_file); + + /* File length in bytes */ + output_uleb128 (0); + fputc ('\n', asm_out_file); + } + + /* Terminate the file name table */ + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + fputc ('\n', asm_out_file); + + /* Set the address register to the first location in the text section */ + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNE_set_address", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + output_uleb128 (1 + PTR_SIZE); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNE_set_address); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_ADDR (asm_out_file, TEXT_SECTION); + fputc ('\n', asm_out_file); + + /* Generate the line number to PC correspondence table, encoded as + a series of state machine operations. */ + current_file = 1; + current_line = 1; + strcpy (prev_line_label, TEXT_SECTION); + for (lt_index = 1; lt_index < line_info_table_in_use; ++lt_index) + { + register dw_line_info_ref line_info; + + /* Emit debug info for the address of the current line, choosing + the encoding that uses the least amount of space. */ + /* ??? Unfortunately, we have little choice here currently, and must + always use the most general form. Gcc does not know the address + delta itself, so we can't use DW_LNS_advance_pc. There are no known + dwarf2 aware assemblers at this time, so we can't use any special + pseudo ops that would allow the assembler to optimally encode this for + us. Many ports do have length attributes which will give an upper + bound on the address range. We could perhaps use length attributes + to determine when it is safe to use DW_LNS_fixed_advance_pc. */ + ASM_GENERATE_INTERNAL_LABEL (line_label, LINE_CODE_LABEL, lt_index); + if (0) + { + /* This can handle deltas up to 0xffff. This takes 3 bytes. */ + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNS_fixed_advance_pc); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNS_fixed_advance_pc", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DELTA2 (asm_out_file, line_label, prev_line_label); + fputc ('\n', asm_out_file); + } + else + { + /* This can handle any delta. This takes 4+PTR_SIZE bytes. */ + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNE_set_address", + ASM_COMMENT_START); + fputc ('\n', asm_out_file); + output_uleb128 (1 + PTR_SIZE); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNE_set_address); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_ADDR (asm_out_file, line_label); + fputc ('\n', asm_out_file); + } + strcpy (prev_line_label, line_label); + + /* Emit debug info for the source file of the current line, if + different from the previous line. */ + line_info = &line_info_table[lt_index]; + if (line_info->dw_file_num != current_file) + { + current_file = line_info->dw_file_num; + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNS_set_file); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNS_set_file", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + output_uleb128 (current_file); + if (flag_debug_asm) + fprintf (asm_out_file, " (\"%s\")", file_table[current_file]); + + fputc ('\n', asm_out_file); + } + + /* Emit debug info for the current line number, choosing the encoding + that uses the least amount of space. */ + line_offset = line_info->dw_line_num - current_line; + line_delta = line_offset - DWARF_LINE_BASE; + current_line = line_info->dw_line_num; + if (line_delta >= 0 && line_delta < (DWARF_LINE_RANGE - 1)) + { + /* This can handle deltas from -10 to 234, using the current + definitions of DWARF_LINE_BASE and DWARF_LINE_RANGE. This + takes 1 byte. */ + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, + DWARF_LINE_OPCODE_BASE + line_delta); + if (flag_debug_asm) + fprintf (asm_out_file, + "\t%s line %d", ASM_COMMENT_START, current_line); + + fputc ('\n', asm_out_file); + } + else + { + /* This can handle any delta. This takes at least 4 bytes, depending + on the value being encoded. */ + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNS_advance_line); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s advance to line %d", + ASM_COMMENT_START, current_line); + + fputc ('\n', asm_out_file); + output_sleb128 (line_offset); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNS_copy); + fputc ('\n', asm_out_file); + } + } + + /* Emit debug info for the address of the end of the function. */ + if (0) + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNS_fixed_advance_pc); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNS_fixed_advance_pc", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DELTA2 (asm_out_file, text_end_label, prev_line_label); + fputc ('\n', asm_out_file); + } + else + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNE_set_address", ASM_COMMENT_START); + fputc ('\n', asm_out_file); + output_uleb128 (1 + PTR_SIZE); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNE_set_address); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_ADDR (asm_out_file, text_end_label); + fputc ('\n', asm_out_file); + } + + /* Output the marker for the end of the line number info. */ + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNE_end_sequence", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + output_uleb128 (1); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNE_end_sequence); + fputc ('\n', asm_out_file); + + function = 0; + current_file = 1; + current_line = 1; + for (lt_index = 0; lt_index < separate_line_info_table_in_use; ) + { + register dw_separate_line_info_ref line_info + = &separate_line_info_table[lt_index]; + + /* Emit debug info for the address of the current line. If this is + a new function, or the first line of a function, then we need + to handle it differently. */ + ASM_GENERATE_INTERNAL_LABEL (line_label, SEPARATE_LINE_CODE_LABEL, + lt_index); + if (function != line_info->function) + { + function = line_info->function; + + /* Set the address register to the first line in the function */ + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNE_set_address", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + output_uleb128 (1 + PTR_SIZE); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNE_set_address); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_ADDR (asm_out_file, line_label); + fputc ('\n', asm_out_file); + } + else + { + /* ??? See the DW_LNS_advance_pc comment above. */ + if (0) + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNS_fixed_advance_pc); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNS_fixed_advance_pc", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DELTA2 (asm_out_file, line_label, + prev_line_label); + fputc ('\n', asm_out_file); + } + else + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNE_set_address", + ASM_COMMENT_START); + fputc ('\n', asm_out_file); + output_uleb128 (1 + PTR_SIZE); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNE_set_address); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_ADDR (asm_out_file, line_label); + fputc ('\n', asm_out_file); + } + } + strcpy (prev_line_label, line_label); + + /* Emit debug info for the source file of the current line, if + different from the previous line. */ + if (line_info->dw_file_num != current_file) + { + current_file = line_info->dw_file_num; + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNS_set_file); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNS_set_file", ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + output_uleb128 (current_file); + if (flag_debug_asm) + fprintf (asm_out_file, " (\"%s\")", file_table[current_file]); + + fputc ('\n', asm_out_file); + } + + /* Emit debug info for the current line number, choosing the encoding + that uses the least amount of space. */ + if (line_info->dw_line_num != current_line) + { + line_offset = line_info->dw_line_num - current_line; + line_delta = line_offset - DWARF_LINE_BASE; + current_line = line_info->dw_line_num; + if (line_delta >= 0 && line_delta < (DWARF_LINE_RANGE - 1)) + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, + DWARF_LINE_OPCODE_BASE + line_delta); + if (flag_debug_asm) + fprintf (asm_out_file, + "\t%s line %d", ASM_COMMENT_START, current_line); + + fputc ('\n', asm_out_file); + } + else + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNS_advance_line); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s advance to line %d", + ASM_COMMENT_START, current_line); + + fputc ('\n', asm_out_file); + output_sleb128 (line_offset); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNS_copy); + fputc ('\n', asm_out_file); + } + } + + ++lt_index; + + /* If we're done with a function, end its sequence. */ + if (lt_index == separate_line_info_table_in_use + || separate_line_info_table[lt_index].function != function) + { + current_file = 1; + current_line = 1; + + /* Emit debug info for the address of the end of the function. */ + ASM_GENERATE_INTERNAL_LABEL (line_label, FUNC_END_LABEL, function); + if (0) + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNS_fixed_advance_pc); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNS_fixed_advance_pc", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DELTA2 (asm_out_file, line_label, + prev_line_label); + fputc ('\n', asm_out_file); + } + else + { + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNE_set_address", + ASM_COMMENT_START); + fputc ('\n', asm_out_file); + output_uleb128 (1 + PTR_SIZE); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNE_set_address); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_ADDR (asm_out_file, line_label); + fputc ('\n', asm_out_file); + } + + /* Output the marker for the end of this sequence. */ + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, 0); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s DW_LNE_end_sequence", + ASM_COMMENT_START); + + fputc ('\n', asm_out_file); + output_uleb128 (1); + fputc ('\n', asm_out_file); + ASM_OUTPUT_DWARF_DATA1 (asm_out_file, DW_LNE_end_sequence); + fputc ('\n', asm_out_file); + } + } +} + +/* Given a pointer to a BLOCK node return non-zero if (and only if) the node + in question represents the outermost pair of curly braces (i.e. the "body + block") of a function or method. + + For any BLOCK node representing a "body block" of a function or method, the + BLOCK_SUPERCONTEXT of the node will point to another BLOCK node which + represents the outermost (function) scope for the function or method (i.e. + the one which includes the formal parameters). The BLOCK_SUPERCONTEXT of + *that* node in turn will point to the relevant FUNCTION_DECL node. */ + +static inline int +is_body_block (stmt) + register tree stmt; +{ + if (TREE_CODE (stmt) == BLOCK) + { + register tree parent = BLOCK_SUPERCONTEXT (stmt); + + if (TREE_CODE (parent) == BLOCK) + { + register tree grandparent = BLOCK_SUPERCONTEXT (parent); + + if (TREE_CODE (grandparent) == FUNCTION_DECL) + return 1; + } + } + + return 0; +} + +/* Given a pointer to a tree node for some base type, return a pointer to + a DIE that describes the given type. + + This routine must only be called for GCC type nodes that correspond to + Dwarf base (fundamental) types. */ + +static dw_die_ref +base_type_die (type) + register tree type; +{ + register dw_die_ref base_type_result; + register char *type_name; + register enum dwarf_type encoding; + register tree name = TYPE_NAME (type); + + if (TREE_CODE (type) == ERROR_MARK + || TREE_CODE (type) == VOID_TYPE) + return 0; + + if (TREE_CODE (name) == TYPE_DECL) + name = DECL_NAME (name); + type_name = IDENTIFIER_POINTER (name); + + switch (TREE_CODE (type)) + { + case INTEGER_TYPE: + /* Carefully distinguish the C character types, without messing + up if the language is not C. Note that we check only for the names + that contain spaces; other names might occur by coincidence in other + languages. */ + if (! (TYPE_PRECISION (type) == CHAR_TYPE_SIZE + && (type == char_type_node + || ! strcmp (type_name, "signed char") + || ! strcmp (type_name, "unsigned char")))) + { + if (TREE_UNSIGNED (type)) + encoding = DW_ATE_unsigned; + else + encoding = DW_ATE_signed; + break; + } + /* else fall through */ + + case CHAR_TYPE: + /* GNU Pascal/Ada CHAR type. Not used in C. */ + if (TREE_UNSIGNED (type)) + encoding = DW_ATE_unsigned_char; + else + encoding = DW_ATE_signed_char; + break; + + case REAL_TYPE: + encoding = DW_ATE_float; + break; + + case COMPLEX_TYPE: + encoding = DW_ATE_complex_float; + break; + + case BOOLEAN_TYPE: + /* GNU FORTRAN/Ada/C++ BOOLEAN type. */ + encoding = DW_ATE_boolean; + break; + + default: + abort (); /* No other TREE_CODEs are Dwarf fundamental types. */ + } + + base_type_result = new_die (DW_TAG_base_type, comp_unit_die); + add_AT_string (base_type_result, DW_AT_name, type_name); + add_AT_unsigned (base_type_result, DW_AT_byte_size, + TYPE_PRECISION (type) / BITS_PER_UNIT); + add_AT_unsigned (base_type_result, DW_AT_encoding, encoding); + + return base_type_result; +} + +/* Given a pointer to an arbitrary ..._TYPE tree node, return a pointer to + the Dwarf "root" type for the given input type. The Dwarf "root" type of + a given type is generally the same as the given type, except that if the + given type is a pointer or reference type, then the root type of the given + type is the root type of the "basis" type for the pointer or reference + type. (This definition of the "root" type is recursive.) Also, the root + type of a `const' qualified type or a `volatile' qualified type is the + root type of the given type without the qualifiers. */ + +static tree +root_type (type) + register tree type; +{ + if (TREE_CODE (type) == ERROR_MARK) + return error_mark_node; + + switch (TREE_CODE (type)) + { + case ERROR_MARK: + return error_mark_node; + + case POINTER_TYPE: + case REFERENCE_TYPE: + return type_main_variant (root_type (TREE_TYPE (type))); + + default: + return type_main_variant (type); + } +} + +/* Given a pointer to an arbitrary ..._TYPE tree node, return non-zero if the + given input type is a Dwarf "fundamental" type. Otherwise return null. */ + +static inline int +is_base_type (type) + register tree type; +{ + switch (TREE_CODE (type)) + { + case ERROR_MARK: + case VOID_TYPE: + case INTEGER_TYPE: + case REAL_TYPE: + case COMPLEX_TYPE: + case BOOLEAN_TYPE: + case CHAR_TYPE: + return 1; + + case SET_TYPE: + case ARRAY_TYPE: + case RECORD_TYPE: + case UNION_TYPE: + case QUAL_UNION_TYPE: + case ENUMERAL_TYPE: + case FUNCTION_TYPE: + case METHOD_TYPE: + case POINTER_TYPE: + case REFERENCE_TYPE: + case FILE_TYPE: + case OFFSET_TYPE: + case LANG_TYPE: + return 0; + + default: + abort (); + } + + return 0; +} + +/* Given a pointer to an arbitrary ..._TYPE tree node, return a debugging + entry that chains various modifiers in front of the given type. */ + +static dw_die_ref +modified_type_die (type, is_const_type, is_volatile_type, context_die) + register tree type; + register int is_const_type; + register int is_volatile_type; + register dw_die_ref context_die; +{ + register enum tree_code code = TREE_CODE (type); + register dw_die_ref mod_type_die = NULL; + register dw_die_ref sub_die = NULL; + register tree item_type = NULL; + + if (code != ERROR_MARK) + { + type = build_type_variant (type, is_const_type, is_volatile_type); + + mod_type_die = lookup_type_die (type); + if (mod_type_die) + return mod_type_die; + + /* Handle C typedef types. */ + if (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL + && DECL_ORIGINAL_TYPE (TYPE_NAME (type))) + { + tree dtype = TREE_TYPE (TYPE_NAME (type)); + if (type == dtype) + { + /* For a named type, use the typedef. */ + gen_type_die (type, context_die); + mod_type_die = lookup_type_die (type); + } + + else if (is_const_type < TYPE_READONLY (dtype) + || is_volatile_type < TYPE_VOLATILE (dtype)) + /* cv-unqualified version of named type. Just use the unnamed + type to which it refers. */ + mod_type_die + = modified_type_die (DECL_ORIGINAL_TYPE (TYPE_NAME (type)), + is_const_type, is_volatile_type, + context_die); + /* Else cv-qualified version of named type; fall through. */ + } + + if (mod_type_die) + /* OK */; + else if (is_const_type) + { + mod_type_die = new_die (DW_TAG_const_type, comp_unit_die); + sub_die = modified_type_die (type, 0, is_volatile_type, context_die); + } + else if (is_volatile_type) + { + mod_type_die = new_die (DW_TAG_volatile_type, comp_unit_die); + sub_die = modified_type_die (type, 0, 0, context_die); + } + else if (code == POINTER_TYPE) + { + mod_type_die = new_die (DW_TAG_pointer_type, comp_unit_die); + add_AT_unsigned (mod_type_die, DW_AT_byte_size, PTR_SIZE); +#if 0 + add_AT_unsigned (mod_type_die, DW_AT_address_class, 0); +#endif + item_type = TREE_TYPE (type); + } + else if (code == REFERENCE_TYPE) + { + mod_type_die = new_die (DW_TAG_reference_type, comp_unit_die); + add_AT_unsigned (mod_type_die, DW_AT_byte_size, PTR_SIZE); +#if 0 + add_AT_unsigned (mod_type_die, DW_AT_address_class, 0); +#endif + item_type = TREE_TYPE (type); + } + else if (is_base_type (type)) + mod_type_die = base_type_die (type); + else + { + gen_type_die (type, context_die); + + /* We have to get the type_main_variant here (and pass that to the + `lookup_type_die' routine) because the ..._TYPE node we have + might simply be a *copy* of some original type node (where the + copy was created to help us keep track of typedef names) and + that copy might have a different TYPE_UID from the original + ..._TYPE node. */ + mod_type_die = lookup_type_die (type_main_variant (type)); + assert (mod_type_die != NULL); + } + } + + equate_type_number_to_die (type, mod_type_die); + if (item_type) + /* We must do this after the equate_type_number_to_die call, in case + this is a recursive type. This ensures that the modified_type_die + recursion will terminate even if the type is recursive. Recursive + types are possible in Ada. */ + sub_die = modified_type_die (item_type, + TYPE_READONLY (item_type), + TYPE_VOLATILE (item_type), + context_die); + + if (sub_die != NULL) + add_AT_die_ref (mod_type_die, DW_AT_type, sub_die); + + return mod_type_die; +} + +/* Given a pointer to an arbitrary ..._TYPE tree node, return true if it is + an enumerated type. */ + +static inline int +type_is_enum (type) + register tree type; +{ + return TREE_CODE (type) == ENUMERAL_TYPE; +} + +/* Return a location descriptor that designates a machine register. */ + +static dw_loc_descr_ref +reg_loc_descriptor (rtl) + register rtx rtl; +{ + register dw_loc_descr_ref loc_result = NULL; + register unsigned reg = reg_number (rtl); + + if (reg >= 0 && reg <= 31) + loc_result = new_loc_descr (DW_OP_reg0 + reg, 0, 0); + else + loc_result = new_loc_descr (DW_OP_regx, reg, 0); + + return loc_result; +} + +/* Return a location descriptor that designates a base+offset location. */ + +static dw_loc_descr_ref +based_loc_descr (reg, offset) + unsigned reg; + long int offset; +{ + register dw_loc_descr_ref loc_result; + /* For the "frame base", we use the frame pointer or stack pointer + registers, since the RTL for local variables is relative to one of + them. */ + register unsigned fp_reg = DBX_REGISTER_NUMBER (frame_pointer_needed + ? HARD_FRAME_POINTER_REGNUM + : STACK_POINTER_REGNUM); + + if (reg == fp_reg) + loc_result = new_loc_descr (DW_OP_fbreg, offset, 0); + else if (reg >= 0 && reg <= 31) + loc_result = new_loc_descr (DW_OP_breg0 + reg, offset, 0); + else + loc_result = new_loc_descr (DW_OP_bregx, reg, offset); + + return loc_result; +} + +/* Return true if this RTL expression describes a base+offset calculation. */ + +static inline int +is_based_loc (rtl) + register rtx rtl; +{ + return (GET_CODE (rtl) == PLUS + && ((GET_CODE (XEXP (rtl, 0)) == REG + && GET_CODE (XEXP (rtl, 1)) == CONST_INT))); +} + +/* The following routine converts the RTL for a variable or parameter + (resident in memory) into an equivalent Dwarf representation of a + mechanism for getting the address of that same variable onto the top of a + hypothetical "address evaluation" stack. + + When creating memory location descriptors, we are effectively transforming + the RTL for a memory-resident object into its Dwarf postfix expression + equivalent. This routine recursively descends an RTL tree, turning + it into Dwarf postfix code as it goes. */ + +static dw_loc_descr_ref +mem_loc_descriptor (rtl) + register rtx rtl; +{ + dw_loc_descr_ref mem_loc_result = NULL; + /* Note that for a dynamically sized array, the location we will generate a + description of here will be the lowest numbered location which is + actually within the array. That's *not* necessarily the same as the + zeroth element of the array. */ + + switch (GET_CODE (rtl)) + { + case SUBREG: + /* The case of a subreg may arise when we have a local (register) + variable or a formal (register) parameter which doesn't quite fill + up an entire register. For now, just assume that it is + legitimate to make the Dwarf info refer to the whole register which + contains the given subreg. */ + rtl = XEXP (rtl, 0); + + /* ... fall through ... */ + + case REG: + /* Whenever a register number forms a part of the description of the + method for calculating the (dynamic) address of a memory resident + object, DWARF rules require the register number be referred to as + a "base register". This distinction is not based in any way upon + what category of register the hardware believes the given register + belongs to. This is strictly DWARF terminology we're dealing with + here. Note that in cases where the location of a memory-resident + data object could be expressed as: OP_ADD (OP_BASEREG (basereg), + OP_CONST (0)) the actual DWARF location descriptor that we generate + may just be OP_BASEREG (basereg). This may look deceptively like + the object in question was allocated to a register (rather than in + memory) so DWARF consumers need to be aware of the subtle + distinction between OP_REG and OP_BASEREG. */ + mem_loc_result = based_loc_descr (reg_number (rtl), 0); + break; + + case MEM: + mem_loc_result = mem_loc_descriptor (XEXP (rtl, 0)); + add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_deref, 0, 0)); + break; + + case CONST: + case SYMBOL_REF: + mem_loc_result = new_loc_descr (DW_OP_addr, 0, 0); + mem_loc_result->dw_loc_oprnd1.val_class = dw_val_class_addr; + mem_loc_result->dw_loc_oprnd1.v.val_addr = addr_to_string (rtl); + break; + + case PLUS: + if (is_based_loc (rtl)) + mem_loc_result = based_loc_descr (reg_number (XEXP (rtl, 0)), + INTVAL (XEXP (rtl, 1))); + else + { + add_loc_descr (&mem_loc_result, mem_loc_descriptor (XEXP (rtl, 0))); + add_loc_descr (&mem_loc_result, mem_loc_descriptor (XEXP (rtl, 1))); + add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_plus, 0, 0)); + } + break; + + case MULT: + /* If a pseudo-reg is optimized away, it is possible for it to + be replaced with a MEM containing a multiply. */ + add_loc_descr (&mem_loc_result, mem_loc_descriptor (XEXP (rtl, 0))); + add_loc_descr (&mem_loc_result, mem_loc_descriptor (XEXP (rtl, 1))); + add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_mul, 0, 0)); + break; + + case CONST_INT: + mem_loc_result = new_loc_descr (DW_OP_constu, INTVAL (rtl), 0); + break; + + default: + abort (); + } + + return mem_loc_result; +} + +/* Return a descriptor that describes the concatenation of two locations. + This is typically a complex variable. */ + +static dw_loc_descr_ref +concat_loc_descriptor (x0, x1) + register rtx x0, x1; +{ + dw_loc_descr_ref cc_loc_result = NULL; + + if (!is_pseudo_reg (x0) + && (GET_CODE (x0) != MEM || !is_pseudo_reg (XEXP (x0, 0)))) + add_loc_descr (&cc_loc_result, loc_descriptor (x0)); + add_loc_descr (&cc_loc_result, + new_loc_descr (DW_OP_piece, GET_MODE_SIZE (GET_MODE (x0)), 0)); + + if (!is_pseudo_reg (x1) + && (GET_CODE (x1) != MEM || !is_pseudo_reg (XEXP (x1, 0)))) + add_loc_descr (&cc_loc_result, loc_descriptor (x1)); + add_loc_descr (&cc_loc_result, + new_loc_descr (DW_OP_piece, GET_MODE_SIZE (GET_MODE (x1)), 0)); + + return cc_loc_result; +} + +/* Output a proper Dwarf location descriptor for a variable or parameter + which is either allocated in a register or in a memory location. For a + register, we just generate an OP_REG and the register number. For a + memory location we provide a Dwarf postfix expression describing how to + generate the (dynamic) address of the object onto the address stack. */ + +static dw_loc_descr_ref +loc_descriptor (rtl) + register rtx rtl; +{ + dw_loc_descr_ref loc_result = NULL; + switch (GET_CODE (rtl)) + { + case SUBREG: + /* The case of a subreg may arise when we have a local (register) + variable or a formal (register) parameter which doesn't quite fill + up an entire register. For now, just assume that it is + legitimate to make the Dwarf info refer to the whole register which + contains the given subreg. */ + rtl = XEXP (rtl, 0); + + /* ... fall through ... */ + + case REG: + loc_result = reg_loc_descriptor (rtl); + break; + + case MEM: + loc_result = mem_loc_descriptor (XEXP (rtl, 0)); + break; + + case CONCAT: + loc_result = concat_loc_descriptor (XEXP (rtl, 0), XEXP (rtl, 1)); + break; + + default: + abort (); + } + + return loc_result; +} + +/* Given an unsigned value, round it up to the lowest multiple of `boundary' + which is not less than the value itself. */ + +static inline unsigned +ceiling (value, boundary) + register unsigned value; + register unsigned boundary; +{ + return (((value + boundary - 1) / boundary) * boundary); +} + +/* Given a pointer to what is assumed to be a FIELD_DECL node, return a + pointer to the declared type for the relevant field variable, or return + `integer_type_node' if the given node turns out to be an + ERROR_MARK node. */ + +static inline tree +field_type (decl) + register tree decl; +{ + register tree type; + + if (TREE_CODE (decl) == ERROR_MARK) + return integer_type_node; + + type = DECL_BIT_FIELD_TYPE (decl); + if (type == NULL_TREE) + type = TREE_TYPE (decl); + + return type; +} + +/* Given a pointer to a tree node, assumed to be some kind of a ..._TYPE + node, return the alignment in bits for the type, or else return + BITS_PER_WORD if the node actually turns out to be an + ERROR_MARK node. */ + +static inline unsigned +simple_type_align_in_bits (type) + register tree type; +{ + return (TREE_CODE (type) != ERROR_MARK) ? TYPE_ALIGN (type) : BITS_PER_WORD; +} + +/* Given a pointer to a tree node, assumed to be some kind of a ..._TYPE + node, return the size in bits for the type if it is a constant, or else + return the alignment for the type if the type's size is not constant, or + else return BITS_PER_WORD if the type actually turns out to be an + ERROR_MARK node. */ + +static inline unsigned +simple_type_size_in_bits (type) + register tree type; +{ + if (TREE_CODE (type) == ERROR_MARK) + return BITS_PER_WORD; + else + { + register tree type_size_tree = TYPE_SIZE (type); + + if (TREE_CODE (type_size_tree) != INTEGER_CST) + return TYPE_ALIGN (type); + + return (unsigned) TREE_INT_CST_LOW (type_size_tree); + } +} + +/* Given a pointer to what is assumed to be a FIELD_DECL node, compute and + return the byte offset of the lowest addressed byte of the "containing + object" for the given FIELD_DECL, or return 0 if we are unable to + determine what that offset is, either because the argument turns out to + be a pointer to an ERROR_MARK node, or because the offset is actually + variable. (We can't handle the latter case just yet). */ + +static unsigned +field_byte_offset (decl) + register tree decl; +{ + register unsigned type_align_in_bytes; + register unsigned type_align_in_bits; + register unsigned type_size_in_bits; + register unsigned object_offset_in_align_units; + register unsigned object_offset_in_bits; + register unsigned object_offset_in_bytes; + register tree type; + register tree bitpos_tree; + register tree field_size_tree; + register unsigned bitpos_int; + register unsigned deepest_bitpos; + register unsigned field_size_in_bits; + + if (TREE_CODE (decl) == ERROR_MARK) + return 0; + + if (TREE_CODE (decl) != FIELD_DECL) + abort (); + + type = field_type (decl); + + bitpos_tree = DECL_FIELD_BITPOS (decl); + field_size_tree = DECL_SIZE (decl); + + /* We cannot yet cope with fields whose positions or sizes are variable, so + for now, when we see such things, we simply return 0. Someday, we may + be able to handle such cases, but it will be damn difficult. */ + if (TREE_CODE (bitpos_tree) != INTEGER_CST) + return 0; + bitpos_int = (unsigned) TREE_INT_CST_LOW (bitpos_tree); + + if (TREE_CODE (field_size_tree) != INTEGER_CST) + return 0; + + field_size_in_bits = (unsigned) TREE_INT_CST_LOW (field_size_tree); + type_size_in_bits = simple_type_size_in_bits (type); + type_align_in_bits = simple_type_align_in_bits (type); + type_align_in_bytes = type_align_in_bits / BITS_PER_UNIT; + + /* Note that the GCC front-end doesn't make any attempt to keep track of + the starting bit offset (relative to the start of the containing + structure type) of the hypothetical "containing object" for a bit- + field. Thus, when computing the byte offset value for the start of the + "containing object" of a bit-field, we must deduce this information on + our own. This can be rather tricky to do in some cases. For example, + handling the following structure type definition when compiling for an + i386/i486 target (which only aligns long long's to 32-bit boundaries) + can be very tricky: + + struct S { int field1; long long field2:31; }; + + Fortunately, there is a simple rule-of-thumb which can be + used in such cases. When compiling for an i386/i486, GCC will allocate + 8 bytes for the structure shown above. It decides to do this based upon + one simple rule for bit-field allocation. Quite simply, GCC allocates + each "containing object" for each bit-field at the first (i.e. lowest + addressed) legitimate alignment boundary (based upon the required + minimum alignment for the declared type of the field) which it can + possibly use, subject to the condition that there is still enough + available space remaining in the containing object (when allocated at + the selected point) to fully accommodate all of the bits of the + bit-field itself. This simple rule makes it obvious why GCC allocates + 8 bytes for each object of the structure type shown above. When looking + for a place to allocate the "containing object" for `field2', the + compiler simply tries to allocate a 64-bit "containing object" at each + successive 32-bit boundary (starting at zero) until it finds a place to + allocate that 64- bit field such that at least 31 contiguous (and + previously unallocated) bits remain within that selected 64 bit field. + (As it turns out, for the example above, the compiler finds that it is + OK to allocate the "containing object" 64-bit field at bit-offset zero + within the structure type.) Here we attempt to work backwards from the + limited set of facts we're given, and we try to deduce from those facts, + where GCC must have believed that the containing object started (within + the structure type). The value we deduce is then used (by the callers of + this routine) to generate DW_AT_location and DW_AT_bit_offset attributes + for fields (both bit-fields and, in the case of DW_AT_location, regular + fields as well). */ + + /* Figure out the bit-distance from the start of the structure to the + "deepest" bit of the bit-field. */ + deepest_bitpos = bitpos_int + field_size_in_bits; + + /* This is the tricky part. Use some fancy footwork to deduce where the + lowest addressed bit of the containing object must be. */ + object_offset_in_bits + = ceiling (deepest_bitpos, type_align_in_bits) - type_size_in_bits; + + /* Compute the offset of the containing object in "alignment units". */ + object_offset_in_align_units = object_offset_in_bits / type_align_in_bits; + + /* Compute the offset of the containing object in bytes. */ + object_offset_in_bytes = object_offset_in_align_units * type_align_in_bytes; + + return object_offset_in_bytes; +} + +/* The following routines define various Dwarf attributes and any data + associated with them. */ + +/* Add a location description attribute value to a DIE. + + This emits location attributes suitable for whole variables and + whole parameters. Note that the location attributes for struct fields are + generated by the routine `data_member_location_attribute' below. */ + +static void +add_AT_location_description (die, attr_kind, rtl) + dw_die_ref die; + enum dwarf_attribute attr_kind; + register rtx rtl; +{ + /* Handle a special case. If we are about to output a location descriptor + for a variable or parameter which has been optimized out of existence, + don't do that. A variable which has been optimized out + of existence will have a DECL_RTL value which denotes a pseudo-reg. + Currently, in some rare cases, variables can have DECL_RTL values which + look like (MEM (REG pseudo-reg#)). These cases are due to bugs + elsewhere in the compiler. We treat such cases as if the variable(s) in + question had been optimized out of existence. */ + + if (is_pseudo_reg (rtl) + || (GET_CODE (rtl) == MEM + && is_pseudo_reg (XEXP (rtl, 0))) + || (GET_CODE (rtl) == CONCAT + && is_pseudo_reg (XEXP (rtl, 0)) + && is_pseudo_reg (XEXP (rtl, 1)))) + return; + + add_AT_loc (die, attr_kind, loc_descriptor (rtl)); +} + +/* Attach the specialized form of location attribute used for data + members of struct and union types. In the special case of a + FIELD_DECL node which represents a bit-field, the "offset" part + of this special location descriptor must indicate the distance + in bytes from the lowest-addressed byte of the containing struct + or union type to the lowest-addressed byte of the "containing + object" for the bit-field. (See the `field_byte_offset' function + above).. For any given bit-field, the "containing object" is a + hypothetical object (of some integral or enum type) within which + the given bit-field lives. The type of this hypothetical + "containing object" is always the same as the declared type of + the individual bit-field itself (for GCC anyway... the DWARF + spec doesn't actually mandate this). Note that it is the size + (in bytes) of the hypothetical "containing object" which will + be given in the DW_AT_byte_size attribute for this bit-field. + (See the `byte_size_attribute' function below.) It is also used + when calculating the value of the DW_AT_bit_offset attribute. + (See the `bit_offset_attribute' function below). */ + +static void +add_data_member_location_attribute (die, decl) + register dw_die_ref die; + register tree decl; +{ + register unsigned long offset; + register dw_loc_descr_ref loc_descr; + register enum dwarf_location_atom op; + + if (TREE_CODE (decl) == TREE_VEC) + offset = TREE_INT_CST_LOW (BINFO_OFFSET (decl)); + else + offset = field_byte_offset (decl); + + /* The DWARF2 standard says that we should assume that the structure address + is already on the stack, so we can specify a structure field address + by using DW_OP_plus_uconst. */ + +#ifdef MIPS_DEBUGGING_INFO + /* ??? The SGI dwarf reader does not handle the DW_OP_plus_uconst operator + correctly. It works only if we leave the offset on the stack. */ + op = DW_OP_constu; +#else + op = DW_OP_plus_uconst; +#endif + + loc_descr = new_loc_descr (op, offset, 0); + add_AT_loc (die, DW_AT_data_member_location, loc_descr); +} + +/* Attach an DW_AT_const_value attribute for a variable or a parameter which + does not have a "location" either in memory or in a register. These + things can arise in GNU C when a constant is passed as an actual parameter + to an inlined function. They can also arise in C++ where declared + constants do not necessarily get memory "homes". */ + +static void +add_const_value_attribute (die, rtl) + register dw_die_ref die; + register rtx rtl; +{ + switch (GET_CODE (rtl)) + { + case CONST_INT: + /* Note that a CONST_INT rtx could represent either an integer or a + floating-point constant. A CONST_INT is used whenever the constant + will fit into a single word. In all such cases, the original mode + of the constant value is wiped out, and the CONST_INT rtx is + assigned VOIDmode. */ + add_AT_unsigned (die, DW_AT_const_value, (unsigned) INTVAL (rtl)); + break; + + case CONST_DOUBLE: + /* Note that a CONST_DOUBLE rtx could represent either an integer or a + floating-point constant. A CONST_DOUBLE is used whenever the + constant requires more than one word in order to be adequately + represented. We output CONST_DOUBLEs as blocks. */ + { + register enum machine_mode mode = GET_MODE (rtl); + + if (GET_MODE_CLASS (mode) == MODE_FLOAT) + { + register unsigned length = GET_MODE_SIZE (mode) / sizeof (long); + long array[4]; + REAL_VALUE_TYPE rv; + + REAL_VALUE_FROM_CONST_DOUBLE (rv, rtl); + switch (mode) + { + case SFmode: + REAL_VALUE_TO_TARGET_SINGLE (rv, array[0]); + break; + + case DFmode: + REAL_VALUE_TO_TARGET_DOUBLE (rv, array); + break; + + case XFmode: + case TFmode: + REAL_VALUE_TO_TARGET_LONG_DOUBLE (rv, array); + break; + + default: + abort (); + } + + add_AT_float (die, DW_AT_const_value, length, array); + } + else + add_AT_long_long (die, DW_AT_const_value, + CONST_DOUBLE_HIGH (rtl), CONST_DOUBLE_LOW (rtl)); + } + break; + + case CONST_STRING: + add_AT_string (die, DW_AT_const_value, XSTR (rtl, 0)); + break; + + case SYMBOL_REF: + case LABEL_REF: + case CONST: + add_AT_addr (die, DW_AT_const_value, addr_to_string (rtl)); + break; + + case PLUS: + /* In cases where an inlined instance of an inline function is passed + the address of an `auto' variable (which is local to the caller) we + can get a situation where the DECL_RTL of the artificial local + variable (for the inlining) which acts as a stand-in for the + corresponding formal parameter (of the inline function) will look + like (plus:SI (reg:SI FRAME_PTR) (const_int ...)). This is not + exactly a compile-time constant expression, but it isn't the address + of the (artificial) local variable either. Rather, it represents the + *value* which the artificial local variable always has during its + lifetime. We currently have no way to represent such quasi-constant + values in Dwarf, so for now we just punt and generate nothing. */ + break; + + default: + /* No other kinds of rtx should be possible here. */ + abort (); + } + +} + +/* Generate *either* an DW_AT_location attribute or else an DW_AT_const_value + data attribute for a variable or a parameter. We generate the + DW_AT_const_value attribute only in those cases where the given variable + or parameter does not have a true "location" either in memory or in a + register. This can happen (for example) when a constant is passed as an + actual argument in a call to an inline function. (It's possible that + these things can crop up in other ways also.) Note that one type of + constant value which can be passed into an inlined function is a constant + pointer. This can happen for example if an actual argument in an inlined + function call evaluates to a compile-time constant address. */ + +static void +add_location_or_const_value_attribute (die, decl) + register dw_die_ref die; + register tree decl; +{ + register rtx rtl; + register tree declared_type; + register tree passed_type; + + if (TREE_CODE (decl) == ERROR_MARK) + return; + + if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != PARM_DECL) + abort (); + + /* Here we have to decide where we are going to say the parameter "lives" + (as far as the debugger is concerned). We only have a couple of + choices. GCC provides us with DECL_RTL and with DECL_INCOMING_RTL. + + DECL_RTL normally indicates where the parameter lives during most of the + activation of the function. If optimization is enabled however, this + could be either NULL or else a pseudo-reg. Both of those cases indicate + that the parameter doesn't really live anywhere (as far as the code + generation parts of GCC are concerned) during most of the function's + activation. That will happen (for example) if the parameter is never + referenced within the function. + + We could just generate a location descriptor here for all non-NULL + non-pseudo values of DECL_RTL and ignore all of the rest, but we can be + a little nicer than that if we also consider DECL_INCOMING_RTL in cases + where DECL_RTL is NULL or is a pseudo-reg. + + Note however that we can only get away with using DECL_INCOMING_RTL as + a backup substitute for DECL_RTL in certain limited cases. In cases + where DECL_ARG_TYPE (decl) indicates the same type as TREE_TYPE (decl), + we can be sure that the parameter was passed using the same type as it is + declared to have within the function, and that its DECL_INCOMING_RTL + points us to a place where a value of that type is passed. + + In cases where DECL_ARG_TYPE (decl) and TREE_TYPE (decl) are different, + we cannot (in general) use DECL_INCOMING_RTL as a substitute for DECL_RTL + because in these cases DECL_INCOMING_RTL points us to a value of some + type which is *different* from the type of the parameter itself. Thus, + if we tried to use DECL_INCOMING_RTL to generate a location attribute in + such cases, the debugger would end up (for example) trying to fetch a + `float' from a place which actually contains the first part of a + `double'. That would lead to really incorrect and confusing + output at debug-time. + + So, in general, we *do not* use DECL_INCOMING_RTL as a backup for DECL_RTL + in cases where DECL_ARG_TYPE (decl) != TREE_TYPE (decl). There + are a couple of exceptions however. On little-endian machines we can + get away with using DECL_INCOMING_RTL even when DECL_ARG_TYPE (decl) is + not the same as TREE_TYPE (decl), but only when DECL_ARG_TYPE (decl) is + an integral type that is smaller than TREE_TYPE (decl). These cases arise + when (on a little-endian machine) a non-prototyped function has a + parameter declared to be of type `short' or `char'. In such cases, + TREE_TYPE (decl) will be `short' or `char', DECL_ARG_TYPE (decl) will + be `int', and DECL_INCOMING_RTL will point to the lowest-order byte of the + passed `int' value. If the debugger then uses that address to fetch + a `short' or a `char' (on a little-endian machine) the result will be + the correct data, so we allow for such exceptional cases below. + + Note that our goal here is to describe the place where the given formal + parameter lives during most of the function's activation (i.e. between + the end of the prologue and the start of the epilogue). We'll do that + as best as we can. Note however that if the given formal parameter is + modified sometime during the execution of the function, then a stack + backtrace (at debug-time) will show the function as having been + called with the *new* value rather than the value which was + originally passed in. This happens rarely enough that it is not + a major problem, but it *is* a problem, and I'd like to fix it. + + A future version of dwarf2out.c may generate two additional + attributes for any given DW_TAG_formal_parameter DIE which will + describe the "passed type" and the "passed location" for the + given formal parameter in addition to the attributes we now + generate to indicate the "declared type" and the "active + location" for each parameter. This additional set of attributes + could be used by debuggers for stack backtraces. Separately, note + that sometimes DECL_RTL can be NULL and DECL_INCOMING_RTL can be + NULL also. This happens (for example) for inlined-instances of + inline function formal parameters which are never referenced. + This really shouldn't be happening. All PARM_DECL nodes should + get valid non-NULL DECL_INCOMING_RTL values, but integrate.c + doesn't currently generate these values for inlined instances of + inline function parameters, so when we see such cases, we are + just out-of-luck for the time being (until integrate.c + gets fixed). */ + + /* Use DECL_RTL as the "location" unless we find something better. */ + rtl = DECL_RTL (decl); + + if (TREE_CODE (decl) == PARM_DECL) + { + if (rtl == NULL_RTX || is_pseudo_reg (rtl)) + { + declared_type = type_main_variant (TREE_TYPE (decl)); + passed_type = type_main_variant (DECL_ARG_TYPE (decl)); + + /* This decl represents a formal parameter which was optimized out. + Note that DECL_INCOMING_RTL may be NULL in here, but we handle + all* cases where (rtl == NULL_RTX) just below. */ + if (declared_type == passed_type) + rtl = DECL_INCOMING_RTL (decl); + else if (! BYTES_BIG_ENDIAN + && TREE_CODE (declared_type) == INTEGER_TYPE + && TYPE_SIZE (declared_type) <= TYPE_SIZE (passed_type)) + rtl = DECL_INCOMING_RTL (decl); + } + } + + if (rtl == NULL_RTX) + return; + + rtl = eliminate_regs (rtl, 0, NULL_RTX, 0); +#ifdef LEAF_REG_REMAP + if (leaf_function) + leaf_renumber_regs_insn (rtl); +#endif + + switch (GET_CODE (rtl)) + { + case ADDRESSOF: + /* The address of a variable that was optimized away; don't emit + anything. */ + break; + + case CONST_INT: + case CONST_DOUBLE: + case CONST_STRING: + case SYMBOL_REF: + case LABEL_REF: + case CONST: + case PLUS: + /* DECL_RTL could be (plus (reg ...) (const_int ...)) */ + add_const_value_attribute (die, rtl); + break; + + case MEM: + case REG: + case SUBREG: + case CONCAT: + add_AT_location_description (die, DW_AT_location, rtl); + break; + + default: + abort (); + } +} + +/* Generate an DW_AT_name attribute given some string value to be included as + the value of the attribute. */ + +static inline void +add_name_attribute (die, name_string) + register dw_die_ref die; + register char *name_string; +{ + if (name_string != NULL && *name_string != 0) + add_AT_string (die, DW_AT_name, name_string); +} + +/* Given a tree node describing an array bound (either lower or upper) output + a representation for that bound. */ + +static void +add_bound_info (subrange_die, bound_attr, bound) + register dw_die_ref subrange_die; + register enum dwarf_attribute bound_attr; + register tree bound; +{ + register unsigned bound_value = 0; + + /* If this is an Ada unconstrained array type, then don't emit any debug + info because the array bounds are unknown. They are parameterized when + the type is instantiated. */ + if (contains_placeholder_p (bound)) + return; + + switch (TREE_CODE (bound)) + { + case ERROR_MARK: + return; + + /* All fixed-bounds are represented by INTEGER_CST nodes. */ + case INTEGER_CST: + bound_value = TREE_INT_CST_LOW (bound); + if (bound_attr == DW_AT_lower_bound + && ((is_c_family () && bound_value == 0) + || (is_fortran () && bound_value == 1))) + /* use the default */; + else + add_AT_unsigned (subrange_die, bound_attr, bound_value); + break; + + case CONVERT_EXPR: + case NOP_EXPR: + case NON_LVALUE_EXPR: + add_bound_info (subrange_die, bound_attr, TREE_OPERAND (bound, 0)); + break; + + case SAVE_EXPR: + /* If optimization is turned on, the SAVE_EXPRs that describe how to + access the upper bound values may be bogus. If they refer to a + register, they may only describe how to get at these values at the + points in the generated code right after they have just been + computed. Worse yet, in the typical case, the upper bound values + will not even *be* computed in the optimized code (though the + number of elements will), so these SAVE_EXPRs are entirely + bogus. In order to compensate for this fact, we check here to see + if optimization is enabled, and if so, we don't add an attribute + for the (unknown and unknowable) upper bound. This should not + cause too much trouble for existing (stupid?) debuggers because + they have to deal with empty upper bounds location descriptions + anyway in order to be able to deal with incomplete array types. + Of course an intelligent debugger (GDB?) should be able to + comprehend that a missing upper bound specification in a array + type used for a storage class `auto' local array variable + indicates that the upper bound is both unknown (at compile- time) + and unknowable (at run-time) due to optimization. + + We assume that a MEM rtx is safe because gcc wouldn't put the + value there unless it was going to be used repeatedly in the + function, i.e. for cleanups. */ + if (! optimize || GET_CODE (SAVE_EXPR_RTL (bound)) == MEM) + { + register dw_die_ref ctx = lookup_decl_die (current_function_decl); + register dw_die_ref decl_die = new_die (DW_TAG_variable, ctx); + add_AT_flag (decl_die, DW_AT_artificial, 1); + add_type_attribute (decl_die, TREE_TYPE (bound), 1, 0, ctx); + add_AT_location_description (decl_die, DW_AT_location, + SAVE_EXPR_RTL (bound)); + add_AT_die_ref (subrange_die, bound_attr, decl_die); + } + + /* Else leave out the attribute. */ + break; + + case MAX_EXPR: + case VAR_DECL: + case COMPONENT_REF: + /* ??? These types of bounds can be created by the Ada front end, + and it isn't clear how to emit debug info for them. */ + break; + + default: + abort (); + } +} + +/* Note that the block of subscript information for an array type also + includes information about the element type of type given array type. */ + +static void +add_subscript_info (type_die, type) + register dw_die_ref type_die; + register tree type; +{ + register unsigned dimension_number; + register tree lower, upper; + register dw_die_ref subrange_die; + + /* The GNU compilers represent multidimensional array types as sequences of + one dimensional array types whose element types are themselves array + types. Here we squish that down, so that each multidimensional array + type gets only one array_type DIE in the Dwarf debugging info. The draft + Dwarf specification say that we are allowed to do this kind of + compression in C (because there is no difference between an array or + arrays and a multidimensional array in C) but for other source languages + (e.g. Ada) we probably shouldn't do this. */ + + /* ??? The SGI dwarf reader fails for multidimensional arrays with a + const enum type. E.g. const enum machine_mode insn_operand_mode[2][10]. + We work around this by disabling this feature. See also + gen_array_type_die. */ +#ifndef MIPS_DEBUGGING_INFO + for (dimension_number = 0; + TREE_CODE (type) == ARRAY_TYPE; + type = TREE_TYPE (type), dimension_number++) + { +#endif + register tree domain = TYPE_DOMAIN (type); + + /* Arrays come in three flavors: Unspecified bounds, fixed bounds, + and (in GNU C only) variable bounds. Handle all three forms + here. */ + subrange_die = new_die (DW_TAG_subrange_type, type_die); + if (domain) + { + /* We have an array type with specified bounds. */ + lower = TYPE_MIN_VALUE (domain); + upper = TYPE_MAX_VALUE (domain); + + /* define the index type. */ + if (TREE_TYPE (domain)) + { + /* ??? This is probably an Ada unnamed subrange type. Ignore the + TREE_TYPE field. We can't emit debug info for this + because it is an unnamed integral type. */ + if (TREE_CODE (domain) == INTEGER_TYPE + && TYPE_NAME (domain) == NULL_TREE + && TREE_CODE (TREE_TYPE (domain)) == INTEGER_TYPE + && TYPE_NAME (TREE_TYPE (domain)) == NULL_TREE) + ; + else + add_type_attribute (subrange_die, TREE_TYPE (domain), 0, 0, + type_die); + } + + add_bound_info (subrange_die, DW_AT_lower_bound, lower); + add_bound_info (subrange_die, DW_AT_upper_bound, upper); + } + else + /* We have an array type with an unspecified length. The DWARF-2 + spec does not say how to handle this; let's just leave out the + bounds. */ + ; + +#ifndef MIPS_DEBUGGING_INFO + } +#endif +} + +static void +add_byte_size_attribute (die, tree_node) + dw_die_ref die; + register tree tree_node; +{ + register unsigned size; + + switch (TREE_CODE (tree_node)) + { + case ERROR_MARK: + size = 0; + break; + case ENUMERAL_TYPE: + case RECORD_TYPE: + case UNION_TYPE: + case QUAL_UNION_TYPE: + size = int_size_in_bytes (tree_node); + break; + case FIELD_DECL: + /* For a data member of a struct or union, the DW_AT_byte_size is + generally given as the number of bytes normally allocated for an + object of the *declared* type of the member itself. This is true + even for bit-fields. */ + size = simple_type_size_in_bits (field_type (tree_node)) / BITS_PER_UNIT; + break; + default: + abort (); + } + + /* Note that `size' might be -1 when we get to this point. If it is, that + indicates that the byte size of the entity in question is variable. We + have no good way of expressing this fact in Dwarf at the present time, + so just let the -1 pass on through. */ + + add_AT_unsigned (die, DW_AT_byte_size, size); +} + +/* For a FIELD_DECL node which represents a bit-field, output an attribute + which specifies the distance in bits from the highest order bit of the + "containing object" for the bit-field to the highest order bit of the + bit-field itself. + + For any given bit-field, the "containing object" is a hypothetical + object (of some integral or enum type) within which the given bit-field + lives. The type of this hypothetical "containing object" is always the + same as the declared type of the individual bit-field itself. The + determination of the exact location of the "containing object" for a + bit-field is rather complicated. It's handled by the + `field_byte_offset' function (above). + + Note that it is the size (in bytes) of the hypothetical "containing object" + which will be given in the DW_AT_byte_size attribute for this bit-field. + (See `byte_size_attribute' above). */ + +static inline void +add_bit_offset_attribute (die, decl) + register dw_die_ref die; + register tree decl; +{ + register unsigned object_offset_in_bytes = field_byte_offset (decl); + register tree type = DECL_BIT_FIELD_TYPE (decl); + register tree bitpos_tree = DECL_FIELD_BITPOS (decl); + register unsigned bitpos_int; + register unsigned highest_order_object_bit_offset; + register unsigned highest_order_field_bit_offset; + register unsigned bit_offset; + + assert (TREE_CODE (decl) == FIELD_DECL); /* Must be a field. */ + assert (type); /* Must be a bit field. */ + + /* We can't yet handle bit-fields whose offsets are variable, so if we + encounter such things, just return without generating any attribute + whatsoever. */ + if (TREE_CODE (bitpos_tree) != INTEGER_CST) + return; + + bitpos_int = (unsigned) TREE_INT_CST_LOW (bitpos_tree); + + /* Note that the bit offset is always the distance (in bits) from the + highest-order bit of the "containing object" to the highest-order bit of + the bit-field itself. Since the "high-order end" of any object or field + is different on big-endian and little-endian machines, the computation + below must take account of these differences. */ + highest_order_object_bit_offset = object_offset_in_bytes * BITS_PER_UNIT; + highest_order_field_bit_offset = bitpos_int; + + if (! BYTES_BIG_ENDIAN) + { + highest_order_field_bit_offset + += (unsigned) TREE_INT_CST_LOW (DECL_SIZE (decl)); + + highest_order_object_bit_offset += simple_type_size_in_bits (type); + } + + bit_offset + = (! BYTES_BIG_ENDIAN + ? highest_order_object_bit_offset - highest_order_field_bit_offset + : highest_order_field_bit_offset - highest_order_object_bit_offset); + + add_AT_unsigned (die, DW_AT_bit_offset, bit_offset); +} + +/* For a FIELD_DECL node which represents a bit field, output an attribute + which specifies the length in bits of the given field. */ + +static inline void +add_bit_size_attribute (die, decl) + register dw_die_ref die; + register tree decl; +{ + assert (TREE_CODE (decl) == FIELD_DECL); /* Must be a field. */ + assert (DECL_BIT_FIELD_TYPE (decl)); /* Must be a bit field. */ + add_AT_unsigned (die, DW_AT_bit_size, + (unsigned) TREE_INT_CST_LOW (DECL_SIZE (decl))); +} + +/* If the compiled language is ANSI C, then add a 'prototyped' + attribute, if arg types are given for the parameters of a function. */ + +static inline void +add_prototyped_attribute (die, func_type) + register dw_die_ref die; + register tree func_type; +{ + if (get_AT_unsigned (comp_unit_die, DW_AT_language) == DW_LANG_C89 + && TYPE_ARG_TYPES (func_type) != NULL) + add_AT_flag (die, DW_AT_prototyped, 1); +} + + +/* Add an 'abstract_origin' attribute below a given DIE. The DIE is found + by looking in either the type declaration or object declaration + equate table. */ + +static inline void +add_abstract_origin_attribute (die, origin) + register dw_die_ref die; + register tree origin; +{ + dw_die_ref origin_die = NULL; + if (TREE_CODE_CLASS (TREE_CODE (origin)) == 'd') + origin_die = lookup_decl_die (origin); + else if (TREE_CODE_CLASS (TREE_CODE (origin)) == 't') + origin_die = lookup_type_die (origin); + + add_AT_die_ref (die, DW_AT_abstract_origin, origin_die); +} + +/* We do not currently support the pure_virtual attribute. */ + +static inline void +add_pure_or_virtual_attribute (die, func_decl) + register dw_die_ref die; + register tree func_decl; +{ + if (DECL_VINDEX (func_decl)) + { + add_AT_unsigned (die, DW_AT_virtuality, DW_VIRTUALITY_virtual); + add_AT_loc (die, DW_AT_vtable_elem_location, + new_loc_descr (DW_OP_constu, + TREE_INT_CST_LOW (DECL_VINDEX (func_decl)), + 0)); + + /* GNU extension: Record what type this method came from originally. */ + if (debug_info_level > DINFO_LEVEL_TERSE) + add_AT_die_ref (die, DW_AT_containing_type, + lookup_type_die (DECL_CONTEXT (func_decl))); + } +} + +/* Add source coordinate attributes for the given decl. */ + +static void +add_src_coords_attributes (die, decl) + register dw_die_ref die; + register tree decl; +{ + register unsigned file_index = lookup_filename (DECL_SOURCE_FILE (decl)); + + add_AT_unsigned (die, DW_AT_decl_file, file_index); + add_AT_unsigned (die, DW_AT_decl_line, DECL_SOURCE_LINE (decl)); +} + +/* Add an DW_AT_name attribute and source coordinate attribute for the + given decl, but only if it actually has a name. */ + +static void +add_name_and_src_coords_attributes (die, decl) + register dw_die_ref die; + register tree decl; +{ + register tree decl_name; + + decl_name = DECL_NAME (decl); + if (decl_name != NULL && IDENTIFIER_POINTER (decl_name) != NULL) + { + add_name_attribute (die, dwarf2_name (decl, 0)); + add_src_coords_attributes (die, decl); + if ((TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL) + && DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl)) + add_AT_string (die, DW_AT_MIPS_linkage_name, + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))); + } +} + +/* Push a new declaration scope. */ + +static void +push_decl_scope (scope) + tree scope; +{ + /* Make room in the decl_scope_table, if necessary. */ + if (decl_scope_table_allocated == decl_scope_depth) + { + decl_scope_table_allocated += DECL_SCOPE_TABLE_INCREMENT; + decl_scope_table + = (tree *) xrealloc (decl_scope_table, + decl_scope_table_allocated * sizeof (tree)); + } + + decl_scope_table[decl_scope_depth++] = scope; +} + +/* Return the DIE for the scope the immediately contains this declaration. */ + +static dw_die_ref +scope_die_for (t, context_die) + register tree t; + register dw_die_ref context_die; +{ + register dw_die_ref scope_die = NULL; + register tree containing_scope; + register unsigned long i; + + /* Walk back up the declaration tree looking for a place to define + this type. */ + if (TREE_CODE_CLASS (TREE_CODE (t)) == 't') + containing_scope = TYPE_CONTEXT (t); + else if (TREE_CODE (t) == FUNCTION_DECL && DECL_VINDEX (t)) + containing_scope = decl_class_context (t); + else + containing_scope = DECL_CONTEXT (t); + + /* Function-local tags and functions get stuck in limbo until they are + fixed up by decls_for_scope. */ + if (context_die == NULL && containing_scope != NULL_TREE + && (TREE_CODE (t) == FUNCTION_DECL || is_tagged_type (t))) + return NULL; + + if (containing_scope == NULL_TREE) + scope_die = comp_unit_die; + else + { + for (i = decl_scope_depth, scope_die = context_die; + i > 0 && decl_scope_table[i - 1] != containing_scope; + scope_die = scope_die->die_parent, --i) + ; + + if (i == 0) + { + assert (scope_die == comp_unit_die); + assert (TREE_CODE_CLASS (TREE_CODE (containing_scope)) == 't'); + if (debug_info_level > DINFO_LEVEL_TERSE) + assert (TREE_ASM_WRITTEN (containing_scope)); + } + } + + return scope_die; +} + +/* Pop a declaration scope. */ +static inline void +pop_decl_scope () +{ + assert (decl_scope_depth > 0); + --decl_scope_depth; +} + +/* Many forms of DIEs require a "type description" attribute. This + routine locates the proper "type descriptor" die for the type given + by 'type', and adds an DW_AT_type attribute below the given die. */ + +static void +add_type_attribute (object_die, type, decl_const, decl_volatile, context_die) + register dw_die_ref object_die; + register tree type; + register int decl_const; + register int decl_volatile; + register dw_die_ref context_die; +{ + register enum tree_code code = TREE_CODE (type); + register dw_die_ref type_die = NULL; + + /* ??? If this type is an unnamed subrange type of an integral or + floating-point type, use the inner type. This is because we have no + support for unnamed types in base_type_die. This can happen if this is + an Ada subrange type. Correct solution is emit a subrange type die. */ + if ((code == INTEGER_TYPE || code == REAL_TYPE) + && TREE_TYPE (type) != 0 && TYPE_NAME (type) == 0) + type = TREE_TYPE (type), code = TREE_CODE (type); + + if (code == ERROR_MARK) + return; + + /* Handle a special case. For functions whose return type is void, we + generate *no* type attribute. (Note that no object may have type + `void', so this only applies to function return types). */ + if (code == VOID_TYPE) + return; + + type_die = modified_type_die (type, + decl_const || TYPE_READONLY (type), + decl_volatile || TYPE_VOLATILE (type), + context_die); + if (type_die != NULL) + add_AT_die_ref (object_die, DW_AT_type, type_die); +} + +/* Given a tree pointer to a struct, class, union, or enum type node, return + a pointer to the (string) tag name for the given type, or zero if the type + was declared without a tag. */ + +static char * +type_tag (type) + register tree type; +{ + register char *name = 0; + + if (TYPE_NAME (type) != 0) + { + register tree t = 0; + + /* Find the IDENTIFIER_NODE for the type name. */ + if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) + t = TYPE_NAME (type); + + /* The g++ front end makes the TYPE_NAME of *each* tagged type point to + a TYPE_DECL node, regardless of whether or not a `typedef' was + involved. */ + else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL + && ! DECL_IGNORED_P (TYPE_NAME (type))) + t = DECL_NAME (TYPE_NAME (type)); + + /* Now get the name as a string, or invent one. */ + if (t != 0) + name = IDENTIFIER_POINTER (t); + } + + return (name == 0 || *name == '\0') ? 0 : name; +} + +/* Return the type associated with a data member, make a special check + for bit field types. */ + +static inline tree +member_declared_type (member) + register tree member; +{ + return (DECL_BIT_FIELD_TYPE (member) + ? DECL_BIT_FIELD_TYPE (member) + : TREE_TYPE (member)); +} + +/* Get the decl's label, as described by its RTL. This may be different + from the DECL_NAME name used in the source file. */ + +static char * +decl_start_label (decl) + register tree decl; +{ + rtx x; + char *fnname; + x = DECL_RTL (decl); + if (GET_CODE (x) != MEM) + abort (); + + x = XEXP (x, 0); + if (GET_CODE (x) != SYMBOL_REF) + abort (); + + fnname = XSTR (x, 0); + return fnname; +} + +/* These routines generate the internal representation of the DIE's for + the compilation unit. Debugging information is collected by walking + the declaration trees passed in from dwarf2out_decl(). */ + +static void +gen_array_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register dw_die_ref scope_die = scope_die_for (type, context_die); + register dw_die_ref array_die; + register tree element_type; + + /* ??? The SGI dwarf reader fails for array of array of enum types unless + the inner array type comes before the outer array type. Thus we must + call gen_type_die before we call new_die. See below also. */ +#ifdef MIPS_DEBUGGING_INFO + gen_type_die (TREE_TYPE (type), context_die); +#endif + + array_die = new_die (DW_TAG_array_type, scope_die); + +#if 0 + /* We default the array ordering. SDB will probably do + the right things even if DW_AT_ordering is not present. It's not even + an issue until we start to get into multidimensional arrays anyway. If + SDB is ever caught doing the Wrong Thing for multi-dimensional arrays, + then we'll have to put the DW_AT_ordering attribute back in. (But if + and when we find out that we need to put these in, we will only do so + for multidimensional arrays. */ + add_AT_unsigned (array_die, DW_AT_ordering, DW_ORD_row_major); +#endif + +#ifdef MIPS_DEBUGGING_INFO + /* The SGI compilers handle arrays of unknown bound by setting + AT_declaration and not emitting any subrange DIEs. */ + if (! TYPE_DOMAIN (type)) + add_AT_unsigned (array_die, DW_AT_declaration, 1); + else +#endif + add_subscript_info (array_die, type); + + equate_type_number_to_die (type, array_die); + + /* Add representation of the type of the elements of this array type. */ + element_type = TREE_TYPE (type); + + /* ??? The SGI dwarf reader fails for multidimensional arrays with a + const enum type. E.g. const enum machine_mode insn_operand_mode[2][10]. + We work around this by disabling this feature. See also + add_subscript_info. */ +#ifndef MIPS_DEBUGGING_INFO + while (TREE_CODE (element_type) == ARRAY_TYPE) + element_type = TREE_TYPE (element_type); + + gen_type_die (element_type, context_die); +#endif + + add_type_attribute (array_die, element_type, 0, 0, context_die); +} + +static void +gen_set_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register dw_die_ref type_die + = new_die (DW_TAG_set_type, scope_die_for (type, context_die)); + + equate_type_number_to_die (type, type_die); + add_type_attribute (type_die, TREE_TYPE (type), 0, 0, context_die); +} + +static void +gen_entry_point_die (decl, context_die) + register tree decl; + register dw_die_ref context_die; +{ + register tree origin = decl_ultimate_origin (decl); + register dw_die_ref decl_die = new_die (DW_TAG_entry_point, context_die); + if (origin != NULL) + add_abstract_origin_attribute (decl_die, origin); + else + { + add_name_and_src_coords_attributes (decl_die, decl); + add_type_attribute (decl_die, TREE_TYPE (TREE_TYPE (decl)), + 0, 0, context_die); + } + + if (DECL_ABSTRACT (decl)) + equate_decl_number_to_die (decl, decl_die); + else + add_AT_lbl_id (decl_die, DW_AT_low_pc, decl_start_label (decl)); +} + +/* Remember a type in the pending_types_list. */ + +static void +pend_type (type) + register tree type; +{ + if (pending_types == pending_types_allocated) + { + pending_types_allocated += PENDING_TYPES_INCREMENT; + pending_types_list + = (tree *) xrealloc (pending_types_list, + sizeof (tree) * pending_types_allocated); + } + + pending_types_list[pending_types++] = type; +} + +/* Output any pending types (from the pending_types list) which we can output + now (taking into account the scope that we are working on now). + + For each type output, remove the given type from the pending_types_list + *before* we try to output it. */ + +static void +output_pending_types_for_scope (context_die) + register dw_die_ref context_die; +{ + register tree type; + + while (pending_types) + { + --pending_types; + type = pending_types_list[pending_types]; + gen_type_die (type, context_die); + assert (TREE_ASM_WRITTEN (type)); + } +} + +/* Generate a DIE to represent an inlined instance of an enumeration type. */ + +static void +gen_inlined_enumeration_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register dw_die_ref type_die = new_die (DW_TAG_enumeration_type, + scope_die_for (type, context_die)); + + assert (TREE_ASM_WRITTEN (type)); + add_abstract_origin_attribute (type_die, type); +} + +/* Generate a DIE to represent an inlined instance of a structure type. */ + +static void +gen_inlined_structure_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register dw_die_ref type_die = new_die (DW_TAG_structure_type, + scope_die_for (type, context_die)); + + assert (TREE_ASM_WRITTEN (type)); + add_abstract_origin_attribute (type_die, type); +} + +/* Generate a DIE to represent an inlined instance of a union type. */ + +static void +gen_inlined_union_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register dw_die_ref type_die = new_die (DW_TAG_union_type, + scope_die_for (type, context_die)); + + assert (TREE_ASM_WRITTEN (type)); + add_abstract_origin_attribute (type_die, type); +} + +/* Generate a DIE to represent an enumeration type. Note that these DIEs + include all of the information about the enumeration values also. Each + enumerated type name/value is listed as a child of the enumerated type + DIE. */ + +static void +gen_enumeration_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register dw_die_ref type_die = lookup_type_die (type); + + if (type_die == NULL) + { + type_die = new_die (DW_TAG_enumeration_type, + scope_die_for (type, context_die)); + equate_type_number_to_die (type, type_die); + add_name_attribute (type_die, type_tag (type)); + } + else if (! TYPE_SIZE (type)) + return; + else + remove_AT (type_die, DW_AT_declaration); + + /* Handle a GNU C/C++ extension, i.e. incomplete enum types. If the + given enum type is incomplete, do not generate the DW_AT_byte_size + attribute or the DW_AT_element_list attribute. */ + if (TYPE_SIZE (type)) + { + register tree link; + + TREE_ASM_WRITTEN (type) = 1; + add_byte_size_attribute (type_die, type); + if (TYPE_STUB_DECL (type) != NULL_TREE) + add_src_coords_attributes (type_die, TYPE_STUB_DECL (type)); + + /* If the first reference to this type was as the return type of an + inline function, then it may not have a parent. Fix this now. */ + if (type_die->die_parent == NULL) + add_child_die (scope_die_for (type, context_die), type_die); + + for (link = TYPE_FIELDS (type); + link != NULL; link = TREE_CHAIN (link)) + { + register dw_die_ref enum_die = new_die (DW_TAG_enumerator, type_die); + + add_name_attribute (enum_die, + IDENTIFIER_POINTER (TREE_PURPOSE (link))); + add_AT_unsigned (enum_die, DW_AT_const_value, + (unsigned) TREE_INT_CST_LOW (TREE_VALUE (link))); + } + } + else + add_AT_flag (type_die, DW_AT_declaration, 1); +} + + +/* Generate a DIE to represent either a real live formal parameter decl or to + represent just the type of some formal parameter position in some function + type. + + Note that this routine is a bit unusual because its argument may be a + ..._DECL node (i.e. either a PARM_DECL or perhaps a VAR_DECL which + represents an inlining of some PARM_DECL) or else some sort of a ..._TYPE + node. If it's the former then this function is being called to output a + DIE to represent a formal parameter object (or some inlining thereof). If + it's the latter, then this function is only being called to output a + DW_TAG_formal_parameter DIE to stand as a placeholder for some formal + argument type of some subprogram type. */ + +static dw_die_ref +gen_formal_parameter_die (node, context_die) + register tree node; + register dw_die_ref context_die; +{ + register dw_die_ref parm_die + = new_die (DW_TAG_formal_parameter, context_die); + register tree origin; + + switch (TREE_CODE_CLASS (TREE_CODE (node))) + { + case 'd': + origin = decl_ultimate_origin (node); + if (origin != NULL) + add_abstract_origin_attribute (parm_die, origin); + else + { + add_name_and_src_coords_attributes (parm_die, node); + add_type_attribute (parm_die, TREE_TYPE (node), + TREE_READONLY (node), + TREE_THIS_VOLATILE (node), + context_die); + if (DECL_ARTIFICIAL (node)) + add_AT_flag (parm_die, DW_AT_artificial, 1); + } + + equate_decl_number_to_die (node, parm_die); + if (! DECL_ABSTRACT (node)) + add_location_or_const_value_attribute (parm_die, node); + + break; + + case 't': + /* We were called with some kind of a ..._TYPE node. */ + add_type_attribute (parm_die, node, 0, 0, context_die); + break; + + default: + abort (); + } + + return parm_die; +} + +/* Generate a special type of DIE used as a stand-in for a trailing ellipsis + at the end of an (ANSI prototyped) formal parameters list. */ + +static void +gen_unspecified_parameters_die (decl_or_type, context_die) + register tree decl_or_type; + register dw_die_ref context_die; +{ + register dw_die_ref parm_die = new_die (DW_TAG_unspecified_parameters, + context_die); +} + +/* Generate a list of nameless DW_TAG_formal_parameter DIEs (and perhaps a + DW_TAG_unspecified_parameters DIE) to represent the types of the formal + parameters as specified in some function type specification (except for + those which appear as part of a function *definition*). + + Note we must be careful here to output all of the parameter DIEs before* + we output any DIEs needed to represent the types of the formal parameters. + This keeps svr4 SDB happy because it (incorrectly) thinks that the first + non-parameter DIE it sees ends the formal parameter list. */ + +static void +gen_formal_types_die (function_or_method_type, context_die) + register tree function_or_method_type; + register dw_die_ref context_die; +{ + register tree link; + register tree formal_type = NULL; + register tree first_parm_type = TYPE_ARG_TYPES (function_or_method_type); + +#if 0 + /* In the case where we are generating a formal types list for a C++ + non-static member function type, skip over the first thing on the + TYPE_ARG_TYPES list because it only represents the type of the hidden + `this pointer'. The debugger should be able to figure out (without + being explicitly told) that this non-static member function type takes a + `this pointer' and should be able to figure what the type of that hidden + parameter is from the DW_AT_member attribute of the parent + DW_TAG_subroutine_type DIE. */ + if (TREE_CODE (function_or_method_type) == METHOD_TYPE) + first_parm_type = TREE_CHAIN (first_parm_type); +#endif + + /* Make our first pass over the list of formal parameter types and output a + DW_TAG_formal_parameter DIE for each one. */ + for (link = first_parm_type; link; link = TREE_CHAIN (link)) + { + register dw_die_ref parm_die; + + formal_type = TREE_VALUE (link); + if (formal_type == void_type_node) + break; + + /* Output a (nameless) DIE to represent the formal parameter itself. */ + parm_die = gen_formal_parameter_die (formal_type, context_die); + if (TREE_CODE (function_or_method_type) == METHOD_TYPE + && link == first_parm_type) + add_AT_flag (parm_die, DW_AT_artificial, 1); + } + + /* If this function type has an ellipsis, add a + DW_TAG_unspecified_parameters DIE to the end of the parameter list. */ + if (formal_type != void_type_node) + gen_unspecified_parameters_die (function_or_method_type, context_die); + + /* Make our second (and final) pass over the list of formal parameter types + and output DIEs to represent those types (as necessary). */ + for (link = TYPE_ARG_TYPES (function_or_method_type); + link; + link = TREE_CHAIN (link)) + { + formal_type = TREE_VALUE (link); + if (formal_type == void_type_node) + break; + + gen_type_die (formal_type, context_die); + } +} + +/* Generate a DIE to represent a declared function (either file-scope or + block-local). */ + +static void +gen_subprogram_die (decl, context_die) + register tree decl; + register dw_die_ref context_die; +{ + char label_id[MAX_ARTIFICIAL_LABEL_BYTES]; + register tree origin = decl_ultimate_origin (decl); + register dw_die_ref subr_die; + register dw_loc_descr_ref fp_loc = NULL; + register rtx fp_reg; + register tree fn_arg_types; + register tree outer_scope; + register dw_die_ref old_die = lookup_decl_die (decl); + register int declaration + = (current_function_decl != decl + || (context_die + && (context_die->die_tag == DW_TAG_structure_type + || context_die->die_tag == DW_TAG_union_type))); + + if (origin != NULL) + { + subr_die = new_die (DW_TAG_subprogram, context_die); + add_abstract_origin_attribute (subr_die, origin); + } + else if (old_die && DECL_ABSTRACT (decl) + && get_AT_unsigned (old_die, DW_AT_inline)) + { + /* This must be a redefinition of an extern inline function. + We can just reuse the old die here. */ + subr_die = old_die; + + /* Clear out the inlined attribute and parm types. */ + remove_AT (subr_die, DW_AT_inline); + remove_children (subr_die); + } + else if (old_die) + { + register unsigned file_index + = lookup_filename (DECL_SOURCE_FILE (decl)); + + assert (get_AT_flag (old_die, DW_AT_declaration) == 1); + + /* If the definition comes from the same place as the declaration, + maybe use the old DIE. We always want the DIE for this function + that has the *_pc attributes to be under comp_unit_die so the + debugger can find it. For inlines, that is the concrete instance, + so we can use the old DIE here. For non-inline methods, we want a + specification DIE at toplevel, so we need a new DIE. For local + class methods, this does not apply. */ + if ((DECL_ABSTRACT (decl) || old_die->die_parent == comp_unit_die + || context_die == NULL) + && get_AT_unsigned (old_die, DW_AT_decl_file) == file_index + && (get_AT_unsigned (old_die, DW_AT_decl_line) + == DECL_SOURCE_LINE (decl))) + { + subr_die = old_die; + + /* Clear out the declaration attribute and the parm types. */ + remove_AT (subr_die, DW_AT_declaration); + remove_children (subr_die); + } + else + { + subr_die = new_die (DW_TAG_subprogram, context_die); + add_AT_die_ref (subr_die, DW_AT_specification, old_die); + if (get_AT_unsigned (old_die, DW_AT_decl_file) != file_index) + add_AT_unsigned (subr_die, DW_AT_decl_file, file_index); + if (get_AT_unsigned (old_die, DW_AT_decl_line) + != DECL_SOURCE_LINE (decl)) + add_AT_unsigned + (subr_die, DW_AT_decl_line, DECL_SOURCE_LINE (decl)); + } + } + else + { + register dw_die_ref scope_die; + + if (DECL_CONTEXT (decl)) + scope_die = scope_die_for (decl, context_die); + else + /* Don't put block extern declarations under comp_unit_die. */ + scope_die = context_die; + + subr_die = new_die (DW_TAG_subprogram, scope_die); + + if (TREE_PUBLIC (decl)) + add_AT_flag (subr_die, DW_AT_external, 1); + + add_name_and_src_coords_attributes (subr_die, decl); + if (debug_info_level > DINFO_LEVEL_TERSE) + { + register tree type = TREE_TYPE (decl); + + add_prototyped_attribute (subr_die, type); + add_type_attribute (subr_die, TREE_TYPE (type), 0, 0, context_die); + } + + add_pure_or_virtual_attribute (subr_die, decl); + if (DECL_ARTIFICIAL (decl)) + add_AT_flag (subr_die, DW_AT_artificial, 1); + if (TREE_PROTECTED (decl)) + add_AT_unsigned (subr_die, DW_AT_accessibility, DW_ACCESS_protected); + else if (TREE_PRIVATE (decl)) + add_AT_unsigned (subr_die, DW_AT_accessibility, DW_ACCESS_private); + } + + if (declaration) + { + add_AT_flag (subr_die, DW_AT_declaration, 1); + + /* The first time we see a member function, it is in the context of + the class to which it belongs. We make sure of this by emitting + the class first. The next time is the definition, which is + handled above. The two may come from the same source text. */ + if (DECL_CONTEXT (decl)) + equate_decl_number_to_die (decl, subr_die); + } + else if (DECL_ABSTRACT (decl)) + { + /* ??? Checking DECL_DEFER_OUTPUT is correct for static inline functions, + but not for extern inline functions. We can't get this completely + correct because information about whether the function was declared + inline is not saved anywhere. */ + if (DECL_DEFER_OUTPUT (decl)) + { + if (DECL_INLINE (decl)) + add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_declared_inlined); + else + add_AT_unsigned (subr_die, DW_AT_inline, + DW_INL_declared_not_inlined); + } + else if (DECL_INLINE (decl)) + add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_inlined); + else + abort (); + + equate_decl_number_to_die (decl, subr_die); + } + else if (!DECL_EXTERNAL (decl)) + { + if (origin == NULL_TREE) + equate_decl_number_to_die (decl, subr_die); + + ASM_GENERATE_INTERNAL_LABEL (label_id, FUNC_BEGIN_LABEL, + current_funcdef_number); + add_AT_lbl_id (subr_die, DW_AT_low_pc, label_id); + ASM_GENERATE_INTERNAL_LABEL (label_id, FUNC_END_LABEL, + current_funcdef_number); + add_AT_lbl_id (subr_die, DW_AT_high_pc, label_id); + + add_pubname (decl, subr_die); + add_arange (decl, subr_die); + +#ifdef MIPS_DEBUGGING_INFO + /* Add a reference to the FDE for this routine. */ + add_AT_fde_ref (subr_die, DW_AT_MIPS_fde, current_funcdef_fde); +#endif + + /* Define the "frame base" location for this routine. We use the + frame pointer or stack pointer registers, since the RTL for local + variables is relative to one of them. */ + fp_reg + = frame_pointer_needed ? hard_frame_pointer_rtx : stack_pointer_rtx; + add_AT_loc (subr_die, DW_AT_frame_base, reg_loc_descriptor (fp_reg)); + +#if 0 + /* ??? This fails for nested inline functions, because context_display + is not part of the state saved/restored for inline functions. */ + if (current_function_needs_context) + add_AT_location_description (subr_die, DW_AT_static_link, + lookup_static_chain (decl)); +#endif + } + + /* Now output descriptions of the arguments for this function. This gets + (unnecessarily?) complex because of the fact that the DECL_ARGUMENT list + for a FUNCTION_DECL doesn't indicate cases where there was a trailing + `...' at the end of the formal parameter list. In order to find out if + there was a trailing ellipsis or not, we must instead look at the type + associated with the FUNCTION_DECL. This will be a node of type + FUNCTION_TYPE. If the chain of type nodes hanging off of this + FUNCTION_TYPE node ends with a void_type_node then there should *not* be + an ellipsis at the end. */ + push_decl_scope (decl); + + /* In the case where we are describing a mere function declaration, all we + need to do here (and all we *can* do here) is to describe the *types* of + its formal parameters. */ + if (debug_info_level <= DINFO_LEVEL_TERSE) + ; + else if (declaration) + gen_formal_types_die (TREE_TYPE (decl), subr_die); + else + { + /* Generate DIEs to represent all known formal parameters */ + register tree arg_decls = DECL_ARGUMENTS (decl); + register tree parm; + + /* When generating DIEs, generate the unspecified_parameters DIE + instead if we come across the arg "__builtin_va_alist" */ + for (parm = arg_decls; parm; parm = TREE_CHAIN (parm)) + if (TREE_CODE (parm) == PARM_DECL) + { + if (DECL_NAME (parm) + && !strcmp (IDENTIFIER_POINTER (DECL_NAME (parm)), + "__builtin_va_alist")) + gen_unspecified_parameters_die (parm, subr_die); + else + gen_decl_die (parm, subr_die); + } + + /* Decide whether we need a unspecified_parameters DIE at the end. + There are 2 more cases to do this for: 1) the ansi ... declaration - + this is detectable when the end of the arg list is not a + void_type_node 2) an unprototyped function declaration (not a + definition). This just means that we have no info about the + parameters at all. */ + fn_arg_types = TYPE_ARG_TYPES (TREE_TYPE (decl)); + if (fn_arg_types != NULL) + { + /* this is the prototyped case, check for ... */ + if (TREE_VALUE (tree_last (fn_arg_types)) != void_type_node) + gen_unspecified_parameters_die (decl, subr_die); + } + else if (DECL_INITIAL (decl) == NULL_TREE) + gen_unspecified_parameters_die (decl, subr_die); + } + + /* Output Dwarf info for all of the stuff within the body of the function + (if it has one - it may be just a declaration). */ + outer_scope = DECL_INITIAL (decl); + + /* Note that here, `outer_scope' is a pointer to the outermost BLOCK + node created to represent a function. This outermost BLOCK actually + represents the outermost binding contour for the function, i.e. the + contour in which the function's formal parameters and labels get + declared. Curiously, it appears that the front end doesn't actually + put the PARM_DECL nodes for the current function onto the BLOCK_VARS + list for this outer scope. (They are strung off of the DECL_ARGUMENTS + list for the function instead.) The BLOCK_VARS list for the + `outer_scope' does provide us with a list of the LABEL_DECL nodes for + the function however, and we output DWARF info for those in + decls_for_scope. Just within the `outer_scope' there will be a BLOCK + node representing the function's outermost pair of curly braces, and + any blocks used for the base and member initializers of a C++ + constructor function. */ + if (! declaration && TREE_CODE (outer_scope) != ERROR_MARK) + { + current_function_has_inlines = 0; + decls_for_scope (outer_scope, subr_die, 0); + +#if 0 && defined (MIPS_DEBUGGING_INFO) + if (current_function_has_inlines) + { + add_AT_flag (subr_die, DW_AT_MIPS_has_inlines, 1); + if (! comp_unit_has_inlines) + { + add_AT_flag (comp_unit_die, DW_AT_MIPS_has_inlines, 1); + comp_unit_has_inlines = 1; + } + } +#endif + } + + pop_decl_scope (); +} + +/* Generate a DIE to represent a declared data object. */ + +static void +gen_variable_die (decl, context_die) + register tree decl; + register dw_die_ref context_die; +{ + register tree origin = decl_ultimate_origin (decl); + register dw_die_ref var_die = new_die (DW_TAG_variable, context_die); + + dw_die_ref old_die = lookup_decl_die (decl); + int declaration + = (DECL_EXTERNAL (decl) + || current_function_decl != decl_function_context (decl) + || context_die->die_tag == DW_TAG_structure_type + || context_die->die_tag == DW_TAG_union_type); + + if (origin != NULL) + add_abstract_origin_attribute (var_die, origin); + /* Loop unrolling can create multiple blocks that refer to the same + static variable, so we must test for the DW_AT_declaration flag. */ + /* ??? Loop unrolling/reorder_blocks should perhaps be rewritten to + copy decls and set the DECL_ABSTRACT flag on them instead of + sharing them. */ + else if (old_die && TREE_STATIC (decl) + && get_AT_flag (old_die, DW_AT_declaration) == 1) + { + /* ??? This is an instantiation of a C++ class level static. */ + add_AT_die_ref (var_die, DW_AT_specification, old_die); + if (DECL_NAME (decl)) + { + register unsigned file_index + = lookup_filename (DECL_SOURCE_FILE (decl)); + + if (get_AT_unsigned (old_die, DW_AT_decl_file) != file_index) + add_AT_unsigned (var_die, DW_AT_decl_file, file_index); + + if (get_AT_unsigned (old_die, DW_AT_decl_line) + != DECL_SOURCE_LINE (decl)) + + add_AT_unsigned (var_die, DW_AT_decl_line, + DECL_SOURCE_LINE (decl)); + } + } + else + { + add_name_and_src_coords_attributes (var_die, decl); + add_type_attribute (var_die, TREE_TYPE (decl), + TREE_READONLY (decl), + TREE_THIS_VOLATILE (decl), context_die); + + if (TREE_PUBLIC (decl)) + add_AT_flag (var_die, DW_AT_external, 1); + + if (DECL_ARTIFICIAL (decl)) + add_AT_flag (var_die, DW_AT_artificial, 1); + + if (TREE_PROTECTED (decl)) + add_AT_unsigned (var_die, DW_AT_accessibility, DW_ACCESS_protected); + + else if (TREE_PRIVATE (decl)) + add_AT_unsigned (var_die, DW_AT_accessibility, DW_ACCESS_private); + } + + if (declaration) + add_AT_flag (var_die, DW_AT_declaration, 1); + + if ((declaration && decl_class_context (decl)) || DECL_ABSTRACT (decl)) + equate_decl_number_to_die (decl, var_die); + + if (! declaration && ! DECL_ABSTRACT (decl)) + { + equate_decl_number_to_die (decl, var_die); + add_location_or_const_value_attribute (var_die, decl); + add_pubname (decl, var_die); + } +} + +/* Generate a DIE to represent a label identifier. */ + +static void +gen_label_die (decl, context_die) + register tree decl; + register dw_die_ref context_die; +{ + register tree origin = decl_ultimate_origin (decl); + register dw_die_ref lbl_die = new_die (DW_TAG_label, context_die); + register rtx insn; + char label[MAX_ARTIFICIAL_LABEL_BYTES]; + char label2[MAX_ARTIFICIAL_LABEL_BYTES]; + + if (origin != NULL) + add_abstract_origin_attribute (lbl_die, origin); + else + add_name_and_src_coords_attributes (lbl_die, decl); + + if (DECL_ABSTRACT (decl)) + equate_decl_number_to_die (decl, lbl_die); + else + { + insn = DECL_RTL (decl); + if (GET_CODE (insn) == CODE_LABEL) + { + /* When optimization is enabled (via -O) some parts of the compiler + (e.g. jump.c and cse.c) may try to delete CODE_LABEL insns which + represent source-level labels which were explicitly declared by + the user. This really shouldn't be happening though, so catch + it if it ever does happen. */ + if (INSN_DELETED_P (insn)) + abort (); + + sprintf (label2, INSN_LABEL_FMT, current_funcdef_number); + ASM_GENERATE_INTERNAL_LABEL (label, label2, + (unsigned) INSN_UID (insn)); + add_AT_lbl_id (lbl_die, DW_AT_low_pc, label); + } + } +} + +/* Generate a DIE for a lexical block. */ + +static void +gen_lexical_block_die (stmt, context_die, depth) + register tree stmt; + register dw_die_ref context_die; + int depth; +{ + register dw_die_ref stmt_die = new_die (DW_TAG_lexical_block, context_die); + char label[MAX_ARTIFICIAL_LABEL_BYTES]; + + if (! BLOCK_ABSTRACT (stmt)) + { + ASM_GENERATE_INTERNAL_LABEL (label, BLOCK_BEGIN_LABEL, + next_block_number); + add_AT_lbl_id (stmt_die, DW_AT_low_pc, label); + ASM_GENERATE_INTERNAL_LABEL (label, BLOCK_END_LABEL, next_block_number); + add_AT_lbl_id (stmt_die, DW_AT_high_pc, label); + } + + push_decl_scope (stmt); + decls_for_scope (stmt, stmt_die, depth); + pop_decl_scope (); +} + +/* Generate a DIE for an inlined subprogram. */ + +static void +gen_inlined_subroutine_die (stmt, context_die, depth) + register tree stmt; + register dw_die_ref context_die; + int depth; +{ + if (! BLOCK_ABSTRACT (stmt)) + { + register dw_die_ref subr_die + = new_die (DW_TAG_inlined_subroutine, context_die); + register tree decl = block_ultimate_origin (stmt); + char label[MAX_ARTIFICIAL_LABEL_BYTES]; + + add_abstract_origin_attribute (subr_die, decl); + ASM_GENERATE_INTERNAL_LABEL (label, BLOCK_BEGIN_LABEL, + next_block_number); + add_AT_lbl_id (subr_die, DW_AT_low_pc, label); + ASM_GENERATE_INTERNAL_LABEL (label, BLOCK_END_LABEL, next_block_number); + add_AT_lbl_id (subr_die, DW_AT_high_pc, label); + push_decl_scope (decl); + decls_for_scope (stmt, subr_die, depth); + pop_decl_scope (); + current_function_has_inlines = 1; + } +} + +/* Generate a DIE for a field in a record, or structure. */ + +static void +gen_field_die (decl, context_die) + register tree decl; + register dw_die_ref context_die; +{ + register dw_die_ref decl_die = new_die (DW_TAG_member, context_die); + + add_name_and_src_coords_attributes (decl_die, decl); + add_type_attribute (decl_die, member_declared_type (decl), + TREE_READONLY (decl), TREE_THIS_VOLATILE (decl), + context_die); + + /* If this is a bit field... */ + if (DECL_BIT_FIELD_TYPE (decl)) + { + add_byte_size_attribute (decl_die, decl); + add_bit_size_attribute (decl_die, decl); + add_bit_offset_attribute (decl_die, decl); + } + + if (TREE_CODE (DECL_FIELD_CONTEXT (decl)) != UNION_TYPE) + add_data_member_location_attribute (decl_die, decl); + + if (DECL_ARTIFICIAL (decl)) + add_AT_flag (decl_die, DW_AT_artificial, 1); + + if (TREE_PROTECTED (decl)) + add_AT_unsigned (decl_die, DW_AT_accessibility, DW_ACCESS_protected); + + else if (TREE_PRIVATE (decl)) + add_AT_unsigned (decl_die, DW_AT_accessibility, DW_ACCESS_private); +} + +#if 0 +/* Don't generate either pointer_type DIEs or reference_type DIEs here. + Use modified_type_die instead. + We keep this code here just in case these types of DIEs may be needed to + represent certain things in other languages (e.g. Pascal) someday. */ +static void +gen_pointer_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register dw_die_ref ptr_die + = new_die (DW_TAG_pointer_type, scope_die_for (type, context_die)); + + equate_type_number_to_die (type, ptr_die); + add_type_attribute (ptr_die, TREE_TYPE (type), 0, 0, context_die); + add_AT_unsigned (mod_type_die, DW_AT_byte_size, PTR_SIZE); +} + +/* Don't generate either pointer_type DIEs or reference_type DIEs here. + Use modified_type_die instead. + We keep this code here just in case these types of DIEs may be needed to + represent certain things in other languages (e.g. Pascal) someday. */ +static void +gen_reference_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register dw_die_ref ref_die + = new_die (DW_TAG_reference_type, scope_die_for (type, context_die)); + + equate_type_number_to_die (type, ref_die); + add_type_attribute (ref_die, TREE_TYPE (type), 0, 0, context_die); + add_AT_unsigned (mod_type_die, DW_AT_byte_size, PTR_SIZE); +} +#endif + +/* Generate a DIE for a pointer to a member type. */ +static void +gen_ptr_to_mbr_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register dw_die_ref ptr_die + = new_die (DW_TAG_ptr_to_member_type, scope_die_for (type, context_die)); + + equate_type_number_to_die (type, ptr_die); + add_AT_die_ref (ptr_die, DW_AT_containing_type, + lookup_type_die (TYPE_OFFSET_BASETYPE (type))); + add_type_attribute (ptr_die, TREE_TYPE (type), 0, 0, context_die); +} + +/* Generate the DIE for the compilation unit. */ + +static void +gen_compile_unit_die (main_input_filename) + register char *main_input_filename; +{ + char producer[250]; + char *wd = getpwd (); + + comp_unit_die = new_die (DW_TAG_compile_unit, NULL); + add_name_attribute (comp_unit_die, main_input_filename); + + if (wd != NULL) + add_AT_string (comp_unit_die, DW_AT_comp_dir, wd); + + sprintf (producer, "%s %s", language_string, version_string); + +#ifdef MIPS_DEBUGGING_INFO + /* The MIPS/SGI compilers place the 'cc' command line options in the producer + string. The SGI debugger looks for -g, -g1, -g2, or -g3; if they do + not appear in the producer string, the debugger reaches the conclusion + that the object file is stripped and has no debugging information. + To get the MIPS/SGI debugger to believe that there is debugging + information in the object file, we add a -g to the producer string. */ + if (debug_info_level > DINFO_LEVEL_TERSE) + strcat (producer, " -g"); +#endif + + add_AT_string (comp_unit_die, DW_AT_producer, producer); + + if (strcmp (language_string, "GNU C++") == 0) + add_AT_unsigned (comp_unit_die, DW_AT_language, DW_LANG_C_plus_plus); + + else if (strcmp (language_string, "GNU Ada") == 0) + add_AT_unsigned (comp_unit_die, DW_AT_language, DW_LANG_Ada83); + + else if (strcmp (language_string, "GNU F77") == 0) + add_AT_unsigned (comp_unit_die, DW_AT_language, DW_LANG_Fortran77); + + else if (strcmp (language_string, "GNU Pascal") == 0) + add_AT_unsigned (comp_unit_die, DW_AT_language, DW_LANG_Pascal83); + + else if (flag_traditional) + add_AT_unsigned (comp_unit_die, DW_AT_language, DW_LANG_C); + + else + add_AT_unsigned (comp_unit_die, DW_AT_language, DW_LANG_C89); + +#if 0 /* unimplemented */ + if (debug_info_level >= DINFO_LEVEL_VERBOSE) + add_AT_unsigned (comp_unit_die, DW_AT_macro_info, 0); +#endif +} + +/* Generate a DIE for a string type. */ + +static void +gen_string_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register dw_die_ref type_die + = new_die (DW_TAG_string_type, scope_die_for (type, context_die)); + + equate_type_number_to_die (type, type_die); + + /* Fudge the string length attribute for now. */ + + /* TODO: add string length info. + string_length_attribute (TYPE_MAX_VALUE (TYPE_DOMAIN (type))); + bound_representation (upper_bound, 0, 'u'); */ +} + +/* Generate the DIE for a base class. */ + +static void +gen_inheritance_die (binfo, context_die) + register tree binfo; + register dw_die_ref context_die; +{ + dw_die_ref die = new_die (DW_TAG_inheritance, context_die); + + add_type_attribute (die, BINFO_TYPE (binfo), 0, 0, context_die); + add_data_member_location_attribute (die, binfo); + + if (TREE_VIA_VIRTUAL (binfo)) + add_AT_unsigned (die, DW_AT_virtuality, DW_VIRTUALITY_virtual); + if (TREE_VIA_PUBLIC (binfo)) + add_AT_unsigned (die, DW_AT_accessibility, DW_ACCESS_public); + else if (TREE_VIA_PROTECTED (binfo)) + add_AT_unsigned (die, DW_AT_accessibility, DW_ACCESS_protected); +} + +/* Generate a DIE for a class member. */ + +static void +gen_member_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register tree member; + + /* If this is not an incomplete type, output descriptions of each of its + members. Note that as we output the DIEs necessary to represent the + members of this record or union type, we will also be trying to output + DIEs to represent the *types* of those members. However the `type' + function (above) will specifically avoid generating type DIEs for member + types *within* the list of member DIEs for this (containing) type execpt + for those types (of members) which are explicitly marked as also being + members of this (containing) type themselves. The g++ front- end can + force any given type to be treated as a member of some other + (containing) type by setting the TYPE_CONTEXT of the given (member) type + to point to the TREE node representing the appropriate (containing) + type. */ + + /* First output info about the base classes. */ + if (TYPE_BINFO (type) && TYPE_BINFO_BASETYPES (type)) + { + register tree bases = TYPE_BINFO_BASETYPES (type); + register int n_bases = TREE_VEC_LENGTH (bases); + register int i; + + for (i = 0; i < n_bases; i++) + gen_inheritance_die (TREE_VEC_ELT (bases, i), context_die); + } + + /* Now output info about the data members and type members. */ + for (member = TYPE_FIELDS (type); member; member = TREE_CHAIN (member)) + gen_decl_die (member, context_die); + + /* Now output info about the function members (if any). */ + for (member = TYPE_METHODS (type); member; member = TREE_CHAIN (member)) + gen_decl_die (member, context_die); +} + +/* Generate a DIE for a structure or union type. */ + +static void +gen_struct_or_union_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register dw_die_ref type_die = lookup_type_die (type); + register dw_die_ref scope_die = 0; + register int nested = 0; + + if (type_die && ! TYPE_SIZE (type)) + return; + + if (TYPE_CONTEXT (type) != NULL_TREE + && TREE_CODE_CLASS (TREE_CODE (TYPE_CONTEXT (type))) == 't') + nested = 1; + + scope_die = scope_die_for (type, context_die); + + if (! type_die || (nested && scope_die == comp_unit_die)) + /* First occurrence of type or toplevel definition of nested class. */ + { + register dw_die_ref old_die = type_die; + + type_die = new_die (TREE_CODE (type) == RECORD_TYPE + ? DW_TAG_structure_type : DW_TAG_union_type, + scope_die); + equate_type_number_to_die (type, type_die); + add_name_attribute (type_die, type_tag (type)); + if (old_die) + add_AT_die_ref (type_die, DW_AT_specification, old_die); + } + else + remove_AT (type_die, DW_AT_declaration); + + /* If we're not in the right context to be defining this type, defer to + avoid tricky recursion. */ + if (TYPE_SIZE (type) && decl_scope_depth > 0 && scope_die == comp_unit_die) + { + add_AT_flag (type_die, DW_AT_declaration, 1); + pend_type (type); + } + /* If this type has been completed, then give it a byte_size attribute and + then give a list of members. */ + else if (TYPE_SIZE (type)) + { + /* Prevent infinite recursion in cases where the type of some member of + this type is expressed in terms of this type itself. */ + TREE_ASM_WRITTEN (type) = 1; + add_byte_size_attribute (type_die, type); + if (TYPE_STUB_DECL (type) != NULL_TREE) + add_src_coords_attributes (type_die, TYPE_STUB_DECL (type)); + + /* If the first reference to this type was as the return type of an + inline function, then it may not have a parent. Fix this now. */ + if (type_die->die_parent == NULL) + add_child_die (scope_die, type_die); + + push_decl_scope (type); + gen_member_die (type, type_die); + pop_decl_scope (); + + /* GNU extension: Record what type our vtable lives in. */ + if (TYPE_VFIELD (type)) + { + tree vtype = DECL_FCONTEXT (TYPE_VFIELD (type)); + + gen_type_die (vtype, context_die); + add_AT_die_ref (type_die, DW_AT_containing_type, + lookup_type_die (vtype)); + } + } + else + add_AT_flag (type_die, DW_AT_declaration, 1); +} + +/* Generate a DIE for a subroutine _type_. */ + +static void +gen_subroutine_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + register tree return_type = TREE_TYPE (type); + register dw_die_ref subr_die + = new_die (DW_TAG_subroutine_type, scope_die_for (type, context_die)); + + equate_type_number_to_die (type, subr_die); + add_prototyped_attribute (subr_die, type); + add_type_attribute (subr_die, return_type, 0, 0, context_die); + gen_formal_types_die (type, subr_die); +} + +/* Generate a DIE for a type definition */ + +static void +gen_typedef_die (decl, context_die) + register tree decl; + register dw_die_ref context_die; +{ + register dw_die_ref type_die; + register tree origin; + + if (TREE_ASM_WRITTEN (decl)) + return; + TREE_ASM_WRITTEN (decl) = 1; + + type_die = new_die (DW_TAG_typedef, scope_die_for (decl, context_die)); + origin = decl_ultimate_origin (decl); + if (origin != NULL) + add_abstract_origin_attribute (type_die, origin); + else + { + register tree type; + add_name_and_src_coords_attributes (type_die, decl); + if (DECL_ORIGINAL_TYPE (decl)) + { + type = DECL_ORIGINAL_TYPE (decl); + equate_type_number_to_die (TREE_TYPE (decl), type_die); + } + else + type = TREE_TYPE (decl); + add_type_attribute (type_die, type, TREE_READONLY (decl), + TREE_THIS_VOLATILE (decl), context_die); + } + + if (DECL_ABSTRACT (decl)) + equate_decl_number_to_die (decl, type_die); +} + +/* Generate a type description DIE. */ + +static void +gen_type_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + if (type == NULL_TREE || type == error_mark_node) + return; + + /* We are going to output a DIE to represent the unqualified version of of + this type (i.e. without any const or volatile qualifiers) so get the + main variant (i.e. the unqualified version) of this type now. */ + type = type_main_variant (type); + + if (TREE_ASM_WRITTEN (type)) + return; + + if (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL + && DECL_ORIGINAL_TYPE (TYPE_NAME (type))) + { + TREE_ASM_WRITTEN (type) = 1; + gen_decl_die (TYPE_NAME (type), context_die); + return; + } + + switch (TREE_CODE (type)) + { + case ERROR_MARK: + break; + + case POINTER_TYPE: + case REFERENCE_TYPE: + /* We must set TREE_ASM_WRITTEN in case this is a recursive type. This + ensures that the gen_type_die recursion will terminate even if the + type is recursive. Recursive types are possible in Ada. */ + /* ??? We could perhaps do this for all types before the switch + statement. */ + TREE_ASM_WRITTEN (type) = 1; + + /* For these types, all that is required is that we output a DIE (or a + set of DIEs) to represent the "basis" type. */ + gen_type_die (TREE_TYPE (type), context_die); + break; + + case OFFSET_TYPE: + /* This code is used for C++ pointer-to-data-member types. + Output a description of the relevant class type. */ + gen_type_die (TYPE_OFFSET_BASETYPE (type), context_die); + + /* Output a description of the type of the object pointed to. */ + gen_type_die (TREE_TYPE (type), context_die); + + /* Now output a DIE to represent this pointer-to-data-member type + itself. */ + gen_ptr_to_mbr_type_die (type, context_die); + break; + + case SET_TYPE: + gen_type_die (TYPE_DOMAIN (type), context_die); + gen_set_type_die (type, context_die); + break; + + case FILE_TYPE: + gen_type_die (TREE_TYPE (type), context_die); + abort (); /* No way to represent these in Dwarf yet! */ + break; + + case FUNCTION_TYPE: + /* Force out return type (in case it wasn't forced out already). */ + gen_type_die (TREE_TYPE (type), context_die); + gen_subroutine_type_die (type, context_die); + break; + + case METHOD_TYPE: + /* Force out return type (in case it wasn't forced out already). */ + gen_type_die (TREE_TYPE (type), context_die); + gen_subroutine_type_die (type, context_die); + break; + + case ARRAY_TYPE: + if (TYPE_STRING_FLAG (type) && TREE_CODE (TREE_TYPE (type)) == CHAR_TYPE) + { + gen_type_die (TREE_TYPE (type), context_die); + gen_string_type_die (type, context_die); + } + else + gen_array_type_die (type, context_die); + break; + + case ENUMERAL_TYPE: + case RECORD_TYPE: + case UNION_TYPE: + case QUAL_UNION_TYPE: + /* If this is a nested type whose containing class hasn't been + written out yet, writing it out will cover this one, too. */ + if (TYPE_CONTEXT (type) + && TREE_CODE_CLASS (TREE_CODE (TYPE_CONTEXT (type))) == 't' + && ! TREE_ASM_WRITTEN (TYPE_CONTEXT (type))) + { + gen_type_die (TYPE_CONTEXT (type), context_die); + + if (TREE_ASM_WRITTEN (TYPE_CONTEXT (type))) + return; + + /* If that failed, attach ourselves to the stub. */ + push_decl_scope (TYPE_CONTEXT (type)); + context_die = lookup_type_die (TYPE_CONTEXT (type)); + } + + if (TREE_CODE (type) == ENUMERAL_TYPE) + gen_enumeration_type_die (type, context_die); + else + gen_struct_or_union_type_die (type, context_die); + + if (TYPE_CONTEXT (type) + && TREE_CODE_CLASS (TREE_CODE (TYPE_CONTEXT (type))) == 't' + && ! TREE_ASM_WRITTEN (TYPE_CONTEXT (type))) + pop_decl_scope (); + + /* Don't set TREE_ASM_WRITTEN on an incomplete struct; we want to fix + it up if it is ever completed. gen_*_type_die will set it for us + when appropriate. */ + return; + + case VOID_TYPE: + case INTEGER_TYPE: + case REAL_TYPE: + case COMPLEX_TYPE: + case BOOLEAN_TYPE: + case CHAR_TYPE: + /* No DIEs needed for fundamental types. */ + break; + + case LANG_TYPE: + /* No Dwarf representation currently defined. */ + break; + + default: + abort (); + } + + TREE_ASM_WRITTEN (type) = 1; +} + +/* Generate a DIE for a tagged type instantiation. */ + +static void +gen_tagged_type_instantiation_die (type, context_die) + register tree type; + register dw_die_ref context_die; +{ + if (type == NULL_TREE || type == error_mark_node) + return; + + /* We are going to output a DIE to represent the unqualified version of of + this type (i.e. without any const or volatile qualifiers) so make sure + that we have the main variant (i.e. the unqualified version) of this + type now. */ + assert (type == type_main_variant (type)); + assert (TREE_ASM_WRITTEN (type)); + + switch (TREE_CODE (type)) + { + case ERROR_MARK: + break; + + case ENUMERAL_TYPE: + gen_inlined_enumeration_type_die (type, context_die); + break; + + case RECORD_TYPE: + gen_inlined_structure_type_die (type, context_die); + break; + + case UNION_TYPE: + case QUAL_UNION_TYPE: + gen_inlined_union_type_die (type, context_die); + break; + + default: + abort (); + } +} + +/* Generate a DW_TAG_lexical_block DIE followed by DIEs to represent all of the + things which are local to the given block. */ + +static void +gen_block_die (stmt, context_die, depth) + register tree stmt; + register dw_die_ref context_die; + int depth; +{ + register int must_output_die = 0; + register tree origin; + register tree decl; + register enum tree_code origin_code; + + /* Ignore blocks never really used to make RTL. */ + + if (stmt == NULL_TREE || !TREE_USED (stmt)) + return; + + /* Determine the "ultimate origin" of this block. This block may be an + inlined instance of an inlined instance of inline function, so we have + to trace all of the way back through the origin chain to find out what + sort of node actually served as the original seed for the creation of + the current block. */ + origin = block_ultimate_origin (stmt); + origin_code = (origin != NULL) ? TREE_CODE (origin) : ERROR_MARK; + + /* Determine if we need to output any Dwarf DIEs at all to represent this + block. */ + if (origin_code == FUNCTION_DECL) + /* The outer scopes for inlinings *must* always be represented. We + generate DW_TAG_inlined_subroutine DIEs for them. (See below.) */ + must_output_die = 1; + else + { + /* In the case where the current block represents an inlining of the + "body block" of an inline function, we must *NOT* output any DIE for + this block because we have already output a DIE to represent the + whole inlined function scope and the "body block" of any function + doesn't really represent a different scope according to ANSI C + rules. So we check here to make sure that this block does not + represent a "body block inlining" before trying to set the + `must_output_die' flag. */ + if (! is_body_block (origin ? origin : stmt)) + { + /* Determine if this block directly contains any "significant" + local declarations which we will need to output DIEs for. */ + if (debug_info_level > DINFO_LEVEL_TERSE) + /* We are not in terse mode so *any* local declaration counts + as being a "significant" one. */ + must_output_die = (BLOCK_VARS (stmt) != NULL); + else + /* We are in terse mode, so only local (nested) function + definitions count as "significant" local declarations. */ + for (decl = BLOCK_VARS (stmt); + decl != NULL; decl = TREE_CHAIN (decl)) + if (TREE_CODE (decl) == FUNCTION_DECL + && DECL_INITIAL (decl)) + { + must_output_die = 1; + break; + } + } + } + + /* It would be a waste of space to generate a Dwarf DW_TAG_lexical_block + DIE for any block which contains no significant local declarations at + all. Rather, in such cases we just call `decls_for_scope' so that any + needed Dwarf info for any sub-blocks will get properly generated. Note + that in terse mode, our definition of what constitutes a "significant" + local declaration gets restricted to include only inlined function + instances and local (nested) function definitions. */ + if (must_output_die) + { + if (origin_code == FUNCTION_DECL) + gen_inlined_subroutine_die (stmt, context_die, depth); + else + gen_lexical_block_die (stmt, context_die, depth); + } + else + decls_for_scope (stmt, context_die, depth); +} + +/* Generate all of the decls declared within a given scope and (recursively) + all of it's sub-blocks. */ + +static void +decls_for_scope (stmt, context_die, depth) + register tree stmt; + register dw_die_ref context_die; + int depth; +{ + register tree decl; + register tree subblocks; + + /* Ignore blocks never really used to make RTL. */ + if (stmt == NULL_TREE || ! TREE_USED (stmt)) + return; + + if (!BLOCK_ABSTRACT (stmt) && depth > 0) + next_block_number++; + + /* Output the DIEs to represent all of the data objects and typedefs + declared directly within this block but not within any nested + sub-blocks. Also, nested function and tag DIEs have been + generated with a parent of NULL; fix that up now. */ + for (decl = BLOCK_VARS (stmt); + decl != NULL; decl = TREE_CHAIN (decl)) + { + register dw_die_ref die; + + if (TREE_CODE (decl) == FUNCTION_DECL) + die = lookup_decl_die (decl); + else if (TREE_CODE (decl) == TYPE_DECL && TYPE_DECL_IS_STUB (decl)) + die = lookup_type_die (TREE_TYPE (decl)); + else + die = NULL; + + if (die != NULL && die->die_parent == NULL) + add_child_die (context_die, die); + else + gen_decl_die (decl, context_die); + } + + /* Output the DIEs to represent all sub-blocks (and the items declared + therein) of this block. */ + for (subblocks = BLOCK_SUBBLOCKS (stmt); + subblocks != NULL; + subblocks = BLOCK_CHAIN (subblocks)) + gen_block_die (subblocks, context_die, depth + 1); +} + +/* Is this a typedef we can avoid emitting? */ + +static inline int +is_redundant_typedef (decl) + register tree decl; +{ + if (TYPE_DECL_IS_STUB (decl)) + return 1; + + if (DECL_ARTIFICIAL (decl) + && DECL_CONTEXT (decl) + && is_tagged_type (DECL_CONTEXT (decl)) + && TREE_CODE (TYPE_NAME (DECL_CONTEXT (decl))) == TYPE_DECL + && DECL_NAME (decl) == DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl)))) + /* Also ignore the artificial member typedef for the class name. */ + return 1; + + return 0; +} + +/* Generate Dwarf debug information for a decl described by DECL. */ + +static void +gen_decl_die (decl, context_die) + register tree decl; + register dw_die_ref context_die; +{ + register tree origin; + + /* Make a note of the decl node we are going to be working on. We may need + to give the user the source coordinates of where it appeared in case we + notice (later on) that something about it looks screwy. */ + dwarf_last_decl = decl; + + if (TREE_CODE (decl) == ERROR_MARK) + return; + + /* If this ..._DECL node is marked to be ignored, then ignore it. But don't + ignore a function definition, since that would screw up our count of + blocks, and that it turn will completely screw up the the labels we will + reference in subsequent DW_AT_low_pc and DW_AT_high_pc attributes (for + subsequent blocks). */ + if (DECL_IGNORED_P (decl) && TREE_CODE (decl) != FUNCTION_DECL) + return; + + switch (TREE_CODE (decl)) + { + case CONST_DECL: + /* The individual enumerators of an enum type get output when we output + the Dwarf representation of the relevant enum type itself. */ + break; + + case FUNCTION_DECL: + /* Don't output any DIEs to represent mere function declarations, + unless they are class members or explicit block externs. */ + if (DECL_INITIAL (decl) == NULL_TREE && DECL_CONTEXT (decl) == NULL_TREE + && (current_function_decl == NULL_TREE || ! DECL_ARTIFICIAL (decl))) + break; + + if (debug_info_level > DINFO_LEVEL_TERSE) + { + /* Before we describe the FUNCTION_DECL itself, make sure that we + have described its return type. */ + gen_type_die (TREE_TYPE (TREE_TYPE (decl)), context_die); + + /* And its containing type. */ + origin = decl_class_context (decl); + if (origin != NULL_TREE) + gen_type_die (origin, context_die); + + /* And its virtual context. */ + if (DECL_VINDEX (decl) != NULL_TREE) + gen_type_die (DECL_CONTEXT (decl), context_die); + } + + /* Now output a DIE to represent the function itself. */ + gen_subprogram_die (decl, context_die); + break; + + case TYPE_DECL: + /* If we are in terse mode, don't generate any DIEs to represent any + actual typedefs. */ + if (debug_info_level <= DINFO_LEVEL_TERSE) + break; + + /* In the special case of a TYPE_DECL node representing the + declaration of some type tag, if the given TYPE_DECL is marked as + having been instantiated from some other (original) TYPE_DECL node + (e.g. one which was generated within the original definition of an + inline function) we have to generate a special (abbreviated) + DW_TAG_structure_type, DW_TAG_union_type, or DW_TAG_enumeration_type + DIE here. */ + if (TYPE_DECL_IS_STUB (decl) && DECL_ABSTRACT_ORIGIN (decl) != NULL_TREE) + { + gen_tagged_type_instantiation_die (TREE_TYPE (decl), context_die); + break; + } + + if (is_redundant_typedef (decl)) + gen_type_die (TREE_TYPE (decl), context_die); + else + /* Output a DIE to represent the typedef itself. */ + gen_typedef_die (decl, context_die); + break; + + case LABEL_DECL: + if (debug_info_level >= DINFO_LEVEL_NORMAL) + gen_label_die (decl, context_die); + break; + + case VAR_DECL: + /* If we are in terse mode, don't generate any DIEs to represent any + variable declarations or definitions. */ + if (debug_info_level <= DINFO_LEVEL_TERSE) + break; + + /* Output any DIEs that are needed to specify the type of this data + object. */ + gen_type_die (TREE_TYPE (decl), context_die); + + /* And its containing type. */ + origin = decl_class_context (decl); + if (origin != NULL_TREE) + gen_type_die (origin, context_die); + + /* Now output the DIE to represent the data object itself. This gets + complicated because of the possibility that the VAR_DECL really + represents an inlined instance of a formal parameter for an inline + function. */ + origin = decl_ultimate_origin (decl); + if (origin != NULL_TREE && TREE_CODE (origin) == PARM_DECL) + gen_formal_parameter_die (decl, context_die); + else + gen_variable_die (decl, context_die); + break; + + case FIELD_DECL: + /* Ignore the nameless fields that are used to skip bits, but + handle C++ anonymous unions. */ + if (DECL_NAME (decl) != NULL_TREE + || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE) + { + gen_type_die (member_declared_type (decl), context_die); + gen_field_die (decl, context_die); + } + break; + + case PARM_DECL: + gen_type_die (TREE_TYPE (decl), context_die); + gen_formal_parameter_die (decl, context_die); + break; + + default: + abort (); + } +} + +/* Write the debugging output for DECL. */ + +void +dwarf2out_decl (decl) + register tree decl; +{ + register dw_die_ref context_die = comp_unit_die; + + if (TREE_CODE (decl) == ERROR_MARK) + return; + + /* If this ..._DECL node is marked to be ignored, then ignore it. We gotta + hope that the node in question doesn't represent a function definition. + If it does, then totally ignoring it is bound to screw up our count of + blocks, and that it turn will completely screw up the the labels we will + reference in subsequent DW_AT_low_pc and DW_AT_high_pc attributes (for + subsequent blocks). (It's too bad that BLOCK nodes don't carry their + own sequence numbers with them!) */ + if (DECL_IGNORED_P (decl)) + { + if (TREE_CODE (decl) == FUNCTION_DECL + && DECL_INITIAL (decl) != NULL) + abort (); + + return; + } + + switch (TREE_CODE (decl)) + { + case FUNCTION_DECL: + /* Ignore this FUNCTION_DECL if it refers to a builtin declaration of a + builtin function. Explicit programmer-supplied declarations of + these same functions should NOT be ignored however. */ + if (DECL_EXTERNAL (decl) && DECL_FUNCTION_CODE (decl)) + return; + + /* What we would really like to do here is to filter out all mere + file-scope declarations of file-scope functions which are never + referenced later within this translation unit (and keep all of ones + that *are* referenced later on) but we aren't clairvoyant, so we have + no idea which functions will be referenced in the future (i.e. later + on within the current translation unit). So here we just ignore all + file-scope function declarations which are not also definitions. If + and when the debugger needs to know something about these functions, + it wil have to hunt around and find the DWARF information associated + with the definition of the function. Note that we can't just check + `DECL_EXTERNAL' to find out which FUNCTION_DECL nodes represent + definitions and which ones represent mere declarations. We have to + check `DECL_INITIAL' instead. That's because the C front-end + supports some weird semantics for "extern inline" function + definitions. These can get inlined within the current translation + unit (an thus, we need to generate DWARF info for their abstract + instances so that the DWARF info for the concrete inlined instances + can have something to refer to) but the compiler never generates any + out-of-lines instances of such things (despite the fact that they + *are* definitions). The important point is that the C front-end + marks these "extern inline" functions as DECL_EXTERNAL, but we need + to generate DWARF for them anyway. Note that the C++ front-end also + plays some similar games for inline function definitions appearing + within include files which also contain + `#pragma interface' pragmas. */ + if (DECL_INITIAL (decl) == NULL_TREE) + return; + + /* If we're a nested function, initially use a parent of NULL; if we're + a plain function, this will be fixed up in decls_for_scope. If + we're a method, it will be ignored, since we already have a DIE. */ + if (decl_function_context (decl)) + context_die = NULL; + + break; + + case VAR_DECL: + /* Ignore this VAR_DECL if it refers to a file-scope extern data object + declaration and if the declaration was never even referenced from + within this entire compilation unit. We suppress these DIEs in + order to save space in the .debug section (by eliminating entries + which are probably useless). Note that we must not suppress + block-local extern declarations (whether used or not) because that + would screw-up the debugger's name lookup mechanism and cause it to + miss things which really ought to be in scope at a given point. */ + if (DECL_EXTERNAL (decl) && !TREE_USED (decl)) + return; + + /* If we are in terse mode, don't generate any DIEs to represent any + variable declarations or definitions. */ + if (debug_info_level <= DINFO_LEVEL_TERSE) + return; + break; + + case TYPE_DECL: + /* Don't bother trying to generate any DIEs to represent any of the + normal built-in types for the language we are compiling. */ + if (DECL_SOURCE_LINE (decl) == 0) + { + /* OK, we need to generate one for `bool' so GDB knows what type + comparisons have. */ + if ((get_AT_unsigned (comp_unit_die, DW_AT_language) + == DW_LANG_C_plus_plus) + && TREE_CODE (TREE_TYPE (decl)) == BOOLEAN_TYPE) + modified_type_die (TREE_TYPE (decl), 0, 0, NULL); + + return; + } + + /* If we are in terse mode, don't generate any DIEs for types. */ + if (debug_info_level <= DINFO_LEVEL_TERSE) + return; + + /* If we're a function-scope tag, initially use a parent of NULL; + this will be fixed up in decls_for_scope. */ + if (decl_function_context (decl)) + context_die = NULL; + + break; + + default: + return; + } + + gen_decl_die (decl, context_die); + output_pending_types_for_scope (comp_unit_die); +} + +/* Output a marker (i.e. a label) for the beginning of the generated code for + a lexical block. */ + +void +dwarf2out_begin_block (blocknum) + register unsigned blocknum; +{ + function_section (current_function_decl); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, BLOCK_BEGIN_LABEL, blocknum); +} + +/* Output a marker (i.e. a label) for the end of the generated code for a + lexical block. */ + +void +dwarf2out_end_block (blocknum) + register unsigned blocknum; +{ + function_section (current_function_decl); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, BLOCK_END_LABEL, blocknum); +} + +/* Output a marker (i.e. a label) at a point in the assembly code which + corresponds to a given source level label. */ + +void +dwarf2out_label (insn) + register rtx insn; +{ + char label[MAX_ARTIFICIAL_LABEL_BYTES]; + + if (debug_info_level >= DINFO_LEVEL_NORMAL) + { + function_section (current_function_decl); + sprintf (label, INSN_LABEL_FMT, current_funcdef_number); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, label, + (unsigned) INSN_UID (insn)); + } +} + +/* Lookup a filename (in the list of filenames that we know about here in + dwarf2out.c) and return its "index". The index of each (known) filename is + just a unique number which is associated with only that one filename. + We need such numbers for the sake of generating labels + (in the .debug_sfnames section) and references to those + files numbers (in the .debug_srcinfo and.debug_macinfo sections). + If the filename given as an argument is not found in our current list, + add it to the list and assign it the next available unique index number. + In order to speed up searches, we remember the index of the filename + was looked up last. This handles the majority of all searches. */ + +static unsigned +lookup_filename (file_name) + char *file_name; +{ + static unsigned last_file_lookup_index = 0; + register unsigned i; + + /* Check to see if the file name that was searched on the previous call + matches this file name. If so, return the index. */ + if (last_file_lookup_index != 0) + if (strcmp (file_name, file_table[last_file_lookup_index]) == 0) + return last_file_lookup_index; + + /* Didn't match the previous lookup, search the table */ + for (i = 1; i < file_table_in_use; ++i) + if (strcmp (file_name, file_table[i]) == 0) + { + last_file_lookup_index = i; + return i; + } + + /* Prepare to add a new table entry by making sure there is enough space in + the table to do so. If not, expand the current table. */ + if (file_table_in_use == file_table_allocated) + { + file_table_allocated += FILE_TABLE_INCREMENT; + file_table + = (char **) xrealloc (file_table, + file_table_allocated * sizeof (char *)); + } + + /* Add the new entry to the end of the filename table. */ + file_table[file_table_in_use] = xstrdup (file_name); + last_file_lookup_index = file_table_in_use++; + + return last_file_lookup_index; +} + +/* Output a label to mark the beginning of a source code line entry + and record information relating to this source line, in + 'line_info_table' for later output of the .debug_line section. */ + +void +dwarf2out_line (filename, line) + register char *filename; + register unsigned line; +{ + if (debug_info_level >= DINFO_LEVEL_NORMAL) + { + function_section (current_function_decl); + + if (DECL_SECTION_NAME (current_function_decl)) + { + register dw_separate_line_info_ref line_info; + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, SEPARATE_LINE_CODE_LABEL, + separate_line_info_table_in_use); + fputc ('\n', asm_out_file); + + /* expand the line info table if necessary */ + if (separate_line_info_table_in_use + == separate_line_info_table_allocated) + { + separate_line_info_table_allocated += LINE_INFO_TABLE_INCREMENT; + separate_line_info_table + = (dw_separate_line_info_ref) + xrealloc (separate_line_info_table, + separate_line_info_table_allocated + * sizeof (dw_separate_line_info_entry)); + } + + /* Add the new entry at the end of the line_info_table. */ + line_info + = &separate_line_info_table[separate_line_info_table_in_use++]; + line_info->dw_file_num = lookup_filename (filename); + line_info->dw_line_num = line; + line_info->function = current_funcdef_number; + } + else + { + register dw_line_info_ref line_info; + + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, LINE_CODE_LABEL, + line_info_table_in_use); + fputc ('\n', asm_out_file); + + /* Expand the line info table if necessary. */ + if (line_info_table_in_use == line_info_table_allocated) + { + line_info_table_allocated += LINE_INFO_TABLE_INCREMENT; + line_info_table + = (dw_line_info_ref) + xrealloc (line_info_table, + (line_info_table_allocated + * sizeof (dw_line_info_entry))); + } + + /* Add the new entry at the end of the line_info_table. */ + line_info = &line_info_table[line_info_table_in_use++]; + line_info->dw_file_num = lookup_filename (filename); + line_info->dw_line_num = line; + } + } +} + +/* Record the beginning of a new source file, for later output + of the .debug_macinfo section. At present, unimplemented. */ + +void +dwarf2out_start_source_file (filename) + register char *filename; +{ +} + +/* Record the end of a source file, for later output + of the .debug_macinfo section. At present, unimplemented. */ + +void +dwarf2out_end_source_file () +{ +} + +/* Called from check_newline in c-parse.y. The `buffer' parameter contains + the tail part of the directive line, i.e. the part which is past the + initial whitespace, #, whitespace, directive-name, whitespace part. */ + +void +dwarf2out_define (lineno, buffer) + register unsigned lineno; + register char *buffer; +{ + static int initialized = 0; + if (!initialized) + { + dwarf2out_start_source_file (primary_filename); + initialized = 1; + } +} + +/* Called from check_newline in c-parse.y. The `buffer' parameter contains + the tail part of the directive line, i.e. the part which is past the + initial whitespace, #, whitespace, directive-name, whitespace part. */ + +void +dwarf2out_undef (lineno, buffer) + register unsigned lineno; + register char *buffer; +{ +} + +/* Set up for Dwarf output at the start of compilation. */ + +void +dwarf2out_init (asm_out_file, main_input_filename) + register FILE *asm_out_file; + register char *main_input_filename; +{ + /* Remember the name of the primary input file. */ + primary_filename = main_input_filename; + + /* Allocate the initial hunk of the file_table. */ + file_table = (char **) xmalloc (FILE_TABLE_INCREMENT * sizeof (char *)); + bzero ((char *) file_table, FILE_TABLE_INCREMENT * sizeof (char *)); + file_table_allocated = FILE_TABLE_INCREMENT; + + /* Skip the first entry - file numbers begin at 1. */ + file_table_in_use = 1; + + /* Allocate the initial hunk of the decl_die_table. */ + decl_die_table + = (dw_die_ref *) xmalloc (DECL_DIE_TABLE_INCREMENT * sizeof (dw_die_ref)); + bzero ((char *) decl_die_table, + DECL_DIE_TABLE_INCREMENT * sizeof (dw_die_ref)); + decl_die_table_allocated = DECL_DIE_TABLE_INCREMENT; + decl_die_table_in_use = 0; + + /* Allocate the initial hunk of the decl_scope_table. */ + decl_scope_table + = (tree *) xmalloc (DECL_SCOPE_TABLE_INCREMENT * sizeof (tree)); + bzero ((char *) decl_scope_table, + DECL_SCOPE_TABLE_INCREMENT * sizeof (tree)); + decl_scope_table_allocated = DECL_SCOPE_TABLE_INCREMENT; + decl_scope_depth = 0; + + /* Allocate the initial hunk of the abbrev_die_table. */ + abbrev_die_table + = (dw_die_ref *) xmalloc (ABBREV_DIE_TABLE_INCREMENT + * sizeof (dw_die_ref)); + bzero ((char *) abbrev_die_table, + ABBREV_DIE_TABLE_INCREMENT * sizeof (dw_die_ref)); + abbrev_die_table_allocated = ABBREV_DIE_TABLE_INCREMENT; + /* Zero-th entry is allocated, but unused */ + abbrev_die_table_in_use = 1; + + /* Allocate the initial hunk of the line_info_table. */ + line_info_table + = (dw_line_info_ref) xmalloc (LINE_INFO_TABLE_INCREMENT + * sizeof (dw_line_info_entry)); + bzero ((char *) line_info_table, + LINE_INFO_TABLE_INCREMENT * sizeof (dw_line_info_entry)); + line_info_table_allocated = LINE_INFO_TABLE_INCREMENT; + /* Zero-th entry is allocated, but unused */ + line_info_table_in_use = 1; + + /* Generate the initial DIE for the .debug section. Note that the (string) + value given in the DW_AT_name attribute of the DW_TAG_compile_unit DIE + will (typically) be a relative pathname and that this pathname should be + taken as being relative to the directory from which the compiler was + invoked when the given (base) source file was compiled. */ + gen_compile_unit_die (main_input_filename); + + ASM_GENERATE_INTERNAL_LABEL (text_end_label, TEXT_END_LABEL, 0); +} + +/* Output stuff that dwarf requires at the end of every file, + and generate the DWARF-2 debugging info. */ + +void +dwarf2out_finish () +{ + limbo_die_node *node, *next_node; + dw_die_ref die; + dw_attr_ref a; + + /* Traverse the limbo die list, and add parent/child links. The only + dies without parents that should be here are concrete instances of + inline functions, and the comp_unit_die. We can ignore the comp_unit_die. + For concrete instances, we can get the parent die from the abstract + instance. */ + for (node = limbo_die_list; node; node = next_node) + { + next_node = node->next; + die = node->die; + + if (die->die_parent == NULL) + { + a = get_AT (die, DW_AT_abstract_origin); + if (a) + add_child_die (a->dw_attr_val.v.val_die_ref->die_parent, die); + else if (die == comp_unit_die) + ; + else + abort (); + } + free (node); + } + + /* Traverse the DIE tree and add sibling attributes to those DIE's + that have children. */ + add_sibling_attributes (comp_unit_die); + + /* Output a terminator label for the .text section. */ + fputc ('\n', asm_out_file); + ASM_OUTPUT_SECTION (asm_out_file, TEXT_SECTION); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, TEXT_END_LABEL, 0); + +#if 0 + /* Output a terminator label for the .data section. */ + fputc ('\n', asm_out_file); + ASM_OUTPUT_SECTION (asm_out_file, DATA_SECTION); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, DATA_END_LABEL, 0); + + /* Output a terminator label for the .bss section. */ + fputc ('\n', asm_out_file); + ASM_OUTPUT_SECTION (asm_out_file, BSS_SECTION); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, BSS_END_LABEL, 0); +#endif + + /* Output the source line correspondence table. */ + if (line_info_table_in_use > 1 || separate_line_info_table_in_use) + { + fputc ('\n', asm_out_file); + ASM_OUTPUT_SECTION (asm_out_file, DEBUG_LINE_SECTION); + output_line_info (); + + /* We can only use the low/high_pc attributes if all of the code + was in .text. */ + if (separate_line_info_table_in_use == 0) + { + add_AT_lbl_id (comp_unit_die, DW_AT_low_pc, TEXT_SECTION); + add_AT_lbl_id (comp_unit_die, DW_AT_high_pc, text_end_label); + } + + add_AT_section_offset (comp_unit_die, DW_AT_stmt_list, DEBUG_LINE_SECTION); + } + + /* Output the abbreviation table. */ + fputc ('\n', asm_out_file); + ASM_OUTPUT_SECTION (asm_out_file, ABBREV_SECTION); + build_abbrev_table (comp_unit_die); + output_abbrev_section (); + + /* Initialize the beginning DIE offset - and calculate sizes/offsets. */ + next_die_offset = DWARF_COMPILE_UNIT_HEADER_SIZE; + calc_die_sizes (comp_unit_die); + + /* Output debugging information. */ + fputc ('\n', asm_out_file); + ASM_OUTPUT_SECTION (asm_out_file, DEBUG_INFO_SECTION); + output_compilation_unit_header (); + output_die (comp_unit_die); + + if (pubname_table_in_use) + { + /* Output public names table. */ + fputc ('\n', asm_out_file); + ASM_OUTPUT_SECTION (asm_out_file, PUBNAMES_SECTION); + output_pubnames (); + } + + if (fde_table_in_use) + { + /* Output the address range information. */ + fputc ('\n', asm_out_file); + ASM_OUTPUT_SECTION (asm_out_file, ARANGES_SECTION); + output_aranges (); + } +} +#endif /* DWARF2_DEBUGGING_INFO */ diff --git a/gnu/usr.bin/gcc/except.c b/gnu/usr.bin/gcc/except.c new file mode 100644 index 00000000000..d0922668a4d --- /dev/null +++ b/gnu/usr.bin/gcc/except.c @@ -0,0 +1,2319 @@ +/* Implements exception handling. + Copyright (C) 1989, 92-96, 1997 Free Software Foundation, Inc. + Contributed by Mike Stump <mrs@cygnus.com>. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + + +/* An exception is an event that can be signaled from within a + function. This event can then be "caught" or "trapped" by the + callers of this function. This potentially allows program flow to + be transferred to any arbitrary code associated with a function call + several levels up the stack. + + The intended use for this mechanism is for signaling "exceptional + events" in an out-of-band fashion, hence its name. The C++ language + (and many other OO-styled or functional languages) practically + requires such a mechanism, as otherwise it becomes very difficult + or even impossible to signal failure conditions in complex + situations. The traditional C++ example is when an error occurs in + the process of constructing an object; without such a mechanism, it + is impossible to signal that the error occurs without adding global + state variables and error checks around every object construction. + + The act of causing this event to occur is referred to as "throwing + an exception". (Alternate terms include "raising an exception" or + "signaling an exception".) The term "throw" is used because control + is returned to the callers of the function that is signaling the + exception, and thus there is the concept of "throwing" the + exception up the call stack. + + There are two major codegen options for exception handling. The + flag -fsjlj-exceptions can be used to select the setjmp/longjmp + approach, which is the default. -fno-sjlj-exceptions can be used to + get the PC range table approach. While this is a compile time + flag, an entire application must be compiled with the same codegen + option. The first is a PC range table approach, the second is a + setjmp/longjmp based scheme. We will first discuss the PC range + table approach, after that, we will discuss the setjmp/longjmp + based approach. + + It is appropriate to speak of the "context of a throw". This + context refers to the address where the exception is thrown from, + and is used to determine which exception region will handle the + exception. + + Regions of code within a function can be marked such that if it + contains the context of a throw, control will be passed to a + designated "exception handler". These areas are known as "exception + regions". Exception regions cannot overlap, but they can be nested + to any arbitrary depth. Also, exception regions cannot cross + function boundaries. + + Exception handlers can either be specified by the user (which we + will call a "user-defined handler") or generated by the compiler + (which we will designate as a "cleanup"). Cleanups are used to + perform tasks such as destruction of objects allocated on the + stack. + + In the current implementation, cleanups are handled by allocating an + exception region for the area that the cleanup is designated for, + and the handler for the region performs the cleanup and then + rethrows the exception to the outer exception region. From the + standpoint of the current implementation, there is little + distinction made between a cleanup and a user-defined handler, and + the phrase "exception handler" can be used to refer to either one + equally well. (The section "Future Directions" below discusses how + this will change). + + Each object file that is compiled with exception handling contains + a static array of exception handlers named __EXCEPTION_TABLE__. + Each entry contains the starting and ending addresses of the + exception region, and the address of the handler designated for + that region. + + If the target does not use the DWARF 2 frame unwind information, at + program startup each object file invokes a function named + __register_exceptions with the address of its local + __EXCEPTION_TABLE__. __register_exceptions is defined in libgcc2.c, and + is responsible for recording all of the exception regions into one list + (which is kept in a static variable named exception_table_list). + + On targets that support crtstuff.c, the unwind information + is stored in a section named .eh_frame and the information for the + entire shared object or program is registered with a call to + __register_frame_info. On other targets, the information for each + translation unit is registered from the file generated by collect2. + __register_frame_info is defined in frame.c, and is responsible for + recording all of the unwind regions into one list (which is kept in a + static variable named unwind_table_list). + + The function __throw is actually responsible for doing the + throw. On machines that have unwind info support, __throw is generated + by code in libgcc2.c, otherwise __throw is generated on a + per-object-file basis for each source file compiled with + -fexceptions by the the C++ frontend. Before __throw is invoked, + the current context of the throw needs to be placed in the global + variable __eh_pc. + + __throw attempts to find the appropriate exception handler for the + PC value stored in __eh_pc by calling __find_first_exception_table_match + (which is defined in libgcc2.c). If __find_first_exception_table_match + finds a relevant handler, __throw transfers control directly to it. + + If a handler for the context being thrown from can't be found, __throw + walks (see Walking the stack below) the stack up the dynamic call chain to + continue searching for an appropriate exception handler based upon the + caller of the function it last sought a exception handler for. It stops + then either an exception handler is found, or when the top of the + call chain is reached. + + If no handler is found, an external library function named + __terminate is called. If a handler is found, then we restart + our search for a handler at the end of the call chain, and repeat + the search process, but instead of just walking up the call chain, + we unwind the call chain as we walk up it. + + Internal implementation details: + + To associate a user-defined handler with a block of statements, the + function expand_start_try_stmts is used to mark the start of the + block of statements with which the handler is to be associated + (which is known as a "try block"). All statements that appear + afterwards will be associated with the try block. + + A call to expand_start_all_catch marks the end of the try block, + and also marks the start of the "catch block" (the user-defined + handler) associated with the try block. + + This user-defined handler will be invoked for *every* exception + thrown with the context of the try block. It is up to the handler + to decide whether or not it wishes to handle any given exception, + as there is currently no mechanism in this implementation for doing + this. (There are plans for conditionally processing an exception + based on its "type", which will provide a language-independent + mechanism). + + If the handler chooses not to process the exception (perhaps by + looking at an "exception type" or some other additional data + supplied with the exception), it can fall through to the end of the + handler. expand_end_all_catch and expand_leftover_cleanups + add additional code to the end of each handler to take care of + rethrowing to the outer exception handler. + + The handler also has the option to continue with "normal flow of + code", or in other words to resume executing at the statement + immediately after the end of the exception region. The variable + caught_return_label_stack contains a stack of labels, and jumping + to the topmost entry's label via expand_goto will resume normal + flow to the statement immediately after the end of the exception + region. If the handler falls through to the end, the exception will + be rethrown to the outer exception region. + + The instructions for the catch block are kept as a separate + sequence, and will be emitted at the end of the function along with + the handlers specified via expand_eh_region_end. The end of the + catch block is marked with expand_end_all_catch. + + Any data associated with the exception must currently be handled by + some external mechanism maintained in the frontend. For example, + the C++ exception mechanism passes an arbitrary value along with + the exception, and this is handled in the C++ frontend by using a + global variable to hold the value. (This will be changing in the + future.) + + The mechanism in C++ for handling data associated with the + exception is clearly not thread-safe. For a thread-based + environment, another mechanism must be used (possibly using a + per-thread allocation mechanism if the size of the area that needs + to be allocated isn't known at compile time.) + + Internally-generated exception regions (cleanups) are marked by + calling expand_eh_region_start to mark the start of the region, + and expand_eh_region_end (handler) is used to both designate the + end of the region and to associate a specified handler/cleanup with + the region. The rtl code in HANDLER will be invoked whenever an + exception occurs in the region between the calls to + expand_eh_region_start and expand_eh_region_end. After HANDLER is + executed, additional code is emitted to handle rethrowing the + exception to the outer exception handler. The code for HANDLER will + be emitted at the end of the function. + + TARGET_EXPRs can also be used to designate exception regions. A + TARGET_EXPR gives an unwind-protect style interface commonly used + in functional languages such as LISP. The associated expression is + evaluated, and whether or not it (or any of the functions that it + calls) throws an exception, the protect expression is always + invoked. This implementation takes care of the details of + associating an exception table entry with the expression and + generating the necessary code (it actually emits the protect + expression twice, once for normal flow and once for the exception + case). As for the other handlers, the code for the exception case + will be emitted at the end of the function. + + Cleanups can also be specified by using add_partial_entry (handler) + and end_protect_partials. add_partial_entry creates the start of + a new exception region; HANDLER will be invoked if an exception is + thrown with the context of the region between the calls to + add_partial_entry and end_protect_partials. end_protect_partials is + used to mark the end of these regions. add_partial_entry can be + called as many times as needed before calling end_protect_partials. + However, end_protect_partials should only be invoked once for each + group of calls to add_partial_entry as the entries are queued + and all of the outstanding entries are processed simultaneously + when end_protect_partials is invoked. Similarly to the other + handlers, the code for HANDLER will be emitted at the end of the + function. + + The generated RTL for an exception region includes + NOTE_INSN_EH_REGION_BEG and NOTE_INSN_EH_REGION_END notes that mark + the start and end of the exception region. A unique label is also + generated at the start of the exception region, which is available + by looking at the ehstack variable. The topmost entry corresponds + to the current region. + + In the current implementation, an exception can only be thrown from + a function call (since the mechanism used to actually throw an + exception involves calling __throw). If an exception region is + created but no function calls occur within that region, the region + can be safely optimized away (along with its exception handlers) + since no exceptions can ever be caught in that region. This + optimization is performed unless -fasynchronous-exceptions is + given. If the user wishes to throw from a signal handler, or other + asynchronous place, -fasynchronous-exceptions should be used when + compiling for maximally correct code, at the cost of additional + exception regions. Using -fasynchronous-exceptions only produces + code that is reasonably safe in such situations, but a correct + program cannot rely upon this working. It can be used in failsafe + code, where trying to continue on, and proceeding with potentially + incorrect results is better than halting the program. + + + Walking the stack: + + The stack is walked by starting with a pointer to the current + frame, and finding the pointer to the callers frame. The unwind info + tells __throw how to find it. + + Unwinding the stack: + + When we use the term unwinding the stack, we mean undoing the + effects of the function prologue in a controlled fashion so that we + still have the flow of control. Otherwise, we could just return + (jump to the normal end of function epilogue). + + This is done in __throw in libgcc2.c when we know that a handler exists + in a frame higher up the call stack than its immediate caller. + + To unwind, we find the unwind data associated with the frame, if any. + If we don't find any, we call the library routine __terminate. If we do + find it, we use the information to copy the saved register values from + that frame into the register save area in the frame for __throw, return + into a stub which updates the stack pointer, and jump to the handler. + The normal function epilogue for __throw handles restoring the saved + values into registers. + + When unwinding, we use this method if we know it will + work (if DWARF2_UNWIND_INFO is defined). Otherwise, we know that + an inline unwinder will have been emitted for any function that + __unwind_function cannot unwind. The inline unwinder appears as a + normal exception handler for the entire function, for any function + that we know cannot be unwound by __unwind_function. We inform the + compiler of whether a function can be unwound with + __unwind_function by having DOESNT_NEED_UNWINDER evaluate to true + when the unwinder isn't needed. __unwind_function is used as an + action of last resort. If no other method can be used for + unwinding, __unwind_function is used. If it cannot unwind, it + should call __terminate. + + By default, if the target-specific backend doesn't supply a definition + for __unwind_function and doesn't support DWARF2_UNWIND_INFO, inlined + unwinders will be used instead. The main tradeoff here is in text space + utilization. Obviously, if inline unwinders have to be generated + repeatedly, this uses much more space than if a single routine is used. + + However, it is simply not possible on some platforms to write a + generalized routine for doing stack unwinding without having some + form of additional data associated with each function. The current + implementation can encode this data in the form of additional + machine instructions or as static data in tabular form. The later + is called the unwind data. + + The backend macro DOESNT_NEED_UNWINDER is used to conditionalize whether + or not per-function unwinders are needed. If DOESNT_NEED_UNWINDER is + defined and has a non-zero value, a per-function unwinder is not emitted + for the current function. If the static unwind data is supported, then + a per-function unwinder is not emitted. + + On some platforms it is possible that neither __unwind_function + nor inlined unwinders are available. For these platforms it is not + possible to throw through a function call, and abort will be + invoked instead of performing the throw. + + The reason the unwind data may be needed is that on some platforms + the order and types of data stored on the stack can vary depending + on the type of function, its arguments and returned values, and the + compilation options used (optimization versus non-optimization, + -fomit-frame-pointer, processor variations, etc). + + Unfortunately, this also means that throwing through functions that + aren't compiled with exception handling support will still not be + possible on some platforms. This problem is currently being + investigated, but no solutions have been found that do not imply + some unacceptable performance penalties. + + Future directions: + + Currently __throw makes no differentiation between cleanups and + user-defined exception regions. While this makes the implementation + simple, it also implies that it is impossible to determine if a + user-defined exception handler exists for a given exception without + completely unwinding the stack in the process. This is undesirable + from the standpoint of debugging, as ideally it would be possible + to trap unhandled exceptions in the debugger before the process of + unwinding has even started. + + This problem can be solved by marking user-defined handlers in a + special way (probably by adding additional bits to exception_table_list). + A two-pass scheme could then be used by __throw to iterate + through the table. The first pass would search for a relevant + user-defined handler for the current context of the throw, and if + one is found, the second pass would then invoke all needed cleanups + before jumping to the user-defined handler. + + Many languages (including C++ and Ada) make execution of a + user-defined handler conditional on the "type" of the exception + thrown. (The type of the exception is actually the type of the data + that is thrown with the exception.) It will thus be necessary for + __throw to be able to determine if a given user-defined + exception handler will actually be executed, given the type of + exception. + + One scheme is to add additional information to exception_table_list + as to the types of exceptions accepted by each handler. __throw + can do the type comparisons and then determine if the handler is + actually going to be executed. + + There is currently no significant level of debugging support + available, other than to place a breakpoint on __throw. While + this is sufficient in most cases, it would be helpful to be able to + know where a given exception was going to be thrown to before it is + actually thrown, and to be able to choose between stopping before + every exception region (including cleanups), or just user-defined + exception regions. This should be possible to do in the two-pass + scheme by adding additional labels to __throw for appropriate + breakpoints, and additional debugger commands could be added to + query various state variables to determine what actions are to be + performed next. + + Another major problem that is being worked on is the issue with stack + unwinding on various platforms. Currently the only platforms that have + support for the generation of a generic unwinder are the SPARC and MIPS. + All other ports require per-function unwinders, which produce large + amounts of code bloat. + + For setjmp/longjmp based exception handling, some of the details + are as above, but there are some additional details. This section + discusses the details. + + We don't use NOTE_INSN_EH_REGION_{BEG,END} pairs. We don't + optimize EH regions yet. We don't have to worry about machine + specific issues with unwinding the stack, as we rely upon longjmp + for all the machine specific details. There is no variable context + of a throw, just the one implied by the dynamic handler stack + pointed to by the dynamic handler chain. There is no exception + table, and no calls to __register_exceptions. __sjthrow is used + instead of __throw, and it works by using the dynamic handler + chain, and longjmp. -fasynchronous-exceptions has no effect, as + the elimination of trivial exception regions is not yet performed. + + A frontend can set protect_cleanup_actions_with_terminate when all + the cleanup actions should be protected with an EH region that + calls terminate when an unhandled exception is throw. C++ does + this, Ada does not. */ + + +#include "config.h" +#include "defaults.h" +#include <stdio.h> +#include "rtl.h" +#include "tree.h" +#include "flags.h" +#include "except.h" +#include "function.h" +#include "insn-flags.h" +#include "expr.h" +#include "insn-codes.h" +#include "regs.h" +#include "hard-reg-set.h" +#include "insn-config.h" +#include "recog.h" +#include "output.h" + +/* One to use setjmp/longjmp method of generating code for exception + handling. */ + +int exceptions_via_longjmp = 2; + +/* One to enable asynchronous exception support. */ + +int asynchronous_exceptions = 0; + +/* One to protect cleanup actions with a handler that calls + __terminate, zero otherwise. */ + +int protect_cleanup_actions_with_terminate = 0; + +/* A list of labels used for exception handlers. Created by + find_exception_handler_labels for the optimization passes. */ + +rtx exception_handler_labels; + +/* Nonzero means that __throw was invoked. + + This is used by the C++ frontend to know if code needs to be emitted + for __throw or not. */ + +int throw_used; + +/* The dynamic handler chain. Nonzero if the function has already + fetched a pointer to the dynamic handler chain for exception + handling. */ + +rtx current_function_dhc; + +/* The dynamic cleanup chain. Nonzero if the function has already + fetched a pointer to the dynamic cleanup chain for exception + handling. */ + +rtx current_function_dcc; + +/* A stack used for keeping track of the currently active exception + handling region. As each exception region is started, an entry + describing the region is pushed onto this stack. The current + region can be found by looking at the top of the stack, and as we + exit regions, the corresponding entries are popped. + + Entries cannot overlap; they can be nested. So there is only one + entry at most that corresponds to the current instruction, and that + is the entry on the top of the stack. */ + +static struct eh_stack ehstack; + +/* A queue used for tracking which exception regions have closed but + whose handlers have not yet been expanded. Regions are emitted in + groups in an attempt to improve paging performance. + + As we exit a region, we enqueue a new entry. The entries are then + dequeued during expand_leftover_cleanups and expand_start_all_catch, + + We should redo things so that we either take RTL for the handler, + or we expand the handler expressed as a tree immediately at region + end time. */ + +static struct eh_queue ehqueue; + +/* Insns for all of the exception handlers for the current function. + They are currently emitted by the frontend code. */ + +rtx catch_clauses; + +/* A TREE_CHAINed list of handlers for regions that are not yet + closed. The TREE_VALUE of each entry contains the handler for the + corresponding entry on the ehstack. */ + +static tree protect_list; + +/* Stacks to keep track of various labels. */ + +/* Keeps track of the label to resume to should one want to resume + normal control flow out of a handler (instead of, say, returning to + the caller of the current function or exiting the program). */ + +struct label_node *caught_return_label_stack = NULL; + +/* Keeps track of the label used as the context of a throw to rethrow an + exception to the outer exception region. */ + +struct label_node *outer_context_label_stack = NULL; + +/* A random data area for the front end's own use. */ + +struct label_node *false_label_stack = NULL; + +/* The rtx and the tree for the saved PC value. */ + +rtx eh_saved_pc_rtx; +tree eh_saved_pc; + +rtx expand_builtin_return_addr PROTO((enum built_in_function, int, rtx)); + +/* Various support routines to manipulate the various data structures + used by the exception handling code. */ + +/* Push a label entry onto the given STACK. */ + +void +push_label_entry (stack, rlabel, tlabel) + struct label_node **stack; + rtx rlabel; + tree tlabel; +{ + struct label_node *newnode + = (struct label_node *) xmalloc (sizeof (struct label_node)); + + if (rlabel) + newnode->u.rlabel = rlabel; + else + newnode->u.tlabel = tlabel; + newnode->chain = *stack; + *stack = newnode; +} + +/* Pop a label entry from the given STACK. */ + +rtx +pop_label_entry (stack) + struct label_node **stack; +{ + rtx label; + struct label_node *tempnode; + + if (! *stack) + return NULL_RTX; + + tempnode = *stack; + label = tempnode->u.rlabel; + *stack = (*stack)->chain; + free (tempnode); + + return label; +} + +/* Return the top element of the given STACK. */ + +tree +top_label_entry (stack) + struct label_node **stack; +{ + if (! *stack) + return NULL_TREE; + + return (*stack)->u.tlabel; +} + +/* Make a copy of ENTRY using xmalloc to allocate the space. */ + +static struct eh_entry * +copy_eh_entry (entry) + struct eh_entry *entry; +{ + struct eh_entry *newentry; + + newentry = (struct eh_entry *) xmalloc (sizeof (struct eh_entry)); + bcopy ((char *) entry, (char *) newentry, sizeof (struct eh_entry)); + + return newentry; +} + +/* Push a new eh_node entry onto STACK. */ + +static void +push_eh_entry (stack) + struct eh_stack *stack; +{ + struct eh_node *node = (struct eh_node *) xmalloc (sizeof (struct eh_node)); + struct eh_entry *entry = (struct eh_entry *) xmalloc (sizeof (struct eh_entry)); + + entry->outer_context = gen_label_rtx (); + entry->exception_handler_label = gen_label_rtx (); + entry->finalization = NULL_TREE; + + node->entry = entry; + node->chain = stack->top; + stack->top = node; +} + +/* Pop an entry from the given STACK. */ + +static struct eh_entry * +pop_eh_entry (stack) + struct eh_stack *stack; +{ + struct eh_node *tempnode; + struct eh_entry *tempentry; + + tempnode = stack->top; + tempentry = tempnode->entry; + stack->top = stack->top->chain; + free (tempnode); + + return tempentry; +} + +/* Enqueue an ENTRY onto the given QUEUE. */ + +static void +enqueue_eh_entry (queue, entry) + struct eh_queue *queue; + struct eh_entry *entry; +{ + struct eh_node *node = (struct eh_node *) xmalloc (sizeof (struct eh_node)); + + node->entry = entry; + node->chain = NULL; + + if (queue->head == NULL) + { + queue->head = node; + } + else + { + queue->tail->chain = node; + } + queue->tail = node; +} + +/* Dequeue an entry from the given QUEUE. */ + +static struct eh_entry * +dequeue_eh_entry (queue) + struct eh_queue *queue; +{ + struct eh_node *tempnode; + struct eh_entry *tempentry; + + if (queue->head == NULL) + return NULL; + + tempnode = queue->head; + queue->head = queue->head->chain; + + tempentry = tempnode->entry; + free (tempnode); + + return tempentry; +} + +/* Routine to see if exception exception handling is turned on. + DO_WARN is non-zero if we want to inform the user that exception + handling is turned off. + + This is used to ensure that -fexceptions has been specified if the + compiler tries to use any exception-specific functions. */ + +int +doing_eh (do_warn) + int do_warn; +{ + if (! flag_exceptions) + { + static int warned = 0; + if (! warned && do_warn) + { + error ("exception handling disabled, use -fexceptions to enable"); + warned = 1; + } + return 0; + } + return 1; +} + +/* Given a return address in ADDR, determine the address we should use + to find the corresponding EH region. */ + +rtx +eh_outer_context (addr) + rtx addr; +{ + /* First mask out any unwanted bits. */ +#ifdef MASK_RETURN_ADDR + expand_and (addr, MASK_RETURN_ADDR, addr); +#endif + + /* Then adjust to find the real return address. */ +#if defined (RETURN_ADDR_OFFSET) + addr = plus_constant (addr, RETURN_ADDR_OFFSET); +#endif + + return addr; +} + +/* Start a new exception region for a region of code that has a + cleanup action and push the HANDLER for the region onto + protect_list. All of the regions created with add_partial_entry + will be ended when end_protect_partials is invoked. */ + +void +add_partial_entry (handler) + tree handler; +{ + expand_eh_region_start (); + + /* Make sure the entry is on the correct obstack. */ + push_obstacks_nochange (); + resume_temporary_allocation (); + + /* Because this is a cleanup action, we may have to protect the handler + with __terminate. */ + handler = protect_with_terminate (handler); + + protect_list = tree_cons (NULL_TREE, handler, protect_list); + pop_obstacks (); +} + +/* Get a reference to the dynamic handler chain. It points to the + pointer to the next element in the dynamic handler chain. It ends + when there are no more elements in the dynamic handler chain, when + the value is &top_elt from libgcc2.c. Immediately after the + pointer, is an area suitable for setjmp/longjmp when + DONT_USE_BUILTIN_SETJMP is defined, and an area suitable for + __builtin_setjmp/__builtin_longjmp when DONT_USE_BUILTIN_SETJMP + isn't defined. + + This routine is here to facilitate the porting of this code to + systems with threads. One can either replace the routine we emit a + call for here in libgcc2.c, or one can modify this routine to work + with their thread system. */ + +rtx +get_dynamic_handler_chain () +{ +#if 0 + /* Do this once we figure out how to get this to the front of the + function, and we really only want one per real function, not one + per inlined function. */ + if (current_function_dhc == 0) + { + rtx dhc, insns; + start_sequence (); + + dhc = emit_library_call_value (get_dynamic_handler_chain_libfunc, + NULL_RTX, 1, + Pmode, 0); + current_function_dhc = copy_to_reg (dhc); + insns = get_insns (); + end_sequence (); + emit_insns_before (insns, get_first_nonparm_insn ()); + } +#else + rtx dhc; + dhc = emit_library_call_value (get_dynamic_handler_chain_libfunc, + NULL_RTX, 1, + Pmode, 0); + current_function_dhc = copy_to_reg (dhc); +#endif + + /* We don't want a copy of the dhc, but rather, the single dhc. */ + return gen_rtx (MEM, Pmode, current_function_dhc); +} + +/* Get a reference to the dynamic cleanup chain. It points to the + pointer to the next element in the dynamic cleanup chain. + Immediately after the pointer, are two Pmode variables, one for a + pointer to a function that performs the cleanup action, and the + second, the argument to pass to that function. */ + +rtx +get_dynamic_cleanup_chain () +{ + rtx dhc, dcc; + + dhc = get_dynamic_handler_chain (); + dcc = plus_constant (dhc, GET_MODE_SIZE (Pmode)); + + current_function_dcc = copy_to_reg (dcc); + + /* We don't want a copy of the dcc, but rather, the single dcc. */ + return gen_rtx (MEM, Pmode, current_function_dcc); +} + +/* Generate code to evaluate X and jump to LABEL if the value is nonzero. + LABEL is an rtx of code CODE_LABEL, in this function. */ + +void +jumpif_rtx (x, label) + rtx x; + rtx label; +{ + jumpif (make_tree (type_for_mode (GET_MODE (x), 0), x), label); +} + +/* Generate code to evaluate X and jump to LABEL if the value is zero. + LABEL is an rtx of code CODE_LABEL, in this function. */ + +void +jumpifnot_rtx (x, label) + rtx x; + rtx label; +{ + jumpifnot (make_tree (type_for_mode (GET_MODE (x), 0), x), label); +} + +/* Start a dynamic cleanup on the EH runtime dynamic cleanup stack. + We just need to create an element for the cleanup list, and push it + into the chain. + + A dynamic cleanup is a cleanup action implied by the presence of an + element on the EH runtime dynamic cleanup stack that is to be + performed when an exception is thrown. The cleanup action is + performed by __sjthrow when an exception is thrown. Only certain + actions can be optimized into dynamic cleanup actions. For the + restrictions on what actions can be performed using this routine, + see expand_eh_region_start_tree. */ + +static void +start_dynamic_cleanup (func, arg) + tree func; + tree arg; +{ + rtx dhc, dcc; + rtx new_func, new_arg; + rtx x, buf; + int size; + + /* We allocate enough room for a pointer to the function, and + one argument. */ + size = 2; + + /* XXX, FIXME: The stack space allocated this way is too long lived, + but there is no allocation routine that allocates at the level of + the last binding contour. */ + buf = assign_stack_local (BLKmode, + GET_MODE_SIZE (Pmode)*(size+1), + 0); + + buf = change_address (buf, Pmode, NULL_RTX); + + /* Store dcc into the first word of the newly allocated buffer. */ + + dcc = get_dynamic_cleanup_chain (); + emit_move_insn (buf, dcc); + + /* Store func and arg into the cleanup list element. */ + + new_func = gen_rtx (MEM, Pmode, plus_constant (XEXP (buf, 0), + GET_MODE_SIZE (Pmode))); + new_arg = gen_rtx (MEM, Pmode, plus_constant (XEXP (buf, 0), + GET_MODE_SIZE (Pmode)*2)); + x = expand_expr (func, new_func, Pmode, 0); + if (x != new_func) + emit_move_insn (new_func, x); + + x = expand_expr (arg, new_arg, Pmode, 0); + if (x != new_arg) + emit_move_insn (new_arg, x); + + /* Update the cleanup chain. */ + + emit_move_insn (dcc, XEXP (buf, 0)); +} + +/* Emit RTL to start a dynamic handler on the EH runtime dynamic + handler stack. This should only be used by expand_eh_region_start + or expand_eh_region_start_tree. */ + +static void +start_dynamic_handler () +{ + rtx dhc, dcc; + rtx x, arg, buf; + int size; + +#ifndef DONT_USE_BUILTIN_SETJMP + /* The number of Pmode words for the setjmp buffer, when using the + builtin setjmp/longjmp, see expand_builtin, case + BUILT_IN_LONGJMP. */ + size = 5; +#else +#ifdef JMP_BUF_SIZE + size = JMP_BUF_SIZE; +#else + /* Should be large enough for most systems, if it is not, + JMP_BUF_SIZE should be defined with the proper value. It will + also tend to be larger than necessary for most systems, a more + optimal port will define JMP_BUF_SIZE. */ + size = FIRST_PSEUDO_REGISTER+2; +#endif +#endif + /* XXX, FIXME: The stack space allocated this way is too long lived, + but there is no allocation routine that allocates at the level of + the last binding contour. */ + arg = assign_stack_local (BLKmode, + GET_MODE_SIZE (Pmode)*(size+1), + 0); + + arg = change_address (arg, Pmode, NULL_RTX); + + /* Store dhc into the first word of the newly allocated buffer. */ + + dhc = get_dynamic_handler_chain (); + dcc = gen_rtx (MEM, Pmode, plus_constant (XEXP (arg, 0), + GET_MODE_SIZE (Pmode))); + emit_move_insn (arg, dhc); + + /* Zero out the start of the cleanup chain. */ + emit_move_insn (dcc, const0_rtx); + + /* The jmpbuf starts two words into the area allocated. */ + buf = plus_constant (XEXP (arg, 0), GET_MODE_SIZE (Pmode)*2); + +#ifdef DONT_USE_BUILTIN_SETJMP + x = emit_library_call_value (setjmp_libfunc, NULL_RTX, 1, SImode, 1, + buf, Pmode); +#else + x = expand_builtin_setjmp (buf, NULL_RTX); +#endif + + /* If we come back here for a catch, transfer control to the + handler. */ + + jumpif_rtx (x, ehstack.top->entry->exception_handler_label); + + /* We are committed to this, so update the handler chain. */ + + emit_move_insn (dhc, XEXP (arg, 0)); +} + +/* Start an exception handling region for the given cleanup action. + All instructions emitted after this point are considered to be part + of the region until expand_eh_region_end is invoked. CLEANUP is + the cleanup action to perform. The return value is true if the + exception region was optimized away. If that case, + expand_eh_region_end does not need to be called for this cleanup, + nor should it be. + + This routine notices one particular common case in C++ code + generation, and optimizes it so as to not need the exception + region. It works by creating a dynamic cleanup action, instead of + of a using an exception region. */ + +int +expand_eh_region_start_tree (decl, cleanup) + tree decl; + tree cleanup; +{ + rtx note; + + /* This is the old code. */ + if (! doing_eh (0)) + return 0; + + /* The optimization only applies to actions protected with + terminate, and only applies if we are using the setjmp/longjmp + codegen method. */ + if (exceptions_via_longjmp + && protect_cleanup_actions_with_terminate) + { + tree func, arg; + tree args; + + /* Ignore any UNSAVE_EXPR. */ + if (TREE_CODE (cleanup) == UNSAVE_EXPR) + cleanup = TREE_OPERAND (cleanup, 0); + + /* Further, it only applies if the action is a call, if there + are 2 arguments, and if the second argument is 2. */ + + if (TREE_CODE (cleanup) == CALL_EXPR + && (args = TREE_OPERAND (cleanup, 1)) + && (func = TREE_OPERAND (cleanup, 0)) + && (arg = TREE_VALUE (args)) + && (args = TREE_CHAIN (args)) + + /* is the second argument 2? */ + && TREE_CODE (TREE_VALUE (args)) == INTEGER_CST + && TREE_INT_CST_LOW (TREE_VALUE (args)) == 2 + && TREE_INT_CST_HIGH (TREE_VALUE (args)) == 0 + + /* Make sure there are no other arguments. */ + && TREE_CHAIN (args) == NULL_TREE) + { + /* Arrange for returns and gotos to pop the entry we make on the + dynamic cleanup stack. */ + expand_dcc_cleanup (decl); + start_dynamic_cleanup (func, arg); + return 1; + } + } + + expand_eh_region_start_for_decl (decl); + + return 0; +} + +/* Just like expand_eh_region_start, except if a cleanup action is + entered on the cleanup chain, the TREE_PURPOSE of the element put + on the chain is DECL. DECL should be the associated VAR_DECL, if + any, otherwise it should be NULL_TREE. */ + +void +expand_eh_region_start_for_decl (decl) + tree decl; +{ + rtx note; + + /* This is the old code. */ + if (! doing_eh (0)) + return; + + if (exceptions_via_longjmp) + { + /* We need a new block to record the start and end of the + dynamic handler chain. We could always do this, but we + really want to permit jumping into such a block, and we want + to avoid any errors or performance impact in the SJ EH code + for now. */ + expand_start_bindings (0); + + /* But we don't need or want a new temporary level. */ + pop_temp_slots (); + + /* Mark this block as created by expand_eh_region_start. This + is so that we can pop the block with expand_end_bindings + automatically. */ + mark_block_as_eh_region (); + + /* Arrange for returns and gotos to pop the entry we make on the + dynamic handler stack. */ + expand_dhc_cleanup (decl); + } + + if (exceptions_via_longjmp == 0) + note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_BEG); + push_eh_entry (&ehstack); + if (exceptions_via_longjmp == 0) + NOTE_BLOCK_NUMBER (note) + = CODE_LABEL_NUMBER (ehstack.top->entry->exception_handler_label); + if (exceptions_via_longjmp) + start_dynamic_handler (); +} + +/* Start an exception handling region. All instructions emitted after + this point are considered to be part of the region until + expand_eh_region_end is invoked. */ + +void +expand_eh_region_start () +{ + expand_eh_region_start_for_decl (NULL_TREE); +} + +/* End an exception handling region. The information about the region + is found on the top of ehstack. + + HANDLER is either the cleanup for the exception region, or if we're + marking the end of a try block, HANDLER is integer_zero_node. + + HANDLER will be transformed to rtl when expand_leftover_cleanups + is invoked. */ + +void +expand_eh_region_end (handler) + tree handler; +{ + struct eh_entry *entry; + + if (! doing_eh (0)) + return; + + entry = pop_eh_entry (&ehstack); + + if (exceptions_via_longjmp == 0) + { + rtx label; + rtx note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_END); + NOTE_BLOCK_NUMBER (note) = CODE_LABEL_NUMBER (entry->exception_handler_label); + + label = gen_label_rtx (); + emit_jump (label); + + /* Emit a label marking the end of this exception region that + is used for rethrowing into the outer context. */ + emit_label (entry->outer_context); + + /* Put in something that takes up space, as otherwise the end + address for this EH region could have the exact same address as + its outer region. This would cause us to miss the fact that + resuming exception handling with this PC value would be inside + the outer region. */ + emit_insn (gen_nop ()); + emit_barrier (); + emit_label (label); + } + + entry->finalization = handler; + + enqueue_eh_entry (&ehqueue, entry); + + /* If we have already started ending the bindings, don't recurse. + This only happens when exceptions_via_longjmp is true. */ + if (is_eh_region ()) + { + /* Because we don't need or want a new temporary level and + because we didn't create one in expand_eh_region_start, + create a fake one now to avoid removing one in + expand_end_bindings. */ + push_temp_slots (); + + mark_block_as_not_eh_region (); + + /* Maybe do this to prevent jumping in and so on... */ + expand_end_bindings (NULL_TREE, 0, 0); + } +} + +/* If we are using the setjmp/longjmp EH codegen method, we emit a + call to __sjthrow. + + Otherwise, we emit a call to __throw and note that we threw + something, so we know we need to generate the necessary code for + __throw. + + Before invoking throw, the __eh_pc variable must have been set up + to contain the PC being thrown from. This address is used by + __throw to determine which exception region (if any) is + responsible for handling the exception. */ + +void +emit_throw () +{ + if (exceptions_via_longjmp) + { + emit_library_call (sjthrow_libfunc, 0, VOIDmode, 0); + } + else + { +#ifdef JUMP_TO_THROW + emit_indirect_jump (throw_libfunc); +#else +#ifndef DWARF2_UNWIND_INFO + /* Prevent assemble_external from doing anything with this symbol. */ + SYMBOL_REF_USED (throw_libfunc) = 1; +#endif + emit_library_call (throw_libfunc, 0, VOIDmode, 0); +#endif + throw_used = 1; + } + emit_barrier (); +} + +/* An internal throw with an indirect CONTEXT we want to throw from. + CONTEXT evaluates to the context of the throw. */ + +static void +expand_internal_throw_indirect (context) + rtx context; +{ + assemble_external (eh_saved_pc); + emit_move_insn (eh_saved_pc_rtx, context); + emit_throw (); +} + +/* An internal throw with a direct CONTEXT we want to throw from. + CONTEXT must be a label; its address will be used as the context of + the throw. */ + +void +expand_internal_throw (context) + rtx context; +{ + expand_internal_throw_indirect (gen_rtx (LABEL_REF, Pmode, context)); +} + +/* Called from expand_exception_blocks and expand_end_catch_block to + emit any pending handlers/cleanups queued from expand_eh_region_end. */ + +void +expand_leftover_cleanups () +{ + struct eh_entry *entry; + + while ((entry = dequeue_eh_entry (&ehqueue)) != 0) + { + rtx prev; + + /* A leftover try block. Shouldn't be one here. */ + if (entry->finalization == integer_zero_node) + abort (); + + /* Output the label for the start of the exception handler. */ + emit_label (entry->exception_handler_label); + +#ifdef HAVE_exception_receiver + if (! exceptions_via_longjmp) + if (HAVE_exception_receiver) + emit_insn (gen_exception_receiver ()); +#endif + +#ifdef HAVE_nonlocal_goto_receiver + if (! exceptions_via_longjmp) + if (HAVE_nonlocal_goto_receiver) + emit_insn (gen_nonlocal_goto_receiver ()); +#endif + + /* And now generate the insns for the handler. */ + expand_expr (entry->finalization, const0_rtx, VOIDmode, 0); + + prev = get_last_insn (); + if (prev == NULL || GET_CODE (prev) != BARRIER) + { + if (exceptions_via_longjmp) + emit_throw (); + else + { + /* The below can be optimized away, and we could just + fall into the next EH handler, if we are certain they + are nested. */ + /* Emit code to throw to the outer context if we fall off + the end of the handler. */ + expand_internal_throw (entry->outer_context); + } + } + + do_pending_stack_adjust (); + free (entry); + } +} + +/* Called at the start of a block of try statements. */ +void +expand_start_try_stmts () +{ + if (! doing_eh (1)) + return; + + expand_eh_region_start (); +} + +/* Generate RTL for the start of a group of catch clauses. + + It is responsible for starting a new instruction sequence for the + instructions in the catch block, and expanding the handlers for the + internally-generated exception regions nested within the try block + corresponding to this catch block. */ + +void +expand_start_all_catch () +{ + struct eh_entry *entry; + tree label; + + if (! doing_eh (1)) + return; + + push_label_entry (&outer_context_label_stack, + ehstack.top->entry->outer_context, NULL_TREE); + + /* End the try block. */ + expand_eh_region_end (integer_zero_node); + + emit_line_note (input_filename, lineno); + label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); + + /* The label for the exception handling block that we will save. + This is Lresume in the documentation. */ + expand_label (label); + + if (exceptions_via_longjmp == 0) + { + /* Put in something that takes up space, as otherwise the end + address for the EH region could have the exact same address as + the outer region, causing us to miss the fact that resuming + exception handling with this PC value would be inside the outer + region. */ + emit_insn (gen_nop ()); + } + + /* Push the label that points to where normal flow is resumed onto + the top of the label stack. */ + push_label_entry (&caught_return_label_stack, NULL_RTX, label); + + /* Start a new sequence for all the catch blocks. We will add this + to the global sequence catch_clauses when we have completed all + the handlers in this handler-seq. */ + start_sequence (); + + while (1) + { + rtx prev; + + entry = dequeue_eh_entry (&ehqueue); + /* Emit the label for the exception handler for this region, and + expand the code for the handler. + + Note that a catch region is handled as a side-effect here; + for a try block, entry->finalization will contain + integer_zero_node, so no code will be generated in the + expand_expr call below. But, the label for the handler will + still be emitted, so any code emitted after this point will + end up being the handler. */ + emit_label (entry->exception_handler_label); + +#ifdef HAVE_exception_receiver + if (! exceptions_via_longjmp) + if (HAVE_exception_receiver) + emit_insn (gen_exception_receiver ()); +#endif + +#ifdef HAVE_nonlocal_goto_receiver + if (! exceptions_via_longjmp) + if (HAVE_nonlocal_goto_receiver) + emit_insn (gen_nonlocal_goto_receiver ()); +#endif + + /* When we get down to the matching entry for this try block, stop. */ + if (entry->finalization == integer_zero_node) + { + /* Don't forget to free this entry. */ + free (entry); + break; + } + + /* And now generate the insns for the handler. */ + expand_expr (entry->finalization, const0_rtx, VOIDmode, 0); + + prev = get_last_insn (); + if (prev == NULL || GET_CODE (prev) != BARRIER) + { + if (exceptions_via_longjmp) + emit_throw (); + else + { + /* Code to throw out to outer context when we fall off end + of the handler. We can't do this here for catch blocks, + so it's done in expand_end_all_catch instead. + + The below can be optimized away (and we could just fall + into the next EH handler) if we are certain they are + nested. */ + + expand_internal_throw (entry->outer_context); + } + } + do_pending_stack_adjust (); + free (entry); + } +} + +/* Finish up the catch block. At this point all the insns for the + catch clauses have already been generated, so we only have to add + them to the catch_clauses list. We also want to make sure that if + we fall off the end of the catch clauses that we rethrow to the + outer EH region. */ + +void +expand_end_all_catch () +{ + rtx new_catch_clause; + + if (! doing_eh (1)) + return; + + if (exceptions_via_longjmp) + emit_throw (); + else + { + /* Code to throw out to outer context, if we fall off end of catch + handlers. This is rethrow (Lresume, same id, same obj) in the + documentation. We use Lresume because we know that it will throw + to the correct context. + + In other words, if the catch handler doesn't exit or return, we + do a "throw" (using the address of Lresume as the point being + thrown from) so that the outer EH region can then try to process + the exception. */ + + expand_internal_throw (outer_context_label_stack->u.rlabel); + } + + /* Now we have the complete catch sequence. */ + new_catch_clause = get_insns (); + end_sequence (); + + /* This level of catch blocks is done, so set up the successful + catch jump label for the next layer of catch blocks. */ + pop_label_entry (&caught_return_label_stack); + pop_label_entry (&outer_context_label_stack); + + /* Add the new sequence of catches to the main one for this function. */ + push_to_sequence (catch_clauses); + emit_insns (new_catch_clause); + catch_clauses = get_insns (); + end_sequence (); + + /* Here we fall through into the continuation code. */ +} + +/* End all the pending exception regions on protect_list. The handlers + will be emitted when expand_leftover_cleanups is invoked. */ + +void +end_protect_partials () +{ + while (protect_list) + { + expand_eh_region_end (TREE_VALUE (protect_list)); + protect_list = TREE_CHAIN (protect_list); + } +} + +/* Arrange for __terminate to be called if there is an unhandled throw + from within E. */ + +tree +protect_with_terminate (e) + tree e; +{ + /* We only need to do this when using setjmp/longjmp EH and the + language requires it, as otherwise we protect all of the handlers + at once, if we need to. */ + if (exceptions_via_longjmp && protect_cleanup_actions_with_terminate) + { + tree handler, result; + + /* All cleanups must be on the function_obstack. */ + push_obstacks_nochange (); + resume_temporary_allocation (); + + handler = make_node (RTL_EXPR); + TREE_TYPE (handler) = void_type_node; + RTL_EXPR_RTL (handler) = const0_rtx; + TREE_SIDE_EFFECTS (handler) = 1; + start_sequence_for_rtl_expr (handler); + + emit_library_call (terminate_libfunc, 0, VOIDmode, 0); + emit_barrier (); + + RTL_EXPR_SEQUENCE (handler) = get_insns (); + end_sequence (); + + result = build (TRY_CATCH_EXPR, TREE_TYPE (e), e, handler); + TREE_SIDE_EFFECTS (result) = TREE_SIDE_EFFECTS (e); + TREE_THIS_VOLATILE (result) = TREE_THIS_VOLATILE (e); + TREE_READONLY (result) = TREE_READONLY (e); + + pop_obstacks (); + + e = result; + } + + return e; +} + +/* The exception table that we build that is used for looking up and + dispatching exceptions, the current number of entries, and its + maximum size before we have to extend it. + + The number in eh_table is the code label number of the exception + handler for the region. This is added by add_eh_table_entry and + used by output_exception_table_entry. */ + +static int *eh_table; +static int eh_table_size; +static int eh_table_max_size; + +/* Note the need for an exception table entry for region N. If we + don't need to output an explicit exception table, avoid all of the + extra work. + + Called from final_scan_insn when a NOTE_INSN_EH_REGION_BEG is seen. + N is the NOTE_BLOCK_NUMBER of the note, which comes from the code + label number of the exception handler for the region. */ + +void +add_eh_table_entry (n) + int n; +{ +#ifndef OMIT_EH_TABLE + if (eh_table_size >= eh_table_max_size) + { + if (eh_table) + { + eh_table_max_size += eh_table_max_size>>1; + + if (eh_table_max_size < 0) + abort (); + + eh_table = (int *) xrealloc (eh_table, + eh_table_max_size * sizeof (int)); + } + else + { + eh_table_max_size = 252; + eh_table = (int *) xmalloc (eh_table_max_size * sizeof (int)); + } + } + eh_table[eh_table_size++] = n; +#endif +} + +/* Return a non-zero value if we need to output an exception table. + + On some platforms, we don't have to output a table explicitly. + This routine doesn't mean we don't have one. */ + +int +exception_table_p () +{ + if (eh_table) + return 1; + + return 0; +} + +/* 1 if we need a static constructor to register EH table info. */ + +int +register_exception_table_p () +{ +#if defined (DWARF2_UNWIND_INFO) + return 0; +#endif + + return exception_table_p (); +} + +/* Output the entry of the exception table corresponding to to the + exception region numbered N to file FILE. + + N is the code label number corresponding to the handler of the + region. */ + +static void +output_exception_table_entry (file, n) + FILE *file; + int n; +{ + char buf[256]; + rtx sym; + + ASM_GENERATE_INTERNAL_LABEL (buf, "LEHB", n); + sym = gen_rtx (SYMBOL_REF, Pmode, buf); + assemble_integer (sym, POINTER_SIZE / BITS_PER_UNIT, 1); + + ASM_GENERATE_INTERNAL_LABEL (buf, "LEHE", n); + sym = gen_rtx (SYMBOL_REF, Pmode, buf); + assemble_integer (sym, POINTER_SIZE / BITS_PER_UNIT, 1); + + ASM_GENERATE_INTERNAL_LABEL (buf, "L", n); + sym = gen_rtx (SYMBOL_REF, Pmode, buf); + assemble_integer (sym, POINTER_SIZE / BITS_PER_UNIT, 1); + + putc ('\n', file); /* blank line */ +} + +/* Output the exception table if we have and need one. */ + +void +output_exception_table () +{ + int i; + extern FILE *asm_out_file; + + if (! doing_eh (0) || ! eh_table) + return; + + exception_section (); + + /* Beginning marker for table. */ + assemble_align (GET_MODE_ALIGNMENT (ptr_mode)); + assemble_label ("__EXCEPTION_TABLE__"); + + for (i = 0; i < eh_table_size; ++i) + output_exception_table_entry (asm_out_file, eh_table[i]); + + free (eh_table); + + /* Ending marker for table. */ + assemble_label ("__EXCEPTION_END__"); + assemble_integer (constm1_rtx, POINTER_SIZE / BITS_PER_UNIT, 1); + assemble_integer (constm1_rtx, POINTER_SIZE / BITS_PER_UNIT, 1); + assemble_integer (constm1_rtx, POINTER_SIZE / BITS_PER_UNIT, 1); + putc ('\n', asm_out_file); /* blank line */ +} + +/* Generate code to initialize the exception table at program startup + time. */ + +void +register_exception_table () +{ + emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__register_exceptions"), 0, + VOIDmode, 1, + gen_rtx (SYMBOL_REF, Pmode, "__EXCEPTION_TABLE__"), + Pmode); +} + +/* Emit the RTL for the start of the per-function unwinder for the + current function. See emit_unwinder for further information. + + DOESNT_NEED_UNWINDER is a target-specific macro that determines if + the current function actually needs a per-function unwinder or not. + By default, all functions need one. */ + +void +start_eh_unwinder () +{ +#ifdef DOESNT_NEED_UNWINDER + if (DOESNT_NEED_UNWINDER) + return; +#endif + + /* If we are using the setjmp/longjmp implementation, we don't need a + per function unwinder. */ + + if (exceptions_via_longjmp) + return; + +#ifdef DWARF2_UNWIND_INFO + return; +#endif + + expand_eh_region_start (); +} + +/* Emit insns for the end of the per-function unwinder for the + current function. */ + +void +end_eh_unwinder () +{ + tree expr; + rtx return_val_rtx, ret_val, label, end, insns; + + if (! doing_eh (0)) + return; + +#ifdef DOESNT_NEED_UNWINDER + if (DOESNT_NEED_UNWINDER) + return; +#endif + + /* If we are using the setjmp/longjmp implementation, we don't need a + per function unwinder. */ + + if (exceptions_via_longjmp) + return; + +#ifdef DWARF2_UNWIND_INFO + return; +#else /* DWARF2_UNWIND_INFO */ + + assemble_external (eh_saved_pc); + + expr = make_node (RTL_EXPR); + TREE_TYPE (expr) = void_type_node; + RTL_EXPR_RTL (expr) = const0_rtx; + TREE_SIDE_EFFECTS (expr) = 1; + start_sequence_for_rtl_expr (expr); + + /* ret_val will contain the address of the code where the call + to the current function occurred. */ + ret_val = expand_builtin_return_addr (BUILT_IN_RETURN_ADDRESS, + 0, hard_frame_pointer_rtx); + return_val_rtx = copy_to_reg (ret_val); + + /* Get the address we need to use to determine what exception + handler should be invoked, and store it in __eh_pc. */ + return_val_rtx = eh_outer_context (return_val_rtx); + return_val_rtx = expand_binop (Pmode, sub_optab, return_val_rtx, GEN_INT (1), + NULL_RTX, 0, OPTAB_LIB_WIDEN); + emit_move_insn (eh_saved_pc_rtx, return_val_rtx); + + /* Either set things up so we do a return directly to __throw, or + we return here instead. */ +#ifdef JUMP_TO_THROW + emit_move_insn (ret_val, throw_libfunc); +#else + label = gen_label_rtx (); + emit_move_insn (ret_val, gen_rtx (LABEL_REF, Pmode, label)); +#endif + +#ifdef RETURN_ADDR_OFFSET + return_val_rtx = plus_constant (ret_val, -RETURN_ADDR_OFFSET); + if (return_val_rtx != ret_val) + emit_move_insn (ret_val, return_val_rtx); +#endif + + end = gen_label_rtx (); + emit_jump (end); + + RTL_EXPR_SEQUENCE (expr) = get_insns (); + end_sequence (); + + expand_eh_region_end (expr); + + emit_jump (end); + +#ifndef JUMP_TO_THROW + emit_label (label); + emit_throw (); +#endif + + expand_leftover_cleanups (); + + emit_label (end); + +#ifdef HAVE_return + if (HAVE_return) + { + emit_jump_insn (gen_return ()); + emit_barrier (); + } +#endif +#endif /* DWARF2_UNWIND_INFO */ +} + +/* If necessary, emit insns for the per function unwinder for the + current function. Called after all the code that needs unwind + protection is output. + + The unwinder takes care of catching any exceptions that have not + been previously caught within the function, unwinding the stack to + the next frame, and rethrowing using the address of the current + function's caller as the context of the throw. + + On some platforms __throw can do this by itself (or with the help + of __unwind_function) so the per-function unwinder is + unnecessary. + + We cannot place the unwinder into the function until after we know + we are done inlining, as we don't want to have more than one + unwinder per non-inlined function. */ + +void +emit_unwinder () +{ + rtx insns, insn; + + start_sequence (); + start_eh_unwinder (); + insns = get_insns (); + end_sequence (); + + /* We place the start of the exception region associated with the + per function unwinder at the top of the function. */ + if (insns) + emit_insns_after (insns, get_insns ()); + + start_sequence (); + end_eh_unwinder (); + insns = get_insns (); + end_sequence (); + + /* And we place the end of the exception region before the USE and + CLOBBER insns that may come at the end of the function. */ + if (insns == 0) + return; + + insn = get_last_insn (); + while (GET_CODE (insn) == NOTE + || (GET_CODE (insn) == INSN + && (GET_CODE (PATTERN (insn)) == USE + || GET_CODE (PATTERN (insn)) == CLOBBER))) + insn = PREV_INSN (insn); + + if (GET_CODE (insn) == CODE_LABEL + && GET_CODE (PREV_INSN (insn)) == BARRIER) + { + insn = PREV_INSN (insn); + } + else + { + rtx label = gen_label_rtx (); + emit_label_after (label, insn); + insn = emit_jump_insn_after (gen_jump (label), insn); + insn = emit_barrier_after (insn); + } + + emit_insns_after (insns, insn); +} + +/* Scan the current insns and build a list of handler labels. The + resulting list is placed in the global variable exception_handler_labels. + + It is called after the last exception handling region is added to + the current function (when the rtl is almost all built for the + current function) and before the jump optimization pass. */ + +void +find_exception_handler_labels () +{ + rtx insn; + int max_labelno = max_label_num (); + int min_labelno = get_first_label_num (); + rtx *labels; + + exception_handler_labels = NULL_RTX; + + /* If we aren't doing exception handling, there isn't much to check. */ + if (! doing_eh (0)) + return; + + /* Generate a handy reference to each label. */ + + /* We call xmalloc here instead of alloca; we did the latter in the past, + but found that it can sometimes end up being asked to allocate space + for more than 1 million labels. */ + labels = (rtx *) xmalloc ((max_labelno - min_labelno) * sizeof (rtx)); + bzero ((char *) labels, (max_labelno - min_labelno) * sizeof (rtx)); + + /* Arrange for labels to be indexed directly by CODE_LABEL_NUMBER. */ + labels -= min_labelno; + + for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) + { + if (GET_CODE (insn) == CODE_LABEL) + if (CODE_LABEL_NUMBER (insn) >= min_labelno + && CODE_LABEL_NUMBER (insn) < max_labelno) + labels[CODE_LABEL_NUMBER (insn)] = insn; + } + + /* For each start of a region, add its label to the list. */ + + for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) + { + if (GET_CODE (insn) == NOTE + && NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG) + { + rtx label = NULL_RTX; + + if (NOTE_BLOCK_NUMBER (insn) >= min_labelno + && NOTE_BLOCK_NUMBER (insn) < max_labelno) + { + label = labels[NOTE_BLOCK_NUMBER (insn)]; + + if (label) + exception_handler_labels + = gen_rtx (EXPR_LIST, VOIDmode, + label, exception_handler_labels); + else + warning ("didn't find handler for EH region %d", + NOTE_BLOCK_NUMBER (insn)); + } + else + warning ("mismatched EH region %d", NOTE_BLOCK_NUMBER (insn)); + } + } + + free (labels + min_labelno); +} + +/* Perform sanity checking on the exception_handler_labels list. + + Can be called after find_exception_handler_labels is called to + build the list of exception handlers for the current function and + before we finish processing the current function. */ + +void +check_exception_handler_labels () +{ + rtx insn, handler; + + /* If we aren't doing exception handling, there isn't much to check. */ + if (! doing_eh (0)) + return; + + /* Ensure that the CODE_LABEL_NUMBER for the CODE_LABEL entry point + in each handler corresponds to the CODE_LABEL_NUMBER of the + handler. */ + + for (handler = exception_handler_labels; + handler; + handler = XEXP (handler, 1)) + { + for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) + { + if (GET_CODE (insn) == CODE_LABEL) + { + if (CODE_LABEL_NUMBER (insn) + == CODE_LABEL_NUMBER (XEXP (handler, 0))) + { + if (insn != XEXP (handler, 0)) + warning ("mismatched handler %d", + CODE_LABEL_NUMBER (insn)); + break; + } + } + } + if (insn == NULL_RTX) + warning ("handler not found %d", + CODE_LABEL_NUMBER (XEXP (handler, 0))); + } + + /* Now go through and make sure that for each region there is a + corresponding label. */ + for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) + { + if (GET_CODE (insn) == NOTE + && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG + || NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END)) + { + for (handler = exception_handler_labels; + handler; + handler = XEXP (handler, 1)) + { + if (CODE_LABEL_NUMBER (XEXP (handler, 0)) + == NOTE_BLOCK_NUMBER (insn)) + break; + } + if (handler == NULL_RTX) + warning ("region exists, no handler %d", + NOTE_BLOCK_NUMBER (insn)); + } + } +} + +/* This group of functions initializes the exception handling data + structures at the start of the compilation, initializes the data + structures at the start of a function, and saves and restores the + exception handling data structures for the start/end of a nested + function. */ + +/* Toplevel initialization for EH things. */ + +void +init_eh () +{ + /* Generate rtl to reference the variable in which the PC of the + current context is saved. */ + tree type = build_pointer_type (make_node (VOID_TYPE)); + + eh_saved_pc = build_decl (VAR_DECL, get_identifier ("__eh_pc"), type); + DECL_EXTERNAL (eh_saved_pc) = 1; + TREE_PUBLIC (eh_saved_pc) = 1; + make_decl_rtl (eh_saved_pc, NULL_PTR, 1); + eh_saved_pc_rtx = DECL_RTL (eh_saved_pc); +} + +/* Initialize the per-function EH information. */ + +void +init_eh_for_function () +{ + ehstack.top = 0; + ehqueue.head = ehqueue.tail = 0; + catch_clauses = NULL_RTX; + false_label_stack = 0; + caught_return_label_stack = 0; + protect_list = NULL_TREE; + current_function_dhc = NULL_RTX; + current_function_dcc = NULL_RTX; +} + +/* Save some of the per-function EH info into the save area denoted by + P. + + This is currently called from save_stmt_status. */ + +void +save_eh_status (p) + struct function *p; +{ + p->ehstack = ehstack; + p->ehqueue = ehqueue; + p->catch_clauses = catch_clauses; + p->false_label_stack = false_label_stack; + p->caught_return_label_stack = caught_return_label_stack; + p->protect_list = protect_list; + p->dhc = current_function_dhc; + p->dcc = current_function_dcc; + + init_eh (); +} + +/* Restore the per-function EH info saved into the area denoted by P. + + This is currently called from restore_stmt_status. */ + +void +restore_eh_status (p) + struct function *p; +{ + protect_list = p->protect_list; + caught_return_label_stack = p->caught_return_label_stack; + false_label_stack = p->false_label_stack; + catch_clauses = p->catch_clauses; + ehqueue = p->ehqueue; + ehstack = p->ehstack; + current_function_dhc = p->dhc; + current_function_dcc = p->dcc; +} + +/* This section is for the exception handling specific optimization + pass. First are the internal routines, and then the main + optimization pass. */ + +/* Determine if the given INSN can throw an exception. */ + +static int +can_throw (insn) + rtx insn; +{ + /* Calls can always potentially throw exceptions. */ + if (GET_CODE (insn) == CALL_INSN) + return 1; + + if (asynchronous_exceptions) + { + /* If we wanted asynchronous exceptions, then everything but NOTEs + and CODE_LABELs could throw. */ + if (GET_CODE (insn) != NOTE && GET_CODE (insn) != CODE_LABEL) + return 1; + } + + return 0; +} + +/* Scan a exception region looking for the matching end and then + remove it if possible. INSN is the start of the region, N is the + region number, and DELETE_OUTER is to note if anything in this + region can throw. + + Regions are removed if they cannot possibly catch an exception. + This is determined by invoking can_throw on each insn within the + region; if can_throw returns true for any of the instructions, the + region can catch an exception, since there is an insn within the + region that is capable of throwing an exception. + + Returns the NOTE_INSN_EH_REGION_END corresponding to this region, or + calls abort if it can't find one. + + Can abort if INSN is not a NOTE_INSN_EH_REGION_BEGIN, or if N doesn't + correspond to the region number, or if DELETE_OUTER is NULL. */ + +static rtx +scan_region (insn, n, delete_outer) + rtx insn; + int n; + int *delete_outer; +{ + rtx start = insn; + + /* Assume we can delete the region. */ + int delete = 1; + + if (! (GET_CODE (insn) == NOTE + && NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG + && NOTE_BLOCK_NUMBER (insn) == n + && delete_outer != NULL)) + abort (); + + insn = NEXT_INSN (insn); + + /* Look for the matching end. */ + while (! (GET_CODE (insn) == NOTE + && NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END)) + { + /* If anything can throw, we can't remove the region. */ + if (delete && can_throw (insn)) + { + delete = 0; + } + + /* Watch out for and handle nested regions. */ + if (GET_CODE (insn) == NOTE + && NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG) + { + insn = scan_region (insn, NOTE_BLOCK_NUMBER (insn), &delete); + } + + insn = NEXT_INSN (insn); + } + + /* The _BEG/_END NOTEs must match and nest. */ + if (NOTE_BLOCK_NUMBER (insn) != n) + abort (); + + /* If anything in this exception region can throw, we can throw. */ + if (! delete) + *delete_outer = 0; + else + { + /* Delete the start and end of the region. */ + delete_insn (start); + delete_insn (insn); + + /* Only do this part if we have built the exception handler + labels. */ + if (exception_handler_labels) + { + rtx x, *prev = &exception_handler_labels; + + /* Find it in the list of handlers. */ + for (x = exception_handler_labels; x; x = XEXP (x, 1)) + { + rtx label = XEXP (x, 0); + if (CODE_LABEL_NUMBER (label) == n) + { + /* If we are the last reference to the handler, + delete it. */ + if (--LABEL_NUSES (label) == 0) + delete_insn (label); + + if (optimize) + { + /* Remove it from the list of exception handler + labels, if we are optimizing. If we are not, then + leave it in the list, as we are not really going to + remove the region. */ + *prev = XEXP (x, 1); + XEXP (x, 1) = 0; + XEXP (x, 0) = 0; + } + + break; + } + prev = &XEXP (x, 1); + } + } + } + return insn; +} + +/* Perform various interesting optimizations for exception handling + code. + + We look for empty exception regions and make them go (away). The + jump optimization code will remove the handler if nothing else uses + it. */ + +void +exception_optimize () +{ + rtx insn, regions = NULL_RTX; + int n; + + /* The below doesn't apply to setjmp/longjmp EH. */ + if (exceptions_via_longjmp) + return; + + /* Remove empty regions. */ + for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) + { + if (GET_CODE (insn) == NOTE + && NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG) + { + /* Since scan_region will return the NOTE_INSN_EH_REGION_END + insn, we will indirectly skip through all the insns + inbetween. We are also guaranteed that the value of insn + returned will be valid, as otherwise scan_region won't + return. */ + insn = scan_region (insn, NOTE_BLOCK_NUMBER (insn), &n); + } + } +} + +/* Various hooks for the DWARF 2 __throw routine. */ + +/* Do any necessary initialization to access arbitrary stack frames. + On the SPARC, this means flushing the register windows. */ + +void +expand_builtin_unwind_init () +{ + /* Set this so all the registers get saved in our frame; we need to be + able to copy the saved values for any registers from frames we unwind. */ + current_function_has_nonlocal_label = 1; + +#ifdef SETUP_FRAME_ADDRESSES + SETUP_FRAME_ADDRESSES (); +#endif +} + +/* Given a value extracted from the return address register or stack slot, + return the actual address encoded in that value. */ + +rtx +expand_builtin_extract_return_addr (addr_tree) + tree addr_tree; +{ + rtx addr = expand_expr (addr_tree, NULL_RTX, Pmode, 0); + return eh_outer_context (addr); +} + +/* Given an actual address in addr_tree, do any necessary encoding + and return the value to be stored in the return address register or + stack slot so the epilogue will return to that address. */ + +rtx +expand_builtin_frob_return_addr (addr_tree) + tree addr_tree; +{ + rtx addr = expand_expr (addr_tree, NULL_RTX, Pmode, 0); +#ifdef RETURN_ADDR_OFFSET + addr = plus_constant (addr, -RETURN_ADDR_OFFSET); +#endif + return addr; +} + +/* Given an actual address in addr_tree, set the return address register up + so the epilogue will return to that address. If the return address is + not in a register, do nothing. */ + +void +expand_builtin_set_return_addr_reg (addr_tree) + tree addr_tree; +{ + rtx tmp; + rtx ra = expand_builtin_return_addr (BUILT_IN_RETURN_ADDRESS, + 0, hard_frame_pointer_rtx); + + if (GET_CODE (ra) != REG || REGNO (ra) >= FIRST_PSEUDO_REGISTER) + return; + + tmp = force_operand (expand_builtin_frob_return_addr (addr_tree), ra); + if (tmp != ra) + emit_move_insn (ra, tmp); +} + +/* Choose two registers for communication between the main body of + __throw and the stub for adjusting the stack pointer. The first register + is used to pass the address of the exception handler; the second register + is used to pass the stack pointer offset. + + For register 1 we use the return value register for a void *. + For register 2 we use the static chain register if it exists and is + different from register 1, otherwise some arbitrary call-clobbered + register. */ + +static void +eh_regs (r1, r2, outgoing) + rtx *r1, *r2; + int outgoing; +{ + rtx reg1, reg2; + +#ifdef FUNCTION_OUTGOING_VALUE + if (outgoing) + reg1 = FUNCTION_OUTGOING_VALUE (build_pointer_type (void_type_node), + current_function_decl); + else +#endif + reg1 = FUNCTION_VALUE (build_pointer_type (void_type_node), + current_function_decl); + +#ifdef STATIC_CHAIN_REGNUM + if (outgoing) + reg2 = static_chain_incoming_rtx; + else + reg2 = static_chain_rtx; + if (REGNO (reg2) == REGNO (reg1)) +#endif /* STATIC_CHAIN_REGNUM */ + reg2 = NULL_RTX; + + if (reg2 == NULL_RTX) + { + int i; + for (i = 0; i < FIRST_PSEUDO_REGISTER; ++i) + if (call_used_regs[i] && ! fixed_regs[i] && i != REGNO (reg1)) + { + reg2 = gen_rtx (REG, Pmode, i); + break; + } + + if (reg2 == NULL_RTX) + abort (); + } + + *r1 = reg1; + *r2 = reg2; +} + +/* Emit inside of __throw a stub which adjusts the stack pointer and jumps + to the exception handler. __throw will set up the necessary values + and then return to the stub. */ + +rtx +expand_builtin_eh_stub () +{ + rtx stub_start = gen_label_rtx (); + rtx after_stub = gen_label_rtx (); + rtx handler, offset, temp; + + emit_jump (after_stub); + emit_label (stub_start); + + eh_regs (&handler, &offset, 0); + + adjust_stack (offset); + emit_indirect_jump (handler); + + emit_label (after_stub); + return gen_rtx (LABEL_REF, Pmode, stub_start); +} + +/* Set up the registers for passing the handler address and stack offset + to the stub above. */ + +void +expand_builtin_set_eh_regs (handler, offset) + tree handler, offset; +{ + rtx reg1, reg2; + + eh_regs (®1, ®2, 1); + + store_expr (offset, reg2, 0); + store_expr (handler, reg1, 0); + + /* These will be used by the stub. */ + emit_insn (gen_rtx (USE, VOIDmode, reg1)); + emit_insn (gen_rtx (USE, VOIDmode, reg2)); +} diff --git a/gnu/usr.bin/gcc/except.h b/gnu/usr.bin/gcc/except.h new file mode 100644 index 00000000000..ac46fa4478f --- /dev/null +++ b/gnu/usr.bin/gcc/except.h @@ -0,0 +1,291 @@ +/* Exception Handling interface routines. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Contributed by Mike Stump <mrs@cygnus.com>. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + + +#ifndef GET_CODE +#define rtx int * +#endif + +#ifdef TREE_CODE + +/* A stack of labels. CHAIN points to the next entry in the stack. */ + +struct label_node { + union { + rtx rlabel; + tree tlabel; + } u; + struct label_node *chain; +}; + +/* An eh_entry is used to describe one exception handling region. + + OUTER_CONTEXT is the label used for rethrowing into the outer context. + + EXCEPTION_HANDLER_LABEL is the label corresponding to the handler + for this region. + + FINALIZATION is the tree codes for the handler, or is NULL_TREE if + one hasn't been generated yet, or is integer_zero_node to mark the + end of a group of try blocks. */ + +struct eh_entry { + rtx outer_context; + rtx exception_handler_label; + + tree finalization; +}; + +/* A list of EH_ENTRYs. ENTRY is the entry; CHAIN points to the next + entry in the list, or is NULL if this is the last entry. */ + +struct eh_node { + struct eh_entry *entry; + struct eh_node *chain; +}; + +/* A stack of EH_ENTRYs. TOP is the topmost entry on the stack. TOP is + NULL if the stack is empty. */ + +struct eh_stack { + struct eh_node *top; +}; + +/* A queue of EH_ENTRYs. HEAD is the front of the queue; TAIL is the + end (the latest entry). HEAD and TAIL are NULL if the queue is + empty. */ + +struct eh_queue { + struct eh_node *head; + struct eh_node *tail; +}; + + +/* Start an exception handling region. All instructions emitted after + this point are considered to be part of the region until + expand_eh_region_end () is invoked. */ + +extern void expand_eh_region_start PROTO((void)); + +/* Just like expand_eh_region_start, except if a cleanup action is + entered on the cleanup chain, the TREE_PURPOSE of the element put + on the chain is DECL. DECL should be the associated VAR_DECL, if + any, otherwise it should be NULL_TREE. */ + +extern void expand_eh_region_start_for_decl PROTO((tree)); + +/* Start an exception handling region for the given cleanup action. + All instructions emitted after this point are considered to be part + of the region until expand_eh_region_end () is invoked. CLEANUP is + the cleanup action to perform. The return value is true if the + exception region was optimized away. If that case, + expand_eh_region_end does not need to be called for this cleanup, + nor should it be. + + This routine notices one particular common case in C++ code + generation, and optimizes it so as to not need the exception + region. */ + +extern int expand_eh_region_start_tree PROTO((tree, tree)); + +/* End an exception handling region. The information about the region + is found on the top of ehstack. + + HANDLER is either the cleanup for the exception region, or if we're + marking the end of a try block, HANDLER is integer_zero_node. + + HANDLER will be transformed to rtl when expand_leftover_cleanups () + is invoked. */ + +extern void expand_eh_region_end PROTO((tree)); + +/* Push RLABEL or TLABEL onto LABELSTACK. Only one of RLABEL or TLABEL + should be set; the other must be NULL. */ + +extern void push_label_entry PROTO((struct label_node **labelstack, rtx rlabel, tree tlabel)); + +/* Pop the topmost entry from LABELSTACK and return its value as an + rtx node. If LABELSTACK is empty, return NULL. */ + +extern rtx pop_label_entry PROTO((struct label_node **labelstack)); + +/* Return the topmost entry of LABELSTACK as a tree node, or return + NULL_TREE if LABELSTACK is empty. */ + +extern tree top_label_entry PROTO((struct label_node **labelstack)); + +/* A set of insns for the catch clauses in the current function. They + will be emitted at the end of the current function. */ + +extern rtx catch_clauses; + +#endif + +/* Toplevel initialization for EH. */ + +extern void init_eh PROTO((void)); + +/* Initialization for the per-function EH data. */ + +extern void init_eh_for_function PROTO((void)); + +/* Adds an EH table entry for EH entry number N. Called from + final_scan_insn for NOTE_INSN_EH_REGION_BEG. */ + +extern void add_eh_table_entry PROTO((int n)); + +/* Returns a non-zero value if we need to output an exception table. */ + +extern int exception_table_p PROTO((void)); + +/* Outputs the exception table if we have one. */ + +extern void output_exception_table PROTO((void)); + +/* Given a return address in ADDR, determine the address we should use + to find the corresponding EH region. */ + +extern rtx eh_outer_context PROTO((rtx addr)); + +/* Called at the start of a block of try statements for which there is + a supplied catch handler. */ + +extern void expand_start_try_stmts PROTO((void)); + +/* Called at the start of a block of catch statements. It terminates the + previous set of try statements. */ + +extern void expand_start_all_catch PROTO((void)); + +/* Called at the end of a block of catch statements. */ + +extern void expand_end_all_catch PROTO((void)); + +#ifdef TREE_CODE +/* Create a new exception region and add the handler for the region + onto a list. These regions will be ended (and their handlers + emitted) when end_protect_partials is invoked. */ + +extern void add_partial_entry PROTO((tree handler)); +#endif + +/* End all of the pending exception regions that have handlers added with + push_protect_entry (). */ + +extern void end_protect_partials PROTO((void)); + +/* An internal throw with a direct CONTEXT we want to throw + from. CONTEXT must be a label. */ + +extern void expand_internal_throw PROTO((rtx context)); + +/* Called from expand_exception_blocks and expand_end_catch_block to + expand and pending handlers. */ + +extern void expand_leftover_cleanups PROTO((void)); + +/* If necessary, emit insns for the start of per-function unwinder for + the current function. */ + +extern void emit_unwinder PROTO((void)); + +/* If necessary, emit insns for the end of the per-function unwinder + for the current function. */ + +extern void end_eh_unwinder PROTO((void)); + +/* Builds a list of handler labels and puts them in the global + variable exception_handler_labels. */ + +extern void find_exception_handler_labels PROTO((void)); + +/* Performs sanity checking on the check_exception_handler_labels + list. */ + +extern void check_exception_handler_labels PROTO((void)); + +/* A stack used to keep track of the label used to resume normal program + flow out of the current exception handler region. */ + +extern struct label_node *caught_return_label_stack; + +/* Keeps track of the label used as the context of a throw to rethrow an + exception to the outer exception region. */ + +extern struct label_node *outer_context_label_stack; + +/* A random area used for purposes elsewhere. */ + +extern struct label_node *false_label_stack; + +/* A list of labels used for exception handlers. It is created by + find_exception_handler_labels for the optimization passes. */ + +extern rtx exception_handler_labels; + +/* The rtx for the saved PC value. */ + +extern rtx eh_saved_pc_rtx; + +/* Performs optimizations for exception handling, such as removing + unnecessary exception regions. Invoked from jump_optimize (). */ + +extern void exception_optimize PROTO((void)); + +/* Get the dynamic handler chain. */ +extern rtx get_dynamic_handler_chain PROTO((void)); + +/* Get the dynamic cleanup chain. */ +extern rtx get_dynamic_cleanup_chain PROTO((void)); + +/* Throw an exception. */ + +extern void emit_throw PROTO((void)); + +/* One to use setjmp/longjmp method of generating code. */ + +extern int exceptions_via_longjmp; + +/* One to enable asynchronous exception support. */ + +extern int asynchronous_exceptions; + +/* One to protect cleanup actions with a handler that calls + __terminate, zero otherwise. */ + +extern int protect_cleanup_actions_with_terminate; + +#ifdef TREE_CODE +extern tree protect_with_terminate PROTO((tree)); +#endif + +/* Various hooks for the DWARF 2 __throw routine. */ + +void expand_builtin_unwind_init PROTO((void)); +rtx expand_builtin_dwarf_fp_regnum PROTO((void)); +rtx expand_builtin_eh_stub PROTO((void)); +#ifdef TREE_CODE +rtx expand_builtin_frob_return_addr PROTO((tree)); +rtx expand_builtin_extract_return_addr PROTO((tree)); +void expand_builtin_set_return_addr_reg PROTO((tree)); +void expand_builtin_set_eh_regs PROTO((tree, tree)); +rtx expand_builtin_dwarf_reg_size PROTO((tree, rtx)); +#endif diff --git a/gnu/usr.bin/gcc/fixinc.irix b/gnu/usr.bin/gcc/fixinc.irix new file mode 100644 index 00000000000..337289a121e --- /dev/null +++ b/gnu/usr.bin/gcc/fixinc.irix @@ -0,0 +1,190 @@ +#! /bin/sh +# Install modified versions of certain problematic Irix include files. +# Copyright (C) 1997 Free Software Foundation, Inc. +# Contributed by Brendan Kehoe (brendan@cygnus.com). +# +# This file is part of GNU CC. +# +# GNU CC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU CC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU CC; see the file COPYING. If not, write to +# the Free Software Foundation, 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# +# See README-fixinc for more information. + +# 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 if it is relative. +# Don't do this if not necessary, since may screw up automounters. +case $LIB in +/*) + ;; +*) + LIB=$ORIG_DIR/$LIB + ;; +esac + +echo 'Building fixincludes in ' ${LIB} + +# +# Note: For Irix, we deliberately don't try to create the directory trees, +# since we only modify math.h, limits.h and unistd.h. If we +# ADD ANY OTHERS, the "Making directories:" and symlinks code from +# fixinc.svr4 may have to go back in. + +# The Irix math.h defines struct exception, which conflicts with +# the class exception defined in the C++ file std/stdexcept.h. We +# redefine it to __math_exception. This is not a great fix, but I +# haven't been able to think of anything better. +file=math.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 '/struct exception/i\ +#ifdef __cplusplus\ +#define exception __math_exception\ +#endif'\ + -e '/struct exception/a\ +#ifdef __cplusplus\ +#undef exception\ +#endif' $file_to_fix > /tmp/$base + if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \ + true + else + echo Fixed $file_to_fix + rm -f ${LIB}/$file + cp /tmp/$base ${LIB}/$file + chmod a+r ${LIB}/$file + fi + rm -f /tmp/$base +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. + +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 \ + true + else + echo Fixed $file_to_fix + rm -f ${LIB}/$file + cp /tmp/$base ${LIB}/$file + chmod a+r ${LIB}/$file + fi + rm -f /tmp/$base +fi + +# The Irix unistd.h will introduce a call to __vfork in its libc, but the +# function is never actually prototyped. +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 '/__vfork/i\ +extern pid_t __vfork(void);'\ + $file_to_fix > /tmp/$base + if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \ + true + else + echo Fixed $file_to_fix + rm -f ${LIB}/$file + cp /tmp/$base ${LIB}/$file + chmod a+r ${LIB}/$file + fi + rm -f /tmp/$base +fi + +exit 0 diff --git a/gnu/usr.bin/gcc/fixinc.math b/gnu/usr.bin/gcc/fixinc.math new file mode 100644 index 00000000000..a8a9fe7e4d3 --- /dev/null +++ b/gnu/usr.bin/gcc/fixinc.math @@ -0,0 +1,53 @@ +#! /bin/sh +# Fix struct exception in /usr/include/math.h. +# +# We expect several systems which did not need fixincludes in the past +# to need to fix just math.h. So we created a separate fixinc.math +# script to fix just that problem. +# See README-fixinc for more information. + +# Directory containing the original header files. +# (This was named INCLUDES, but that conflicts with a name in Makefile.in.) +INPUT=${2-${INPUT-/usr/include}} + +# 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 + +echo Building fixed headers in ${LIB} + +# Some math.h files define struct exception, which conflicts with +# the class exception defined in the C++ file std/stdexcept.h. We +# redefine it to __math_exception. This is not a great fix, but I +# haven't been able to think of anything better. +file=math.h +if [ -r $INPUT/$file ]; then + echo Checking $INPUT/$file + if grep 'struct exception' $INPUT/$file >/dev/null + then + echo Fixed $file + rm -f $LIB/$file + cat <<'__EOF__' >$LIB/$file +#ifndef _MATH_H_WRAPPER +#ifdef __cplusplus +# define exception __math_exception +#endif +#include_next <math.h> +#ifdef __cplusplus +# undef exception +#endif +#define _MATH_H_WRAPPER +#endif /* _MATH_H_WRAPPER */ +__EOF__ + # Define _MATH_H_WRAPPER at the end of the wrapper, not the start, + # so that if #include_next gets another instance of the wrapper, + # this will follow the #include_next chain until we arrive at + # the real <math.h>. + chmod a+r $LIB/$file + fi +fi +exit 0 diff --git a/gnu/usr.bin/gcc/fp-test.c b/gnu/usr.bin/gcc/fp-test.c new file mode 100644 index 00000000000..667059c1dda --- /dev/null +++ b/gnu/usr.bin/gcc/fp-test.c @@ -0,0 +1,231 @@ +/* fp-test.c - Check that all floating-point operations are available. + Copyright (C) 1995 Free Software Foundation, Inc. + Contributed by Ronald F. Guilmette <rfg@monkeys.com>. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* This is a trivial test program which may be useful to people who are + porting the GCC or G++ compilers to a new system. The intent here is + merely to check that all floating-point operations have been provided + by the port. (Note that I say ``provided'' rather than ``implemented''.) + + To use this file, simply compile it (with GCC or G++) and then try to + link it in the normal way (also using GCC or G++ respectively). If + all of the floating -point operations (including conversions) have + been provided, then this file will link without incident. If however + one or more of the primitive floating-point operations have not been + properly provided, you will get link-time errors indicating which + floating-point operations are unavailable. + + This file will typically be used when porting the GNU compilers to + some system which lacks floating-point hardware, and for which + software emulation routines (for FP ops) are needed in order to + complete the port. */ + +#if 0 +#include <math.h> +#endif + +extern double acos (double); +extern double asin (double); +extern double atan (double); +extern double atan2 (double, double); +extern double cos (double); +extern double sin (double); +extern double tan (double); +extern double cosh (double); +extern double sinh (double); +extern double tanh (double); +extern double exp (double); +extern double frexp (double, int *); +extern double ldexp (double, int); +extern double log (double); +extern double log10 (double); +extern double modf (double, double *); +extern double pow (double, double); +extern double sqrt (double); +extern double ceil (double); +extern double fabs (double); +extern double floor (double); +extern double fmod (double, double); + +int i1, i2 = 2; + +volatile signed char sc; +volatile unsigned char uc; + +volatile signed short ss; +volatile unsigned short us; + +volatile signed int si; +volatile unsigned int ui; + +volatile signed long sl; +volatile unsigned long ul; + +volatile float f1 = 1.0, f2 = 1.0, f3 = 1.0; +volatile double d1 = 1.0, d2 = 1.0, d3 = 1.0; +volatile long double D1 = 1.0, D2 = 1.0, D3 = 1.0; + +int +main () +{ + /* TYPE: float */ + + f1 = -f2; + f1 = f2 + f3; + f1 = f2 - f3; + f1 = f2 * f3; + f1 = f2 / f3; + f1 += f2; + f1 -= f2; + f1 *= f2; + f1 /= f2; + + si = f1 == f2; + si = f1 != f2; + si = f1 > f2; + si = f1 < f2; + si = f1 >= f2; + si = f1 <= f2; + + sc = f1; + uc = f1; + ss = f1; + us = f1; + si = f1; + ui = f1; + sl = f1; + ul = f1; + d1 = f1; + D1 = f1; + + f1 = sc; + f1 = uc; + f1 = ss; + f1 = us; + f1 = si; + f1 = ui; + f1 = sl; + f1 = ul; + f1 = d1; + f1 = D1; + + d1 = -d2; + d1 = d2 + d3; + d1 = d2 - d3; + d1 = d2 * d3; + d1 = d2 / d3; + d1 += d2; + d1 -= d2; + d1 *= d2; + d1 /= d2; + + si = d1 == d2; + si = d1 != d2; + si = d1 > d2; + si = d1 < d2; + si = d1 >= d2; + si = d1 <= d2; + + sc = d1; + uc = d1; + ss = d1; + us = d1; + si = d1; + ui = d1; + sl = d1; + ul = d1; + f1 = d1; + D1 = d1; + + d1 = sc; + d1 = uc; + d1 = ss; + d1 = us; + d1 = si; + d1 = ui; + d1 = sl; + d1 = ul; + d1 = f1; + d1 = D1; + + D1 = -D2; + D1 = D2 + D3; + D1 = D2 - D3; + D1 = D2 * D3; + D1 = D2 / D3; + D1 += D2; + D1 -= D2; + D1 *= D2; + D1 /= D2; + + si = D1 == D2; + si = D1 != D2; + si = D1 > D2; + si = D1 < D2; + si = D1 >= D2; + si = D1 <= D2; + + sc = D1; + uc = D1; + ss = D1; + us = D1; + si = D1; + ui = D1; + sl = D1; + ul = D1; + f1 = D1; + d1 = D1; + + D1 = sc; + D1 = uc; + D1 = ss; + D1 = us; + D1 = si; + D1 = ui; + D1 = sl; + D1 = ul; + D1 = f1; + D1 = d1; + + d1 = acos (d2); + d1 = asin (d2); + d1 = atan (d2); + d1 = atan2 (d2, d3); + d1 = cos (d2); + d1 = sin (d2); + d1 = tan (d2); + d1 = cosh (d2); + d1 = sinh (d2); + d1 = tanh (d2); + d1 = exp (d2); + d1 = frexp (d2, &i1); + d1 = ldexp (d2, i2); + d1 = log (d2); + d1 = log10 (d2); + d1 = modf (d2, &d3); + d1 = pow (d2, d3); + d1 = sqrt (d2); + d1 = ceil (d2); + d1 = fabs (d2); + d1 = floor (d2); + d1 = fmod (d2, d3); + + return 0; +} diff --git a/gnu/usr.bin/gcc/frame.c b/gnu/usr.bin/gcc/frame.c new file mode 100644 index 00000000000..2ab4aac93b4 --- /dev/null +++ b/gnu/usr.bin/gcc/frame.c @@ -0,0 +1,605 @@ +/* Subroutines needed for unwinding stack frames for exception handling. */ +/* Compile this one with gcc. */ +/* Copyright (C) 1997 Free Software Foundation, Inc. + Contributed by Jason Merrill <jason@cygnus.com>. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* As a special exception, if you link this library with other files, + some of which are compiled with GCC, to produce an executable, + this library does not by itself cause the resulting executable + to be covered by the GNU General Public License. + This exception does not however invalidate any other reasons why + the executable file might be covered by the GNU General Public License. */ + +/* It is incorrect to include config.h here, because this file is being + compiled for the target, and hence definitions concerning only the host + do not apply. */ + +#include "tconfig.h" +#include "defaults.h" + +#ifdef DWARF2_UNWIND_INFO +#include "gansidecl.h" +#include "dwarf2.h" +#include <stddef.h> +#include "frame.h" + +/* Don't use `fancy_abort' here even if config.h says to use it. */ +#ifdef abort +#undef abort +#endif + +/* Some types used by the DWARF 2 spec. */ + +typedef int sword __attribute__ ((mode (SI))); +typedef unsigned int uword __attribute__ ((mode (SI))); +typedef unsigned int uaddr __attribute__ ((mode (pointer))); +typedef int saddr __attribute__ ((mode (pointer))); +typedef unsigned char ubyte; + +/* The first few fields of a CIE. The CIE_id field is 0xffffffff for a CIE, + to distinguish it from a valid FDE. FDEs are aligned to an addressing + unit boundary, but the fields within are unaligned. */ + +struct dwarf_cie { + uword length; + sword CIE_id; + ubyte version; + char augmentation[0]; +} __attribute__ ((packed, aligned (__alignof__ (void *)))); + +/* The first few fields of an FDE. */ + +struct dwarf_fde { + uword length; + sword CIE_delta; + void* pc_begin; + uaddr pc_range; +} __attribute__ ((packed, aligned (__alignof__ (void *)))); + +typedef struct dwarf_fde fde; + +/* Objects to be searched for frame unwind info. */ + +static struct object *objects; + +/* The information we care about from a CIE. */ + +struct cie_info { + char *augmentation; + void *eh_ptr; + int code_align; + int data_align; + unsigned ra_regno; +}; + +/* The current unwind state, plus a saved copy for DW_CFA_remember_state. */ + +struct frame_state_internal +{ + struct frame_state s; + struct frame_state_internal *saved_state; +}; + +/* Decode the unsigned LEB128 constant at BUF into the variable pointed to + by R, and return the new value of BUF. */ + +static void * +decode_uleb128 (unsigned char *buf, unsigned *r) +{ + unsigned shift = 0; + unsigned result = 0; + + while (1) + { + unsigned byte = *buf++; + result |= (byte & 0x7f) << shift; + if ((byte & 0x80) == 0) + break; + shift += 7; + } + *r = result; + return buf; +} + +/* Decode the signed LEB128 constant at BUF into the variable pointed to + by R, and return the new value of BUF. */ + +static void * +decode_sleb128 (unsigned char *buf, int *r) +{ + unsigned shift = 0; + unsigned result = 0; + unsigned byte; + + while (1) + { + byte = *buf++; + result |= (byte & 0x7f) << shift; + shift += 7; + if ((byte & 0x80) == 0) + break; + } + if (shift < (sizeof (*r) * 8) && (byte & 0x40) != 0) + result |= - (1 << shift); + + *r = result; + return buf; +} + +/* Read unaligned data from the instruction buffer. */ + +union unaligned { + void *p; + unsigned b2 __attribute__ ((mode (HI))); + unsigned b4 __attribute__ ((mode (SI))); + unsigned b8 __attribute__ ((mode (DI))); +} __attribute__ ((packed)); +static inline void * +read_pointer (void *p) +{ union unaligned *up = p; return up->p; } +static inline unsigned +read_1byte (void *p) +{ return *(unsigned char *)p; } +static inline unsigned +read_2byte (void *p) +{ union unaligned *up = p; return up->b2; } +static inline unsigned +read_4byte (void *p) +{ union unaligned *up = p; return up->b4; } +static inline unsigned long +read_8byte (void *p) +{ union unaligned *up = p; return up->b8; } + +/* Ordering function for FDEs. Functions can't overlap, so we just compare + their starting addresses. */ + +static inline saddr +fde_compare (fde *x, fde *y) +{ + return (saddr)x->pc_begin - (saddr)y->pc_begin; +} + +/* Return the address of the FDE after P. */ + +static inline fde * +next_fde (fde *p) +{ + return (fde *)(((char *)p) + p->length + sizeof (p->length)); +} + +/* One iteration of an insertion sort, for adding new FDEs to the array. + Usually the new FDE will go in at the end, so we can expect close to + O(n) performance. If this turns out to be overly optimistic, we can have + the linker sort the FDEs so we don't have to do it at run time. */ + +static void +fde_insert (fde **array, size_t i, fde *this_fde) +{ + array[i] = this_fde; + + for (; i > 0 && fde_compare (array[i], array[i-1]) < 0; --i) + { + this_fde = array[i]; + array[i] = array[i-1]; + array[i-1] = this_fde; + } +} + +static size_t +count_fdes (fde *this_fde) +{ + size_t count; + + for (count = 0; this_fde->length != 0; this_fde = next_fde (this_fde)) + { + /* Skip CIEs and linked once FDE entries. */ + if (this_fde->CIE_delta == 0 || this_fde->pc_begin == 0) + continue; + + ++count; + } + + return count; +} + +static void +add_fdes (fde *this_fde, fde **array, size_t *i_ptr, + void **beg_ptr, void **end_ptr) +{ + size_t i = *i_ptr; + void *pc_begin = *beg_ptr; + void *pc_end = *end_ptr; + + for (; this_fde->length != 0; this_fde = next_fde (this_fde)) + { + /* Skip CIEs and linked once FDE entries. */ + if (this_fde->CIE_delta == 0 || this_fde->pc_begin == 0) + continue; + + fde_insert (array, i++, this_fde); + + if (this_fde->pc_begin < pc_begin) + pc_begin = this_fde->pc_begin; + if (this_fde->pc_begin + this_fde->pc_range > pc_end) + pc_end = this_fde->pc_begin + this_fde->pc_range; + } + + *i_ptr = i; + *beg_ptr = pc_begin; + *end_ptr = pc_end; +} + +/* Set up a sorted array of pointers to FDEs for a loaded object. We + count up the entries before allocating the array because it's likely to + be faster. */ + +static void +frame_init (struct object* ob) +{ + fde *this_fde; + size_t count; + fde **array; + void *pc_begin, *pc_end; + + if (ob->fde_array) + { + fde **p = ob->fde_array; + for (count = 0; *p; ++p) + count += count_fdes (*p); + } + else + count = count_fdes (ob->fde_begin); + + ob->count = count; + array = (fde **) malloc (sizeof (fde *) * count); + + pc_begin = (void*)(uaddr)-1; + pc_end = 0; + count = 0; + + if (ob->fde_array) + { + fde **p = ob->fde_array; + for (; *p; ++p) + add_fdes (*p, array, &count, &pc_begin, &pc_end); + } + else + add_fdes (ob->fde_begin, array, &count, &pc_begin, &pc_end); + + ob->fde_array = array; + ob->pc_begin = pc_begin; + ob->pc_end = pc_end; +} + +/* Return a pointer to the FDE for the function containing PC. */ + +static fde * +find_fde (void *pc) +{ + struct object *ob; + size_t lo, hi; + + for (ob = objects; ob; ob = ob->next) + { + if (ob->pc_begin == 0) + frame_init (ob); + if (pc >= ob->pc_begin && pc < ob->pc_end) + break; + } + + if (ob == 0) + return 0; + + /* Standard binary search algorithm. */ + for (lo = 0, hi = ob->count; lo < hi; ) + { + size_t i = (lo + hi) / 2; + fde *f = ob->fde_array[i]; + + if (pc < f->pc_begin) + hi = i; + else if (pc > f->pc_begin + f->pc_range) + lo = i + 1; + else + return f; + } + + return 0; +} + +static inline struct dwarf_cie * +get_cie (fde *f) +{ + return ((void *)&f->CIE_delta) - f->CIE_delta; +} + +/* Extract any interesting information from the CIE for the translation + unit F belongs to. */ + +static void * +extract_cie_info (fde *f, struct cie_info *c) +{ + void *p; + int i; + + c->augmentation = get_cie (f)->augmentation; + + if (strcmp (c->augmentation, "") != 0 + && strcmp (c->augmentation, "eh") != 0 + && c->augmentation[0] != 'z') + return 0; + + p = c->augmentation + strlen (c->augmentation) + 1; + + if (strcmp (c->augmentation, "eh") == 0) + { + c->eh_ptr = read_pointer (p); + p += sizeof (void *); + } + else + c->eh_ptr = 0; + + p = decode_uleb128 (p, &c->code_align); + p = decode_sleb128 (p, &c->data_align); + c->ra_regno = *(unsigned char *)p++; + + /* If the augmentation starts with 'z', we now see the length of the + augmentation fields. */ + if (c->augmentation[0] == 'z') + { + p = decode_uleb128 (p, &i); + p += i; + } + + return p; +} + +/* Decode one instruction's worth of of DWARF 2 call frame information. + Used by __frame_state_for. Takes pointers P to the instruction to + decode, STATE to the current register unwind information, INFO to the + current CIE information, and PC to the current PC value. Returns a + pointer to the next instruction. */ + +static void * +execute_cfa_insn (void *p, struct frame_state_internal *state, + struct cie_info *info, void **pc) +{ + unsigned insn = *(unsigned char *)p++; + unsigned reg; + int offset; + + if (insn & DW_CFA_advance_loc) + *pc += ((insn & 0x3f) * info->code_align); + else if (insn & DW_CFA_offset) + { + reg = (insn & 0x3f); + p = decode_uleb128 (p, &offset); + offset *= info->data_align; + state->s.saved[reg] = REG_SAVED_OFFSET; + state->s.reg_or_offset[reg] = offset; + } + else if (insn & DW_CFA_restore) + { + reg = (insn & 0x3f); + state->s.saved[reg] = REG_UNSAVED; + } + else switch (insn) + { + case DW_CFA_set_loc: + *pc = read_pointer (p); + p += sizeof (void *); + break; + case DW_CFA_advance_loc1: + *pc += read_1byte (p); + p += 1; + break; + case DW_CFA_advance_loc2: + *pc += read_2byte (p); + p += 2; + break; + case DW_CFA_advance_loc4: + *pc += read_4byte (p); + p += 4; + break; + + case DW_CFA_offset_extended: + p = decode_uleb128 (p, ®); + p = decode_uleb128 (p, &offset); + offset *= info->data_align; + state->s.saved[reg] = REG_SAVED_OFFSET; + state->s.reg_or_offset[reg] = offset; + break; + case DW_CFA_restore_extended: + p = decode_uleb128 (p, ®); + state->s.saved[reg] = REG_UNSAVED; + break; + + case DW_CFA_undefined: + case DW_CFA_same_value: + case DW_CFA_nop: + break; + + case DW_CFA_register: + { + unsigned reg2; + p = decode_uleb128 (p, ®); + p = decode_uleb128 (p, ®2); + state->s.saved[reg] = REG_SAVED_REG; + state->s.reg_or_offset[reg] = reg2; + } + break; + + case DW_CFA_def_cfa: + p = decode_uleb128 (p, ®); + p = decode_uleb128 (p, &offset); + state->s.cfa_reg = reg; + state->s.cfa_offset = offset; + break; + case DW_CFA_def_cfa_register: + p = decode_uleb128 (p, ®); + state->s.cfa_reg = reg; + break; + case DW_CFA_def_cfa_offset: + p = decode_uleb128 (p, &offset); + state->s.cfa_offset = offset; + break; + + case DW_CFA_remember_state: + { + struct frame_state_internal *save = + (struct frame_state_internal *) + malloc (sizeof (struct frame_state_internal)); + memcpy (save, state, sizeof (struct frame_state_internal)); + state->saved_state = save; + } + break; + case DW_CFA_restore_state: + { + struct frame_state_internal *save = state->saved_state; + memcpy (state, save, sizeof (struct frame_state_internal)); + free (save); + } + break; + + /* FIXME: Hardcoded for SPARC register window configuration. */ + case DW_CFA_GNU_window_save: + for (reg = 16; reg < 32; ++reg) + { + state->s.saved[reg] = REG_SAVED_OFFSET; + state->s.reg_or_offset[reg] = (reg - 16) * sizeof (void *); + } + break; + + case DW_CFA_GNU_args_size: + p = decode_uleb128 (p, &offset); + state->s.args_size = offset; + break; + + default: + abort (); + } + return p; +} + +/* Called from crtbegin.o to register the unwind info for an object. */ + +void +__register_frame_info (void *begin, struct object *ob) +{ + ob->fde_begin = begin; + + ob->pc_begin = ob->pc_end = 0; + ob->fde_array = 0; + ob->count = 0; + + ob->next = objects; + objects = ob; +} + +/* Similar, but BEGIN is actually a pointer to a table of unwind entries + for different translation units. Called from the file generated by + collect2. */ + +void +__register_frame_info_table (void *begin, struct object *ob) +{ + ob->fde_begin = begin; + ob->fde_array = begin; + + ob->pc_begin = ob->pc_end = 0; + ob->count = 0; + + ob->next = objects; + objects = ob; +} + +/* Called from crtend.o to deregister the unwind info for an object. */ + +void +__deregister_frame_info (void *begin) +{ + struct object **p = &objects; + + while (*p) + { + if ((*p)->fde_begin == begin) + { + struct object *ob = *p; + *p = (*p)->next; + + /* If we've run init_frame for this object, free the FDE array. */ + if (ob->pc_begin) + free (ob->fde_array); + + return; + } + p = &((*p)->next); + } + abort (); +} + +/* Called from __throw to find the registers to restore for a given + PC_TARGET. The caller should allocate a local variable of `struct + frame_state' (declared in frame.h) and pass its address to STATE_IN. */ + +struct frame_state * +__frame_state_for (void *pc_target, struct frame_state *state_in) +{ + fde *f; + void *insn, *end, *pc; + struct cie_info info; + struct frame_state_internal state; + + f = find_fde (pc_target); + if (f == 0) + return 0; + + insn = extract_cie_info (f, &info); + if (insn == 0) + return 0; + + memset (&state, 0, sizeof (state)); + state.s.retaddr_column = info.ra_regno; + state.s.eh_ptr = info.eh_ptr; + + /* First decode all the insns in the CIE. */ + end = next_fde ((fde*) get_cie (f)); + while (insn < end) + insn = execute_cfa_insn (insn, &state, &info, 0); + + insn = ((fde *)f) + 1; + + if (info.augmentation[0] == 'z') + { + int i; + insn = decode_uleb128 (insn, &i); + insn += i; + } + + /* Then the insns in the FDE up to our target PC. */ + end = next_fde (f); + pc = f->pc_begin; + while (insn < end && pc <= pc_target) + insn = execute_cfa_insn (insn, &state, &info, &pc); + + memcpy (state_in, &state.s, sizeof (state.s)); + return state_in; +} +#endif /* DWARF2_UNWIND_INFO */ diff --git a/gnu/usr.bin/gcc/frame.h b/gnu/usr.bin/gcc/frame.h new file mode 100644 index 00000000000..7fa40d7af48 --- /dev/null +++ b/gnu/usr.bin/gcc/frame.h @@ -0,0 +1,56 @@ +/* Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of GNU CC. */ + +typedef struct frame_state +{ + void *cfa; + void *eh_ptr; + long cfa_offset; + long args_size; + long reg_or_offset[FIRST_PSEUDO_REGISTER+1]; + unsigned short cfa_reg; + unsigned short retaddr_column; + char saved[FIRST_PSEUDO_REGISTER+1]; +} frame_state; + +/* Values for 'saved' above. */ +#define REG_UNSAVED 0 +#define REG_SAVED_OFFSET 1 +#define REG_SAVED_REG 2 + +/* The representation for an "object" to be searched for frame unwind info. + For targets with named sections, one object is an executable or shared + library; for other targets, one object is one translation unit. + + A copy of this structure declaration is printed by collect2.c; + keep the copies synchronized! */ + +struct object { + void *pc_begin; + void *pc_end; + struct dwarf_fde *fde_begin; + struct dwarf_fde **fde_array; + size_t count; + struct object *next; +}; + +/* Called either from crtbegin.o or a static constructor to register the + unwind info for an object or translation unit, respectively. */ + +extern void __register_frame_info (void *, struct object *); + +/* Similar, but BEGIN is actually a pointer to a table of unwind entries + for different translation units. Called from the file generated by + collect2. */ +extern void __register_frame_info_table (void *, struct object *); + +/* Called from crtend.o to deregister the unwind info for an object. */ + +extern void __deregister_frame_info (void *); + +/* Called from __throw to find the registers to restore for a given + PC_TARGET. The caller should allocate a local variable of `struct + frame_state' (declared in frame.h) and pass its address to STATE_IN. + Returns NULL on failure, otherwise returns STATE_IN. */ + +extern struct frame_state *__frame_state_for (void *, struct frame_state *); diff --git a/gnu/usr.bin/gcc/future.options b/gnu/usr.bin/gcc/future.options new file mode 100644 index 00000000000..214be803467 --- /dev/null +++ b/gnu/usr.bin/gcc/future.options @@ -0,0 +1,29 @@ +From: friedman@gnu.ai.mit.edu (Noah Friedman) +To: roland@gnu.ai.mit.edu (Roland McGrath), + rms@gnu.ai.mit.edu (Richard Stallman), + jimb@gnu.ai.mit.edu (Jim Blandy), + mib@gnu.ai.mit.edu (Michael Bushnell) +Cc: cgw@sol.acs.unt.edu (chris williams), + clc@gnu.ai.mit.edu (Christian Longshore Claiborn) +Subject: Some gcc options we'd like to see. +Date: Mon, 28 Jun 93 00:45:09 EST +Reply-To: friedman@gnu.ai.mit.edu + +-Waggravate-return +-Wcast-spell +-Wcaste-align +-Win +-Wmissing-protons +-Wredundant-repetitions +-antsy +-fbungee-jump +-fexpensive-operations +-fextra-strength +-fjesus-saves +-fkeep-programmers-inline +-fno-peeping-toms +-fruit-roll-ups +-fshort-enough +-mno-dialogue +-pedophile +-vomit-frame-pointer diff --git a/gnu/usr.bin/gcc/gansidecl.h b/gnu/usr.bin/gcc/gansidecl.h new file mode 100644 index 00000000000..c6348e8db02 --- /dev/null +++ b/gnu/usr.bin/gcc/gansidecl.h @@ -0,0 +1,100 @@ +/* ANSI and traditional C compatibility macros. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* This file mimics some of the support provided by include/ansidecl.h + in binutils and gdb releases. + ??? Over time the two should be merged into one. */ + +#ifndef ANSIDECL_H +#define ANSIDECL_H + +/* Add prototype support. */ +#ifndef PROTO +#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) +#define PROTO(ARGS) ARGS +#else +#define PROTO(ARGS) () +#endif +#endif + +#ifndef VPROTO +#ifdef __STDC__ +#define PVPROTO(ARGS) ARGS +#define VPROTO(ARGS) ARGS +#define VA_START(va_list,var) va_start(va_list,var) +#else +#define PVPROTO(ARGS) () +#define VPROTO(ARGS) (va_alist) va_dcl +#define VA_START(va_list,var) va_start(va_list) +#endif +#endif + +/* Define a generic NULL if one hasn't already been defined. */ + +#ifndef NULL +#define NULL 0 +#endif + +#ifndef GENERIC_PTR +#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) +#define GENERIC_PTR void * +#else +#define GENERIC_PTR char * +#endif +#endif + +#ifndef NULL_PTR +#define NULL_PTR ((GENERIC_PTR) 0) +#endif + +#ifdef __STDC__ + +#define PTR void * + +#else + +#define PTR char * +#ifndef const +#define const +#endif + +#endif /* ! __STDC__ */ + +#ifndef HAVE_BCOPY +#define bcopy(src,dst,len) memcpy ((dst),(src),(len)) +#endif + +#ifndef HAVE_BZERO +#define bzero(dst,len) memset ((dst),0,(len)) +#endif + +#ifndef HAVE_BCMP +#define bcmp(left,right,len) memcmp ((left),(right),(len)) +#endif + +#ifndef HAVE_RINDEX +#define rindex strrchr +#endif + +#ifndef HAVE_INDEX +#define index strchr +#endif + +#endif /* ANSIDECL_H */ diff --git a/gnu/usr.bin/gcc/gcc.info-26 b/gnu/usr.bin/gcc/gcc.info-26 new file mode 100644 index 00000000000..340acc63b37 --- /dev/null +++ b/gnu/usr.bin/gcc/gcc.info-26 @@ -0,0 +1,965 @@ +This is Info file gcc.info, produced by Makeinfo version 1.68 from the +input file gcc.texi. + + This file documents the use and the internals of the GNU compiler. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 +Boston, MA 02111-1307 USA + + Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998 +Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + + Permission is granted to copy and distribute modified versions of +this manual under the conditions for verbatim copying, provided also +that the sections entitled "GNU General Public License," "Funding for +Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are +included exactly as in the original, and provided that the entire +resulting derived work is distributed under the terms of a permission +notice identical to this one. + + Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that the sections entitled "GNU General Public +License," "Funding for Free Software," and "Protect Your Freedom--Fight +`Look And Feel'", and this permission notice, may be included in +translations approved by the Free Software Foundation instead of in the +original English. + + +File: gcc.info, Node: Misc, Prev: Cross-compilation, Up: Target Macros + +Miscellaneous Parameters +======================== + + Here are several miscellaneous parameters. + +`PREDICATE_CODES' + Define this if you have defined special-purpose predicates in the + file `MACHINE.c'. This macro is called within an initializer of an + array of structures. The first field in the structure is the name + of a predicate and the second field is an array of rtl codes. For + each predicate, list all rtl codes that can be in expressions + matched by the predicate. The list should have a trailing comma. + Here is an example of two entries in the list for a typical RISC + machine: + + #define PREDICATE_CODES \ + {"gen_reg_rtx_operand", {SUBREG, REG}}, \ + {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}}, + + Defining this macro does not affect the generated code (however, + incorrect definitions that omit an rtl code that may be matched by + the predicate can cause the compiler to malfunction). Instead, it + allows the table built by `genrecog' to be more compact and + efficient, thus speeding up the compiler. The most important + predicates to include in the list specified by this macro are + thoses used in the most insn patterns. + +`CASE_VECTOR_MODE' + An alias for a machine mode name. This is the machine mode that + elements of a jump-table should have. + +`CASE_VECTOR_PC_RELATIVE' + Define this macro if jump-tables should contain relative addresses. + +`CASE_DROPS_THROUGH' + Define this if control falls through a `case' insn when the index + value is out of range. This means the specified default-label is + actually ignored by the `case' insn proper. + +`CASE_VALUES_THRESHOLD' + Define this to be the smallest number of different values for + which it is best to use a jump-table instead of a tree of + conditional branches. The default is four for machines with a + `casesi' instruction and five otherwise. This is best for most + machines. + +`WORD_REGISTER_OPERATIONS' + Define this macro if operations between registers with integral + mode smaller than a word are always performed on the entire + register. Most RISC machines have this property and most CISC + machines do not. + +`LOAD_EXTEND_OP (MODE)' + Define this macro to be a C expression indicating when insns that + read memory in MODE, an integral mode narrower than a word, set the + bits outside of MODE to be either the sign-extension or the + zero-extension of the data read. Return `SIGN_EXTEND' for values + of MODE for which the insn sign-extends, `ZERO_EXTEND' for which + it zero-extends, and `NIL' for other modes. + + This macro is not called with MODE non-integral or with a width + greater than or equal to `BITS_PER_WORD', so you may return any + value in this case. Do not define this macro if it would always + return `NIL'. On machines where this macro is defined, you will + normally define it as the constant `SIGN_EXTEND' or `ZERO_EXTEND'. + +`SHORT_IMMEDIATES_SIGN_EXTEND' + Define this macro if loading short immediate values into registers + sign extends. + +`IMPLICIT_FIX_EXPR' + An alias for a tree code that should be used by default for + conversion of floating point values to fixed point. Normally, + `FIX_ROUND_EXPR' is used. + +`FIXUNS_TRUNC_LIKE_FIX_TRUNC' + Define this macro if the same instructions that convert a floating + point number to a signed fixed point number also convert validly + to an unsigned one. + +`EASY_DIV_EXPR' + An alias for a tree code that is the easiest kind of division to + compile code for in the general case. It may be `TRUNC_DIV_EXPR', + `FLOOR_DIV_EXPR', `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'. These four + division operators differ in how they round the result to an + integer. `EASY_DIV_EXPR' is used when it is permissible to use + any of those kinds of division and the choice should be made on + the basis of efficiency. + +`MOVE_MAX' + The maximum number of bytes that a single instruction can move + quickly between memory and registers or between two memory + locations. + +`MAX_MOVE_MAX' + The maximum number of bytes that a single instruction can move + quickly between memory and registers or between two memory + locations. If this is undefined, the default is `MOVE_MAX'. + Otherwise, it is the constant value that is the largest value that + `MOVE_MAX' can have at run-time. + +`SHIFT_COUNT_TRUNCATED' + A C expression that is nonzero if on this machine the number of + bits actually used for the count of a shift operation is equal to + the number of bits needed to represent the size of the object + being shifted. When this macro is non-zero, the compiler will + assume that it is safe to omit a sign-extend, zero-extend, and + certain bitwise `and' instructions that truncates the count of a + shift operation. On machines that have instructions that act on + bitfields at variable positions, which may include `bit test' + instructions, a nonzero `SHIFT_COUNT_TRUNCATED' also enables + deletion of truncations of the values that serve as arguments to + bitfield instructions. + + If both types of instructions truncate the count (for shifts) and + position (for bitfield operations), or if no variable-position + bitfield instructions exist, you should define this macro. + + However, on some machines, such as the 80386 and the 680x0, + truncation only applies to shift operations and not the (real or + pretended) bitfield operations. Define `SHIFT_COUNT_TRUNCATED' to + be zero on such machines. Instead, add patterns to the `md' file + that include the implied truncation of the shift instructions. + + You need not define this macro if it would always have the value + of zero. + +`TRULY_NOOP_TRUNCATION (OUTPREC, INPREC)' + A C expression which is nonzero if on this machine it is safe to + "convert" an integer of INPREC bits to one of OUTPREC bits (where + OUTPREC is smaller than INPREC) by merely operating on it as if it + had only OUTPREC bits. + + On many machines, this expression can be 1. + + When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for + modes for which `MODES_TIEABLE_P' is 0, suboptimal code can result. + If this is the case, making `TRULY_NOOP_TRUNCATION' return 0 in + such cases may improve things. + +`STORE_FLAG_VALUE' + A C expression describing the value returned by a comparison + operator with an integral mode and stored by a store-flag + instruction (`sCOND') when the condition is true. This + description must apply to *all* the `sCOND' patterns and all the + comparison operators whose results have a `MODE_INT' mode. + + A value of 1 or -1 means that the instruction implementing the + comparison operator returns exactly 1 or -1 when the comparison is + true and 0 when the comparison is false. Otherwise, the value + indicates which bits of the result are guaranteed to be 1 when the + comparison is true. This value is interpreted in the mode of the + comparison operation, which is given by the mode of the first + operand in the `sCOND' pattern. Either the low bit or the sign + bit of `STORE_FLAG_VALUE' be on. Presently, only those bits are + used by the compiler. + + If `STORE_FLAG_VALUE' is neither 1 or -1, the compiler will + generate code that depends only on the specified bits. It can also + replace comparison operators with equivalent operations if they + cause the required bits to be set, even if the remaining bits are + undefined. For example, on a machine whose comparison operators + return an `SImode' value and where `STORE_FLAG_VALUE' is defined as + `0x80000000', saying that just the sign bit is relevant, the + expression + + (ne:SI (and:SI X (const_int POWER-OF-2)) (const_int 0)) + + can be converted to + + (ashift:SI X (const_int N)) + + where N is the appropriate shift count to move the bit being + tested into the sign bit. + + There is no way to describe a machine that always sets the + low-order bit for a true value, but does not guarantee the value + of any other bits, but we do not know of any machine that has such + an instruction. If you are trying to port GNU CC to such a + machine, include an instruction to perform a logical-and of the + result with 1 in the pattern for the comparison operators and let + us know (*note How to Report Bugs: Bug Reporting.). + + Often, a machine will have multiple instructions that obtain a + value from a comparison (or the condition codes). Here are rules + to guide the choice of value for `STORE_FLAG_VALUE', and hence the + instructions to be used: + + * Use the shortest sequence that yields a valid definition for + `STORE_FLAG_VALUE'. It is more efficient for the compiler to + "normalize" the value (convert it to, e.g., 1 or 0) than for + the comparison operators to do so because there may be + opportunities to combine the normalization with other + operations. + + * For equal-length sequences, use a value of 1 or -1, with -1 + being slightly preferred on machines with expensive jumps and + 1 preferred on other machines. + + * As a second choice, choose a value of `0x80000001' if + instructions exist that set both the sign and low-order bits + but do not define the others. + + * Otherwise, use a value of `0x80000000'. + + Many machines can produce both the value chosen for + `STORE_FLAG_VALUE' and its negation in the same number of + instructions. On those machines, you should also define a pattern + for those cases, e.g., one matching + + (set A (neg:M (ne:M B C))) + + Some machines can also perform `and' or `plus' operations on + condition code values with less instructions than the corresponding + `sCOND' insn followed by `and' or `plus'. On those machines, + define the appropriate patterns. Use the names `incscc' and + `decscc', respectively, for the patterns which perform `plus' or + `minus' operations on condition code values. See `rs6000.md' for + some examples. The GNU Superoptizer can be used to find such + instruction sequences on other machines. + + You need not define `STORE_FLAG_VALUE' if the machine has no + store-flag instructions. + +`FLOAT_STORE_FLAG_VALUE' + A C expression that gives a non-zero floating point value that is + returned when comparison operators with floating-point results are + true. Define this macro on machine that have comparison + operations that return floating-point values. If there are no + such operations, do not define this macro. + +`Pmode' + An alias for the machine mode for pointers. On most machines, + define this to be the integer mode corresponding to the width of a + hardware pointer; `SImode' on 32-bit machine or `DImode' on 64-bit + machines. On some machines you must define this to be one of the + partial integer modes, such as `PSImode'. + + The width of `Pmode' must be at least as large as the value of + `POINTER_SIZE'. If it is not equal, you must define the macro + `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to + `Pmode'. + +`FUNCTION_MODE' + An alias for the machine mode used for memory references to + functions being called, in `call' RTL expressions. On most + machines this should be `QImode'. + +`INTEGRATE_THRESHOLD (DECL)' + A C expression for the maximum number of instructions above which + the function DECL should not be inlined. DECL is a + `FUNCTION_DECL' node. + + The default definition of this macro is 64 plus 8 times the number + of arguments that the function accepts. Some people think a larger + threshold should be used on RISC machines. + +`SCCS_DIRECTIVE' + Define this if the preprocessor should ignore `#sccs' directives + and print no error message. + +`NO_IMPLICIT_EXTERN_C' + Define this macro if the system header files support C++ as well + as C. This macro inhibits the usual method of using system header + files in C++, which is to pretend that the file's contents are + enclosed in `extern "C" {...}'. + +`HANDLE_PRAGMA (STREAM, NODE)' + Define this macro if you want to implement any pragmas. If + defined, it is a C expression whose value is 1 if the pragma was + handled by the function. The argument STREAM is the stdio input + stream from which the source text can be read. NODE is the tree + node for the identifier after the `#pragma'. + + It is generally a bad idea to implement new uses of `#pragma'. The + only reason to define this macro is for compatibility with other + compilers that do support `#pragma' for the sake of any user + programs which already use it. + +`VALID_MACHINE_DECL_ATTRIBUTE (DECL, ATTRIBUTES, IDENTIFIER, ARGS)' + If defined, a C expression whose value is nonzero if IDENTIFIER + with arguments ARGS is a valid machine specific attribute for DECL. + The attributes in ATTRIBUTES have previously been assigned to DECL. + +`VALID_MACHINE_TYPE_ATTRIBUTE (TYPE, ATTRIBUTES, IDENTIFIER, ARGS)' + If defined, a C expression whose value is nonzero if IDENTIFIER + with arguments ARGS is a valid machine specific attribute for TYPE. + The attributes in ATTRIBUTES have previously been assigned to TYPE. + +`COMP_TYPE_ATTRIBUTES (TYPE1, TYPE2)' + If defined, a C expression whose value is zero if the attributes on + TYPE1 and TYPE2 are incompatible, one if they are compatible, and + two if they are nearly compatible (which causes a warning to be + generated). + +`SET_DEFAULT_TYPE_ATTRIBUTES (TYPE)' + If defined, a C statement that assigns default attributes to newly + defined TYPE. + +`DOLLARS_IN_IDENTIFIERS' + Define this macro to control use of the character `$' in identifier + names. 0 means `$' is not allowed by default; 1 means it is + allowed. 1 is the default; there is no need to define this macro + in that case. This macro controls the compiler proper; it does + not affect the preprocessor. + +`NO_DOLLAR_IN_LABEL' + Define this macro if the assembler does not accept the character + `$' in label names. By default constructors and destructors in + G++ have `$' in the identifiers. If this macro is defined, `.' is + used instead. + +`NO_DOT_IN_LABEL' + Define this macro if the assembler does not accept the character + `.' in label names. By default constructors and destructors in G++ + have names that use `.'. If this macro is defined, these names + are rewritten to avoid `.'. + +`DEFAULT_MAIN_RETURN' + Define this macro if the target system expects every program's + `main' function to return a standard "success" value by default + (if no other value is explicitly returned). + + The definition should be a C statement (sans semicolon) to + generate the appropriate rtl instructions. It is used only when + compiling the end of `main'. + +`HAVE_ATEXIT' + Define this if the target system supports the function `atexit' + from the ANSI C standard. If this is not defined, and + `INIT_SECTION_ASM_OP' is not defined, a default `exit' function + will be provided to support C++. + +`EXIT_BODY' + Define this if your `exit' function needs to do something besides + calling an external function `_cleanup' before terminating with + `_exit'. The `EXIT_BODY' macro is only needed if neither + `HAVE_ATEXIT' nor `INIT_SECTION_ASM_OP' are defined. + +`INSN_SETS_ARE_DELAYED (INSN)' + Define this macro as a C expression that is nonzero if it is safe + for the delay slot scheduler to place instructions in the delay + slot of INSN, even if they appear to use a resource set or + clobbered in INSN. INSN is always a `jump_insn' or an `insn'; GNU + CC knows that every `call_insn' has this behavior. On machines + where some `insn' or `jump_insn' is really a function call and + hence has this behavior, you should define this macro. + + You need not define this macro if it would always return zero. + +`INSN_REFERENCES_ARE_DELAYED (INSN)' + Define this macro as a C expression that is nonzero if it is safe + for the delay slot scheduler to place instructions in the delay + slot of INSN, even if they appear to set or clobber a resource + referenced in INSN. INSN is always a `jump_insn' or an `insn'. + On machines where some `insn' or `jump_insn' is really a function + call and its operands are registers whose use is actually in the + subroutine it calls, you should define this macro. Doing so + allows the delay slot scheduler to move instructions which copy + arguments into the argument registers into the delay slot of INSN. + + You need not define this macro if it would always return zero. + +`MACHINE_DEPENDENT_REORG (INSN)' + In rare cases, correct code generation requires extra machine + dependent processing between the second jump optimization pass and + delayed branch scheduling. On those machines, define this macro + as a C statement to act on the code starting at INSN. + +`MULTIPLE_SYMBOL_SPACES' + Define this macro if in some cases global symbols from one + translation unit may not be bound to undefined symbols in another + translation unit without user intervention. For instance, under + Microsoft Windows symbols must be explicitly imported from shared + libraries (DLLs). + +`GIV_SORT_CRITERION (GIV1, GIV2)' + In some cases, the strength reduction optimization pass can + produce better code if this is defined. This macro controls the + order that induction variables are combined. This macro is + particularly useful if the target has limited addressing modes. + For instance, the SH target has only positive offsets in + addresses. Thus sorting to put the smallest address first allows + the most combinations to be found. + + +File: gcc.info, Node: Config, Next: Fragments, Prev: Target Macros, Up: Top + +The Configuration File +********************** + + The configuration file `xm-MACHINE.h' contains macro definitions +that describe the machine and system on which the compiler is running, +unlike the definitions in `MACHINE.h', which describe the machine for +which the compiler is producing output. Most of the values in +`xm-MACHINE.h' are actually the same on all machines that GNU CC runs +on, so large parts of all configuration files are identical. But there +are some macros that vary: + +`USG' + Define this macro if the host system is System V. + +`VMS' + Define this macro if the host system is VMS. + +`FATAL_EXIT_CODE' + A C expression for the status code to be returned when the compiler + exits after serious errors. + +`SUCCESS_EXIT_CODE' + A C expression for the status code to be returned when the compiler + exits without serious errors. + +`HOST_WORDS_BIG_ENDIAN' + Defined if the host machine stores words of multi-word values in + big-endian order. (GNU CC does not depend on the host byte + ordering within a word.) + +`HOST_FLOAT_WORDS_BIG_ENDIAN' + Define this macro to be 1 if the host machine stores `DFmode', + `XFmode' or `TFmode' floating point numbers in memory with the + word containing the sign bit at the lowest address; otherwise, + define it to be zero. + + This macro need not be defined if the ordering is the same as for + multi-word integers. + +`HOST_FLOAT_FORMAT' + A numeric code distinguishing the floating point format for the + host machine. See `TARGET_FLOAT_FORMAT' in *Note Storage Layout:: + for the alternatives and default. + +`HOST_BITS_PER_CHAR' + A C expression for the number of bits in `char' on the host + machine. + +`HOST_BITS_PER_SHORT' + A C expression for the number of bits in `short' on the host + machine. + +`HOST_BITS_PER_INT' + A C expression for the number of bits in `int' on the host machine. + +`HOST_BITS_PER_LONG' + A C expression for the number of bits in `long' on the host + machine. + +`ONLY_INT_FIELDS' + Define this macro to indicate that the host compiler only supports + `int' bit fields, rather than other integral types, including + `enum', as do most C compilers. + +`OBSTACK_CHUNK_SIZE' + A C expression for the size of ordinary obstack chunks. If you + don't define this, a usually-reasonable default is used. + +`OBSTACK_CHUNK_ALLOC' + The function used to allocate obstack chunks. If you don't define + this, `xmalloc' is used. + +`OBSTACK_CHUNK_FREE' + The function used to free obstack chunks. If you don't define + this, `free' is used. + +`USE_C_ALLOCA' + Define this macro to indicate that the compiler is running with the + `alloca' implemented in C. This version of `alloca' can be found + in the file `alloca.c'; to use it, you must also alter the + `Makefile' variable `ALLOCA'. (This is done automatically for the + systems on which we know it is needed.) + + If you do define this macro, you should probably do it as follows: + + #ifndef __GNUC__ + #define USE_C_ALLOCA + #else + #define alloca __builtin_alloca + #endif + + so that when the compiler is compiled with GNU CC it uses the more + efficient built-in `alloca' function. + +`FUNCTION_CONVERSION_BUG' + Define this macro to indicate that the host compiler does not + properly handle converting a function value to a + pointer-to-function when it is used in an expression. + +`MULTIBYTE_CHARS' + Define this macro to enable support for multibyte characters in the + input to GNU CC. This requires that the host system support the + ANSI C library functions for converting multibyte characters to + wide characters. + +`POSIX' + Define this if your system is POSIX.1 compliant. + +`NO_SYS_SIGLIST' + Define this if your system *does not* provide the variable + `sys_siglist'. + + Some systems do provide this variable, but with a different name + such as `_sys_siglist'. On these systems, you can define + `sys_siglist' as a macro which expands into the name actually + provided. + + Autoconf normally defines `SYS_SIGLIST_DECLARED' when it finds a + declaration of `sys_siglist' in the system header files. However, + when you define `sys_siglist' to a different name autoconf will + not automatically define `SYS_SIGLIST_DECLARED'. Therefore, if + you define `sys_siglist', you should also define + `SYS_SIGLIST_DECLARED'. + +`USE_PROTOTYPES' + Define this to be 1 if you know that the host compiler supports + prototypes, even if it doesn't define __STDC__, or define it to be + 0 if you do not want any prototypes used in compiling GNU CC. If + `USE_PROTOTYPES' is not defined, it will be determined + automatically whether your compiler supports prototypes by + checking if `__STDC__' is defined. + +`NO_MD_PROTOTYPES' + Define this if you wish suppression of prototypes generated from + the machine description file, but to use other prototypes within + GNU CC. If `USE_PROTOTYPES' is defined to be 0, or the host + compiler does not support prototypes, this macro has no effect. + +`MD_CALL_PROTOTYPES' + Define this if you wish to generate prototypes for the `gen_call' + or `gen_call_value' functions generated from the machine + description file. If `USE_PROTOTYPES' is defined to be 0, or the + host compiler does not support prototypes, or `NO_MD_PROTOTYPES' + is defined, this macro has no effect. As soon as all of the + machine descriptions are modified to have the appropriate number + of arguments, this macro will be removed. + +`NO_STAB_H' + Define this if your system does not have the include file + `stab.h'. If `USG' is defined, `NO_STAB_H' is assumed. + +`PATH_SEPARATOR' + Define this macro to be a C character constant representing the + character used to separate components in paths. The default value + is the colon character + +`DIR_SEPARATOR' + If your system uses some character other than slash to separate + directory names within a file specification, define this macro to + be a C character constant specifying that character. When GNU CC + displays file names, the character you specify will be used. GNU + CC will test for both slash and the character you specify when + parsing filenames. + +`OBJECT_SUFFIX' + Define this macro to be a C string representing the suffix for + object files on your machine. If you do not define this macro, + GNU CC will use `.o' as the suffix for object files. + +`EXECUTABLE_SUFFIX' + Define this macro to be a C string representing the suffix for + executable files on your machine. If you do not define this + macro, GNU CC will use the null string as the suffix for object + files. + +`COLLECT_EXPORT_LIST' + If defined, `collect2' will scan the individual object files + specified on its command line and create an export list for the + linker. Define this macro for systems like AIX, where the linker + discards object files that are not referenced from `main' and uses + export lists. + + In addition, configuration files for system V define `bcopy', +`bzero' and `bcmp' as aliases. Some files define `alloca' as a macro +when compiled with GNU CC, in order to take advantage of the benefit of +GNU CC's built-in `alloca'. + + +File: gcc.info, Node: Fragments, Next: Funding, Prev: Config, Up: Top + +Makefile Fragments +****************** + + When you configure GNU CC using the `configure' script (*note +Installation::.), it will construct the file `Makefile' from the +template file `Makefile.in'. When it does this, it will incorporate +makefile fragment files from the `config' directory, named `t-TARGET' +and `x-HOST'. If these files do not exist, it means nothing needs to +be added for a given target or host. + +* Menu: + +* Target Fragment:: Writing the `t-TARGET' file. +* Host Fragment:: Writing the `x-HOST' file. + + +File: gcc.info, Node: Target Fragment, Next: Host Fragment, Up: Fragments + +The Target Makefile Fragment +============================ + + The target makefile fragment, `t-TARGET', defines special target +dependent variables and targets used in the `Makefile': + +`LIBGCC1' + The rule to use to build `libgcc1.a'. If your target does not + need to use the functions in `libgcc1.a', set this to empty. + *Note Interface::. + +`CROSS_LIBGCC1' + The rule to use to build `libgcc1.a' when building a cross + compiler. If your target does not need to use the functions in + `libgcc1.a', set this to empty. *Note Cross Runtime::. + +`LIBGCC2_CFLAGS' + Compiler flags to use when compiling `libgcc2.c'. + +`LIB2FUNCS_EXTRA' + A list of source file names to be compiled or assembled and + inserted into `libgcc.a'. + +`CRTSTUFF_T_CFLAGS' + Special flags used when compiling `crtstuff.c'. *Note + Initialization::. + +`CRTSTUFF_T_CFLAGS_S' + Special flags used when compiling `crtstuff.c' for shared linking. + Used if you use `crtbeginS.o' and `crtendS.o' in `EXTRA-PARTS'. + *Note Initialization::. + +`MULTILIB_OPTIONS' + For some targets, invoking GNU CC in different ways produces + objects that can not be linked together. For example, for some + targets GNU CC produces both big and little endian code. For + these targets, you must arrange for multiple versions of + `libgcc.a' to be compiled, one for each set of incompatible + options. When GNU CC invokes the linker, it arranges to link in + the right version of `libgcc.a', based on the command line options + used. + + The `MULTILIB_OPTIONS' macro lists the set of options for which + special versions of `libgcc.a' must be built. Write options that + are mutually incompatible side by side, separated by a slash. + Write options that may be used together separated by a space. The + build procedure will build all combinations of compatible options. + + For example, if you set `MULTILIB_OPTIONS' to `m68000/m68020 + msoft-float', `Makefile' will build special versions of `libgcc.a' + using the sets of options `-m68000', `-m68020', `-msoft-float', + `-m68000 -msoft-float', and `-m68020 -msoft-float'. + +`MULTILIB_DIRNAMES' + If `MULTILIB_OPTIONS' is used, this variable specifies the + directory names that should be used to hold the various libraries. + Write one element in `MULTILIB_DIRNAMES' for each element in + `MULTILIB_OPTIONS'. If `MULTILIB_DIRNAMES' is not used, the + default value will be `MULTILIB_OPTIONS', with all slashes treated + as spaces. + + For example, if `MULTILIB_OPTIONS' is specified as `m68000/m68020 + msoft-float', then the default value of `MULTILIB_DIRNAMES' is + `m68000 m68020 msoft-float'. You may specify a different value if + you desire a different set of directory names. + +`MULTILIB_MATCHES' + Sometimes the same option may be written in two different ways. + If an option is listed in `MULTILIB_OPTIONS', GNU CC needs to know + about any synonyms. In that case, set `MULTILIB_MATCHES' to a + list of items of the form `option=option' to describe all relevant + synonyms. For example, `m68000=mc68000 m68020=mc68020'. + +`MULTILIB_EXCEPTIONS' + Sometimes when there are multiple sets of `MULTILIB_OPTIONS' being + specified, there are combinations that should not be built. In + that case, set `MULTILIB_EXCEPTIONS' to be all of the switch + exceptions in shell case syntax that should not be built. + + For example, in the PowerPC embedded ABI support, it was not + desirable to build libraries that compiled with the + `-mcall-aixdesc' option and either of the `-mcall-aixdesc' or + `-mlittle' options at the same time, and therefore + `MULTILIB_EXCEPTIONS' is set to `*mrelocatable/*mcall-aixdesc* + *mlittle/*mcall-aixdesc*'. + +`MULTILIB_EXTRA_OPTS' + Sometimes it is desirable that when building multiple versions of + `libgcc.a' certain options should always be passed on to the + compiler. In that case, set `MULTILIB_EXTRA_OPTS' to be the list + of options to be used for all builds. + + +File: gcc.info, Node: Host Fragment, Prev: Target Fragment, Up: Fragments + +The Host Makefile Fragment +========================== + + The host makefile fragment, `x-HOST', defines special host dependent +variables and targets used in the `Makefile': + +`CC' + The compiler to use when building the first stage. + +`CLIB' + Additional host libraries to link with. + +`OLDCC' + The compiler to use when building `libgcc1.a' for a native + compilation. + +`OLDAR' + The version of `ar' to use when building `libgcc1.a' for a native + compilation. + +`INSTALL' + The install program to use. + + +File: gcc.info, Node: Funding, Next: Look and Feel, Prev: Fragments, Up: Top + +Funding Free Software +********************* + + If you want to have more free software a few years from now, it makes +sense for you to help encourage people to contribute funds for its +development. The most effective approach known is to encourage +commercial redistributors to donate. + + Users of free software systems can boost the pace of development by +encouraging for-a-fee distributors to donate part of their selling price +to free software developers--the Free Software Foundation, and others. + + The way to convince distributors to do this is to demand it and +expect it from them. So when you compare distributors, judge them +partly by how much they give to free software development. Show +distributors they must compete to be the one who gives the most. + + To make this approach work, you must insist on numbers that you can +compare, such as, "We will donate ten dollars to the Frobnitz project +for each disk sold." Don't be satisfied with a vague promise, such as +"A portion of the profits are donated," since it doesn't give a basis +for comparison. + + Even a precise fraction "of the profits from this disk" is not very +meaningful, since creative accounting and unrelated business decisions +can greatly alter what fraction of the sales price counts as profit. +If the price you pay is $50, ten percent of the profit is probably less +than a dollar; it might be a few cents, or nothing at all. + + Some redistributors do development work themselves. This is useful +too; but to keep everyone honest, you need to inquire how much they do, +and what kind. Some kinds of development make much more long-term +difference than others. For example, maintaining a separate version of +a program contributes very little; maintaining the standard version of a +program for the whole community contributes much. Easy new ports +contribute little, since someone else would surely do them; difficult +ports such as adding a new CPU to the GNU C compiler contribute more; +major new features or packages contribute the most. + + By establishing the idea that supporting further development is "the +proper thing to do" when distributing free software for a fee, we can +assure a steady flow of resources into making more free software. + + Copyright (C) 1994 Free Software Foundation, Inc. + Verbatim copying and redistribution of this section is permitted + without royalty; alteration is not permitted. + + +File: gcc.info, Node: Look and Feel, Next: Copying, Prev: Funding, Up: Top + +Protect Your Freedom--Fight "Look And Feel" +******************************************* + + This section is a political message from the League for Programming + Freedom to the users of GNU CC. We have included it here because + the issue of interface copyright is important to the GNU project. + + Apple, Lotus, and now CDC have tried to create a new form of legal +monopoly: a copyright on a user interface. + + An interface is a kind of language--a set of conventions for +communication between two entities, human or machine. Until a few years +ago, the law seemed clear: interfaces were outside the domain of +copyright, so programmers could program freely and implement whatever +interface the users demanded. Imitating de-facto standard interfaces, +sometimes with improvements, was standard practice in the computer +field. These improvements, if accepted by the users, caught on and +became the norm; in this way, much progress took place. + + Computer users, and most software developers, were happy with this +state of affairs. However, large companies such as Apple and Lotus +would prefer a different system--one in which they can own interfaces +and thereby rid themselves of all serious competitors. They hope that +interface copyright will give them, in effect, monopolies on major +classes of software. + + Other large companies such as IBM and Digital also favor interface +monopolies, for the same reason: if languages become property, they +expect to own many de-facto standard languages. But Apple and Lotus are +the ones who have actually sued. Apple's lawsuit was defeated, for +reasons only partly related to the general issue of interface copyright. + + Lotus won lawsuits against two small companies, which were thus put +out of business. Then Lotus sued Borland; Lotus won in the trial court +(no surprise, since it was the same court that had ruled for Lotus twice +before), but the court of appeals ruled in favor of Borland, which was +assisted by a friend-of-the-court brief from the League for Programming +Freedom. + + Lotus appealed the case to the Supreme Court, which heard the case +but was unable to reach a decision. This failure means that the appeals +court decision stands, in one portion of the United States, and may +influence the other appeals courts, but it does not set a nationwide +precedent. The battle is not over, and it is not limited to the United +States. + + The battle is extending into other areas of software as well. In +1995 a company that produced a simulator for a CDC computer was shut +down by a copyright lawsuit, in which CDC charged that the simulator +infringed the copyright on the manuals for the computer. + + If the monopolists get their way, they will hobble the software +field: + + * Gratuitous incompatibilities will burden users. Imagine if each + car manufacturer had to design a different way to start, stop, and + steer a car. + + * Users will be "locked in" to whichever interface they learn; then + they will be prisoners of one supplier, who will charge a + monopolistic price. + + * Large companies have an unfair advantage wherever lawsuits become + commonplace. Since they can afford to sue, they can intimidate + smaller developers with threats even when they don't really have a + case. + + * Interface improvements will come slower, since incremental + evolution through creative partial imitation will no longer occur. + + If interface monopolies are accepted, other large companies are +waiting to grab theirs: + + * Adobe is expected to claim a monopoly on the interfaces of various + popular application programs, if Lotus ultimately wins the case + against Borland. + + * Open Computing magazine reported a Microsoft vice president as + threatening to sue people who imitate the interface of Windows. + + Users invest a great deal of time and money in learning to use +computer interfaces. Far more, in fact, than software developers +invest in developing *and even implementing* the interfaces. Whoever +can own an interface, has made its users into captives, and +misappropriated their investment. + + To protect our freedom from monopolies like these, a group of +programmers and users have formed a grass-roots political organization, +the League for Programming Freedom. + + The purpose of the League is to oppose monopolistic practices such as +interface copyright and software patents. The League calls for a return +to the legal policies of the recent past, in which programmers could +program freely. The League is not concerned with free software as an +issue, and is not affiliated with the Free Software Foundation. + + The League's activities include publicizing the issues, as is being +done here, and filing friend-of-the-court briefs on behalf of +defendants sued by monopolists. + + The League's membership rolls include Donald Knuth, the foremost +authority on algorithms, John McCarthy, inventor of Lisp, Marvin Minsky, +founder of the MIT Artificial Intelligence lab, Guy L. Steele, Jr., +author of well-known books on Lisp and C, as well as Richard Stallman, +the developer of GNU CC. Please join and add your name to the list. +Membership dues in the League are $42 per year for programmers, managers +and professionals; $10.50 for students; $21 for others. + + Activist members are especially important, but members who have no +time to give are also important. Surveys at major ACM conferences have +indicated a vast majority of attendees agree with the League on both +issues (interface copyrights and software patents). If just ten percent +of the programmers who agree with the League join the League, we will +probably triumph. + + To join, or for more information, send electronic mail to the +address `lpf@uunet.uu.net' or write to: + + League for Programming Freedom + 1 Kendall Square #143 + P.O. Box 9171 + Cambridge, MA 02139 + + In addition to joining the League, here are some suggestions from the +League for other things you can do to protect your freedom to write +programs: + + * Tell your friends and colleagues about this issue and how it + threatens to ruin the computer industry. + + * Mention that you are a League member in your `.signature', and + mention the League's email address for inquiries. + + * Ask the companies you consider working for or working with to make + statements against software monopolies, and give preference to + those that do. + + * When employers ask you to sign contracts giving them copyright on + your work, insist on a clause saying they will not claim the + copyright covers imitating the interface. + + * When employers ask you to sign contracts giving them patent rights, + insist on clauses saying they can use these rights only + defensively. Don't rely on "company policy," since that can + change at any time; don't rely on an individual executive's + private word, since that person may be replaced. Get a commitment + just as binding as the commitment they get from you. + + * Write to Congress to explain the importance of these issues. + + House Subcommittee on Intellectual Property + 2137 Rayburn Bldg + Washington, DC 20515 + + Senate Subcommittee on Patents, Trademarks and Copyrights + United States Senate + Washington, DC 20510 + + (These committees have received lots of mail already; let's give + them even more.) + + Democracy means nothing if you don't use it. Stand up and be +counted! + diff --git a/gnu/usr.bin/gcc/gcc.info-27 b/gnu/usr.bin/gcc/gcc.info-27 new file mode 100644 index 00000000000..8972d3833f9 --- /dev/null +++ b/gnu/usr.bin/gcc/gcc.info-27 @@ -0,0 +1,534 @@ +This is Info file gcc.info, produced by Makeinfo version 1.68 from the +input file gcc.texi. + + This file documents the use and the internals of the GNU compiler. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 +Boston, MA 02111-1307 USA + + Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998 +Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + + Permission is granted to copy and distribute modified versions of +this manual under the conditions for verbatim copying, provided also +that the sections entitled "GNU General Public License," "Funding for +Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are +included exactly as in the original, and provided that the entire +resulting derived work is distributed under the terms of a permission +notice identical to this one. + + Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that the sections entitled "GNU General Public +License," "Funding for Free Software," and "Protect Your Freedom--Fight +`Look And Feel'", and this permission notice, may be included in +translations approved by the Free Software Foundation instead of in the +original English. + + +File: gcc.info, Node: Copying, Next: Contributors, Prev: Look and Feel, Up: Top + +GNU GENERAL PUBLIC LICENSE +************************** + + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +Preamble +======== + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it in +new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, +and (2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains a + notice placed by the copyright holder saying it may be distributed + under the terms of this General Public License. The "Program", + below, refers to any such program or work, and a "work based on + the Program" means either the Program or any derivative work under + copyright law: that is to say, a work containing the Program or a + portion of it, either verbatim or with modifications and/or + translated into another language. (Hereinafter, translation is + included without limitation in the term "modification".) Each + licensee is addressed as "you". + + Activities other than copying, distribution and modification are + not covered by this License; they are outside its scope. The act + of running the Program is not restricted, and the output from the + Program is covered only if its contents constitute a work based on + the Program (independent of having been made by running the + Program). Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's + source code as you receive it, in any medium, provided that you + conspicuously and appropriately publish on each copy an appropriate + copyright notice and disclaimer of warranty; keep intact all the + notices that refer to this License and to the absence of any + warranty; and give any other recipients of the Program a copy of + this License along with the Program. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange + for a fee. + + 2. You may modify your copy or copies of the Program or any portion + of it, thus forming a work based on the Program, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a. You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b. You must cause any work that you distribute or publish, that + in whole or in part contains or is derived from the Program + or any part thereof, to be licensed as a whole at no charge + to all third parties under the terms of this License. + + c. If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display + an announcement including an appropriate copyright notice and + a notice that there is no warranty (or else, saying that you + provide a warranty) and that users may redistribute the + program under these conditions, and telling the user how to + view a copy of this License. (Exception: if the Program + itself is interactive but does not normally print such an + announcement, your work based on the Program is not required + to print an announcement.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the + Program, and can be reasonably considered independent and separate + works in themselves, then this License, and its terms, do not + apply to those sections when you distribute them as separate + works. But when you distribute the same sections as part of a + whole which is a work based on the Program, the distribution of + the whole must be on the terms of this License, whose permissions + for other licensees extend to the entire whole, and thus to each + and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or + contest your rights to work written entirely by you; rather, the + intent is to exercise the right to control the distribution of + derivative or collective works based on the Program. + + In addition, mere aggregation of another work not based on the + Program with the Program (or with a work based on the Program) on + a volume of a storage or distribution medium does not bring the + other work under the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, + under Section 2) in object code or executable form under the terms + of Sections 1 and 2 above provided that you also do one of the + following: + + a. Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Sections 1 and 2 above on a medium customarily used for + software interchange; or, + + b. Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a + medium customarily used for software interchange; or, + + c. Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with + such an offer, in accord with Subsection b above.) + + The source code for a work means the preferred form of the work for + making modifications to it. For an executable work, complete + source code means all the source code for all modules it contains, + plus any associated interface definition files, plus the scripts + used to control compilation and installation of the executable. + However, as a special exception, the source code distributed need + not include anything that is normally distributed (in either + source or binary form) with the major components (compiler, + kernel, and so on) of the operating system on which the executable + runs, unless that component itself accompanies the executable. + + If distribution of executable or object code is made by offering + access to copy from a designated place, then offering equivalent + access to copy the source code from the same place counts as + distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense or distribute the Program is + void, and will automatically terminate your rights under this + License. However, parties who have received copies, or rights, + from you under this License will not have their licenses + terminated so long as such parties remain in full compliance. + + 5. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify + or distribute the Program or its derivative works. These actions + are prohibited by law if you do not accept this License. + Therefore, by modifying or distributing the Program (or any work + based on the Program), you indicate your acceptance of this + License to do so, and all its terms and conditions for copying, + distributing or modifying the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the + Program), the recipient automatically receives a license from the + original licensor to copy, distribute or modify the Program + subject to these terms and conditions. You may not impose any + further restrictions on the recipients' exercise of the rights + granted herein. You are not responsible for enforcing compliance + by third parties to this License. + + 7. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent + issues), conditions are imposed on you (whether by court order, + agreement or otherwise) that contradict the conditions of this + License, they do not excuse you from the conditions of this + License. If you cannot distribute so as to satisfy simultaneously + your obligations under this License and any other pertinent + obligations, then as a consequence you may not distribute the + Program at all. For example, if a patent license would not permit + royalty-free redistribution of the Program by all those who + receive copies directly or indirectly through you, then the only + way you could satisfy both it and this License would be to refrain + entirely from distribution of the Program. + + If any portion of this section is held invalid or unenforceable + under any particular circumstance, the balance of the section is + intended to apply and the section as a whole is intended to apply + in other circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of + any such claims; this section has the sole purpose of protecting + the integrity of the free software distribution system, which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is + willing to distribute software through any other system and a + licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed + to be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, + the original copyright holder who places the Program under this + License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only + in or among countries not thus excluded. In such case, this + License incorporates the limitation as if written in the body of + this License. + + 9. The Free Software Foundation may publish revised and/or new + versions of the General Public License from time to time. Such + new versions will be similar in spirit to the present version, but + may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the + Program specifies a version number of this License which applies + to it and "any later version", you have the option of following + the terms and conditions either of that version or of any later + version published by the Free Software Foundation. If the Program + does not specify a version number of this License, you may choose + any version ever published by the Free Software Foundation. + + 10. If you wish to incorporate parts of the Program into other free + programs whose distribution conditions are different, write to the + author to ask for permission. For software which is copyrighted + by the Free Software Foundation, write to the Free Software + Foundation; we sometimes make exceptions for this. Our decision + will be guided by the two goals of preserving the free status of + all derivatives of our free software and of promoting the sharing + and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE + LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT + HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT + WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT + NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE + QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE + PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY + SERVICING, REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY + MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE + LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, + INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU + OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY + OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs +============================================= + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. + Copyright (C) 19YY NAME OF AUTHOR + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Also add information on how to contact you by electronic and paper +mail. + + If the program is interactive, make it output a short notice like +this when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details + type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + + The hypothetical commands `show w' and `show c' should show the +appropriate parts of the General Public License. Of course, the +commands you use may be called something other than `show w' and `show +c'; they could even be mouse-clicks or menu items--whatever suits your +program. + + You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the program, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + SIGNATURE OF TY COON, 1 April 1989 + Ty Coon, President of Vice + + This General Public License does not permit incorporating your +program into proprietary programs. If your program is a subroutine +library, you may consider it more useful to permit linking proprietary +applications with the library. If this is what you want to do, use the +GNU Library General Public License instead of this License. + + +File: gcc.info, Node: Contributors, Next: Index, Prev: Copying, Up: Top + +Contributors to GNU CC +********************** + + In addition to Richard Stallman, several people have written parts +of GNU CC. + + * The idea of using RTL and some of the optimization ideas came from + the program PO written at the University of Arizona by Jack + Davidson and Christopher Fraser. See "Register Allocation and + Exhaustive Peephole Optimization", Software Practice and + Experience 14 (9), Sept. 1984, 857-866. + + * Paul Rubin wrote most of the preprocessor. + + * Leonard Tower wrote parts of the parser, RTL generator, and RTL + definitions, and of the Vax machine description. + + * Ted Lemon wrote parts of the RTL reader and printer. + + * Jim Wilson implemented loop strength reduction and some other loop + optimizations. + + * Nobuyuki Hikichi of Software Research Associates, Tokyo, + contributed the support for the Sony NEWS machine. + + * Charles LaBrec contributed the support for the Integrated Solutions + 68020 system. + + * Michael Tiemann of Cygnus Support wrote the front end for C++, as + well as the support for inline functions and instruction + scheduling. Also the descriptions of the National Semiconductor + 32000 series cpu, the SPARC cpu and part of the Motorola 88000 cpu. + + * Gerald Baumgartner added the signature extension to the C++ + front-end. + + * Jan Stein of the Chalmers Computer Society provided support for + Genix, as well as part of the 32000 machine description. + + * Randy Smith finished the Sun FPA support. + + * Robert Brown implemented the support for Encore 32000 systems. + + * David Kashtan of SRI adapted GNU CC to VMS. + + * Alex Crain provided changes for the 3b1. + + * Greg Satz and Chris Hanson assisted in making GNU CC work on HP-UX + for the 9000 series 300. + + * William Schelter did most of the work on the Intel 80386 support. + + * Christopher Smith did the port for Convex machines. + + * Paul Petersen wrote the machine description for the Alliant FX/8. + + * Dario Dariol contributed the four varieties of sample programs + that print a copy of their source. + + * Alain Lichnewsky ported GNU CC to the Mips cpu. + + * Devon Bowen, Dale Wiles and Kevin Zachmann ported GNU CC to the + Tahoe. + + * Jonathan Stone wrote the machine description for the Pyramid + computer. + + * Gary Miller ported GNU CC to Charles River Data Systems machines. + + * Richard Kenner of the New York University Ultracomputer Research + Laboratory wrote the machine descriptions for the AMD 29000, the + DEC Alpha, the IBM RT PC, and the IBM RS/6000 as well as the + support for instruction attributes. He also made changes to + better support RISC processors including changes to common + subexpression elimination, strength reduction, function calling + sequence handling, and condition code support, in addition to + generalizing the code for frame pointer elimination. + + * Richard Kenner and Michael Tiemann jointly developed reorg.c, the + delay slot scheduler. + + * Mike Meissner and Tom Wood of Data General finished the port to the + Motorola 88000. + + * Masanobu Yuhara of Fujitsu Laboratories implemented the machine + description for the Tron architecture (specifically, the Gmicro). + + * NeXT, Inc. donated the front end that supports the Objective C + language. + + * James van Artsdalen wrote the code that makes efficient use of the + Intel 80387 register stack. + + * Mike Meissner at the Open Software Foundation finished the port to + the MIPS cpu, including adding ECOFF debug support, and worked on + the Intel port for the Intel 80386 cpu. Later at Cygnus Support, + he worked on the rs6000 and PowerPC ports. + + * Ron Guilmette implemented the `protoize' and `unprotoize' tools, + the support for Dwarf symbolic debugging information, and much of + the support for System V Release 4. He has also worked heavily on + the Intel 386 and 860 support. + + * Torbjorn Granlund implemented multiply- and divide-by-constant + optimization, improved long long support, and improved leaf + function register allocation. + + * Mike Stump implemented the support for Elxsi 64 bit CPU. + + * John Wehle added the machine description for the Western Electric + 32000 processor used in several 3b series machines (no relation to + the National Semiconductor 32000 processor). + + * Holger Teutsch provided the support for the Clipper cpu. + + * Kresten Krab Thorup wrote the run time support for the Objective C + language. + + * Stephen Moshier contributed the floating point emulator that + assists in cross-compilation and permits support for floating + point numbers wider than 64 bits. + + * David Edelsohn contributed the changes to RS/6000 port to make it + support the PowerPC and POWER2 architectures. + + * Steve Chamberlain wrote the support for the Hitachi SH processor. + + * Peter Schauer wrote the code to allow debugging to work on the + Alpha. + + * Oliver M. Kellogg of Deutsche Aerospace contributed the port to the + MIL-STD-1750A. + + * Michael K. Gschwind contributed the port to the PDP-11. + + * David Reese of Sun Microsystems contributed to the Solaris on + PowerPC port. + diff --git a/gnu/usr.bin/gcc/gcc.info-28 b/gnu/usr.bin/gcc/gcc.info-28 new file mode 100644 index 00000000000..e21dacfb3c5 --- /dev/null +++ b/gnu/usr.bin/gcc/gcc.info-28 @@ -0,0 +1,2030 @@ +This is Info file gcc.info, produced by Makeinfo version 1.68 from the +input file gcc.texi. + + This file documents the use and the internals of the GNU compiler. + + Published by the Free Software Foundation 59 Temple Place - Suite 330 +Boston, MA 02111-1307 USA + + Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998 +Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + + Permission is granted to copy and distribute modified versions of +this manual under the conditions for verbatim copying, provided also +that the sections entitled "GNU General Public License," "Funding for +Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are +included exactly as in the original, and provided that the entire +resulting derived work is distributed under the terms of a permission +notice identical to this one. + + Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that the sections entitled "GNU General Public +License," "Funding for Free Software," and "Protect Your Freedom--Fight +`Look And Feel'", and this permission notice, may be included in +translations approved by the Free Software Foundation instead of in the +original English. + + +File: gcc.info, Node: Index, Prev: Contributors, Up: Top + +Index +***** + +* Menu: + +* ! in constraint: Multi-Alternative. +* # in constraint: Modifiers. +* # in template: Output Template. +* #pragma: Misc. +* #pragma implementation, implied: C++ Interface. +* #pragma, reason for not using: Function Attributes. +* $: Dollar Signs. +* % in constraint: Modifiers. +* % in template: Output Template. +* & in constraint: Modifiers. +* ': Incompatibilities. +* (nil): RTL Objects. +* * in constraint: Modifiers. +* * in template: Output Statement. +* + in constraint: Modifiers. +* -lgcc, use with -nodefaultlibs: Link Options. +* -lgcc, use with -nostdlib: Link Options. +* -nodefaultlibs and unresolved references: Link Options. +* -nostdlib and unresolved references: Link Options. +* .sdata/.sdata2 references (PowerPC): RS/6000 and PowerPC Options. +* //: C++ Comments. +* /i in RTL dump: Flags. +* /s in RTL dump: Flags. +* /u in RTL dump: Flags. +* /v in RTL dump: Flags. +* 0 in constraint: Simple Constraints. +* < in constraint: Simple Constraints. +* <?: Min and Max. +* = in constraint: Modifiers. +* > in constraint: Simple Constraints. +* >?: Min and Max. +* ? in constraint: Multi-Alternative. +* ?: extensions <1>: Conditionals. +* ?: extensions: Lvalues. +* ?: side effect: Conditionals. +* \: Output Template. +* _ in variables in macros: Naming Types. +* __bb: Profiling. +* __bb_init_func: Profiling. +* __bb_init_trace_func: Profiling. +* __bb_trace_func: Profiling. +* __bb_trace_ret: Profiling. +* __builtin_apply: Constructing Calls. +* __builtin_apply_args: Constructing Calls. +* __builtin_args_info: Varargs. +* __builtin_classify_type: Varargs. +* __builtin_next_arg: Varargs. +* __builtin_return: Constructing Calls. +* __builtin_saveregs: Varargs. +* __CTOR_LIST__: Initialization. +* __DTOR_LIST__: Initialization. +* __main: Collect2. +* abort <1>: Portability. +* abort: C Dialect Options. +* abs <1>: Arithmetic. +* abs: C Dialect Options. +* abs and attributes: Expressions. +* absM2 instruction pattern: Standard Names. +* absolute value: Arithmetic. +* access to operands: Accessors. +* accessors: Accessors. +* ACCUMULATE_OUTGOING_ARGS: Stack Arguments. +* ACCUMULATE_OUTGOING_ARGS and stack frames: Function Entry. +* ADDITIONAL_REGISTER_NAMES: Instruction Output. +* addM3 instruction pattern: Standard Names. +* addr_diff_vec: Side Effects. +* addr_diff_vec, length of: Insn Lengths. +* addr_vec: Side Effects. +* addr_vec, length of: Insn Lengths. +* address: RTL Template. +* address constraints: Simple Constraints. +* address of a label: Labels as Values. +* ADDRESS_COST: Costs. +* address_operand: Simple Constraints. +* addressing modes: Addressing Modes. +* addressof: Regs and Memory. +* ADJUST_COST: Costs. +* ADJUST_FIELD_ALIGN: Storage Layout. +* ADJUST_INSN_LENGTH: Insn Lengths. +* ADJUST_PRIORITY: Costs. +* aggregates as return values: Aggregate Return. +* alias attribute: Function Attributes. +* aligned attribute <1>: Type Attributes. +* aligned attribute: Variable Attributes. +* alignment: Alignment. +* ALL_REGS: Register Classes. +* Alliant: Interoperation. +* alloca: C Dialect Options. +* alloca and SunOS: Installation. +* alloca vs variable-length arrays: Variable Length. +* alloca, for SunOS: Sun Install. +* alloca, for Unos: Configurations. +* allocate_stack instruction pattern: Standard Names. +* ALLOCATE_TRAMPOLINE: Trampolines. +* alternate keywords: Alternate Keywords. +* AMD29K options: AMD29K Options. +* analysis, data flow: Passes. +* and: Arithmetic. +* and and attributes: Expressions. +* and, canonicalization of: Insn Canonicalizations. +* andM3 instruction pattern: Standard Names. +* ANSI support: C Dialect Options. +* apostrophes: Incompatibilities. +* APPLY_RESULT_SIZE: Scalar Return. +* ARG_POINTER_REGNUM: Frame Registers. +* ARG_POINTER_REGNUM and virtual registers: Regs and Memory. +* arg_pointer_rtx: Frame Registers. +* ARGS_GROW_DOWNWARD: Frame Layout. +* argument passing: Interface. +* arguments in frame (88k): M88K Options. +* arguments in registers: Register Arguments. +* arguments on stack: Stack Arguments. +* arithmetic libraries: Interface. +* arithmetic shift: Arithmetic. +* arithmetic simplifications: Passes. +* arithmetic, in RTL: Arithmetic. +* ARM options: ARM Options. +* arrays of length zero: Zero Length. +* arrays of variable length: Variable Length. +* arrays, non-lvalue: Subscripting. +* ashift: Arithmetic. +* ashift and attributes: Expressions. +* ashiftrt: Arithmetic. +* ashiftrt and attributes: Expressions. +* ashlM3 instruction pattern: Standard Names. +* ashrM3 instruction pattern: Standard Names. +* asm expressions: Extended Asm. +* ASM_APP_OFF: File Framework. +* ASM_APP_ON: File Framework. +* ASM_BYTE_OP: Data Output. +* ASM_CLOSE_PAREN: Data Output. +* ASM_COMMENT_START: File Framework. +* ASM_DECLARE_FUNCTION_NAME: Label Output. +* ASM_DECLARE_FUNCTION_SIZE: Label Output. +* ASM_DECLARE_OBJECT_NAME: Label Output. +* ASM_FILE_END: File Framework. +* ASM_FILE_START: File Framework. +* ASM_FINAL_SPEC: Driver. +* ASM_FINISH_DECLARE_OBJECT: Label Output. +* ASM_FORMAT_PRIVATE_NAME: Label Output. +* asm_fprintf: Instruction Output. +* ASM_GENERATE_INTERNAL_LABEL: Label Output. +* ASM_GLOBALIZE_LABEL: Label Output. +* ASM_IDENTIFY_GCC: File Framework. +* asm_input: Side Effects. +* ASM_NO_SKIP_IN_TEXT: Alignment Output. +* asm_noperands: Insns. +* ASM_OPEN_PAREN: Data Output. +* asm_operands, RTL sharing: Sharing. +* asm_operands, usage: Assembler. +* ASM_OUTPUT_ADDR_DIFF_ELT: Dispatch Tables. +* ASM_OUTPUT_ADDR_VEC_ELT: Dispatch Tables. +* ASM_OUTPUT_ALIGN: Alignment Output. +* ASM_OUTPUT_ALIGN_CODE: Alignment Output. +* ASM_OUTPUT_ALIGNED_BSS: Uninitialized Data. +* ASM_OUTPUT_ALIGNED_COMMON: Uninitialized Data. +* ASM_OUTPUT_ALIGNED_DECL_COMMON: Uninitialized Data. +* ASM_OUTPUT_ALIGNED_DECL_LOCAL: Uninitialized Data. +* ASM_OUTPUT_ALIGNED_LOCAL: Uninitialized Data. +* ASM_OUTPUT_ASCII: Data Output. +* ASM_OUTPUT_BSS: Uninitialized Data. +* ASM_OUTPUT_BYTE: Data Output. +* ASM_OUTPUT_CASE_END: Dispatch Tables. +* ASM_OUTPUT_CASE_LABEL: Dispatch Tables. +* ASM_OUTPUT_CHAR: Data Output. +* ASM_OUTPUT_COMMON: Uninitialized Data. +* ASM_OUTPUT_CONSTRUCTOR: Macros for Initialization. +* ASM_OUTPUT_DEF: Label Output. +* ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL: Label Output. +* ASM_OUTPUT_DESTRUCTOR: Macros for Initialization. +* ASM_OUTPUT_DOUBLE: Data Output. +* ASM_OUTPUT_DOUBLE_INT: Data Output. +* ASM_OUTPUT_EH_REGION_BEG: Exception Region Output. +* ASM_OUTPUT_EH_REGION_END: Exception Region Output. +* ASM_OUTPUT_EXTERNAL: Label Output. +* ASM_OUTPUT_EXTERNAL_LIBCALL: Label Output. +* ASM_OUTPUT_FLOAT: Data Output. +* ASM_OUTPUT_IDENT: File Framework. +* ASM_OUTPUT_INT: Data Output. +* ASM_OUTPUT_INTERNAL_LABEL: Label Output. +* ASM_OUTPUT_LABEL: Label Output. +* ASM_OUTPUT_LABELREF: Label Output. +* ASM_OUTPUT_LOCAL: Uninitialized Data. +* ASM_OUTPUT_LONG_DOUBLE: Data Output. +* ASM_OUTPUT_LOOP_ALIGN: Alignment Output. +* ASM_OUTPUT_MI_THUNK: Function Entry. +* ASM_OUTPUT_OPCODE: Instruction Output. +* ASM_OUTPUT_POOL_EPILOGUE: Data Output. +* ASM_OUTPUT_POOL_PROLOGUE: Data Output. +* ASM_OUTPUT_QUADRUPLE_INT: Data Output. +* ASM_OUTPUT_REG_POP: Instruction Output. +* ASM_OUTPUT_REG_PUSH: Instruction Output. +* ASM_OUTPUT_SECTION_NAME: File Framework. +* ASM_OUTPUT_SHARED_BSS: Uninitialized Data. +* ASM_OUTPUT_SHARED_COMMON: Uninitialized Data. +* ASM_OUTPUT_SHARED_LOCAL: Uninitialized Data. +* ASM_OUTPUT_SHORT: Data Output. +* ASM_OUTPUT_SKIP: Alignment Output. +* ASM_OUTPUT_SOURCE_FILENAME: File Framework. +* ASM_OUTPUT_SOURCE_LINE: File Framework. +* ASM_OUTPUT_SPECIAL_POOL_ENTRY: Data Output. +* ASM_OUTPUT_WEAK_ALIAS: Label Output. +* ASM_SPEC: Driver. +* ASM_STABD_OP: DBX Options. +* ASM_STABN_OP: DBX Options. +* ASM_STABS_OP: DBX Options. +* ASM_WEAKEN_LABEL: Label Output. +* assemble_name: Label Output. +* assembler format: File Framework. +* assembler instructions: Extended Asm. +* assembler instructions in RTL: Assembler. +* assembler names for identifiers: Asm Labels. +* assembler syntax, 88k: M88K Options. +* ASSEMBLER_DIALECT: Instruction Output. +* assembly code, invalid: Bug Criteria. +* assigning attribute values to insns: Tagging Insns. +* asterisk in template: Output Statement. +* atof: Cross-compilation. +* attr: Tagging Insns. +* attr_flag: Expressions. +* attribute expressions: Expressions. +* attribute of types: Type Attributes. +* attribute of variables: Variable Attributes. +* attribute specifications: Attr Example. +* attribute specifications example: Attr Example. +* attributes, defining: Defining Attributes. +* autoincrement addressing, availability: Portability. +* autoincrement/decrement addressing: Simple Constraints. +* autoincrement/decrement analysis: Passes. +* automatic inline for C++ member fns: Inline. +* backslash: Output Template. +* backtrace for bug reports: Bug Reporting. +* barrier: Insns. +* BASE_REG_CLASS: Register Classes. +* basic blocks: Passes. +* bcmp: Config. +* bCOND instruction pattern: Standard Names. +* bcopy, implicit usage: Library Calls. +* BIGGEST_ALIGNMENT: Storage Layout. +* BIGGEST_FIELD_ALIGNMENT: Storage Layout. +* Bison parser generator: Installation. +* bit fields: Bit Fields. +* bit shift overflow (88k): M88K Options. +* BITFIELD_NBYTES_LIMITED: Storage Layout. +* BITS_BIG_ENDIAN: Storage Layout. +* BITS_BIG_ENDIAN, effect on sign_extract: Bit Fields. +* BITS_PER_UNIT: Storage Layout. +* BITS_PER_WORD: Storage Layout. +* bitwise complement: Arithmetic. +* bitwise exclusive-or: Arithmetic. +* bitwise inclusive-or: Arithmetic. +* bitwise logical-and: Arithmetic. +* BLKmode: Machine Modes. +* BLKmode, and function return values: Calls. +* BLOCK_PROFILER: Profiling. +* BLOCK_PROFILER_CODE: Profiling. +* BRANCH_COST: Costs. +* break_out_memory_refs: Addressing Modes. +* BSS_SECTION_ASM_OP: Sections. +* bug criteria: Bug Criteria. +* bug report mailing lists: Bug Lists. +* bugs: Bugs. +* bugs, known: Trouble. +* builtin functions: C Dialect Options. +* builtin_setjmp_receiver instruction pattern: Standard Names. +* byte writes (29k): AMD29K Options. +* byte_mode: Machine Modes. +* BYTES_BIG_ENDIAN: Storage Layout. +* bzero: Config. +* bzero, implicit usage: Library Calls. +* C compilation options: Invoking GCC. +* C intermediate output, nonexistent: G++ and GCC. +* C language extensions: C Extensions. +* C language, traditional: C Dialect Options. +* C statements for assembler output: Output Statement. +* c++: Invoking G++. +* C++: G++ and GCC. +* C++ comments: C++ Comments. +* C++ compilation options: Invoking GCC. +* C++ interface and implementation headers: C++ Interface. +* C++ language extensions: C++ Extensions. +* C++ member fns, automatically inline: Inline. +* C++ misunderstandings: C++ Misunderstandings. +* C++ named return value: Naming Results. +* C++ options, command line: C++ Dialect Options. +* C++ pragmas, effect on inlining: C++ Interface. +* C++ runtime library: Installation. +* C++ signatures: C++ Signatures. +* C++ source file suffixes: Invoking G++. +* C++ static data, declaring and defining: Static Definitions. +* C++ subtype polymorphism: C++ Signatures. +* C++ type abstraction: C++ Signatures. +* C_INCLUDE_PATH: Environment Variables. +* call: Side Effects. +* call instruction pattern: Standard Names. +* call usage: Calls. +* call-clobbered register: Register Basics. +* call-saved register: Register Basics. +* call-used register: Register Basics. +* call_insn: Insns. +* call_insn and /u: Flags. +* CALL_INSN_FUNCTION_USAGE: Insns. +* call_pop instruction pattern: Standard Names. +* CALL_USED_REGISTERS: Register Basics. +* call_used_regs: Register Basics. +* call_value instruction pattern: Standard Names. +* call_value_pop instruction pattern: Standard Names. +* CALLER_SAVE_PROFITABLE: Caller Saves. +* calling conventions: Stack and Calling. +* calling functions in RTL: Calls. +* calling functions through the function vector on the H8/300 processors: Function Attributes. +* CAN_DEBUG_WITHOUT_FP: Run-time Target. +* CAN_ELIMINATE: Elimination. +* canonicalization of instructions: Insn Canonicalizations. +* CANONICALIZE_COMPARISON: Condition Code. +* canonicalize_funcptr_for_compare instruction pattern: Standard Names. +* case labels in initializers: Labeled Elements. +* case ranges: Case Ranges. +* case sensitivity and VMS: VMS Misc. +* CASE_DROPS_THROUGH: Misc. +* CASE_VALUES_THRESHOLD: Misc. +* CASE_VECTOR_MODE: Misc. +* CASE_VECTOR_PC_RELATIVE: Misc. +* casesi instruction pattern: Standard Names. +* cast to a union: Cast to Union. +* casts as lvalues: Lvalues. +* CC: Host Fragment. +* cc0: Regs and Memory. +* cc0, RTL sharing: Sharing. +* cc0_rtx: Regs and Memory. +* CC1_SPEC: Driver. +* CC1PLUS_SPEC: Driver. +* cc_status: Condition Code. +* CC_STATUS_MDEP: Condition Code. +* CC_STATUS_MDEP_INIT: Condition Code. +* CCmode: Machine Modes. +* CDImode: Machine Modes. +* change_address: Standard Names. +* CHAR_TYPE_SIZE: Type Layout. +* CHECK_FLOAT_VALUE: Storage Layout. +* check_stack instruction pattern: Standard Names. +* CHImode: Machine Modes. +* class definitions, register: Register Classes. +* class preference constraints: Class Preferences. +* CLASS_LIKELY_SPILLED_P: Register Classes. +* CLASS_MAX_NREGS: Register Classes. +* classes of RTX codes: Accessors. +* CLEAR_INSN_CACHE: Trampolines. +* CLIB: Host Fragment. +* clobber: Side Effects. +* clrstrM instruction pattern: Standard Names. +* cmpM instruction pattern: Standard Names. +* cmpstrM instruction pattern: Standard Names. +* code generation conventions: Code Gen Options. +* code generation RTL sequences: Expander Definitions. +* code motion: Passes. +* code_label: Insns. +* code_label and /i: Flags. +* CODE_LABEL_NUMBER: Insns. +* codes, RTL expression: RTL Objects. +* COImode: Machine Modes. +* COLLECT_EXPORT_LIST: Config. +* combiner pass: Regs and Memory. +* command options: Invoking GCC. +* comments, C++ style: C++ Comments. +* common subexpression elimination: Passes. +* COMP_TYPE_ATTRIBUTES: Misc. +* compare: Arithmetic. +* compare, canonicalization of: Insn Canonicalizations. +* comparison of signed and unsigned values, warning: Warning Options. +* compilation in a separate directory: Other Dir. +* compiler bugs, reporting: Bug Reporting. +* compiler compared to C++ preprocessor: G++ and GCC. +* compiler options, C++: C++ Dialect Options. +* compiler passes and files: Passes. +* compiler version, specifying: Target Options. +* COMPILER_PATH: Environment Variables. +* complement, bitwise: Arithmetic. +* complex numbers: Complex. +* compound expressions as lvalues: Lvalues. +* computed gotos: Labels as Values. +* computing the length of an insn: Insn Lengths. +* cond: Comparisons. +* cond and attributes: Expressions. +* condition code register: Regs and Memory. +* condition code status: Condition Code. +* condition codes: Comparisons. +* conditional expressions as lvalues: Lvalues. +* conditional expressions, extensions: Conditionals. +* CONDITIONAL_REGISTER_USAGE: Register Basics. +* conditions, in patterns: Patterns. +* configuration file: Config. +* configurations supported by GNU CC: Configurations. +* conflicting types: Disappointments. +* const applied to function: Function Attributes. +* const function attribute: Function Attributes. +* CONST0_RTX: Constants. +* const0_rtx: Constants. +* CONST1_RTX: Constants. +* const1_rtx: Constants. +* CONST2_RTX: Constants. +* const2_rtx: Constants. +* CONST_CALL_P: Flags. +* CONST_COSTS: Costs. +* const_double: Constants. +* const_double, RTL sharing: Sharing. +* CONST_DOUBLE_CHAIN: Constants. +* CONST_DOUBLE_LOW: Constants. +* CONST_DOUBLE_MEM: Constants. +* CONST_DOUBLE_OK_FOR_LETTER_P: Register Classes. +* const_int: Constants. +* const_int and attribute tests: Expressions. +* const_int and attributes: Expressions. +* const_int, RTL sharing: Sharing. +* CONST_OK_FOR_LETTER_P: Register Classes. +* const_string: Constants. +* const_string and attributes: Expressions. +* const_true_rtx: Constants. +* constant attributes: Constant Attributes. +* constant folding: Passes. +* constant folding and floating point: Cross-compilation. +* constant propagation: Passes. +* CONSTANT_ADDRESS_P: Addressing Modes. +* CONSTANT_AFTER_FUNCTION_P: Data Output. +* CONSTANT_ALIGNMENT: Storage Layout. +* CONSTANT_P: Addressing Modes. +* CONSTANT_POOL_ADDRESS_P: Flags. +* CONSTANT_POOL_BEFORE_FUNCTION: Data Output. +* constants in constraints: Simple Constraints. +* constm1_rtx: Constants. +* constraint modifier characters: Modifiers. +* constraint, matching: Simple Constraints. +* constraints: Constraints. +* constraints, machine specific: Machine Constraints. +* constructing calls: Constructing Calls. +* constructor expressions: Constructors. +* constructor function attribute: Function Attributes. +* constructors vs goto: Destructors and Goto. +* constructors, automatic calls: Collect2. +* constructors, output of: Initialization. +* contributors: Contributors. +* controlling register usage: Register Basics. +* controlling the compilation driver: Driver. +* conventions, run-time: Interface. +* conversions: Conversions. +* Convex options: Convex Options. +* copy_rtx_if_shared: Sharing. +* core dump: Bug Criteria. +* cos: C Dialect Options. +* costs of instructions: Costs. +* COSTS_N_INSNS: Costs. +* CPLUS_INCLUDE_PATH: Environment Variables. +* CPP_PREDEFINES: Run-time Target. +* CPP_SPEC: Driver. +* CQImode: Machine Modes. +* cross compilation and floating point: Cross-compilation. +* cross compiling: Target Options. +* cross-compiler, installation: Cross-Compiler. +* cross-jumping: Passes. +* CROSS_LIBGCC1: Target Fragment. +* CRTSTUFF_T_CFLAGS: Target Fragment. +* CRTSTUFF_T_CFLAGS_S: Target Fragment. +* CSImode: Machine Modes. +* CTImode: Machine Modes. +* CUMULATIVE_ARGS: Register Arguments. +* current_function_epilogue_delay_list: Function Entry. +* current_function_outgoing_args_size: Stack Arguments. +* current_function_pops_args: Function Entry. +* current_function_pretend_args_size: Function Entry. +* d in constraint: Simple Constraints. +* data flow analysis: Passes. +* DATA_ALIGNMENT: Storage Layout. +* data_section: Sections. +* DATA_SECTION_ASM_OP: Sections. +* DBR_OUTPUT_SEQEND: Instruction Output. +* dbr_sequence_length: Instruction Output. +* DBX: Interoperation. +* DBX_BLOCKS_FUNCTION_RELATIVE: DBX Options. +* DBX_CONTIN_CHAR: DBX Options. +* DBX_CONTIN_LENGTH: DBX Options. +* DBX_DEBUGGING_INFO: DBX Options. +* DBX_FUNCTION_FIRST: DBX Options. +* DBX_LBRAC_FIRST: DBX Options. +* DBX_MEMPARM_STABS_LETTER: DBX Options. +* DBX_NO_XREFS: DBX Options. +* DBX_OUTPUT_ENUM: DBX Hooks. +* DBX_OUTPUT_FUNCTION_END: DBX Hooks. +* DBX_OUTPUT_LBRAC: DBX Hooks. +* DBX_OUTPUT_MAIN_SOURCE_DIRECTORY: File Names and DBX. +* DBX_OUTPUT_MAIN_SOURCE_FILE_END: File Names and DBX. +* DBX_OUTPUT_MAIN_SOURCE_FILENAME: File Names and DBX. +* DBX_OUTPUT_RBRAC: DBX Hooks. +* DBX_OUTPUT_SOURCE_FILENAME: File Names and DBX. +* DBX_OUTPUT_STANDARD_TYPES: DBX Hooks. +* DBX_REGISTER_NUMBER: All Debuggers. +* DBX_REGPARM_STABS_CODE: DBX Options. +* DBX_REGPARM_STABS_LETTER: DBX Options. +* DBX_STATIC_CONST_VAR_CODE: DBX Options. +* DBX_STATIC_STAB_DATA_SECTION: DBX Options. +* DBX_TYPE_DECL_STABS_CODE: DBX Options. +* DBX_USE_BINCL: DBX Options. +* DBX_WORKING_DIRECTORY: File Names and DBX. +* DCmode: Machine Modes. +* De Morgan's law: Insn Canonicalizations. +* dead code: Passes. +* dead_or_set_p: Peephole Definitions. +* deallocating variable length arrays: Variable Length. +* death notes: Obsolete Register Macros. +* debug_rtx: Bug Reporting. +* DEBUG_SYMS_TEXT: DBX Options. +* DEBUGGER_ARG_OFFSET: All Debuggers. +* DEBUGGER_AUTO_OFFSET: All Debuggers. +* debugging information generation: Passes. +* debugging information options: Debugging Options. +* debugging, 88k OCS: M88K Options. +* declaration scope: Incompatibilities. +* declarations inside expressions: Statement Exprs. +* declarations, RTL: RTL Declarations. +* declaring attributes of functions: Function Attributes. +* declaring static data in C++: Static Definitions. +* default implementation, signature member function: C++ Signatures. +* DEFAULT_CALLER_SAVES: Caller Saves. +* DEFAULT_GDB_EXTENSIONS: DBX Options. +* DEFAULT_MAIN_RETURN: Misc. +* DEFAULT_PCC_STRUCT_RETURN: Aggregate Return. +* DEFAULT_SHORT_ENUMS: Type Layout. +* DEFAULT_SIGNED_CHAR: Type Layout. +* DEFAULT_VTABLE_THUNKS: Storage Layout. +* define_asm_attributes: Tagging Insns. +* define_attr: Defining Attributes. +* define_delay: Delay Slots. +* define_expand: Expander Definitions. +* define_function_unit: Function Units. +* define_insn: Patterns. +* define_insn example: Example. +* define_peephole: Expander Definitions. +* define_split: Insn Splitting. +* defining attributes and their values: Defining Attributes. +* defining jump instruction patterns: Jump Patterns. +* defining peephole optimizers: Peephole Definitions. +* defining RTL sequences for code generation: Expander Definitions. +* defining static data in C++: Static Definitions. +* delay slots, defining: Delay Slots. +* DELAY_SLOTS_FOR_EPILOGUE: Function Entry. +* delayed branch scheduling: Passes. +* dependencies for make as output: Environment Variables. +* dependencies, make: Preprocessor Options. +* DEPENDENCIES_OUTPUT: Environment Variables. +* Dependent Patterns: Dependent Patterns. +* destructor function attribute: Function Attributes. +* destructors vs goto: Destructors and Goto. +* destructors, output of: Initialization. +* detecting -traditional: C Dialect Options. +* DFmode: Machine Modes. +* dialect options: C Dialect Options. +* digits in constraint: Simple Constraints. +* DImode: Machine Modes. +* DIR_SEPARATOR: Config. +* directory options: Directory Options. +* disabling certain registers: Register Basics. +* dispatch table: Dispatch Tables. +* div: Arithmetic. +* div and attributes: Expressions. +* DIVDI3_LIBCALL: Library Calls. +* divide instruction, 88k: M88K Options. +* division: Arithmetic. +* divM3 instruction pattern: Standard Names. +* divmodM4 instruction pattern: Standard Names. +* DIVSI3_LIBCALL: Library Calls. +* DOESNT_NEED_UNWINDER: Exception Region Output. +* dollar signs in identifier names: Dollar Signs. +* DOLLARS_IN_IDENTIFIERS: Misc. +* DONE: Expander Definitions. +* DONT_REDUCE_ADDR: Costs. +* double-word arithmetic: Long Long. +* DOUBLE_TYPE_SIZE: Type Layout. +* downward funargs: Nested Functions. +* driver: Driver. +* DW bit (29k): AMD29K Options. +* DWARF2_DEBUGGING_INFO: SDB and DWARF. +* DWARF2_UNWIND_INFO: Exception Region Output. +* DWARF_DEBUGGING_INFO: SDB and DWARF. +* DYNAMIC_CHAIN_ADDRESS: Frame Layout. +* E in constraint: Simple Constraints. +* earlyclobber operand: Modifiers. +* EASY_DIV_EXPR: Misc. +* EDOM, implicit usage: Library Calls. +* EH_FRAME_SECTION_ASM_OP: Exception Region Output. +* EH_TABLE_LOOKUP: Exception Region Output. +* eight bit data on the H8/300 and H8/300H: Function Attributes. +* ELIGIBLE_FOR_EPILOGUE_DELAY: Function Entry. +* ELIMINABLE_REGS: Elimination. +* empty constraints: No Constraints. +* EMPTY_FIELD_BOUNDARY: Storage Layout. +* ENCODE_SECTION_INFO: Sections. +* ENCODE_SECTION_INFO and address validation: Addressing Modes. +* ENCODE_SECTION_INFO usage: Instruction Output. +* ENDFILE_SPEC: Driver. +* endianness: Portability. +* enum machine_mode: Machine Modes. +* enum reg_class: Register Classes. +* environment variables: Environment Variables. +* epilogue: Function Entry. +* EPILOGUE_USES: Function Entry. +* eq: Comparisons. +* eq and attributes: Expressions. +* eq_attr: Expressions. +* equal: Comparisons. +* errno, implicit usage: Library Calls. +* error messages: Warnings and Errors. +* escape sequences, traditional: C Dialect Options. +* exception_receiver instruction pattern: Standard Names. +* EXCEPTION_SECTION: Exception Region Output. +* exclamation point: Multi-Alternative. +* exclusive-or, bitwise: Arithmetic. +* EXECUTABLE_SUFFIX: Config. +* exit: C Dialect Options. +* exit status and VMS: VMS Misc. +* EXIT_BODY: Misc. +* EXIT_IGNORE_STACK: Function Entry. +* EXPAND_BUILTIN_SAVEREGS: Varargs. +* expander definitions: Expander Definitions. +* explicit register variables: Explicit Reg Vars. +* expr_list: Insns. +* expression codes: RTL Objects. +* expressions containing statements: Statement Exprs. +* expressions, compound, as lvalues: Lvalues. +* expressions, conditional, as lvalues: Lvalues. +* expressions, constructor: Constructors. +* extended asm: Extended Asm. +* extendMN2 instruction pattern: Standard Names. +* extensible constraints: Simple Constraints. +* extensions, ?: <1>: Conditionals. +* extensions, ?:: Lvalues. +* extensions, C language: C Extensions. +* extensions, C++ language: C++ Extensions. +* extern int target_flags: Run-time Target. +* external declaration scope: Incompatibilities. +* EXTRA_CC_MODES: Condition Code. +* EXTRA_CC_NAMES: Condition Code. +* EXTRA_CONSTRAINT: Register Classes. +* EXTRA_SECTION_FUNCTIONS: Sections. +* EXTRA_SECTIONS: Sections. +* EXTRA_SPECS: Driver. +* extv instruction pattern: Standard Names. +* extzv instruction pattern: Standard Names. +* F in constraint: Simple Constraints. +* fabs: C Dialect Options. +* FAIL: Expander Definitions. +* fatal signal: Bug Criteria. +* FATAL_EXIT_CODE: Config. +* features, optional, in system conventions: Run-time Target. +* ffs <1>: Arithmetic. +* ffs: C Dialect Options. +* ffsM2 instruction pattern: Standard Names. +* file name suffix: Overall Options. +* file names: Link Options. +* files and passes of the compiler: Passes. +* final pass: Passes. +* FINAL_PRESCAN_INSN: Instruction Output. +* FINAL_PRESCAN_LABEL: Instruction Output. +* FINAL_REG_PARM_STACK_SPACE: Stack Arguments. +* final_scan_insn: Function Entry. +* final_sequence: Instruction Output. +* FINALIZE_PIC: PIC. +* FIRST_INSN_ADDRESS: Insn Lengths. +* FIRST_PARM_OFFSET: Frame Layout. +* FIRST_PARM_OFFSET and virtual registers: Regs and Memory. +* FIRST_PSEUDO_REGISTER: Register Basics. +* FIRST_STACK_REG: Stack Registers. +* FIRST_VIRTUAL_REGISTER: Regs and Memory. +* fix: Conversions. +* fix_truncMN2 instruction pattern: Standard Names. +* fixed register: Register Basics. +* FIXED_REGISTERS: Register Basics. +* fixed_regs: Register Basics. +* fixMN2 instruction pattern: Standard Names. +* FIXUNS_TRUNC_LIKE_FIX_TRUNC: Misc. +* fixuns_truncMN2 instruction pattern: Standard Names. +* fixunsMN2 instruction pattern: Standard Names. +* flags in RTL expression: Flags. +* float: Conversions. +* float as function value type: Incompatibilities. +* FLOAT_ARG_TYPE: Library Calls. +* float_extend: Conversions. +* FLOAT_STORE_FLAG_VALUE: Misc. +* float_truncate: Conversions. +* FLOAT_TYPE_SIZE: Type Layout. +* FLOAT_VALUE_TYPE: Library Calls. +* FLOAT_WORDS_BIG_ENDIAN: Storage Layout. +* FLOATIFY: Library Calls. +* floating point and cross compilation: Cross-compilation. +* floating point precision <1>: Disappointments. +* floating point precision: Optimize Options. +* floatMN2 instruction pattern: Standard Names. +* floatunsMN2 instruction pattern: Standard Names. +* force_reg: Standard Names. +* format function attribute: Function Attributes. +* format_arg function attribute: Function Attributes. +* forwarding calls: Constructing Calls. +* frame layout: Frame Layout. +* FRAME_GROWS_DOWNWARD: Frame Layout. +* FRAME_GROWS_DOWNWARD and virtual registers: Regs and Memory. +* frame_pointer_needed: Function Entry. +* FRAME_POINTER_REGNUM: Frame Registers. +* FRAME_POINTER_REGNUM and virtual registers: Regs and Memory. +* FRAME_POINTER_REQUIRED: Elimination. +* frame_pointer_rtx: Frame Registers. +* fscanf, and constant strings: Incompatibilities. +* ftruncM2 instruction pattern: Standard Names. +* function addressability on the M32R/D: Function Attributes. +* function attributes: Function Attributes. +* function call conventions: Interface. +* function entry and exit: Function Entry. +* function pointers, arithmetic: Pointer Arith. +* function prototype declarations: Function Prototypes. +* function units, for scheduling: Function Units. +* function, size of pointer to: Pointer Arith. +* function-call insns: Calls. +* FUNCTION_ARG: Register Arguments. +* FUNCTION_ARG_ADVANCE: Register Arguments. +* FUNCTION_ARG_BOUNDARY: Register Arguments. +* FUNCTION_ARG_CALLEE_COPIES: Register Arguments. +* FUNCTION_ARG_PADDING: Register Arguments. +* FUNCTION_ARG_PARTIAL_NREGS: Register Arguments. +* FUNCTION_ARG_PASS_BY_REFERENCE: Register Arguments. +* FUNCTION_ARG_REGNO_P: Register Arguments. +* FUNCTION_BLOCK_PROFILER: Profiling. +* FUNCTION_BLOCK_PROFILER_EXIT: Profiling. +* FUNCTION_BOUNDARY: Storage Layout. +* FUNCTION_CONVERSION_BUG: Config. +* FUNCTION_EPILOGUE: Function Entry. +* FUNCTION_EPILOGUE and trampolines: Trampolines. +* FUNCTION_INCOMING_ARG: Register Arguments. +* FUNCTION_MODE: Misc. +* FUNCTION_OUTGOING_VALUE: Scalar Return. +* FUNCTION_PROFILER: Profiling. +* FUNCTION_PROLOGUE: Function Entry. +* FUNCTION_PROLOGUE and trampolines: Trampolines. +* FUNCTION_VALUE: Scalar Return. +* FUNCTION_VALUE_REGNO_P: Scalar Return. +* functions called via pointer on the RS/6000 and PowerPC: Function Attributes. +* functions in arbitrary sections: Function Attributes. +* functions that are passed arguments in registers on the 386: Function Attributes. +* functions that do not pop the argument stack on the 386: Function Attributes. +* functions that do pop the argument stack on the 386: Function Attributes. +* functions that have no side effects: Function Attributes. +* functions that never return: Function Attributes. +* functions that pop the argument stack on the 386: Function Attributes. +* functions which are exported from a dll on PowerPC Windows NT: Function Attributes. +* functions which are imported from a dll on PowerPC Windows NT: Function Attributes. +* functions which specify exception handling on PowerPC Windows NT: Function Attributes. +* functions with printf or scanf style arguments: Function Attributes. +* functions, leaf: Leaf Functions. +* g in constraint: Simple Constraints. +* G in constraint: Simple Constraints. +* g++: Invoking G++. +* G++: G++ and GCC. +* g++ 1.XX: Invoking G++. +* g++ older version: Invoking G++. +* g++, separate compiler: Invoking G++. +* GCC: G++ and GCC. +* GCC_EXEC_PREFIX: Environment Variables. +* ge: Comparisons. +* ge and attributes: Expressions. +* GEN_ERRNO_RTX: Library Calls. +* gencodes: Passes. +* genconfig: Passes. +* general_operand: RTL Template. +* GENERAL_REGS: Register Classes. +* generalized lvalues: Lvalues. +* generating assembler output: Output Statement. +* generating insns: RTL Template. +* genflags: Passes. +* genflags, crash on Sun 4: Installation Problems. +* get_attr: Expressions. +* get_attr_length: Insn Lengths. +* GET_CLASS_NARROWEST_MODE: Machine Modes. +* GET_CODE: RTL Objects. +* get_frame_size: Elimination. +* get_insns: Insns. +* get_last_insn: Insns. +* GET_MODE: Machine Modes. +* GET_MODE_ALIGNMENT: Machine Modes. +* GET_MODE_BITSIZE: Machine Modes. +* GET_MODE_CLASS: Machine Modes. +* GET_MODE_MASK: Machine Modes. +* GET_MODE_NAME: Machine Modes. +* GET_MODE_NUNITS: Machine Modes. +* GET_MODE_SIZE: Machine Modes. +* GET_MODE_UNIT_SIZE: Machine Modes. +* GET_MODE_WIDER_MODE: Machine Modes. +* GET_RTX_CLASS: Accessors. +* GET_RTX_FORMAT: Accessors. +* GET_RTX_LENGTH: Accessors. +* geu: Comparisons. +* geu and attributes: Expressions. +* GIV_SORT_CRITERION: Misc. +* global offset table: Code Gen Options. +* global register after longjmp: Global Reg Vars. +* global register allocation: Passes. +* global register variables: Global Reg Vars. +* GLOBALDEF: Global Declarations. +* GLOBALREF: Global Declarations. +* GLOBALVALUEDEF: Global Declarations. +* GLOBALVALUEREF: Global Declarations. +* GNU CC and portability: Portability. +* GNU CC command options: Invoking GCC. +* GO_IF_LEGITIMATE_ADDRESS: Addressing Modes. +* GO_IF_MODE_DEPENDENT_ADDRESS: Addressing Modes. +* goto in C++: Destructors and Goto. +* goto with computed label: Labels as Values. +* gp-relative references (MIPS): MIPS Options. +* gprof: Debugging Options. +* greater than: Comparisons. +* grouping options: Invoking GCC. +* gt: Comparisons. +* gt and attributes: Expressions. +* gtu: Comparisons. +* gtu and attributes: Expressions. +* H in constraint: Simple Constraints. +* HANDLE_PRAGMA: Misc. +* hard registers: Regs and Memory. +* HARD_FRAME_POINTER_REGNUM: Frame Registers. +* HARD_REGNO_MODE_OK: Values in Registers. +* HARD_REGNO_NREGS: Values in Registers. +* hardware models and configurations, specifying: Submodel Options. +* HAS_INIT_SECTION: Macros for Initialization. +* HAVE_ATEXIT: Misc. +* HAVE_POST_DECREMENT: Addressing Modes. +* HAVE_POST_INCREMENT: Addressing Modes. +* HAVE_PRE_DECREMENT: Addressing Modes. +* HAVE_PRE_INCREMENT: Addressing Modes. +* header files and VMS: Include Files and VMS. +* high: Constants. +* HImode: Machine Modes. +* HImode, in insn: Insns. +* host makefile fragment: Host Fragment. +* HOST_BITS_PER_CHAR: Config. +* HOST_BITS_PER_INT: Config. +* HOST_BITS_PER_LONG: Config. +* HOST_BITS_PER_SHORT: Config. +* HOST_FLOAT_FORMAT: Config. +* HOST_FLOAT_WORDS_BIG_ENDIAN: Config. +* HOST_WORDS_BIG_ENDIAN: Config. +* hosted environment: C Dialect Options. +* HPPA Options: HPPA Options. +* I in constraint: Simple Constraints. +* i in constraint: Simple Constraints. +* i386 Options: i386 Options. +* IBM RS/6000 and PowerPC Options: RS/6000 and PowerPC Options. +* IBM RT options: RT Options. +* IBM RT PC: Interoperation. +* identifier names, dollar signs in: Dollar Signs. +* identifiers, names in assembler code: Asm Labels. +* identifying source, compiler (88k): M88K Options. +* IEEE_FLOAT_FORMAT: Storage Layout. +* if_then_else: Comparisons. +* if_then_else and attributes: Expressions. +* if_then_else usage: Side Effects. +* immediate_operand: RTL Template. +* IMMEDIATE_PREFIX: Instruction Output. +* implicit argument: return value: Naming Results. +* IMPLICIT_FIX_EXPR: Misc. +* implied #pragma implementation: C++ Interface. +* in_data: Sections. +* in_struct: Flags. +* in_struct, in code_label: Flags. +* in_struct, in insn: Flags. +* in_struct, in label_ref: Flags. +* in_struct, in mem: Flags. +* in_struct, in reg: Flags. +* in_struct, in subreg: Flags. +* in_text: Sections. +* include files and VMS: Include Files and VMS. +* INCLUDE_DEFAULTS: Driver. +* inclusive-or, bitwise: Arithmetic. +* INCOMING_FRAME_SP_OFFSET: Frame Layout. +* INCOMING_REGNO: Register Basics. +* INCOMING_RETURN_ADDR_RTX: Frame Layout. +* incompatibilities of GNU CC: Incompatibilities. +* increment operators: Bug Criteria. +* INDEX_REG_CLASS: Register Classes. +* indirect_jump instruction pattern: Standard Names. +* INIT_CUMULATIVE_ARGS: Register Arguments. +* INIT_CUMULATIVE_INCOMING_ARGS: Register Arguments. +* INIT_ENVIRONMENT: Driver. +* INIT_SECTION_ASM_OP <1>: Macros for Initialization. +* INIT_SECTION_ASM_OP: Sections. +* INIT_TARGET_OPTABS: Library Calls. +* INITIAL_ELIMINATION_OFFSET: Elimination. +* INITIAL_FRAME_POINTER_OFFSET: Elimination. +* initialization routines: Initialization. +* initializations in expressions: Constructors. +* INITIALIZE_TRAMPOLINE: Trampolines. +* initializers with labeled elements: Labeled Elements. +* initializers, non-constant: Initializers. +* inline automatic for C++ member fns: Inline. +* inline functions: Inline. +* inline functions, omission of: Inline. +* inline, automatic: Passes. +* inlining and C++ pragmas: C++ Interface. +* insn: Insns. +* insn and /i: Flags. +* insn and /s: Flags. +* insn and /u: Flags. +* insn attributes: Insn Attributes. +* insn canonicalization: Insn Canonicalizations. +* insn lengths, computing: Insn Lengths. +* insn splitting: Insn Splitting. +* insn-attr.h: Defining Attributes. +* INSN_ANNULLED_BRANCH_P: Flags. +* INSN_CACHE_DEPTH: Trampolines. +* INSN_CACHE_LINE_WIDTH: Trampolines. +* INSN_CACHE_SIZE: Trampolines. +* INSN_CLOBBERS_REGNO_P: Obsolete Register Macros. +* INSN_CODE: Insns. +* INSN_DELETED_P: Flags. +* INSN_FROM_TARGET_P: Flags. +* insn_list: Insns. +* INSN_REFERENCES_ARE_DELAYED: Misc. +* INSN_SETS_ARE_DELAYED: Misc. +* INSN_UID: Insns. +* insns: Insns. +* insns, generating: RTL Template. +* insns, recognizing: RTL Template. +* INSTALL: Host Fragment. +* installation trouble: Trouble. +* installing GNU CC: Installation. +* installing GNU CC on the Sun: Sun Install. +* installing GNU CC on VMS: VMS Install. +* instruction attributes: Insn Attributes. +* instruction combination: Passes. +* instruction patterns: Patterns. +* instruction recognizer: Passes. +* instruction scheduling: Passes. +* instruction splitting: Insn Splitting. +* insv instruction pattern: Standard Names. +* INT_TYPE_SIZE: Type Layout. +* INTEGRATE_THRESHOLD: Misc. +* integrated: Flags. +* integrated, in insn: Flags. +* integrated, in reg: Flags. +* integrating function code: Inline. +* Intel 386 Options: i386 Options. +* Interdependence of Patterns: Dependent Patterns. +* interface and implementation headers, C++: C++ Interface. +* interfacing to GNU CC output: Interface. +* intermediate C version, nonexistent: G++ and GCC. +* interrupt handler functions on the H8/300 processors: Function Attributes. +* interrupt handlers on the M32R/D: Function Attributes. +* INTIFY: Library Calls. +* introduction: Top. +* invalid assembly code: Bug Criteria. +* invalid input: Bug Criteria. +* INVOKE__main: Macros for Initialization. +* invoking g++: Invoking G++. +* ior: Arithmetic. +* ior and attributes: Expressions. +* ior, canonicalization of: Insn Canonicalizations. +* iorM3 instruction pattern: Standard Names. +* IS_ASM_LOGICAL_LINE_SEPARATOR: Data Output. +* isinf: Cross-compilation. +* isnan: Cross-compilation. +* jump instruction patterns: Jump Patterns. +* jump instructions and set: Side Effects. +* jump optimization: Passes. +* jump threading: Passes. +* jump_insn: Insns. +* JUMP_LABEL: Insns. +* JUMP_TABLES_IN_TEXT_SECTION: Sections. +* kernel and user registers (29k): AMD29K Options. +* keywords, alternate: Alternate Keywords. +* known causes of trouble: Trouble. +* LABEL_NUSES: Insns. +* LABEL_OUTSIDE_LOOP_P: Flags. +* LABEL_PRESERVE_P: Flags. +* label_ref: Constants. +* label_ref and /s: Flags. +* label_ref, RTL sharing: Sharing. +* labeled elements in initializers: Labeled Elements. +* labels as values: Labels as Values. +* labs: C Dialect Options. +* language dialect options: C Dialect Options. +* large bit shifts (88k): M88K Options. +* large return values: Aggregate Return. +* LAST_STACK_REG: Stack Registers. +* LAST_VIRTUAL_REGISTER: Regs and Memory. +* LD_FINI_SWITCH: Macros for Initialization. +* LD_INIT_SWITCH: Macros for Initialization. +* LDD_SUFFIX: Macros for Initialization. +* ldexp: Cross-compilation. +* le: Comparisons. +* le and attributes: Expressions. +* leaf functions: Leaf Functions. +* leaf_function: Leaf Functions. +* leaf_function_p: Standard Names. +* LEAF_REG_REMAP: Leaf Functions. +* LEAF_REGISTERS: Leaf Functions. +* left rotate: Arithmetic. +* left shift: Arithmetic. +* LEGITIMATE_CONSTANT_P: Addressing Modes. +* LEGITIMATE_PIC_OPERAND_P: PIC. +* LEGITIMIZE_ADDRESS: Addressing Modes. +* length-zero arrays: Zero Length. +* less than: Comparisons. +* less than or equal: Comparisons. +* leu: Comparisons. +* leu and attributes: Expressions. +* LIB2FUNCS_EXTRA: Target Fragment. +* LIB_SPEC: Driver. +* LIBCALL_VALUE: Scalar Return. +* libgcc.a: Library Calls. +* LIBGCC1: Target Fragment. +* LIBGCC2_CFLAGS: Target Fragment. +* LIBGCC2_WORDS_BIG_ENDIAN: Storage Layout. +* LIBGCC_NEEDS_DOUBLE: Library Calls. +* LIBGCC_SPEC: Driver. +* Libraries: Link Options. +* library subroutine names: Library Calls. +* LIBRARY_PATH: Environment Variables. +* libstdc++: Installation. +* LIMIT_RELOAD_CLASS: Register Classes. +* link options: Link Options. +* LINK_LIBGCC_SPECIAL: Driver. +* LINK_LIBGCC_SPECIAL_1: Driver. +* LINK_SPEC: Driver. +* lo_sum: Arithmetic. +* load address instruction: Simple Constraints. +* LOAD_EXTEND_OP: Misc. +* load_multiple instruction pattern: Standard Names. +* local labels: Local Labels. +* local register allocation: Passes. +* local variables in macros: Naming Types. +* local variables, specifying registers: Local Reg Vars. +* LOCAL_INCLUDE_DIR: Driver. +* LOCAL_LABEL_PREFIX: Instruction Output. +* LOG_LINKS: Insns. +* logical-and, bitwise: Arithmetic. +* long long data types: Long Long. +* LONG_DOUBLE_TYPE_SIZE: Type Layout. +* LONG_LONG_TYPE_SIZE: Type Layout. +* LONG_TYPE_SIZE: Type Layout. +* longjmp: Global Reg Vars. +* longjmp and automatic variables <1>: Interface. +* longjmp and automatic variables: C Dialect Options. +* longjmp incompatibilities: Incompatibilities. +* longjmp warnings: Warning Options. +* LONGJMP_RESTORE_FROM_STACK: Elimination. +* loop optimization: Passes. +* lshiftrt: Arithmetic. +* lshiftrt and attributes: Expressions. +* lshrM3 instruction pattern: Standard Names. +* lt: Comparisons. +* lt and attributes: Expressions. +* ltu: Comparisons. +* lvalues, generalized: Lvalues. +* m in constraint: Simple Constraints. +* M32R/D options: M32R/D Options. +* M680x0 options: M680x0 Options. +* M88k options: M88K Options. +* machine dependent options: Submodel Options. +* machine description macros: Target Macros. +* machine descriptions: Machine Desc. +* machine mode conversions: Conversions. +* machine modes: Machine Modes. +* machine specific constraints: Machine Constraints. +* MACHINE_DEPENDENT_REORG: Misc. +* MACHINE_STATE_RESTORE: Profiling. +* MACHINE_STATE_SAVE: Profiling. +* macro with variable arguments: Macro Varargs. +* macros containing asm: Extended Asm. +* macros, inline alternative: Inline. +* macros, local labels: Local Labels. +* macros, local variables in: Naming Types. +* macros, statements in expressions: Statement Exprs. +* macros, target description: Target Macros. +* macros, types of arguments: Typeof. +* main and the exit status: VMS Misc. +* make: Preprocessor Options. +* MAKE_DECL_ONE_ONLY (DECL): Label Output. +* make_safe_from: Expander Definitions. +* makefile fragment: Fragments. +* MASK_RETURN_ADDR: Exception Region Output. +* match_dup: RTL Template. +* match_dup and attributes: Insn Lengths. +* match_op_dup: RTL Template. +* match_operand: RTL Template. +* match_operand and attributes: Expressions. +* match_operator: RTL Template. +* match_par_dup: RTL Template. +* match_parallel: RTL Template. +* match_scratch: RTL Template. +* matching constraint: Simple Constraints. +* matching operands: Output Template. +* math libraries: Interface. +* math, in RTL: Arithmetic. +* MAX_BITS_PER_WORD: Storage Layout. +* MAX_CHAR_TYPE_SIZE: Type Layout. +* MAX_FIXED_MODE_SIZE: Storage Layout. +* MAX_INT_TYPE_SIZE: Type Layout. +* MAX_LONG_TYPE_SIZE: Type Layout. +* MAX_MOVE_MAX: Misc. +* MAX_OFILE_ALIGNMENT: Storage Layout. +* MAX_REGS_PER_ADDRESS: Addressing Modes. +* MAX_WCHAR_TYPE_SIZE: Type Layout. +* maximum operator: Min and Max. +* MAYBE_REG_PARM_STACK_SPACE: Stack Arguments. +* mcount: Profiling. +* MD_CALL_PROTOTYPES: Config. +* MD_EXEC_PREFIX: Driver. +* MD_STARTFILE_PREFIX: Driver. +* MD_STARTFILE_PREFIX_1: Driver. +* mem: Regs and Memory. +* mem and /s: Flags. +* mem and /u: Flags. +* mem and /v: Flags. +* mem, RTL sharing: Sharing. +* MEM_IN_STRUCT_P: Flags. +* MEM_VOLATILE_P: Flags. +* member fns, automatically inline: Inline. +* memcmp: C Dialect Options. +* memcpy: C Dialect Options. +* memcpy, implicit usage: Library Calls. +* memory model (29k): AMD29K Options. +* memory reference, nonoffsettable: Simple Constraints. +* memory references in constraints: Simple Constraints. +* MEMORY_MOVE_COST: Costs. +* memset, implicit usage: Library Calls. +* messages, warning: Warning Options. +* messages, warning and error: Warnings and Errors. +* middle-operands, omitted: Conditionals. +* MIN_UNITS_PER_WORD: Storage Layout. +* minimum operator: Min and Max. +* MINIMUM_ATOMIC_ALIGNMENT: Storage Layout. +* minus: Arithmetic. +* minus and attributes: Expressions. +* minus, canonicalization of: Insn Canonicalizations. +* MIPS options: MIPS Options. +* misunderstandings in C++: C++ Misunderstandings. +* mktemp, and constant strings: Incompatibilities. +* MN10300 options: MN10300 Options. +* mod: Arithmetic. +* mod and attributes: Expressions. +* MODDI3_LIBCALL: Library Calls. +* mode attribute: Variable Attributes. +* mode classes: Machine Modes. +* MODE_CC: Machine Modes. +* MODE_COMPLEX_FLOAT: Machine Modes. +* MODE_COMPLEX_INT: Machine Modes. +* MODE_FLOAT: Machine Modes. +* MODE_FUNCTION: Machine Modes. +* MODE_INT: Machine Modes. +* MODE_PARTIAL_INT: Machine Modes. +* MODE_RANDOM: Machine Modes. +* MODES_TIEABLE_P: Values in Registers. +* modifiers in constraints: Modifiers. +* modM3 instruction pattern: Standard Names. +* MODSI3_LIBCALL: Library Calls. +* MOVE_MAX: Misc. +* MOVE_RATIO: Costs. +* movM instruction pattern: Standard Names. +* movMODEcc instruction pattern: Standard Names. +* movstrictM instruction pattern: Standard Names. +* movstrM instruction pattern: Standard Names. +* MULDI3_LIBCALL: Library Calls. +* mulhisi3 instruction pattern: Standard Names. +* mulM3 instruction pattern: Standard Names. +* mulqihi3 instruction pattern: Standard Names. +* MULSI3_LIBCALL: Library Calls. +* mulsidi3 instruction pattern: Standard Names. +* mult: Arithmetic. +* mult and attributes: Expressions. +* mult, canonicalization of: Insn Canonicalizations. +* MULTIBYTE_CHARS: Config. +* MULTILIB_DEFAULTS: Driver. +* MULTILIB_DIRNAMES: Target Fragment. +* MULTILIB_EXCEPTIONS: Target Fragment. +* MULTILIB_EXTRA_OPTS: Target Fragment. +* MULTILIB_MATCHES: Target Fragment. +* MULTILIB_OPTIONS: Target Fragment. +* multiple alternative constraints: Multi-Alternative. +* MULTIPLE_SYMBOL_SPACES: Misc. +* multiplication: Arithmetic. +* multiprecision arithmetic: Long Long. +* MUST_PASS_IN_STACK, and FUNCTION_ARG: Register Arguments. +* n in constraint: Simple Constraints. +* N_REG_CLASSES: Register Classes. +* name augmentation: VMS Misc. +* named patterns and conditions: Patterns. +* named return value in C++: Naming Results. +* names used in assembler code: Asm Labels. +* names, pattern: Standard Names. +* naming convention, implementation headers: C++ Interface. +* naming types: Naming Types. +* ne: Comparisons. +* ne and attributes: Expressions. +* neg: Arithmetic. +* neg and attributes: Expressions. +* neg, canonicalization of: Insn Canonicalizations. +* negM2 instruction pattern: Standard Names. +* nested functions: Nested Functions. +* nested functions, trampolines for: Trampolines. +* newline vs string constants: C Dialect Options. +* next_cc0_user: Jump Patterns. +* NEXT_INSN: Insns. +* NEXT_OBJC_RUNTIME: Library Calls. +* nil: RTL Objects. +* no constraints: No Constraints. +* no-op move instructions: Passes. +* NO_BUILTIN_PTRDIFF_TYPE: Driver. +* NO_BUILTIN_SIZE_TYPE: Driver. +* NO_DBX_FUNCTION_END: DBX Hooks. +* NO_DOLLAR_IN_LABEL: Misc. +* NO_DOT_IN_LABEL: Misc. +* NO_FUNCTION_CSE: Costs. +* NO_IMPLICIT_EXTERN_C: Misc. +* NO_MD_PROTOTYPES: Config. +* NO_RECURSIVE_FUNCTION_CSE: Costs. +* NO_REGS: Register Classes. +* NO_STAB_H: Config. +* NO_SYS_SIGLIST: Config. +* nocommon attribute: Variable Attributes. +* non-constant initializers: Initializers. +* non-static inline function: Inline. +* NON_SAVING_SETJMP: Register Basics. +* nongcc_SI_type: Library Calls. +* nongcc_word_type: Library Calls. +* nonlocal_goto instruction pattern: Standard Names. +* nonlocal_goto_receiver instruction pattern: Standard Names. +* nonoffsettable memory reference: Simple Constraints. +* nop instruction pattern: Standard Names. +* noreturn function attribute: Function Attributes. +* not: Arithmetic. +* not and attributes: Expressions. +* not equal: Comparisons. +* not using constraints: No Constraints. +* not, canonicalization of: Insn Canonicalizations. +* note: Insns. +* NOTE_INSN_BLOCK_BEG: Insns. +* NOTE_INSN_BLOCK_END: Insns. +* NOTE_INSN_DELETED: Insns. +* NOTE_INSN_EH_REGION_BEG: Insns. +* NOTE_INSN_EH_REGION_END: Insns. +* NOTE_INSN_FUNCTION_END: Insns. +* NOTE_INSN_LOOP_BEG: Insns. +* NOTE_INSN_LOOP_CONT: Insns. +* NOTE_INSN_LOOP_END: Insns. +* NOTE_INSN_LOOP_VTOP: Insns. +* NOTE_INSN_SETJMP: Insns. +* NOTE_LINE_NUMBER: Insns. +* NOTE_SOURCE_FILE: Insns. +* NOTICE_UPDATE_CC: Condition Code. +* NUM_MACHINE_MODES: Machine Modes. +* o in constraint: Simple Constraints. +* OBJC_GEN_METHOD_LABEL: Label Output. +* OBJC_INCLUDE_PATH: Environment Variables. +* OBJC_INT_SELECTORS: Type Layout. +* OBJC_PROLOGUE: File Framework. +* OBJC_SELECTORS_WITHOUT_LABELS: Type Layout. +* OBJECT_FORMAT_COFF: Macros for Initialization. +* OBJECT_FORMAT_ROSE: Macros for Initialization. +* OBJECT_SUFFIX: Config. +* Objective C: G++ and GCC. +* Objective C threads: Installation. +* OBSTACK_CHUNK_ALLOC: Config. +* OBSTACK_CHUNK_FREE: Config. +* OBSTACK_CHUNK_SIZE: Config. +* obstack_free: Configurations. +* OCS (88k): M88K Options. +* offsettable address: Simple Constraints. +* old-style function definitions: Function Prototypes. +* OLDAR: Host Fragment. +* OLDCC: Host Fragment. +* OMIT_EH_TABLE: Exception Region Output. +* omitted middle-operands: Conditionals. +* one_cmplM2 instruction pattern: Standard Names. +* ONLY_INT_FIELDS: Config. +* open coding: Inline. +* operand access: Accessors. +* operand constraints: Constraints. +* operand substitution: Output Template. +* operands: Patterns. +* OPTIMIZATION_OPTIONS: Run-time Target. +* optimize options: Optimize Options. +* optional hardware or system features: Run-time Target. +* options to control warnings: Warning Options. +* options, C++: C++ Dialect Options. +* options, code generation: Code Gen Options. +* options, debugging: Debugging Options. +* options, dialect: C Dialect Options. +* options, directory search: Directory Options. +* options, GNU CC command: Invoking GCC. +* options, grouping: Invoking GCC. +* options, linking: Link Options. +* options, optimization: Optimize Options. +* options, order: Invoking GCC. +* options, preprocessor: Preprocessor Options. +* order of evaluation, side effects: Non-bugs. +* order of options: Invoking GCC. +* order of register allocation: Allocation Order. +* ORDER_REGS_FOR_LOCAL_ALLOC: Allocation Order. +* Ordering of Patterns: Pattern Ordering. +* other directory, compilation in: Other Dir. +* OUTGOING_REG_PARM_STACK_SPACE: Stack Arguments. +* OUTGOING_REGNO: Register Basics. +* output file option: Overall Options. +* output of assembler code: File Framework. +* output statements: Output Statement. +* output templates: Output Template. +* output_addr_const: Data Output. +* output_asm_insn: Output Statement. +* OUTPUT_QUOTED_STRING: File Framework. +* overflow while constant folding: Cross-compilation. +* OVERLAPPING_REGNO_P: Obsolete Register Macros. +* overloaded virtual fn, warning: Warning Options. +* OVERRIDE_OPTIONS: Run-time Target. +* p in constraint: Simple Constraints. +* packed attribute: Variable Attributes. +* parallel: Side Effects. +* parameter forward declaration: Variable Length. +* parameters, miscellaneous: Misc. +* PARM_BOUNDARY: Storage Layout. +* PARSE_LDD_OUTPUT: Macros for Initialization. +* parser generator, Bison: Installation. +* parsing pass: Passes. +* passes and files of the compiler: Passes. +* passing arguments: Interface. +* PATH_SEPARATOR: Config. +* PATTERN: Insns. +* pattern conditions: Patterns. +* pattern names: Standard Names. +* Pattern Ordering: Pattern Ordering. +* patterns: Patterns. +* pc: Regs and Memory. +* pc and attributes: Insn Lengths. +* pc, RTL sharing: Sharing. +* pc_rtx: Regs and Memory. +* PCC_BITFIELD_TYPE_MATTERS: Storage Layout. +* PCC_STATIC_STRUCT_RETURN: Aggregate Return. +* PDImode: Machine Modes. +* peephole optimization: Passes. +* peephole optimization, RTL representation: Side Effects. +* peephole optimizer definitions: Peephole Definitions. +* percent sign: Output Template. +* perform_...: Library Calls. +* PIC <1>: PIC. +* PIC: Code Gen Options. +* PIC_OFFSET_TABLE_REG_CALL_CLOBBERED: PIC. +* PIC_OFFSET_TABLE_REGNUM: PIC. +* plus: Arithmetic. +* plus and attributes: Expressions. +* plus, canonicalization of: Insn Canonicalizations. +* Pmode: Misc. +* pointer arguments: Function Attributes. +* POINTER_SIZE: Storage Layout. +* POINTERS_EXTEND_UNSIGNED: Storage Layout. +* portability: Portability. +* portions of temporary objects, pointers to: Temporaries. +* position independent code: PIC. +* POSIX: Config. +* post_dec: Incdec. +* post_inc: Incdec. +* pragma: Misc. +* pragma, reason for not using: Function Attributes. +* pragmas in C++, effect on inlining: C++ Interface. +* pragmas, interface and implementation: C++ Interface. +* pre_dec: Incdec. +* pre_inc: Incdec. +* predefined macros: Run-time Target. +* PREDICATE_CODES: Misc. +* PREFERRED_DEBUGGING_TYPE: All Debuggers. +* PREFERRED_OUTPUT_RELOAD_CLASS: Register Classes. +* PREFERRED_RELOAD_CLASS: Register Classes. +* preprocessing numbers: Incompatibilities. +* preprocessing tokens: Incompatibilities. +* preprocessor options: Preprocessor Options. +* PRESERVE_DEATH_INFO_REGNO_P: Obsolete Register Macros. +* prev_active_insn: Peephole Definitions. +* prev_cc0_setter: Jump Patterns. +* PREV_INSN: Insns. +* PRINT_OPERAND: Instruction Output. +* PRINT_OPERAND_ADDRESS: Instruction Output. +* PRINT_OPERAND_PUNCT_VALID_P: Instruction Output. +* probe instruction pattern: Standard Names. +* processor selection (29k): AMD29K Options. +* product: Arithmetic. +* prof: Debugging Options. +* PROFILE_BEFORE_PROLOGUE: Profiling. +* profile_block_flag: Profiling. +* profiling, code generation: Profiling. +* program counter: Regs and Memory. +* prologue: Function Entry. +* PROMOTE_FOR_CALL_ONLY: Storage Layout. +* PROMOTE_FUNCTION_ARGS: Storage Layout. +* PROMOTE_FUNCTION_RETURN: Storage Layout. +* PROMOTE_MODE: Storage Layout. +* PROMOTE_PROTOTYPES: Stack Arguments. +* promotion of formal parameters: Function Prototypes. +* pseudo registers: Regs and Memory. +* PSImode: Machine Modes. +* PTRDIFF_TYPE: Type Layout. +* push address instruction: Simple Constraints. +* PUSH_ROUNDING: Stack Arguments. +* PUSH_ROUNDING, interaction with STACK_BOUNDARY: Storage Layout. +* PUT_CODE: RTL Objects. +* PUT_MODE: Machine Modes. +* PUT_REG_NOTE_KIND: Insns. +* PUT_SDB_...: SDB and DWARF. +* Q, in constraint: Simple Constraints. +* QImode: Machine Modes. +* QImode, in insn: Insns. +* qsort, and global register variables: Global Reg Vars. +* question mark: Multi-Alternative. +* quotient: Arithmetic. +* r in constraint: Simple Constraints. +* r0-relative references (88k): M88K Options. +* ranges in case statements: Case Ranges. +* read-only strings: Incompatibilities. +* READONLY_DATA_SECTION: Sections. +* REAL_ARITHMETIC: Cross-compilation. +* REAL_INFINITY: Cross-compilation. +* REAL_NM_FILE_NAME: Macros for Initialization. +* REAL_VALUE_ATOF: Cross-compilation. +* REAL_VALUE_FIX: Cross-compilation. +* REAL_VALUE_FROM_INT: Cross-compilation. +* REAL_VALUE_ISINF: Cross-compilation. +* REAL_VALUE_ISNAN: Cross-compilation. +* REAL_VALUE_LDEXP: Cross-compilation. +* REAL_VALUE_NEGATE: Cross-compilation. +* REAL_VALUE_RNDZINT: Cross-compilation. +* REAL_VALUE_TO_DECIMAL: Data Output. +* REAL_VALUE_TO_INT: Cross-compilation. +* REAL_VALUE_TO_TARGET_DOUBLE: Data Output. +* REAL_VALUE_TO_TARGET_LONG_DOUBLE: Data Output. +* REAL_VALUE_TO_TARGET_SINGLE: Data Output. +* REAL_VALUE_TRUNCATE: Cross-compilation. +* REAL_VALUE_TYPE: Cross-compilation. +* REAL_VALUE_UNSIGNED_FIX: Cross-compilation. +* REAL_VALUE_UNSIGNED_RNDZINT: Cross-compilation. +* REAL_VALUES_EQUAL: Cross-compilation. +* REAL_VALUES_LESS: Cross-compilation. +* recog_operand: Instruction Output. +* recognizing insns: RTL Template. +* reg: Regs and Memory. +* reg and /i: Flags. +* reg and /s: Flags. +* reg and /u: Flags. +* reg and /v: Flags. +* reg, RTL sharing: Sharing. +* REG_ALLOC_ORDER: Allocation Order. +* REG_BR_PROB: Insns. +* REG_CC_SETTER: Insns. +* REG_CC_USER: Insns. +* REG_CLASS_CONTENTS: Register Classes. +* REG_CLASS_FROM_LETTER: Register Classes. +* REG_CLASS_NAMES: Register Classes. +* REG_DEAD: Insns. +* REG_DEP_ANTI: Insns. +* REG_DEP_OUTPUT: Insns. +* REG_EQUAL: Insns. +* REG_EQUIV: Insns. +* REG_EXEC_COUNT: Insns. +* REG_FUNCTION_VALUE_P: Flags. +* REG_INC: Insns. +* REG_LABEL: Insns. +* REG_LIBCALL: Insns. +* REG_LOOP_TEST_P: Flags. +* REG_MODE_OK_FOR_BASE_P: Addressing Modes. +* reg_names: Instruction Output. +* REG_NO_CONFLICT: Insns. +* REG_NONNEG: Insns. +* REG_NOTE_KIND: Insns. +* REG_NOTES: Insns. +* REG_OK_FOR_BASE_P: Addressing Modes. +* REG_OK_FOR_INDEX_P: Addressing Modes. +* REG_OK_STRICT: Addressing Modes. +* REG_PARM_STACK_SPACE: Stack Arguments. +* REG_PARM_STACK_SPACE, and FUNCTION_ARG: Register Arguments. +* REG_RETVAL: Insns. +* REG_UNUSED: Insns. +* REG_USERVAR_P: Flags. +* REG_WAS_0: Insns. +* register allocation: Passes. +* register allocation order: Allocation Order. +* register allocation, stupid: Passes. +* register class definitions: Register Classes. +* register class preference constraints: Class Preferences. +* register class preference pass: Passes. +* register pairs: Values in Registers. +* register positions in frame (88k): M88K Options. +* Register Transfer Language (RTL): RTL. +* register usage: Registers. +* register use analysis: Passes. +* register variable after longjmp: Global Reg Vars. +* register-to-stack conversion: Passes. +* REGISTER_MOVE_COST: Costs. +* REGISTER_NAMES: Instruction Output. +* register_operand: RTL Template. +* REGISTER_PREFIX: Instruction Output. +* registers: Extended Asm. +* registers arguments: Register Arguments. +* registers for local variables: Local Reg Vars. +* registers in constraints: Simple Constraints. +* registers, global allocation: Explicit Reg Vars. +* registers, global variables in: Global Reg Vars. +* REGNO_MODE_OK_FOR_BASE_P: Register Classes. +* REGNO_OK_FOR_BASE_P: Register Classes. +* REGNO_OK_FOR_INDEX_P: Register Classes. +* REGNO_REG_CLASS: Register Classes. +* regs_ever_live: Function Entry. +* relative costs: Costs. +* RELATIVE_PREFIX_NOT_LINKDIR: Driver. +* reload pass: Regs and Memory. +* reload_completed: Standard Names. +* reload_in instruction pattern: Standard Names. +* reload_in_progress: Standard Names. +* reload_out instruction pattern: Standard Names. +* reloading: Passes. +* remainder: Arithmetic. +* reordering, warning: Warning Options. +* reporting bugs: Bugs. +* representation of RTL: RTL. +* rest argument (in macro): Macro Varargs. +* rest_of_compilation: Passes. +* rest_of_decl_compilation: Passes. +* restore_stack_block instruction pattern: Standard Names. +* restore_stack_function instruction pattern: Standard Names. +* restore_stack_nonlocal instruction pattern: Standard Names. +* return: Side Effects. +* return instruction pattern: Standard Names. +* return value of main: VMS Misc. +* return value, named, in C++: Naming Results. +* return values in registers: Scalar Return. +* return, in C++ function header: Naming Results. +* RETURN_ADDR_IN_PREVIOUS_FRAME: Frame Layout. +* RETURN_ADDR_RTX: Frame Layout. +* RETURN_ADDRESS_POINTER_REGNUM: Frame Registers. +* RETURN_IN_MEMORY: Aggregate Return. +* RETURN_POPS_ARGS: Stack Arguments. +* returning aggregate values: Aggregate Return. +* returning structures and unions: Interface. +* REVERSIBLE_CC_MODE: Condition Code. +* right rotate: Arithmetic. +* right shift: Arithmetic. +* rotate: Arithmetic. +* rotatert: Arithmetic. +* rotlM3 instruction pattern: Standard Names. +* rotrM3 instruction pattern: Standard Names. +* ROUND_TYPE_ALIGN: Storage Layout. +* ROUND_TYPE_SIZE: Storage Layout. +* RS/6000 and PowerPC Options: RS/6000 and PowerPC Options. +* RT options: RT Options. +* RT PC: Interoperation. +* RTL addition: Arithmetic. +* RTL comparison: Arithmetic. +* RTL comparison operations: Comparisons. +* RTL constant expression types: Constants. +* RTL constants: Constants. +* RTL declarations: RTL Declarations. +* RTL difference: Arithmetic. +* RTL expression: RTL Objects. +* RTL expressions for arithmetic: Arithmetic. +* RTL format: Accessors. +* RTL format characters: Accessors. +* RTL function-call insns: Calls. +* RTL generation: Passes. +* RTL insn template: RTL Template. +* RTL integers: RTL Objects. +* RTL memory expressions: Regs and Memory. +* RTL object types: RTL Objects. +* RTL postdecrement: Incdec. +* RTL postincrement: Incdec. +* RTL predecrement: Incdec. +* RTL preincrement: Incdec. +* RTL register expressions: Regs and Memory. +* RTL representation: RTL. +* RTL side effect expressions: Side Effects. +* RTL strings: RTL Objects. +* RTL structure sharing assumptions: Sharing. +* RTL subtraction: Arithmetic. +* RTL sum: Arithmetic. +* RTL vectors: RTL Objects. +* RTX (See RTL): RTL Objects. +* RTX_COSTS: Costs. +* RTX_INTEGRATED_P: Flags. +* RTX_UNCHANGING_P: Flags. +* run-time conventions: Interface. +* run-time options: Code Gen Options. +* run-time target specification: Run-time Target. +* s in constraint: Simple Constraints. +* save_stack_block instruction pattern: Standard Names. +* save_stack_function instruction pattern: Standard Names. +* save_stack_nonlocal instruction pattern: Standard Names. +* saveable_obstack: Addressing Modes. +* scalars, returned as values: Scalar Return. +* scanf, and constant strings: Incompatibilities. +* SCCS_DIRECTIVE: Misc. +* SCHED_GROUP_P: Flags. +* scheduling, delayed branch: Passes. +* scheduling, instruction: Passes. +* SCmode: Machine Modes. +* sCOND instruction pattern: Standard Names. +* scope of a variable length array: Variable Length. +* scope of declaration: Disappointments. +* scope of external declarations: Incompatibilities. +* scratch: Regs and Memory. +* scratch operands: Regs and Memory. +* scratch, RTL sharing: Sharing. +* SDB_ALLOW_FORWARD_REFERENCES: SDB and DWARF. +* SDB_ALLOW_UNKNOWN_REFERENCES: SDB and DWARF. +* SDB_DEBUGGING_INFO: SDB and DWARF. +* SDB_DELIM: SDB and DWARF. +* SDB_GENERATE_FAKE: SDB and DWARF. +* search path: Directory Options. +* second include path: Preprocessor Options. +* SECONDARY_INPUT_RELOAD_CLASS: Register Classes. +* SECONDARY_MEMORY_NEEDED: Register Classes. +* SECONDARY_MEMORY_NEEDED_MODE: Register Classes. +* SECONDARY_MEMORY_NEEDED_RTX: Register Classes. +* SECONDARY_OUTPUT_RELOAD_CLASS: Register Classes. +* SECONDARY_RELOAD_CLASS: Register Classes. +* section function attribute: Function Attributes. +* section variable attribute: Variable Attributes. +* SELECT_CC_MODE: Condition Code. +* SELECT_RTX_SECTION: Sections. +* SELECT_SECTION: Sections. +* separate directory, compilation in: Other Dir. +* sequence: Side Effects. +* sequential consistency on 88k: M88K Options. +* set: Side Effects. +* set_attr: Tagging Insns. +* set_attr_alternative: Tagging Insns. +* SET_DEFAULT_TYPE_ATTRIBUTES: Misc. +* SET_DEST: Side Effects. +* SET_SRC: Side Effects. +* setjmp: Global Reg Vars. +* setjmp incompatibilities: Incompatibilities. +* SETUP_FRAME_ADDRESSES: Frame Layout. +* SETUP_INCOMING_VARARGS: Varargs. +* SFmode: Machine Modes. +* shared strings: Incompatibilities. +* shared VMS run time system: VMS Misc. +* SHARED_BSS_SECTION_ASM_OP: Sections. +* SHARED_SECTION_ASM_OP: Sections. +* sharing of RTL components: Sharing. +* shift: Arithmetic. +* SHIFT_COUNT_TRUNCATED: Misc. +* SHORT_IMMEDIATES_SIGN_EXTEND: Misc. +* SHORT_TYPE_SIZE: Type Layout. +* side effect in ?:: Conditionals. +* side effects, macro argument: Statement Exprs. +* side effects, order of evaluation: Non-bugs. +* sign_extend: Conversions. +* sign_extract: Bit Fields. +* sign_extract, canonicalization of: Insn Canonicalizations. +* signature: C++ Signatures. +* signature in C++, advantages: C++ Signatures. +* signature member function default implementation: C++ Signatures. +* signatures, C++: C++ Signatures. +* signed and unsigned values, comparison warning: Warning Options. +* signed division: Arithmetic. +* signed maximum: Arithmetic. +* signed minimum: Arithmetic. +* SIGNED_CHAR_SPEC: Driver. +* SImode: Machine Modes. +* simple constraints: Simple Constraints. +* simplifications, arithmetic: Passes. +* sin: C Dialect Options. +* SIZE_TYPE: Type Layout. +* sizeof: Typeof. +* SLOW_BYTE_ACCESS: Costs. +* SLOW_UNALIGNED_ACCESS: Costs. +* SLOW_ZERO_EXTEND: Costs. +* SMALL_REGISTER_CLASSES: Register Classes. +* smaller data references: M32R/D Options. +* smaller data references (88k): M88K Options. +* smaller data references (MIPS): MIPS Options. +* smaller data references (PowerPC): RS/6000 and PowerPC Options. +* smax: Arithmetic. +* smaxM3 instruction pattern: Standard Names. +* smin: Arithmetic. +* sminM3 instruction pattern: Standard Names. +* smulM3_highpart instruction pattern: Standard Names. +* SPARC options: SPARC Options. +* specified registers: Explicit Reg Vars. +* specifying compiler version and target machine: Target Options. +* specifying hardware config: Submodel Options. +* specifying machine version: Target Options. +* specifying registers for local variables: Local Reg Vars. +* speed of instructions: Costs. +* splitting instructions: Insn Splitting. +* sqrt <1>: Arithmetic. +* sqrt: C Dialect Options. +* sqrtM2 instruction pattern: Standard Names. +* square root: Arithmetic. +* sscanf, and constant strings: Incompatibilities. +* stack arguments: Stack Arguments. +* stack checks (29k): AMD29K Options. +* stack frame layout: Frame Layout. +* STACK_BOUNDARY: Storage Layout. +* STACK_CHECK_BUILTIN: Stack Checking. +* STACK_CHECK_FIXED_FRAME_SIZE: Stack Checking. +* STACK_CHECK_MAX_FRAME_SIZE: Stack Checking. +* STACK_CHECK_MAX_VAR_SIZE: Stack Checking. +* STACK_CHECK_PROBE_INTERVAL: Stack Checking. +* STACK_CHECK_PROBE_LOAD: Stack Checking. +* STACK_CHECK_PROTECT: Stack Checking. +* STACK_DYNAMIC_OFFSET: Frame Layout. +* STACK_DYNAMIC_OFFSET and virtual registers: Regs and Memory. +* STACK_GROWS_DOWNWARD: Frame Layout. +* STACK_PARMS_IN_REG_PARM_AREA: Stack Arguments. +* STACK_POINTER_OFFSET: Frame Layout. +* STACK_POINTER_OFFSET and virtual registers: Regs and Memory. +* STACK_POINTER_REGNUM: Frame Registers. +* STACK_POINTER_REGNUM and virtual registers: Regs and Memory. +* stack_pointer_rtx: Frame Registers. +* STACK_REGS: Stack Registers. +* stage1: Installation. +* standard pattern names: Standard Names. +* STANDARD_EXEC_PREFIX: Driver. +* STANDARD_INCLUDE_COMPONENT: Driver. +* STANDARD_INCLUDE_DIR: Driver. +* STANDARD_STARTFILE_PREFIX: Driver. +* start files: Tools and Libraries. +* STARTFILE_SPEC: Driver. +* STARTING_FRAME_OFFSET: Frame Layout. +* STARTING_FRAME_OFFSET and virtual registers: Regs and Memory. +* statements inside expressions: Statement Exprs. +* static data in C++, declaring and defining: Static Definitions. +* STATIC_CHAIN: Frame Registers. +* STATIC_CHAIN_INCOMING: Frame Registers. +* STATIC_CHAIN_INCOMING_REGNUM: Frame Registers. +* STATIC_CHAIN_REGNUM: Frame Registers. +* stdarg.h and register arguments: Register Arguments. +* stdarg.h and RT PC: RT Options. +* storage layout: Storage Layout. +* STORE_FLAG_VALUE: Misc. +* store_multiple instruction pattern: Standard Names. +* storem bug (29k): AMD29K Options. +* strcmp: C Dialect Options. +* strcpy <1>: Storage Layout. +* strcpy: C Dialect Options. +* strength-reduction: Passes. +* STRICT_ALIGNMENT: Storage Layout. +* STRICT_ARGUMENT_NAMING: Varargs. +* strict_low_part: RTL Declarations. +* string constants: Incompatibilities. +* string constants vs newline: C Dialect Options. +* STRIP_NAME_ENCODING: Sections. +* strlen: C Dialect Options. +* strlenM instruction pattern: Standard Names. +* STRUCT_VALUE: Aggregate Return. +* STRUCT_VALUE_INCOMING: Aggregate Return. +* STRUCT_VALUE_INCOMING_REGNUM: Aggregate Return. +* STRUCT_VALUE_REGNUM: Aggregate Return. +* structure passing (88k): M88K Options. +* structure value address: Aggregate Return. +* STRUCTURE_SIZE_BOUNDARY: Storage Layout. +* structures: Incompatibilities. +* structures, constructor expression: Constructors. +* structures, returning: Interface. +* stupid register allocation: Passes. +* subM3 instruction pattern: Standard Names. +* submodel options: Submodel Options. +* subreg: Regs and Memory. +* subreg and /s: Flags. +* subreg and /u: Flags. +* subreg, in strict_low_part: RTL Declarations. +* subreg, special reload handling: Regs and Memory. +* SUBREG_PROMOTED_UNSIGNED_P: Flags. +* SUBREG_PROMOTED_VAR_P: Flags. +* SUBREG_REG: Regs and Memory. +* SUBREG_WORD: Regs and Memory. +* subscripting: Subscripting. +* subscripting and function values: Subscripting. +* subtype polymorphism, C++: C++ Signatures. +* SUCCESS_EXIT_CODE: Config. +* suffixes for C++ source: Invoking G++. +* Sun installation: Sun Install. +* SUPPORTS_ONE_ONLY: Label Output. +* SUPPORTS_WEAK: Label Output. +* suppressing warnings: Warning Options. +* surprises in C++: C++ Misunderstandings. +* SVr4: M88K Options. +* SWITCH_TAKES_ARG: Driver. +* SWITCHES_NEED_SPACES: Driver. +* symbol_ref: Constants. +* symbol_ref and /u: Flags. +* symbol_ref and /v: Flags. +* symbol_ref, RTL sharing: Sharing. +* SYMBOL_REF_FLAG: Flags. +* SYMBOL_REF_FLAG, in ENCODE_SECTION_INFO: Sections. +* SYMBOL_REF_USED: Flags. +* symbolic label: Sharing. +* syntax checking: Warning Options. +* synthesized methods, warning: Warning Options. +* sys_siglist: Config. +* SYSTEM_INCLUDE_DIR: Driver. +* t-TARGET: Target Fragment. +* tablejump instruction pattern: Standard Names. +* tagging insns: Tagging Insns. +* tail recursion optimization: Passes. +* target description macros: Target Macros. +* target machine, specifying: Target Options. +* target makefile fragment: Target Fragment. +* target options: Target Options. +* target specifications: Run-time Target. +* target-parameter-dependent code: Passes. +* TARGET_BELL: Type Layout. +* TARGET_BS: Type Layout. +* TARGET_CR: Type Layout. +* TARGET_EDOM: Library Calls. +* TARGET_FF: Type Layout. +* TARGET_FLOAT_FORMAT: Storage Layout. +* TARGET_MEM_FUNCTIONS: Library Calls. +* TARGET_NEWLINE: Type Layout. +* TARGET_OPTIONS: Run-time Target. +* TARGET_SWITCHES: Run-time Target. +* TARGET_TAB: Type Layout. +* TARGET_VERSION: Run-time Target. +* TARGET_VT: Type Layout. +* TCmode: Machine Modes. +* tcov: Debugging Options. +* template debugging: Warning Options. +* template instantiation: Template Instantiation. +* temporaries, lifetime of: Temporaries. +* termination routines: Initialization. +* text_section: Sections. +* TEXT_SECTION_ASM_OP: Sections. +* TFmode: Machine Modes. +* threads, Objective C: Installation. +* thunks: Nested Functions. +* TImode: Machine Modes. +* tiny data section on the H8/300H: Function Attributes. +* tm.h macros: Target Macros. +* TMPDIR: Environment Variables. +* top level of compiler: Passes. +* traditional C language: C Dialect Options. +* TRADITIONAL_RETURN_FLOAT: Scalar Return. +* TRAMPOLINE_ALIGNMENT: Trampolines. +* TRAMPOLINE_SECTION: Trampolines. +* TRAMPOLINE_SIZE: Trampolines. +* TRAMPOLINE_TEMPLATE: Trampolines. +* trampolines for nested functions: Trampolines. +* TRANSFER_FROM_TRAMPOLINE: Trampolines. +* TRULY_NOOP_TRUNCATION: Misc. +* truncate: Conversions. +* truncMN2 instruction pattern: Standard Names. +* tstM instruction pattern: Standard Names. +* type abstraction, C++: C++ Signatures. +* type alignment: Alignment. +* type attributes: Type Attributes. +* typedef names as function parameters: Incompatibilities. +* typeof: Typeof. +* udiv: Arithmetic. +* UDIVDI3_LIBCALL: Library Calls. +* udivM3 instruction pattern: Standard Names. +* udivmodM4 instruction pattern: Standard Names. +* UDIVSI3_LIBCALL: Library Calls. +* Ultrix calling convention: Interoperation. +* umax: Arithmetic. +* umaxM3 instruction pattern: Standard Names. +* umin: Arithmetic. +* uminM3 instruction pattern: Standard Names. +* umod: Arithmetic. +* UMODDI3_LIBCALL: Library Calls. +* umodM3 instruction pattern: Standard Names. +* UMODSI3_LIBCALL: Library Calls. +* umulhisi3 instruction pattern: Standard Names. +* umulM3_highpart instruction pattern: Standard Names. +* umulqihi3 instruction pattern: Standard Names. +* umulsidi3 instruction pattern: Standard Names. +* unchanging: Flags. +* unchanging, in call_insn: Flags. +* unchanging, in insn: Flags. +* unchanging, in reg and mem: Flags. +* unchanging, in subreg: Flags. +* unchanging, in symbol_ref: Flags. +* undefined behavior: Bug Criteria. +* undefined function value: Bug Criteria. +* underscores in variables in macros: Naming Types. +* underscores, avoiding (88k): M88K Options. +* union, casting to a: Cast to Union. +* unions: Incompatibilities. +* unions, returning: Interface. +* UNIQUE_SECTION: Sections. +* UNIQUE_SECTION_P: Sections. +* UNITS_PER_WORD: Storage Layout. +* UNKNOWN_FLOAT_FORMAT: Storage Layout. +* unreachable code: Passes. +* unresolved references and -nodefaultlibs: Link Options. +* unresolved references and -nostdlib: Link Options. +* unshare_all_rtl: Sharing. +* unsigned division: Arithmetic. +* unsigned greater than: Comparisons. +* unsigned less than: Comparisons. +* unsigned minimum and maximum: Arithmetic. +* unsigned_fix: Conversions. +* unsigned_float: Conversions. +* unspec: Side Effects. +* unspec_volatile: Side Effects. +* untyped_call instruction pattern: Standard Names. +* untyped_return instruction pattern: Standard Names. +* use: Side Effects. +* USE_C_ALLOCA: Config. +* USE_PROTOTYPES: Config. +* used: Flags. +* used, in symbol_ref: Flags. +* USER_LABEL_PREFIX: Instruction Output. +* USG: Config. +* V in constraint: Simple Constraints. +* V850 Options: V850 Options. +* VALID_MACHINE_DECL_ATTRIBUTE: Misc. +* VALID_MACHINE_TYPE_ATTRIBUTE: Misc. +* value after longjmp: Global Reg Vars. +* values, returned by functions: Scalar Return. +* varargs implementation: Varargs. +* varargs.h and RT PC: RT Options. +* variable addressability on the M32R/D: Variable Attributes. +* variable alignment: Alignment. +* variable attributes: Variable Attributes. +* variable number of arguments: Macro Varargs. +* variable-length array scope: Variable Length. +* variable-length arrays: Variable Length. +* variables in specified registers: Explicit Reg Vars. +* variables, local, in macros: Naming Types. +* Vax calling convention: Interoperation. +* VAX options: VAX Options. +* VAX_FLOAT_FORMAT: Storage Layout. +* VAXCRTL: VMS Misc. +* VIRTUAL_INCOMING_ARGS_REGNUM: Regs and Memory. +* VIRTUAL_OUTGOING_ARGS_REGNUM: Regs and Memory. +* VIRTUAL_STACK_DYNAMIC_REGNUM: Regs and Memory. +* VIRTUAL_STACK_VARS_REGNUM: Regs and Memory. +* VMS: Config. +* VMS and case sensitivity: VMS Misc. +* VMS and include files: Include Files and VMS. +* VMS installation: VMS Install. +* void pointers, arithmetic: Pointer Arith. +* void, size of pointer to: Pointer Arith. +* VOIDmode: Machine Modes. +* volatil: Flags. +* volatil, in insn: Flags. +* volatil, in mem: Flags. +* volatil, in reg: Flags. +* volatil, in symbol_ref: Flags. +* volatile applied to function: Function Attributes. +* volatile memory references: Flags. +* voting between constraint alternatives: Class Preferences. +* warning for comparison of signed and unsigned values: Warning Options. +* warning for overloaded virtual fn: Warning Options. +* warning for reordering of member initializers: Warning Options. +* warning for synthesized methods: Warning Options. +* warning messages: Warning Options. +* warnings vs errors: Warnings and Errors. +* WCHAR_TYPE: Type Layout. +* WCHAR_TYPE_SIZE: Type Layout. +* weak attribute: Function Attributes. +* which_alternative: Output Statement. +* whitespace: Incompatibilities. +* WIDEST_HARDWARE_FP_SIZE: Type Layout. +* word_mode: Machine Modes. +* WORD_REGISTER_OPERATIONS: Misc. +* WORD_SWITCH_TAKES_ARG: Driver. +* WORDS_BIG_ENDIAN: Storage Layout. +* WORDS_BIG_ENDIAN, effect on subreg: Regs and Memory. +* X in constraint: Simple Constraints. +* x-HOST: Host Fragment. +* XCmode: Machine Modes. +* XCOFF_DEBUGGING_INFO: DBX Options. +* XEXP: Accessors. +* XFmode: Machine Modes. +* XINT: Accessors. +* xm-MACHINE.h: Config. +* xor: Arithmetic. +* xor, canonicalization of: Insn Canonicalizations. +* xorM3 instruction pattern: Standard Names. +* XSTR: Accessors. +* XVEC: Accessors. +* XVECEXP: Accessors. +* XVECLEN: Accessors. +* XWINT: Accessors. +* zero division on 88k: M88K Options. +* zero-length arrays: Zero Length. +* zero_extend: Conversions. +* zero_extendMN2 instruction pattern: Standard Names. +* zero_extract: Bit Fields. +* zero_extract, canonicalization of: Insn Canonicalizations. + + diff --git a/gnu/usr.bin/gcc/gcov-io.h b/gnu/usr.bin/gcc/gcov-io.h new file mode 100644 index 00000000000..59d802ccaed --- /dev/null +++ b/gnu/usr.bin/gcc/gcov-io.h @@ -0,0 +1,136 @@ +/* Machine-independent I/O routines for gcov. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Contributed by Bob Manson <manson@cygnus.com>. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#ifndef GCOV_IO_H +#define GCOV_IO_H +#include <stdio.h> + +/* These routines only work for signed values. */ + +/* Store a portable representation of VALUE in DEST using BYTES*8-1 bits. + Return a non-zero value if VALUE requires more than BYTES*8-1 bits + to store. */ + +static int +__store_long (value, dest, bytes) + long value; + char *dest; + int bytes; +{ + int upper_bit = (value < 0 ? 128 : 0); + int i; + + if (value < 0) + { + long oldvalue = value; + value = -value; + if (oldvalue != -value) + return 1; + } + + for(i = 0 ; i < (sizeof (value) < bytes ? sizeof (value) : bytes) ; i++) { + dest[i] = value & (i == (bytes - 1) ? 127 : 255); + value = value / 256; + } + + if (value && value != -1) + return 1; + + for(; i < bytes ; i++) + dest[i] = 0; + dest[bytes - 1] |= upper_bit; + return 0; +} + +/* Retrieve a quantity containing BYTES*8-1 bits from SOURCE and store + the result in DEST. Returns a non-zero value if the value in SOURCE + will not fit in DEST. */ + +static int +__fetch_long (dest, source, bytes) + long *dest; + char *source; + int bytes; +{ + long value = 0; + int i; + + for (i = bytes - 1; i > (sizeof (*dest) - 1); i--) + if (source[i] & (i == (bytes - 1) ? 127 : 255 )) + return 1; + + for (; i >= 0; i--) + value = value * 256 + (source[i] & (i == (bytes - 1) ? 127 : 255)); + + if ((source[bytes - 1] & 128) && (value > 0)) + value = - value; + + *dest = value; + return 0; +} + +/* Write a BYTES*8-bit quantity to FILE, portably. Returns a non-zero + value if the write fails, or if VALUE can't be stored in BYTES*8 + bits. + + Note that VALUE may not actually be large enough to hold BYTES*8 + bits, but BYTES characters will be written anyway. + + BYTES may be a maximum of 10. */ + +static int +__write_long (value, file, bytes) + long value; + FILE *file; + int bytes; +{ + char c[10]; + + if (bytes > 10 || __store_long (value, c, bytes)) + return 1; + else + return fwrite(c, 1, bytes, file) != bytes; +} + +/* Read a quantity containing BYTES bytes from FILE, portably. Return + a non-zero value if the read fails or if the value will not fit + in DEST. + + Note that DEST may not be large enough to hold all of the requested + data, but the function will read BYTES characters anyway. + + BYTES may be a maximum of 10. */ + +static int +__read_long (dest, file, bytes) + long *dest; + FILE *file; + int bytes; +{ + char c[10]; + + if (bytes > 10 || fread(c, 1, bytes, file) != bytes) + return 1; + else + return __fetch_long (dest, c, bytes); +} + +#endif diff --git a/gnu/usr.bin/gcc/gcov.c b/gnu/usr.bin/gcc/gcov.c new file mode 100644 index 00000000000..2dda0d48ee8 --- /dev/null +++ b/gnu/usr.bin/gcc/gcov.c @@ -0,0 +1,1391 @@ +/* Gcov.c: prepend line execution counts and branch probabilities to a + source file. + Copyright (C) 1990, 91, 92, 93, 94, 96, 1997 Free Software Foundation, Inc. + Contributed by James E. Wilson of Cygnus Support. + Mangled by Bob Manson of Cygnus Support. + +Gcov 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. + +Gcov 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 Gcov; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* ??? The code in final.c that produces the struct bb assumes that there is + no padding between the fields. This is not necessary true. The current + code can only be trusted if longs and pointers are the same size. */ + +/* ??? No need to print an execution count on every line, could just print + it on the first line of each block, and only print it on a subsequent + line in the same block if the count changes. */ + +/* ??? Print a list of the ten blocks with the highest execution counts, + and list the line numbers corresponding to those blocks. Also, perhaps + list the line numbers with the highest execution counts, only printing + the first if there are several which are all listed in the same block. */ + +/* ??? Should have an option to print the number of basic blocks, and the + percent of them that are covered. */ + +/* ??? Does not correctly handle the case where two .bb files refer to the + same included source file. For example, if one has a short file containing + only inline functions, which is then included in two other files, then + there will be two .bb files which refer to the include file, but there + is no way to get the total execution counts for the included file, can + only get execution counts for one or the other of the including files. */ + +#include "config.h" +#include <stdio.h> +#include "gansidecl.h" +#include <sys/types.h> +#include <sys/stat.h> + +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif + +#ifdef HAVE_STRING_H +#include <string.h> +#else +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif +#endif + +#include "gcov-io.h" + +#ifdef NEED_DECLARATION_RINDEX +extern char *rindex (); +#endif + +/* The .bb file format consists of several lists of 4-byte integers + which are the line numbers of each basic block in the file. Each + list is terminated by a zero. These lists correspond to the basic + blocks in the reconstructed program flow graph. + + A line number of -1 indicates that a source file name (padded to a + long boundary) follows. The padded file name is followed by + another -1 to make it easy to scan past file names. A -2 indicates + that a function name (padded to a long boundary) follows; the name + is followed by another -2 to make it easy to scan past the function + name. + + The .bbg file contains enough info to enable gcov to reconstruct the + program flow graph. The first word is the number of basic blocks, + the second word is the number of arcs, followed by the list of arcs + (source bb, dest bb pairs), then a -1, then the number of instrumented + arcs followed by the instrumented arcs, followed by another -1. This + is repeated for each function. + + The .da file contains the execution count for each instrumented branch. + + The .bb and .bbg files are created by giving GCC the -ftest-coverage option, + and the .da files are created when an executable compiled with + -fprofile-arcs is run. */ + +/* The functions in this file for creating and solution program flow graphs + are very similar to functions in the gcc source file profile.c. */ + +char gcov_version_string[] = "GNU gcov version 1.5\n"; + +/* This is the size of the buffer used to read in source file lines. */ + +#define STRING_SIZE 200 + +/* One copy of this structure is created for each source file mentioned in the + .bb file. */ + +struct sourcefile +{ + char *name; + int maxlineno; + struct sourcefile *next; +}; + +/* This points to the head of the sourcefile structure list. */ + +struct sourcefile *sources; + +/* One of these is dynamically created whenever we identify an arc in the + function. */ + +struct adj_list { + int source; + int target; + int arc_count; + unsigned int count_valid : 1; + unsigned int on_tree : 1; + unsigned int fake : 1; + unsigned int fall_through : 1; +#if 0 + /* Not needed for gcov, but defined in profile.c. */ + rtx branch_insn; +#endif + struct adj_list *pred_next; + struct adj_list *succ_next; +}; + +/* Count the number of basic blocks, and create an array of these structures, + one for each bb in the function. */ + +struct bb_info { + struct adj_list *succ; + struct adj_list *pred; + int succ_count; + int pred_count; + int exec_count; + unsigned int count_valid : 1; + unsigned int on_tree : 1; +#if 0 + /* Not needed for gcov, but defined in profile.c. */ + rtx first_insn; +#endif +}; + +/* When outputting branch probabilities, one of these structures is created + for each branch/call. */ + +struct arcdata +{ + int prob; + int call_insn; + struct arcdata *next; +}; + +/* Used to save the list of bb_graphs, one per function. */ + +struct bb_info_list { + /* Indexed by block number, holds the basic block graph for one function. */ + struct bb_info *bb_graph; + int num_blocks; + struct bb_info_list *next; +}; + +/* Holds a list of function basic block graphs. */ + +static struct bb_info_list *bb_graph_list = 0; + +/* Name and file pointer of the input file for the basic block graph. */ + +static char *bbg_file_name; +static FILE *bbg_file; + +/* Name and file pointer of the input file for the arc count data. */ + +static char *da_file_name; +static FILE *da_file; + +/* Name and file pointer of the input file for the basic block line counts. */ + +static char *bb_file_name; +static FILE *bb_file; + +/* Holds the entire contents of the bb_file read into memory. */ + +static char *bb_data; + +/* Size of bb_data array in longs. */ + +static long bb_data_size; + +/* Name and file pointer of the output file. */ + +static char *gcov_file_name; +static FILE *gcov_file; + +/* Name of the file mentioned on the command line. */ + +static char *input_file_name = 0; + +/* Output branch probabilities if true. */ + +static int output_branch_probs = 0; + +/* Output a gcov file if this is true. This is on by default, and can + be turned off by the -n option. */ + +static int output_gcov_file = 1; + +/* For included files, make the gcov output file name include the name of + the input source file. For example, if x.h is included in a.c, then the + output file name is a.c.x.h.gcov instead of x.h.gcov. This works only + when a single source file is specified. */ + +static int output_long_names = 0; + +/* Output summary info for each function. */ + +static int output_function_summary = 0; + +/* Object directory file prefix. This is the directory where .bb and .bbg + files are looked for, if non-zero. */ + +static char *object_directory = 0; + +/* Forward declarations. */ +static void process_args (); +static void open_files (); +static void read_files (); +static void scan_for_source_files (); +static void output_data (); +char * xmalloc (); + +int +main (argc, argv) + int argc; + char **argv; +{ + process_args (argc, argv); + + open_files (); + + read_files (); + + scan_for_source_files (); + + output_data (); + + return 0; +} + +char * +xmalloc (size) + unsigned size; +{ + register char *value = (char *) malloc (size); + if (value == 0) + { + fprintf (stderr, "error: virtual memory exhausted"); + exit (FATAL_EXIT_CODE); + } + return value; +} + +/* More 'friendly' abort that prints the line and file. + config.h can #define abort fancy_abort if you like that sort of thing. */ + +void +fancy_abort () +{ + fprintf (stderr, "Internal gcc abort.\n"); + exit (FATAL_EXIT_CODE); +} + +/* Print a usage message and exit. */ + +static void +print_usage () +{ + fprintf (stderr, "gcov [-b] [-v] [-n] [-l] [-f] [-o OBJDIR] file\n"); + exit (FATAL_EXIT_CODE); +} + +/* Parse the command line. */ + +static void +process_args (argc, argv) + int argc; + char **argv; +{ + int i; + + for (i = 1; i < argc; i++) + { + if (argv[i][0] == '-') + { + if (argv[i][1] == 'b') + output_branch_probs = 1; + else if (argv[i][1] == 'v') + fputs (gcov_version_string, stderr); + else if (argv[i][1] == 'n') + output_gcov_file = 0; + else if (argv[i][1] == 'l') + output_long_names = 1; + else if (argv[i][1] == 'f') + output_function_summary = 1; + else if (argv[i][1] == 'o' && argv[i][2] == '\0') + object_directory = argv[++i]; + else + print_usage (); + } + else if (! input_file_name) + input_file_name = argv[i]; + else + print_usage (); + } + + if (! input_file_name) + print_usage (); +} + + +/* Find and open the .bb, .da, and .bbg files. */ + +static void +open_files () +{ + int count, objdir_count; + char *cptr; + + /* Determine the names of the .bb, .bbg, and .da files. Strip off the + extension, if any, and append the new extensions. */ + count = strlen (input_file_name); + if (object_directory) + objdir_count = strlen (object_directory); + else + objdir_count = 0; + + da_file_name = xmalloc (count + objdir_count + 4); + bb_file_name = xmalloc (count + objdir_count + 4); + bbg_file_name = xmalloc (count + objdir_count + 5); + + if (object_directory) + { + strcpy (da_file_name, object_directory); + strcpy (bb_file_name, object_directory); + strcpy (bbg_file_name, object_directory); + + if (object_directory[objdir_count - 1] != '/') + { + strcat (da_file_name, "/"); + strcat (bb_file_name, "/"); + strcat (bbg_file_name, "/"); + } + + cptr = rindex (input_file_name, '/'); + if (cptr) + { + strcat (da_file_name, cptr + 1); + strcat (bb_file_name, cptr + 1); + strcat (bbg_file_name, cptr + 1); + } + else + { + strcat (da_file_name, input_file_name); + strcat (bb_file_name, input_file_name); + strcat (bbg_file_name, input_file_name); + } + } + else + { + strcpy (da_file_name, input_file_name); + strcpy (bb_file_name, input_file_name); + strcpy (bbg_file_name, input_file_name); + } + + cptr = rindex (bb_file_name, '.'); + if (cptr) + strcpy (cptr, ".bb"); + else + strcat (bb_file_name, ".bb"); + + cptr = rindex (da_file_name, '.'); + if (cptr) + strcpy (cptr, ".da"); + else + strcat (da_file_name, ".da"); + + cptr = rindex (bbg_file_name, '.'); + if (cptr) + strcpy (cptr, ".bbg"); + else + strcat (bbg_file_name, ".bbg"); + + bb_file = fopen (bb_file_name, "r"); + if (bb_file == NULL) + { + fprintf (stderr, "Could not open basic block file %s.\n", bb_file_name); + exit (FATAL_EXIT_CODE); + } + + /* If none of the functions in the file were executed, then there won't + be a .da file. Just assume that all counts are zero in this case. */ + da_file = fopen (da_file_name, "r"); + if (da_file == NULL) + { + fprintf (stderr, "Could not open data file %s.\n", da_file_name); + fprintf (stderr, "Assuming that all execution counts are zero.\n"); + } + + bbg_file = fopen (bbg_file_name, "r"); + if (bbg_file == NULL) + { + fprintf (stderr, "Could not open program flow graph file %s.\n", + bbg_file_name); + exit (FATAL_EXIT_CODE); + } + + /* Check for empty .bbg file. This indicates that there is no executable + code in this source file. */ + /* Set the EOF condition if at the end of file. */ + ungetc (getc (bbg_file), bbg_file); + if (feof (bbg_file)) + { + fprintf (stderr, "No executable code associated with file %s.\n", + input_file_name); + exit (FATAL_EXIT_CODE); + } +} + +/* Initialize a new arc. */ + +static void +init_arc (arcptr, source, target, bb_graph) + struct adj_list *arcptr; + int source, target; + struct bb_info *bb_graph; +{ + arcptr->target = target; + arcptr->source = source; + + arcptr->arc_count = 0; + arcptr->count_valid = 0; + arcptr->on_tree = 0; + arcptr->fake = 0; + arcptr->fall_through = 0; + + arcptr->succ_next = bb_graph[source].succ; + bb_graph[source].succ = arcptr; + bb_graph[source].succ_count++; + + arcptr->pred_next = bb_graph[target].pred; + bb_graph[target].pred = arcptr; + bb_graph[target].pred_count++; +} + + +/* Reverse the arcs on a arc list. */ + +static struct adj_list * +reverse_arcs (arcptr) + struct adj_list *arcptr; +{ + struct adj_list *prev = 0; + struct adj_list *next; + + for ( ; arcptr; arcptr = next) + { + next = arcptr->succ_next; + arcptr->succ_next = prev; + prev = arcptr; + } + + return prev; +} + + +/* Construct the program flow graph from the .bbg file, and read in the data + in the .da file. */ + +static void +create_program_flow_graph (bptr) + struct bb_info_list *bptr; +{ + long num_blocks, number_arcs, src, dest, flag_bits, num_arcs_per_block; + int i; + struct adj_list *arcptr; + struct bb_info *bb_graph; + + /* Read the number of blocks. */ + __read_long (&num_blocks, bbg_file, 4); + + /* Create an array of size bb number of bb_info structs. Bzero it. */ + bb_graph = (struct bb_info *) xmalloc (num_blocks + * sizeof (struct bb_info)); + bzero ((char *) bb_graph, sizeof (struct bb_info) * num_blocks); + + bptr->bb_graph = bb_graph; + bptr->num_blocks = num_blocks; + + /* Read and create each arc from the .bbg file. */ + __read_long (&number_arcs, bbg_file, 4); + for (i = 0; i < num_blocks; i++) + { + int j; + + __read_long (&num_arcs_per_block, bbg_file, 4); + for (j = 0; j < num_arcs_per_block; j++) + { + if (number_arcs-- < 0) + abort (); + + src = i; + __read_long (&dest, bbg_file, 4); + + arcptr = (struct adj_list *) xmalloc (sizeof (struct adj_list)); + init_arc (arcptr, src, dest, bb_graph); + + __read_long (&flag_bits, bbg_file, 4); + arcptr->on_tree = flag_bits & 0x1; + arcptr->fake = !! (flag_bits & 0x2); + arcptr->fall_through = !! (flag_bits & 0x4); + } + } + + if (number_arcs) + abort (); + + /* Read and ignore the -1 separating the arc list from the arc list of the + next function. */ + __read_long (&src, bbg_file, 4); + if (src != -1) + abort (); + + /* Must reverse the order of all succ arcs, to ensure that they match + the order of the data in the .da file. */ + + for (i = 0; i < num_blocks; i++) + if (bb_graph[i].succ) + bb_graph[i].succ = reverse_arcs (bb_graph[i].succ); + + /* For each arc not on the spanning tree, set its execution count from + the .da file. */ + + /* The first count in the .da file is the number of times that the function + was entered. This is the exec_count for block zero. */ + + /* This duplicates code in branch_prob in profile.c. */ + + for (i = 0; i < num_blocks; i++) + for (arcptr = bb_graph[i].succ; arcptr; arcptr = arcptr->succ_next) + if (! arcptr->on_tree) + { + long tmp_count = 0;; + if (da_file && __read_long (&tmp_count, da_file, 8)) + abort(); + + arcptr->arc_count = tmp_count; + arcptr->count_valid = 1; + bb_graph[i].succ_count--; + bb_graph[arcptr->target].pred_count--; + } +} + +static void +solve_program_flow_graph (bptr) + struct bb_info_list *bptr; +{ + int passes, changes, total; + int i; + struct adj_list *arcptr; + struct bb_info *bb_graph; + int num_blocks; + + num_blocks = bptr->num_blocks; + bb_graph = bptr->bb_graph; + + /* For every block in the file, + - if every exit/entrance arc has a known count, then set the block count + - if the block count is known, and every exit/entrance arc but one has + a known execution count, then set the count of the remaining arc + + As arc counts are set, decrement the succ/pred count, but don't delete + the arc, that way we can easily tell when all arcs are known, or only + one arc is unknown. */ + + /* The order that the basic blocks are iterated through is important. + Since the code that finds spanning trees starts with block 0, low numbered + arcs are put on the spanning tree in preference to high numbered arcs. + Hence, most instrumented arcs are at the end. Graph solving works much + faster if we propagate numbers from the end to the start. + + This takes an average of slightly more than 3 passes. */ + + changes = 1; + passes = 0; + while (changes) + { + passes++; + changes = 0; + + for (i = num_blocks - 1; i >= 0; i--) + { + if (! bb_graph[i].count_valid) + { + if (bb_graph[i].succ_count == 0) + { + total = 0; + for (arcptr = bb_graph[i].succ; arcptr; + arcptr = arcptr->succ_next) + total += arcptr->arc_count; + bb_graph[i].exec_count = total; + bb_graph[i].count_valid = 1; + changes = 1; + } + else if (bb_graph[i].pred_count == 0) + { + total = 0; + for (arcptr = bb_graph[i].pred; arcptr; + arcptr = arcptr->pred_next) + total += arcptr->arc_count; + bb_graph[i].exec_count = total; + bb_graph[i].count_valid = 1; + changes = 1; + } + } + if (bb_graph[i].count_valid) + { + if (bb_graph[i].succ_count == 1) + { + total = 0; + /* One of the counts will be invalid, but it is zero, + so adding it in also doesn't hurt. */ + for (arcptr = bb_graph[i].succ; arcptr; + arcptr = arcptr->succ_next) + total += arcptr->arc_count; + /* Calculate count for remaining arc by conservation. */ + total = bb_graph[i].exec_count - total; + /* Search for the invalid arc, and set its count. */ + for (arcptr = bb_graph[i].succ; arcptr; + arcptr = arcptr->succ_next) + if (! arcptr->count_valid) + break; + if (! arcptr) + abort (); + arcptr->count_valid = 1; + arcptr->arc_count = total; + bb_graph[i].succ_count--; + + bb_graph[arcptr->target].pred_count--; + changes = 1; + } + if (bb_graph[i].pred_count == 1) + { + total = 0; + /* One of the counts will be invalid, but it is zero, + so adding it in also doesn't hurt. */ + for (arcptr = bb_graph[i].pred; arcptr; + arcptr = arcptr->pred_next) + total += arcptr->arc_count; + /* Calculate count for remaining arc by conservation. */ + total = bb_graph[i].exec_count - total; + /* Search for the invalid arc, and set its count. */ + for (arcptr = bb_graph[i].pred; arcptr; + arcptr = arcptr->pred_next) + if (! arcptr->count_valid) + break; + if (! arcptr) + abort (); + arcptr->count_valid = 1; + arcptr->arc_count = total; + bb_graph[i].pred_count--; + + bb_graph[arcptr->source].succ_count--; + changes = 1; + } + } + } + } + + /* If the graph has been correctly solved, every block will have a + succ and pred count of zero. */ + for (i = 0; i < num_blocks; i++) + if (bb_graph[i].succ_count || bb_graph[i].pred_count) + abort (); +} + + +static void +read_files () +{ + struct stat buf; + struct bb_info_list *list_end = 0; + struct bb_info_list *b_ptr; + long total, first_time; + + /* Read and ignore the first word of the .da file, which is the count of + how many numbers follow. */ + if (da_file && __read_long (&total, da_file, 8)) + abort(); + + while (! feof (bbg_file)) + { + b_ptr = (struct bb_info_list *) xmalloc (sizeof (struct bb_info_list)); + + b_ptr->next = 0; + if (list_end) + list_end->next = b_ptr; + else + bb_graph_list = b_ptr; + list_end = b_ptr; + + /* Read in the data in the .bbg file and reconstruct the program flow + graph for one function. */ + create_program_flow_graph (b_ptr, first_time); + + /* Set the EOF condition if at the end of file. */ + ungetc (getc (bbg_file), bbg_file); + } + + /* Check to make sure the .da file data is valid. */ + + if (da_file) + { + if (feof (da_file)) + fprintf (stderr, ".da file contents exhausted too early\n"); + /* Should be at end of file now. */ + if (__read_long (&total, da_file, 8) == 0) + fprintf (stderr, ".da file contents not exhausted\n"); + } + + /* Calculate all of the basic block execution counts and branch + taken probabilities. */ + + for (b_ptr = bb_graph_list; b_ptr; b_ptr = b_ptr->next) + solve_program_flow_graph (b_ptr); + + /* Read in all of the data from the .bb file. This info will be accessed + sequentially twice. */ + stat (bb_file_name, &buf); + bb_data_size = buf.st_size / 4; + + bb_data = (char *) xmalloc ((unsigned) buf.st_size); + fread (bb_data, sizeof (char), buf.st_size, bb_file); + + fclose (bb_file); + if (da_file) + fclose (da_file); + fclose (bbg_file); +} + + +/* Scan the data in the .bb file to find all source files referenced, + and the largest line number mentioned in each one. */ + +static void +scan_for_source_files () +{ + struct sourcefile *s_ptr; + char *ptr; + int count; + long line_num; + + /* Search the bb_data to find: + 1) The number of sources files contained herein, and + 2) The largest line number for each source file. */ + + ptr = bb_data; + sources = 0; + for (count = 0; count < bb_data_size; count++) + { + __fetch_long (&line_num, ptr, 4); + ptr += 4; + if (line_num == -1) + { + /* A source file name follows. Check to see if we already have + a sourcefile structure for this file. */ + s_ptr = sources; + while (s_ptr && strcmp (s_ptr->name, ptr)) + s_ptr = s_ptr->next; + + if (s_ptr == 0) + { + /* No sourcefile structure for this file name exists, create + a new one, and append it to the front of the sources list. */ + s_ptr = (struct sourcefile *) xmalloc (sizeof(struct sourcefile)); + s_ptr->name = xmalloc (strlen ((char *) ptr) + 1); + strcpy (s_ptr->name, (char *) ptr); + s_ptr->maxlineno = 0; + s_ptr->next = sources; + sources = s_ptr; + } + + /* Scan past the file name. */ + { + long delim; + do { + count++; + __fetch_long (&delim, ptr, 4); + ptr += 4; + } while (delim != line_num); + } + } + else if (line_num == -2) + { + long delim; + + /* A function name follows. Ignore it. */ + do { + count++; + __fetch_long (&delim, ptr, 4); + ptr += 4; + } while (delim != line_num); + } + /* There will be a zero before the first file name, in which case s_ptr + will still be uninitialized. So, only try to set the maxlineno + field if line_num is non-zero. */ + else if (line_num > 0) + { + if (s_ptr->maxlineno <= line_num) + s_ptr->maxlineno = line_num + 1; + } + else if (line_num < 0) + { + /* Don't know what this is, but it's garbage. */ + abort(); + } + } +} + +/* For calculating coverage at the function level. */ + +static int function_source_lines; +static int function_source_lines_executed; +static int function_branches; +static int function_branches_executed; +static int function_branches_taken; +static int function_calls; +static int function_calls_executed; +static char *function_name; + +/* Calculate the branch taken probabilities for all arcs branches at the + end of this block. */ + +static void +calculate_branch_probs (current_graph, block_num, branch_probs, last_line_num) + struct bb_info_list *current_graph; + int block_num; + struct arcdata **branch_probs; + int last_line_num; +{ + int total; + struct adj_list *arcptr; + struct arcdata *end_ptr, *a_ptr; + + total = current_graph->bb_graph[block_num].exec_count; + for (arcptr = current_graph->bb_graph[block_num].succ; arcptr; + arcptr = arcptr->succ_next) + { + /* Ignore fall through arcs as they aren't really branches. */ + + if (arcptr->fall_through) + continue; + + a_ptr = (struct arcdata *) xmalloc (sizeof (struct arcdata)); + if (total == 0) + a_ptr->prob = -1; + else + a_ptr->prob = ((arcptr->arc_count * 100) + (total >> 1)) / total; + a_ptr->call_insn = arcptr->fake; + + if (output_function_summary) + { + if (a_ptr->call_insn) + { + function_calls++; + if (a_ptr->prob != -1) + function_calls_executed++; + } + else + { + function_branches++; + if (a_ptr->prob != -1) + function_branches_executed++; + if (a_ptr->prob > 0) + function_branches_taken++; + } + } + + /* Append the new branch to the end of the list. */ + a_ptr->next = 0; + if (! branch_probs[last_line_num]) + branch_probs[last_line_num] = a_ptr; + else + { + end_ptr = branch_probs[last_line_num]; + while (end_ptr->next != 0) + end_ptr = end_ptr->next; + end_ptr->next = a_ptr; + } + } +} + +/* Output summary info for a function. */ + +static void +function_summary () +{ + if (function_source_lines) + fprintf (stdout, "%6.2lf%% of %d source lines executed in function %s\n", + (((double) function_source_lines_executed / function_source_lines) + * 100), function_source_lines, function_name); + else + fprintf (stdout, "No executable source lines in function %s\n", + function_name); + + if (output_branch_probs) + { + if (function_branches) + { + fprintf (stdout, "%6.2lf%% of %d branches executed in function %s\n", + (((double) function_branches_executed / function_branches) + * 100), function_branches, function_name); + fprintf (stdout, + "%6.2lf%% of %d branches taken at least once in function %s\n", + (((double) function_branches_taken / function_branches) + * 100), function_branches, function_name); + } + else + fprintf (stdout, "No branches in function %s\n", function_name); + if (function_calls) + fprintf (stdout, "%6.2lf%% of %d calls executed in function %s\n", + (((double) function_calls_executed / function_calls) + * 100), function_calls, function_name); + else + fprintf (stdout, "No calls in function %s\n", function_name); + } +} + +/* Calculate line execution counts, and output the data to a .tcov file. */ + +static void +output_data () +{ + /* When scanning data, this is true only if the data applies to the + current source file. */ + int this_file; + /* An array indexed by line number which indicates how many times that line + was executed. */ + long *line_counts; + /* An array indexed by line number which indicates whether the line was + present in the bb file (i.e. whether it had code associate with it). + Lines never executed are those which both exist, and have zero execution + counts. */ + char *line_exists; + /* An array indexed by line number, which contains a list of branch + probabilities, one for each branch on that line. */ + struct arcdata **branch_probs; + struct sourcefile *s_ptr; + char *source_file_name; + FILE *source_file; + struct bb_info_list *current_graph; + int count; + char *cptr; + long block_num; + long line_num; + long last_line_num; + int i; + struct arcdata *a_ptr; + /* Buffer used for reading in lines from the source file. */ + char string[STRING_SIZE]; + /* For calculating coverage at the file level. */ + int total_source_lines; + int total_source_lines_executed; + int total_branches; + int total_branches_executed; + int total_branches_taken; + int total_calls; + int total_calls_executed; + + /* Now, for each source file, allocate an array big enough to hold a count + for each line. Scan through the bb_data, and when the file name matches + the current file name, then for each following line number, increment + the line number execution count indicated by the execution count of + the appropriate basic block. */ + + for (s_ptr = sources; s_ptr; s_ptr = s_ptr->next) + { + /* If this is a relative file name, and an object directory has been + specified, then make it relative to the object directory name. */ + if (*s_ptr->name != '/' && object_directory != 0 + && *object_directory != '\0') + { + int objdir_count = strlen (object_directory); + source_file_name = xmalloc (objdir_count + strlen (s_ptr->name) + 2); + strcpy (source_file_name, object_directory); + if (object_directory[objdir_count - 1] != '/') + source_file_name[objdir_count++] = '/'; + strcpy (source_file_name + objdir_count, s_ptr->name); + } + else + source_file_name = s_ptr->name; + + line_counts = (long *) xmalloc (sizeof (long) * s_ptr->maxlineno); + bzero ((char *) line_counts, sizeof (long) * s_ptr->maxlineno); + line_exists = xmalloc (s_ptr->maxlineno); + bzero (line_exists, s_ptr->maxlineno); + if (output_branch_probs) + { + branch_probs = (struct arcdata **) xmalloc (sizeof (struct arcdata **) + * s_ptr->maxlineno); + bzero ((char *) branch_probs, + sizeof (struct arcdata **) * s_ptr->maxlineno); + } + + /* There will be a zero at the beginning of the bb info, before the + first list of line numbers, so must initialize block_num to 0. */ + block_num = 0; + this_file = 0; + current_graph = 0; + { + /* Pointer into the bb_data, incremented while scanning the data. */ + char *ptr = bb_data; + for (count = 0; count < bb_data_size; count++) + { + long delim; + + __fetch_long (&line_num, ptr, 4); + ptr += 4; + if (line_num == -1) + { + /* Marks the beginning of a file name. Check to see whether + this is the filename we are currently collecting data for. */ + + if (strcmp (s_ptr->name, ptr)) + this_file = 0; + else + this_file = 1; + + /* Scan past the file name. */ + do { + count++; + __fetch_long (&delim, ptr, 4); + ptr += 4; + } while (delim != line_num); + } + else if (line_num == -2) + { + /* Marks the start of a new function. Advance to the next + program flow graph. */ + + if (! current_graph) + current_graph = bb_graph_list; + else + { + if (block_num == current_graph->num_blocks - 1) + /* Last block falls through to exit. */ + ; + else if (block_num == current_graph->num_blocks - 2) + { + if (output_branch_probs && this_file) + calculate_branch_probs (current_graph, block_num, + branch_probs, last_line_num); + } + else + { + fprintf (stderr, + "didn't use all bb entries of graph, function %s\n", + function_name); + fprintf (stderr, "block_num = %d, num_blocks = %d\n", + block_num, current_graph->num_blocks); + } + + current_graph = current_graph->next; + block_num = 0; + + if (output_function_summary && this_file) + function_summary (); + } + + if (output_function_summary) + { + function_source_lines = 0; + function_source_lines_executed = 0; + function_branches = 0; + function_branches_executed = 0; + function_branches_taken = 0; + function_calls = 0; + function_calls_executed = 0; + } + + /* Save the function name for later use. */ + function_name = ptr; + + /* Scan past the file name. */ + do { + count++; + __fetch_long (&delim, ptr, 4); + ptr += 4; + } while (delim != line_num); + } + else if (line_num == 0) + { + /* Marks the end of a block. */ + + if (block_num >= current_graph->num_blocks) + { + fprintf (stderr, "ERROR: too many basic blocks in .bb file %s\n", + function_name); + abort (); + } + + if (output_branch_probs && this_file) + calculate_branch_probs (current_graph, block_num, + branch_probs, last_line_num); + + block_num++; + } + else if (this_file) + { + if (output_function_summary) + { + if (line_exists[line_num] == 0) + function_source_lines++; + if (line_counts[line_num] == 0 + && current_graph->bb_graph[block_num].exec_count != 0) + function_source_lines_executed++; + } + + /* Accumulate execution data for this line number. */ + + line_counts[line_num] + += current_graph->bb_graph[block_num].exec_count; + line_exists[line_num] = 1; + last_line_num = line_num; + } + } + } + + if (output_function_summary && this_file) + function_summary (); + + /* Calculate summary test coverage statistics. */ + + total_source_lines = 0; + total_source_lines_executed = 0; + total_branches = 0; + total_branches_executed = 0; + total_branches_taken = 0; + total_calls = 0; + total_calls_executed = 0; + + for (count = 1; count < s_ptr->maxlineno; count++) + { + if (line_exists[count]) + { + total_source_lines++; + if (line_counts[count]) + total_source_lines_executed++; + } + if (output_branch_probs) + { + for (a_ptr = branch_probs[count]; a_ptr; a_ptr = a_ptr->next) + { + if (a_ptr->call_insn) + { + total_calls++; + if (a_ptr->prob != -1) + total_calls_executed++; + } + else + { + total_branches++; + if (a_ptr->prob != -1) + total_branches_executed++; + if (a_ptr->prob > 0) + total_branches_taken++; + } + } + } + } + + if (total_source_lines) + fprintf (stdout, + "%6.2lf%% of %d source lines executed in file %s\n", + (((double) total_source_lines_executed / total_source_lines) + * 100), total_source_lines, source_file_name); + else + fprintf (stdout, "No executable source lines in file %s\n", + source_file_name); + + if (output_branch_probs) + { + if (total_branches) + { + fprintf (stdout, "%6.2lf%% of %d branches executed in file %s\n", + (((double) total_branches_executed / total_branches) + * 100), total_branches, source_file_name); + fprintf (stdout, + "%6.2lf%% of %d branches taken at least once in file %s\n", + (((double) total_branches_taken / total_branches) + * 100), total_branches, source_file_name); + } + else + fprintf (stdout, "No branches in file %s\n", source_file_name); + if (total_calls) + fprintf (stdout, "%6.2lf%% of %d calls executed in file %s\n", + (((double) total_calls_executed / total_calls) + * 100), total_calls, source_file_name); + else + fprintf (stdout, "No calls in file %s\n", source_file_name); + } + + if (output_gcov_file) + { + /* Now the statistics are ready. Read in the source file one line + at a time, and output that line to the gcov file preceded by + its execution count if non zero. */ + + source_file = fopen (source_file_name, "r"); + if (source_file == NULL) + { + fprintf (stderr, "Could not open source file %s.\n", + source_file_name); + free (line_counts); + free (line_exists); + continue; + } + + count = strlen (source_file_name); + cptr = rindex (s_ptr->name, '/'); + if (cptr) + cptr = cptr + 1; + else + cptr = s_ptr->name; + if (output_long_names && strcmp (cptr, input_file_name)) + { + gcov_file_name = xmalloc (count + 7 + strlen (input_file_name)); + + cptr = rindex (input_file_name, '/'); + if (cptr) + strcpy (gcov_file_name, cptr + 1); + else + strcpy (gcov_file_name, input_file_name); + + strcat (gcov_file_name, "."); + + cptr = rindex (source_file_name, '/'); + if (cptr) + strcat (gcov_file_name, cptr + 1); + else + strcat (gcov_file_name, source_file_name); + } + else + { + gcov_file_name = xmalloc (count + 6); + cptr = rindex (source_file_name, '/'); + if (cptr) + strcpy (gcov_file_name, cptr + 1); + else + strcpy (gcov_file_name, source_file_name); + } + + /* Don't strip off the ending for compatibility with tcov, since + this results in confusion if there is more than one file with + the same basename, e.g. tmp.c and tmp.h. */ + strcat (gcov_file_name, ".gcov"); + + gcov_file = fopen (gcov_file_name, "w"); + + if (gcov_file == NULL) + { + fprintf (stderr, "Could not open output file %s.\n", + gcov_file_name); + fclose (source_file); + free (line_counts); + free (line_exists); + continue; + } + + fprintf (stdout, "Creating %s.\n", gcov_file_name); + + for (count = 1; count < s_ptr->maxlineno; count++) + { + char *retval; + int len; + + retval = fgets (string, STRING_SIZE, source_file); + + /* For lines which don't exist in the .bb file, print nothing + before the source line. For lines which exist but were never + executed, print ###### before the source line. Otherwise, + print the execution count before the source line. */ + /* There are 16 spaces of indentation added before the source + line so that tabs won't be messed up. */ + if (line_exists[count]) + { + if (line_counts[count]) + fprintf (gcov_file, "%12d %s", line_counts[count], + string); + else + fprintf (gcov_file, " ###### %s", string); + } + else + fprintf (gcov_file, "\t\t%s", string); + + /* In case the source file line is larger than our buffer, keep + reading and outputting lines until we get a newline. */ + len = strlen (string); + while ((len == 0 || string[strlen (string) - 1] != '\n') + && retval != NULL) + { + retval = fgets (string, STRING_SIZE, source_file); + fputs (string, gcov_file); + } + + if (output_branch_probs) + { + for (i = 0, a_ptr = branch_probs[count]; a_ptr; + a_ptr = a_ptr->next, i++) + { + if (a_ptr->call_insn) + { + if (a_ptr->prob == -1) + fprintf (gcov_file, "call %d never executed\n", i); + else + fprintf (gcov_file, + "call %d returns = %d%%\n", + i, 100 - a_ptr->prob); + } + else + { + if (a_ptr->prob == -1) + fprintf (gcov_file, "branch %d never executed\n", + i); + else + fprintf (gcov_file, "branch %d taken = %d%%\n", i, + a_ptr->prob); + } + } + } + + /* Gracefully handle errors while reading the source file. */ + if (retval == NULL) + { + fprintf (stderr, + "Unexpected EOF while reading source file %s.\n", + source_file_name); + break; + } + } + + /* Handle all remaining source lines. There may be lines + after the last line of code. */ + + { + char *retval = fgets (string, STRING_SIZE, source_file); + while (retval != NULL) + { + int len; + + fprintf (gcov_file, "\t\t%s", string); + + /* In case the source file line is larger than our buffer, keep + reading and outputting lines until we get a newline. */ + len = strlen (string); + while ((len == 0 || string[strlen (string) - 1] != '\n') + && retval != NULL) + { + retval = fgets (string, STRING_SIZE, source_file); + fputs (string, gcov_file); + } + + retval = fgets (string, STRING_SIZE, source_file); + } + } + + fclose (source_file); + fclose (gcov_file); + } + + free (line_counts); + free (line_exists); + } +} diff --git a/gnu/usr.bin/gcc/gcov.texi b/gnu/usr.bin/gcc/gcov.texi new file mode 100644 index 00000000000..9c6d77da7d4 --- /dev/null +++ b/gnu/usr.bin/gcc/gcov.texi @@ -0,0 +1,344 @@ +@c Copyright (C) 1996, 1997 Free Software Foundation, Inc. +@c This is part of the GCC manual. +@c For copying conditions, see the file gcc.texi. + +@node Gcov +@chapter @code{gcov}: a Test Coverage Program + +@code{gcov} is a tool you can use in conjunction with @sc{gnu} CC to +test code coverage in your programs. + +This chapter describes version 1.5 of @code{gcov}. + +@menu +* Gcov Intro:: Introduction to gcov. +* Invoking Gcov:: How to use gcov. +* Gcov and Optimization:: Using gcov with GCC optimization. +* Gcov Data Files:: The files used by gcov. +@end menu + +@node Gcov Intro +@section Introduction to @code{gcov} + +@code{gcov} is a test coverage program. Use it in concert with @sc{gnu} +CC to analyze your programs to help create more efficient, faster +running code. You can use @code{gcov} as a profiling tool to help +discover where your optimization efforts will best affect your code. You +can also use @code{gcov} along with the other profiling tool, +@code{gprof}, to assess which parts of your code use the greatest amount +of computing time. + +Profiling tools help you analyze your code's performance. Using a +profiler such as @code{gcov} or @code{gprof}, you can find out some +basic performance statistics, such as: + +@itemize @bullet +@item +how often each line of code executes + +@item +what lines of code are actually executed + +@item +how much computing time each section of code uses +@end itemize + +Once you know these things about how your code works when compiled, you +can look at each module to see which modules should be optimized. +@code{gcov} helps you determine where to work on optimization. + +Software developers also use coverage testing in concert with +testsuites, to make sure software is actually good enough for a release. +Testsuites can verify that a program works as expected; a coverage +program tests to see how much of the program is exercised by the +testsuite. Developers can then determine what kinds of test cases need +to be added to the testsuites to create both better testing and a better +final product. + +You should compile your code without optimization if you plan to use +@code{gcov} because the optimization, by combining some lines of code +into one function, may not give you as much information as you need to +look for `hot spots' where the code is using a great deal of computer +time. Likewise, because @code{gcov} accumulates statistics by line (at +the lowest resolution), it works best with a programming style that +places only one statement on each line. If you use complicated macros +that expand to loops or to other control structures, the statistics are +less helpful---they only report on the line where the macro call +appears. If your complex macros behave like functions, you can replace +them with inline functions to solve this problem. + +@code{gcov} creates a logfile called @file{@var{sourcefile}.gcov} which +indicates how many times each line of a source file @file{@var{sourcefile}.c} +has executed. You can use these logfiles along with @code{gprof} to aid +in fine-tuning the performance of your programs. @code{gprof} gives +timing information you can use along with the information you get from +@code{gcov}. + +@code{gcov} works only on code compiled with @sc{gnu} CC. It is not +compatible with any other profiling or test coverage mechanism. + +@node Invoking Gcov +@section Invoking gcov + +@smallexample +gcov [-b] [-v] [-n] [-l] [-f] [-o directory] @var{sourcefile} +@end smallexample + +@table @code +@item -b +Write branch frequencies to the output file, and write branch summary +info to the standard output. This option allows you to see how often +each branch in your program was taken. + +@item -v +Display the @code{gcov} version number (on the standard error stream). + +@item -n +Do not create the @code{gcov} output file. + +@item -l +Create long file names for included source files. For example, if the +header file @samp{x.h} contains code, and was included in the file +@samp{a.c}, then running @code{gcov} on the file @samp{a.c} will produce +an output file called @samp{a.c.x.h.gcov} instead of @samp{x.h.gcov}. +This can be useful if @samp{x.h} is included in multiple source files. + +@item -f +Output summaries for each function in addition to the file level summary. + +@item -o +The directory where the object files live. Gcov will search for @code{.bb}, +@code{.bbg}, and @code{.da} files in this directory. +@end table + +@need 3000 +When using @code{gcov}, you must first compile your program with two +special @sc{gnu} CC options: @samp{-fprofile-arcs -ftest-coverage}. +This tells the compiler to generate additional information needed by +gcov (basically a flow graph of the program) and also includes +additional code in the object files for generating the extra profiling +information needed by gcov. These additional files are placed in the +directory where the source code is located. + +Running the program will cause profile output to be generated. For each +source file compiled with -fprofile-arcs, an accompanying @code{.da} +file will be placed in the source directory. + +Running @code{gcov} with your program's source file names as arguments +will now produce a listing of the code along with frequency of execution +for each line. For example, if your program is called @samp{tmp.c}, this +is what you see when you use the basic @code{gcov} facility: + +@smallexample +$ gcc -fprofile-arcs -ftest-coverage tmp.c +$ a.out +$ gcov tmp.c + 87.50% of 8 source lines executed in file tmp.c +Creating tmp.c.gcov. +@end smallexample + +The file @file{tmp.c.gcov} contains output from @code{gcov}. +Here is a sample: + +@smallexample + main() + @{ + 1 int i, total; + + 1 total = 0; + + 11 for (i = 0; i < 10; i++) + 10 total += i; + + 1 if (total != 45) + ###### printf ("Failure\n"); + else + 1 printf ("Success\n"); + 1 @} +@end smallexample + +@need 450 +When you use the @samp{-b} option, your output looks like this: + +@smallexample +$ gcov -b tmp.c + 87.50% of 8 source lines executed in file tmp.c + 80.00% of 5 branches executed in file tmp.c + 80.00% of 5 branches taken at least once in file tmp.c + 50.00% of 2 calls executed in file tmp.c +Creating tmp.c.gcov. +@end smallexample + +Here is a sample of a resulting @file{tmp.c.gcov} file: + +@smallexample + main() + @{ + 1 int i, total; + + 1 total = 0; + + 11 for (i = 0; i < 10; i++) +branch 0 taken = 91% +branch 1 taken = 100% +branch 2 taken = 100% + 10 total += i; + + 1 if (total != 45) +branch 0 taken = 100% + ###### printf ("Failure\n"); +call 0 never executed +branch 1 never executed + else + 1 printf ("Success\n"); +call 0 returns = 100% + 1 @} +@end smallexample + +For each basic block, a line is printed after the last line of the basic +block describing the branch or call that ends the basic block. There can +be multiple branches and calls listed for a single source line if there +are multiple basic blocks that end on that line. In this case, the +branches and calls are each given a number. There is no simple way to map +these branches and calls back to source constructs. In general, though, +the lowest numbered branch or call will correspond to the leftmost construct +on the source line. + +For a branch, if it was executed at least once, then a percentage +indicating the number of times the branch was taken divided by the +number of times the branch was executed will be printed. Otherwise, the +message ``never executed'' is printed. + +For a call, if it was executed at least once, then a percentage +indicating the number of times the call returned divided by the number +of times the call was executed will be printed. This will usually be +100%, but may be less for functions call @code{exit} or @code{longjmp}, +and thus may not return everytime they are called. + +The execution counts are cumulative. If the example program were +executed again without removing the @code{.da} file, the count for the +number of times each line in the source was executed would be added to +the results of the previous run(s). This is potentially useful in +several ways. For example, it could be used to accumulate data over a +number of program runs as part of a test verification suite, or to +provide more accurate long-term information over a large number of +program runs. + +The data in the @code{.da} files is saved immediately before the program +exits. For each source file compiled with -fprofile-arcs, the profiling +code first attempts to read in an existing @code{.da} file; if the file +doesn't match the executable (differing number of basic block counts) it +will ignore the contents of the file. It then adds in the new execution +counts and finally writes the data to the file. + +@node Gcov and Optimization +@section Using @code{gcov} with GCC Optimization + +If you plan to use @code{gcov} to help optimize your code, you must +first compile your program with two special @sc{gnu} CC options: +@samp{-fprofile-arcs -ftest-coverage}. Aside from that, you can use any +other @sc{gnu} CC options; but if you want to prove that every single line +in your program was executed, you should not compile with optimization +at the same time. On some machines the optimizer can eliminate some +simple code lines by combining them with other lines. For example, code +like this: + +@smallexample +if (a != b) + c = 1; +else + c = 0; +@end smallexample + +@noindent +can be compiled into one instruction on some machines. In this case, +there is no way for @code{gcov} to calculate separate execution counts +for each line because there isn't separate code for each line. Hence +the @code{gcov} output looks like this if you compiled the program with +optimization: + +@smallexample + 100 if (a != b) + 100 c = 1; + 100 else + 100 c = 0; +@end smallexample + +The output shows that this block of code, combined by optimization, +executed 100 times. In one sense this result is correct, because there +was only one instruction representing all four of these lines. However, +the output does not indicate how many times the result was 0 and how +many times the result was 1. + +@node Gcov Data Files +@section Brief description of @code{gcov} data files + +@code{gcov} uses three files for doing profiling. The names of these +files are derived from the original @emph{source} file by substituting +the file suffix with either @code{.bb}, @code{.bbg}, or @code{.da}. All +of these files are placed in the same directory as the source file, and +contain data stored in a platform-independent method. + +The @code{.bb} and @code{.bbg} files are generated when the source file +is compiled with the @sc{gnu} CC @samp{-ftest-coverage} option. The +@code{.bb} file contains a list of source files (including headers), +functions within those files, and line numbers corresponding to each +basic block in the source file. + +The @code{.bb} file format consists of several lists of 4-byte integers +which correspond to the line numbers of each basic block in the +file. Each list is terminated by a line number of 0. A line number of -1 +is used to designate that the source file name (padded to a 4-byte +boundary and followed by another -1) follows. In addition, a line number +of -2 is used to designate that the name of a function (also padded to a +4-byte boundary and followed by a -2) follows. + +The @code{.bbg} file is used to reconstruct the program flow graph for +the source file. It contains a list of the program flow arcs (possible +branches taken from one basic block to another) for each function which, +in combination with the @code{.bb} file, enables gcov to reconstruct the +program flow. + +In the @code{.bbg} file, the format is: +@smallexample + number of basic blocks for function #0 (4-byte number) + total number of arcs for function #0 (4-byte number) + count of arcs in basic block #0 (4-byte number) + destination basic block of arc #0 (4-byte number) + flag bits (4-byte number) + destination basic block of arc #1 (4-byte number) + flag bits (4-byte number) + ... + destination basic block of arc #N (4-byte number) + flag bits (4-byte number) + count of arcs in basic block #1 (4-byte number) + destination basic block of arc #0 (4-byte number) + flag bits (4-byte number) + ... +@end smallexample + +A -1 (stored as a 4-byte number) is used to separate each function's +list of basic blocks, and to verify that the file has been read +correctly. + +The @code{.da} file is generated when a program containing object files +built with the @sc{gnu} CC @samp{-fprofile-arcs} option is executed. A +separate @code{.da} file is created for each source file compiled with +this option, and the name of the @code{.da} file is stored as an +absolute pathname in the resulting object file. This path name is +derived from the source file name by substituting a @code{.da} suffix. + +The format of the @code{.da} file is fairly simple. The first 8-byte +number is the number of counts in the file, followed by the counts +(stored as 8-byte numbers). Each count corresponds to the number of +times each arc in the program is executed. The counts are cumulative; +each time the program is executed, it attemps to combine the existing +@code{.da} files with the new counts for this invocation of the +program. It ignores the contents of any @code{.da} files whose number of +arcs doesn't correspond to the current program, and merely overwrites +them instead. + +All three of these files use the functions in @code{gcov-io.h} to store +integers; the functions in this header provide a machine-independent +mechanism for storing and retrieving data from a stream. + |