1 /* jit/i386/arch.h - architecture defines for i386
3 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
4 R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
5 M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
6 P. Tomsich, J. Wenninger
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., 59 Temple Place - Suite 330, Boston, MA
25 Contact: cacao@complang.tuwien.ac.at
27 Authors: Christian Thalinger
29 $Id: arch.h 1601 2004-11-29 09:56:02Z twisti $
37 /* preallocated registers *****************************************************/
39 /* integer registers */
41 #define REG_ZERO 0 /* always zero */
43 #define REG_RESULT 2 /* to deliver method results */
45 #define REG_ITMP1 1 /* temporary register */
46 #define REG_ITMP2 3 /* temporary register and method pointer */
47 #define REG_ITMP3 25 /* temporary register */
49 #define REG_ARG_0 4 /* argument register */
50 #define REG_ARG_1 5 /* argument register */
51 #define REG_ARG_2 6 /* argument register */
52 #define REG_ARG_3 7 /* argument register */
53 #define REG_ARG_4 8 /* argument register */
54 #define REG_ARG_5 9 /* argument register */
56 #define REG_RA 31 /* return address */
57 #define REG_SP 29 /* stack pointer */
58 #define REG_GP 28 /* global pointer */
60 #define REG_PV 30 /* procedure vector, must be provided by caller */
61 #define REG_METHODPTR 25 /* pointer to the place from where the procedure */
62 /* vector has been fetched */
63 #define REG_ITMP1_XPTR 1 /* exception pointer = temporary register 1 */
64 #define REG_ITMP2_XPC 3 /* exception pc = temporary register 2 */
67 /* floating point registers */
69 #define REG_FRESULT 0 /* to deliver floating point method results */
71 #define REG_FTMP1 1 /* temporary floating point register */
72 #define REG_FTMP2 2 /* temporary floating point register */
73 #define REG_FTMP3 3 /* temporary floating point register */
75 #define REG_IFTMP 1 /* temporary integer and floating point register */
78 #define INT_SAV_CNT 8 /* number of int callee saved registers */
79 #define INT_ARG_CNT 8 /* number of int argument registers */
81 #define FLT_SAV_CNT 4 /* number of flt callee saved registers */
82 #define FLT_ARG_CNT 8 /* number of flt argument registers */
85 /* define architecture features ***********************************************/
88 #define WORDS_BIGENDIAN 1
90 #define U8_AVAILABLE 1
92 /* #define USE_CODEMMAP */
94 #define SUPPORT_DIVISION 0
95 #define SUPPORT_LONG 1
96 #define SUPPORT_FLOAT 1
97 #define SUPPORT_DOUBLE 1
99 #define SUPPORT_FMOD 1
100 #define SUPPORT_IFCVT 1
101 #define SUPPORT_FICVT 0
103 #define SUPPORT_LONG_ADD 1
104 #define SUPPORT_LONG_CMP 1
105 #define SUPPORT_LONG_LOG 1
106 #define SUPPORT_LONG_SHIFT 1
107 #define SUPPORT_LONG_MUL 1
108 #define SUPPORT_LONG_DIV 0
109 #define SUPPORT_LONG_ICVT 0
110 #define SUPPORT_LONG_FCVT 1
112 #define SUPPORT_CONST_ASTORE 0 /* do we support const astores */
113 #define SUPPORT_ONLY_ZERO_ASTORE 1 /* on risc machines we can only store */
115 #define USEBUILTINTABLE
117 /* #define CONDITIONAL_LOADCONST */
119 /* #define CONSECUTIVE_INTARGS */
120 /* #define CONSECUTIVE_FLOATARGS */
126 * These are local overrides for various environment variables in Emacs.
127 * Please do not remove this and leave it at the end of the file, where
128 * Emacs will automagically detect them.
129 * ---------------------------------------------------------------------
132 * indent-tabs-mode: t