X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=asmpart.h;h=d0cd0f1d417241883fa59f95ed159b4ac9876cfa;hb=45379aa278d184dbfd0b2eca0208879fca2a226d;hp=66a7e9b13ccb81cf3f407dd6a0d2962c7139d8ac;hpb=d63183a34c979f60d72fb194dc58996635ee38a1;p=cacao.git diff --git a/asmpart.h b/asmpart.h index 66a7e9b13..d0cd0f1d4 100644 --- a/asmpart.h +++ b/asmpart.h @@ -1,56 +1,119 @@ -/****************************** asmpart.h ************************************** +/* asmpart.h - prototypes for machine specfic functions - Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 + R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, + M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck, + P. Tomsich, J. Wenninger - See file COPYRIGHT for information on usage and disclaimer of warranties + This file is part of CACAO. - Headerfile for asmpart.S. asmpart.S contains the machine dependent - Java - C interface functions. + 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. - Authors: Reinhard Grafl EMAIL: cacao@complang.tuwien.ac.at - Andreas Krall EMAIL: cacao@complang.tuwien.ac.at + 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. - Last Change: 1997/10/15 + 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., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. -*******************************************************************************/ + Contact: cacao@complang.tuwien.ac.at + + Authors: Reinhard Grafl + Andreas Krall + + Changes: Christian Thalinger + + $Id: asmpart.h 771 2003-12-13 23:11:08Z stefan $ + +*/ + + +#ifndef _ASMPART_H +#define _ASMPART_H #include "global.h" +#include "jni.h" +/* + determines if the byte support instruction set (21164a and higher) + is available. +*/ int has_no_x_instr_set(); - /* determines if the byte support instruction set (21164a and higher) - is available. */ void synchronize_caches(); -void asm_call_jit_compiler (); - /* invokes the compiler for untranslated JavaVM methods. - Register R0 contains a pointer to the method info structure - (prepared by createcompilerstub). */ +/* + 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(); + + +/* + This function calls a Java-method (which possibly needs compilation) + with up to 4 parameters. This function calls a Java-method (which + possibly needs compilation) with up to 4 parameters. +*/ + +/* + This function calls a Java-method (which possibly needs compilation) + with up to 4 parameters. This function calls a Java-method (which + possibly needs compilation) with up to 4 parameters. + also supports a return value +*/ +java_objectheader *asm_calljavafunction(methodinfo *m, void *arg1, void *arg2, + void *arg3, void *arg4); +java_objectheader *asm_calljavafunction2(methodinfo *m, u4 count, u4 size , void *callblock); +jdouble asm_calljavafunction2double(methodinfo *m, u4 count, u4 size , void *callblock); +jlong asm_calljavafunction2long(methodinfo *m, u4 count, u4 size , void *callblock); + + + +void asm_handle_exception(); +void asm_handle_nat_exception(); +void asm_handle_builtin_exception(classinfo *); + +/* + gets the class of the caller from the stack frame +*/ +methodinfo *asm_getcallingmethod(); -java_objectheader *asm_calljavamethod (methodinfo *m, void *arg1, void*arg2, - void*arg3, void*arg4); - /* This function calls a Java-method (which possibly needs compilation) - with up to 4 parameters. This function calls a Java-method (which - possibly needs compilation) with up to 4 parameters. */ -java_objectheader *asm_calljavafunction (methodinfo *m, void *arg1, void*arg2, - void*arg3, void*arg4); - /* This function calls a Java-method (which possibly needs compilation) - with up to 4 parameters. This function calls a Java-method (which - possibly needs compilation) with up to 4 parameters. - also supports a return value */ +/* + This funtion saves all callee saved registers and calls the function + which is passed as parameter. + This function is needed by the garbage collector, which needs to access + all registers which are stored on the stack. Unused registers are + cleared to avoid interferances with the GC. +*/ +void asm_dumpregistersandcall(functionptr f); -methodinfo *asm_getcallingmethod (); - /* gets the class of the caller from the stack frame */ -void asm_dumpregistersandcall ( functionptr f); - /* This funtion saves all callee saved registers and calls the function - which is passed as parameter. - This function is needed by the garbage collector, which needs to access - all registers which are stored on the stack. Unused registers are - cleared to avoid interferances with the GC. */ +void *asm_switchstackandcall(void *stack, void *func, void **stacktopsave, void * p); +void asm_builtin_trace(); +void asm_builtin_exittrace(); +#endif /* _ASMPART_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: + */