2e2801cfd2a4bdfe5182c2e60171b8683dcd8033
[cacao.git] / src / vm / jit / powerpc / arch.h
1 /* vm/jit/powerpc/arch.h - architecture defines for PowerPC
2
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
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    $Id: arch.h 1648 2004-12-01 16:44:22Z twisti $
30
31 */
32
33
34 #ifndef _ARCH_H
35 #define _ARCH_H
36
37
38 /* preallocated registers *****************************************************/
39
40 /* integer registers */
41   
42 #define REG_RESULT       3   /* to deliver method results                     */
43 #define REG_RESULT2      4   /* to deliver long method results                */
44
45 /*#define REG_RA          26*/  /* return address                                */
46 #define REG_PV          13   /* procedure vector, must be provided by caller  */
47 #define REG_METHODPTR   12   /* pointer to the place from where the procedure */
48                              /* vector has been fetched                       */
49 #define REG_ITMP1       11   /* temporary register                            */
50 #define REG_ITMP2       12   /* temporary register and method pointer         */
51 #define REG_ITMP3        0   /* temporary register                            */
52
53 #define REG_ITMP1_XPTR  11   /* exception pointer = temporary register 1      */
54 #define REG_ITMP2_XPC   12   /* exception pc = temporary register 2           */
55
56 #define REG_SP           1   /* stack pointer                                 */
57 #define REG_ZERO         0   /* allways zero                                  */
58
59 /* floating point registers */
60
61 #define REG_FRESULT      1   /* to deliver floating point method results      */
62 #define REG_FTMP1       16   /* temporary floating point register             */
63 #define REG_FTMP2       17   /* temporary floating point register             */
64 #define REG_FTMP3        0   /* temporary floating point register             */
65
66 #define REG_IFTMP        0   /* temporary integer and floating point register */
67
68
69 /*#define INT_SAV_CNT     19*/   /* number of int callee saved registers          */
70 #define INT_ARG_CNT      8   /* number of int argument registers              */
71
72 /*#define FLT_SAV_CNT     18*/   /* number of flt callee saved registers          */
73 #define FLT_ARG_CNT     13   /* number of flt argument registers              */
74
75 #define TRACE_ARGS_NUM   8
76
77
78 /* define architecture features ***********************************************/
79
80 #define POINTERSIZE         4
81 #define WORDS_BIGENDIAN     1
82
83 #define U8_AVAILABLE        1
84
85 #define USE_CODEMMAP        1
86
87 #define SUPPORT_DIVISION    0
88 #define SUPPORT_LONG        1
89 #define SUPPORT_FLOAT       1
90 #define SUPPORT_DOUBLE      1
91 #define SUPPORT_FMOD        0
92 #define SUPPORT_FICVT       1
93 #define SUPPORT_IFCVT       0
94
95 #define SUPPORT_LONG_ADD    1
96 #define SUPPORT_LONG_CMP    1
97 #define SUPPORT_LONG_LOG    1
98 #define SUPPORT_LONG_SHIFT  0
99 #define SUPPORT_LONG_MUL    0
100 #define SUPPORT_LONG_DIV    0
101 #define SUPPORT_LONG_ICVT   0
102 #define SUPPORT_LONG_FCVT   0
103
104 #define USEBUILTINTABLE
105
106 /* #define CONDITIONAL_LOADCONST */
107 #define NOLONG_CONDITIONAL
108
109 /* #define CONSECUTIVE_INTARGS */
110 #define CONSECUTIVE_FLOATARGS
111
112 #define SPECIALMEMUSE
113 #define USETWOREGS
114
115 #endif /* _ARCH_H */
116
117
118 /*
119  * These are local overrides for various environment variables in Emacs.
120  * Please do not remove this and leave it at the end of the file, where
121  * Emacs will automagically detect them.
122  * ---------------------------------------------------------------------
123  * Local variables:
124  * mode: c
125  * indent-tabs-mode: t
126  * c-basic-offset: 4
127  * tab-width: 4
128  * End:
129  */