1 /* src/vm/builtintable.inc - tables of builtin functions
3 Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
4 C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 J. Wenninger, Institut f. Computersprachen - TU Wien
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 $Id: builtintable.inc 7936 2007-05-22 17:05:42Z michi $
34 #if defined(ENABLE_THREADS)
35 # include "threads/native/lock.h"
38 #include "vm/builtin.h"
39 #include "vm/jit/jit.h"
42 /* internal and not automatically replaced functions **************************/
44 static builtintable_entry builtintable_internal[] = {
46 #if defined(__ALPHA__) || defined(DISABLE_GC)
101 #if !SUPPORT_DIVISION || defined(DISABLE_GC)
130 #if !(SUPPORT_DIVISION && SUPPORT_LONG && SUPPORT_LONG_DIV) || defined(DISABLE_GC)
187 /* internal functions *****************************************************/
191 BUILTINTABLE_FLAG_STUB,
196 "(Ljava/lang/Class;)Ljava/lang/Object;",
209 "(Ljava/lang/Class;)Ljava/lang/Object;",
217 BUILTINTABLE_FLAG_STUB,
222 "(ILjava/lang/Class;)[Ljava/lang/Object;",
230 BUILTINTABLE_FLAG_STUB,
231 BUILTIN_newarray_boolean,
243 BUILTINTABLE_FLAG_STUB,
244 BUILTIN_newarray_byte,
256 BUILTINTABLE_FLAG_STUB,
257 BUILTIN_newarray_char,
269 BUILTINTABLE_FLAG_STUB,
270 BUILTIN_newarray_short,
282 BUILTINTABLE_FLAG_STUB,
283 BUILTIN_newarray_int,
295 BUILTINTABLE_FLAG_STUB,
296 BUILTIN_newarray_long,
308 BUILTINTABLE_FLAG_STUB,
309 BUILTIN_newarray_float,
321 BUILTINTABLE_FLAG_STUB,
322 BUILTIN_newarray_double,
335 BUILTIN_arraycheckcast,
339 "([Ljava/lang/Object;[Ljava/lang/Object;)[Ljava/lang/Object;",
348 BUILTIN_arrayinstanceof,
352 "([Ljava/lang/Object;[Ljava/lang/Object;)I",
365 "([Ljava/lang/Object;Ljava/lang/Object;)I",
372 #if defined(ENABLE_THREADS)
380 "(Ljava/lang/Object;)V",
393 "(Ljava/lang/Object;)V",
420 /* automatically replaced functions *******************************************/
422 static builtintable_entry builtintable_automatic[] = {
424 #if !(SUPPORT_LONG && SUPPORT_LONG_CMP)
440 #if !(SUPPORT_LONG && SUPPORT_LONG_LOGICAL)
480 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_LOGICAL) */
482 #if !(SUPPORT_LONG && SUPPORT_LONG_SHIFT)
522 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_SHIFT) */
524 #if !(SUPPORT_LONG && SUPPORT_LONG_ADD)
564 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_ADD) */
566 #if !(SUPPORT_LONG && SUPPORT_LONG_MUL)
582 #if !(SUPPORT_FLOAT && SUPPORT_I2F)
598 #if !(SUPPORT_DOUBLE && SUPPORT_I2D)
614 #if !(SUPPORT_LONG && SUPPORT_FLOAT && SUPPORT_L2F)
630 #if !(SUPPORT_LONG && SUPPORT_DOUBLE && SUPPORT_L2D)
646 #if !(SUPPORT_FLOAT && SUPPORT_F2I)
662 #if !(SUPPORT_FLOAT && SUPPORT_LONG && SUPPORT_F2L)
678 #if !(SUPPORT_DOUBLE && SUPPORT_D2I)
694 #if !(SUPPORT_DOUBLE && SUPPORT_LONG && SUPPORT_D2L)
711 /* float functions ********************************************************/
779 #endif /* !SUPPORT_FLOAT */
781 #if !SUPPORT_FLOAT || !SUPPORT_FLOAT_CMP
808 #endif /* !SUPPORT_FLOAT || !SUPPORT_FLOAT_CMP */
811 /* double functions *******************************************************/
879 #endif /* !SUPPORT_DOUBLE */
881 #if !SUPPORT_DOUBLE || !SUPPORT_DOUBLE_CMP
908 #endif /* !SUPPORT_DOUBLE || !SUPPORT_DOUBLE_CMP */
911 /* float/double functions *************************************************/
913 #if !(SUPPORT_FLOAT && SUPPORT_DOUBLE)
940 #endif /* !(SUPPORT_FLOAT && SUPPORT_DOUBLE) */
943 /* prevent a compiler warning if everything is supported (e.g. i386) */
961 /* automatically replaced functions *******************************************/
963 static builtintable_entry builtintable_function[] = {
964 #if defined(ENABLE_JIT)
966 /* java.lang.VMSystem.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V STATIC NATIVE */
968 #if defined(__MIPS__) && (SIZEOF_VOID_P != 4)
969 /* We can't use this optimization on MIPS32, since it has only 4
970 argument registers and we use 8-byte stack slots. The code
971 generated does not access the correct 5th argument (hint: *8
976 BUILTINTABLE_FLAG_EXCEPTION,
979 "java/lang/VMSystem",
981 "(Ljava/lang/Object;ILjava/lang/Object;II)V",
989 /* java.lang.System.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V PUBLIC STATIC */
992 /* We disable this one until we have a fix for the stacktrace
997 BUILTINTABLE_FLAG_EXCEPTION,
1002 "(Ljava/lang/Object;ILjava/lang/Object;II)V",
1010 /* java.lang.VMSystem.currentTimeMillis()J PUBLIC STATIC */
1015 BUILTIN_currenttimemillis,
1017 "java/lang/VMSystem",
1018 "currentTimeMillis",
1026 /* java.lang.System.currentTimeMillis()J PUBLIC STATIC */
1031 BUILTIN_currenttimemillis,
1034 "currentTimeMillis",
1042 #endif /* defined(ENABLE_JIT) */
1063 * These are local overrides for various environment variables in Emacs.
1064 * Please do not remove this and leave it at the end of the file, where
1065 * Emacs will automagically detect them.
1066 * ---------------------------------------------------------------------
1069 * indent-tabs-mode: t
1073 * vim:noexpandtab:sw=4:ts=4: