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)
95 #if !SUPPORT_DIVISION || defined(DISABLE_GC)
124 #if !(SUPPORT_DIVISION && SUPPORT_LONG && SUPPORT_LONG_DIV) || defined(DISABLE_GC)
181 /* internal functions *****************************************************/
185 BUILTINTABLE_FLAG_STUB,
190 "(Ljava/lang/Class;)Ljava/lang/Object;",
197 #if defined(ENABLE_TLH)
200 BUILTINTABLE_FLAG_STUB,
205 "(Ljava/lang/Class;)Ljava/lang/Object;",
213 #if defined(ENABLE_ESCAPE_REASON)
216 BUILTINTABLE_FLAG_STUB,
217 BUILTIN_escape_reason_new,
221 "(Ljava/lang/Class;)Ljava/lang/Object;",
236 "(Ljava/lang/Class;)Ljava/lang/Object;",
244 BUILTINTABLE_FLAG_STUB,
249 "(ILjava/lang/Class;)[Ljava/lang/Object;",
257 BUILTINTABLE_FLAG_STUB,
258 BUILTIN_newarray_boolean,
270 BUILTINTABLE_FLAG_STUB,
271 BUILTIN_newarray_byte,
283 BUILTINTABLE_FLAG_STUB,
284 BUILTIN_newarray_char,
296 BUILTINTABLE_FLAG_STUB,
297 BUILTIN_newarray_short,
309 BUILTINTABLE_FLAG_STUB,
310 BUILTIN_newarray_int,
322 BUILTINTABLE_FLAG_STUB,
323 BUILTIN_newarray_long,
335 BUILTINTABLE_FLAG_STUB,
336 BUILTIN_newarray_float,
348 BUILTINTABLE_FLAG_STUB,
349 BUILTIN_newarray_double,
361 BUILTINTABLE_FLAG_STUB,
362 BUILTIN_multianewarray,
366 /* XXX it should be: "(ILjava/lang/Class;[I)[Ljava/lang/Object;", */
367 "(ILjava/lang/Class;I)[Ljava/lang/Object;",
376 BUILTIN_arraycheckcast,
380 "([Ljava/lang/Object;[Ljava/lang/Object;)[Ljava/lang/Object;",
389 BUILTIN_arrayinstanceof,
393 "([Ljava/lang/Object;[Ljava/lang/Object;)I",
402 BUILTIN_FAST_canstore,
406 "([Ljava/lang/Object;Ljava/lang/Object;)I",
413 #if defined(ENABLE_THREADS)
416 BUILTINTABLE_FLAG_STUB,
421 "(Ljava/lang/Object;)V",
429 BUILTINTABLE_FLAG_STUB,
434 "(Ljava/lang/Object;)V",
461 /* automatically replaced functions *******************************************/
463 static builtintable_entry builtintable_automatic[] = {
465 #if !(SUPPORT_LONG && SUPPORT_LONG_CMP)
481 #if !(SUPPORT_LONG && SUPPORT_LONG_LOGICAL)
521 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_LOGICAL) */
523 #if !(SUPPORT_LONG && SUPPORT_LONG_SHIFT)
563 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_SHIFT) */
565 #if !(SUPPORT_LONG && SUPPORT_LONG_ADD)
605 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_ADD) */
607 #if !(SUPPORT_LONG && SUPPORT_LONG_MUL)
623 #if !(SUPPORT_FLOAT && SUPPORT_I2F)
639 #if !(SUPPORT_DOUBLE && SUPPORT_I2D)
655 #if !(SUPPORT_LONG && SUPPORT_FLOAT && SUPPORT_L2F)
671 #if !(SUPPORT_LONG && SUPPORT_DOUBLE && SUPPORT_L2D)
687 #if !(SUPPORT_FLOAT && SUPPORT_F2I)
703 #if !(SUPPORT_FLOAT && SUPPORT_LONG && SUPPORT_F2L)
719 #if !(SUPPORT_DOUBLE && SUPPORT_D2I)
735 #if !(SUPPORT_DOUBLE && SUPPORT_LONG && SUPPORT_D2L)
752 /* float functions ********************************************************/
820 #endif /* !SUPPORT_FLOAT */
822 #if !SUPPORT_FLOAT || !SUPPORT_FLOAT_CMP
849 #endif /* !SUPPORT_FLOAT || !SUPPORT_FLOAT_CMP */
852 /* double functions *******************************************************/
920 #endif /* !SUPPORT_DOUBLE */
922 #if !SUPPORT_DOUBLE || !SUPPORT_DOUBLE_CMP
949 #endif /* !SUPPORT_DOUBLE || !SUPPORT_DOUBLE_CMP */
952 /* float/double functions *************************************************/
954 #if !(SUPPORT_FLOAT && SUPPORT_DOUBLE)
981 #endif /* !(SUPPORT_FLOAT && SUPPORT_DOUBLE) */
984 /* prevent a compiler warning if everything is supported (e.g. i386) */
1002 /* automatically replaced functions *******************************************/
1004 static builtintable_entry builtintable_function[] = {
1005 #if defined(ENABLE_JIT)
1007 /* java.lang.VMSystem.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V STATIC NATIVE */
1011 BUILTINTABLE_FLAG_STUB | BUILTINTABLE_FLAG_EXCEPTION,
1014 "java/lang/VMSystem",
1016 "(Ljava/lang/Object;ILjava/lang/Object;II)V",
1023 /* java.lang.System.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V PUBLIC STATIC */
1026 /* We disable this one until we have a fix for the stacktrace
1031 BUILTINTABLE_FLAG_STUB | BUILTINTABLE_FLAG_EXCEPTION,
1036 "(Ljava/lang/Object;ILjava/lang/Object;II)V",
1044 /* java.lang.VMSystem.currentTimeMillis()J PUBLIC STATIC */
1049 BUILTIN_currenttimemillis,
1051 "java/lang/VMSystem",
1052 "currentTimeMillis",
1060 /* java.lang.System.currentTimeMillis()J PUBLIC STATIC */
1065 BUILTIN_currenttimemillis,
1068 "currentTimeMillis",
1076 #endif /* defined(ENABLE_JIT) */
1097 * These are local overrides for various environment variables in Emacs.
1098 * Please do not remove this and leave it at the end of the file, where
1099 * Emacs will automagically detect them.
1100 * ---------------------------------------------------------------------
1103 * indent-tabs-mode: t
1107 * vim:noexpandtab:sw=4:ts=4: