/* src/vm/jit/dseg.c - data segment handling stuff
- Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+ Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
J. Wenninger, Institut f. Computersprachen - TU Wien
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Contact: cacao@cacaojvm.org
-
- Authors: Reinhard Grafl
- Andreas Krall
- Christian Thalinger
- Joseph Wenninger
-
- $Id: dseg.h 6046 2006-11-22 20:24:55Z twisti $
+ $Id: dseg.h 7556 2007-03-22 16:42:00Z tbfg $
*/
/* forward typedefs ***********************************************************/
typedef struct dsegentry dsegentry;
-typedef struct jumpref jumpref;
-typedef struct dataref dataref;
-typedef struct exceptionref exceptionref;
-typedef struct patchref patchref;
-typedef struct linenumberref linenumberref;
typedef struct linenumbertable_entry linenumbertable_entry;
typedef struct dseg_exception_entry dseg_exception_entry;
#include "config.h"
-
#include "vm/types.h"
#include "toolbox/list.h"
+
#include "vm/jit/jit.h"
#include "vm/jit/codegen-common.h"
+#include "vmcore/references.h"
+
/* convenience macros *********************************************************/
};
-/* jumpref ********************************************************************/
-
-struct jumpref {
- s4 tablepos; /* patching position in data segment */
- basicblock *target; /* target basic block */
- jumpref *next; /* next element in jumpref list */
-};
-
-
-/* dataref ********************************************************************/
-
-struct dataref {
- s4 datapos; /* patching position in generated code */
- dataref *next; /* next element in dataref list */
-};
-
-
-/* exceptionref ***************************************************************/
-
-struct exceptionref {
- s4 branchpos; /* patching position in code segment */
- s4 reg; /* used for ArrayIndexOutOfBounds index reg */
- functionptr function; /* function pointer to generate exception */
- exceptionref *next; /* next element in exceptionref list */
-};
-
-
-/* patchref *******************************************************************/
-
-struct patchref {
- s4 branchpos; /* relative offset to method entrypoint */
- s4 disp; /* displacement of ref in the data segment */
- functionptr patcher; /* patcher function to call */
- voidptr ref; /* reference passed */
-/* listnode linkage; */
- patchref *next;
-};
-
-
-/* linenumberref **************************************************************/
-
-struct linenumberref {
- s4 tablepos; /* patching position in data segment */
- s4 linenumber; /* line number, used for inserting into the */
- /* table and for validity checking */
- /* -1......start of inlined body */
- /* -2......end of inlined body */
- /* <= -3...special entry with methodinfo * */
- /* (see doc/inlining_stacktrace.txt) */
- ptrint targetmpc; /* machine code program counter of first */
- /* instruction for given line */
- /* NOTE: for linenumber <= -3 this is a the */
- /* (methodinfo *) of the inlined method */
- linenumberref *next; /* next element in linenumberref list */
-};
-
-
/* linenumbertable_entry ******************************************************/
/* Keep the type of line the same as the pointer type, otherwise we
s4 dseg_get_linenumber_from_pc(methodinfo **pm, u1 *pv, u1 *pc);
-#if defined(__I386__) || defined(__X86_64__) || defined(__XDSPCORE__) || defined(ENABLE_INTRP)
+#if defined(__I386__) || defined(__X86_64__) || defined(__XDSPCORE__) || defined(__M68K___) || defined(ENABLE_INTRP)
void dseg_adddata(codegendata *cd);
void dseg_resolve_datareferences(jitdata *jd);
#endif