1 /* src/vm/jit/alpha/md-asm.h - assembler defines for Alpha ABI
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
38 /* register defines ***********************************************************/
129 /* save and restore macros ****************************************************/
131 #define SAVE_RETURN_REGISTERS(off) \
132 stq v0,(0+(off))*8(sp) ; \
133 stt fv0,(1+(off))*8(sp) ;
135 #define RESTORE_RETURN_REGISTERS(off) \
136 ldq v0,(0+(off))*8(sp) ; \
137 ldt fv0,(1+(off))*8(sp) ;
139 #define SAVE_ARGUMENT_REGISTERS(off) \
140 stq a0,(0+(off))*8(sp) ; \
141 stq a1,(1+(off))*8(sp) ; \
142 stq a2,(2+(off))*8(sp) ; \
143 stq a3,(3+(off))*8(sp) ; \
144 stq a4,(4+(off))*8(sp) ; \
145 stq a5,(5+(off))*8(sp) ; \
147 stt fa0,(6+(off))*8(sp) ; \
148 stt fa1,(7+(off))*8(sp) ; \
149 stt fa2,(8+(off))*8(sp) ; \
150 stt fa3,(9+(off))*8(sp) ; \
151 stt fa4,(10+(off))*8(sp) ; \
152 stt fa5,(11+(off))*8(sp) ;
154 #define RESTORE_ARGUMENT_REGISTERS(off) \
155 ldq a0,(0+(off))*8(sp) ; \
156 ldq a1,(1+(off))*8(sp) ; \
157 ldq a2,(2+(off))*8(sp) ; \
158 ldq a3,(3+(off))*8(sp) ; \
159 ldq a4,(4+(off))*8(sp) ; \
160 ldq a5,(5+(off))*8(sp) ; \
162 ldt fa0,(6+(off))*8(sp) ; \
163 ldt fa1,(7+(off))*8(sp) ; \
164 ldt fa2,(8+(off))*8(sp) ; \
165 ldt fa3,(9+(off))*8(sp) ; \
166 ldt fa4,(10+(off))*8(sp) ; \
167 ldt fa5,(11+(off))*8(sp) ;
169 #define SAVE_TEMPORARY_REGISTERS(off) \
170 stq t0,(0+(off))*8(sp) ; \
171 stq t1,(1+(off))*8(sp) ; \
172 stq t2,(2+(off))*8(sp) ; \
173 stq t3,(3+(off))*8(sp) ; \
174 stq t4,(4+(off))*8(sp) ; \
175 stq t5,(5+(off))*8(sp) ; \
176 stq t6,(6+(off))*8(sp) ; \
177 stq t7,(7+(off))*8(sp) ; \
178 stq t8,(8+(off))*8(sp) ; \
179 stq t9,(9+(off))*8(sp) ; \
180 stq t10,(10+(off))*8(sp) ; \
182 stt ft0,(11+(off))*8(sp) ; \
183 stt ft1,(12+(off))*8(sp) ; \
184 stt ft2,(13+(off))*8(sp) ; \
185 stt ft3,(14+(off))*8(sp) ; \
186 stt ft4,(15+(off))*8(sp) ; \
187 stt ft5,(16+(off))*8(sp) ; \
188 stt ft6,(17+(off))*8(sp) ; \
189 stt ft7,(18+(off))*8(sp) ; \
190 stt ft8,(19+(off))*8(sp) ; \
191 stt ft9,(20+(off))*8(sp) ; \
192 stt ft10,(21+(off))*8(sp) ; \
193 stt ft11,(22+(off))*8(sp) ; \
194 stt ft12,(23+(off))*8(sp) ;
197 #define RESTORE_TEMPORARY_REGISTERS(off) \
198 ldq t0,(0+(off))*8(sp) ; \
199 ldq t1,(1+(off))*8(sp) ; \
200 ldq t2,(2+(off))*8(sp) ; \
201 ldq t3,(3+(off))*8(sp) ; \
202 ldq t4,(4+(off))*8(sp) ; \
203 ldq t5,(5+(off))*8(sp) ; \
204 ldq t6,(6+(off))*8(sp) ; \
205 ldq t7,(7+(off))*8(sp) ; \
206 ldq t8,(8+(off))*8(sp) ; \
207 ldq t9,(9+(off))*8(sp) ; \
208 ldq t10,(10+(off))*8(sp) ; \
210 ldt ft0,(11+(off))*8(sp) ; \
211 ldt ft1,(12+(off))*8(sp) ; \
212 ldt ft2,(13+(off))*8(sp) ; \
213 ldt ft3,(14+(off))*8(sp) ; \
214 ldt ft4,(15+(off))*8(sp) ; \
215 ldt ft5,(16+(off))*8(sp) ; \
216 ldt ft6,(17+(off))*8(sp) ; \
217 ldt ft7,(18+(off))*8(sp) ; \
218 ldt ft8,(19+(off))*8(sp) ; \
219 ldt ft9,(20+(off))*8(sp) ; \
220 ldt ft10,(21+(off))*8(sp) ; \
221 ldt ft11,(22+(off))*8(sp) ; \
222 ldt ft12,(23+(off))*8(sp) ;
224 #endif /* _MD_ASM_H */
228 * These are local overrides for various environment variables in Emacs.
229 * Please do not remove this and leave it at the end of the file, where
230 * Emacs will automagically detect them.
231 * ---------------------------------------------------------------------
234 * indent-tabs-mode: t