1 /* src/vm/jit/tools/genoffsets.c - generate asmpart offsets of structures
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
25 $Id: genoffsets.c 8271 2007-08-08 14:07:56Z twisti $
36 #include "mm/memory.h"
38 #include "vm/global.h"
41 #include "vm/jit/asmpart.h"
42 #include "vm/jit/replace.h"
45 int main(int argc, char **argv)
47 printf("/* This file is machine generated, don't edit it! */\n\n");
49 printf("/* define some sizeof()'s */\n\n");
51 #if defined(ENABLE_REPLACEMENT)
52 printf("#define sizeexecutionstate %3d\n", (s4) sizeof(executionstate_t));
55 printf("\n\n/* define some offsets */\n\n");
57 printf("/* vftbl_t */\n\n");
58 printf("#define offbaseval %3d\n", (s4) OFFSET(vftbl_t, baseval));
59 printf("#define offdiffval %3d\n", (s4) OFFSET(vftbl_t, diffval));
63 printf("#define offcast_super_baseval %3d\n", (s4) OFFSET(castinfo, super_baseval));
64 printf("#define offcast_super_diffval %3d\n", (s4) OFFSET(castinfo, super_diffval));
65 printf("#define offcast_sub_baseval %3d\n", (s4) OFFSET(castinfo, sub_baseval));
67 #if defined(ENABLE_REPLACEMENT)
68 printf("#define offes_pc %3d\n", (s4) OFFSET(executionstate_t, pc));
69 printf("#define offes_sp %3d\n", (s4) OFFSET(executionstate_t, sp));
70 printf("#define offes_pv %3d\n", (s4) OFFSET(executionstate_t, pv));
71 printf("#define offes_intregs %3d\n", (s4) OFFSET(executionstate_t, intregs));
72 printf("#define offes_fltregs %3d\n", (s4) OFFSET(executionstate_t, fltregs));
73 #endif /* defined(ENABLE_REPLACEMENT) */
75 /* everything is ok */
82 * These are local overrides for various environment variables in Emacs.
83 * Please do not remove this and leave it at the end of the file, where
84 * Emacs will automagically detect them.
85 * ---------------------------------------------------------------------
92 * vim:noexpandtab:sw=4:ts=4: