1 /* src/vm/builtintable.inc - tables of builtin functions
3 Copyright (C) 1996-2005, 2006, 2007, 2008
4 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
6 This file is part of CACAO.
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2, or (at
11 your option) any later version.
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
30 #include "threads/lock-common.h"
32 #include "vm/builtin.h"
34 #include "vm/jit/jit.h"
37 /* internal and not automatically replaced functions **************************/
39 static builtintable_entry builtintable_internal[] = {
41 #if defined(__ALPHA__) || defined(DISABLE_GC)
96 #if !SUPPORT_DIVISION || defined(DISABLE_GC)
125 #if !(SUPPORT_DIVISION && SUPPORT_LONG && SUPPORT_LONG_DIV) || defined(DISABLE_GC)
182 /* internal functions *****************************************************/
186 BUILTINTABLE_FLAG_STUB,
191 "(Ljava/lang/Class;)Ljava/lang/Object;",
204 "(Ljava/lang/Class;)Ljava/lang/Object;",
212 BUILTINTABLE_FLAG_STUB,
217 "(ILjava/lang/Class;)[Ljava/lang/Object;",
225 BUILTINTABLE_FLAG_STUB,
226 BUILTIN_newarray_boolean,
238 BUILTINTABLE_FLAG_STUB,
239 BUILTIN_newarray_byte,
251 BUILTINTABLE_FLAG_STUB,
252 BUILTIN_newarray_char,
264 BUILTINTABLE_FLAG_STUB,
265 BUILTIN_newarray_short,
277 BUILTINTABLE_FLAG_STUB,
278 BUILTIN_newarray_int,
290 BUILTINTABLE_FLAG_STUB,
291 BUILTIN_newarray_long,
303 BUILTINTABLE_FLAG_STUB,
304 BUILTIN_newarray_float,
316 BUILTINTABLE_FLAG_STUB,
317 BUILTIN_newarray_double,
329 BUILTINTABLE_FLAG_STUB,
330 BUILTIN_multianewarray,
334 /* XXX it should be: "(ILjava/lang/Class;[I)[Ljava/lang/Object;", */
335 "(ILjava/lang/Class;I)[Ljava/lang/Object;",
344 BUILTIN_arraycheckcast,
348 "([Ljava/lang/Object;[Ljava/lang/Object;)[Ljava/lang/Object;",
357 BUILTIN_arrayinstanceof,
361 "([Ljava/lang/Object;[Ljava/lang/Object;)I",
370 BUILTIN_FAST_canstore,
374 "([Ljava/lang/Object;Ljava/lang/Object;)I",
381 #if defined(ENABLE_THREADS)
384 BUILTINTABLE_FLAG_STUB,
389 "(Ljava/lang/Object;)V",
397 BUILTINTABLE_FLAG_STUB,
402 "(Ljava/lang/Object;)V",
429 /* automatically replaced functions *******************************************/
431 static builtintable_entry builtintable_automatic[] = {
433 #if !(SUPPORT_LONG && SUPPORT_LONG_CMP)
449 #if !(SUPPORT_LONG && SUPPORT_LONG_LOGICAL)
489 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_LOGICAL) */
491 #if !(SUPPORT_LONG && SUPPORT_LONG_SHIFT)
531 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_SHIFT) */
533 #if !(SUPPORT_LONG && SUPPORT_LONG_ADD)
573 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_ADD) */
575 #if !(SUPPORT_LONG && SUPPORT_LONG_MUL)
591 #if !(SUPPORT_FLOAT && SUPPORT_I2F)
607 #if !(SUPPORT_DOUBLE && SUPPORT_I2D)
623 #if !(SUPPORT_LONG && SUPPORT_FLOAT && SUPPORT_L2F)
639 #if !(SUPPORT_LONG && SUPPORT_DOUBLE && SUPPORT_L2D)
655 #if !(SUPPORT_FLOAT && SUPPORT_F2I)
671 #if !(SUPPORT_FLOAT && SUPPORT_LONG && SUPPORT_F2L)
687 #if !(SUPPORT_DOUBLE && SUPPORT_D2I)
703 #if !(SUPPORT_DOUBLE && SUPPORT_LONG && SUPPORT_D2L)
720 /* float functions ********************************************************/
788 #endif /* !SUPPORT_FLOAT */
790 #if !SUPPORT_FLOAT || !SUPPORT_FLOAT_CMP
817 #endif /* !SUPPORT_FLOAT || !SUPPORT_FLOAT_CMP */
820 /* double functions *******************************************************/
888 #endif /* !SUPPORT_DOUBLE */
890 #if !SUPPORT_DOUBLE || !SUPPORT_DOUBLE_CMP
917 #endif /* !SUPPORT_DOUBLE || !SUPPORT_DOUBLE_CMP */
920 /* float/double functions *************************************************/
922 #if !(SUPPORT_FLOAT && SUPPORT_DOUBLE)
949 #endif /* !(SUPPORT_FLOAT && SUPPORT_DOUBLE) */
952 /* prevent a compiler warning if everything is supported (e.g. i386) */
970 /* automatically replaced functions *******************************************/
972 static builtintable_entry builtintable_function[] = {
973 #if defined(ENABLE_JIT)
975 /* java.lang.VMSystem.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V STATIC NATIVE */
979 BUILTINTABLE_FLAG_STUB | BUILTINTABLE_FLAG_EXCEPTION,
982 "java/lang/VMSystem",
984 "(Ljava/lang/Object;ILjava/lang/Object;II)V",
991 /* java.lang.System.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V PUBLIC STATIC */
994 /* We disable this one until we have a fix for the stacktrace
999 BUILTINTABLE_FLAG_STUB | BUILTINTABLE_FLAG_EXCEPTION,
1004 "(Ljava/lang/Object;ILjava/lang/Object;II)V",
1012 /* java.lang.VMSystem.currentTimeMillis()J PUBLIC STATIC */
1017 BUILTIN_currenttimemillis,
1019 "java/lang/VMSystem",
1020 "currentTimeMillis",
1028 /* java.lang.System.currentTimeMillis()J PUBLIC STATIC */
1033 BUILTIN_currenttimemillis,
1036 "currentTimeMillis",
1044 #endif /* defined(ENABLE_JIT) */
1065 * These are local overrides for various environment variables in Emacs.
1066 * Please do not remove this and leave it at the end of the file, where
1067 * Emacs will automagically detect them.
1068 * ---------------------------------------------------------------------
1071 * indent-tabs-mode: t
1075 * vim:noexpandtab:sw=4:ts=4: