Commit Graph

238 Commits

Author SHA1 Message Date
Michael Hayes
66f7715434 libgcc2.h: Use Wtype for SItype and DWtype for DItype in prototypes.
* libgcc2.h: Use Wtype for SItype and DWtype for DItype in prototypes.
	* libgcc2.c (__absvsi2): Use Wtype and DWtype.
	(__absvdi2, __addvsi3, __addvdi3, __subvsi3): Likewise.
	(__subvdi3, __mulvsi3, __mulvdi3, __negvsi2, __negvdi2): Likewise.

From-SVN: r38314
2000-12-16 22:43:58 +00:00
Rodney Brown
2398fb2aea osf.h: Standarize copyright statement.
* config/alpha/osf.h: Standarize copyright statement.
	* config/arc/arc.h: Likewise.
	* config/arm/elf.h config/arm/coff.h config/arm/aout.h: Likewise.
	* config/arm/arm.c config/arm/arm.h: Likewise.
	* config/elxsi/elxsi.h: Likewise.
	* config/i386/sco.h: Likewise.
	* config/m68k/crds.h config/m68k/hp320.h config/m68k/lynx.h: Likewise.
	* config/m68k/m68kv4.h config/m68k/next21.h: Likewise.
	* config/m68k/sun3.h: Likewise.
	* config/m88k/dgux.h config/m88k/dguxbcs.h: Likewise.
	* config/pdp11/2bsd.h config/pdp11/pdp11.h: Likewise.
	* config/romp/romp.h: Likewise.
	* config/rs6000/aix41.h: Likewise.
	* config/sparc/sysv4.h: Likewise.
	* config/we32k/we32k.c config/we32k/we32k.h: Likewise.
	* fixinc/gnu-regex.c fixinc/gnu-regex.h: Likewise.
	* cpplib.h cppexp.c cselib.h profile.c: Likewise.
	* longlong.h: Likewise.
	* libgcc2.c: Likewise.

From-SVN: r38088
2000-12-06 18:58:25 -07:00
Chris Demetriou
a8c0159ad4 libgcc2.c (__shtab): Remove __shtab variable.
* libgcc2.c (__shtab): Remove __shtab variable.
	* libgcc-std.ver (GCC_3.0): Remove __shtab from symbol list.
	* Makefile.in (LIB2FUNCS): Remove _shtab from list of library
	members.

From-SVN: r37175
2000-10-31 17:43:16 -07:00
Kaveh R. Ghazi
8f54374ed3 Warning fixes:
* mips.h (REG_CLASS_FROM_LETTER): Cast array arg to unsigned char.

	* sparc.c (load_pic_register): Delete unused varaible.

	* libgcc2.c (__addvsi3): Delete unused variable.

	* libgcc2.h (__absvsi2, __absvdi2, __addvsi3, __addvdi3,
	__subvsi3, __subvdi3, __mulvsi3, __mulvdi3, __negvsi2,
	__negvdi2): Prototype.

	* ssa.c (apply_delayed_renames): Avoid undefined operation.

	* toplev.c (display_target_options): Make static to match
	prototype.  Delete empty declaration.

From-SVN: r36987
2000-10-20 23:32:10 +00:00
Chandrakala Chavva
3cf3728197 * libgcc2.c (_mulvsi3): Change variables u and v to a and b.
From-SVN: r36952
2000-10-19 12:25:21 -04:00
Chandrakala Chavva
3d2adde6dc Added the missing #endif.
From-SVN: r36950
2000-10-19 11:44:32 -04:00
Chandrakala Chavva
91ce572a07 Adding new option -ftrapv.
From-SVN: r36942
2000-10-18 17:33:41 -04:00
Richard Henderson
1854631bcc Makefile.in (LANG_LIB2FUNCS): Remove.
* Makefile.in (LANG_LIB2FUNCS): Remove.
        (LIB2FUNCS): Remove _pure.
        (LIB2ADD): Remove LANG_LIB2FUNCS.
        (stage_a): Don't set LANG_LIB2FUNCS.
        * libgcc2.c (__terminate): Mark noreturn.
        (__pure_virtual): Remove.
        * mklibgcc.in: Remove LIB2ADD .txt processing.

From-SVN: r36817
2000-10-09 14:13:04 -07:00
Richard Henderson
d6eacd4836 Makefile.in (LIB2FUNCS): Add _clz.
* Makefile.in (LIB2FUNCS): Add _clz.
        * libgcc2.c (__ffsdi2): Use count_trailing_zeros.
        (__clz_tab): Put in its own unit, non-static.
        * libgcc2.h: Always include longlong.h.

From-SVN: r36744
2000-10-05 22:29:56 -07:00
Richard Henderson
db2e2f480c frame.h (ia64_frame_state): Add my_psp.
* frame.h (ia64_frame_state): Add my_psp.
        * libgcc2.c (ia64_throw_helper): Add throw_sp argument.
        (__throw): Pass it in.  Don't clobber r7.
        * config/ia64/frame-ia64.c (init_ia64_reg_loc): Mark inline.
        (execute_one_ia64_descriptor) [mem_stack_v]: Sets psp.when
        and nothing to do with sp.
        (normalize_reg_loc): Use frame->my_psp.
        (frame_translate): Handle frame-pointer-less functions.  Set
        spill_base correctly, in absence of being told.
        (__build_ia64_frame_state): New sp argument.  Fill in frame->my_sp.
        (__ia64_backtrace_helper): New sp argument.  Use
        builtin_return_address instead of label addresses.
        (print_record) [mem_stack_v]: No size member.

From-SVN: r35565
2000-08-08 02:08:55 -07:00
Nick Clifton
14e7eabd24 Fix compile time warning message
From-SVN: r34947
2000-07-10 20:25:56 +00:00
Andrew Macleod
7d9d8943c9 dwarf2.h (enum dwarf_call_frame_info): Add DW_CFA_def_cfa_expression.
* dwarf2.h (enum dwarf_call_frame_info): Add
        DW_CFA_def_cfa_expression.
        * dwarf2out.c (union dw_cfi_oprnd_struct): Add a pointer to a
        dw_loc_descr_struct entry.
        (struct cfa_loc): New structure to track a CFA location.
        (lookup_cfa): Take a cfa_loc parameter instead of a reg and an offset.
        (lookup_cfa_1): Take a cfa_loc parameter instead of a reg and an
        offset, plus handle DW_CFA_def_cfa_expression.
        (def_cfa_1): Use to be dwarf2out_def_cfa, only now it uses a
        cfa_loc record.
        (dwarf2out_def_cfa): Entry point maintained for compatability.
        (dwarf_cfi_name): Add DW_CFA_def_cfa_expression.
        (cfa_reg, cfa_offset): Replace with cfa_loc record 'cfa'.
        (cfa_store_reg, cfa_store_offset): Replace with cfa_loc 'cfa_store'.
        (initial_return_save, dwarf2out_stack_adjust): Use cfa.reg, not
        cfa_reg.
        (dwarf2out_frame_debug_expr): Use new cfa_loc records. Recognize rtl
        sequences for the new DW_CFA_def_cfa_expression record.
        (dwarf2out_frame_debug): Use new variables/fields.A
        (output_cfi): Handle DW_CFA_def_cfa_expression.
        (output_cfa_loc): New function to generate a CFI record for
        DW_CFA_def_cfa_expression.
        (get_cfa_from_loc_descr): New function to get a cfa_loc record from
        a dw_loc_descr sequeunce.
        (build_loc_descr): Build a dw_loc_descr from a cfa_loc record.
        (dwarf_stack_op_name, new_loc_descr, add_loc_descr, size_of_loc_descr,
        size_of_locs, output_loc_operands, output_loc_sequence): Move into
        unwind info section.
        * frame.h (frame_state): Add base_offset and indirect fields.
        * frame-dwarf2.c (decode_stack_op): New function to interpret a
        dw_loc_descr operation.
        (execute_cfa_insn): Add support for DW_CFA_def_cfa_expression.
        (struct frame_state): Add base offset and indirect fields.
        * libgcc2.c (next_stack_level): Support indirect loading for CFA.

From-SVN: r34717
2000-06-26 16:15:07 -04:00
Richard Henderson
46327bc509 libgcc2.c (ia64_throw_helper): Use __builtin_return_address.
* libgcc2.c (ia64_throw_helper): Use __builtin_return_address.
        (__throw): Don't pass the address of a label.

        * config/ia64/ia64.c (ia64_compute_frame_size): Use
        current_function_is_leaf.
        (ia64_expand_prologue): Likewise.  Modify return_address_pointer_rtx
        instead of reg_names[RETURN_ADDRESS_REGNUM].
        (ia64_init_machine_status): Reset return_address_pointer_rtx.
        * config/ia64/ia64.h (RETURN_ADDRESS_POINTER_REGNUM): Rename
        from RETURN_ADDRESS_REGNUM.  Update all uses.
        (RETURN_ADDR_RTX): Use return_address_pointer_rtx; return
        zero instead of null on failure.
        (ELIMINABLE_REGS): Add ra->b0 elimination.
        (CAN_ELIMINATE): Update accordingly.
        (INITIAL_ELIMINATION_OFFSET): Likewise.
        (REGISTER_NAMES): Use an illegal assembler name for
        RETURN_ADDRESS_POINTER_REGNUM.

From-SVN: r34531
2000-06-13 16:36:19 -07:00
Nathan Sidwell
103c63aeb9 eh-common.h (EH_ALLOC_SIZE, [...]): New #defines.
gcc:
 	* eh-common.h (EH_ALLOC_SIZE, EH_ALLOC_ALIGN): New #defines.
	(eh_context): Add alloc_mask and alloc_buffer emergency fallback
	space.
	* libgcc2.c (__eh_alloc): Moved from cp/exception.cc. Fallback on
	emergency eh_context buffer, if malloc fails.
	(__eh_free): Moved from cp/exception.cc. Release to emergency
	eh_context buffer, if appropriate.
gcc/cp:
	* exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c

