[kaffe] CVS kaffe (dalibor): Always inline sysdepCallMethod if gcc supports always_inline attribute

Kaffe CVS cvs-commits at kaffe.org
Tue Jun 22 08:31:47 PDT 2004


PatchSet 4858 
Date: 2004/06/22 15:07:44
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Always inline sysdepCallMethod if gcc supports always_inline attribute

2004-06-22  Dalibor Topic  <robilad at kaffe.org>

        * configure.ac:
        Check for always_inline attribute.

        * configure,
        config/config.h.in:
        Regenerated.

        * config/arm/sysdepCallMethod.h,
        config/i386/sysdepCallMethod.h,
        config/ia64/sysdepCallMethod.h,
        config/m68k/sysdepCallMethod.h,
        config/parisc/sysdepCallMethod.h,
        config/powerpc/sysdepCallMethod.h,
        config/s390/sysdepCallMethod.h,
        config/superh/sysdepCallMethod.h,
        config/x86_64/sysdepCallMethod.h:
        (sysdepCallMethod) Always inline if gcc supports it.

        * m4/gcc_attribute.m4:
        Added check for always_inline attribute.

        Reported by: Bastian Blank <waldi at debian.org>

Members: 
	ChangeLog:1.2425->1.2426 
	configure:1.334->1.335 
	configure.ac:1.33->1.34 
	config/config.h.in:1.106->1.107 
	config/arm/sysdepCallMethod.h:1.2->1.3 
	config/i386/sysdepCallMethod.h:1.2->1.3 
	config/ia64/sysdepCallMethod.h:1.2->1.3 
	config/m68k/sysdepCallMethod.h:1.1->1.2 
	config/parisc/sysdepCallMethod.h:1.3->1.4 
	config/powerpc/sysdepCallMethod.h:1.3->1.4 
	config/s390/sysdepCallMethod.h:1.3->1.4 
	config/superh/sysdepCallMethod.h:1.1->1.2 
	config/x86_64/sysdepCallMethod.h:1.1->1.2 
	m4/gcc_attribute.m4:1.3->1.4 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2425 kaffe/ChangeLog:1.2426
--- kaffe/ChangeLog:1.2425	Tue Jun 22 12:39:35 2004
+++ kaffe/ChangeLog	Tue Jun 22 15:07:44 2004
@@ -1,5 +1,30 @@
 2004-06-22  Dalibor Topic  <robilad at kaffe.org>
 
+        * configure.ac:
+	Check for always_inline attribute.
+
+        * configure,
+        config/config.h.in:
+	Regenerated.
+
+        * config/arm/sysdepCallMethod.h,
+        config/i386/sysdepCallMethod.h,
+        config/ia64/sysdepCallMethod.h,
+        config/m68k/sysdepCallMethod.h,
+        config/parisc/sysdepCallMethod.h,
+        config/powerpc/sysdepCallMethod.h,
+        config/s390/sysdepCallMethod.h,
+        config/superh/sysdepCallMethod.h,
+        config/x86_64/sysdepCallMethod.h:
+	(sysdepCallMethod) Always inline if gcc supports it.
+
+        * m4/gcc_attribute.m4:
+	Added check for always_inline attribute.
+
+	Reported by: Bastian Blank <waldi at debian.org>
+
+2004-06-22  Dalibor Topic  <robilad at kaffe.org>
+
 	* THIRDPARTY: Documented s390 compare and swap,
 	sigcontextinfo.h and BinReloc.
 
Index: kaffe/configure
diff -u kaffe/configure:1.334 kaffe/configure:1.335
--- kaffe/configure:1.334	Mon Jun 21 17:33:56 2004
+++ kaffe/configure	Tue Jun 22 15:07:45 2004
@@ -7438,6 +7438,85 @@
 
 
 
+ echo "$as_me:$LINENO: checking __attribute__((always_inline))" >&5
+echo $ECHO_N "checking __attribute__((always_inline))... $ECHO_C" >&6
+ if test "${cv_c_gcc_attribute_always_inline+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+extern int testfunction(int x) __attribute__((always_inline))
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cv_c_gcc_attribute_always_inline=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cv_c_gcc_attribute_always_inline=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ if test "x$cv_c_gcc_attribute_always_inline" = xyes; then
+  true
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GNUC25_ALWAYS_INLINE
+_ACEOF
+
+
+ else
+  true
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+ fi
+
+
+
+
+
+
+
+
+
  echo "$as_me:$LINENO: checking __attribute__((const))" >&5
 echo $ECHO_N "checking __attribute__((const))... $ECHO_C" >&6
  if test "${cv_c_gcc_attribute_const+set}" = set; then
@@ -8925,7 +9004,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 8928 "configure"' > conftest.$ac_ext
+  echo '#line 9007 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -10275,7 +10354,7 @@
 
 
 # Provide some information about the compiler.
-echo "$as_me:10278:" \
+echo "$as_me:10357:" \
      "checking for Fortran 77 compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -11313,11 +11392,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11316: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11395: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11320: \$? = $ac_status" >&5
+   echo "$as_me:11399: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -11546,11 +11625,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11549: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11628: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11553: \$? = $ac_status" >&5
+   echo "$as_me:11632: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -11606,11 +11685,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11609: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11688: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:11613: \$? = $ac_status" >&5
+   echo "$as_me:11692: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13790,7 +13869,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 13793 "configure"
+#line 13872 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13888,7 +13967,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 13891 "configure"
+#line 13970 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16071,11 +16150,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16074: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16153: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16078: \$? = $ac_status" >&5
+   echo "$as_me:16157: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -16131,11 +16210,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16134: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16213: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16138: \$? = $ac_status" >&5
+   echo "$as_me:16217: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -17492,7 +17571,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 17495 "configure"
+#line 17574 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17590,7 +17669,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 17593 "configure"
+#line 17672 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18417,11 +18496,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18420: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18499: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:18424: \$? = $ac_status" >&5
+   echo "$as_me:18503: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -18477,11 +18556,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18480: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18559: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:18484: \$? = $ac_status" >&5
+   echo "$as_me:18563: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -20515,11 +20594,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20518: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20597: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:20522: \$? = $ac_status" >&5
+   echo "$as_me:20601: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -20748,11 +20827,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20751: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20830: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:20755: \$? = $ac_status" >&5
+   echo "$as_me:20834: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -20808,11 +20887,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20811: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20890: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:20815: \$? = $ac_status" >&5
+   echo "$as_me:20894: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -22992,7 +23071,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 22995 "configure"
+#line 23074 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -23090,7 +23169,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 23093 "configure"
+#line 23172 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.33 kaffe/configure.ac:1.34
--- kaffe/configure.ac:1.33	Mon Jun 21 17:34:04 2004
+++ kaffe/configure.ac	Tue Jun 22 15:07:55 2004
@@ -137,6 +137,7 @@
 AX_CFLAGS_GCC_OPTION([-Winline])
 AX_CFLAGS_GCC_OPTION([-Wlong-long])
 AX_CFLAGS_GCC_OPTION([-Wdisabled-optimization])
+GCC_ATTRIBUTE_ALWAYS_INLINE
 GCC_ATTRIBUTE_CONST
 GCC_ATTRIBUTE_NORETURN
 GCC_ATTRIBUTE_UNUSED
Index: kaffe/config/config.h.in
diff -u kaffe/config/config.h.in:1.106 kaffe/config/config.h.in:1.107
--- kaffe/config/config.h.in:1.106	Mon Jun 21 17:34:08 2004
+++ kaffe/config/config.h.in	Tue Jun 22 15:07:56 2004
@@ -159,6 +159,10 @@
 /* Define to 1 if you have the <gmp.h> header file. */
 #undef HAVE_GMP_H
 
+/* Define if unconditional inlining of functions a la GCC 3.1 and higher are
+   available. */
+#undef HAVE_GNUC25_ALWAYS_INLINE
+
 /* Define if function attributes a la GCC 2.5 and higher are available. */
 #undef HAVE_GNUC25_ATTRIB
 
@@ -791,6 +795,18 @@
 #else
 #define FUNCATTR(x)
 #endif
+#endif
+
+/* GNU C constant functions, or null. */
+#ifndef ATTRALWAYS_INLINE
+#ifdef HAVE_GNUC25_ALWAYS_INLINE
+#define ATTRALWAYS_INLINE always_inline
+#else
+#define ATTRALWAYS_INLINE
+#endif
+#endif
+#ifndef ALWAYS_INLINE
+#define ALWAYS_INLINE FUNCATTR((ATTRALWAYS_INLINE))
 #endif
 
 /* GNU C constant functions, or null. */
Index: kaffe/config/arm/sysdepCallMethod.h
diff -u kaffe/config/arm/sysdepCallMethod.h:1.2 kaffe/config/arm/sysdepCallMethod.h:1.3
--- kaffe/config/arm/sysdepCallMethod.h:1.2	Fri Jun 11 16:48:57 2004
+++ kaffe/config/arm/sysdepCallMethod.h	Tue Jun 22 15:07:57 2004
@@ -30,6 +30,8 @@
  * software floating point libraries and the build tools.
  */
 #if defined(NEED_sysdepCallMethod)
+static inline void sysdepCallMethod(callMethodInfo *call) ALWAYS_INLINE;
+
 static inline void sysdepCallMethod(callMethodInfo *call) {
   int extraargs[(call->nrargs>4)?(call->nrargs-4):0];
   switch(call->nrargs) {
Index: kaffe/config/i386/sysdepCallMethod.h
diff -u kaffe/config/i386/sysdepCallMethod.h:1.2 kaffe/config/i386/sysdepCallMethod.h:1.3
--- kaffe/config/i386/sysdepCallMethod.h:1.2	Wed Mar 24 20:49:11 2004
+++ kaffe/config/i386/sysdepCallMethod.h	Tue Jun 22 15:07:57 2004
@@ -26,6 +26,11 @@
  *  have now been deprecated).
  */
 #if defined(NEED_sysdepCallMethod)
+/* ALWAYS_INLINE attribute can only be added to the declaration, not the 
+ * definition of a function, so we need to declare it separately.
+ */
+static inline void sysdepCallMethod(callMethodInfo *call) ALWAYS_INLINE;
+
 static inline void sysdepCallMethod(callMethodInfo *call) {
   unsigned args = call->nrargs;
 
Index: kaffe/config/ia64/sysdepCallMethod.h
diff -u kaffe/config/ia64/sysdepCallMethod.h:1.2 kaffe/config/ia64/sysdepCallMethod.h:1.3
--- kaffe/config/ia64/sysdepCallMethod.h:1.2	Wed May 21 09:09:48 2003
+++ kaffe/config/ia64/sysdepCallMethod.h	Tue Jun 22 15:07:57 2004
@@ -60,6 +60,8 @@
    build a standard C call using the passed call information.  By its
    nature this is highly processor specific.  This function is mandatory
    for both JIT and Interpreter (since stubs have now been deprecated).  */
+static inline void sysdepCallMethod(callMethodInfo* call) ALWAYS_INLINE;
+
 static inline void sysdepCallMethod(callMethodInfo* call)
 {
   void *func = call->function;
Index: kaffe/config/m68k/sysdepCallMethod.h
diff -u kaffe/config/m68k/sysdepCallMethod.h:1.1 kaffe/config/m68k/sysdepCallMethod.h:1.2
--- kaffe/config/m68k/sysdepCallMethod.h:1.1	Fri Dec 12 15:58:52 2003
+++ kaffe/config/m68k/sysdepCallMethod.h	Tue Jun 22 15:07:57 2004
@@ -36,6 +36,8 @@
  *	Still I do not understand 'asm' statement well, and the
  *	statement below is a 'because it works' version.
  */
+static inline void sysdepCallMethod(callMethodInfo *call) ALWAYS_INLINE;
+
 static inline void sysdepCallMethod(callMethodInfo *call) 
 {
 	int extraargs[(call)->nrargs];
Index: kaffe/config/parisc/sysdepCallMethod.h
diff -u kaffe/config/parisc/sysdepCallMethod.h:1.3 kaffe/config/parisc/sysdepCallMethod.h:1.4
--- kaffe/config/parisc/sysdepCallMethod.h:1.3	Fri Jun 11 16:48:58 2004
+++ kaffe/config/parisc/sysdepCallMethod.h	Tue Jun 22 15:07:58 2004
@@ -29,6 +29,8 @@
  * general purpose registers
  */
 
+static inline void sysdepCallMethod(callMethodInfo *call) ALWAYS_INLINE;
+
 static inline void sysdepCallMethod(callMethodInfo *call)
 {
   int argidx;
Index: kaffe/config/powerpc/sysdepCallMethod.h
diff -u kaffe/config/powerpc/sysdepCallMethod.h:1.3 kaffe/config/powerpc/sysdepCallMethod.h:1.4
--- kaffe/config/powerpc/sysdepCallMethod.h:1.3	Mon Mar  8 14:59:10 2004
+++ kaffe/config/powerpc/sysdepCallMethod.h	Tue Jun 22 15:07:58 2004
@@ -71,6 +71,8 @@
    build a standard C call using the passed call information.  By its
    nature this is highly processor specific.  This function is mandatory
    for both JIT and Interpreter (since stubs have now been deprecated).  */
+static inline void sysdepCallMethod(callMethodInfo* call) ALWAYS_INLINE;
+
 static inline void sysdepCallMethod(callMethodInfo* call)
 {
     void *func = call->function;
Index: kaffe/config/s390/sysdepCallMethod.h
diff -u kaffe/config/s390/sysdepCallMethod.h:1.3 kaffe/config/s390/sysdepCallMethod.h:1.4
--- kaffe/config/s390/sysdepCallMethod.h:1.3	Fri Jun 11 16:48:58 2004
+++ kaffe/config/s390/sysdepCallMethod.h	Tue Jun 22 15:07:58 2004
@@ -57,6 +57,8 @@
  * Ross Patterson <Ross.Patterson at CA.Com>
  * Computer Associates International, Inc.
  */
+static inline void sysdepCallMethod(callMethodInfo *call) ALWAYS_INLINE;
+
 static inline void sysdepCallMethod(callMethodInfo *call)
 {
  /*
Index: kaffe/config/superh/sysdepCallMethod.h
diff -u kaffe/config/superh/sysdepCallMethod.h:1.1 kaffe/config/superh/sysdepCallMethod.h:1.2
--- kaffe/config/superh/sysdepCallMethod.h:1.1	Sun Dec 14 16:31:39 2003
+++ kaffe/config/superh/sysdepCallMethod.h	Tue Jun 22 15:07:59 2004
@@ -17,6 +17,8 @@
 
 #include "support.h"
 
+static inline void sysdepCallMethod(callMethodInfo *call) ALWAYS_INLINE;
+
 static inline void sysdepCallMethod(callMethodInfo *call)
 {
   int extraargs[((call)->nrargs>4)?((call)->nrargs-4):0];
Index: kaffe/config/x86_64/sysdepCallMethod.h
diff -u kaffe/config/x86_64/sysdepCallMethod.h:1.1 kaffe/config/x86_64/sysdepCallMethod.h:1.2
--- kaffe/config/x86_64/sysdepCallMethod.h:1.1	Mon May 19 08:03:24 2003
+++ kaffe/config/x86_64/sysdepCallMethod.h	Tue Jun 22 15:07:59 2004
@@ -60,6 +60,8 @@
    build a standard C call using the passed call information.  By its
    nature this is highly processor specific.  This function is mandatory
    for both JIT and Interpreter (since stubs have now been deprecated).  */
+static inline void sysdepCallMethod(callMethodInfo* call) ALWAYS_INLINE;
+
 static inline void sysdepCallMethod(callMethodInfo* call)
 {
     void *func = call->function;
Index: kaffe/m4/gcc_attribute.m4
diff -u kaffe/m4/gcc_attribute.m4:1.3 kaffe/m4/gcc_attribute.m4:1.4
--- kaffe/m4/gcc_attribute.m4:1.3	Tue Apr  6 19:51:40 2004
+++ kaffe/m4/gcc_attribute.m4	Tue Jun 22 15:07:59 2004
@@ -101,3 +101,18 @@
 #define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
 #endif])
 ])
+AC_DEFUN([GCC_ATTRIBUTE_ALWAYS_INLINE],[
+ AC_REQUIRE([GCC_ATTRIBUTE_SUPPORTED])
+ GCC_ATTRIBUTE(always_inline,always_inline,[int x],always_inline,ALWAYS_INLINE,[Define if unconditional inlining of functions a la GCC 3.1 and higher are available.])
+ AH_BOTTOM([/* GNU C constant functions, or null. */
+#ifndef ATTRALWAYS_INLINE
+#ifdef HAVE_GNUC25_ALWAYS_INLINE
+#define ATTRALWAYS_INLINE always_inline
+#else
+#define ATTRALWAYS_INLINE
+#endif
+#endif
+#ifndef ALWAYS_INLINE
+#define ALWAYS_INLINE FUNCATTR((ATTRALWAYS_INLINE))
+#endif])
+])




More information about the kaffe mailing list