Lazy loading.
[cacao.git] / src / vm / jit / mips / arch.h
1 /* src/vm/jit/mips/arch.h - architecture defines for MIPS
2
3    Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
4    R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
5    C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
6    Institut f. Computersprachen - TU Wien
7
8    This file is part of CACAO.
9
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.
14
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.
19
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
23    02111-1307, USA.
24
25    Contact: cacao@complang.tuwien.ac.at
26
27    Authors: Christian Thalinger
28
29    Changes:
30
31    $Id: arch.h 2444 2005-05-11 12:51:53Z twisti $
32
33 */
34
35
36 #ifndef _ARCH_H
37 #define _ARCH_H
38
39 /* preallocated registers *****************************************************/
40
41 /* integer registers */
42   
43 #define REG_ZERO        0    /* always zero                                   */
44
45 #define REG_RESULT      2    /* to deliver method results                     */
46
47 #define REG_ITMP1       1    /* temporary register                            */
48 #define REG_ITMP2       3    /* temporary register and method pointer         */
49 #define REG_ITMP3       25   /* temporary register                            */
50
51 #define REG_ARG_0       4    /* argument register                             */
52 #define REG_ARG_1       5    /* argument register                             */
53 #define REG_ARG_2       6    /* argument register                             */
54 #define REG_ARG_3       7    /* argument register                             */
55 #define REG_ARG_4       8    /* argument register                             */
56 #define REG_ARG_5       9    /* argument register                             */
57
58 #define REG_RA          31   /* return address                                */
59 #define REG_SP          29   /* stack pointer                                 */
60 #define REG_GP          28   /* global pointer                                */
61
62 #define REG_PV          30   /* procedure vector, must be provided by caller  */
63 #define REG_METHODPTR   25   /* pointer to the place from where the procedure */
64                              /* vector has been fetched                       */
65 #define REG_ITMP1_XPTR  1    /* exception pointer = temporary register 1      */
66 #define REG_ITMP2_XPC   3    /* exception pc = temporary register 2           */
67
68
69 /* floating point registers */
70
71 #define REG_FRESULT     0    /* to deliver floating point method results      */
72
73 #define REG_FTMP1       1    /* temporary floating point register             */
74 #define REG_FTMP2       2    /* temporary floating point register             */
75 #define REG_FTMP3       3    /* temporary floating point register             */
76
77 #define REG_IFTMP       1    /* temporary integer and floating point register */
78
79
80 #define INT_REG_CNT     32   /* number of integer registers                   */
81 #define INT_SAV_CNT     8    /* number of int callee saved registers          */
82 #define INT_ARG_CNT     8    /* number of int argument registers              */
83 #define INT_TMP_CNT     5    /* number of integer temporary registers         */
84 #define INT_RES_CNT     3    /* number of integer reserved registers          */
85
86 #define FLT_REG_CNT     32   /* number of float registers                     */
87 #define FLT_SAV_CNT     4    /* number of flt callee saved registers          */
88 #define FLT_ARG_CNT     8    /* number of flt argument registers              */
89 #define FLT_TMP_CNT     15   /* number of float temporary registers           */
90 #define FLT_RES_CNT     3    /* number of float reserved registers            */
91
92 #define TRACE_ARGS_NUM  8
93
94
95 /* define architecture features ***********************************************/
96
97 #define POINTERSIZE                      8
98 #define WORDS_BIGENDIAN                  1
99
100 #define U8_AVAILABLE                     1
101
102 /* #define USE_CODEMMAP */
103
104 #define USEBUILTINTABLE
105
106 #define SUPPORT_DIVISION                 0
107 #define SUPPORT_LONG                     1
108 #define SUPPORT_FLOAT                    1
109 #define SUPPORT_DOUBLE                   1
110
111 #define SUPPORT_FMOD                     1
112 #define SUPPORT_IFCVT                    1
113 #define SUPPORT_FICVT                    0
114
115 #define SUPPORT_LONG_ADD                 1
116 #define SUPPORT_LONG_CMP                 1
117 #define SUPPORT_LONG_LOGICAL             1
118 #define SUPPORT_LONG_SHIFT               1
119 #define SUPPORT_LONG_MUL                 1
120 #define SUPPORT_LONG_DIV                 0
121 #define SUPPORT_LONG_ICVT                0
122 #define SUPPORT_LONG_FCVT                1
123
124 #define SUPPORT_CONST_LOGICAL            1  /* AND, OR, XOR with immediates   */
125 #define SUPPORT_CONST_MUL                1  /* mutiply with immediate         */
126
127 #define SUPPORT_CONST_STORE              1  /* do we support const stores     */
128 #define SUPPORT_CONST_STORE_ZERO_ONLY    1  /* on some risc machines we can   */
129                                             /* only store REG_ZERO            */
130
131 /* #define CONDITIONAL_LOADCONST           1 */
132
133 /* #define CONSECUTIVE_INTEGER_ARGS */
134 /* #define CONSECUTIVE_FLOAT_ARGS */
135
136 #endif /* _ARCH_H */
137
138
139 /*
140  * These are local overrides for various environment variables in Emacs.
141  * Please do not remove this and leave it at the end of the file, where
142  * Emacs will automagically detect them.
143  * ---------------------------------------------------------------------
144  * Local variables:
145  * mode: c
146  * indent-tabs-mode: t
147  * c-basic-offset: 4
148  * tab-width: 4
149  * End:
150  */