From 797393959a452506bb1f44627fdaff7914f73d1c Mon Sep 17 00:00:00 2001
From: rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sat, 6 Nov 2004 22:34:00 +0000
Subject: [PATCH] 	PR target/16830 	* config/mips/mips.h
 (TARGET_CPU_CPP_BUILTINS): Don't define the 	R3000 and R4000 macros on
 IRIX.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90195 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog          |  6 ++++++
 gcc/config/mips/mips.h | 26 ++++++++++++++++----------
 2 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 27252b0568d0..eac112a357a6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-06  Richard Sandiford  <rsandifo@redhat.com>
+
+	PR target/16830
+	* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Don't define the
+	R3000 and R4000 macros on IRIX.
+
 2004-11-06  Andreas Schwab  <schwab@suse.de>
 
 	PR target/16286
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 974817f85188..2b4c62ef6f0a 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -393,18 +393,24 @@ extern const struct mips_cpu_info *mips_tune_info;
       if (!flag_iso)						\
 	builtin_define ("mips");				\
 								\
-      /* Treat _R3000 and _R4000 like register-size defines,	\
-	 which is how they've historically been used.  */	\
       if (TARGET_64BIT)						\
+	builtin_define ("__mips64");				\
+								\
+      if (!TARGET_IRIX)						\
 	{							\
-	  builtin_define ("__mips64");     			\
-	  builtin_define_std ("R4000");				\
-	  builtin_define ("_R4000");				\
-	}							\
-      else							\
-	{							\
-	  builtin_define_std ("R3000");				\
-	  builtin_define ("_R3000");				\
+	  /* Treat _R3000 and _R4000 like register-size		\
+	     defines, which is how they've historically		\
+	     been used.  */					\
+	  if (TARGET_64BIT)					\
+	    {							\
+	      builtin_define_std ("R4000");			\
+	      builtin_define ("_R4000");			\
+	    }							\
+	  else							\
+	    {							\
+	      builtin_define_std ("R3000");			\
+	      builtin_define ("_R3000");			\
+	    }							\
 	}							\
       if (TARGET_FLOAT64)					\
 	builtin_define ("__mips_fpr=64");			\
-- 
GitLab