1 /* src/vm/jit/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.hpp"
32 #include "vm/jit/builtin.hpp"
33 #include "vm/jit/jit.hpp"
36 /* internal and not automatically replaced functions **************************/
38 static builtintable_entry builtintable_internal[] = {
40 #if defined(__ALPHA__) || defined(DISABLE_GC)
99 #if !SUPPORT_DIVISION || defined(DISABLE_GC)
130 #if !(SUPPORT_DIVISION && SUPPORT_LONG && SUPPORT_LONG_DIV) || defined(DISABLE_GC)
191 /* internal functions *****************************************************/
195 BUILTINTABLE_FLAG_STUB,
200 "(Ljava/lang/Class;)Ljava/lang/Object;",
208 #if defined(ENABLE_TLH)
211 BUILTINTABLE_FLAG_STUB,
216 "(Ljava/lang/Class;)Ljava/lang/Object;",
225 #if defined(ENABLE_ESCAPE_REASON)
228 BUILTINTABLE_FLAG_STUB,
229 BUILTIN_escape_reason_new,
233 "(Ljava/lang/Class;)Ljava/lang/Object;",
249 "(Ljava/lang/Class;)Ljava/lang/Object;",
258 BUILTINTABLE_FLAG_STUB,
263 "(ILjava/lang/Class;)[Ljava/lang/Object;",
272 BUILTINTABLE_FLAG_STUB,
273 BUILTIN_newarray_boolean,
286 BUILTINTABLE_FLAG_STUB,
287 BUILTIN_newarray_byte,
300 BUILTINTABLE_FLAG_STUB,
301 BUILTIN_newarray_char,
314 BUILTINTABLE_FLAG_STUB,
315 BUILTIN_newarray_short,
328 BUILTINTABLE_FLAG_STUB,
329 BUILTIN_newarray_int,
342 BUILTINTABLE_FLAG_STUB,
343 BUILTIN_newarray_long,
356 BUILTINTABLE_FLAG_STUB,
357 BUILTIN_newarray_float,
370 BUILTINTABLE_FLAG_STUB,
371 BUILTIN_newarray_double,
384 BUILTINTABLE_FLAG_STUB,
385 BUILTIN_multianewarray,
389 /* XXX it should be: "(ILjava/lang/Class;[I)[Ljava/lang/Object;", */
390 "(ILjava/lang/Class;I)[Ljava/lang/Object;",
400 BUILTIN_arraycheckcast,
404 "([Ljava/lang/Object;[Ljava/lang/Object;)[Ljava/lang/Object;",
414 BUILTIN_arrayinstanceof,
418 "([Ljava/lang/Object;[Ljava/lang/Object;)I",
428 BUILTIN_FAST_canstore,
432 "([Ljava/lang/Object;Ljava/lang/Object;)I",
440 #if defined(ENABLE_THREADS)
443 BUILTINTABLE_FLAG_STUB,
448 "(Ljava/lang/Object;)V",
453 EMIT_FASTPATH_monitor_enter
457 BUILTINTABLE_FLAG_STUB,
462 "(Ljava/lang/Object;)V",
467 EMIT_FASTPATH_monitor_exit
491 /* automatically replaced functions *******************************************/
493 static builtintable_entry builtintable_automatic[] = {
495 #if !(SUPPORT_LONG && SUPPORT_LONG_CMP)
512 #if !(SUPPORT_LONG && SUPPORT_LONG_LOGICAL)
555 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_LOGICAL) */
557 #if !(SUPPORT_LONG && SUPPORT_LONG_SHIFT)
600 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_SHIFT) */
602 #if !(SUPPORT_LONG && SUPPORT_LONG_ADD)
645 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_ADD) */
647 #if !(SUPPORT_LONG && SUPPORT_LONG_MUL)
664 #if !(SUPPORT_FLOAT && SUPPORT_I2F)
681 #if !(SUPPORT_DOUBLE && SUPPORT_I2D)
698 #if !(SUPPORT_LONG && SUPPORT_FLOAT && SUPPORT_L2F)
715 #if !(SUPPORT_LONG && SUPPORT_DOUBLE && SUPPORT_L2D)
732 #if !(SUPPORT_FLOAT && SUPPORT_F2I)
749 #if !(SUPPORT_FLOAT && SUPPORT_LONG && SUPPORT_F2L)
766 #if !(SUPPORT_DOUBLE && SUPPORT_D2I)
783 #if !(SUPPORT_DOUBLE && SUPPORT_LONG && SUPPORT_D2L)
801 /* float functions ********************************************************/
874 #endif /* !SUPPORT_FLOAT */
876 #if !SUPPORT_FLOAT || !SUPPORT_FLOAT_CMP
905 #endif /* !SUPPORT_FLOAT || !SUPPORT_FLOAT_CMP */
908 /* double functions *******************************************************/
981 #endif /* !SUPPORT_DOUBLE */
983 #if !SUPPORT_DOUBLE || !SUPPORT_DOUBLE_CMP
1012 #endif /* !SUPPORT_DOUBLE || !SUPPORT_DOUBLE_CMP */
1015 /* float/double functions *************************************************/
1017 #if !(SUPPORT_FLOAT && SUPPORT_DOUBLE)
1046 #endif /* !(SUPPORT_FLOAT && SUPPORT_DOUBLE) */
1049 /* prevent a compiler warning if everything is supported (e.g. i386) */
1068 /* automatically replaced functions *******************************************/
1070 static builtintable_entry builtintable_function[] = {
1071 #if defined(ENABLE_JIT)
1073 /* java.lang.VMSystem.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V STATIC NATIVE */
1077 BUILTINTABLE_FLAG_STUB | BUILTINTABLE_FLAG_EXCEPTION,
1080 "java/lang/VMSystem",
1082 "(Ljava/lang/Object;ILjava/lang/Object;II)V",
1090 /* java.lang.System.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V PUBLIC STATIC */
1093 /* We disable this one until we have a fix for the stacktrace
1098 BUILTINTABLE_FLAG_STUB | BUILTINTABLE_FLAG_EXCEPTION,
1103 "(Ljava/lang/Object;ILjava/lang/Object;II)V",
1112 /* java.lang.VMSystem.currentTimeMillis()J PUBLIC STATIC */
1117 BUILTIN_currenttimemillis,
1119 "java/lang/VMSystem",
1120 "currentTimeMillis",
1129 /* java.lang.System.currentTimeMillis()J PUBLIC STATIC */
1134 BUILTIN_currenttimemillis,
1137 "currentTimeMillis",
1146 #endif /* defined(ENABLE_JIT) */
1168 * These are local overrides for various environment variables in Emacs.
1169 * Please do not remove this and leave it at the end of the file, where
1170 * Emacs will automagically detect them.
1171 * ---------------------------------------------------------------------
1174 * indent-tabs-mode: t
1178 * vim:noexpandtab:sw=4:ts=4: