* src/vm/jit/exceptiontable.c: New file.
authorChristian Thalinger <twisti@complang.tuwien.ac.at>
Sun, 14 Oct 2007 10:02:02 +0000 (12:02 +0200)
committerChristian Thalinger <twisti@complang.tuwien.ac.at>
Sun, 14 Oct 2007 10:02:02 +0000 (12:02 +0200)
* src/vm/jit/exceptiontable.h: Likewise.

* src/vm/jit/Makefile.am (libjit_la_SOURCES): Added
exceptiontable.[ch].

* src/vm/exceptions.c (exceptions_handle_exception): Use new exception
table.

* src/vm/jit/code.h (vm/jit/exceptiontable.h): Added.
(codeinfo): Added exceptiontable.

* src/vm/jit/codegen-common.c (codegen_finish): Call
exceptiontable_create.

* src/vm/jit/dseg.c (dseg_addlinenumbertablesize): Removed padding.

* src/vm/jit/methodheader.h (ExTableSize, ExTableStart): Removed.

* src/vm/jit/alpha/asmpart.S,
src/vm/jit/arm/asmpart.S,
src/vm/jit/i386/asmpart.S,
src/vm/jit/m68k/asmpart.S,
src/vm/jit/mips/asmpart.S,
src/vm/jit/powerpc/asmpart.S,
src/vm/jit/powerpc64/asmpart.S,
src/vm/jit/s390/asmpart.S,
src/vm/jit/sparc64/asmpart.S,
src/vm/jit/x86_64/asmpart.S (asm_vm_call_method): Removed exception
table stuff.

* src/vm/jit/alpha/codegen.c,
src/vm/jit/arm/codegen.c,
src/vm/jit/i386/codegen.c,
src/vm/jit/m68k/codegen.c,
src/vm/jit/mips/codegen.c,
src/vm/jit/powerpc/codegen.c,
src/vm/jit/powerpc64/codegen.c,
src/vm/jit/s390/codegen.c,
src/vm/jit/sparc64/codegen.c,
src/vm/jit/x86_64/codegen.c (codegen_emit): Likewise.

28 files changed:
src/vm/exceptions.c
src/vm/jit/Makefile.am
src/vm/jit/alpha/asmpart.S
src/vm/jit/alpha/codegen.c
src/vm/jit/arm/asmpart.S
src/vm/jit/arm/codegen.c
src/vm/jit/code.h
src/vm/jit/codegen-common.c
src/vm/jit/dseg.c
src/vm/jit/exceptiontable.c [new file with mode: 0644]
src/vm/jit/exceptiontable.h [new file with mode: 0644]
src/vm/jit/i386/asmpart.S
src/vm/jit/i386/codegen.c
src/vm/jit/m68k/asmpart.S
src/vm/jit/m68k/codegen.c
src/vm/jit/methodheader.h
src/vm/jit/mips/asmpart.S
src/vm/jit/mips/codegen.c
src/vm/jit/powerpc/asmpart.S
src/vm/jit/powerpc/codegen.c
src/vm/jit/powerpc64/asmpart.S
src/vm/jit/powerpc64/codegen.c
src/vm/jit/s390/asmpart.S
src/vm/jit/s390/codegen.c
src/vm/jit/sparc64/asmpart.S
src/vm/jit/sparc64/codegen.c
src/vm/jit/x86_64/asmpart.S
src/vm/jit/x86_64/codegen.c

index 65b07a4a655bac9aec9ac7f65bceff16efe1e149..afd17b6a5ce5b826bc429f0e1b0c34cd2fcea3b1 100644 (file)
@@ -1709,19 +1709,19 @@ java_handle_t *exceptions_fillinstacktrace(void)
 #if defined(ENABLE_JIT)
 u1 *exceptions_handle_exception(java_object_t *xptro, u1 *xpc, u1 *pv, u1 *sp)
 {
-       stackframeinfo_t       sfi;
-       java_handle_t         *xptr;
-       methodinfo            *m;
-       codeinfo              *code;
-       dseg_exception_entry  *ex;
-       s4                     exceptiontablelength;
-       s4                     i;
-       classref_or_classinfo  cr;
-       classinfo             *c;
+       stackframeinfo_t        sfi;
+       java_handle_t          *xptr;
+       methodinfo             *m;
+       codeinfo               *code;
+       exceptiontable_t       *et;
+       exceptiontable_entry_t *ete;
+       s4                      i;
+       classref_or_classinfo   cr;
+       classinfo              *c;
 #if defined(ENABLE_THREADS)
-       java_object_t         *o;
+       java_object_t          *o;
 #endif
-       u1                    *result;
+       u1                     *result;
 
 #ifdef __S390__
        /* Addresses are 31 bit integers */
@@ -1743,9 +1743,6 @@ u1 *exceptions_handle_exception(java_object_t *xptro, u1 *xpc, u1 *pv, u1 *sp)
 
        code = code_get_codeinfo_for_pv(pv);
 
-       ex                   =   (dseg_exception_entry *) (pv + ExTableStart);
-       exceptiontablelength = *((s4 *)                   (pv + ExTableSize));
-
        /* Get the methodinfo pointer from the codeinfo pointer. For
           asm_vm_call_method the codeinfo pointer is NULL and we simply
           can return the proper exception handler. */
@@ -1768,16 +1765,20 @@ u1 *exceptions_handle_exception(java_object_t *xptro, u1 *xpc, u1 *pv, u1 *sp)
 # endif
 #endif
 
-       for (i = 0; i < exceptiontablelength; i++) {
-               /* ATTENTION: keep this here, as we need to decrement the
-           pointer before the loop executes! */
+       /* Get the exception table. */
+
+       et = code->exceptiontable;
 
-               ex--;
+       if (et != NULL) {
+       /* Iterate over all exception table entries. */
 
+       ete = et->entries;
+
+       for (i = 0; i < et->length; i++, ete++) {
                /* is the xpc is the current catch range */
 
-               if ((ADDR_MASK(ex->startpc) <= xpc) && (xpc < ADDR_MASK(ex->endpc))) {
-                       cr = ex->catchtype;
+               if ((ADDR_MASK(ete->startpc) <= xpc) && (xpc < ADDR_MASK(ete->endpc))) {
+                       cr = ete->catchtype;
 
                        /* NULL catches everything */
 
@@ -1795,7 +1796,7 @@ u1 *exceptions_handle_exception(java_object_t *xptro, u1 *xpc, u1 *pv, u1 *sp)
                                }
 #endif
 
-                               result = ex->handlerpc;
+                               result = ete->handlerpc;
                                goto exceptions_handle_exception_return;
                        }
 
@@ -1803,13 +1804,14 @@ u1 *exceptions_handle_exception(java_object_t *xptro, u1 *xpc, u1 *pv, u1 *sp)
 
                        if (IS_CLASSREF(cr)) {
                                /* The exception class reference is unresolved. */
-                               /* We have to do _eager_ resolving here. While the class of */
-                               /* the exception object is guaranteed to be loaded, it may  */
-                               /* well have been loaded by a different loader than the     */
-                               /* defining loader of m's class, which is the one we must   */
-                               /* use to resolve the catch class. Thus lazy resolving      */
-                               /* might fail, even if the result of the resolution would   */
-                               /* be an already loaded class.                              */
+                               /* We have to do _eager_ resolving here. While the
+                                  class of the exception object is guaranteed to be
+                                  loaded, it may well have been loaded by a different
+                                  loader than the defining loader of m's class, which
+                                  is the one we must use to resolve the catch
+                                  class. Thus lazy resolving might fail, even if the
+                                  result of the resolution would be an already loaded
+                                  class. */
 
                                c = resolve_classref_eager(cr.ref);
 
@@ -1818,12 +1820,13 @@ u1 *exceptions_handle_exception(java_object_t *xptro, u1 *xpc, u1 *pv, u1 *sp)
                                        goto exceptions_handle_exception_return;
                                }
 
-                               /* Ok, we resolved it. Enter it in the table, so we don't */
-                               /* have to do this again.                                 */
-                               /* XXX this write should be atomic. Is it?                */
+                               /* Ok, we resolved it. Enter it in the table, so we
+                                  don't have to do this again. */
+                               /* XXX this write should be atomic. Is it? */
 
-                               ex->catchtype.cls = c;
-                       } else {
+                               ete->catchtype.cls = c;
+                       }
+                       else {
                                c = cr.cls;
 
                                /* XXX I don't think this case can ever happen. -Edwin */
@@ -1833,9 +1836,9 @@ u1 *exceptions_handle_exception(java_object_t *xptro, u1 *xpc, u1 *pv, u1 *sp)
                                                                                                         m->class->classloader))
                                                goto exceptions_handle_exception_return;
 
-                               /* XXX I think, if it is not linked, we can be sure that     */
-                               /* the exception object is no (indirect) instance of it, no? */
-                               /* -Edwin                                                    */
+                               /* XXX I think, if it is not linked, we can be sure
+                                  that the exception object is no (indirect) instance
+                                  of it, no?  -Edwin  */
                                if (!(c->state & CLASS_LINKED))
                                        if (!link_class(c))
                                                goto exceptions_handle_exception_return;
@@ -1857,11 +1860,12 @@ u1 *exceptions_handle_exception(java_object_t *xptro, u1 *xpc, u1 *pv, u1 *sp)
                                }
 #endif
 
-                               result = ex->handlerpc;
+                               result = ete->handlerpc;
                                goto exceptions_handle_exception_return;
                        }
                }
        }
