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)
95 #if !SUPPORT_DIVISION || defined(DISABLE_GC)
122 #if !(SUPPORT_DIVISION && SUPPORT_LONG && SUPPORT_LONG_DIV) || defined(DISABLE_GC)
175 /* internal functions *****************************************************/
182 "(Ljava/lang/Class;)Ljava/lang/Object;",
194 "(ILjava/lang/Class;)[Ljava/lang/Object;",
203 BUILTIN_newarray_boolean,
215 BUILTIN_newarray_byte,
227 BUILTIN_newarray_char,
239 BUILTIN_newarray_short,
251 BUILTIN_newarray_int,
263 BUILTIN_newarray_long,
275 BUILTIN_newarray_float,
287 BUILTIN_newarray_double,
299 BUILTIN_arraycheckcast,
302 "([Ljava/lang/Object;[Ljava/lang/Object;)[Ljava/lang/Object;",
311 BUILTIN_arrayinstanceof,
314 "([Ljava/lang/Object;[Ljava/lang/Object;)I",
326 "([Ljava/lang/Object;Ljava/lang/Object;)I",
334 #if defined(ENABLE_THREADS)
340 "(Ljava/lang/Object;)V",
352 "(Ljava/lang/Object;)V",
379 /* automatically replaced functions *******************************************/
381 static builtintable_entry builtintable_automatic[] = {
383 #if !(SUPPORT_LONG && SUPPORT_LONG_CMP)
398 #if !(SUPPORT_LONG && SUPPORT_LONG_LOGICAL)
435 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_LOGICAL) */
437 #if !(SUPPORT_LONG && SUPPORT_LONG_SHIFT)
474 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_SHIFT) */
476 #if !(SUPPORT_LONG && SUPPORT_LONG_ADD)
513 #endif /* !(SUPPORT_LONG && SUPPORT_LONG_ADD) */
515 #if !(SUPPORT_LONG && SUPPORT_LONG_MUL)
530 #if !(SUPPORT_FLOAT && SUPPORT_I2F)
545 #if !(SUPPORT_DOUBLE && SUPPORT_I2D)
560 #if !(SUPPORT_LONG && SUPPORT_FLOAT && SUPPORT_L2F)
575 #if !(SUPPORT_LONG && SUPPORT_DOUBLE && SUPPORT_L2D)
590 #if !(SUPPORT_FLOAT && SUPPORT_F2I)
605 #if !(SUPPORT_FLOAT && SUPPORT_LONG && SUPPORT_F2L)
620 #if !(SUPPORT_DOUBLE && SUPPORT_D2I)
635 #if !(SUPPORT_DOUBLE && SUPPORT_LONG && SUPPORT_D2L)
651 /* float functions ********************************************************/
714 #endif /* !SUPPORT_FLOAT */
716 #if !SUPPORT_FLOAT || !SUPPORT_FLOAT_CMP
741 #endif /* !SUPPORT_FLOAT || !SUPPORT_FLOAT_CMP */
744 /* double functions *******************************************************/
807 #endif /* !SUPPORT_DOUBLE */
809 #if !SUPPORT_DOUBLE || !SUPPORT_DOUBLE_CMP
834 #endif /* !SUPPORT_DOUBLE || !SUPPORT_DOUBLE_CMP */
837 /* float/double functions *************************************************/
839 #if !(SUPPORT_FLOAT && SUPPORT_DOUBLE)
864 #endif /* !(SUPPORT_FLOAT && SUPPORT_DOUBLE) */
867 /* prevent a compiler warning if everything is supported (e.g. i386) */
884 /* automatically replaced functions *******************************************/
886 static builtintable_entry builtintable_function[] = {
887 #if defined(ENABLE_JIT)
889 /* java.lang.VMSystem.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V STATIC NATIVE */
894 "java/lang/VMSystem",
896 "(Ljava/lang/Object;ILjava/lang/Object;II)V",
904 /* java.lang.System.arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V PUBLIC STATIC */
907 /* We disable this one until we have a fix for the stacktrace
915 "(Ljava/lang/Object;ILjava/lang/Object;II)V",
924 /* java.lang.VMSystem.currentTimeMillis()J PUBLIC STATIC */
928 BUILTIN_currenttimemillis,
929 "java/lang/VMSystem",
939 /* java.lang.System.currentTimeMillis()J PUBLIC STATIC */
943 BUILTIN_currenttimemillis,
954 #endif /* defined(ENABLE_JIT) */
974 * These are local overrides for various environment variables in Emacs.
975 * Please do not remove this and leave it at the end of the file, where
976 * Emacs will automagically detect them.
977 * ---------------------------------------------------------------------
980 * indent-tabs-mode: t