X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fjit%2Fasmpart.h;h=8769403d7392d8aae2776f220cd5489846f349d7;hb=d62d56aa9150bb2156dac82966795fdcbd7562e0;hp=013006f717117eeea906cc83f8c0e9b05c9169e4;hpb=5a320f78b1ccb1d20c79c760201574ce29b8e5f9;p=cacao.git diff --git a/src/vm/jit/asmpart.h b/src/vm/jit/asmpart.h index 013006f71..8769403d7 100644 --- a/src/vm/jit/asmpart.h +++ b/src/vm/jit/asmpart.h @@ -1,9 +1,7 @@ /* src/vm/jit/asmpart.h - prototypes for machine specfic functions - 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 + Copyright (C) 1996-2005, 2006, 2007, 2008 + CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO This file is part of CACAO. @@ -22,8 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: asmpart.h 8123 2007-06-20 23:50:55Z michi $ - */ @@ -36,84 +32,40 @@ #include "vm/types.h" -#if defined(ENABLE_THREADS) -# include "threads/critical.h" -#endif - #include "vm/global.h" -#include "vm/vm.h" - -#include "vm/jit/replace.h" - -#include "vmcore/linker.h" - - -/* some macros ****************************************************************/ - -#if defined(ENABLE_JIT) -# if defined(ENABLE_INTRP) - -# define ASM_GETCLASSVALUES_ATOMIC(super,sub,out) \ - do { \ - if (opt_intrp) \ - intrp_asm_getclassvalues_atomic((super), (sub), (out)); \ - else \ - asm_getclassvalues_atomic((super), (sub), (out)); \ - } while (0) - -# else /* defined(ENABLE_INTRP) */ - -# define ASM_GETCLASSVALUES_ATOMIC(super,sub,out) \ - asm_getclassvalues_atomic((super), (sub), (out)) - -# endif /* defined(ENABLE_INTRP) */ - -#else /* defined(ENABLE_JIT) */ - -# define ASM_GETCLASSVALUES_ATOMIC(super,sub,out) \ - intrp_asm_getclassvalues_atomic((super), (sub), (out)) - -#endif /* defined(ENABLE_JIT) */ +#include "vm/vm.hpp" /* function prototypes ********************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + /* machine dependent initialization */ s4 asm_md_init(void); +#if !defined(JIT_COMPILER_VIA_SIGNAL) /* invokes the compiler for untranslated JavaVM methods. Register R0 contains a pointer to the method info structure (prepared by createcompilerstub). */ void asm_call_jit_compiler(void); +#endif #if defined(ENABLE_JIT) -#if !defined(__MIPS__) && !defined(__X86_64__) && !defined(__POWERPC64__) && !defined(__SPARC_64__) -java_objectheader *asm_vm_call_method(methodinfo *m, s4 vmargscount, - vm_arg *vmargs); -s4 asm_vm_call_method_int(methodinfo *m, s4 vmargscount, vm_arg *vmargs); -s8 asm_vm_call_method_long(methodinfo *m, s4 vmargscount, vm_arg *vmargs); -float asm_vm_call_method_float(methodinfo *m, s4 vmargscount, vm_arg *vmargs); -double asm_vm_call_method_double(methodinfo *m, s4 vmargscount, vm_arg *vmargs); +java_object_t *asm_vm_call_method(void *pv, uint64_t *array, int32_t stackargs); +int32_t asm_vm_call_method_int(void *pv, uint64_t *array, int32_t stackargs); -void asm_vm_call_method_exception_handler(void); - -void asm_vm_call_method_end(void); -#else -java_objectheader *asm_vm_call_method(void *pv, uint64_t *array, int32_t stackargs); -int32_t asm_vm_call_method_int(void *pv, uint64_t *array, int32_t stackargs); - -int64_t asm_vm_call_method_long(void *pv, uint64_t *array, int32_t stackargs); -float asm_vm_call_method_float(void *pv, uint64_t *array, int32_t stackargs); -double asm_vm_call_method_double(void *pv, uint64_t *array, int32_t stackargs); +int64_t asm_vm_call_method_long(void *pv, uint64_t *array, int32_t stackargs); +float asm_vm_call_method_float(void *pv, uint64_t *array, int32_t stackargs); +double asm_vm_call_method_double(void *pv, uint64_t *array, int32_t stackargs); void asm_vm_call_method_exception_handler(void); void asm_vm_call_method_end(void); #endif -#endif - #if defined(ENABLE_INTRP) java_objectheader *intrp_asm_vm_call_method(methodinfo *m, s4 vmargscount, vm_arg *vmargs); @@ -147,32 +99,19 @@ void intrp_asm_abstractmethoderror(void); /* wrapper for code patching functions */ void asm_patcher_wrapper(void); -/* functions for on-stack replacement */ -#if defined(ENABLE_REPLACEMENT) -void asm_replacement_out(void); -void asm_replacement_in(executionstate_t *es, replace_safestack_t *st); -#endif - -long asm_compare_and_swap(volatile long *p, long oldval, long newval); -void asm_memory_barrier(void); +/* cache flush function */ +void asm_cacheflush(void* addr, int nbytes); -#if defined(ENABLE_THREADS) -extern critical_section_node_t asm_criticalsections; -#endif +void *md_asm_codegen_get_pv_from_pc(void *ra); -#if defined(ENABLE_JIT) -void asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out); +#if defined(ENABLE_ESCAPE_CHECK) +void asm_escape_check(java_object_t *obj); #endif -#if defined(ENABLE_INTRP) -void intrp_asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out); +#ifdef __cplusplus +} // extern "C" #endif -/* cache flush function */ -void asm_cacheflush(u1 *addr, s4 nbytes); - -u8 asm_get_cycle_count(void); - #endif /* _ASMPART_H */