eh-common.h (struct eh_context): Add comment for hidden use of field dynamic_handler_...
authorAndrew MacLeod <amacleod@cygnus.com>
Wed, 17 Jun 1998 13:05:54 +0000 (13:05 +0000)
committerAndrew Macleod <amacleod@gcc.gnu.org>
Wed, 17 Jun 1998 13:05:54 +0000 (13:05 +0000)
       * 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.

From-SVN: r20540

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

index a8c08dc2a0d8987e5f9c50c9ec3cec01f4715a70..18888da7aadf87199cf9da41f842f0ab4c9b8b49 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 51ecf31470e8c497f0b35464a78770a23fc579de..c16d66a5008cbdf7be7dcf842e905c42d939c4d0 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 e76f21c2b84d6c29b475e02a8d768588079badd1..c5c725992d2d3f77ce8a05b0701b61fb7505ab46 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);