.register pseudo-op (Was: PR 10656 and PR 10657)

Jeff Sturm jsturm@one-point.com
Wed May 7 22:30:00 GMT 2003


On 7 May 2003, Anthony Green wrote:
> On Wed, 2003-05-07 at 08:29, Jeff Sturm wrote:
> > But as the author of the code in question, I'm looking at it now... I'm
> > willing to try a fix if someone can test on 7.
>
> I can.

Great.  I'm testing the following on Solaris 8 with Sun as/ld and GNU
binutils.

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 psuedo-op.
	* src/sparc/v8.S: Use it.
	* fficonfig.h.in: Rebuilt.
	* configure: Rebuilt.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libffi/configure.in,v
retrieving revision 1.33.2.4
diff -u -p -r1.33.2.4 configure.in
--- configure.in	20 Feb 2003 09:12:03 -0000	1.33.2.4
+++ configure.in	7 May 2003 20:38:56 -0000
@@ -133,6 +133,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)
Index: src/sparc/v8.S
===================================================================
RCS file: /cvs/gcc/gcc/libffi/src/sparc/v8.S,v
retrieving revision 1.6.20.1
diff -u -p -r1.6.20.1 v8.S
--- src/sparc/v8.S	4 Jan 2003 03:13:28 -0000	1.6.20.1
+++ src/sparc/v8.S	7 May 2003 20:38:56 -0000
@@ -109,7 +109,9 @@ longlong:
 	.globl ffi_closure_v8

 ffi_closure_v8:
+#ifdef HAVE_AS_REGISTER_PSEUDO_OP
 	.register	%g2, #scratch
+#endif
 .LLFB2:
 	save	%sp, -STACKFRAME, %sp
 .LLCFI1:



More information about the Java mailing list