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
32 #if defined(ENABLE_THREADS)
33 # include "threads/native/lock.h"
36 #include "vm/builtin.h"
37 #include "vm/jit/jit.h"
40 /* internal and not automatically replaced functions **************************/
42 static builtintable_entry builtintable_internal[] = {
44 #if defined(__ALPHA__) || defined(DISABLE_GC)
99 #if !SUPPORT_DIVISION || defined(DISABLE_GC)
128 #if !(SUPPORT_DIVISION && SUPPORT_LONG && SUPPORT_LONG_DIV) || defined(DISABLE_GC)
185 /* internal functions *****************************************************/
189 BUILTINTABLE_FLAG_STUB,
194 "(Ljava/lang/Class;)Ljava/lang/Object;",
207 "(Ljava/lang/Class;)Ljava/lang/Object;",
215 BUILTINTABLE_FLAG_STUB,
220 "(ILjava/lang/Class;)[Ljava/lang/Object;",
228 BUILTINTABLE_FLAG_STUB,
229 BUILTIN_newarray_boolean,
241 BUILTINTABLE_FLAG_STUB,
242 BUILTIN_newarray_byte,
254 BUILTINTABLE_FLAG_STUB,
255 BUILTIN_newarray_char,
267 BUILTINTABLE_FLAG_STUB,
268 BUILTIN_newarray_short,
280 BUILTINTABLE_FLAG_STUB,
281 BUILTIN_newarray_int,
293 BUILTINTABLE_FLAG_STUB,
294 BUILTIN_newarray_long,
306 BUILTINTABLE_FLAG_STUB,
307 BUILTIN_newarray_float,
319 BUILTINTABLE_FLAG_STUB,
320 BUILTIN_newarray_double,
333 BUILTIN_arraycheckcast,
337 "([Ljava/lang/Object;[Ljava/lang/Object;)[Ljava/lang/Object;",
346 BUILTIN_arrayinstanceof,
350 "([Ljava/lang/Object;[Ljava/lang/Object;)I",
363 "([Ljava/lang/Object;Ljava/lang/Object;)I",
370 #if defined(ENABLE_THREADS)
378 "(Ljava/lang/Object;)V",
391 "(Ljava/lang/Object;)V",
418 /* automatically replaced functions *******************************************/
420 static builtintable_entry builtintable_automatic[] = {
422 #if !(SUPPORT_LONG && SUPPORT_LONG_CMP)
438 #if !(SUPPORT_LONG && SUPPORT_LONG_LOGICAL)
478 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_LOGICAL) */
480 #if !(SUPPORT_LONG && SUPPORT_LONG_SHIFT)
520 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_SHIFT) */
522 #if !(SUPPORT_LONG && SUPPORT_LONG_ADD)
562 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_ADD) */
564 #if !(SUPPORT_LONG && SUPPORT_LONG_MUL)
580 #if !(SUPPORT_FLOAT && SUPPORT_I2F)
596 #if !(SUPPORT_DOUBLE && SUPPORT_I2D)
612 #if !(SUPPORT_LONG && SUPPORT_FLOAT && SUPPORT_L2F)
628 #if !(SUPPORT_LONG && SUPPORT_DOUBLE && SUPPORT_L2D)
644 #if !(SUPPORT_FLOAT && SUPPORT_F2I)
660 #if !(SUPPORT_FLOAT && SUPPORT_LONG && SUPPORT_F2L)
676 #if !(SUPPORT_DOUBLE && SUPPORT_D2I)
692 #if !(SUPPORT_DOUBLE && SUPPORT_LONG && SUPPORT_D2L)
709 /* float functions ********************************************************/
777 #endif /* !SUPPORT_FLOAT */
779 #if !SUPPORT_FLOAT || !SUPPORT_FLOAT_CMP
806 #endif /* !SUPPORT_FLOAT || !SUPPORT_FLOAT_CMP */
809 /* double functions *******************************************************/
877 #endif /* !SUPPORT_DOUBLE */
879 #if !SUPPORT_DOUBLE || !SUPPORT_DOUBLE_CMP
906 #endif /* !SUPPORT_DOUBLE || !SUPPORT_DOUBLE_CMP */
909 /* float/double functions *************************************************/
911 #if !(SUPPORT_FLOAT && SUPPORT_DOUBLE)
938 #endif /* !(SUPPORT_FLOAT && SUPPORT_DOUBLE) */
941 /* prevent a compiler warning if everything is supported (e.g. i386) */
959 /* automatically replaced functions *******************************************/
961 static builtintable_entry builtintable_function[] = {
962 #if defined(ENABLE_JIT)
964 /* java.lang.VMSystem.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V STATIC NATIVE */
968 BUILTINTABLE_FLAG_STUB | BUILTINTABLE_FLAG_EXCEPTION,
971 "java/lang/VMSystem",
973 "(Ljava/lang/Object;ILjava/lang/Object;II)V",
980 /* java.lang.System.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V PUBLIC STATIC */
983 /* We disable this one until we have a fix for the stacktrace
988 BUILTINTABLE_FLAG_STUB | BUILTINTABLE_FLAG_EXCEPTION,
993 "(Ljava/lang/Object;ILjava/lang/Object;II)V",
1001 /* java.lang.VMSystem.currentTimeMillis()J PUBLIC STATIC */
1006 BUILTIN_currenttimemillis,
1008 "java/lang/VMSystem",
1009 "currentTimeMillis",
1017 /* java.lang.System.currentTimeMillis()J PUBLIC STATIC */
1022 BUILTIN_currenttimemillis,
1025 "currentTimeMillis",
1033 #endif /* defined(ENABLE_JIT) */
1054 * These are local overrides for various environment variables in Emacs.
1055 * Please do not remove this and leave it at the end of the file, where
1056 * Emacs will automagically detect them.
1057 * ---------------------------------------------------------------------
1060 * indent-tabs-mode: t
1064 * vim:noexpandtab:sw=4:ts=4: