1 /* jit/x86_64/arch.h - architecture defines for x86_64
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
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 1960 2005-02-23 11:06:33Z twisti $
38 /* define registers ***********************************************************/
77 /* preallocated registers *****************************************************/
79 /* integer registers */
81 #define REG_RESULT RAX /* to deliver method results */
83 #define REG_ITMP1 RAX /* temporary register */
84 #define REG_ITMP2 R10 /* temporary register and method pointer */
85 #define REG_ITMP3 R11 /* temporary register */
87 #define REG_NULL -1 /* used for reg_of_var where d is not needed */
89 #define REG_ITMP1_XPTR RAX /* exception pointer = temporary register 1 */
90 #define REG_ITMP2_XPC R10 /* exception pc = temporary register 2 */
92 #define REG_SP RSP /* stack pointer */
94 /* floating point registers */
96 #define REG_FRESULT XMM0 /* to deliver floating point method results */
98 #define REG_FTMP1 XMM8 /* temporary floating point register */
99 #define REG_FTMP2 XMM9 /* temporary floating point register */
100 #define REG_FTMP3 XMM10 /* temporary floating point register */
103 #define INT_ARG_CNT 6 /* number of int argument registers */
104 #define INT_SAV_CNT 5 /* number of int callee saved registers */
106 #define FLT_ARG_CNT 8 /* number of flt argument registers */
107 #define FLT_SAV_CNT 0 /* number of flt callee saved registers */
109 #define TRACE_ARGS_NUM 6
112 /* define architecture features ***********************************************/
114 #define POINTERSIZE 8
115 #define WORDS_BIGENDIAN 0
117 #define U8_AVAILABLE 1
119 #define USE_CODEMMAP 1
121 #define SUPPORT_DIVISION 1
122 #define SUPPORT_LONG 1
123 #define SUPPORT_FLOAT 1
124 #define SUPPORT_DOUBLE 1
125 /* #define SUPPORT_FMOD 1 */
126 /* #define SUPPORT_IFCVT 1 */
127 /* #define SUPPORT_FICVT 1 */
129 #define SUPPORT_LONG_ADD 1
130 #define SUPPORT_LONG_CMP 1
131 #define SUPPORT_LONG_LOG 1
132 #define SUPPORT_LONG_SHIFT 1
133 #define SUPPORT_LONG_MUL 1
134 #define SUPPORT_LONG_DIV 1
135 #define SUPPORT_LONG_ICVT 1
136 #define SUPPORT_LONG_FCVT 1
138 #define SUPPORT_MUL_CONST 1 /* mutiply with immediate */
139 #define SUPPORT_LOGICAL_CONST 1 /* AND, OR, XOR with immediates */
141 #define SUPPORT_CONST_ASTORE 1 /* do we support const astores */
142 #define SUPPORT_ONLY_ZERO_ASTORE 0 /* on risc machines we can only store */
145 /* #define USEBUILTINTABLE */
147 #define CONDITIONAL_LOADCONST
149 #define CONSECUTIVE_INTARGS
150 #define CONSECUTIVE_FLOATARGS
156 * These are local overrides for various environment variables in Emacs.
157 * Please do not remove this and leave it at the end of the file, where
158 * Emacs will automagically detect them.
159 * ---------------------------------------------------------------------
162 * indent-tabs-mode: t