Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Mar 2005 23:39:53 GMT
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 73409 for review
Message-ID:  <200503172339.j2HNdr2A025717@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=73409

Change 73409 by jmallett@jmallett_windward on 2005/03/17 23:39:38

	Merge.
	Obtained from:	GCC-3.4.2 Tarball

Affected files ...

.. //depot/projects/mips/contrib/gcc/config/mips/5400.md#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/5500.md#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/_tilib.c#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/cross64.h#3 edit
.. //depot/projects/mips/contrib/gcc/config/mips/crti.asm#3 edit
.. //depot/projects/mips/contrib/gcc/config/mips/crtn.asm#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/dbxmdebug.h#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/elf.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/elf64.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/elforion.h#3 edit
.. //depot/projects/mips/contrib/gcc/config/mips/freebsd.h#14 edit
.. //depot/projects/mips/contrib/gcc/config/mips/iris3.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/iris4.h#3 edit
.. //depot/projects/mips/contrib/gcc/config/mips/iris5.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/iris5gas.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/iris6-o32-as.h#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/iris6-o32-gas.h#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/iris6-o32.h#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/iris6.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/iris6gld.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/irix6-libc-compat.c#3 edit
.. //depot/projects/mips/contrib/gcc/config/mips/linux.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/mips-protos.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/mips.c#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/mips.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/mips.md#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/mips16.S#3 edit
.. //depot/projects/mips/contrib/gcc/config/mips/netbsd.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/openbsd-be.h#3 edit
.. //depot/projects/mips/contrib/gcc/config/mips/openbsd.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/r3900.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/rtems.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/rtems64.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/sni-gas.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/sni-svr4.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/sr71k.md#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-cross64#3 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-ecoff#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-elf#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-gofast#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-iris#3 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-iris5-6#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-iris5-as#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-iris5-gas#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-iris6#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-isa3264#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-mips#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-r3900#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-rtems#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-sr71k#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/t-vr#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/vr.h#2 edit
.. //depot/projects/mips/contrib/gcc/config/mips/vxworks.h#4 edit
.. //depot/projects/mips/contrib/gcc/config/mips/xm-iris5.h#3 edit

Differences ...

==== //depot/projects/mips/contrib/gcc/config/mips/5400.md#2 (text+ko) ====

@@ -44,11 +44,10 @@
 
 
 ;; This reservation is for conditional move based on integer
-;; or floating point CC.  This could probably use some refinement
-;; as "move" type attr seems to be overloaded in rtl.
-(define_insn_reservation "ir_vr54_move" 4
+;; or floating point CC.
+(define_insn_reservation "ir_vr54_condmove" 4
   (and (eq_attr "cpu" "r5400")
-       (eq_attr "type" "move"))
+       (eq_attr "type" "condmove"))
   "vr54_dp0|vr54_dp1")
 
 ;; Move to/from FPU registers
@@ -64,7 +63,7 @@
 
 (define_insn_reservation "ir_vr54_arith" 1
   (and (eq_attr "cpu" "r5400")
-       (eq_attr "type" "arith,darith,icmp,nop"))
+       (eq_attr "type" "move,arith,darith,const,icmp,nop"))
   "vr54_dp0|vr54_dp1")
 
 (define_insn_reservation "ir_vr54_imul_si" 3

==== //depot/projects/mips/contrib/gcc/config/mips/5500.md#2 (text+ko) ====

@@ -37,11 +37,10 @@
   "vr55_mem")
 
 ;; This reservation is for conditional move based on integer
-;; or floating point CC.  This could probably use some refinement
-;; as "move" type attr seems to be overloaded in rtl.
-(define_insn_reservation "ir_vr55_move" 2
+;; or floating point CC.
+(define_insn_reservation "ir_vr55_condmove" 2
   (and (eq_attr "cpu" "r5500")
-       (eq_attr "type" "move"))
+       (eq_attr "type" "condmove"))
   "vr55_dp0|vr55_dp1")
 
 ;; Move to/from FPU registers
@@ -57,7 +56,7 @@
 
 (define_insn_reservation "ir_vr55_arith" 1
   (and (eq_attr "cpu" "r5500")
-       (eq_attr "type" "arith,darith,icmp,nop"))
+       (eq_attr "type" "move,arith,darith,const,icmp,nop"))
   "vr55_dp0|vr55_dp1")
 
 (define_insn_reservation "ir_vr55_imul_si" 3

==== //depot/projects/mips/contrib/gcc/config/mips/_tilib.c#2 (text+ko) ====

@@ -21,8 +21,10 @@
 
 
 #include "tconfig.h"
+#include "coretypes.h"
+#include "tm.h"
 
-#if _MIPS_SIM == 2 /* N32 */ || _MIPS_SIM == 3 /* 64 */
+#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
 
 typedef int TItype __attribute__ ((mode (TI)));
 typedef int DItype __attribute__ ((mode (DI)));

==== //depot/projects/mips/contrib/gcc/config/mips/cross64.h#3 (text+ko) ====


==== //depot/projects/mips/contrib/gcc/config/mips/crti.asm#3 (text+ko) ====


==== //depot/projects/mips/contrib/gcc/config/mips/crtn.asm#4 (text+ko) ====


==== //depot/projects/mips/contrib/gcc/config/mips/dbxmdebug.h#2 (text+ko) ====


==== //depot/projects/mips/contrib/gcc/config/mips/elf.h#4 (text+ko) ====

@@ -1,40 +1,25 @@
 /* Definitions of target machine for GNU compiler.  MIPS R3000 version with
    GOFAST floating point library.
-   Copyright (C) 1994, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1997, 1999, 2000, 2002, 2003, 2004
+   Free Software Foundation, Inc.
 
-This file is part of GNU CC.
+This file is part of GCC.
 
-GNU CC is free software; you can redistribute it and/or modify
+GCC 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,
+GCC 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
+along with GCC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* Use ELF.  */
-#undef  OBJECT_FORMAT_COFF
-#undef  EXTENDED_COFF
-
-/* ??? Move all SDB stuff into separate header file.  */
-#undef  SDB_DEBUGGING_INFO
-
-#define DBX_DEBUGGING_INFO 1
-#define DWARF2_DEBUGGING_INFO 1
-
-#undef  PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-
-#undef  SUBTARGET_ASM_DEBUGGING_SPEC
-#define SUBTARGET_ASM_DEBUGGING_SPEC "-g0"
-
 /* Biggest alignment supported by the object file format of this
    machine.  Use this macro to limit the alignment which can be
    specified using the `__attribute__ ((aligned (N)))' construct.  If
@@ -47,19 +32,6 @@
 #undef  TARGET_ASM_NAMED_SECTION
 #define TARGET_ASM_NAMED_SECTION  default_elf_asm_named_section
 
-/* Given that Irix has it's own headers, not having TARGET_GAS here
-   seems a mistake.  If we actually need to be prepared for file
-   switching, then we need a custom TARGET_ASM_NAMED_SECTION too.  */
-
-#undef  TEXT_SECTION
-#define TEXT_SECTION()				\
-do {						\
-  if (TARGET_FILE_SWITCHING)			\
-    abort ();					\
-  fputs (TEXT_SECTION_ASM_OP, asm_out_file);	\
-  fputc ('\n', asm_out_file);			\
-} while (0)
-
 /* The following macro defines the format used to output the second
    operand of the .type assembler directive.  Different svr4 assemblers
    expect various different forms for this operand.  The one given here
@@ -91,77 +63,16 @@
 #define BSS_SECTION_ASM_OP	"\t.section\t.bss"
 #endif
 
-#undef  SBSS_SECTION_ASM_OP
-#define SBSS_SECTION_ASM_OP	"\t.section .sbss"
-
-/* Like `ASM_OUTPUT_BSS' except takes the required alignment as a
-   separate, explicit argument.  If you define this macro, it is used
-   in place of `ASM_OUTPUT_BSS', and gives you more flexibility in
-   handling the required alignment of the variable.  The alignment is
-   specified as the number of bits.
-
-   Try to use function `asm_output_aligned_bss' defined in file
-   `varasm.c' when defining this macro.  */
 #ifndef ASM_OUTPUT_ALIGNED_BSS
-#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
-do {									\
-  (*targetm.asm_out.globalize_label) (FILE, NAME);			\
-  if (SIZE > 0 && SIZE <= mips_section_threshold)			\
-    sbss_section ();							\
-  else									\
-    bss_section ();							\
-  ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT));		\
-  last_assemble_variable_decl = DECL;					\
-  ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL);				\
-  ASM_OUTPUT_SKIP (FILE, SIZE ? SIZE : 1);				\
-} while (0)
+#define ASM_OUTPUT_ALIGNED_BSS mips_output_aligned_bss
 #endif
 
