This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: Minor IRIX configuration cleanup


Checking the IRIX configurations, I found and fixed a few minor issues,
most of them in comments.  I'll bootstrap in combination with another patch
I'm working on.

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

Email: ro@TechFak.Uni-Bielefeld.DE


Wed May 30 18:33:24 2001  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* config/mips/iris6gld.h: Update copyright.
	Correct IRIX spelling.

	* config/mips/iris6.h: Update copyright.
	Correct IRIX spelling.
	Correct DWARF 2 spelling.
	(SUBTARGET_CPP_SPEC): Simplify.

	* config/mips/iris5.h: Update copyright.
	Correct IRIX spelling.

	* config/mips/iris4.h: Correct IRIX spelling.
 	(ASM_OUTPUT_ASCII): Avoid trailing _ in variable names.

	* config/mips/iris3.h: Update copyright.
	Correct IRIX spelling.

	* config/mips/abi64.h Update copyright.
	(SETUP_INCOMING_VARARGS): Fixup whitespace.
	(LONG_MAX_SPEC): Simplify.

Index: gcc/config/mips/abi64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/abi64.h,v
retrieving revision 1.15
diff -u -p -r1.15 abi64.h
--- abi64.h	2001/01/24 14:01:26	1.15
+++ abi64.h	2001/05/30 18:52:03
@@ -1,5 +1,6 @@
 /* Definitions of target machine for GNU compiler.  64 bit ABI support.
-   Copyright (C) 1994, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000,
+   2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -105,9 +109,10 @@ extern struct rtx_def *mips_function_val
    For stdarg, we do not need to save the current argument, because it
    is a real argument.  */
 #define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL)	\
-{ unsigned int mips_off							\
+{									\
+  unsigned int mips_off							\
     = (! current_function_varargs) && (! (CUM).last_arg_fp);		\
-    unsigned int mips_fp_off						\
+  unsigned int mips_fp_off						\
     = (! current_function_varargs) && ((CUM).last_arg_fp); 		\
   if (((mips_abi != ABI_32 && mips_abi != ABI_O64)			\
        && (CUM).arg_words < MAX_ARGS_IN_REGISTERS - mips_off)		\
@@ -222,7 +227,7 @@ extern struct rtx_def *mips_function_val
    are the same as the checks in override_options in mips.c that determines
    whether MASK_LONG64 will be set.
 
-   This does not handle inappropriate options or ununusal option
+   ??? This does not handle inappropriate options or ununusal option
    combinations.  */
 
 #undef LONG_MAX_SPEC
@@ -231,9 +236,7 @@ extern struct rtx_def *mips_function_val
   "%{!mabi=32:%{!mabi=n32:%{!mlong32:%{!mgp32:%{!mips1:%{!mips2:-D__LONG_MAX__=9223372036854775807L}}}}}}"
 #else
 #define LONG_MAX_SPEC \
-  "%{mabi=64:-D__LONG_MAX__=9223372036854775807L} \
-   %{mlong64:-D__LONG_MAX__=9223372036854775807L} \
-   %{mgp64:-D__LONG_MAX__=9223372036854775807L}"
+  "%{mabi=64|mlong64|mgp64:-D__LONG_MAX__=9223372036854775807L}"
 #endif
 
 /* ??? Unimplemented stuff follows.  */
Index: gcc/config/mips/iris3.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/iris3.h,v
retrieving revision 1.3
diff -u -p -r1.3 iris3.h
--- iris3.h	2000/11/02 23:29:11	1.3
+++ iris3.h	2001/05/30 18:52:03
@@ -1,5 +1,6 @@
-/* Definitions of target machine for GNU compiler.  Iris version.
-   Copyright (C) 1991, 1993, 1995, 1996, 1998 Free Software Foundation, Inc.
+/* Definitions of target machine for GNU compiler.  IRIX version 3.
+   Copyright (C) 1991, 1993, 1995, 1996, 1998, 2000,
+   2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -37,12 +38,12 @@ Boston, MA 02111-1307, USA.  */
 #define MACHINE_TYPE	"Silicon Graphics Mips"
 
 /* Always use 1 for .file number.  I [meissner@osf.org] wonder why
-   IRIS needs this.  */
+   IRIX needs this.  */
 
 #define SET_FILE_NUMBER() num_source_filenames = 1
 
 /* Put out a label after a .loc.  I [meissner@osf.org] wonder why
-   IRIS needs this.  */
+   IRIX needs this.  */
 
 #define LABEL_AFTER_LOC(STREAM) fprintf (STREAM, "LM%d:\n", ++sym_lineno)
 
Index: gcc/config/mips/iris4.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/iris4.h,v
retrieving revision 1.4.14.2
diff -u -p -r1.4.14.2 iris4.h
--- iris4.h	2001/03/24 01:21:11	1.4.14.2
+++ iris4.h	2001/05/30 18:52:03
@@ -1,4 +1,4 @@
-/* Definitions of target machine for GNU compiler.  Iris version 4.
+/* Definitions of target machine for GNU compiler.  IRIX version 4.
    Copyright (C) 1991, 1993, 1999, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
@@ -32,14 +32,14 @@ Boston, MA 02111-1307, USA.  */
 #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_;							\
-  for (i_ = 0; i_ < len_; s_++, i_++)				\
+  const unsigned char *s = (const unsigned char *)(PTR);	\
+  unsigned len = (LEN);					\
+  unsigned i;							\
+  for (i = 0; i < len; s++, i++)				\
     {								\
-      if ((i_ % 8) == 0)					\
+      if ((i % 8) == 0)					\
 	fputs ("\n\t.byte\t", (FILE));				\
-      fprintf ((FILE), "%s0x%x", (i_%8?",":""), *s_);		\
+      fprintf ((FILE), "%s0x%x", (i%8?",":""), *s);		\
     }								\
   fputs ("\n", (FILE));						\
 } while (0)
Index: gcc/config/mips/iris5.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/iris5.h,v
retrieving revision 1.8.4.1
diff -u -p -r1.8.4.1 iris5.h
--- iris5.h	2001/03/15 18:55:59	1.8.4.1
+++ iris5.h	2001/05/30 18:52:03
@@ -1,5 +1,6 @@
-/* Definitions of target machine for GNU compiler.  Iris version 5.
-   Copyright (C) 1993, 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
+/* Definitions of target machine for GNU compiler.  IRIX version 5.
+   Copyright (C) 1993, 1995, 1996, 1998, 1999, 2000,
+   2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -27,14 +28,14 @@ Boston, MA 02111-1307, USA.  */
 #include "mips/mips.h"
 #include "mips/iris4.h"
 
-/* Irix 5 doesn't use COFF, so disable special COFF handling in collect2.c.  */
+/* 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).  */
@@ -134,7 +135,7 @@ Boston, MA 02111-1307, USA.  */
 #undef MACHINE_TYPE
 #define MACHINE_TYPE "SGI running IRIX 5.x"
 
- /* Dollar signs are OK in Irix5 but not in Irix3.  */
+ /* Dollar signs are OK in IRIX 5 but not in IRIX 3.  */
 #undef DOLLARS_IN_IDENTIFIERS
 #undef NO_DOLLAR_IN_LABEL
 
@@ -143,7 +144,7 @@ Boston, MA 02111-1307, USA.  */
 #undef MIPS_DEFAULT_GVALUE
 #define MIPS_DEFAULT_GVALUE 0
 
-/* In Irix 5, we must output a `.global name .text' directive for every used
+/* 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.  */
Index: gcc/config/mips/iris6.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/iris6.h,v
retrieving revision 1.28.2.3
diff -u -p -r1.28.2.3 iris6.h
--- iris6.h	2001/05/23 06:55:03	1.28.2.3
+++ iris6.h	2001/05/30 18:57:26
@@ -1,5 +1,6 @@
-/* Definitions of target machine for GNU compiler.  Iris version 6.
-   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+/* Definitions of target machine for GNU compiler.  IRIX version 6.
+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+   2001 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -30,22 +31,22 @@ Boston, MA 02111-1307, USA.  */
 #include "mips/iris5.h"
 #include "mips/abi64.h"
 
-/* Irix6 assembler does handle DWARF2 directives.  Override setting in
- irix5.h file.  */
+/* IRIX 6 assembler does handle DWARF 2 directives.  Override setting in
+   irix5.h file.  */
 #undef DWARF2_UNWIND_INFO
 
-/* 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
 
-/* For Irix 6, -mabi=64 implies TARGET_LONG64.  */
+/* For IRIX 6, -mabi=64 implies TARGET_LONG64.  */
 /* This is handled in override_options.  */
 
 #undef SUBTARGET_CC1_SPEC
 #define SUBTARGET_CC1_SPEC ""
 
-/* 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
    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.  */
@@ -84,36 +84,32 @@ Boston, MA 02111-1307, USA.  */
 %{mabi=64: -D_ABI64=3 -D_MIPS_SIM=_ABI64} \
 %{!mabi*: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \
 %{!mint64: -D_MIPS_SZINT=32}%{mint64: -D_MIPS_SZINT=64} \
-%{mabi=32: -D_MIPS_SZLONG=32} \
-%{mabi=n32: -D_MIPS_SZLONG=32} \
+%{mabi=32|mabi=n32: -D_MIPS_SZLONG=32} \
 %{mabi=64: -D_MIPS_SZLONG=64} \
 %{!mabi*: -D_MIPS_SZLONG=32} \
-%{mabi=32: -D_MIPS_SZPTR=32} \
-%{mabi=n32: -D_MIPS_SZPTR=32} \
+%{mabi=32|mabi=n32: -D_MIPS_SZPTR=32} \
 %{mabi=64: -D_MIPS_SZPTR=64} \
 %{!mabi*: -D_MIPS_SZPTR=32} \
 %{!mips1:%{!mips2: -D_COMPILER_VERSION=601}}		\
 %{!mips*: -U__mips -D__mips=3} \
-%{mabi=32: -U__mips64} \
-%{mabi=n32: -D__mips64} \
-%{mabi=64: -D__mips64} \
+%{mabi=32|mabi=n32|mabi=64: -U__mips64} \
 %{!mabi*: -D__mips64}"
 
-/* Irix 6 uses DWARF-2.  */
+/* IRIX 6 uses DWARF 2.  */
 #define DWARF2_DEBUGGING_INFO
 #define MIPS_DEBUGGING_INFO
 #undef PREFERRED_DEBUGGING_TYPE
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
 
-/* Force the generation of dwarf .debug_frame sections even if not
+/* Force the generation of DWARF .debug_frame sections even if not
    compiling -g.  This guarantees that we can unwind the stack. */
 #define DWARF2_FRAME_INFO 1
 /* The size in bytes of a DWARF field indicating an offset or length
-   relative to a debug info section, specified to be 4 bytes in the DWARF-2
+   relative to a debug info section, specified to be 4 bytes in the DWARF 2
    specification.  The SGI/MIPS ABI defines it to be the same as PTR_SIZE.  */
 #define DWARF_OFFSET_SIZE PTR_SIZE
 
-/* There is no GNU as port for Irix6 yet, so we set MD_EXEC_PREFIX so that
+/* There is no GNU as port for IRIX 6 yet, so we set MD_EXEC_PREFIX so that
    gcc will automatically find SGI as instead of searching the user's path.
    The latter can fail when building a cross compiler if the user has . in
    the path before /usr/bin, since then gcc will find and try to use the link
@@ -128,13 +124,13 @@ Boston, MA 02111-1307, USA.  */
 #undef MACHINE_TYPE
 #define MACHINE_TYPE "SGI running IRIX 6.x"
 
-/* Irix 5 stuff that we don't need for Irix 6.  */
+/* IRIX 5 stuff that we don't need for IRIX 6.  */
 /* ??? We do need this for the -mabi=32 switch though.  */
 #undef ASM_OUTPUT_UNDEF_FUNCTION
 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
 #undef ASM_DECLARE_FUNCTION_SIZE
 
-/* Stuff we need for Irix 6 that isn't in Irix 5.  */
+/* Stuff we need for IRIX 6 that isn't in IRIX 5.  */
 
 /* The SGI assembler doesn't like labels before the .ent, so we must output
    the .ent and function name here, which is the normal place for it.  */
@@ -200,7 +196,7 @@ Boston, MA 02111-1307, USA.  */
 
 #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0)
 
-/* Irix assembler does not support the init_priority C++ attribute.  */
+/* IRIX assembler does not support the init_priority C++ attribute.  */
 #undef SUPPORTS_INIT_PRIORITY
 #define SUPPORTS_INIT_PRIORITY 0
 
@@ -232,7 +228,7 @@ Boston, MA 02111-1307, USA.  */
 /* Must pass -G 0 to the assembler, otherwise we may get warnings about
    GOT overflow.  */
 /* ??? We pass -w to disable all assembler warnings.  The `label should be
-   inside .ent/.end block' warning that we get for DWARF II debug info labels
+   inside .ent/.end block' warning that we get for DWARF 2 debug info labels
    is particularly annoying.  */
 #undef SUBTARGET_MIPS_AS_ASM_SPEC
 #define SUBTARGET_MIPS_AS_ASM_SPEC "%{v:-show} -G 0 -w"
@@ -266,10 +262,13 @@ Boston, MA 02111-1307, USA.  */
 /* If we are included from crtstuff.c, these need to be plain strings.
    _MIPS_SZPTR is defined in SUBTARGET_CPP_SPEC above.  */
 #if _MIPS_SZPTR == 64
+
 #define CTORS_SECTION_ASM_OP "\t.section\t.ctors,1,2,0,8"
 #define DTORS_SECTION_ASM_OP "\t.section\t.dtors,1,2,0,8"
 #define EH_FRAME_SECTION_ASM_OP "\t.section\t.eh_frame,1,2,0,8"
+
 #else /* _MIPS_SZPTR != 64 */
+
 #define CTORS_SECTION_ASM_OP "\t.section\t.ctors,1,2,0,4"
 #define DTORS_SECTION_ASM_OP "\t.section\t.dtors,1,2,0,4"
 #define EH_FRAME_SECTION_ASM_OP "\t.section\t.eh_frame,1,2,0,4"
@@ -285,6 +284,7 @@ Boston, MA 02111-1307, USA.  */
   (Pmode == DImode ? "\t.section\t.dtors,1,2,0,8" : "\t.section\t.dtors,1,2,0,4")
 #define EH_FRAME_SECTION_ASM_OP \
   (Pmode == DImode ? "\t.section\t.eh_frame,1,2,0,8" : "\t.section\t.eh_frame,1,2,0,4")
+
 #endif /* defined (CRT_BEGIN) || defined (CRT_END) */
 
 /* A default list of other sections which we might be "in" at any given
@@ -450,7 +450,7 @@ do									\
  }									\
 while (0)
 
-/* Define the `__builtin_va_list' type for the ABI.  On Irix6, this
+/* Define the `__builtin_va_list' type for the ABI.  On IRIX 6, this
    type is `char *'.  */
 #undef BUILD_VA_LIST_TYPE
 #define BUILD_VA_LIST_TYPE(VALIST) \
@@ -481,7 +481,7 @@ do {									 \
 #define LOCAL_LABEL_PREFIX ((mips_abi == ABI_32 || mips_abi == ABI_O64) \
 			    ? "$" : ".")
 
-/* Profiling is supported via libprof1.a not -lc_p as in Irix 3.  */
+/* Profiling is supported via libprof1.a not -lc_p as in IRIX 3.  */
 /* ??? If no mabi=X option give, but a mipsX option is, then should depend
    on the mipsX option.  */
 #undef STARTFILE_SPEC
Index: gcc/config/mips/iris6gld.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/iris6gld.h,v
retrieving revision 1.7
diff -u -p -r1.7 iris6gld.h
--- iris6gld.h	2000/02/01 18:18:10	1.7
+++ iris6gld.h	2001/05/30 18:52:03
@@ -1,6 +1,6 @@
-/* Definitions of target machine for GNU compiler.  Iris version 6 with
+/* Definitions of target machine for GNU compiler.  IRIX version 6 with
    GNU ld.
-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
    Written by Mark Mitchell <mark@codesourcery.com>.
 
 This file is part of GNU CC.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]