14a774a9d2
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
168 lines
5.7 KiB
C
168 lines
5.7 KiB
C
/* Definitions of target machine for GNU compiler. Iris version 5.
|
|
Copyright (C) 1993, 1995, 1996, 1998 Free Software Foundation, Inc.
|
|
|
|
This file is part of GNU CC.
|
|
|
|
GNU CC is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
any later version.
|
|
|
|
GNU CC is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with GNU CC; see the file COPYING. If not, write to
|
|
the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
#ifndef TARGET_DEFAULT
|
|
#define TARGET_DEFAULT MASK_ABICALLS
|
|
#endif
|
|
#define ABICALLS_ASM_OP ".option pic2"
|
|
|
|
#include "mips/iris3.h"
|
|
#include "mips/mips.h"
|
|
#include "mips/iris4.h"
|
|
|
|
/* Irix 5 doesn't use COFF, so disable special COFF handling in collect2.c. */
|
|
#undef OBJECT_FORMAT_COFF
|
|
|
|
/* ??? This is correct, but not very useful, because there is no file that
|
|
uses this macro. */
|
|
/* ??? The best way to handle global constructors under ELF is to use .init
|
|
and .fini sections. Unfortunately, there is apparently no way to get
|
|
the Irix 5.x (x <= 2) assembler to create these sections. So we instead
|
|
use collect. The linker can create these sections via -init and -fini
|
|
options, but using this would require modifying how crtstuff works, and
|
|
I will leave that for another time (or someone else). */
|
|
#define OBJECT_FORMAT_ELF
|
|
#define HAS_INIT_SECTION
|
|
#define LD_INIT_SWITCH "-init"
|
|
#define LD_FINI_SWITCH "-fini"
|
|
|
|
/* The linker needs a space after "-o". */
|
|
#define SWITCHES_NEED_SPACES "o"
|
|
|
|
/* Specify wchar_t types. */
|
|
#undef WCHAR_TYPE
|
|
#undef WCHAR_TYPE_SIZE
|
|
#undef MAX_WCHAR_TYPE_SIZE
|
|
|
|
#define WCHAR_TYPE "long int"
|
|
#define WCHAR_TYPE_SIZE LONG_TYPE_SIZE
|
|
#define MAX_WCHAR_TYPE_SIZE MAX_LONG_TYPE_SIZE
|
|
|
|
#define WORD_SWITCH_TAKES_ARG(STR) \
|
|
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
|
|
|| !strcmp (STR, "rpath"))
|
|
|
|
#undef SUBTARGET_CC1_SPEC
|
|
#define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}"
|
|
|
|
/* ??? _MIPS_SIM and _MIPS_SZPTR should eventually depend on options when
|
|
options for them exist. */
|
|
|
|
#undef CPP_PREDEFINES
|
|
#define CPP_PREDEFINES \
|
|
"-Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 \
|
|
-D_SVR4_SOURCE -D_MODERN_C -D__DSO__ \
|
|
-D_MIPS_SIM=_MIPS_SIM_ABI32 -D_MIPS_SZPTR=32 \
|
|
-Asystem(unix) -Asystem(svr4) -Acpu(mips) -Amachine(sgi)"
|
|
|
|
#undef SUBTARGET_CPP_SPEC
|
|
#define SUBTARGET_CPP_SPEC "\
|
|
%{!ansi:-D__EXTENSIONS__ -D_SGI_SOURCE -D_LONGLONG} \
|
|
%{!mfp64: -D_MIPS_FPSET=16}%{mfp64: -D_MIPS_FPSET=32} \
|
|
%{mips1: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \
|
|
%{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \
|
|
%{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
|
|
%{!mips1: %{!mips2: %{!mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS1}}} \
|
|
%{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \
|
|
%{!mlong64: -D_MIPS_SZLONG=32}%{mlong64: -D_MIPS_SZLONG=64}"
|
|
|
|
#undef LINK_SPEC
|
|
#define LINK_SPEC "\
|
|
%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
|
|
%{bestGnum} %{shared} %{non_shared} \
|
|
%{call_shared} %{no_archive} %{exact_version} \
|
|
%{static: -non_shared} \
|
|
%{!static: \
|
|
%{!shared:%{!non_shared:%{!call_shared: -call_shared -no_unresolved}}}} \
|
|
%{rpath} \
|
|
-_SYSTYPE_SVR4"
|
|
|
|
/* We now support shared libraries. */
|
|
#undef STARTFILE_SPEC
|
|
#define STARTFILE_SPEC "\
|
|
%{!static: \
|
|
%{!shared:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}}} \
|
|
%{static: \
|
|
%{pg:gcrt1.o%s} \
|
|
%{!pg:%{p:/usr/lib/nonshared/mcrt1.o%s libprof1.a%s} \
|
|
%{!p:/usr/lib/nonshared/crt1.o%s}}}"
|
|
|
|
#undef LIB_SPEC
|
|
#define LIB_SPEC "%{!shared:%{p:-lprof1} %{pg:-lprof1} -lc}"
|
|
|
|
#undef ENDFILE_SPEC
|
|
#define ENDFILE_SPEC "%{!shared:crtn.o%s}"
|
|
|
|
/* We do not want to run mips-tfile! */
|
|
#undef ASM_FINAL_SPEC
|
|
|
|
/* The system header files are C++ aware. */
|
|
/* ??? Unfortunately, most but not all of the headers are C++ aware.
|
|
Specifically, curses.h is not, and as a consequence, defining this
|
|
used to prevent libg++ building. This is no longer the case so
|
|
define it again to prevent other problems, e.g. with getopt in
|
|
unistd.h. We still need some way to fix just those files that need
|
|
fixing. */
|
|
#define NO_IMPLICIT_EXTERN_C 1
|
|
|
|
/* We don't support debugging info for now. */
|
|
#undef DBX_DEBUGGING_INFO
|
|
#undef SDB_DEBUGGING_INFO
|
|
#undef MIPS_DEBUGGING_INFO
|
|
#undef PREFERRED_DEBUGGING_TYPE
|
|
|
|
/* Likewise, the assembler doesn't handle DWARF2 directives. */
|
|
#define DWARF2_UNWIND_INFO 0
|
|
|
|
#undef MACHINE_TYPE
|
|
#define MACHINE_TYPE "SGI running IRIX 5.x"
|
|
|
|
/* Dollar signs are OK in Irix5 but not in Irix3. */
|
|
#undef DOLLARS_IN_IDENTIFIERS
|
|
#undef NO_DOLLAR_IN_LABEL
|
|
|
|
/* -G is incompatible with -KPIC which is the default, so only allow objects
|
|
in the small data section if the user explicitly asks for it. */
|
|
#undef MIPS_DEFAULT_GVALUE
|
|
#define MIPS_DEFAULT_GVALUE 0
|
|
|
|
/* In Irix 5, we must output a `.global name .text' directive for every used
|
|
but undefined function. If we don't, the linker may perform an optimization
|
|
(skipping over the insns that set $gp) when it is unsafe. This is used
|
|
indirectly by ASM_OUTPUT_EXTERNAL. */
|
|
#define ASM_OUTPUT_UNDEF_FUNCTION(FILE, NAME) \
|
|
do { \
|
|
fputs ("\t.globl ", FILE); \
|
|
assemble_name (FILE, NAME); \
|
|
fputs (" .text\n", FILE); \
|
|
} while (0)
|
|
|
|
/* Also do this for libcalls. */
|
|
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
|
|
mips_output_external_libcall (FILE, XSTR (FUN, 0))
|
|
|
|
/* This does for functions what ASM_DECLARE_OBJECT_NAME does for variables.
|
|
This is used indirectly by ASM_OUTPUT_EXTERNAL. */
|
|
#define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) \
|
|
do { \
|
|
tree name_tree = get_identifier (NAME); \
|
|
TREE_ASM_WRITTEN (name_tree) = 1; \
|
|
} while (0)
|