1 /* src/vm/jit/powerpc/linux/md-asm.h - assembler defines for PowerPC Linux 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
31 $Id: md-asm.h 5179 2006-07-26 10:16:50Z twisti $
39 /* register defines ***********************************************************/
108 /* register defines ***********************************************************/
113 /* #define foo r2 - system reserved register */
201 /* save and restore macros ****************************************************/
203 #define SAVE_ARGUMENT_REGISTERS(off) \
204 stw a0,(0+(off))*4(sp); \
205 stw a1,(1+(off))*4(sp); \
206 stw a2,(2+(off))*4(sp); \
207 stw a3,(3+(off))*4(sp); \
208 stw a4,(4+(off))*4(sp); \
209 stw a5,(5+(off))*4(sp); \
210 stw a6,(6+(off))*4(sp); \
211 stw a7,(7+(off))*4(sp); \
213 stfd fa0,(8+(off))*4(sp); \
214 stfd fa1,(10+(off))*4(sp); \
215 stfd fa2,(12+(off))*4(sp); \
216 stfd fa3,(14+(off))*4(sp); \
217 stfd fa4,(16+(off))*4(sp); \
218 stfd fa5,(18+(off))*4(sp); \
219 stfd fa6,(20+(off))*4(sp); \
220 stfd fa7,(22+(off))*4(sp);
222 #define RESTORE_ARGUMENT_REGISTERS(off) \
223 lwz a0,(0+(off))*4(sp); \
224 lwz a1,(1+(off))*4(sp); \
225 lwz a2,(2+(off))*4(sp); \
226 lwz a3,(3+(off))*4(sp); \
227 lwz a4,(4+(off))*4(sp); \
228 lwz a5,(5+(off))*4(sp); \
229 lwz a6,(6+(off))*4(sp); \
230 lwz a7,(7+(off))*4(sp); \
232 lfd fa0,(8+(off))*4(sp); \
233 lfd fa1,(10+(off))*4(sp); \
234 lfd fa2,(12+(off))*4(sp); \
235 lfd fa3,(14+(off))*4(sp); \
236 lfd fa4,(16+(off))*4(sp); \
237 lfd fa5,(18+(off))*4(sp); \
238 lfd fa6,(20+(off))*4(sp); \
239 lfd fa7,(22+(off))*4(sp);
242 #define SAVE_TEMPORARY_REGISTERS(off) \
243 stw t0,(0+(off))*4(sp); \
244 stw t1,(1+(off))*4(sp); \
245 stw t2,(2+(off))*4(sp); \
246 stw t3,(3+(off))*4(sp); \
247 stw t4,(4+(off))*4(sp); \
248 stw t5,(5+(off))*4(sp); \
249 stw t6,(6+(off))*4(sp); \
251 stfd ft0,(8+(off))*4(sp); \
252 stfd ft1,(10+(off))*4(sp); \
253 stfd ft2,(12+(off))*4(sp); \
254 stfd ft3,(14+(off))*4(sp); \
255 stfd ft4,(16+(off))*4(sp); \
256 stfd ft5,(18+(off))*4(sp);
258 #define RESTORE_TEMPORARY_REGISTERS(off) \
259 lwz t0,(0+(off))*4(sp); \
260 lwz t1,(1+(off))*4(sp); \
261 lwz t2,(2+(off))*4(sp); \
262 lwz t3,(3+(off))*4(sp); \
263 lwz t4,(4+(off))*4(sp); \
264 lwz t5,(5+(off))*4(sp); \
265 lwz t6,(6+(off))*4(sp); \
267 lfd ft0,(8+(off))*4(sp); \
268 lfd ft1,(10+(off))*4(sp); \
269 lfd ft2,(12+(off))*4(sp); \
270 lfd ft3,(14+(off))*4(sp); \
271 lfd ft4,(16+(off))*4(sp); \
272 lfd ft5,(18+(off))*4(sp);
274 #endif /* _MD_ASM_H */
278 * These are local overrides for various environment variables in Emacs.
279 * Please do not remove this and leave it at the end of the file, where
280 * Emacs will automagically detect them.
281 * ---------------------------------------------------------------------
284 * indent-tabs-mode: t