[kaffe] CVS kaffe (guilhem): Compilation fixlets.

Kaffe CVS cvs-commits at kaffe.org
Tue Jun 21 08:24:00 PDT 2005


PatchSet 6653 
Date: 2005/06/21 15:17:03
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Compilation fixlets.

        * config/sparc/atomic-sparc64.h,
        config/mips/atomic.h: Removed gcc specific hacks. Moved into
        config-hacks.h

        * config/config-hacks.h
        (__builtin_expect, __builtin_trap): Define to identity if we are not
        using at least gcc3.

        * configure.ac: Check that we are on mips before enabling '-mips2'.

        * configure: Regenerated.

Members: 
	ChangeLog:1.4179->1.4180 
	configure:1.461->1.462 
	configure.ac:1.146->1.147 
	config/config-hacks.h:1.15->1.16 
	config/mips/atomic.h:1.3->1.4 
	config/sparc/atomic-sparc64.h:1.2->1.3 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4179 kaffe/ChangeLog:1.4180
--- kaffe/ChangeLog:1.4179	Tue Jun 21 14:42:21 2005
+++ kaffe/ChangeLog	Tue Jun 21 15:17:03 2005
@@ -1,5 +1,19 @@
 2005-06-21  Guilhem Lavaux  <guilhem at kaffe.org>
 
+	* config/sparc/atomic-sparc64.h,
+	config/mips/atomic.h: Removed gcc specific hacks. Moved into
+	config-hacks.h
+
+	* config/config-hacks.h
+	(__builtin_expect, __builtin_trap): Define to identity if we are not
+	using at least gcc3.
+
+	* configure.ac: Check that we are on mips before enabling '-mips2'.
+
+	* configure: Regenerated.
+
+2005-06-21  Guilhem Lavaux  <guilhem at kaffe.org>
+
 	* config/sparc/atomic-sparc64.h
 	(__builtin_expect): Do not take into account expect if we are not
 	using gcc or it is not at least gcc3.
Index: kaffe/configure
diff -u kaffe/configure:1.461 kaffe/configure:1.462
--- kaffe/configure:1.461	Tue Jun 21 12:56:32 2005
+++ kaffe/configure	Tue Jun 21 15:17:06 2005
@@ -33089,7 +33089,7 @@
 
 echo "$as_me:$LINENO: checking whether to enable MIPS II instructions" >&5
 echo $ECHO_N "checking whether to enable MIPS II instructions... $ECHO_C" >&6
-if test x"$enable_mips2" != x"no"; then
+if test x"$enable_mips2" != x"no" -a x"$Khost_cpu" = x"mips"; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_MIPSII_INSTRUCTIONS 1
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.146 kaffe/configure.ac:1.147
--- kaffe/configure.ac:1.146	Tue Jun 21 12:56:38 2005
+++ kaffe/configure.ac	Tue Jun 21 15:17:15 2005
@@ -1235,7 +1235,7 @@
                              [Disable MIPS II instructions]))
 
 AC_MSG_CHECKING([whether to enable MIPS II instructions])
-if test x"$enable_mips2" != x"no"; then
+if test x"$enable_mips2" != x"no" -a x"$Khost_cpu" = x"mips"; then
     AC_DEFINE([HAVE_MIPSII_INSTRUCTIONS], 1, [Enable MIPS II instructions])
     enable_mips2=yes
     case "$Khost_os" in
Index: kaffe/config/config-hacks.h
diff -u kaffe/config/config-hacks.h:1.15 kaffe/config/config-hacks.h:1.16
--- kaffe/config/config-hacks.h:1.15	Fri May 13 17:08:47 2005
+++ kaffe/config/config-hacks.h	Tue Jun 21 15:17:16 2005
@@ -77,3 +77,12 @@
 #define DOUBLE_ORDER_OPPOSITE
 #endif
 
+/*
+ * GCC before 3.0 does not support explicit branch optimization.
+ */
+#if !defined(__GNUC__) || (__GNUC__ < 3)
+#define __builtin_expect(a,b) (a)
+
+#include <stdlib.h>
+#define __builtin_trap(a) abort()
+#endif
Index: kaffe/config/mips/atomic.h
diff -u kaffe/config/mips/atomic.h:1.3 kaffe/config/mips/atomic.h:1.4
--- kaffe/config/mips/atomic.h:1.3	Tue Jun 21 12:56:41 2005
+++ kaffe/config/mips/atomic.h	Tue Jun 21 15:17:16 2005
@@ -24,10 +24,6 @@
 typedef intmax_t atomic_max_t;
 typedef uintmax_t uatomic_max_t;
 
-#if !defined(__GNUC__) || (__GNUC__ <= 2 && __GNUC_MINOR__ <= 95)
-#define __builtin_trap abort
-#endif
-
 /*
  * MIPS does not have byte and halfword forms of load linked and store
  * conditional. So for MIPS we stub out the 8- and 16-bit forms.
Index: kaffe/config/sparc/atomic-sparc64.h
diff -u kaffe/config/sparc/atomic-sparc64.h:1.2 kaffe/config/sparc/atomic-sparc64.h:1.3
--- kaffe/config/sparc/atomic-sparc64.h:1.2	Tue Jun 21 14:42:26 2005
+++ kaffe/config/sparc/atomic-sparc64.h	Tue Jun 21 15:17:16 2005
@@ -45,11 +45,6 @@
 typedef intmax_t atomic_max_t;
 typedef uintmax_t uatomic_max_t;
 
-#if !defined(__GNUC__) || (__GNUC__ < 3)
-#define __builtin_expect(a,b) a
-#endif
-
-
 #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
   (abort (), (__typeof (*mem)) 0)
 



More information about the kaffe mailing list