From-SVN: r34429
2000-06-06 16:38:49 +00:00
Andrew MacLeod
ce152ef836 except.c (func_eh_entry): Add emitted field.
2000-05-25  Andrew MacLeod  <amacleod@cygnus.com>
            Andrew Haley  <aph@cygnus.com>

	* except.c  (func_eh_entry): Add emitted field.
	(new_eh_region_entry): Set emitted field to 0;
	(output_exception_table_entry): Only emit previously un-emitted data,
	and send it to the eh_data section.
	(output_exception_table): Break out common parts. Output
	exception table for entire compilation unit to eh_data section.
	(output_exception_table_data): Common parts of output_exception_table.
	Send output to eh_data section.
	(output_function_exception_table): Output exception table data for
	a single function to eh_data section.
	(free_exception_table): New external to free the table.
	* except.h (free_exception_table): Add prototype.
	(output_function_exception_table): Add prototype.
	* final.c (final_end_function): Output function exception table
	for IA64_UNWIND_INFO.
	(final_scan_insn): Emit any unwind directives for an insn.

	* frame-dwarf2.c: New file containing all DWARF 2 specific code
	from frame.c.
	* frame.c: Remove all DWARF 2 specific code.
	* config/ia64/frame-ia64.c: New file.
	(gthread_stuff): Make all gthread available with
	IA64_UNWIND_INFO.
	(dwarf_fde): Define an IA64 struct for dwarf_fde.
	(__register_frame_info, __register_frame): Move to common area of file.
	(__register_frame_info_table, __register_frame_table): Move to common i
	area.
	(__deregister_frame_info, __deregister_frame): Move to common area.
	(__frame_init, find_fde): New versions for IA64_UNWIND_INFO.
	(read_uleb128): New version for ia64.
	(get_unwind_record): Read the next IA-64 unwind record.
	(read_R_record): Read a region header record.
	(process_a_b_reg_code): X record helper.
	(read_X_record): Read an X format record.
	(read_B_record): Read a B format record.
	(P3_record_types): List of record types matching the P3 format.
	(P7_record_types): List of record types matching the P7 format.
	(P8_record_types): List of record types matching the P8 format.
	(read_P_record): Read a P format record.
	(init_ia64_reg_loc): Set default fields for a register.
	(init_ia64_unwind_frame): Set defaults for all register records.
	(execute_one_ia64_descriptor): Execute one descriptor record.
	(rse_address_add): Calculate the position of a local reg in memory.
	(normalize_reg_loc): Turn a location descriptor into a memory address.
	(maybe_normalize_reg_loc): Only normalize a descriptor if it falls
	within a specified PC offset range.
	(get_real_reg_value): Given a register location, retrieve its value.
	(set_real_reg_value): Change the value of a register location.
	(copy_reg_value): Copy reg values, if needed.
	(copy_saved_reg_state): Copy all registers that need to be copied.
	(process_state_between): Normalize all frame register records that
	fall within the specified PC range.
	(frame_translate): Take a processed frame description, and turn
	everything into addresses.
	(build_ia64_frame_state ): Find and create frame state record for a PC.
	(get_personality): Get the personality routine for a given frame.
	(get_except_table): Get the exception table for a given frame.
	(record_name): Unwind record names for debugging.
	(print_record): Print and unwind record.
	(print_all_records): Print an entire unwind image.
	(__ia64_backtrace): Print a backtrace.
	(ia64_backtrace_helper): New function.
	(__register_frame_info_aux): New function.
	* config/ia64/crtend.asm (__do_frame_setup_aux): New function.

	* frame.h (enum unw_record_type): New unwind record types.
	(struct unw_p_record, unw_b_record, unw_x_record) : New unwind records.
	(struct unw_r_record, unwind_record): New unwind record structs.
	(struct unwind_info_ptr): Unwind information layout.
	(IA64_UNW_LOC_TYPE_*): Macros for different types for location
	descriptors.
	(struct ia64_reg_loc): Register location description.
	(struct ia64_frame_state): Location of all registers in a frame.
	(struct object): Add pc_base and fde_end for IA64_UNWIND_INFO.
	* libgcc2.c (__ia64_personality_v1): Personality routine.
	(__calc_caller_bsp): Calculate the bsp register for the caller's
	frame.
	(ia64_throw_helper): Figure out who to return to and set up the
	registers.
	(__throw): Throw routine.

	* output.h (assemble_eh_align, assemble_eh_label): New functions
	to generate EH info where we want it.
	(assemble_eh_integer): New function.
	* toplev.c (compile_file): Output module level exception table for
	non-ia64 targets.
	(main): Set exceptions_via_longjump and flag_new_exceptions based
	on IA64_UNWIND_INFO too.

	* varasm.c (assemble_eh_label): Generate a label via
	ASM_OUTPUT_EH_LABEL if it has been specified.
	(assemble_eh_align): Generate an alignment directive via
	ASM_OUTPUT_EH_ALIGN if it has been specified.
	(assemble_eh_label): Generate an integer value via
	ASM_OUTPUT_EH_type if they have been specified.
	* config/ia64/ia64.c (rtx_needs_barrier): Add flushrs.
	(ia64_init_builtins): Add __builtin_ia64_bsp
	and __builtin_ia64_flushrs.
	(ia64_expand_builtin): Add IA64_BUILTIN_BSP and
	IA64_BUILTIN_FLUSHRS.
	* config/ia64/ia64.h (ia64_builtins): Add IA64_BUILTIN_BSP and
	IA64_BUILTIN_FLUSHRS.

	* config/ia64/ia64.md (flushrs): New insn to flush the register
	stack.  Add to unspec list.

	* config/ia64/crtbegin.asm (frame_object): Change size.
	(__do_frame_setup_aux): New function.
	* config/ia64/crtend.asm: call __do_frame_setup_aux.
	* config/ia64/t-ia64 (LIB2ADDEH): Add.
	* Makefile.in (LIB2ADDEH): Add.
	(LIB2ADD): Use LIB2ADDEH.

Co-Authored-By: Andrew Haley <aph@cygnus.com>

From-SVN: r34169
2000-05-25 15:21:51 +00:00
Eric Christopher
b39d221a3f configure.in: Redefine inhibit_libc conditions.
* configure.in: Redefine inhibit_libc conditions.
        * libgcc2.c: Remove inhibit_libc conditional define.
        * configure: Regenerate.

From-SVN: r34126
2000-05-24 00:21:49 -06:00
Jeff Law
f7af368f25 Update to libgcc copyright exception clause.
From-SVN: r33916
2000-05-15 17:14:17 -06:00
Richard Henderson
7efe41a9d9 libgcc2.c (near eh_context_specific): Comment #endif string.
* libgcc2.c (near eh_context_specific): Comment #endif string.
        * longlong.h: Don't use strings with embedded newlines.

From-SVN: r33687
2000-05-04 16:21:33 -07:00
Richard Kenner
6da9c622a6 configure.in (alpha*-*-*): Aad config/alpha/t-alpha.
* configure.in (alpha*-*-*): Aad config/alpha/t-alpha.
	* configure: Rebuilt.
	* libgcc2.c (__fixunstfDI): Renamed from __fixunstfdi.
	(__fixunsxfDI): Renamed from __fixunsxfdi.
	(__fixunsdfDI): Renamed from __fixunsdfdi.
	(__fixunssfDI): Renamed from __fixunssfdi.
	(__floatdisf): Use proper type in REP_BIT macro.
	(__fixunsxfSI): Renamed from __fixunsxfsi.
	(__fixunsdfSI): Renamed from __fixunsdfsi.
	(__fixunssfSI): Renamed from __fixunssfsi.
	* libgcc2.h: Add cases for MIN_UNITS_PER_WORD > 4.
	Change location of macros and upper-case some names as above.
	* longlong.h ([alpha]): Use PARAMS, not __P in decl of __udiv__qrnnd.
	* config/alpha/t-alpha, config/alpha/qrnnd.asm: New files.