-/* These macros generate the special .type and .size directives which
-   are used to set the corresponding fields of the linker symbol table
-   entries in an ELF object file under SVR4.  These macros also output
-   the starting labels for the relevant functions/objects.  */
+#undef ASM_DECLARE_OBJECT_NAME
+#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
 
-/* Write the extra assembler code needed to declare an object properly.  */
+#undef ASM_FINISH_DECLARE_OBJECT
+#define ASM_FINISH_DECLARE_OBJECT mips_finish_declare_object
 
-#undef  ASM_DECLARE_OBJECT_NAME
-#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL)			\
-  do {									\
-    HOST_WIDE_INT size;							\
-    ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");			\
-    size_directive_output = 0;						\
-    if (!flag_inhibit_size_directive && DECL_SIZE (DECL))		\
-      {									\
-	size_directive_output = 1;					\
-	size = int_size_in_bytes (TREE_TYPE (DECL));			\
-	ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size);			\
-      }									\
-    mips_declare_object (FILE, NAME, "", ":\n", 0);			\
-  } while (0)
-
-/* Output the size directive for a decl in rest_of_decl_compilation
-   in the case where we did not do so before the initializer.
-   Once we find the error_mark_node, we know that the value of
-   size_directive_output was set
-   by ASM_DECLARE_OBJECT_NAME when it was run for the same decl.  */
-
-#undef  ASM_FINISH_DECLARE_OBJECT
-#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)	 \
-do {									 \
-     const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);		 \
-     HOST_WIDE_INT size;						 \
-									 \
-     if (!flag_inhibit_size_directive && DECL_SIZE (DECL)		 \
-         && ! AT_END && TOP_LEVEL					 \
-	 && DECL_INITIAL (DECL) == error_mark_node			 \
-	 && !size_directive_output)					 \
-       {								 \
-	 size_directive_output = 1;					 \
-	 size = int_size_in_bytes (TREE_TYPE (DECL));			 \
-	 ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size);			 \
-       }								 \
-   } while (0)
-
 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                            \
  do { fputc ( '\t', FILE);                                            \
       assemble_name (FILE, LABEL1);                                   \
@@ -196,28 +107,6 @@
 
 #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
 
-#define TARGET_ASM_UNIQUE_SECTION  mips_unique_section
-
-/* A list of other sections which the compiler might be "in" at any
-   given time.  */
-#undef  EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_sdata, in_sbss
-
-#undef  EXTRA_SECTION_FUNCTIONS
-#define EXTRA_SECTION_FUNCTIONS                                         \
-  SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP) \
-  SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP)
-
-#define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP)                               \
-void FN ()                                                            \
-{                                                                     \
-  if (in_section != ENUM)                                             \
-    {                                                                 \
-      fprintf (asm_out_file, "%s\n", OP);                             \
-      in_section = ENUM;                                              \
-    }                                                                 \
-}
-
 /* On elf, we *do* have support for the .init and .fini sections, and we
    can put stuff in there to be executed before and after `main'.  We let
    crtstuff.c and other files know this by defining the following symbols.
@@ -234,12 +123,7 @@
 #define LIB_SPEC ""
 
 #undef  STARTFILE_SPEC
-#if defined(HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES) \
-    || (MIPS_ABI_DEFAULT == ABI_MEABI)
 #define STARTFILE_SPEC "crti%O%s crtbegin%O%s"
-#else
-#define STARTFILE_SPEC "crti%O%s crtbegin%O%s %{!mno-crt0:crt0%O%s}"
-#endif
 
 #undef  ENDFILE_SPEC
 #define ENDFILE_SPEC "crtend%O%s crtn%O%s"

==== //depot/projects/mips/contrib/gcc/config/mips/elf64.h#4 (text+ko) ====

@@ -1,38 +1,25 @@
 /* Definitions of target machine for GNU compiler.  MIPS R4000 version with
    GOFAST floating point library.
-   Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2002
+   Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2004
    Free Software Foundation, Inc.
 
-This file is part of GNU CC.
+This file is part of GCC.
 
-GNU CC is free software; you can redistribute it and/or modify
+GCC 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,
+GCC 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
+along with GCC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#undef  OBJECT_FORMAT_COFF
-#undef  EXTENDED_COFF
-
-#undef  SDB_DEBUGGING_INFO
-#define DBX_DEBUGGING_INFO 1
-#define DWARF2_DEBUGGING_INFO 1
-
-#undef  PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-
-#undef  SUBTARGET_ASM_DEBUGGING_SPEC
-#define SUBTARGET_ASM_DEBUGGING_SPEC "-g0"
-
 /* Biggest alignment supported by the object file format of this
    machine.  Use this macro to limit the alignment which can be
    specified using the `__attribute__ ((aligned (N)))' construct.  If
@@ -45,19 +32,6 @@
 #undef TARGET_ASM_NAMED_SECTION
 #define TARGET_ASM_NAMED_SECTION  default_elf_asm_named_section
 
-/* Given that Irix has it's own headers, not having TARGET_GAS here
-   seems a mistake.  If we actually need to be prepared for file
-   switching, then we need a custom TARGET_ASM_NAMED_SECTION too.  */
-
-#undef TEXT_SECTION
-#define TEXT_SECTION()				\
-do {						\
-  if (TARGET_FILE_SWITCHING)			\
-    abort ();					\
-  fputs (TEXT_SECTION_ASM_OP, asm_out_file);	\
-  fputc ('\n', asm_out_file);			\
-} while (0)
-
 /* The following macro defines the format used to output the second
    operand of the .type assembler directive.  Different svr4 assemblers
    expect various different forms for this operand.  The one given here
@@ -77,49 +51,11 @@
 #define TYPE_ASM_OP	"\t.type\t"
 #define SIZE_ASM_OP	"\t.size\t"
 
-/* These macros generate the special .type and .size directives which
-   are used to set the corresponding fields of the linker symbol table
-   entries in an ELF object file under SVR4.  These macros also output
-   the starting labels for the relevant functions/objects.  */
-
-/* Write the extra assembler code needed to declare an object properly.  */
-
 #undef ASM_DECLARE_OBJECT_NAME
