[kaffe] CVS kaffe (dalibor): Merged in compare and exchange from glibc for ia64

Kaffe CVS cvs-commits at kaffe.org
Sat Jul 3 17:07:56 PDT 2004


PatchSet 4885 
Date: 2004/07/03 23:57:14
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Merged in compare and exchange from glibc for ia64

2004-07-03  Dalibor Topic  <robilad at kaffe.org>

        * config/ia64/atomicity.h:
        New file, taken from glibc 2.3.2.

        * THIRDPARTY:
        Added ia64 compare_and_swap.

        * config/Makefile.am:
        Added ia64/atomicity.h.

        * config/Makefile.in:
        Regenerated.

        * config/ia64/common.h:
        Use atomicity.h.

Members: 
	ChangeLog:1.2451->1.2452 
	THIRDPARTY:1.18->1.19 
	config/Makefile.am:1.42->1.43 
	config/Makefile.in:1.135->1.136 
	config/ia64/atomicity.h:INITIAL->1.1 
	config/ia64/common.h:1.3->1.4 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2451 kaffe/ChangeLog:1.2452
--- kaffe/ChangeLog:1.2451	Sat Jul  3 21:15:36 2004
+++ kaffe/ChangeLog	Sat Jul  3 23:57:14 2004
@@ -1,5 +1,22 @@
 2004-07-03  Dalibor Topic  <robilad at kaffe.org>
 
+        * config/ia64/atomicity.h:
+	New file, taken from glibc 2.3.2.
+
+        * THIRDPARTY:
+	Added ia64 compare_and_swap.
+
+        * config/Makefile.am:
+	Added ia64/atomicity.h.
+
+        * config/Makefile.in:
+	Regenerated.
+
+        * config/ia64/common.h:
+	Use atomicity.h.
+
+2004-07-03  Dalibor Topic  <robilad at kaffe.org>
+
         * m4/compile_value.m4:
 	New file, taken from http://ac-archive.sf.net.
 
Index: kaffe/THIRDPARTY
diff -u kaffe/THIRDPARTY:1.18 kaffe/THIRDPARTY:1.19
--- kaffe/THIRDPARTY:1.18	Sat Jul  3 21:15:42 2004
+++ kaffe/THIRDPARTY	Sat Jul  3 23:57:16 2004
@@ -179,7 +179,7 @@
 
 At the time of writing, Kaffe uses getaddrinfo 1.6.1.
 
-* Alpha, ARM, M68k, S390 and SPARC atomic compare_and_swap, Linux
+* Alpha, ARM, ia64, M68k, S390 and SPARC atomic compare_and_swap, Linux
   sigcontextinfo
 
 Taken from GNU libc 2.3.2, which is licensed under the GNU Lesser General 
Index: kaffe/config/Makefile.am
diff -u kaffe/config/Makefile.am:1.42 kaffe/config/Makefile.am:1.43
--- kaffe/config/Makefile.am:1.42	Tue Jun 22 12:21:32 2004
+++ kaffe/config/Makefile.am	Sat Jul  3 23:57:17 2004
@@ -100,6 +100,7 @@
 	arm/threads.h \
 	arm/sysdepCallMethod.h \
 	arm/trampolines.c \
+	ia64/atomicity.h \
 	ia64/common.h \
 	ia64/linux/config.frag \
 	ia64/linux/md.c \
Index: kaffe/config/Makefile.in
diff -u kaffe/config/Makefile.in:1.135 kaffe/config/Makefile.in:1.136
--- kaffe/config/Makefile.in:1.135	Sat Jul  3 21:15:52 2004
+++ kaffe/config/Makefile.in	Sat Jul  3 23:57:17 2004
@@ -405,6 +405,7 @@
 	arm/threads.h \
 	arm/sysdepCallMethod.h \
 	arm/trampolines.c \
+	ia64/atomicity.h \
 	ia64/common.h \
 	ia64/linux/config.frag \
 	ia64/linux/md.c \
===================================================================
Checking out kaffe/config/ia64/atomicity.h
RCS:  /home/cvs/kaffe/kaffe/config/ia64/atomicity.h,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/config/ia64/atomicity.h	Sun Jul  4 00:07:55 2004
@@ -0,0 +1,32 @@
+/* Low-level functions for atomic operations.  IA-64 version.
+   Copyright (C) 2001 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _ATOMICITY_H
+#define _ATOMICITY_H	1
+
+#include <ia64intrin.h>
+
+static inline int
+__attribute__ ((unused))
+compare_and_swap (volatile long int *p, long int oldval, long int newval)
+{
+  return __sync_bool_compare_and_swap (p, oldval, newval);
+}
+
+#endif /* atomicity.h */
Index: kaffe/config/ia64/common.h
diff -u kaffe/config/ia64/common.h:1.3 kaffe/config/ia64/common.h:1.4
--- kaffe/config/ia64/common.h:1.3	Fri Jun 11 16:48:57 2004
+++ kaffe/config/ia64/common.h	Sat Jul  3 23:57:17 2004
@@ -12,6 +12,8 @@
 #ifndef __ia64_common_h
 #define __ia64_common_h
 
+#include "atomicity.h"
+
 #define NEED_STACK_ALIGN
 #define STACK_ALIGN(p)  ((((unsigned long)(p)) & 15) ^ (unsigned long)(p))
 
@@ -29,10 +31,7 @@
 #include <ia64intrin.h>
 #endif
 
-/* Intel Itanium Processor-specific ABI defines
-   __sync_bool_compare_and_swap primitive (7.4.3).  */
 #undef COMPARE_AND_EXCHANGE
-#define COMPARE_AND_EXCHANGE(A, O, N) \
-	__sync_bool_compare_and_swap((A), (O), (N))
+#define COMPARE_AND_EXCHANGE(A, O, N)  (compare_and_swap((long int*) A, (long int) O, (long int) N))
 
 #endif




More information about the kaffe mailing list