From-SVN: r33166
2000-04-15 12:34:38 -04:00
Jason Merrill
8034da37ce rs6000.h (DWARF_FRAME_RETURN_COLUMN): Define.
* config/rs6000/rs6000.h (DWARF_FRAME_RETURN_COLUMN): Define.
        * config/alpha/alpha.h (DWARF_FRAME_RETURN_COLUMN): Define.
        * config/sparc/sparc.h (DWARF_FRAME_RETURN_COLUMN): Define.

        * frame.h (frame_state): Revert last change.
        * frame.c (execute_cfa_insn): Just don't record the save of a CFA reg.
        * libgcc2.c (throw_helper): Revert last change.

From-SVN: r32705
2000-03-23 07:14:06 -05:00
Jason Merrill
2c84914526 Implement dwarf2 exception handling for the ARM.
* config/arm/arm.h (INCOMING_RETURN_ADDR_RTX): Define.
        (DWARF_FRAME_RETURN_COLUMN): Define.
        * config/arm/arm.c (emit_multi_reg_push): Return rtx.  Attach
        REG_FRAME_RELATED_EXPR note.
        (emit_sfm): Likewise.
        (arm_expand_prologue): Set RTX_FRAME_RELATED_P on everything.
        * dwarf2out.c (reg_save): Handle saving a register to itself.
        (dwarf2out_frame_debug_expr): Handle an intermediate cfa reg.
        * except.c (eh_regs): Don't use the static chain reg if it's
        callee-saved.
        * frame.h (frame_state): Add cfa_saved field.
        * frame.c (execute_cfa_insn): Set it.
        * libgcc2.c (throw_helper): Don't adjust sp if it's restored in
        the epilogue.
        * function.c (ARG_POINTER_CFA_OFFSET): Default to FIRST_PARM_OFFSET.
        Now takes a parm.
        (instantiate_virtual_regs): Adjust.
        * tm.texi: Adjust.
        * config/m68k/m68k.h (ARG_POINTER_CFA_OFFSET): Don't define.
        * config/ns32k/ns32k.h (ARG_POINTER_CFA_OFFSET): Don't define.
        * config/sparc/sparc.h (ARG_POINTER_CFA_OFFSET): Take a parm.

        * dwarf2out.c (reg_number): Refer to FIRST_PSEUDO_REGISTER.
        (initial_return_save): Use DWARF_FRAME_REGNUM, not reg_number.

From-SVN: r32696
2000-03-22 19:29:55 -05:00
Kaveh R. Ghazi
299b83b7fb libgcc2.h: New file.
* libgcc2.h: New file.
	* libgcc2.c: Move macros, typedefs and prototypes to libgcc2.h.

From-SVN: r32440
2000-03-09 03:39:09 +00:00
Zack Weinberg
78a0d70cdf frame.c (find_fde): Convert for loop to do-while so compiler sees it's always executed at least once.
* frame.c (find_fde): Convert for loop to do-while so compiler
	sees it's always executed at least once.
	* libgcc2.c (BBINBUFSIZE): Kill.
	(__bb_init_prg): Use fgets.
	(__bb_exit_trace_func): Don't paste strings.
	* unroll.c (unroll_loop): Initialize unroll_type, not
	unroll_number, and tweak logic to match.

	* i386.c (ix86_expand_int_movcc): Add explicit 'return 0' in
	all failure paths.
	(ix86_flags_dependant): Likewise.  Disentangle control flow.
	(ix86_sched_reorder): Break guts out to
	ix86_sched_reorder_pentium and ix86_sched_reorder_ppro.
	(ix86_sched_reorder_ppro): Initialize pair2 and insnp before
	any possible use.

	* i386.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Don't
	use string concatenation.  Don't save and restore esi.

	* fixinc/Makefile.in (fixincl.sh): Don't depend on inclhack.def.
	(machname.h): Remove script to separate file.  Use two-step
	sequence so target is not created if script fails.
	* fixinc/gen-machname.h: New file.  Handle case where no non-reserved
	identifiers are defined.
	* fixinc/fixlib.c (mn_get_regexps): Return a flag: if MN_NAME_PAT is
	an empty string, machine_name doesn't need to do anything at
	all.
	(is_cxx_header): Add more cases to regexp.
	* fixinc/fixlib.h: Update prototype.
	* fixinc/fixtests.c, fixinc/fixfixes.c: Update callers of
	mn_get_regexps.
	* fixinc/fixincl.c: Define NO_BOGOSITY.

	* fixinc/inclhack.def (no_double_slash, else_endif_label): Ifdef out.
	(hp_sysfile): Add missing comma.
	(math_exception): Put the wrapper ifdefs at the beginning and
	the end of the file.
	* fixinc/fixincl.x, fixinc/inclhack.sh: Regenerate.

From-SVN: r31744
2000-02-01 23:51:38 +00:00
Kaveh R. Ghazi
2e39bdbe4b tsystem.h: New file.
* tsystem.h: New file.

	* Makefile.in (libgcc2.a, stmp-multilib, crtbegin.o, crtend.o,
	s-crtS): Depend on tsystem.h.

	* crtstuff.c: Include tsystem.h.
	* frame.c: Likewise.
	* libgcc2.c: Likewise.

