OSDN Git Service

* eh-common.h (struct eh_context): Add comment for hidden use of
authoramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Jun 1998 13:05:54 +0000 (13:05 +0000)
committeramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Jun 1998 13:05:54 +0000 (13:05 +0000)
        field dynamic_handler_chain.
        * except.c (get_dynamic_handler_chain): Comment on, and use the
        correct offset of the dynamic_handler_chain field.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20540 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/eh-common.h
gcc/except.c

index a8c08dc..18888da 100644 (file)
@@ -1,3 +1,10 @@
+Wed Jun 17 15:57:48 EDT 1998  Andrew MacLeod  (amacleod@cygnus.com)
+
+       * eh-common.h (struct eh_context): Add comment for hidden use of
+       field dynamic_handler_chain.
+       * except.c (get_dynamic_handler_chain): Comment on, and use the
+       correct offset of the dynamic_handler_chain field.
+
 1998-06-17 12:46:56 1998  Jim Wilson  <wilson@cygnus.com>
 
        * mips/iris6.h (LINK_SPEC): Add -woff 131.
index 51ecf31..c16d66a 100644 (file)
 
 /* The handler_label field MUST be the first field in this structure. The 
    __throw()  library routine expects uses __eh_stub() from except.c, which
-   simply dereferences the context pointer to get the handler */
+   simply dereferences the context pointer to get the handler.
+   The routine get_dynamic_handler_chain() also has a dependancy on
+   the location of 'dynamic_handler_chain'. If its location is changed, 
+   that routine must be modified as well. */
 
 struct eh_context
 {
index e76f21c..c5c7259 100644 (file)
@@ -1017,7 +1017,10 @@ get_dynamic_handler_chain ()
   rtx ehc, dhc, result;
 
   ehc = get_eh_context ();
-  dhc = ehc;
+
+  /* This is the offset of dynamic_handler_chain in the eh_context struct
+     declared in eh-common.h. If its location is change, change this offset */
+  dhc = plus_constant (ehc, GET_MODE_SIZE (Pmode));
 
   result = copy_to_reg (dhc);