summaryrefslogtreecommitdiffstats
path: root/libffi
diff options
context:
space:
mode:
authorgreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-08 20:41:24 +0000
committergreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-08 20:41:24 +0000
commitf3bd7a2cf42698100a4feb7fea4f9dc6a3da05da (patch)
treedc52e2a78df5b97fc450ca08347d73013f70bfcd /libffi
parentf77105768ef349694726560e1fa5ad328688fac2 (diff)
downloadppe42-gcc-f3bd7a2cf42698100a4feb7fea4f9dc6a3da05da.tar.gz
ppe42-gcc-f3bd7a2cf42698100a4feb7fea4f9dc6a3da05da.zip
Solaris 7 .register fix.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66617 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog9
-rwxr-xr-xlibffi/configure37
-rw-r--r--libffi/configure.in13
-rw-r--r--libffi/fficonfig.h.in46
-rw-r--r--libffi/src/sparc/v8.S4
5 files changed, 88 insertions, 21 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index e07b07fead6..b609f1d6212 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,12 @@
+2003-05-07 Jeff Sturm <jsturm@one-point.com>
+
+ Fixes PR bootstrap/10656
+ * configure.in (HAVE_AS_REGISTER_PSEUDO_OP): Test assembler
+ support for .register pseudo-op.
+ * src/sparc/v8.S: Use it.
+ * fficonfig.h.in: Rebuilt.
+ * configure: Rebuilt.
+
2003-04-18 Jakub Jelinek <jakub@redhat.com>
* include/ffi.h.in (POWERPC64): Define if 64-bit.
diff --git a/libffi/configure b/libffi/configure
index 6197a44a8cd..5cbef7ab2fa 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -3599,6 +3599,43 @@ echo "$ac_t""$libffi_cv_as_sparc_ua_pcrel" 1>&6
EOF
fi
+
+ echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
+echo "configure:3600: checking assembler .register pseudo-op support" >&5
+if eval "test \"`echo '$''{'libffi_cv_as_register_pseudo_op'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ libffi_cv_as_register_pseudo_op=unknown
+ # Check if we have .register
+ cat > conftest.$ac_ext <<EOF
+#line 3608 "configure"
+#include "confdefs.h"
+asm (".register %g2, #scratch");
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ libffi_cv_as_register_pseudo_op=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ libffi_cv_as_register_pseudo_op=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$libffi_cv_as_register_pseudo_op" 1>&6
+ if test "x$libffi_cv_as_register_pseudo_op" = xyes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_AS_REGISTER_PSEUDO_OP 1
+EOF
+
+ fi
fi
diff --git a/libffi/configure.in b/libffi/configure.in
index 7bb01d68ca0..e71f67344ea 100644
--- a/libffi/configure.in
+++ b/libffi/configure.in
@@ -134,6 +134,19 @@ if test x$TARGET = xSPARC; then
AC_DEFINE(HAVE_AS_SPARC_UA_PCREL, 1,
[Define if your assembler and linker support unaligned PC relative relocs.])
fi
+
+ AC_CACHE_CHECK([assembler .register pseudo-op support],
+ libffi_cv_as_register_pseudo_op, [
+ libffi_cv_as_register_pseudo_op=unknown
+ # Check if we have .register
+ AC_TRY_COMPILE([asm (".register %g2, #scratch");],,
+ [libffi_cv_as_register_pseudo_op=yes],
+ [libffi_cv_as_register_pseudo_op=no])
+ ])
+ if test "x$libffi_cv_as_register_pseudo_op" = xyes; then
+ AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1,
+ [Define if your assembler supports .register.])
+ fi
fi
AC_SUBST(TARGET)
diff --git a/libffi/fficonfig.h.in b/libffi/fficonfig.h.in
index ac15aeddbd7..2b6f5817dd3 100644
--- a/libffi/fficonfig.h.in
+++ b/libffi/fficonfig.h.in
@@ -25,10 +25,6 @@
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
-/* Define if your processor stores words with the most significant
- byte first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
-
/* Define this if you want extra debugging */
#undef FFI_DEBUG
@@ -42,32 +38,42 @@
/* Define this is you do not want support for the raw API. */
#undef FFI_NO_RAW_API
-/* The number of bytes in a double. */
-#undef SIZEOF_DOUBLE
+/* Define if you have the memcpy function. */
+#undef HAVE_MEMCPY
-/* The number of bytes in a float. */
-#undef SIZEOF_FLOAT
+/* The number of bytes in type short */
+#undef SIZEOF_SHORT
-/* The number of bytes in a int. */
+/* The number of bytes in type int */
#undef SIZEOF_INT
-/* The number of bytes in a long. */
+/* The number of bytes in type long */
#undef SIZEOF_LONG
-/* The number of bytes in a long double. */
-#undef SIZEOF_LONG_DOUBLE
-
-/* The number of bytes in a long long. */
+/* The number of bytes in type long long */
#undef SIZEOF_LONG_LONG
-/* The number of bytes in a short. */
-#undef SIZEOF_SHORT
+/* The number of bytes in type float */
+#undef SIZEOF_FLOAT
-/* The number of bytes in a void *. */
+/* The number of bytes in type double */
+#undef SIZEOF_DOUBLE
+
+/* The number of bytes in type long double */
+#undef SIZEOF_LONG_DOUBLE
+
+/* The number of bytes in type void * */
#undef SIZEOF_VOID_P
-/* Define if you have the memcpy function. */
-#undef HAVE_MEMCPY
+/* whether byteorder is bigendian */
+#undef WORDS_BIGENDIAN
+
+/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
+#undef BYTEORDER
-/* Define if your assembler and linker support unaligned PC relative relocs. */
+/* Define if your assembler and linker support unaligned PC relative relocs. */
#undef HAVE_AS_SPARC_UA_PCREL
+
+/* Define if your assembler supports .register. */
+#undef HAVE_AS_REGISTER_PSEUDO_OP
+
diff --git a/libffi/src/sparc/v8.S b/libffi/src/sparc/v8.S
index 299200a089c..53374de3855 100644
--- a/libffi/src/sparc/v8.S
+++ b/libffi/src/sparc/v8.S
@@ -109,7 +109,9 @@ longlong:
.globl ffi_closure_v8
ffi_closure_v8:
- .register %g2, #scratch
+#ifdef HAVE_AS_REGISTER_PSEUDO_OP
+ .register %g2, #scratch
+#endif
.LLFB2:
save %sp, -STACKFRAME, %sp
.LLCFI1:
OpenPOWER on IntegriCloud