From-SVN: r31741
2000-02-01 21:30:52 +00:00
J"orn Rennecke
e09d24ffb1 calls.c (special_function_p): New argument fork_or_exec.
gcc:
	* calls.c (special_function_p): New argument fork_or_exec.
	(expand_call): When profile_arc_flag is set and the function
	is in the fork_or_exec group, call __bb_fork_func first.
	* libgcc2.c, _bb module (__bb_fork_func): New function.
	(__bb_exit_func): If fcntl F_SETLKW is available, use it to lock
	output file.
	* config/svr4.h (TARGET_HAS_F_SETLKW): Define.
	* tree.h (special_function_p): Update prototype.

gcc/cp:
	* cp/optimize.c (calls_setjmp_r): Supply new argument
	to special_function_p.

From-SVN: r31635
2000-01-26 22:27:31 +00:00
Richard Henderson
7e259f255f libgcc2.c (dwarf_reg_size_table): Size with DWARF_FRAME_REGISTERS.
* libgcc2.c (dwarf_reg_size_table): Size with DWARF_FRAME_REGISTERS.
        (throw_helper): Iterate over DWARF_FRAME_REGISTERS.

From-SVN: r31576
2000-01-23 14:33:30 -08:00
Kaveh R. Ghazi
ec6bfc9b7c crtstuff.c: If !inhibit_libc, include stdlib.h/unistd.h.
* crtstuff.c: If !inhibit_libc, include stdlib.h/unistd.h.
	Otherwise provide a declaration for atexit.
	(init_dummy): Make sure dummy call to atexit is nevertheless
	called with correct number of args.

	* frame.c: Update comments referring to other files.

	* libgcc2.c: Likewise.

From-SVN: r31124
1999-12-29 21:22:16 +00:00
Jakub Jelinek
996ed075bd h8300.h (TARGET_H8300H, [...]): Make sure UNITS_PER_WORD and BITS_PER_WORD are compile time constants when...
* config/h8300/h8300.h (TARGET_H8300H, TARGET_H8300S): Make sure
	UNITS_PER_WORD and BITS_PER_WORD are compile time constants when
	compiling libgcc2.
	* config/mips/mips.h (TARGET_64BIT): Likewise.
	* config/rs6000/rs6000.h (TARGET_POWERPC64): Likewise.
	* libgcc2.c: Use {,U}{HW,W,DW}type and DWunion everywhere instead
	of {SI,DI}type and DIunion.  Define these types to QI/HI modes on
	dsps.  Give routines proper names if SI/DI modes are not used.
	* longlong.h: Use DWunion instead of DIunion.

From-SVN: r31095
1999-12-27 09:34:45 +01:00
Kaveh R. Ghazi
3e7d8ef1a6 gthr-single.h (__gthread_active_p): Add prototype arguments.
* gthr-single.h (__gthread_active_p): Add prototype arguments.

	* libgcc2.c (__udivmoddi4): Remove unnecessary decls.
	(__dummy, __builtin_saveregs, __bb_exit_trace_func, __bb_init_prg,
	__bb_trace_func, __bb_trace_func_ret, __bb_trace_ret,
	function_ptr, getpagesize, __enable_execute_stack,
	__enable_execute_stack, __clear_insn_cache,
	__enable_execute_stack, __do_global_dtors, __do_global_ctors,
	_cleanup, _exit, __default_terminate, __terminate_func,
	__terminate, __empty, __throw, new_eh_context,
	eh_context_initialize, eh_context_static, eh_context_specific,
	get_eh_context, __get_eh_context, __get_eh_info,
	init_reg_size_table, eh_threads_initialize,
	__get_dynamic_handler_chain, __sjthrow, __sjpopnthrow,
	__unwinding_cleanup, throw_helper, __throw, __rethrow,
	__pure_virtual): Add prototype arguments.
	(__bb_exit_func): Cast a sizeof to long when comparing against one.
	Cast a signed value to unsigned long when comparing against one.
	(new_eh_context): Wrap in _GTHREADS macro.
	(__sjthrow, __sjpopnthrow): Initialize variable `cleanup' at
	declaration.
	(in_reg_window): Mark parameters with __attribute__ ((__unused__)).
	(throw_helper): Initialize variables `handler_p' and `pc_p'.

From-SVN: r30872
1999-12-12 15:34:09 +00:00
Jakub Jelinek
021b394959 longlong.h: Merge in changes from glibc.
* longlong.h: Merge in changes from glibc.
	Also don't clobber %g2 register in 32bit SPARC assembly, so that
	-mno-app-regs libgcc can be compiled.
	* libgcc2.c: Add defines so that the updated longlong.h
	can be used in libgcc2.a. Also, make sure on most architectures
	(at least on all which have optimized code in longlong.h defined
	for) {SI,W}_TYPE_SIZE is suitable for preprocessor tests.

From-SVN: r30836
1999-12-08 17:00:45 -08:00
David O'Brien
d7ebf9ea95 xm-i386.h: Define `__i386__' if not defined...
* xm-i386.h: Define `__i386__' if not defined, rather than `i386'
        which is in the user's namespace.
        * libgcc2.c: Look for the ANSI-C approved `__i386__' symbol, vs.
        `i386' which is not in our namespace.

From-SVN: r30627
1999-11-22 23:09:34 -07:00
Jason Merrill
bf279c4e1a libgcc2.c (__do_global_dtors): Only do EH frame stuff if ! HAS_INIT_SECTION.
* libgcc2.c (__do_global_dtors): Only do EH frame stuff if
	! HAS_INIT_SECTION.

