This is the mail archive of the java-discuss@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]

Re: building libgcj on irix 6.5


> Date: Thu, 09 Dec 1999 00:07:32 -0500
> From: Jeff Sturm <jsturm@sigma6.com>
> 
> I've seen the same thing happen on other platforms... it appears to be
> due to the new setjmp/longjmp exceptions, but I haven't completely
> figured it out yet.  If you do a "nm libgcj.so.1 | grep Throw" I think
> you'll see _Jv_Throw is absent and _Jv_SjljThrow is defined instead...
> 
> You might get a successful build with --disable-sjlj-exceptions.

It looks as though you've got my libgcj changes in but not my gcj
changes.  Here's the patch.

Andrew.

1999-11-17  Andrew Haley  <aph@cygnus.com>

	* parse.h (BUILD_THROW): Add support for sjlj-exceptions.
	decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
	expr.c (build_java_athrow): Add support for sjlj-exceptions.
	java-tree.h: Ditto.
	jcf-write.c: Ditto.	

Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/decl.c,v
retrieving revision 1.41
diff -p -r1.41 decl.c
*** decl.c	1999/10/26 08:34:46	1.41
--- decl.c	1999/12/09 12:00:41
*************** tree soft_newarray_node;
*** 337,343 ****
  tree soft_anewarray_node;
  tree soft_multianewarray_node;
  tree soft_badarrayindex_node;
! tree throw_node;
  tree soft_checkarraystore_node;
  tree soft_monitorenter_node;
  tree soft_monitorexit_node;
--- 337,343 ----
  tree soft_anewarray_node;
  tree soft_multianewarray_node;
  tree soft_badarrayindex_node;
! tree throw_node [2];
  tree soft_checkarraystore_node;
  tree soft_monitorenter_node;
  tree soft_monitorexit_node;
*************** init_decl_processing ()
*** 705,713 ****
  					  0, NOT_BUILT_IN,
  					  NULL_PTR);
    t = tree_cons (NULL_TREE, ptr_type_node, endlink);
!   throw_node = builtin_function ("_Jv_Throw",
! 				 build_function_type (ptr_type_node, t),
! 				 0, NOT_BUILT_IN, NULL_PTR);
    t = build_function_type (int_type_node, endlink);
    soft_monitorenter_node 
      = builtin_function ("_Jv_MonitorEnter", t, 0, NOT_BUILT_IN,
--- 705,717 ----
  					  0, NOT_BUILT_IN,
  					  NULL_PTR);
    t = tree_cons (NULL_TREE, ptr_type_node, endlink);
!   throw_node[0] = builtin_function ("_Jv_Throw",
! 				    build_function_type (ptr_type_node, t),
! 				    0, NOT_BUILT_IN, NULL_PTR);
!   t = tree_cons (NULL_TREE, ptr_type_node, endlink);
!   throw_node[1] = builtin_function ("_Jv_Sjlj_Throw",
! 				    build_function_type (ptr_type_node, t),
! 				    0, NOT_BUILT_IN, NULL_PTR);
    t = build_function_type (int_type_node, endlink);
    soft_monitorenter_node 
      = builtin_function ("_Jv_MonitorEnter", t, 0, NOT_BUILT_IN,
Index: expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/expr.c,v
retrieving revision 1.49
diff -p -r1.49 expr.c
*** expr.c	1999/12/06 19:31:25	1.49
--- expr.c	1999/12/09 12:00:42
*************** java_stack_dup (size, offset)
*** 523,529 ****
      }
  }
  
! /* Calls _Jv_Throw.  Discard the contents of the value stack. */
  
  static void
  build_java_athrow (node)
--- 523,530 ----
      }
  }
  
! /* Calls _Jv_Throw or _Jv_Sjlj_Throw.  Discard the contents of the
!    value stack. */
  
  static void
  build_java_athrow (node)
*************** build_java_athrow (node)
*** 533,539 ****
  
    call = build (CALL_EXPR,
  		void_type_node,
! 		build_address_of (throw_node),
  		build_tree_list (NULL_TREE, node),
  		NULL_TREE);
    TREE_SIDE_EFFECTS (call) = 1;
--- 534,540 ----
  
    call = build (CALL_EXPR,
  		void_type_node,
! 		build_address_of (throw_node[exceptions_via_longjmp ? 1 : 0]),
  		build_tree_list (NULL_TREE, node),
  		NULL_TREE);
    TREE_SIDE_EFFECTS (call) = 1;
Index: java-tree.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/java-tree.h,v
retrieving revision 1.48
diff -p -r1.48 java-tree.h
*** java-tree.h	1999/11/21 23:37:58	1.48
--- java-tree.h	1999/12/09 12:00:42
*************** extern tree soft_newarray_node;
*** 269,275 ****
  extern tree soft_anewarray_node;
  extern tree soft_multianewarray_node;
  extern tree soft_badarrayindex_node;
! extern tree throw_node;
  extern tree soft_checkarraystore_node;
  extern tree soft_monitorenter_node;
  extern tree soft_monitorexit_node;
--- 269,275 ----
  extern tree soft_anewarray_node;
  extern tree soft_multianewarray_node;
  extern tree soft_badarrayindex_node;
! extern tree throw_node[];
  extern tree soft_checkarraystore_node;
  extern tree soft_monitorenter_node;
  extern tree soft_monitorexit_node;
Index: jcf-write.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/jcf-write.c,v
retrieving revision 1.39
diff -p -r1.39 jcf-write.c
*** jcf-write.c	1999/12/06 19:31:25	1.39
--- jcf-write.c	1999/12/09 12:00:43
*************** generate_bytecode_insns (exp, target, st
*** 2451,2457 ****
  	  }
  	else if (f == soft_monitorenter_node
  		 || f == soft_monitorexit_node
! 		 || f == throw_node)
  	  {
  	    if (f == soft_monitorenter_node)
  	      op = OPCODE_monitorenter;
--- 2451,2458 ----
  	  }
  	else if (f == soft_monitorenter_node
  		 || f == soft_monitorexit_node
! 		 || f == throw_node[0]
! 		 || f == throw_node[1])
  	  {
  	    if (f == soft_monitorenter_node)
  	      op = OPCODE_monitorenter;
Index: parse.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.h,v
retrieving revision 1.36
diff -p -r1.36 parse.h
*** parse.h	1999/10/14 17:13:56	1.36
--- parse.h	1999/12/09 12:00:44
*************** typedef struct _jdeplist {
*** 534,540 ****
  #define BUILD_THROW(WHERE, WHAT)					\
    {									\
      (WHERE) = build (CALL_EXPR, void_type_node,				\
! 		  build_address_of (throw_node),			\
  		  build_tree_list (NULL_TREE, (WHAT)), NULL_TREE);	\
      TREE_SIDE_EFFECTS ((WHERE)) = 1;					\
    }
--- 534,540 ----
  #define BUILD_THROW(WHERE, WHAT)					\
    {									\
      (WHERE) = build (CALL_EXPR, void_type_node,				\
! 		  build_address_of (throw_node[exceptions_via_longjmp ? 1 : 0]), \
  		  build_tree_list (NULL_TREE, (WHAT)), NULL_TREE);	\
      TREE_SIDE_EFFECTS ((WHERE)) = 1;					\
    }

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