This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
3.3.1 PATCH: Various IRIX 6 O32 fixes
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 26 Jun 2003 16:51:44 +0200 (MEST)
- Subject: 3.3.1 PATCH: Various IRIX 6 O32 fixes
Now that PR target/11013 has been fixed on the 3.3 branch, I'd like to
apply various minor fixes for problems in the mips-sgi-irix6o32
configuration to make it largely functional. All of them are already on
mainline, and don't affect anything but that configuration, so they are
low-risk. Since this configuration is new in gcc 3.3, they don't count as
regression fixes, though.
Bootstrapped on mips-sgi-irix6.5o32 (both with native as and gas 2.14)
without regressions, but fixed several testsuite failures.
Ok for 3.3 branch?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
2003-06-25 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* configure.in: Don't pass --with-stabs for mips*-sgi-irix6*o32.
gcc:
* config/mips/mips.md (trap): Use break 0 when !TARGET_GAS.
* config/mips/iris6-o32.h (MIPS_ISA_DEFAULT): Remove.
(MIPS_CPU_STRING_DEFAULT): Redefine to mips2.
* config/mips/mips.c (TARGET_ASM_UNALIGNED_DI_OP) [TARGET_IRIX5 &&
!TARGET_IRIX6]: Define as NULL.
* config/mips/iris5gas.h (MDEBUG_ASM_SPEC): Override to match
DWARF 2 default.
* config/mips/dbxmdebug.h: New file.
* config.gcc (mips-sgi-irix6*o32, mips-sgi-irix5*): Use it with
gas and --with-stabs.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.191.2.1
diff -u -p -r1.191.2.1 configure.in
--- configure.in 9 Mar 2003 17:05:46 -0000 1.191.2.1
+++ configure.in 26 Jun 2003 12:05:21 -0000
@@ -1236,10 +1236,6 @@ esac
# Default to using --with-stabs for certain targets.
if test x${with_stabs} = x ; then
case "${target}" in
- mips*-*-irix6*o32)
- with_stabs=yes;
- withoptions="${withoptions} --with-stabs"
- ;;
mips*-*-irix6*)
;;
mips*-*-* | alpha*-*-osf*)
Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.266.2.8
diff -u -p -r1.266.2.8 config.gcc
--- gcc/config.gcc 3 Jun 2003 08:51:50 -0000 1.266.2.8
+++ gcc/config.gcc 26 Jun 2003 12:05:22 -0000
@@ -1788,7 +1788,7 @@ mips-sgi-irix6*o32) # SGI System V.4.,
tm_file="mips/iris5.h mips/iris5gas.h mips/iris6-o32-gas.h"
if test x$stabs = xyes
then
- tm_file="${tm_file} dbx.h"
+ tm_file="${tm_file} dbx.h mips/dbxmdebug.h"
fi
tmake_file=mips/t-iris5-gas
else
@@ -1862,7 +1862,7 @@ mips-sgi-irix5*) # SGI System V.4., IRI
tm_file="mips/iris5.h mips/iris5gas.h"
if test x$stabs = xyes
then
- tm_file="${tm_file} dbx.h"
+ tm_file="${tm_file} dbx.h mips/dbxmdebug.h"
fi
tmake_file=mips/t-iris5-gas
else
Index: gcc/config/mips/dbxmdebug.h
===================================================================
RCS file: gcc/config/mips/dbxmdebug.h
diff -N gcc/config/mips/dbxmdebug.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gcc/config/mips/dbxmdebug.h 26 Jun 2003 12:05:31 -0000
@@ -0,0 +1,6 @@
+/* Definitions of target machine for GNU compiler, for MIPS running IRIX 5
+ or IRIX 6 (O32 ABI) using the GNU assembler with stabs-in-mdebug. */
+
+/* Override iris5gas.h version again to retain mips.h default. */
+#undef MDEBUG_ASM_SPEC
+#define MDEBUG_ASM_SPEC "%{!gdwarf*:-mdebug} %{gdwarf*:-no-mdebug}"
Index: gcc/config/mips/iris5gas.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/iris5gas.h,v
retrieving revision 1.10
diff -u -p -r1.10 iris5gas.h
--- gcc/config/mips/iris5gas.h 29 Aug 2002 21:40:15 -0000 1.10
+++ gcc/config/mips/iris5gas.h 26 Jun 2003 12:05:31 -0000
@@ -11,6 +11,11 @@
#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
Index: gcc/config/mips/iris6-o32.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/iris6-o32.h,v
retrieving revision 1.2
diff -u -p -r1.2 iris6-o32.h
--- gcc/config/mips/iris6-o32.h 19 Jul 2002 21:58:12 -0000 1.2
+++ gcc/config/mips/iris6-o32.h 26 Jun 2003 12:05:31 -0000
@@ -2,8 +2,8 @@
(O32 ABI). */
/* The O32 ABI on IRIX 6 defaults to the mips2 ISA. */
-#undef MIPS_ISA_DEFAULT
-#define MIPS_ISA_DEFAULT 2
+#undef MIPS_CPU_STRING_DEFAULT
+#define MIPS_CPU_STRING_DEFAULT "mips2"
/* Specify wchar_t and wint_t types. */
#undef WCHAR_TYPE
Index: gcc/config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.241.2.3
diff -u -p -r1.241.2.3 mips.c
--- gcc/config/mips/mips.c 25 Jun 2003 06:50:55 -0000 1.241.2.3
+++ gcc/config/mips/mips.c 26 Jun 2003 12:05:34 -0000
@@ -644,8 +644,10 @@ const struct mips_cpu_info mips_cpu_info
#define TARGET_ASM_UNALIGNED_HI_OP "\t.align 0\n\t.half\t"
#undef TARGET_ASM_UNALIGNED_SI_OP
#define TARGET_ASM_UNALIGNED_SI_OP "\t.align 0\n\t.word\t"
+/* The IRIX 6 O32 assembler gives an error for `align 0; .dword', contrary
+ to the documentation, so disable it. */
#undef TARGET_ASM_UNALIGNED_DI_OP
-#define TARGET_ASM_UNALIGNED_DI_OP "\t.align 0\n\t.dword\t"
+#define TARGET_ASM_UNALIGNED_DI_OP NULL
#endif
#undef TARGET_ASM_FUNCTION_PROLOGUE
Index: gcc/config/mips/mips.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.md,v
retrieving revision 1.153.2.3
diff -u -p -r1.153.2.3 mips.md
--- gcc/config/mips/mips.md 9 Jun 2003 21:37:52 -0000 1.153.2.3
+++ gcc/config/mips/mips.md 26 Jun 2003 12:05:36 -0000
@@ -559,7 +559,8 @@
{
if (ISA_HAS_COND_TRAP)
return \"teq\\t$0,$0\";
- else if (TARGET_MIPS16)
+ /* The IRIX 6 O32 assembler requires the first break operand. */
+ else if (TARGET_MIPS16 || ! TARGET_GAS)
return \"break 0\";
else
return \"break\";