-#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL)			\
-  do {									\
-    HOST_WIDE_INT size;							\
-    ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");			\
-    size_directive_output = 0;						\
-    if (!flag_inhibit_size_directive && DECL_SIZE (DECL))		\
-      {									\
-	size_directive_output = 1;					\
-	size = int_size_in_bytes (TREE_TYPE (DECL));			\
-	ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size);			\
-      }									\
-    mips_declare_object (FILE, NAME, "", ":\n", 0);			\
-  } while (0)
+#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
 
-/* Output the size directive for a decl in rest_of_decl_compilation
-   in the case where we did not do so before the initializer.
-   Once we find the error_mark_node, we know that the value of
-   size_directive_output was set
-   by ASM_DECLARE_OBJECT_NAME when it was run for the same decl.  */
-
 #undef ASM_FINISH_DECLARE_OBJECT
-#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)	 \
-do {									 \
-     const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);		 \
-     HOST_WIDE_INT size;						 \
-     if (!flag_inhibit_size_directive && DECL_SIZE (DECL)		 \
-         && ! AT_END && TOP_LEVEL					 \
-	 && DECL_INITIAL (DECL) == error_mark_node			 \
-	 && !size_directive_output)					 \
-       {								 \
-	 size_directive_output = 1;					 \
-	 size = int_size_in_bytes (TREE_TYPE (DECL));			 \
-	 ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size);			 \
-       }								 \
-   } while (0)
+#define ASM_FINISH_DECLARE_OBJECT mips_finish_declare_object
 
 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                            \
  do { fputc ( '\t', FILE);                                            \
@@ -155,27 +91,6 @@
 
 #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
 
-#define TARGET_ASM_UNIQUE_SECTION mips_unique_section
-
-/* A list of other sections which the compiler might be "in" at any
-   given time.  */
-#undef EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_sdata
-
-#undef EXTRA_SECTION_FUNCTIONS
-#define EXTRA_SECTION_FUNCTIONS                                         \
-  SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP)
-
-#define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP)                               \
-void FN ()                                                            \
-{                                                                     \
-  if (in_section != ENUM)                                             \
-    {                                                                 \
-      fprintf (asm_out_file, "%s\n", OP);                             \
-      in_section = ENUM;                                              \
-    }                                                                 \
-}
-
 /* On elf, we *do* have support for the .init and .fini sections, and we
    can put stuff in there to be executed before and after `main'.  We let
    crtstuff.c and other files know this by defining the following symbols.
@@ -192,12 +107,7 @@
 #define LIB_SPEC ""
 
 #undef  STARTFILE_SPEC
-#if defined(HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES) \
-    || (MIPS_ABI_DEFAULT == ABI_MEABI)
 #define STARTFILE_SPEC "crti%O%s crtbegin%O%s"
-#else
-#define STARTFILE_SPEC "crti%O%s crtbegin%O%s %{!mno-crt0:crt0%O%s}"
-#endif
 
 #undef  ENDFILE_SPEC
 #define ENDFILE_SPEC "crtend%O%s crtn%O%s"

==== //depot/projects/mips/contrib/gcc/config/mips/elforion.h#3 (text+ko) ====

@@ -2,20 +2,20 @@
    GOFAST floating point library.
    Copyright (C) 1994, 1998 Free Software Foundation, Inc.
 
-This file is part of GNU CC.
+This file is part of GCC.
 
-GNU CC is free software; you can redistribute it and/or modify
+GCC 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,
+GCC 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
+along with GCC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 

==== //depot/projects/mips/contrib/gcc/config/mips/freebsd.h#14 (text+ko) ====


==== //depot/projects/mips/contrib/gcc/config/mips/iris3.h#4 (text+ko) ====


==== //depot/projects/mips/contrib/gcc/config/mips/iris4.h#3 (text+ko) ====


==== //depot/projects/mips/contrib/gcc/config/mips/iris5.h#4 (text+ko) ====

@@ -1,43 +1,43 @@
-/* Definitions of target machine for GNU compiler.  Iris version 5.
+/* Definitions of target machine for GNU compiler.  IRIX version 5.
    Copyright (C) 1993, 1995, 1996, 1998, 2000,
-   2001, 2002 Free Software Foundation, Inc.
+   2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
-This file is part of GNU CC.
+This file is part of GCC.
 
-GNU CC is free software; you can redistribute it and/or modify
+GCC 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,
+GCC 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
+along with GCC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+/* We are compiling for IRIX now.  */
+#undef TARGET_IRIX
+#define TARGET_IRIX 1
+
+/* Allow some special handling for IRIX 5.  */
+#undef TARGET_IRIX5
 #define TARGET_IRIX5 1
 
-#ifndef TARGET_DEFAULT
-#define	TARGET_DEFAULT	MASK_ABICALLS
-#endif
 #define ABICALLS_ASM_OP "\t.option pic2"
 
-#include "mips/iris3.h"
-#include "mips/mips.h"
-#include "mips/iris4.h"
+/* Dummy definition which allows EXTRA_SECTION_FUNCTIONS to be the same
+   for IRIX 5 and 6.  */
+#define BSS_SECTION_ASM_OP "\t.data"
 
-/* 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
+   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).  */
@@ -58,20 +58,31 @@
 #define WCHAR_TYPE_SIZE        INT_TYPE_SIZE
 #define MAX_WCHAR_TYPE_SIZE    64
 
+/* Plain char is unsigned in the SGI compiler.  */
+#undef DEFAULT_SIGNED_CHAR
+#define DEFAULT_SIGNED_CHAR 0
+
 #define WORD_SWITCH_TAKES_ARG(STR)			\
  (DEFAULT_WORD_SWITCH_TAKES_ARG (STR)			\
   || !strcmp (STR, "rpath"))
 
+/* We must pass -D_LONGLONG always, even when -ansi is used, because IRIX 5
+   system header files require it.  This is OK, because gcc never warns
+   when long long is used in system header files.  Alternatively, we can
+   add support for the SGI builtin type __long_long.  */
+
 #define TARGET_OS_CPP_BUILTINS()			\
     do {						\
 	builtin_define_std ("host_mips");		\
 	builtin_define_std ("sgi");			\
 	builtin_define_std ("unix");			\
 	builtin_define_std ("SYSTYPE_SVR4");		\
+	builtin_define ("_LONGLONG");			\
 	builtin_define ("_MODERN_C");			\
 	builtin_define ("_SVR4_SOURCE");		\
 	builtin_define ("__DSO__");			\
-	builtin_define ("_MIPS_SIM=_MIPS_SIM_ABI32");	\
+	builtin_define ("_ABIO32=1");			\
+	builtin_define ("_MIPS_SIM=_ABIO32");		\
 	builtin_define ("_MIPS_SZPTR=32");		\
 	builtin_assert ("system=unix");			\
 	builtin_assert ("system=svr4");			\
@@ -102,6 +113,18 @@
 #undef SUBTARGET_CC1_SPEC
 #define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}"
 
+/* Override mips.h default: the IRIX 5 assembler warns about -O3:
+
+   as1: Warning: <file>.s, line 1: Binasm file dictates -pic: 2
+   uld:
+   No ucode object file linked -- please use -O2 or lower.
+   
+   So avoid passing it in the first place.  */
+#undef SUBTARGET_ASM_OPTIMIZING_SPEC
+#define SUBTARGET_ASM_OPTIMIZING_SPEC "\
+%{noasmopt:-O0} \
+%{!noasmopt:%{O|O1|O2|O3:-O2}}"
+
 #undef LINK_SPEC
 #define LINK_SPEC "\
 %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} \
@@ -114,8 +137,7 @@
 -_SYSTYPE_SVR4"
 
 /* We now support shared libraries.  */
-#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "\
+#define IRIX_STARTFILE_SPEC "\
 %{!static: \
   %{!shared:%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s libprof1.a%s}%{!p:crt1.o%s}}}} \
 %{static: \
@@ -123,11 +145,16 @@
   %{!pg:%{p:/usr/lib/nonshared/mcrt1.o%s libprof1.a%s} \
   %{!p:/usr/lib/nonshared/crt1.o%s}}}"
 
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "%(irix_startfile_spec)"
+
 #undef LIB_SPEC
 #define LIB_SPEC "%{!shared:%{p:-lprof1} %{pg:-lprof1} -lc}"
 
+#define IRIX_ENDFILE_SPEC "%{!shared:crtn.o%s}"
+
 #undef ENDFILE_SPEC
-#define ENDFILE_SPEC "%{!shared:crtn.o%s}"
+#define ENDFILE_SPEC "%(irix_endfile_spec)"
 
 /* We do not want to run mips-tfile!  */
 #undef ASM_FINAL_SPEC
@@ -143,7 +170,6 @@
 
 /* We don't support debugging info for now.  */
 #undef DBX_DEBUGGING_INFO
-#undef SDB_DEBUGGING_INFO
 #undef MIPS_DEBUGGING_INFO
 #undef PREFERRED_DEBUGGING_TYPE
 
@@ -153,7 +179,19 @@
 #undef MACHINE_TYPE
 #define MACHINE_TYPE "SGI running IRIX 5.x"
 
- /* Dollar signs are OK in Irix5 but not in Irix3.  */
+/* Always use 1 for .file number.  I [meissner@osf.org] wonder why
+   IRIX needs this.  */
+
+#undef SET_FILE_NUMBER
+#define SET_FILE_NUMBER() num_source_filenames = 1
+
+/* Put out a label after a .loc.  I [meissner@osf.org] wonder why
+   IRIX needs this.  */
+
+#undef LABEL_AFTER_LOC
+#define LABEL_AFTER_LOC(STREAM) fprintf (STREAM, "LM%d:\n", ++sym_lineno)
+
+ /* Dollar signs are OK in IRIX 5 but not in IRIX 3.  */
 #undef DOLLARS_IN_IDENTIFIERS
 #undef NO_DOLLAR_IN_LABEL
 
@@ -162,20 +200,73 @@
 #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);			\
+/* Switch into a generic section.  */
+#undef TARGET_ASM_NAMED_SECTION
+#define TARGET_ASM_NAMED_SECTION  irix_asm_named_section
+
+/* Define functions to read the name and flags of the current section.
+   They are used by irix_asm_output_align.  */
+
+#undef EXTRA_SECTION_FUNCTIONS
+#define EXTRA_SECTION_FUNCTIONS						\
+const char *								\
+current_section_name (void)						\
+{									\
+  switch (in_section)							\
+    {									\
+    case no_section:	return NULL;					\
+    case in_text:	return ".text";					\
+    case in_data:	return ".data";					\
+    case in_bss:	return ".bss";					\
+    case in_readonly_data:						\
+      if (mips_abi != ABI_32 && mips_abi != ABI_O64)			\
+	return ".rodata";						\
+      else								\
+	return ".rdata";						\
+    case in_named:							\
+      return in_named_name;						\
+    }									\
+  abort ();								\
+}									\
+									\
+unsigned int								\
+current_section_flags (void)						\
+{									\
+  switch (in_section)							\
+    {									\
+    case no_section:	return 0;					\
+    case in_text:	return SECTION_CODE;				\
+    case in_data:	return SECTION_WRITE;				\
+    case in_bss:	return SECTION_WRITE | SECTION_BSS;		\
+    case in_readonly_data: return 0;					\
+    case in_named:	return get_named_section_flags (in_named_name);	\
+    }									\
+  abort ();								\
+}
+
+/* Some assemblers have a bug that causes backslash escaped chars in .ascii
+   to be misassembled, so avoid it by using .byte instead.  Write the original
+   string in a comment, partly to improve readability and partly for the sake
+   of scan-assembler-type tests.  */
+#undef ASM_OUTPUT_ASCII
+#define ASM_OUTPUT_ASCII(FILE,PTR,LEN)				\
+do {								\
+  const unsigned char *s_ = (const unsigned char *)(PTR);	\
+  unsigned len_ = (LEN);					\
+  unsigned i_;							\
+  mips_output_ascii (FILE, (const char *) s_, len_, "\t# ");	\
+  for (i_ = 0; i_ < len_; s_++, i_++)				\
+    {								\
+      if ((i_ % 8) == 0)					\
+	fputs ("\n\t.byte\t", (FILE));				\
+      fprintf ((FILE), "%s0x%x", (i_%8?",":""), *s_);		\
+    }								\
+  fputs ("\n", (FILE));						\
 } while (0)
 
 /* Also do this for libcalls.  */
-#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)	\
-  mips_output_external_libcall (FILE, XSTR (FUN, 0))
+#undef TARGET_ASM_EXTERNAL_LIBCALL
+#define TARGET_ASM_EXTERNAL_LIBCALL irix_output_external_libcall
 
 /* This does for functions what ASM_DECLARE_OBJECT_NAME does for variables.
    This is used indirectly by ASM_OUTPUT_EXTERNAL.  */
@@ -206,3 +297,8 @@
 
 /* Handle #pragma weak and #pragma pack.  */
 #define HANDLE_SYSV_PRAGMA 1
+
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS \
+  { "irix_startfile_spec", IRIX_STARTFILE_SPEC }, \
+  { "irix_endfile_spec", IRIX_ENDFILE_SPEC },

==== //depot/projects/mips/contrib/gcc/config/mips/iris5gas.h#4 (text+ko) ====

@@ -1,21 +1,31 @@
-/* Definitions of target machine for GNU compiler.  Irix version 5 with gas.  */
+/* Definitions of target machine for GNU compiler.  IRIX version 5 with gas.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+   Free Software Foundation, Inc.
+
+   This file is part of GCC.
+
+   GCC 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.
+
+   GCC 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 GCC; see the file COPYING.  If not, write to
+   the Free Software Foundation, 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
 
-/* Enable debugging.  */
-#define DBX_DEBUGGING_INFO 1
-#define DWARF2_DEBUGGING_INFO 1
-#define SDB_DEBUGGING_INFO 1
-#define MIPS_DEBUGGING_INFO 1
+/* Reenable debugging.  */
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 
 /* GNU as does handle DWARF2 directives.  */
 #undef DWARF2_UNWIND_INFO
 #define DWARF2_UNWIND_INFO 1
 
-/* Override mips.h version to match DWARF 2 default.  */
-#undef MDEBUG_ASM_SPEC
-#define MDEBUG_ASM_SPEC "%{gstabs*|gcoff*:-mdebug} \
-%{!gstabs*:%{!gcoff*:-no-mdebug}}"
-
 /* Override iris5.h version to invoke [cd]tors and register eh frame
    information.  */
 #undef LINK_SPEC
@@ -33,17 +43,10 @@
 /* Override iris5.h versions to include crtbegin.o and crtend.o.  */
 
 #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}}} \
-crtbegin.o%s"
+#define STARTFILE_SPEC "%(irix_startfile_spec) crtbegin.o%s"
 
 #undef ENDFILE_SPEC
-#define ENDFILE_SPEC "crtend.o%s %{!shared:crtn.o%s}"
+#define ENDFILE_SPEC "crtend.o%s %(irix_endfile_spec)"
 
 /* Irix 5 does not have some strange restrictions that Irix 3 had.  */
 #undef SET_FILE_NUMBER
@@ -55,30 +58,26 @@
    avoid conflicting with ELF directives.  These are only recognized
    by gas, anyhow, not the native assembler.  */
 #undef PUT_SDB_SIZE
-#define PUT_SDB_SIZE(a)                                       \
-do {                                                  \
-  extern FILE *asm_out_text_file;                     \
-  fprintf (asm_out_text_file, "\t.esize\t");          \
-  fprintf (asm_out_text_file, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) (a)); \
-  fprintf (asm_out_text_file, ";");                   \
+#define PUT_SDB_SIZE(a)					\
+do {							\
+  fprintf (asm_out_file, "\t.esize\t" HOST_WIDE_INT_PRINT_DEC ";", \
+ 	   (HOST_WIDE_INT) (a));			\
 } while (0)
 
 #undef PUT_SDB_TYPE
-#define PUT_SDB_TYPE(a)                                       \
-do {                                                  \
-  extern FILE *asm_out_text_file;                     \
-  fprintf (asm_out_text_file, "\t.etype\t0x%x;", (a));        \
+#define PUT_SDB_TYPE(a)					\
+do {							\
+  fprintf (asm_out_file, "\t.etype\t0x%x;", (a));	\
 } while (0)
 
-/* Switch into a generic section.  */
-#undef TARGET_ASM_NAMED_SECTION
-#define TARGET_ASM_NAMED_SECTION  default_elf_asm_named_section
-
 /* Add -g to mips.h default to avoid confusing gas with local symbols
    generated from stabs info.  */
 #undef NM_FLAGS
 #define NM_FLAGS "-Bng"
 
 /* Disable SHF_MERGE support.  Even if gas supports it, the IRIX ld does not
-   without a special elspec(5) file.  */
+   without a special elspec(5) file.
+
+   FIXME: Only do this if not using GNU ld.  */
 #undef HAVE_GAS_SHF_MERGE
+#define HAVE_GAS_SHF_MERGE 0

==== //depot/projects/mips/contrib/gcc/config/mips/iris6-o32-as.h#2 (text+ko) ====


==== //depot/projects/mips/contrib/gcc/config/mips/iris6-o32-gas.h#2 (text+ko) ====


==== //depot/projects/mips/contrib/gcc/config/mips/iris6-o32.h#2 (text+ko) ====


==== //depot/projects/mips/contrib/gcc/config/mips/iris6.h#4 (text+ko) ====

@@ -1,43 +1,38 @@
-/* Definitions of target machine for GNU compiler.  Iris version 6.
-   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003
+/* Definitions of target machine for GNU compiler.  IRIX version 6.
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
 
-This file is part of GNU CC.
+This file is part of GCC.
 
-GNU CC is free software; you can redistribute it and/or modify
+GCC 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,
+GCC 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
+along with GCC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* Let mips.c know we need the Irix6 functions.  */
-#define TARGET_IRIX6 1
+/* No more special IRIX 5 handling.  */
+#undef TARGET_IRIX5
+#define TARGET_IRIX5 0
 
 /* Default to -mabi=n32 and -mips3.  */
-#define MIPS_ISA_DEFAULT 3
-#define MIPS_ABI_DEFAULT ABI_N32
+#undef MULTILIB_DEFAULTS
 #define MULTILIB_DEFAULTS { "mabi=n32" }
 
-#ifndef TARGET_DEFAULT
-#define TARGET_DEFAULT (MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT)
-#endif
-
-#include "mips/iris5.h"
-
-/* Irix6 assembler does handle DWARF2 directives.  Override setting in
-   irix5.h file.  */
+/* The IRIX 6 O32 assembler cannot calculate label differences, while both
+   the N32/N64 assembler and gas can.  Override setting in iris5.h file.  */
 #undef DWARF2_UNWIND_INFO
+#define DWARF2_UNWIND_INFO !TARGET_SGI_O32_AS
 
-/* The Irix6 assembler will sometimes assign labels to the wrong
+/* The IRIX 6 assembler will sometimes assign labels to the wrong
    section unless the labels are within .ent/.end blocks.  Therefore,
    we avoid creating such labels.  */
 #define DWARF2_GENERATE_TEXT_SECTION_LABEL 0
@@ -58,19 +53,25 @@
 #undef WINT_TYPE_SIZE
 #define WINT_TYPE_SIZE 32
 
-/* For Irix 6, -mabi=64 implies TARGET_LONG64.  */
+/* For IRIX 6, -mabi=64 implies TARGET_LONG64.  */
 /* This is handled in override_options.  */
 
+/* Default to the mips2 ISA for the O32 ABI.  */
 #undef SUBTARGET_CC1_SPEC
-#define SUBTARGET_CC1_SPEC ""
+#define SUBTARGET_CC1_SPEC "%{mabi=32: %{!mips*: -mips2}}"
+
+/* #line directives let the O32 assembler create object files that cause the
+   O32 linker to crash.  */
+#undef SUBTARGET_CPP_SPEC
+#define SUBTARGET_CPP_SPEC "%{mabi=32: %{.S:-P}}"
 
-/* We must pass -D_LONGLONG always, even when -ansi is used, because irix6
+/* We must pass -D_LONGLONG always, even when -ansi is used, because IRIX 6

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503172339.j2HNdr2A025717>