1 /* src/vm/jit/dseg.c - data segment handling stuff
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
29 /* forward typedefs ***********************************************************/
31 typedef struct dsegentry dsegentry;
37 #include "vm/references.h"
39 #include "vm/jit/jit.hpp"
40 #include "vm/jit/codegen-common.hpp"
43 /* convenience macros *********************************************************/
45 #define dseg_add_functionptr(cd,value) \
46 dseg_add_address((cd), (void *) (ptrint) (value))
49 /* dataentry ******************************************************************/
51 #define DSEG_FLAG_UNIQUE 0x0001
52 #define DSEG_FLAG_READONLY 0x0002
63 /* function prototypes ********************************************************/
69 void dseg_finish(jitdata *jd);
71 s4 dseg_add_unique_s4(codegendata *cd, s4 value);
72 s4 dseg_add_unique_s8(codegendata *cd, s8 value);
73 s4 dseg_add_unique_float(codegendata *cd, float value);
74 s4 dseg_add_unique_double(codegendata *cd, double value);
75 s4 dseg_add_unique_address(codegendata *cd, void *value);
77 s4 dseg_add_s4(codegendata *cd, s4 value);
78 s4 dseg_add_s8(codegendata *cd, s8 value);
79 s4 dseg_add_float(codegendata *cd, float value);
80 s4 dseg_add_double(codegendata *cd, double value);
81 s4 dseg_add_address(codegendata *cd, void *value);
83 void dseg_add_unique_target(codegendata *cd, basicblock *target);
84 void dseg_add_target(codegendata *cd, basicblock *target);
86 #if defined(__I386__) || defined(__X86_64__) || defined(__XDSPCORE__) || defined(__M68K__) || defined(ENABLE_INTRP)
87 void dseg_adddata(codegendata *cd);
88 void dseg_resolve_datareferences(jitdata *jd);
92 void dseg_display(jitdata *jd);
103 * These are local overrides for various environment variables in Emacs.
104 * Please do not remove this and leave it at the end of the file, where
105 * Emacs will automagically detect them.
106 * ---------------------------------------------------------------------
109 * indent-tabs-mode: t
113 * vim:noexpandtab:sw=4:ts=4: