This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

libstdc++-v3 fix for mips64-linux-gnu


This patch matches a change that went into glibc a few days ago.  It
prevents .mips2 from taking effect when compiling for ABIs that may
have 64-bit addresses, since .mips2 would then load only 32-bit
addresses from GOTs and other such lossages.  Ok to install?

Index: libstdc++-v3/ChangeLog
from  Alexandre Oliva  <aoliva at redhat dot com>

	* config/cpu/mips/atomicity.h (__exchange_and_add, __atomic_add):
	Only .set mips2 for the o32 ABI.

Index: libstdc++-v3/config/cpu/mips/atomicity.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/cpu/mips/atomicity.h,v
retrieving revision 1.2
diff -u -p -r1.2 atomicity.h
--- libstdc++-v3/config/cpu/mips/atomicity.h 8 Jul 2002 19:41:57 -0000 1.2
+++ libstdc++-v3/config/cpu/mips/atomicity.h 20 Mar 2003 01:53:04 -0000
@@ -1,6 +1,6 @@
 // Low-level functions for atomic operations.
 
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 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
@@ -42,7 +42,9 @@ __exchange_and_add (volatile _Atomic_wor
     ("/* Inline exchange & add */\n\t"
      "1:\n\t"
      ".set	push\n\t"
+#if _MIPS_SIM == _MIPS_SIM_ABI32
      ".set	mips2\n\t"
+#endif
      "ll	%0,%3\n\t"
      "addu	%1,%4,%0\n\t"
      "sc	%1,%2\n\t"
@@ -66,7 +68,9 @@ __atomic_add (volatile _Atomic_word *__m
     ("/* Inline atomic add */\n\t"
      "1:\n\t"
      ".set	push\n\t"
+#if _MIPS_SIM == _MIPS_SIM_ABI32
      ".set	mips2\n\t"
+#endif
      "ll	%0,%2\n\t"
      "addu	%0,%3,%0\n\t"
      "sc	%0,%1\n\t"
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist                Professional serial bug killer

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