* configure.ac (AC_CONFIG_FILES): Removed src/vm/jit/tools/Makefile.
* src/vm/jit/Makefile.am (DIST_SUBDIRS): Removed tools.
(SUBDIRS): Likewise.
* src/threads/critical.c (stdint.h): Added.
(vm/jit/asmpart.h): Removed.
(critical_init): Don't call critical_register_asm_critical_sections.
(critical_register_asm_critical_sections): Removed.
* src/vm/jit/asmpart.h (ASM_GETCLASSVALUES_ATOMIC): Removed.
(asm_criticalsections): Likewise.
(asm_getclassvalues_atomic): Likewise.
(intrp_asm_getclassvalues_atomic): Likewise.
* src/vm/jit/alpha/Makefile.am,
src/vm/jit/arm/Makefile.am,
src/vm/jit/i386/Makefile.am,
src/vm/jit/m68k/Makefile.am,
src/vm/jit/mips/Makefile.am,
src/vm/jit/powerpc/Makefile.am,
src/vm/jit/powerpc64/Makefile.am,
src/vm/jit/s390/Makefile.am,
src/vm/jit/sparc64/Makefile.am,
src/vm/jit/x86_64/Makefile.am (BUILT_SOURCES): Removed
(CLEANFILES): Likewise.
(offsets.h): Likewise.
* src/vm/jit/alpha/asmpart.S,
src/vm/jit/arm/asmpart.S,
src/vm/jit/i386/asmpart.S,
src/vm/jit/m68k/asmpart.S,
src/vm/jit/mips/asmpart.S,
src/vm/jit/powerpc/asmpart.S,
src/vm/jit/powerpc64/asmpart.S,
src/vm/jit/s390/asmpart.S,
src/vm/jit/sparc64/asmpart.S,
src/vm/jit/x86_64/asmpart.S (offsets.h): Removed.
(asm_getclassvalues_atomic): Likewise.
(asm_criticalsections): Likewise.
* src/vm/jit/powerpc/darwin/md-asm.h (asm_criticalsections): Removed.
(asm_getclassvalues_atomic): Likewise.
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
dnl 02110-1301, USA.
dnl
-dnl $Id: configure.ac 8250 2007-07-31 13:16:43Z twisti $
+dnl $Id: configure.ac 8274 2007-08-08 15:58:17Z twisti $
dnl Process this file with autoconf to produce a configure script.
[src/vm/jit/sparc64/Makefile]
[src/vm/jit/sparc64/linux/Makefile]
[src/vm/jit/sparc64/solaris/Makefile]
- [src/vm/jit/tools/Makefile]
[src/vm/jit/verify/Makefile]
[src/vm/jit/x86_64/Makefile]
[src/vm/jit/x86_64/freebsd/Makefile]
[tests/regression/resolving/classes1/Makefile]
[tests/regression/resolving/classes2/Makefile]
[tests/regression/resolving/classes3/Makefile]
- )
+)
dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS
#include "config.h"
#include <stddef.h>
+#include <stdint.h>
#include "vm/types.h"
#include "toolbox/avl.h"
-#include "vm/jit/asmpart.h"
-
/* the AVL tree containing the critical sections */
/* prototypes *****************************************************************/
-static s4 critical_comparator(const void *treenode, const void *node);
-static void critical_register_asm_critical_sections(void);
+static int critical_comparator(const void *treenode, const void *node);
/* critical_init ***************************************************************
void critical_init(void)
{
criticaltree = avl_create(&critical_comparator);
-
- critical_register_asm_critical_sections();
}
*******************************************************************************/
-static s4 critical_comparator(const void *treenode, const void *node)
+static int critical_comparator(const void *treenode, const void *node)
{
const critical_section_node_t *treecsn;
const critical_section_node_t *csn;
}
-/* critical_register_asm_critical_sections *************************************
-
- Register critical sections defined in the array asm_criticalsections.
-
-*******************************************************************************/
-
-static void critical_register_asm_critical_sections(void)
-{
- /* XXX TWISTI: this is just a quick hack */
-#if defined(ENABLE_JIT) && defined(ENABLE_THREADS)
- critical_section_node_t *n = &asm_criticalsections;
-
- while (n->start)
- critical_section_register(n++);
-#endif
-}
-
-
/*
* These are local overrides for various environment variables in Emacs.
* Please do not remove this and leave it at the end of the file, where
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
##
-## $Id: Makefile.am 8145 2007-06-27 08:54:10Z michi $
+## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
## Process this file with automake to produce Makefile.in
loop \
optimizing \
schedule \
- tools \
verify \
\
intrp \
SUBDIRS = \
optimizing \
- tools \
$(ARCH_DIR)
ARCH_LIB = \
## src/vm/jit/alpha/Makefile.am
##
-## Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+## Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
## J. Wenninger, Institut f. Computersprachen - TU Wien
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
##
-## Contact: cacao@cacaojvm.org
-##
-## Authors: Christian Thalinger
-##
-## Changes:
-##
-## $Id: Makefile.am 4826 2006-04-24 16:06:16Z twisti $
+## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
## Process this file with automake to produce Makefile.in
LIBS =
-BUILT_SOURCES = offsets.h
-
-CLEANFILES = offsets.h
-
noinst_HEADERS = \
arch.h \
machine-instr.h \
libarch_la_LIBADD = \
$(OS_DIR)/libmd.la
-$(srcdir)/asmpart.S: $(top_builddir)/config.h offsets.h
-
-offsets.h: $(top_builddir)/src/vm/jit/tools/genoffsets $(top_builddir)/config.h
- $(top_builddir)/src/vm/jit/tools/genoffsets > offsets.h
+$(srcdir)/asmpart.S: $(top_builddir)/config.h
## Local variables:
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: asmpart.S 8198 2007-07-12 07:16:24Z twisti $
+ $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
*/
#include "vm/jit/alpha/md-abi.h"
#include "vm/jit/alpha/md-asm.h"
-#include "vm/jit/alpha/offsets.h"
#include "vm/jit/abi-asm.h"
#include "vm/jit/methodheader.h"
.globl asm_compare_and_swap
.globl asm_memory_barrier
- .globl asm_criticalsections
- .globl asm_getclassvalues_atomic
-
.globl asm_md_init
.globl asm_cacheflush
.end asm_memory_barrier
- .ent asm_getclassvalues_atomic
-
-asm_getclassvalues_atomic:
-_crit_restart:
-_crit_begin:
- ldl t0,offbaseval(a0)
- ldl t1,offdiffval(a0)
- ldl t2,offbaseval(a1)
-_crit_end:
- stl t0,offcast_super_baseval(a2)
- stl t1,offcast_super_diffval(a2)
- stl t2,offcast_sub_baseval(a2)
- jmp zero,(ra)
-
- .end asm_getclassvalues_atomic
-
-
- .data
-
-asm_criticalsections:
-#if defined(ENABLE_THREADS)
- .quad _crit_begin
- .quad _crit_end
- .quad _crit_restart
-#endif
- .quad 0
-
-
/* asm_md_init *****************************************************************
Initialize machine dependent stuff.
## src/vm/jit/arm/Makefile.am
##
-## Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+## Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
## J. Wenninger, Institut f. Computersprachen - TU Wien
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
##
-## Contact: cacao@cacaojvm.org
-##
-## Authors: Christian Thalinger
-##
-## Changes: Michael Starzinger
-##
-## $Id: Makefile.am 6527 2006-05-09 17:55:18Z twisti $
+## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
## Process this file with automake to produce Makefile.in
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir) -I$(top_builddir)/src
AM_CCASFLAGS = $(AM_CPPFLAGS)
-BUILT_SOURCES = offsets.h
-
-CLEANFILES = offsets.h
-
noinst_HEADERS = \
arch.h \
machine-instr.h \
libarch_la_LIBADD = \
$(OS_DIR)/libmd.la
-$(srcdir)/asmpart.S: $(top_builddir)/config.h offsets.h
-
-offsets.h: $(top_builddir)/src/vm/jit/tools/genoffsets $(top_builddir)/config.h
- $(top_builddir)/src/vm/jit/tools/genoffsets > offsets.h
+$(srcdir)/asmpart.S: $(top_builddir)/config.h
## Local variables:
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: asmpart.S 8160 2007-06-28 01:52:19Z michi $
+ $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
*/
.globl asm_cacheflush
- .globl asm_getclassvalues_atomic
- .globl asm_criticalsections
-
-
#if !defined(ENABLE_THREADS)
asm_exceptionptr:
.word _no_threads_exceptionptr
#endif
-asm_criticalsections:
-#if defined(ENABLE_THREADS)
- .word _crit_begin
- .word _crit_end
- .word _crit_restart
-#endif
- .word 0
-
/* asm_vm_call_method **********************************************************
#endif
-/********************* function asm_getclassvalues_atomic *********************/
-
-asm_getclassvalues_atomic:
- stmfd sp!, {r4, r5, r6}
-_crit_restart:
-_crit_begin:
- ldr r4,[a0,#offbaseval]
- ldr r5,[a0,#offdiffval]
- ldr r6,[a1,#offbaseval]
-_crit_end:
- str r4,[a2,#offcast_super_baseval]
- str r5,[a2,#offcast_super_diffval]
- str r6,[a2,#offcast_sub_baseval]
- ldmfd sp!, {r4, r5, r6}
- mov pc, lr
-
-
/* disable exec-stacks ********************************************************/
#if defined(__linux__) && defined(__ELF__)
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: asmpart.h 8270 2007-08-08 13:57:12Z twisti $
+ $Id: asmpart.h 8274 2007-08-08 15:58:17Z twisti $
*/
#include "vmcore/linker.h"
-/* some macros ****************************************************************/
-
-#if defined(ENABLE_JIT)
-# if defined(ENABLE_INTRP)
-
-# define ASM_GETCLASSVALUES_ATOMIC(super,sub,out) \
- do { \
- if (opt_intrp) \
- intrp_asm_getclassvalues_atomic((super), (sub), (out)); \
- else \
- asm_getclassvalues_atomic((super), (sub), (out)); \
- } while (0)
-
-# else /* defined(ENABLE_INTRP) */
-
-# define ASM_GETCLASSVALUES_ATOMIC(super,sub,out) \
- asm_getclassvalues_atomic((super), (sub), (out))
-
-# endif /* defined(ENABLE_INTRP) */
-
-#else /* defined(ENABLE_JIT) */
-
-# define ASM_GETCLASSVALUES_ATOMIC(super,sub,out) \
- intrp_asm_getclassvalues_atomic((super), (sub), (out))
-
-#endif /* defined(ENABLE_JIT) */
-
-
/* function prototypes ********************************************************/
/* machine dependent initialization */
long asm_compare_and_swap(volatile long *p, long oldval, long newval);
void asm_memory_barrier(void);
-#if defined(ENABLE_THREADS)
-extern critical_section_node_t asm_criticalsections;
-#endif
-
-#if defined(ENABLE_JIT)
-void asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out);
-#endif
-
-#if defined(ENABLE_INTRP)
-void intrp_asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out);
-#endif
-
/* cache flush function */
void asm_cacheflush(u1 *addr, s4 nbytes);
## src/vm/jit/i386/Makefile.am
##
-## Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+## Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
## J. Wenninger, Institut f. Computersprachen - TU Wien
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
##
-## Contact: cacao@cacaojvm.org
-##
-## Authors: Christian Thalinger
-##
-## Changes:
-##
-## $Id: Makefile.am 5794 2006-10-18 15:09:56Z twisti $
+## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
## Process this file with automake to produce Makefile.in
LIBS =
-BUILT_SOURCES = offsets.h
-
-CLEANFILES = offsets.h
-
noinst_HEADERS = \
arch.h \
machine-instr.h
libarch_la_LIBADD = \
$(OS_DIR)/libmd.la
-$(srcdir)/asmpart.S: $(top_builddir)/config.h offsets.h
-
-offsets.h: $(top_builddir)/src/vm/jit/tools/genoffsets $(top_builddir)/config.h
- $(top_builddir)/src/vm/jit/tools/genoffsets > offsets.h
+$(srcdir)/asmpart.S: $(top_builddir)/config.h
## Local variables:
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: asmpart.S 8210 2007-07-18 12:51:00Z twisti $
+ $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
*/
#include "vm/jit/i386/arch.h"
#include "vm/jit/i386/md-abi.h"
-#include "vm/jit/i386/offsets.h"
#include "vm/jit/abi-asm.h"
#include "vm/jit/methodheader.h"
.globl asm_compare_and_swap
.globl asm_memory_barrier
- .globl asm_criticalsections
- .globl asm_getclassvalues_atomic
-
.globl asm_get_cycle_count
ret
-asm_getclassvalues_atomic:
-_crit_restart2:
- mov 4(%esp),%ecx /* super */
- mov 8(%esp),%edx /* sub */
-_crit_begin2:
- mov offbaseval(%ecx),%eax
- mov offdiffval(%ecx),%ecx
- mov offbaseval(%edx),%edx
-_crit_end2:
- push %ebx
- mov 16(%esp),%ebx /* out */
- mov %eax,offcast_super_baseval(%ebx)
- mov %ecx,offcast_super_diffval(%ebx)
- mov %edx,offcast_sub_baseval(%ebx)
- pop %ebx
- ret
-
- .data
-
-asm_criticalsections:
-#if defined(ENABLE_THREADS)
-#if 0
- .long _crit_begin1
- .long _crit_end1
- .long _crit_restart1
-#endif
- .long _crit_begin2
- .long _crit_end2
- .long _crit_restart2
-#endif
- .long 0
-
-
/* asm_get_cycle_count *********************************************************
Get the current time-stamp counter from the CPU.
-DIST_SUBDIRS = linux
+## src/vm/jit/m68k/Makefile.am
+##
+## Copyright (C) 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
+## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+## J. Wenninger, Institut f. Computersprachen - TU Wien
+##
+## This file is part of CACAO.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License as
+## published by the Free Software Foundation; either version 2, or (at
+## your option) any later version.
+##
+## This program is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: Makefile.am 5794 2006-10-18 15:09:56Z twisti $
+
+## Process this file with automake to produce Makefile.in
+
+DIST_SUBDIRS = \
+ linux
SUBDIRS = $(OS_DIR)
LIBS =
-#BUILT_SOURCES = offsets.h
-
-CLEANFILES = offsets.h
-
noinst_HEADERS = \
arch.h \
machine-instr.h
-noinst_LTLIBRARIES = libarch.la
+noinst_LTLIBRARIES = \
+ libarch.la
if ENABLE_DISASSEMBLER
DISASS_SOURCES = \
emit.c \
md.c \
patcher.c
-
+
libarch_la_LIBADD = \
$(OS_DIR)/libmd.la
- $(srcdir)/asmpart.S: $(top_builddir)/config.h offsets.h
-#offsets.h: $(top_builddir)/src/vm/jit/tools/genoffsets $(top_builddir)/config.h
-# $(top_builddir)/src/vm/jit/tools/genoffsets > offsets.h
+$(srcdir)/asmpart.S: $(top_builddir)/config.h
+
+## Local variables:
+## mode: Makefile
+## indent-tabs-mode: t
+## c-basic-offset: 4
+## tab-width: 8
+## compile-command: "automake --add-missing"
+## End:
-/* src/vm/jit/m68k/asmpart.S
- * for cacao
- * Roland Lezuo
- */
+/* src/vm/jit/m68k/asmpart.S - Java-C interface functions for m68k
+
+ Copyright (C) 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
+ C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+ E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+ J. Wenninger, Institut f. Computersprachen - TU Wien
+
+ This file is part of CACAO.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: asmpart.S 8210 2007-07-18 12:51:00Z twisti $
+
+*/
+
#include "config.h"
-#include "vm/jit/m68k/offsets.h"
#include "md-abi.h"
+
#include "vm/jit/methodheader.h"
+
.text
.globl asm_vm_call_method
.globl asm_patcher_wrapper
-.globl asm_getclassvalues_atomic
.globl asm_abstractmethoderror
-.globl asm_criticalsections
.globl asm_handle_exception
.globl asm_handle_nat_exception
jmp asm_handle_exception /* handle exception */
illegal /* XXX: we never come back */
-/********************************************************************************
- Reads a few values atomically.
- C signature:
- void asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out);
-
- super ... sp@(4)
- sub ... sp@(8)
- out ... sp@(12)
-********************************************************************************/
-asm_getclassvalues_atomic:
-_crit_restart:
-_crit_begin:
- moveal %sp@(4), %a0
- movel %a0@(offbaseval), %d0
- movel %a0@(offdiffval), %d1
-
- moveal %sp@(8), %a0
- moveal %a0@(offbaseval), %a0
-_crit_end:
- moveal %sp@(12), %a1
- movel %d0, %a1@(offcast_super_baseval)
- movel %d1, %a1@(offcast_super_diffval)
- movel %a0, %a1@(offcast_sub_baseval)
-
- rts
-.data
-asm_criticalsections:
-#if defined(ENABLE_THREADS)
- .long _crit_begin
- .long _crit_end
- .long _crit_restart
-#endif
- .long 0
-.text
asm_abstractmethoderror:
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
##
-## $Id: Makefile.am 7957 2007-05-23 18:28:01Z twisti $
+## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
## Process this file with automake to produce Makefile.in
LIBS =
-BUILT_SOURCES = \
- offsets.h
-
-CLEANFILES = \
- offsets.h
-
noinst_HEADERS = \
arch.h \
machine-instr.h \
libarch_la_LIBADD = \
$(OS_DIR)/libmd.la
-$(srcdir)/asmpart.S: $(top_builddir)/config.h offsets.h
-
-offsets.h: $(top_builddir)/src/vm/jit/tools/genoffsets $(top_builddir)/config.h
- $(top_builddir)/src/vm/jit/tools/genoffsets > offsets.h
+$(srcdir)/asmpart.S: $(top_builddir)/config.h
## Local variables:
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: asmpart.S 8264 2007-08-06 16:02:28Z twisti $
+ $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
*/
#include "vm/jit/mips/md-abi.h"
#include "vm/jit/mips/md-asm.h"
-#include "vm/jit/mips/offsets.h"
#include "vm/jit/abi-asm.h"
#include "vm/jit/methodheader.h"
.globl asm_replacement_in
#endif
- .globl asm_getclassvalues_atomic
- .globl asm_criticalsections
-
.globl compare_and_swap
#endif /* defined(ENABLE_REPLACEMENT) */
- .ent asm_getclassvalues_atomic
-
-asm_getclassvalues_atomic:
-_crit_restart:
-_crit_begin:
- lw t0,offbaseval(a0)
- lw t1,offdiffval(a0)
- lw t2,offbaseval(a1)
-_crit_end:
- sw t0,offcast_super_baseval(a2)
- sw t1,offcast_super_diffval(a2)
- sw t2,offcast_sub_baseval(a2)
- j ra
-
- .end asm_getclassvalues_atomic
-
- .data
-
-asm_criticalsections:
-#if defined(ENABLE_THREADS)
- .dword _crit_begin
- .dword _crit_end
- .dword _crit_restart
-#endif
- .dword 0
-
-
- .text
-
.ent compare_and_swap
compare_and_swap:
## src/vm/jit/powerpc/Makefile.am
##
-## Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+## Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
## J. Wenninger, Institut f. Computersprachen - TU Wien
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
##
-## Contact: cacao@cacaojvm.org
-##
-## Authors: Christian Thalinger
-##
-## Changes:
-##
-## $Id: Makefile.am 5342 2006-09-05 21:17:54Z twisti $
+## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
## Process this file with automake to produce Makefile.in
LIBS =
-BUILT_SOURCES = offsets.h
-
-CLEANFILES = offsets.h
-
noinst_HEADERS = \
arch.h \
machine-instr.h
-noinst_LTLIBRARIES = libarch.la
+noinst_LTLIBRARIES = \
+ libarch.la
if ENABLE_DISASSEMBLER
DISASS_SOURCES = \
libarch_la_LIBADD = \
$(OS_DIR)/libmd.la
-$(srcdir)/asmpart.S: $(top_builddir)/config.h offsets.h
-
-offsets.h: $(top_builddir)/src/vm/jit/tools/genoffsets $(top_builddir)/config.h
- $(top_builddir)/src/vm/jit/tools/genoffsets > offsets.h
+$(srcdir)/asmpart.S: $(top_builddir)/config.h
## Local variables:
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: asmpart.S 8270 2007-08-08 13:57:12Z twisti $
+ $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
*/
#include "vm/jit/abi-asm.h"
#include "vm/jit/methodheader.h"
-#include "vm/jit/powerpc/offsets.h"
.text
.globl asm_compare_and_swap
.globl asm_memory_barrier
- .globl asm_criticalsections
- .globl asm_getclassvalues_atomic
-
/* asm_vm_call_method **********************************************************
* *
blr
-asm_getclassvalues_atomic:
-_crit_restart:
-_crit_begin:
- lwz a3,offbaseval(a0)
- lwz a4,offdiffval(a0)
- lwz a5,offbaseval(a1)
-_crit_end:
- stw a3,offcast_super_baseval(a2)
- stw a4,offcast_super_diffval(a2)
- stw a5,offcast_sub_baseval(a2)
- blr
-
- .data
-
-asm_criticalsections:
-#if defined(ENABLE_THREADS)
- .long _crit_begin
- .long _crit_end
- .long _crit_restart
-#endif
- .long 0
-
-
#if defined(__DARWIN__)
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
Changes:
- $Id: md-asm.h 7621 2007-04-01 16:18:16Z stefan $
+ $Id: md-asm.h 8274 2007-08-08 15:58:17Z twisti $
*/
#define asm_cacheflush _asm_cacheflush
-#define asm_criticalsections _asm_criticalsections
-#define asm_getclassvalues_atomic _asm_getclassvalues_atomic
-
/* external defines ***********************************************************/
## src/vm/jit/powerpc64/Makefile.am
##
-## Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+## Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
## J. Wenninger, Institut f. Computersprachen - TU Wien
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
##
-## Contact: cacao@cacaojvm.org
-##
-## Authors: Christian Thalinger
-##
-## Changes:
-##
-## $Id: Makefile.am 5162 2006-07-19 13:07:00Z tbfg $
+## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
## Process this file with automake to produce Makefile.in
LIBS =
-BUILT_SOURCES = offsets.h
-
-CLEANFILES = offsets.h
-
noinst_HEADERS = \
arch.h \
machine-instr.h
libarch_la_LIBADD = \
$(OS_DIR)/libmd.la
-$(srcdir)/asmpart.S: $(top_builddir)/config.h offsets.h
-
-offsets.h: $(top_builddir)/src/vm/jit/tools/genoffsets $(top_builddir)/config.h
- $(top_builddir)/src/vm/jit/tools/genoffsets > offsets.h
+$(srcdir)/asmpart.S: $(top_builddir)/config.h
## Local variables:
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: asmpart.S 8123 2007-06-20 23:50:55Z michi $
+ $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
*/
#include "vm/jit/abi-asm.h"
#include "vm/jit/methodheader.h"
-#include "vm/jit/powerpc64/offsets.h"
+
/* export functions ***********************************************************/
#endif
.globl asm_cacheflush
- .globl asm_criticalsections
- .globl asm_getclassvalues_atomic
+
/* asm_vm_call_method **********************************************************
* *
isync
blr
-/*
- asm_getclassvalues_atomic
-*/
- .section ".opd","aw"
- .align 3
-asm_getclassvalues_atomic:
- .quad .asm_getclassvalues_atomic,.TOC.@tocbase,0
- .previous
- .size asm_getclassvalues_atomic, 24
- .type .asm_getclassvalues_atomic,@function
- .globl .asm_getclassvalues_atomic
-.asm_getclassvalues_atomic:
-
-_crit_restart:
-_crit_begin:
- lwz r6,offbaseval(r3)
- lwz r7,offdiffval(r3)
- lwz r8,offbaseval(r4)
-_crit_end:
- stw r6,offcast_super_baseval(r5)
- stw r7,offcast_super_diffval(r5)
- stw r8,offcast_sub_baseval(r5)
- blr
-
- .data
-
-asm_criticalsections:
-#if defined(ENABLE_THREADS)
- .quad _crit_begin
- .quad _crit_end
- .quad _crit_restart
-#endif
- .quad 0
/* disable exec-stacks ********************************************************/
-## src/vm/jit/x86_64/Makefile.am
+## src/vm/jit/s390/Makefile.am
##
-## Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+## Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
## J. Wenninger, Institut f. Computersprachen - TU Wien
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
##
-## Contact: cacao@cacaojvm.org
-##
-## Authors: Christian Thalinger
-##
-## Changes:
-##
-## $Id: Makefile.am 5830 2006-10-26 11:04:31Z twisti $
+## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
## Process this file with automake to produce Makefile.in
LIBS =
-BUILT_SOURCES = offsets.h
-
-CLEANFILES = offsets.h
-
noinst_HEADERS = \
arch.h \
machine-instr.h \
\
md-asm.h
-noinst_LTLIBRARIES = libarch.la
+noinst_LTLIBRARIES = \
+ libarch.la
if ENABLE_DISASSEMBLER
DISASS_SOURCES = \
md-abi.h \
md.c
-$(srcdir)/asmpart.S: $(top_builddir)/config.h offsets.h
-
-offsets.h: $(top_builddir)/src/vm/jit/tools/genoffsets $(top_builddir)/config.h
- $(top_builddir)/src/vm/jit/tools/genoffsets > offsets.h
+$(srcdir)/asmpart.S: $(top_builddir)/config.h
## Local variables:
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: asmpart.S 8251 2007-08-01 15:26:59Z pm $
+ $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
*/
#include "vm/jit/s390/arch.h"
#include "vm/jit/s390/md-abi.h"
#include "vm/jit/s390/md-asm.h"
-#include "vm/jit/s390/offsets.h"
#include "vm/jit/abi-asm.h"
#include "vm/jit/methodheader.h"
.globl asm_builtin_d2i
.globl asm_builtin_d2l
- .globl asm_criticalsections
- .globl asm_getclassvalues_atomic
-
asm_abstractmethoderror:
.long 0
ret
#endif
-/* TODO use move here ? */
-
-asm_getclassvalues_atomic:
-_crit_restart:
-_crit_begin:
- l %r0,offbaseval(a0)
- l %r1,offdiffval(a0)
- l a3,offbaseval(a1)
-_crit_end:
- st %r0,offcast_super_baseval(a2)
- st %r1,offcast_super_diffval(a2)
- st a3,offcast_sub_baseval(a2)
- br %r14
-
- .data
-
-asm_criticalsections:
-#if defined(ENABLE_THREADS)
- .long _crit_begin
- .long _crit_end
- .long _crit_restart
-#endif
- .long 0
-
/*
* These are local overrides for various environment variables in Emacs.
## src/vm/jit/sparc64/Makefile.am
##
-## Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+## Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
## J. Wenninger, Institut f. Computersprachen - TU Wien
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
##
-## Contact: cacao@cacaojvm.org
-##
-## Authors: Christian Thalinger
-## Alexander Jordan
-##
-## Changes:
-##
## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
## Process this file with automake to produce Makefile.in
LIBS =
-BUILT_SOURCES = offsets.h
-
-CLEANFILES = offsets.h
-
noinst_HEADERS = \
arch.h \
machine-instr.h \
libarch_la_LIBADD = \
$(OS_DIR)/libmd.la
-$(srcdir)/asmpart.S: $(top_builddir)/config.h offsets.h
-
-offsets.h: $(top_builddir)/src/vm/jit/tools/genoffsets $(top_builddir)/config.h
- $(top_builddir)/src/vm/jit/tools/genoffsets > offsets.h
+$(srcdir)/asmpart.S: $(top_builddir)/config.h
## Local variables:
#include "config.h"
-#include "vm/jit/sparc64/md-abi.h"
-#include "vm/jit/sparc64/offsets.h"
#include "md-asm.h"
+#include "vm/jit/sparc64/md-abi.h"
+
+
.register %g2,#scratch /* define as scratch */
.register %g3,#scratch /* XXX reserve for application */
.text
.global asm_abstractmethoderror
- .global asm_criticalsections
- .global asm_getclassvalues_atomic
-
.global asm_store_fp_state_reg
.global asm_load_fp_state_reg
nop
-
-
-asm_getclassvalues_atomic:
-_crit_restart:
-_crit_begin:
-/* not doing a window save, using the global temporary registers */
- ldsw [offbaseval+%o0],itmp1
- ldsw [offdiffval+%o0],itmp2
- ldsw [offbaseval+%o1],itmp3
-_crit_end:
- stw itmp1,[offcast_super_baseval+%o2]
- stw itmp2,[offcast_super_diffval+%o2]
- stw itmp3,[offcast_sub_baseval+%o2]
- jmpl ra_caller+8,zero /* caller's ra, b/c no window save */
- nop
-
-
- .data
-
-asm_criticalsections:
-#if defined(ENABLE_THREADS)
- .xword _crit_begin
- .xword _crit_end
- .xword _crit_restart
-#endif
- .xword 0
-
-
/* disable exec-stacks ********************************************************/
#if defined(__linux__) && defined(__ELF__)
+++ /dev/null
-## src/vm/jit/tools/Makefile.am
-##
-## Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
-## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
-## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
-## J. Wenninger, Institut f. Computersprachen - TU Wien
-##
-## This file is part of CACAO.
-##
-## This program is free software; you can redistribute it and/or
-## modify it under the terms of the GNU General Public License as
-## published by the Free Software Foundation; either version 2, or (at
-## your option) any later version.
-##
-## This program is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-## 02110-1301, USA.
-##
-## $Id: Makefile.am 7290 2007-02-06 08:48:29Z twisti $
-
-## Process this file with automake to produce Makefile.in
-
-AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR)
-
-LIBS =
-
-noinst_PROGRAMS = \
- genoffsets
-
-genoffsets_SOURCES = \
- genoffsets.c
-
-
-## Local variables:
-## mode: Makefile
-## indent-tabs-mode: t
-## c-basic-offset: 4
-## tab-width: 8
-## compile-command: "automake --add-missing"
-## End:
+++ /dev/null
-/* src/vm/jit/tools/genoffsets.c - generate asmpart offsets of structures
-
- Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
- C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
- E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
- J. Wenninger, Institut f. Computersprachen - TU Wien
-
- This file is part of CACAO.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-
- $Id: genoffsets.c 8271 2007-08-08 14:07:56Z twisti $
-
-*/
-
-
-#include "config.h"
-
-#include <stdio.h>
-
-#include "vm/types.h"
-
-#include "mm/memory.h"
-
-#include "vm/global.h"
-#include "vm/vm.h"
-
-#include "vm/jit/asmpart.h"
-#include "vm/jit/replace.h"
-
-
-int main(int argc, char **argv)
-{
- printf("/* This file is machine generated, don't edit it! */\n\n");
-
- printf("/* define some sizeof()'s */\n\n");
-
-#if defined(ENABLE_REPLACEMENT)
- printf("#define sizeexecutionstate %3d\n", (s4) sizeof(executionstate_t));
-#endif
-
- printf("\n\n/* define some offsets */\n\n");
-
- printf("/* vftbl_t */\n\n");
- printf("#define offbaseval %3d\n", (s4) OFFSET(vftbl_t, baseval));
- printf("#define offdiffval %3d\n", (s4) OFFSET(vftbl_t, diffval));
- printf("\n\n");
-
-
- printf("#define offcast_super_baseval %3d\n", (s4) OFFSET(castinfo, super_baseval));
- printf("#define offcast_super_diffval %3d\n", (s4) OFFSET(castinfo, super_diffval));
- printf("#define offcast_sub_baseval %3d\n", (s4) OFFSET(castinfo, sub_baseval));
-
-#if defined(ENABLE_REPLACEMENT)
- printf("#define offes_pc %3d\n", (s4) OFFSET(executionstate_t, pc));
- printf("#define offes_sp %3d\n", (s4) OFFSET(executionstate_t, sp));
- printf("#define offes_pv %3d\n", (s4) OFFSET(executionstate_t, pv));
- printf("#define offes_intregs %3d\n", (s4) OFFSET(executionstate_t, intregs));
- printf("#define offes_fltregs %3d\n", (s4) OFFSET(executionstate_t, fltregs));
-#endif /* defined(ENABLE_REPLACEMENT) */
-
- /* everything is ok */
-
- return 0;
-}
-
-
-/*
- * These are local overrides for various environment variables in Emacs.
- * Please do not remove this and leave it at the end of the file, where
- * Emacs will automagically detect them.
- * ---------------------------------------------------------------------
- * Local variables:
- * mode: c
- * indent-tabs-mode: t
- * c-basic-offset: 4
- * tab-width: 4
- * End:
- * vim:noexpandtab:sw=4:ts=4:
- */
-
-
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
##
-## $Id: Makefile.am 7294 2007-02-06 09:11:36Z twisti $
+## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
## Process this file with automake to produce Makefile.in
SUBDIRS = $(OS_DIR)
-BUILT_SOURCES = \
- offsets.h
-
-CLEANFILES = \
- offsets.h
-
noinst_HEADERS = \
arch.h \
machine-instr.h \
libarch_la_LIBADD = \
$(OS_DIR)/libmd.la
-$(srcdir)/asmpart.S: $(top_builddir)/config.h offsets.h
-
-offsets.h: $(top_builddir)/src/vm/jit/tools/genoffsets $(top_builddir)/config.h
- $(top_builddir)/src/vm/jit/tools/genoffsets > offsets.h
+$(srcdir)/asmpart.S: $(top_builddir)/config.h
## Local variables:
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: asmpart.S 8197 2007-07-11 19:17:04Z twisti $
+ $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
*/
#include "vm/jit/x86_64/arch.h"
#include "vm/jit/x86_64/md-abi.h"
#include "vm/jit/x86_64/md-asm.h"
-#include "vm/jit/x86_64/offsets.h"
#include "vm/jit/abi-asm.h"
#include "vm/jit/methodheader.h"
.globl asm_compare_and_swap
.globl asm_memory_barrier
- .globl asm_criticalsections
- .globl asm_getclassvalues_atomic
-
/********************* function asm_calljavafunction ***************************
* *
ret
-asm_getclassvalues_atomic:
-_crit_restart:
-_crit_begin:
- movl offbaseval(a0),itmp1l
- movl offdiffval(a0),itmp2l
- movl offbaseval(a1),itmp3l
-_crit_end:
- movl itmp1l,offcast_super_baseval(a2)
- movl itmp2l,offcast_super_diffval(a2)
- movl itmp3l,offcast_sub_baseval(a2)
- ret
-
- .data
-
-asm_criticalsections:
-#if defined(ENABLE_THREADS)
- .quad _crit_begin
- .quad _crit_end
- .quad _crit_restart
-#endif
- .quad 0
-
-
/* disable exec-stacks ********************************************************/
#if defined(__linux__) && defined(__ELF__)