From-SVN: r30339
1999-11-02 02:24:27 -05:00
Richard Kenner
14a774a9d2 [multiple changes]
Fri Oct 29 15:25:07 1999  Arnaud Charlet  <charlet@ACT-Europe.FR>

	* gcov.c (DIR_SEPARATOR): Provide default.
	(output_data): Add test for MS-DOS format absolute filename.
	(fancy_abort): Correct program name.
	(open_files): Open all files in binary mode.
	* libgcc2.c (__bb_exit_func): Likewise.

	* profile.c (init_branch_prob): Specify binary when opening files.

	* flags.h (flag_unwind_tables): New decl.
	* toplev.c (flag_unwind_table): New definition.
	(f_options): Add -funwind-tables.
	(decode_g_option): Clarify warning when unknown -g option is given.
	(rest_of_compilation): If inside an inlined external function,
	pretend we are just being declared.

	* dwarf2out.c (dwarf2out_do_frame): Check -funwind_tables.
	(dwarf2out_frame_finish): Likewise.

Fri Oct 29 06:32:44 1999  Geoffrey Keating  <geoffk@cygnus.com>

	* flow.c (propagate_block): When the last reference to a label
 	before an ADDR_VEC is deleted because the reference is a dead
 	store, delete the ADDR_VEC.

Fri Oct 29 07:44:26 1999  Vasco Pedro  <vp@di.fct.unl.pt>

	* fold-const.c (merge_ranges): In not in0, but in1, handle
	upper bounds equal like subset case.

Thu Oct 28 19:22:24 1999  Douglas Rupp <rupp@gnat.com>

	* dbxout.c (dbxout_parms): Generate a second stabs line for parameters
	passed in a register but moved to the stack.

Thu Oct 28 19:12:57 1999  Sam Tardieu  <tardieu@act-europe.fr>

	* gcc.c (pass_exit_codes, greatest_status): New variables.
	(struct option_map): Add entry for "--pass-exit-codes".
	(execute): Update greatest_status if error.
	(display_help): Add documentation for -pass-exit-codes.
	(process_command): Handle -pass-exit-codes.
	(main): Look at pass_exit_codes and greatest_status on call to exit.

Thu Oct 28 18:06:50 1999  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* reload.c (find_reloads): Refine test for no input reload
	case to not includes reloads emitted after insn.

	* function.c (find_temp_slots_from_address): Handle sum involving
	a register that points to a temp slot.
	(update_temp_slot_address): Make recursive call if both old and
	new are PLUS with a common operand.
	* calls.c (expand_call): Mark temp slot for result as having
	address taken.

	* rtlanal.c (reg_referenced_p, case IF_THEN_ELSE): New case.

	* gcc.c (process_command): Add standard_exec_prefix with "GCC"
	component as well as "BINUTILS".

	* integrate.h (copy_rtx_and_substitute): New arg, FOR_LHS.
	* integrate.c (copy_rtx_and_substitute): Likewise.
	(expand_inline_function, integrate_parm_decls, integrate_decl_tree):
	All callers changed.
	* unroll.c (inital_reg_note_copy, copy_loop_body): Likewise.

	* dbxout.c (dbxout_type, case INTEGER_TYPE_NODE): If can use
	gdb extensions, write size of type; also be more consistent
	in using references when this is a subtype.

	* pa.md (extv, extzv, insv): Use define_expand to reject constant
	that is out of range.

	* loop.c (unknown_constant_address_altered): New variable.
	(prescan_loop): Initialize it.
	(note_addr_stored): Set it for RTX_UNCHANGING_P MEM.
	(invariant_p, case MEM): Remove handling for volatile and readony;
	check new variable if readonly.
	(check_dbra_loop): Chdeck unknown_constant_address_altered.

	* cse.c (canon_hash, case MEM): Do not record if BLKmode.
	(addr_affects_sp_p): Removed from note_mem_written and only
	define #ifdef AUTO_INC_DEC.

	* alpha.c (input_operand, case ADDRESSOF): Treat as REG.

	* regclass.c (record_reg_classes): Properly handle register move
	directions.

	* varasm.c (initializer_constant_valid_p, case MINUS_EXPR):
	Don't think valid if both operands are invalid.
	(struct constant_descriptor): New field RTL.
	(mark_const_hash_entry): Mark it.
	(record_constant{,_rtx}): Initialize it.
	(output_constant_def): Allocate RTL in permanent obstack and
	save in table.
	({record,compare}_constant_1): Modes must match for
	CONSTRUCTOR of ARRAY_TYPE.

	* c-common.h (initializer_constant_valid_p): Delete decl from here.
	* output.h (initializer_constant_valid_p): Move decl to here.
	* c-common.c (initializer_constant_valid_p): Delete function from here.
	* varasm.c (initializer_constant_valid_p): Move function to here.

	* tree.h (STRIP_SIGN_NOPS): New macro.
	* fold-const.c (optimize_minmax_comparison): New function.
	(invert_truthvalue, case WITH_RECORD_EXPR): New case.
	(fold): Use STRIP_SIGN_NOPS instead of STRIP_TYPE_NOPS.
	(fold, case EQ_EXPR): Call optimize_minmax_comparison and add
	cases with ABS_EXPR, NEGATE_EXPR, PLUS_EXPR, MINUS_EXPR, and
	widening conversions.
	(fold, case LE_EXPR): Rework changing unsigned to signed comparisons
	to look at size of mode, not precision of type; also add missing cases.
	(optimize_bit_field_compare, decode_field_reference): Don't try to
	optimize COMPONENT_REF of a PLACEHOLDER_EXPR.

	* dwarf2out.c (ctype.h): Include.
	(dwarf2out_set_demangle_name_func): New function.
	(size_of_line_info): Deleted.
	(output_line_info): Compute size of line info table from difference
	of labels.
	(base_type_die, add_name_attribute): Call demangle function, if any.
	(field_byte_offset): Use bits per word for variable length fields.
	(gen_array_type_die): Add array name.
	(gen_subprogram_die): Ignore DECL_INLINE if -fno-inline.
	(dwarf2out_add_library_unit_info): New function.

	* explow.c (set_stack_check_libfunc): New function.
	(stack_check_libfunc): New static variable.
	(probe_stack_range): Allow front-end to set up a libfunc to call.

	* combine.c (simplify_comparison): When making comparison in wider
	mode, check for having commuted an AND and a SUBREG.
	(contains_muldiv): New function.
	(try_combine): Call it when dividing a PARALLEL.
	(simplify_rtx, case TRUNCATE): Don't remove for umulsi3_highpart.
	(simplify_comparison, case ASHIFTRT): Recognize sign-extension of
	a PLUS.
	(record_value_for_reg): If TEM is a binary operation with two CLOBBERs,
	use one of the CLOBBERs instead.
	(if_then_else_cond): If comparing against zero, just return thing
	being compared.

	* optabs.c (expand_abs): If machine has MAX, ABS (x) is MAX (x, -x).
	Don't generate shifts and subtract if have conditional arithmetic.

	* rtl.h (delete_barrier): New declaration.
	* jump.c (jump_optimize): Set up to handle conditional call.
	In conditional arithmetic case, handle CALL_INSN followed by a BARRIER.
	(delete_barrier): New function.

	* rtl.c (read_rtx): Call fatal if bad RTL code; check for bad mode.

	* recog.c (nonmemory_operand): Accept ADDRESSOF.

	* tree.c (build_type_attribute_variant): Push to obstack of
	ttype around type_hash_canon call.

	* expr.c (placeholder_list): Move decl to file scope.
	(expand_expr): Don't force access to volatile just because its
	address is taken.
	If ignoring reference operations, just expand the operands.
	(expand_expr, case COMPONENT_REF): Propagate
	EXPAND_CONST_ADDRESS to recursive call when expanding inner.
	Refine test for using bitfield operations vs pointer punning.
	(expand_expr, case CONVERT_EXPR): If converting to
	BLKmode UNION_TYPE from BLKmode, just return inner object.
	Use proper mode in store_field call.
	Properly set sizes of object to store and total size in store_field
	call for convert to union.
	(expand_expr, case ARRAY_REF): If OP0 is in a register, put it in
	memory (like for ADDR_EXPR).  Also, don't put constant in register if
	we'll want it in memory.
	(readonly_fields_p): New function.
	(expand_expr, case INDIRECT_REF): Call it if LHS.
	(expand_assignment): Handle a RESULT_DECL where
	DECL_RTL is a PARALLEL.
	(do_jump, case WITH_RECORD_EXPR): New case.
	(get_inner_reference): Always go inside a CONVERT_EXPR
	and NOP_EXPR if both modes are the same.
	(store_field): Use bitfield operations if size of bitsize is not same
	as size of RHS's type.
	Check for bitpos not a multiple of alignment in BLKmode case.
	Do block move in largest possible alignment.
	(store_constructor): Set BITSIZE to -1 for variable size and properly
 	in case of array of BLKmode.
	(expand_expr_unaligned): New function.
	(do_compare_and_jump): Call it.

	* mips/iris5.h (SWITCHES_NEED_SPACES): New macro.
	* collect2.c (main): Only allow -ofoo if SWITCHES_NEED_SPACES
	does not include 'o'.

	* function.c (instantiate_virtual_regs_1, case SET): Handle case where
	both SET_DEST and SET_SRC reference a virtual register.
	(gen_mem_addressof): Copy RTX_UNCHANGING_P from new REG to old REG.

	* integrate.c (expand_inline_function): Handle case of setting
	virtual stack vars register (from built in setjmp); when parameter
	lives in memory, expand virtual_{stack_vars,incoming_args}_rtx early.
	(subst_constant): Add new parm, MEMONLY.
	(expand_inline_function, integrate_parm_decls): Pass new parm.
	(integrate_decl_tree): Likewise.
	(copy_rtx_and_substitute, case MEM): Do copy RTX_UNCHANGING_P.
	(try_constants): Call subst_constants twice, with MEMONLY 0 and 1.
	(copy_rtx_and_substitute, case SET): Add explicit calls to
	copy_rtx_and_substitute for both sides.

	* stmt.c (expand_asm_operands): Don't use TREE_STRING_LENGTH for
	constraints.
	(pushcase{,_range}): Convert to NOMINAL_TYPE after checking for
	within INDEX_TYPE, instead of before.
	(fixup_gotos): Use f->target_rtl, not the next insn,
	since latter may be from a later fixup.
	(expand_value_return): Correctly convert VAL when promoting function
	return; support RETURN_REG being a PARALLEL.
	(expand_return): When checking for result in regs and having
	cleanup, consider PARALLEL in DECL_RTL as being in regs.

From-SVN: r30299
1999-10-31 20:11:22 -05:00
Gavin Romig-Koch
a4ebb0e69f libgcc2.c (__do_global_dtors): Protect __deregister_frame_info from multiple calls.
* libgcc2.c (__do_global_dtors): Protect __deregister_frame_info
	from multiple calls.

From-SVN: r29979
1999-10-14 13:38:01 +00:00
Michael Meissner
2f9e65b1f1 Do not include stddef.h if building trampoline support and inhibit_libc is defined
From-SVN: r29831
1999-10-05 19:59:03 +00:00
Michael Meissner
139fa6f87b Mark args as unused.
From-SVN: r29830
1999-10-05 19:48:55 +00:00
Michael Meissner
df231a0970 Declare malloc, free, and atexit if inhibit_libc is defined.
From-SVN: r29829
1999-10-05 19:41:35 +00:00
Bernd Schmidt
d9d5c9de1c Use lookup table to get register sizes in dwarf2 eh
From-SVN: r29730
1999-09-30 13:40:41 +00:00
Dan Nicolaescu
e8f38d1ace libgcc2.c (num_digits): Add prototype with __attribute__((const)).
* libgcc2.c (num_digits): Add prototype with
        __attribute__((const)).
        (__terminate): Add prototype.

From-SVN: r29616
1999-09-23 07:37:49 -06:00
Jason Merrill
f75e894618 libgcc2.c (L_exit): Check for ON_EXIT, not HAVE_ON_EXIT.
* libgcc2.c (L_exit): Check for ON_EXIT, not HAVE_ON_EXIT.
	* sparc/sunos4.h (HAVE_ON_EXIT): Remove.

From-SVN: r29481
1999-09-17 14:37:48 -04:00
Kaveh R. Ghazi
a218d5ba2b libgcc2.c (__do_global_ctors): Call atexit with one arg.
* libgcc2.c (__do_global_ctors): Call atexit with one arg.

	* sparc/sunos4.h (on_exit): Wrap prototype parameters in PARAMS().
	Define HAVE_ON_EXIT.

From-SVN: r29465
1999-09-16 22:51:47 +00:00
Jason Merrill
c063dc9813 gbl-ctors.h: Lose HAVE_ATEXIT.
* gbl-ctors.h: Lose HAVE_ATEXIT.  Don't define ON_EXIT.
	* libgcc2.c: Lose obsolete defn of WEAK_ALIAS.
	(__bb_init_func, __bb_init_prg): Use atexit instead of ON_EXIT.
	(__do_global_dtors): Likewise.  Don't mess with _exit_dummy_decl.
	(atexit, exit): Simplify.
	* tm.texi: Document NEED_ATEXIT and ON_EXIT.  Remove HAVE_ATEXIT.
	* config/lots: Remove defns of HAVE_ATEXIT.

From-SVN: r29439
1999-09-15 17:41:16 -04:00
Jason Merrill
31cf01446d defaults.h (EH_FRAME_SECTION, [...]): Define here.
* defaults.h (EH_FRAME_SECTION, EH_FRAME_SECTION_ASM_OP): Define here.
	* crtstuff.c: Not here.
	* dwarf2out.c: Or here.
	* libgcc2.c (__do_global_ctors, __do_global_dtors): Handle EH frame
	info.

From-SVN: r29241
1999-09-09 17:36:20 -04:00
Jeff Law
c5c7673583 Merge in gcc2-ss-010999
From-SVN: r29150
1999-09-06 23:49:18 -06:00
Jeffrey A Law
657be7aff1 Makefile.in (libgcc2): Pass MAYBE_USE_COLLECT2 as an argument.
* Makefile.in (libgcc2): Pass MAYBE_USE_COLLECT2 as an argument.
        * libgcc2.c (__CTOR_LIST, __DTOR_LIST); Do not provide
        initializers is some circumstances.

From-SVN: r27489
1999-06-10 21:12:22 -06:00
Jason Merrill
51980de69e libgcc2.c (throw_helper): Just return the SP offset, rather than a whole udata.
* libgcc2.c (throw_helper): Just return the SP offset, rather than
	a whole udata.  Include args_size in the offset.
	(__throw, __rethrow): Adjust.

From-SVN: r26066
1999-03-30 09:12:49 -05:00
Jim Blandy
7ad3a049d3 libgcc2.c (__CTOR_LIST__, [...]): Initialize on all platforms.
* libgcc2.c (__CTOR_LIST__, __DTOR_LIST__): Initialize on all
        platforms.

From-SVN: r25939
1999-03-23 17:51:16 -07:00
Mumit Khan
b27d2bd5fe cppfiles.c (INO_T_EQ): Handle UWIN.
* cppfiles.c (INO_T_EQ): Handle UWIN.
        * c-common.c (decl_attributes): Flag unrecognized attribute
        functions as warnings instead of as errors.
        Support for i386-pc-uwin.
        * i386/uwin.h: New file.
        * i386/xm-uwin.h: New file.
        * i386/t-uwin: New file.
        * i386/uwin.asm: New file.
        * configure.in (i[3456]86-*-uwin*): Define.
        Add Workaround for vfork bug when hosted on uwin.
        * configure: Regenerate.
        * cccp.c (INO_T_EQ): Undefine. UWIN has inodes.
        (absolute_filename): UWIN uses POSIX pathnames only.
        * libgcc2.c (getpagesize): Do not define for UWIN.
        (mprotect): Likewise.
        * protoize.c (dirent.h): Conditionally include.
        (fputc): Prototype only if it's not a macro.

From-SVN: r25696
1999-03-10 17:58:01 -07:00
Jason Merrill
1b528097cd tweak formatting
From-SVN: r24874
1999-01-26 14:34:46 -05:00
Vladimir Makarov
eaa4b44cfc [multiple changes]
1999-01-19  Vladimir N. Makarov  <vmakarov@cygnus.com>
	* invoke.texi (-mlong-double-64): New option description.
1999-01-19  Jim Wilson  <wilson@cygnus.com>
	* libgcc2.c: Change all uses of LONG_DOUBLE_TYPE_SIZE to
	LIBGCC2_LONG_DOUBLE_TYPE_SIZE.
	(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): New.  Set to LONG_DOUBLE_TYPE_SIZE
	if not defined.
	* i960/i960.h (MULTILIB_DEFAULTS): Define to mnumerics.
	(CPP_SPECS): Add -mlong-double-64 support.
	(TARGET_FLAG_LONG_DOUBLE_64, TARGET_LONG_DOUBLE_64): New.
	(TARGET_SWITCHES): Add -mlong-double-64 support.
	(LONG_DOUBLE_TYPE_SIZE): Likewise.
	(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define.
	* i960/vx960-coff.h (MULTILIB_DEFAULTS): Define to msoft-float.
	(CPP_SPECS): Add -mlong-double-64 support.
	* i960/t-960bare (MULTILIB_OPTIONS): Add mlong-double-64.
	(MULTILIB_DIRNAMES): Add ld64.
	* i960/t-vxworks960 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Likewise.

From-SVN: r24764
1999-01-19 12:03:01 +00:00