[kaffe] CVS kaffe (robilad): Floating point register naming changes for powerpc

Kaffe CVS cvs-commits at kaffe.org
Sun Mar 20 17:26:07 PST 2005


PatchSet 5577 
Date: 2005/03/21 01:21:31
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Floating point register naming changes for powerpc

Members: 
	ChangeLog:1.3751->1.3752 
	configure:1.435->1.436 
	configure.ac:1.125->1.126 
	config/powerpc/trampolines.S:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3751 kaffe/ChangeLog:1.3752
--- kaffe/ChangeLog:1.3751	Sun Mar 20 22:37:42 2005
+++ kaffe/ChangeLog	Mon Mar 21 01:21:31 2005
@@ -1,5 +1,14 @@
 2003-03-20  Dalibor Topic  <robilad at kaffe.org>
 
+	* configure.ac: Check for -mregnames. It lets us use common register 
+	names on powerpc, and will hopefully make it simple to have a single 
+	assembler trampoline fiole for both darwin and linux.
+
+	* config/powerpc/trampolines.S: Changed powerpc floating point 
+	registers names from 'frX' to 'fX' and built fine on ppc-linux.
+
+2003-03-20  Dalibor Topic  <robilad at kaffe.org>
+
 	* configure.ac: Don't check for no-cpp-precomp. It confuses
 	libtool on 64 bit platforms to think that -fPIC is not supported, 
 	leading to fascinating relinking errors. A better way for older
Index: kaffe/configure
diff -u kaffe/configure:1.435 kaffe/configure:1.436
--- kaffe/configure:1.435	Sun Mar 20 22:37:44 2005
+++ kaffe/configure	Mon Mar 21 01:21:33 2005
@@ -7877,6 +7877,100 @@
 ## and produces a ton of false warnings otherwise.
 ## AX_CFLAGS_GCC_OPTION([-no-cpp-precomp])
 
+echo "$as_me:$LINENO: checking CFLAGS for gcc -mregnames" >&5
+echo $ECHO_N "checking CFLAGS for gcc -mregnames... $ECHO_C" >&6
+if test "${ac_cv_cflags_gcc_option__mregnames+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_cflags_gcc_option__mregnames="no, unknown"
+
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_save_CFLAGS="$CFLAGS"
+for ac_arg in "-pedantic  % -mregnames"     #
+do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  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
+  ac_cv_cflags_gcc_option__mregnames=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+ CFLAGS="$ac_save_CFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cflags_gcc_option__mregnames" >&5
+echo "${ECHO_T}$ac_cv_cflags_gcc_option__mregnames" >&6
+case ".$ac_cv_cflags_gcc_option__mregnames" in
+     .ok|.ok,*)  ;;
+   .|.no|.no,*)  ;;
+   *)
+   if echo " $CFLAGS " | grep " $ac_cv_cflags_gcc_option__mregnames " 2>&1 >/dev/null
+   then { (echo "$as_me:$LINENO: : CFLAGS does contain \$ac_cv_cflags_gcc_option__mregnames") >&5
+  (: CFLAGS does contain $ac_cv_cflags_gcc_option__mregnames) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+   else { (echo "$as_me:$LINENO: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_gcc_option__mregnames\"") >&5
+  (: CFLAGS="$CFLAGS $ac_cv_cflags_gcc_option__mregnames") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+                      CFLAGS="$CFLAGS $ac_cv_cflags_gcc_option__mregnames"
+   fi
+ ;;
+esac
+
+
 
 
 
@@ -9975,7 +10069,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 9978 "configure"' > conftest.$ac_ext
+  echo '#line 10072 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -11332,7 +11426,7 @@
 
 
 # Provide some information about the compiler.
-echo "$as_me:11335:" \
+echo "$as_me:11429:" \
      "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
@@ -12405,11 +12499,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12408: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12502: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12412: \$? = $ac_status" >&5
+   echo "$as_me:12506: \$? = $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
@@ -12660,11 +12754,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12663: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12757: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12667: \$? = $ac_status" >&5
+   echo "$as_me:12761: \$? = $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
@@ -12720,11 +12814,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12723: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12817: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12727: \$? = $ac_status" >&5
+   echo "$as_me:12821: \$? = $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
@@ -14924,7 +15018,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 14927 "configure"
+#line 15021 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15022,7 +15116,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 15025 "configure"
+#line 15119 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17246,11 +17340,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17249: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17343: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17253: \$? = $ac_status" >&5
+   echo "$as_me:17347: \$? = $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
@@ -17306,11 +17400,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17309: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17403: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17313: \$? = $ac_status" >&5
+   echo "$as_me:17407: \$? = $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
@@ -18673,7 +18767,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 18676 "configure"
+#line 18770 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18771,7 +18865,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 18774 "configure"
+#line 18868 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19626,11 +19720,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:19629: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:19723: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:19633: \$? = $ac_status" >&5
+   echo "$as_me:19727: \$? = $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
@@ -19686,11 +19780,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:19689: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:19783: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:19693: \$? = $ac_status" >&5
+   echo "$as_me:19787: \$? = $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
@@ -21750,11 +21844,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:21753: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:21847: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:21757: \$? = $ac_status" >&5
+   echo "$as_me:21851: \$? = $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
@@ -22005,11 +22099,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:22008: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:22102: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:22012: \$? = $ac_status" >&5
+   echo "$as_me:22106: \$? = $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
@@ -22065,11 +22159,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:22068: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:22162: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:22072: \$? = $ac_status" >&5
+   echo "$as_me:22166: \$? = $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
@@ -24269,7 +24363,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 24272 "configure"
+#line 24366 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -24367,7 +24461,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 24370 "configure"
+#line 24464 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.125 kaffe/configure.ac:1.126
--- kaffe/configure.ac:1.125	Sun Mar 20 22:37:49 2005
+++ kaffe/configure.ac	Mon Mar 21 01:21:36 2005
@@ -182,6 +182,8 @@
 ## and produces a ton of false warnings otherwise.
 ## AX_CFLAGS_GCC_OPTION([-no-cpp-precomp])
 
+AX_CFLAGS_GCC_OPTION([-mregnames])
+
 GCC_ATTRIBUTE_ALWAYS_INLINE
 GCC_ATTRIBUTE_CONST
 GCC_ATTRIBUTE_FORMAT
Index: kaffe/config/powerpc/trampolines.S
diff -u kaffe/config/powerpc/trampolines.S:1.1 kaffe/config/powerpc/trampolines.S:1.2
--- kaffe/config/powerpc/trampolines.S:1.1	Wed Mar 16 10:30:57 2005
+++ kaffe/config/powerpc/trampolines.S	Mon Mar 21 01:21:40 2005
@@ -48,19 +48,19 @@
      stw  r9, -28(r1)
      stw  r10, -32(r1)
 
-     stfd  fr1, -40(r1)
-     stfd  fr2, -48(r1)
-     stfd  fr3, -56(r1)
-     stfd  fr4, -64(r1)
-     stfd  fr5, -72(r1)
-     stfd  fr6, -80(r1)
-     stfd  fr7, -88(r1)
-     stfd  fr8, -96(r1)
-     stfd  fr9, -104(r1)
-     stfd  fr10, -112(r1)
-     stfd  fr11, -120(r1)
-     stfd  fr12, -128(r1)
-     stfd  fr13, -136(r1)
+     stfd  f1, -40(r1)
+     stfd  f2, -48(r1)
+     stfd  f3, -56(r1)
+     stfd  f4, -64(r1)
+     stfd  f5, -72(r1)
+     stfd  f6, -80(r1)
+     stfd  f7, -88(r1)
+     stfd  f8, -96(r1)
+     stfd  f9, -104(r1)
+     stfd  f10, -112(r1)
+     stfd  f11, -120(r1)
+     stfd  f12, -128(r1)
+     stfd  f13, -136(r1)
      stwu r1, -192(r1)
 
 # Build function call to soft_fixup_trampoline(). This function
@@ -94,19 +94,19 @@
      lwz  r9, -28(r1)
      lwz  r10, -32(r1)
 
-     lfd  fr1, -40(r1)
-     lfd  fr2, -48(r1)
-     lfd  fr3, -56(r1)
-     lfd  fr4, -64(r1)
-     lfd  fr5, -72(r1)
-     lfd  fr6, -80(r1)
-     lfd  fr7, -88(r1)
-     lfd  fr8, -96(r1)
-     lfd  fr9, -104(r1)
-     lfd  fr10, -112(r1)
-     lfd  fr11, -120(r1)
-     lfd  fr12, -128(r1)
-     lfd  fr13, -136(r1)
+     lfd  f1, -40(r1)
+     lfd  f2, -48(r1)
+     lfd  f3, -56(r1)
+     lfd  f4, -64(r1)
+     lfd  f5, -72(r1)
+     lfd  f6, -80(r1)
+     lfd  f7, -88(r1)
+     lfd  f8, -96(r1)
+     lfd  f9, -104(r1)
+     lfd  f10, -112(r1)
+     lfd  f11, -120(r1)
+     lfd  f12, -128(r1)
+     lfd  f13, -136(r1)
 
 # Restore Link Register before invoking native method, so that
 # it returns to the right place.




More information about the kaffe mailing list