1 /* src/vm/jit/tools/genoffsets.c - generate asmpart offsets of structures
3 Copyright (C) 1996-2005, 2006 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
25 Contact: cacao@cacaojvm.org
27 Authors: Christian Thalinger
29 Changes: Edwin Steiner
31 $Id: genoffsets.c 4623 2006-03-16 00:05:18Z edwin $
42 #include "mm/memory.h"
44 #include "vm/global.h"
45 #include "vm/linker.h"
46 #include "vm/method.h"
48 #include "vm/jit/asmpart.h"
49 #include "vm/jit/stacktrace.h"
50 #include "vm/jit/replace.h"
53 int main(int argc, char **argv)
55 printf("/* This file is machine generated, don't edit it! */\n\n");
57 printf("/* define some sizeof()'s */\n\n");
59 printf("#define sizevmarg %3d\n", (s4) sizeof(vm_arg));
60 printf("#define sizestackframeinfo %3d\n", (s4) sizeof(stackframeinfo));
61 printf("#define sizeexecutionstate %3d\n", (s4) sizeof(executionstate));
63 printf("\n\n/* define some offsets */\n\n");
65 printf("#define offobjvftbl %3d\n", (s4) OFFSET(java_objectheader, vftbl));
68 printf("/* vftbl_t */\n\n");
69 printf("#define offbaseval %3d\n", (s4) OFFSET(vftbl_t, baseval));
70 printf("#define offdiffval %3d\n", (s4) OFFSET(vftbl_t, diffval));
73 printf("/* classinfo */\n\n");
74 printf("#define offclassvftbl %3d\n", (s4) OFFSET(classinfo, vftbl));
77 printf("#define offvmargtype %3d\n", (s4) OFFSET(vm_arg, type));
78 printf("#define offvmargdata %3d\n", (s4) OFFSET(vm_arg, data));
81 printf("#define offcast_super_baseval %3d\n", (s4) OFFSET(castinfo, super_baseval));
82 printf("#define offcast_super_diffval %3d\n", (s4) OFFSET(castinfo, super_diffval));
83 printf("#define offcast_sub_baseval %3d\n", (s4) OFFSET(castinfo, sub_baseval));
85 printf("#define offes_pc %3d\n", (s4) OFFSET(executionstate, pc));
86 printf("#define offes_sp %3d\n", (s4) OFFSET(executionstate, sp));
87 printf("#define offes_intregs %3d\n", (s4) OFFSET(executionstate, intregs));
88 printf("#define offes_fltregs %3d\n", (s4) OFFSET(executionstate, fltregs));
90 /* everything is ok */
97 * These are local overrides for various environment variables in Emacs.
98 * Please do not remove this and leave it at the end of the file, where
99 * Emacs will automagically detect them.
100 * ---------------------------------------------------------------------
103 * indent-tabs-mode: t
107 * vim:noexpandtab:sw=4:ts=4: