* 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.
#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 */
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. */
# 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 */
}
#endif
- result = ex->handlerpc;
+ result = ete->handlerpc;
goto exceptions_handle_exception_return;
}
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);
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 */
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;
}
#endif
- result = ex->handlerpc;
+ result = ete->handlerpc;
goto exceptions_handle_exception_return;
}
}
}
+ }
#if defined(ENABLE_THREADS)
/* Is this method realization synchronized? */
dseg.h \
emit-common.c \
emit-common.h \
+ exceptiontable.c \
+ exceptiontable.h \
icmdtable.inc \
jit.c \
jit.h \
.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 */
varinfo *var;
basicblock *bptr;
instruction *iptr;
- exception_entry *ex;
u2 currentline;
methodinfo *lm; /* local methodinfo for ICMD_INVOKE* */
unresolved_method *um;
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)
.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 */
varinfo *var;
basicblock *bptr;
instruction *iptr;
- exception_entry *ex;
s4 spilledregs_num;
s4 savedregs_num;
(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 */
#include "vm/global.h"
+#include "vm/jit/exceptiontable.h"
#include "vm/jit/replace.h"
#include "vmcore/method.h"
u1 *entrypoint; /* machine code entry point */
s4 mcodelength; /* length of generated machine code */
+ exceptiontable_t *exceptiontable;
+
/* patcher list */
list_t *patchers;
}
#endif
+ /* Create the exception table. */
+
+ exceptiontable_create(jd);
+
/* jump table resolving */
for (jr = cd->jumpreferences; jr != NULL; jr = jr->next)
{
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
}
--- /dev/null
+/* 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:
+ */
--- /dev/null
+/* 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:
+ */
.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 */
varinfo *var, *var1;
basicblock *bptr;
instruction *iptr;
- exception_entry *ex;
u2 currentline;
methodinfo *lm; /* local methodinfo for ICMD_INVOKE* */
builtintable_entry *bte;
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 */
*/
/* 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 */
varinfo *var;
basicblock *bptr;
instruction *iptr;
- exception_entry *ex;
u2 currentline;
methodinfo *lm; /* local methodinfo for ICMD_INVOKE* */
unresolved_method *um;
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
#define FltSave -24
#define LineNumberTableSize -32
#define LineNumberTableStart -40
-/* 4-byte alignment padding */
-#define ExTableSize -48
-#define ExTableStart -48
#else /* SIZEOF_VOID_P == 8 */
#define FltSave -20
#define LineNumberTableSize -24
#define LineNumberTableStart -28
-#define ExTableSize -32
-#define ExTableStart -32
#endif /* SIZEOF_VOID_P == 8 */
#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 */
varinfo *var;
basicblock *bptr;
instruction *iptr;
- exception_entry *ex;
u2 currentline;
constant_classref *cr;
unresolved_class *uc;
(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)
.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 */
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 */
.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 */
varinfo *var;
basicblock *bptr;
instruction *iptr;
- exception_entry *ex;
u2 currentline;
methodinfo *lm; /* local methodinfo for ICMD_INVOKE* */
unresolved_method *um;
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)) {
* *
*******************************************************************************/
- .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 */
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* */
(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);
.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 */
varinfo *var;
basicblock *bptr;
instruction *iptr;
- exception_entry *ex;
u2 currentline;
constant_classref *cr;
methodinfo *lm; /* local methodinfo for ICMD_INVOKE* */
(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) */
.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 */
varinfo *var, *dst;
basicblock *bptr;
instruction *iptr;
- exception_entry *ex;
constant_classref *cr;
unresolved_class *uc;
methodinfo *lm; /* local methodinfo for ICMD_INVOKE* */
(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 */