From fe385663ccbdca460bf15f3c18fb5e1ca31b5261 Mon Sep 17 00:00:00 2001 From: twisti Date: Fri, 20 Oct 2006 14:53:27 +0000 Subject: [PATCH] * src/vm/jit/jit.c (jit_init) [ENABLE_JIT]: Call stack_init only for JIT. [ENABLE_JIT] (jit_asm_compile): Only for JIT. * src/vm/jit/Makefile.am (SUBDIRS) [ENABLE_JIT]: Add allocator only for JIT. (libjit_la_SOURCES) [ENABLE_JIT]: Compile reg.[ch], replace.[ch] and stack.[ch] only for JIT. * src/cacaoh/headers.c [ENABLE_INTRP] (intrp_asm_abstractmethoderror): Added. --- src/cacaoh/headers.c | 5 ++- src/vm/jit/Makefile.am | 89 +++++++++++++++++++++++++++++------------- src/vm/jit/jit.c | 6 ++- 3 files changed, 70 insertions(+), 30 deletions(-) diff --git a/src/cacaoh/headers.c b/src/cacaoh/headers.c index 875a57c15..6d3c81089 100644 --- a/src/cacaoh/headers.c +++ b/src/cacaoh/headers.c @@ -31,7 +31,7 @@ Christian Thalinger Edwin Steiner - $Id: headers.c 5810 2006-10-20 13:54:54Z twisti $ + $Id: headers.c 5814 2006-10-20 14:53:27Z twisti $ */ @@ -143,13 +143,14 @@ u1* asm_initialize_thread_stack(void *func, u1 *stack) { return NULL; } void *asm_switchstackandcall(void *stack, void *func, void **stacktopsave, void * p) { return NULL; } void asm_handle_builtin_exception(classinfo *c) {} -void asm_abstractmethoderror(void) {} #if defined(ENABLE_JIT) +void asm_abstractmethoderror(void) {} void asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out) {} #endif #if defined(ENABLE_INTRP) +void intrp_asm_abstractmethoderror(void) {} void intrp_asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out) {} #endif diff --git a/src/vm/jit/Makefile.am b/src/vm/jit/Makefile.am index 0efad83d0..cd8d3df1d 100644 --- a/src/vm/jit/Makefile.am +++ b/src/vm/jit/Makefile.am @@ -28,7 +28,7 @@ ## ## Changes: Edwin Steiner ## -## $Id: Makefile.am 5797 2006-10-18 15:27:42Z twisti $ +## $Id: Makefile.am 5814 2006-10-20 14:53:27Z twisti $ ## Process this file with automake to produce Makefile.in @@ -57,38 +57,72 @@ DIST_SUBDIRS = \ x86_64 SUBDIRS = \ - allocator \ tools \ verify if ENABLE_JIT -SUBDIRS += $(ARCH_DIR) -ARCH_LIB = $(ARCH_DIR)/libarch.la +SUBDIRS += \ + allocator \ + $(ARCH_DIR) + +ARCH_LIB = \ + $(ARCH_DIR)/libarch.la endif if ENABLE_INTRP -SUBDIRS += intrp -INTRP_LIB = intrp/libintrp.la +SUBDIRS += \ + intrp + +INTRP_LIB = \ + intrp/libintrp.la endif if ENABLE_IFCONV -SUBDIRS += ifconv -IFCONV_LIB = ifconv/libifconv.la +SUBDIRS += \ + ifconv + +IFCONV_LIB = \ + ifconv/libifconv.la endif if ENABLE_INLINING -SUBDIRS += inline -INLINE_LIB = inline/libinline.la +SUBDIRS += \ + inline + +INLINE_LIB = \ + inline/libinline.la endif if ENABLE_LOOP -SUBDIRS += loop -LOOP_LIB = loop/libloop.la +SUBDIRS += \ + loop + +LOOP_LIB = \ + loop/libloop.la endif if ENABLE_PROFILING -SUBDIRS += profile -PROFILE_LIB = profile/libprofile.la +SUBDIRS += \ + profile + +PROFILE_LIB = \ + profile/libprofile.la +endif + +if USE_SCHEDULER +SUBDIRS += \ + schedule + +SCHEDULE_LIB = \ + schedule/libschedule.la +endif + +if ENABLE_SSA +SUBDIRS += \ + optimizing + +OPTIMIZING_LIB = \ + optimizing/liboptimizing.la endif if ENABLE_THREADS @@ -97,14 +131,18 @@ RECOMPILE_SOURCES = \ recompile.h endif -if USE_SCHEDULER -SUBDIRS += schedule -SCHEDULE_LIB = schedule/libschedule.la -endif +if ENABLE_JIT +REG_SOURCES = \ + reg.c \ + reg.h -if ENABLE_SSA -SUBDIRS += optimizing -OPTIMIZING_LIB = optimizing/liboptimizing.la +REPLACE_SOURCES = \ + replace.c \ + replace.h + +STACK_SOURCES = \ + stack.c \ + stack.h endif if WITH_BINUTILS_DISASSEMBLER @@ -138,15 +176,12 @@ libjit_la_SOURCES = \ jit.h \ parse.c \ parse.h \ - reg.c \ - reg.h \ $(RECOMPILE_SOURCES) \ - replace.c \ - replace.h \ + $(REG_SOURCES) \ + $(REPLACE_SOURCES) \ show.c \ show.h \ - stack.c \ - stack.h \ + $(STACK_SOURCES) \ stacktrace.c \ stacktrace.h diff --git a/src/vm/jit/jit.c b/src/vm/jit/jit.c index af286b3d4..4dd56390b 100644 --- a/src/vm/jit/jit.c +++ b/src/vm/jit/jit.c @@ -31,7 +31,7 @@ Christian Thalinger Christian Ullrich - $Id: jit.c 5788 2006-10-16 08:53:13Z twisti $ + $Id: jit.c 5814 2006-10-20 14:53:27Z twisti $ */ @@ -893,9 +893,11 @@ char *opcode_names[256] = { void jit_init(void) { +#if defined(ENABLE_JIT) /* initialize stack analysis subsystem */ (void) stack_init(); +#endif /* initialize show subsystem */ @@ -1519,6 +1521,7 @@ static u1 *jit_compile_intern(jitdata *jd) *******************************************************************************/ +#if defined(ENABLE_JIT) u1 *jit_asm_compile(methodinfo *m, u1 *mptr, u1 *sp, u1 *ra) { stackframeinfo sfi; @@ -1559,6 +1562,7 @@ u1 *jit_asm_compile(methodinfo *m, u1 *mptr, u1 *sp, u1 *ra) return entrypoint; } +#endif /* defined(ENABLE_JIT) */ /* jit_complement_condition **************************************************** -- 2.25.1