1 /* src/vm/jit/powerpc/linux/md-asm.h - assembler defines for PowerPC Linux ABI
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
31 $Id: md-asm.h 3725 2005-11-21 20:59:53Z twisti $
39 #include <asm/ppc_asm.h>
42 /* register defines ***********************************************************/
47 /* #define XXX r2 - system reserved register */
135 /* save and restore macros ****************************************************/
137 #define SAVE_ARGUMENT_REGISTERS(off) \
138 stw a0,(0+(off))*4(sp); \
139 stw a1,(1+(off))*4(sp); \
140 stw a2,(2+(off))*4(sp); \
141 stw a3,(3+(off))*4(sp); \
142 stw a4,(4+(off))*4(sp); \
143 stw a5,(5+(off))*4(sp); \
144 stw a6,(6+(off))*4(sp); \
145 stw a7,(7+(off))*4(sp); \
147 stfd fa0,(8+(off))*4(sp); \
148 stfd fa1,(10+(off))*4(sp); \
149 stfd fa2,(12+(off))*4(sp); \
150 stfd fa3,(14+(off))*4(sp); \
151 stfd fa4,(16+(off))*4(sp); \
152 stfd fa5,(18+(off))*4(sp); \
153 stfd fa6,(20+(off))*4(sp); \
154 stfd fa7,(22+(off))*4(sp);
156 #define RESTORE_ARGUMENT_REGISTERS(off) \
157 lwz a0,(0+(off))*4(sp); \
158 lwz a1,(1+(off))*4(sp); \
159 lwz a2,(2+(off))*4(sp); \
160 lwz a3,(3+(off))*4(sp); \
161 lwz a4,(4+(off))*4(sp); \
162 lwz a5,(5+(off))*4(sp); \
163 lwz a6,(6+(off))*4(sp); \
164 lwz a7,(7+(off))*4(sp); \
166 lfd fa0,(8+(off))*4(sp); \
167 lfd fa1,(10+(off))*4(sp); \
168 lfd fa2,(12+(off))*4(sp); \
169 lfd fa3,(14+(off))*4(sp); \
170 lfd fa4,(16+(off))*4(sp); \
171 lfd fa5,(18+(off))*4(sp); \
172 lfd fa6,(20+(off))*4(sp); \
173 lfd fa7,(22+(off))*4(sp);
176 #define SAVE_TEMPORARY_REGISTERS(off) \
177 stw t0,(0+(off))*4(sp); \
178 stw t1,(1+(off))*4(sp); \
179 stw t2,(2+(off))*4(sp); \
180 stw t3,(3+(off))*4(sp); \
181 stw t4,(4+(off))*4(sp); \
182 stw t5,(5+(off))*4(sp); \
183 stw t6,(6+(off))*4(sp); \
185 stfd ft0,(8+(off))*4(sp); \
186 stfd ft1,(10+(off))*4(sp); \
187 stfd ft2,(12+(off))*4(sp); \
188 stfd ft3,(14+(off))*4(sp); \
189 stfd ft4,(16+(off))*4(sp); \
190 stfd ft5,(18+(off))*4(sp);
192 #define RESTORE_TEMPORARY_REGISTERS(off) \
193 lwz t0,(0+(off))*4(sp); \
194 lwz t1,(1+(off))*4(sp); \
195 lwz t2,(2+(off))*4(sp); \
196 lwz t3,(3+(off))*4(sp); \
197 lwz t4,(4+(off))*4(sp); \
198 lwz t5,(5+(off))*4(sp); \
199 lwz t6,(6+(off))*4(sp); \
201 lfd ft0,(8+(off))*4(sp); \
202 lfd ft1,(10+(off))*4(sp); \
203 lfd ft2,(12+(off))*4(sp); \
204 lfd ft3,(14+(off))*4(sp); \
205 lfd ft4,(16+(off))*4(sp); \
206 lfd ft5,(18+(off))*4(sp);
208 #endif /* _MD_ASM_H */
212 * These are local overrides for various environment variables in Emacs.
213 * Please do not remove this and leave it at the end of the file, where
214 * Emacs will automagically detect them.
215 * ---------------------------------------------------------------------
218 * indent-tabs-mode: t