1 /* src/vm/jit/emit.h - code emitter functions
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
31 $Id: emitfuncs.c 4398 2006-01-31 23:43:08Z twisti $
41 #include "vm/jit/jit.h"
44 /* constant range macros ******************************************************/
46 #if SIZEOF_VOID_P == 8
49 (((s8) (c) >= -128) && ((s8) (c) <= 127))
51 # define IS_IMM32(c) \
52 (((s8) (c) >= (-2147483647-1)) && ((s8) (c) <= 2147483647))
57 (((s4) (c) >= -128) && ((s4) (c) <= 127))
62 /* code generation functions **************************************************/
64 s4 emit_load(jitdata *jd, instruction *iptr, stackptr src, s4 tempreg);
65 s4 emit_load_s1(jitdata *jd, instruction *iptr, s4 tempreg);
66 s4 emit_load_s2(jitdata *jd, instruction *iptr, s4 tempreg);
67 s4 emit_load_s3(jitdata *jd, instruction *iptr, s4 tempreg);
69 #if SIZEOF_VOID_P == 4
70 s4 emit_load_s1_low(jitdata *jd, instruction *iptr, s4 tempreg);
71 s4 emit_load_s2_low(jitdata *jd, instruction *iptr, s4 tempreg);
72 s4 emit_load_s3_low(jitdata *jd, instruction *iptr, s4 tempreg);
74 s4 emit_load_s1_high(jitdata *jd, instruction *iptr, s4 tempreg);
75 s4 emit_load_s2_high(jitdata *jd, instruction *iptr, s4 tempreg);
76 s4 emit_load_s3_high(jitdata *jd, instruction *iptr, s4 tempreg);
79 void emit_store(jitdata *jd, instruction *iptr, stackptr dst, s4 d);
80 void emit_store_dst(jitdata *jd, instruction *iptr, s4 d);
82 #if SIZEOF_VOID_P == 4
83 void emit_store_low(jitdata *jd, instruction *iptr, stackptr dst, s4 d);
84 void emit_store_high(jitdata *jd, instruction *iptr, stackptr dst, s4 d);
87 void emit_copy(jitdata *jd, instruction *iptr, stackptr src, stackptr dst);
89 void emit_iconst(codegendata *cd, s4 d, s4 value);
90 void emit_lconst(codegendata *cd, s4 d, s8 value);
92 void emit_exception_stubs(jitdata *jd);
93 void emit_patcher_stubs(jitdata *jd);
94 void emit_replacement_stubs(jitdata *jd);
96 void emit_verbosecall_enter(jitdata *jd);
97 void emit_verbosecall_exit(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: