This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libffi: EH over compiled/interp boundry



These changes, which I have just committed, are required for exception
handling to work across the ffi boundry.  The EH metadata was
generated by hand.  This will work for now, but a more maintainable
solution would be nice to have.

In addition, I've just added a bunch of files missing from my initial
check-in.

	* Makefile.in: Rebuilt.
	* Makefile.am (AM_CFLAGS): Compile with -fexceptions.

	* src/x86/sysv.S: Add exception handling metadata.

Index: Makefile.am
===================================================================
RCS file: /cvs/java/libgcj/libffi/Makefile.am,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.am
--- Makefile.am	1999/08/08 13:27:19	1.1.1.1
+++ Makefile.am	1999/08/08 22:52:34
@@ -24,8 +24,6 @@
 toolexecdir = $(exec_prefix)/$(target_alias)
 toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
 
-## We don't use `libz.la' because we don't want to conflict with a
-## system library of that name.
 toolexeclib_LTLIBRARIES = libffi.la
 
 noinst_PROGRAMS = ffitest
@@ -69,6 +67,8 @@
 if ARM
 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
 endif
+
+AM_CFLAGS = -fexceptions
 
 libffi_la_LDFLAGS = -release $(VERSION) 
 
Index: Makefile.in
===================================================================
RCS file: /cvs/java/libgcj/libffi/Makefile.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.in
--- Makefile.in	1999/08/08 13:27:19	1.1.1.1
+++ Makefile.in	1999/08/08 22:52:35
@@ -62,6 +62,7 @@
 AMTARFLAGS = @AMTARFLAGS@
 AS = @AS@
 CC = @CC@
+CXX = @CXX@
 DLLTOOL = @DLLTOOL@
 EXEEXT = @EXEEXT@
 LD = @LD@
@@ -129,6 +130,8 @@
 @M68K_TRUE@libffi_la_SOURCES = @M68K_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
 @POWERPC_TRUE@libffi_la_SOURCES = @POWERPC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
 @ARM_TRUE@libffi_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
+
+AM_CFLAGS = -fexceptions
 
 libffi_la_LDFLAGS = -release $(VERSION) 
 
Index: src/x86/sysv.S
===================================================================
RCS file: /cvs/java/libgcj/libffi/src/x86/sysv.S,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 sysv.S
--- sysv.S	1999/08/08 13:27:19	1.1.1.1
+++ sysv.S	1999/08/08 22:52:53
@@ -38,9 +38,11 @@
         .type    ffi_call_SYSV,@function
 
 ffi_call_SYSV:
+.LFB1:
         pushl %ebp
+.LCFI0:
         movl  %esp,%ebp
-
+.LCFI1:
	# Make room for all of the new args.
	movl  16(%ebp),%ecx
	subl  %ecx,%esp
@@ -124,6 +126,43 @@
         movl %ebp,%esp
         popl %ebp
         ret
+.LFE1:
 .ffi_call_SYSV_end:
         .size    ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV
 
+.section	.eh_frame,"aw",@progbits
+__FRAME_BEGIN__:
+	.4byte	.LLCIE1
+.LSCIE1:
+	.4byte	0x0
+	.byte	0x1
+	.byte	0x0
+	.byte	0x1
+	.byte	0x7c
+	.byte	0x8
+	.byte	0xc
+	.byte	0x4
+	.byte	0x4
+	.byte	0x88
+	.byte	0x1
+	.align 4
+.LECIE1:
+	.set	.LLCIE1,.LECIE1-.LSCIE1
+	.4byte	.LLFDE1
+.LSFDE1:
+	.4byte	.LSFDE1-__FRAME_BEGIN__
+	.4byte	.LFB1
+	.4byte	.LFE1-.LFB1
+	.byte	0x4
+	.4byte	.LCFI0-.LFB1
+	.byte	0xe
+	.byte	0x8
+	.byte	0x85
+	.byte	0x2
+	.byte	0x4
+	.4byte	.LCFI1-.LCFI0
+	.byte	0xd
+	.byte	0x5
+	.align 4
+.LEFDE1:
+	.set	.LLFDE1,.LEFDE1-.LSFDE1

-- 
Anthony Green                                               Cygnus Solutions
                                                       Sunnyvale, California

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]