+       }
 
 #if defined(ENABLE_THREADS)
        /* Is this method realization synchronized? */
index 80af3ceb6ad2214d4abf9c8212896eb8705f20a3..28c233be43052934dc3d38aec62246f665e00610 100644 (file)
@@ -150,6 +150,8 @@ libjit_la_SOURCES = \
        dseg.h \
        emit-common.c \
        emit-common.h \
+       exceptiontable.c \
+       exceptiontable.h \
        icmdtable.inc \
        jit.c \
        jit.h \
index 87ea3a0929112a33e189c301ed47cd9d283444b5..ddbee57b7eecb9cafdcdb09b620a3ce81deb88cb 100644 (file)
 
        .align  3
 
-       .quad   0                           /* catch type all                     */
-       .quad   0                           /* handler pc                         */
-       .quad   0                           /* end pc                             */
-       .quad   0                           /* start pc                           */
-       .long   1                           /* extable size                       */
-       .long   0                           /* ALIGNMENT PADDING                  */
        .quad   0                           /* line number table start            */
        .quad   0                           /* line number table size             */
        .long   0                           /* fltsave                            */
index 9a80864c311a5b813b3695885dea97c23ceef035..893cdce70d0a8c24a7e6622dab6089eeb351e4b7 100644 (file)
@@ -87,7 +87,6 @@ bool codegen_emit(jitdata *jd)
        varinfo            *var;
        basicblock         *bptr;
        instruction        *iptr;
-       exception_entry    *ex;
        u2                  currentline;
        methodinfo         *lm;             /* local methodinfo for ICMD_INVOKE*  */
        unresolved_method  *um;
@@ -155,17 +154,6 @@ bool codegen_emit(jitdata *jd)
 
        dseg_addlinenumbertablesize(cd);
 
-       (void) dseg_add_unique_s4(cd, jd->exceptiontablelength);   /* ExTableSize */
-
-       /* create exception table */
-
-       for (ex = jd->exceptiontable; ex != NULL; ex = ex->down) {
-               dseg_add_target(cd, ex->start);
-               dseg_add_target(cd, ex->end);
-               dseg_add_target(cd, ex->handler);
-               (void) dseg_add_unique_address(cd, ex->catchtype.any);
-       }
-       
        /* create stack frame (if necessary) */
 
        if (cd->stackframesize)
index e84bc67318ff8e6eca64980cfdbcf65ea8e35dfd..46ef04431f513b24514eb7d27f8bdd5efc7b94d0 100644 (file)
 
        .align  2
 
-       .word   0                           /* catch type all                     */
-       .word   0                           /* handler pc                         */
-       .word   0                           /* end pc                             */
-       .word   0                           /* start pc                           */
-       .word   1                           /* extable size                       */
        .word   0                           /* line number table start            */
        .word   0                           /* line number table size             */
        .word   0                           /* FltSave                            */
index f238a46e25fbbccaa3a9f4907bcccbeb71e39377..21cb0d0ab625c0538ace7f05b9a44c418ff9b3e3 100644 (file)
@@ -87,7 +87,6 @@ bool codegen_emit(jitdata *jd)
        varinfo        *var;
        basicblock     *bptr;
        instruction    *iptr;
-       exception_entry *ex;
 
        s4              spilledregs_num;
        s4              savedregs_num;
@@ -158,17 +157,8 @@ bool codegen_emit(jitdata *jd)
 
        (void) dseg_add_unique_s4(cd, INT_SAV_CNT - rd->savintreguse); /* IntSave */
        (void) dseg_add_unique_s4(cd, FLT_SAV_CNT - rd->savfltreguse); /* FltSave */
-       (void) dseg_addlinenumbertablesize(cd);
-       (void) dseg_add_unique_s4(cd, jd->exceptiontablelength); /* ExTableSize   */
-
-       /* create exception table */
 
-       for (ex = jd->exceptiontable; ex != NULL; ex = ex->down) {
-               dseg_add_target(cd, ex->start);
-               dseg_add_target(cd, ex->end);
-               dseg_add_target(cd, ex->handler);
-               (void) dseg_add_unique_address(cd, ex->catchtype.any);
-       }
+       (void) dseg_addlinenumbertablesize(cd);
 
        /* save return address and used callee saved registers */
 
index 05b5d28ad83cb4d7a12ff19c0dec8e2be4f4a0ef..201702b1e8822e2717a5b744fb4d72e0ad1e33b9 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "vm/global.h"
 
+#include "vm/jit/exceptiontable.h"
 #include "vm/jit/replace.h"
 
 #include "vmcore/method.h"
@@ -77,6 +78,8 @@ struct codeinfo {
        u1           *entrypoint;           /* machine code entry point           */
        s4            mcodelength;          /* length of generated machine code   */
 
+       exceptiontable_t *exceptiontable;
+
        /* patcher list */
        list_t       *patchers;
 
index 1cf288174cf3b31a30b19767021fafff490322f1..4cb5fa49adbae51da955c8fab344911190efc03c 100644 (file)
@@ -1000,6 +1000,10 @@ void codegen_finish(jitdata *jd)
        }
 #endif
 
+       /* Create the exception table. */
+
+       exceptiontable_create(jd);
+
        /* jump table resolving */
 
        for (jr = cd->jumpreferences; jr != NULL; jr = jr->next)
index 5a7d78cee92b5fd497314a5e43cddfec40c4d765..449e5ba3ba751485d981c6fad28062209659c7fa 100644 (file)
@@ -595,12 +595,6 @@ void dseg_addlinenumbertablesize(codegendata *cd)
 {
        cd->linenumbertablesizepos  = dseg_add_unique_address(cd, NULL);
        cd->linenumbertablestartpos = dseg_add_unique_address(cd, NULL);
-
-#if SIZEOF_VOID_P == 8
-       /* 4-byte ALIGNMENT PADDING */
-
-       dseg_add_unique_s4(cd, 0);
-#endif
 }
 
 
diff --git a/src/vm/jit/exceptiontable.c b/src/vm/jit/exceptiontable.c
new file mode 100644 (file)
index 0000000..aeb5b15
--- /dev/null
@@ -0,0 +1,208 @@
+/* src/vm/jit/exceptiontable.c - method exception table
+
+   Copyright (C) 2007
+   CACAOVM - Verein zu Foerderung der freien virtuellen Machine CACAO
+
+   This file is part of CACAO.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#include "config.h"
+
+#include <assert.h>
+#include <stdint.h>
+
+#include "mm/memory.h"
+
+#include "vm/jit/code.h"
+#include "vm/jit/exceptiontable.h"
+#include "vm/jit/jit.h"
+
+
+/* exceptiontable_create *******************************************************
+
+   Builds the exception table for the currently compiled method.
+
+   IN:
+       jd ... JIT data of the currently compiled method
+
+*******************************************************************************/
+
+void exceptiontable_create(jitdata *jd)
+{
+       codeinfo               *code;
+       exceptiontable_t       *et;
+       exceptiontable_entry_t *ete;
+       exception_entry        *ex;
+       uint8_t                *pv;
+
+       /* Get required compiler data. */
+
+       code = jd->code;
+
+       /* Don't allocate an exception table if we don't need one. */
+
+       if (jd->exceptiontablelength == 0)
+               return;
+
+       /* Allocate the exception table and the entries array. */
+
+       et  = NEW(exceptiontable_t);
+       ete = MNEW(exceptiontable_entry_t, jd->exceptiontablelength);
+
+       /* Fill the exception table. */
+
+       et->length  = jd->exceptiontablelength;
+       et->entries = ete;
+
+       /* Fill the exception table entries. */
+
+       pv = code->entrypoint;
+
+       for (ex = jd->exceptiontable; ex != NULL; ex = ex->down, ete++) {
+               /* Resolve basicblock relative start PCs to absolute
+                  addresses. */
+
+               ete->startpc       = pv + ex->start->mpc;
+               ete->endpc         = pv + ex->end->mpc;
+               ete->handlerpc     = pv + ex->handler->mpc;
+
+               /* Store the catch type. */
+
+               ete->catchtype.any = ex->catchtype.any;
+       }
+
+       /* Store the exception table in the codeinfo. */
+
+       code->exceptiontable = et;
+
+#if 0
+       exceptiontable_print(code);
+#endif
+}
+
+
+/* exceptiontable_free *********************************************************
+
+   Frees the memory allocated by the exception table stored in the
+   codeinfo.
+
+   IN:
+       code ... codeinfo of a method realization
+
+*******************************************************************************/
+
+void exceptiontable_free(codeinfo *code)
+{
+       exceptiontable_t       *et;
+       exceptiontable_entry_t *ete;
+
+       /* Sanity check. */
+
+       assert(code != NULL);
+
+       /* Free the exception table memory. */
+
+       et = code->exceptiontable;
+       if (et != NULL) {
+               ete = et->entries;
+
+               if (ete != NULL) {
+                       MFREE(ete, exceptiontable_entry_t, et->length);
+
+                       /* Clear the pointer. */
+
+                       et->entries = NULL;
+               }
+
+               FREE(et, exceptiontable_t);
+
+               /* Clear the pointer. */
+
+               code->exceptiontable = NULL;
+       }
+}
+
+
+/* exceptiontable_print ********************************************************
+
+   Print the exception table.
+
+   IN:
+       code ... codeinfo of a method realization
+
+*******************************************************************************/
+
+#if !defined(NDEBUG)
+void exceptiontable_print(codeinfo *code)
+{
+       exceptiontable_t       *et;
+       exceptiontable_entry_t *ete;
+       int                     i;
+
+       et = code->exceptiontable;
+
+       /* Print the exception table. */
+
+       log_start();
+       log_print("[exceptiontable: m=%p, code=%p, exceptiontable=%p, length=%d, method=",
+                         code->m, code, et, (et != NULL) ? et->length : 0);
+       method_print(code->m);
+       log_print("]");
+       log_finish();
+
+       if (et == NULL)
+               return;
+
+       /* Iterate over all entries. */
+
+       for (i = 0, ete = et->entries; i < et->length; i++, ete++) {
+               log_start();
+               log_print("[exceptiontable entry %3d: startpc=%p, endpc=%p, handlerpc=%p, catchtype=%p (",
+                                 i, ete->startpc, ete->endpc, ete->handlerpc, ete->catchtype.any);
+
+               if (ete->catchtype.any != NULL)
+                       if (IS_CLASSREF(ete->catchtype))
+                               class_classref_print(ete->catchtype.ref);
+                       else
+                               class_print(ete->catchtype.cls);
+               else
+                       log_print("ANY");
+
+               log_print(")]");
+               log_finish();
+       }
+}
+#endif
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
diff --git a/src/vm/jit/exceptiontable.h b/src/vm/jit/exceptiontable.h
new file mode 100644 (file)
index 0000000..b0c5de9
--- /dev/null
@@ -0,0 +1,85 @@
+/* src/vm/jit/exceptiontable.h - method exception table
+
+   Copyright (C) 2007
+   CACAOVM - Verein zu Foerderung der freien virtuellen Machine CACAO
+
+   This file is part of CACAO.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#ifndef _EXCEPTIONTABLE_H
+#define _EXCEPTIONTABLE_H
+
+/* forward typedefs ***********************************************************/
+
+typedef struct exceptiontable_t       exceptiontable_t;
+typedef struct exceptiontable_entry_t exceptiontable_entry_t;
+
+
+#include "config.h"
+
+#include <stdint.h>
+
+#include "vm/jit/code.h"
+#include "vm/jit/jit.h"
+
+
+/* exceptiontable_t ***********************************************************/
+
+struct exceptiontable_t {
+       int32_t                 length;
+       exceptiontable_entry_t *entries;
+};
+
+
+/* exceptiontable_entry_t *****************************************************/
+
+struct exceptiontable_entry_t {
+       void                  *endpc;
+       void                  *startpc;
+       void                  *handlerpc;
+       classref_or_classinfo  catchtype;
+};
+
+
+/* function prototypes ********************************************************/
+
+void exceptiontable_create(jitdata *jd);
+void exceptiontable_free(codeinfo *code);
+
+#if !defined(NDEBUG)
+void exceptiontable_print(codeinfo *code);
+#endif
+
+#endif /* _EXCEPTIONTABLE_H */
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index c46ac2824ccf419d6a204895a05fb932b0e56d07..3ceb233fceec2e67295d67e598789cb187a85763 100644 (file)
@@ -110,11 +110,6 @@ asm_md_init:
 
        .align  8
 
-       .long   0                           /* catch type all                     */
-       .long   0                           /* handler pc                         */
-       .long   0                           /* end pc                             */
-       .long   0                           /* start pc                           */
-       .long   1                           /* extable size                       */
        .long   0                           /* line number table start            */
        .long   0                           /* line number table size             */
        .long   0                           /* fltsave                            */
index 37b3a0e6a2cb096c7c16a8aecceb248bc6c78307..e9c3815b67b61c664e38cd59c2b3783050fbcb1b 100644 (file)
@@ -91,7 +91,6 @@ bool codegen_emit(jitdata *jd)
        varinfo            *var, *var1;
        basicblock         *bptr;
        instruction        *iptr;
-       exception_entry    *ex;
        u2                  currentline;
        methodinfo         *lm;             /* local methodinfo for ICMD_INVOKE*  */
        builtintable_entry *bte;
@@ -174,17 +173,6 @@ bool codegen_emit(jitdata *jd)
           to the information gotten from the class file */
        (void) dseg_addlinenumbertablesize(cd);
 
-       (void) dseg_add_unique_s4(cd, jd->exceptiontablelength); /* ExTableSize   */
-       
-       /* create exception table */
-
-       for (ex = jd->exceptiontable; ex != NULL; ex = ex->down) {
-               dseg_add_target(cd, ex->start);
-               dseg_add_target(cd, ex->end);
-               dseg_add_target(cd, ex->handler);
-               (void) dseg_add_unique_address(cd, ex->catchtype.any);
-       }
-
 #if defined(ENABLE_PROFILING)
        /* generate method profiling code */
 
index bf5ddd54a71cc035d5db47287ef1f1aaea075263..d4164d52bedc531ac2a53a2331ffce099011ea5c 100644 (file)
  */
 
        /* this is the method header see src/vm/jit/methodheader.h */
+
        .align  4
-       .long   0                           /* catch type all                     */
-       .long   0                           /* handler pc                         */
-       .long   0                           /* end pc                             */
-       .long   0                           /* start pc                           */
-       .long   1                           /* extable size                       */
+
        .long   0                           /* line number table start            */
        .long   0                           /* line number table size             */
        .long   0                           /* fltsave                            */
index 51c60c2ca3267ad5d9ab48c19ee6414b7de776b9..963111236be5c2cbbf4dc0d1a40823e24354ebba 100644 (file)
@@ -78,7 +78,6 @@ bool codegen_emit(jitdata *jd)
        varinfo            *var;
        basicblock         *bptr;
        instruction        *iptr;
-       exception_entry    *ex;
        u2                  currentline;
        methodinfo         *lm;             /* local methodinfo for ICMD_INVOKE*  */
        unresolved_method  *um;
@@ -155,16 +154,6 @@ bool codegen_emit(jitdata *jd)
 
                dseg_addlinenumbertablesize(cd);
 
-               (void) dseg_add_unique_s4(cd, jd->exceptiontablelength); /* ExTableSize   */
-
-               /* create exception table */
-               for (ex = jd->exceptiontable; ex != NULL; ex = ex->down) {
-                       dseg_add_target(cd, ex->start);
-                       dseg_add_target(cd, ex->end);
-                       dseg_add_target(cd, ex->handler);
-                       (void) dseg_add_unique_address(cd, ex->catchtype.any);
-               }
-
 #if defined(ENABLE_PROFILING)
                assert(0);
 #endif
index 466a83821e3044f521a61b03bc96773ffed2ddbd..bb617633398a8c08346bf0a3f1270816fc613aa3 100644 (file)
@@ -42,9 +42,6 @@
 #define FltSave                 -24
 #define LineNumberTableSize     -32
 #define LineNumberTableStart    -40
-/* 4-byte alignment padding */
-#define ExTableSize             -48
-#define ExTableStart            -48
        
 #else /* SIZEOF_VOID_P == 8 */
 
@@ -55,8 +52,6 @@
 #define FltSave                 -20
 #define LineNumberTableSize     -24
 #define LineNumberTableStart    -28
-#define ExTableSize             -32
-#define ExTableStart            -32
 
 #endif /* SIZEOF_VOID_P == 8 */
 
index 99b23a1f0a1d7c5e5ed697b8c02b0360bf9c9e0a..43128d32182c58e6722d7e989f1d116c75cf473b 100644 (file)
 
 #if SIZEOF_VOID_P == 8
 
-       .dword  0                           /* catch type all                     */
-       .dword  0                           /* handler pc                         */
-       .dword  0                           /* end pc                             */
-       .dword  0                           /* start pc                           */
-       .word   1                           /* extable size                       */
-       .word   0                           /* 4-byte ALIGNMENT PADDING           */
        .dword  0                           /* line number table start            */
        .dword  0                           /* line number table size             */
        .word   0                           /* fltsave                            */
 
 #else /* SIZEOF_VOID_P == 8 */
 
-       .word   0                           /* catch type all                     */
-       .word   0                           /* handler pc                         */
-       .word   0                           /* end pc                             */
-       .word   0                           /* start pc                           */
-       .word   1                           /* extable size                       */
        .word   0                           /* line number table start            */
        .word   0                           /* line number table size             */
        .word   0                           /* fltsave                            */
index 091e15372c03398196d19091c43e4c338d646bdb..99e9e67a58b31e6387917adbd01585385882a9c6 100644 (file)
@@ -83,7 +83,6 @@ bool codegen_emit(jitdata *jd)
        varinfo            *var;
        basicblock         *bptr;
        instruction        *iptr;
-       exception_entry    *ex;
        u2                  currentline;
        constant_classref  *cr;
        unresolved_class   *uc;
@@ -161,18 +160,9 @@ bool codegen_emit(jitdata *jd)
 
        (void) dseg_add_unique_s4(cd, INT_SAV_CNT - rd->savintreguse); /* IntSave */
        (void) dseg_add_unique_s4(cd, FLT_SAV_CNT - rd->savfltreguse); /* FltSave */
-       dseg_addlinenumbertablesize(cd);
-       (void) dseg_add_unique_s4(cd, jd->exceptiontablelength); /* ExTableSize   */
 
-       /* create exception table */
+       dseg_addlinenumbertablesize(cd);
 
-       for (ex = jd->exceptiontable; ex != NULL; ex = ex->down) {
-               dseg_add_target(cd, ex->start);
-               dseg_add_target(cd, ex->end);
-               dseg_add_target(cd, ex->handler);
-               (void) dseg_add_unique_address(cd, ex->catchtype.any);
-       }
-       
        /* create stack frame (if necessary) */
 
        if (cd->stackframesize)
index 01f7ff7cc1aca95a057f1866c2ffeda905a2fe89..5a99629258799f1e26bac4f5fd24a125a89a7486 100644 (file)
 
        .align 2
 
-       .long   0                         /* catch type all                       */
-       .long   0                         /* exception handler pc                 */
-       .long   0                         /* end pc                               */
-       .long   0                         /* start pc                             */
-       .long   1                         /* extable size                         */
        .long   0                         /* line number table start              */
        .long   0                         /* line number table size               */
        .long   0                         /* fltsave                              */
index 3d01678425c418c8ded859b019e24787344bf7f0..534095c3a044010f5381d5beef029180bfae45a8 100644 (file)
@@ -168,17 +168,6 @@ bool codegen_emit(jitdata *jd)
 
        dseg_addlinenumbertablesize(cd);
 
-       (void) dseg_add_unique_s4(cd, jd->exceptiontablelength); /* ExTableSize   */
-
-       /* create exception table */
-
-       for (ex = jd->exceptiontable; ex != NULL; ex = ex->down) {
-               dseg_add_target(cd, ex->start);
-               dseg_add_target(cd, ex->end);
-               dseg_add_target(cd, ex->handler);
-               (void) dseg_add_unique_address(cd, ex->catchtype.any);
-       }
-
 #if defined(ENABLE_PROFILING)
        /* generate method profiling code */
 
index dd9926d90038f06fa78deff8b3d1e6560f9fe1a8..0dda5cf7f79e13371e9e8646e9fb01c97d09135c 100644 (file)
 
        .align  3
 
-       .quad   0                           /* catch type all                     */
-       .quad   0                           /* handler pc                         */
-       .quad   0                           /* end pc                             */
-       .quad   0                           /* start pc                           */
-       .long   1                           /* extable size                       */
-       .long   0                           /* ALIGNMENT PADDING                  */
        .quad   0                           /* line number table  start           */
        .quad   0                           /* line number table  size            */
        .long   0                           /* fltsave                            */
index cb54e14f6bfc20c54ef347129793cd1060988209..a8e5e66bebe3a80ce0dd3a58fe9b85e2a156c12a 100644 (file)
@@ -91,7 +91,6 @@ bool codegen_emit(jitdata *jd)
        varinfo            *var;
        basicblock         *bptr;
        instruction        *iptr;
-       exception_entry    *ex;
        u2                  currentline;
        methodinfo         *lm;             /* local methodinfo for ICMD_INVOKE*  */
        unresolved_method  *um;
@@ -170,17 +169,6 @@ bool codegen_emit(jitdata *jd)
 
        dseg_addlinenumbertablesize(cd);
 
-       (void) dseg_add_unique_s4(cd, jd->exceptiontablelength);       /* ExTableSize     */
-
-       /* create exception table */
-
-       for (ex = jd->exceptiontable; ex != NULL; ex = ex->down) {
-               dseg_add_target(cd, ex->start);
-               dseg_add_target(cd, ex->end);
-               dseg_add_target(cd, ex->handler);
-               (void) dseg_add_unique_address(cd, ex->catchtype.any);
-       }
-       
        /* create stack frame (if necessary) */
 
        if (!code_is_leafmethod(code)) {
index 9e1ff9cbcdfa0e286b0730025c7dde36fcf3c2ed..dabb45c74148288512e152458a3c58d3b3f2b835 100644 (file)
@@ -103,11 +103,6 @@ L_bras_##tag:
 *                                                                              *
 *******************************************************************************/
 
-       .long   0                         /* catch type all                       */
-       .long   0                         /* exception handler pc                 */
-       .long   0                         /* end pc                               */
-       .long   0                         /* start pc                             */
-       .long   1                         /* extable size                         */
        .long   0                         /* line number table start              */
        .long   0                         /* line number table size               */
        .long   0                         /* fltsave                              */
index 0c978b2e71d5c8806f2c6f059e410148f3991ac4..2dd1bfe6c313a2b342ec71e1303c9cf0b7dfdc7f 100644 (file)
@@ -134,7 +134,6 @@ bool codegen_emit(jitdata *jd)
        varinfo            *var, *var1, *var2, *dst;
        basicblock         *bptr;
        instruction        *iptr;
-       exception_entry    *ex;
        constant_classref  *cr;
        unresolved_class   *uc;
        methodinfo         *lm;             /* local methodinfo for ICMD_INVOKE*  */
@@ -220,17 +219,6 @@ bool codegen_emit(jitdata *jd)
 
        (void) dseg_addlinenumbertablesize(cd);
 
-       (void) dseg_add_unique_s4(cd, jd->exceptiontablelength); /* ExTableSize   */
-
-       /* create exception table */
-
-       for (ex = jd->exceptiontable; ex != NULL; ex = ex->down) {
-               dseg_add_target(cd, ex->start);
-               dseg_add_target(cd, ex->end);
-               dseg_add_target(cd, ex->handler);
-               (void) dseg_add_unique_address(cd, ex->catchtype.any);
-       }
-
        /* Offset PV */
 
        M_AADD_IMM(N_PV_OFFSET, REG_PV);
index ae8428453dda77a27b44e6ef1005be67cae483c1..6634d4c27488c24b40097ecee168a878d3235b71 100644 (file)
 
        .align 8        /* v9: All data types are aligned to their size */
 
-       .xword 0                         /* catch type all */
-       .xword 0                         /* handler pc */
-       .xword 0                         /* end pc */
-       .xword 0                         /* start pc */
-       .word  1                         /* extable size */
-       .word  0                         /* ALIGNMENT PADDING */
        .xword 0                         /* line number table start */
        .xword 0                         /* line number table size */
        .word  0                         /* fltsave */
index 813ae534970bcdfe0e17afccf0a0580bc3e3e6a5..8411ff30aa2006ff51bcb70b9dbb54b55a6868de 100644 (file)
@@ -130,7 +130,6 @@ bool codegen_emit(jitdata *jd)
        varinfo            *var;
        basicblock         *bptr;
        instruction        *iptr;
-       exception_entry    *ex;
        u2                  currentline;
        constant_classref  *cr;
        methodinfo         *lm;             /* local methodinfo for ICMD_INVOKE*  */
@@ -200,17 +199,8 @@ bool codegen_emit(jitdata *jd)
 
        (void) dseg_add_unique_s4(cd, INT_SAV_CNT - rd->savintreguse); /* IntSave */
        (void) dseg_add_unique_s4(cd, FLT_SAV_CNT - rd->savfltreguse); /* FltSave */
-       dseg_addlinenumbertablesize(cd);
-       (void) dseg_add_unique_s4(cd, jd->exceptiontablelength); /* ExTableSize   */
-
-       /* create exception table */
 
-       for (ex = jd->exceptiontable; ex != NULL; ex = ex->down) {
-               dseg_add_target(cd, ex->start);
-               dseg_add_target(cd, ex->end);
-               dseg_add_target(cd, ex->handler);
-               (void) dseg_add_unique_address(cd, ex->catchtype.any);
-       }
+       dseg_addlinenumbertablesize(cd);
 
        /* save register window and create stack frame (if necessary) */
 
index d199a17d0f369661d4a682fa4a73bf400cee74d7..3a56808b3472934eb4281b08f733c96023ca797d 100644 (file)
 
        .align  8
 
-       .quad   0                           /* catch type all                     */
-       .quad   0                           /* handler pc                         */
-       .quad   0                           /* end pc                             */
-       .quad   0                           /* start pc                           */
-       .long   1                           /* extable size                       */
-       .long   0                           /* ALIGNMENT PADDING                  */
        .quad   0                           /* line number table  start           */
        .quad   0                           /* line number table  size            */
        .long   0                           /* fltsave                            */
index f760519b95809c2f4782d43f9dba3cad1d233f9e..8ae9e5c4d84b74155841e242946bb1f1a2e064e7 100644 (file)
@@ -94,7 +94,6 @@ bool codegen_emit(jitdata *jd)
        varinfo            *var, *dst;
        basicblock         *bptr;
        instruction        *iptr;
-       exception_entry    *ex;
        constant_classref  *cr;
        unresolved_class   *uc;
        methodinfo         *lm;             /* local methodinfo for ICMD_INVOKE*  */
@@ -164,17 +163,6 @@ bool codegen_emit(jitdata *jd)
 
        (void) dseg_addlinenumbertablesize(cd);
 
-       (void) dseg_add_unique_s4(cd, jd->exceptiontablelength); /* ExTableSize   */
-
-       /* create exception table */
-
-       for (ex = jd->exceptiontable; ex != NULL; ex = ex->down) {
-               dseg_add_target(cd, ex->start);
-               dseg_add_target(cd, ex->end);
-               dseg_add_target(cd, ex->handler);
-               (void) dseg_add_unique_address(cd, ex->catchtype.any);
-       }
-
 #if defined(ENABLE_PROFILING)
        /* generate method profiling code */