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]
Other format: [Raw text]

[PATCH] atomicity for mips patch


Since we can't depend (other than a configure test) whether or not sc/ll
are actually there, keep it disabled for mips. Enable it for mips-linux
since the kernel will emulate sc/ll if necessary.

Comments? Objections?

-eric

-- 
I will not carve gods

2002-07-02  Eric Christopher  <echristo@redhat.com>

	* configure.target: Fix comment for mips atomicity. Add
	mips*-*-linux* target, enable atomic operations there.
	* config/cpu/mips/atomicity.h: Fix comments, remove
	#ifndef/#endif.

Index: configure.target
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.target,v
retrieving revision 1.45
diff -u -p -w -r1.45 configure.target
--- configure.target	24 Jun 2002 05:47:02 -0000	1.45
+++ configure.target	3 Jul 2002 00:13:01 -0000
@@ -78,7 +78,8 @@ case "${target_cpu}" in
     cpu_include_dir="cpu/m68k"
     ;;
   mips)
-    # This is only until the mips routines are fixed.
+    # MIPS chips are unreliable as to sc/ll support. By default
+    # don't use atomic instructions and override for the OS.
     cpu_include_dir="cpu/generic"
     ;;
   mmix)
@@ -202,5 +203,7 @@ case "${target}" in
   alpha*-*-*osf5*)
     CPULIMITSH="os/osf/osf5.0"
     ;;
+  mips*-*-linux*)
+    ATOMICITYH="cpu/mips"
+    ;;
 esac
-
Index: config/cpu/mips/atomicity.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/cpu/mips/atomicity.h,v
retrieving revision 1.1
diff -u -p -w -r1.1 atomicity.h
--- config/cpu/mips/atomicity.h	24 Jun 2002 05:48:02 -0000	1.1
+++ config/cpu/mips/atomicity.h	3 Jul 2002 00:13:01 -0000
@@ -1,6 +1,6 @@
-// Low-level functions for atomic operations. MIPS II version.
+// Low-level functions for atomic operations.
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -29,9 +29,6 @@
 
 #ifndef _BITS_ATOMICITY_H 
 #define _BITS_ATOMICITY_H 1
-
-// #include <sgidefs.h>
-// #ifdef (_MIPS_ISA_MIPS2)
 
 typedef int _Atomic_word;
 


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