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 5176 2006-07-26 09:43:08Z twisti $
39 /* register defines ***********************************************************/
44 /* #define XXX r2 - system reserved register */
132 /* save and restore macros ****************************************************/
134 #define SAVE_ARGUMENT_REGISTERS(off) \
135 stw a0,(0+(off))*4(sp); \
136 stw a1,(1+(off))*4(sp); \
137 stw a2,(2+(off))*4(sp); \
138 stw a3,(3+(off))*4(sp); \
139 stw a4,(4+(off))*4(sp); \
140 stw a5,(5+(off))*4(sp); \
141 stw a6,(6+(off))*4(sp); \
142 stw a7,(7+(off))*4(sp); \
144 stfd fa0,(8+(off))*4(sp); \
145 stfd fa1,(10+(off))*4(sp); \
146 stfd fa2,(12+(off))*4(sp); \
147 stfd fa3,(14+(off))*4(sp); \
148 stfd fa4,(16+(off))*4(sp); \
149 stfd fa5,(18+(off))*4(sp); \
150 stfd fa6,(20+(off))*4(sp); \
151 stfd fa7,(22+(off))*4(sp);
153 #define RESTORE_ARGUMENT_REGISTERS(off) \
154 lwz a0,(0+(off))*4(sp); \
155 lwz a1,(1+(off))*4(sp); \
156 lwz a2,(2+(off))*4(sp); \
157 lwz a3,(3+(off))*4(sp); \
158 lwz a4,(4+(off))*4(sp); \
159 lwz a5,(5+(off))*4(sp); \
160 lwz a6,(6+(off))*4(sp); \
161 lwz a7,(7+(off))*4(sp); \
163 lfd fa0,(8+(off))*4(sp); \
164 lfd fa1,(10+(off))*4(sp); \
165 lfd fa2,(12+(off))*4(sp); \
166 lfd fa3,(14+(off))*4(sp); \
167 lfd fa4,(16+(off))*4(sp); \
168 lfd fa5,(18+(off))*4(sp); \
169 lfd fa6,(20+(off))*4(sp); \
170 lfd fa7,(22+(off))*4(sp);
173 #define SAVE_TEMPORARY_REGISTERS(off) \
174 stw t0,(0+(off))*4(sp); \
175 stw t1,(1+(off))*4(sp); \
176 stw t2,(2+(off))*4(sp); \
177 stw t3,(3+(off))*4(sp); \
178 stw t4,(4+(off))*4(sp); \
179 stw t5,(5+(off))*4(sp); \
180 stw t6,(6+(off))*4(sp); \
182 stfd ft0,(8+(off))*4(sp); \
183 stfd ft1,(10+(off))*4(sp); \
184 stfd ft2,(12+(off))*4(sp); \
185 stfd ft3,(14+(off))*4(sp); \
186 stfd ft4,(16+(off))*4(sp); \
187 stfd ft5,(18+(off))*4(sp);
189 #define RESTORE_TEMPORARY_REGISTERS(off) \
190 lwz t0,(0+(off))*4(sp); \
191 lwz t1,(1+(off))*4(sp); \
192 lwz t2,(2+(off))*4(sp); \
193 lwz t3,(3+(off))*4(sp); \
194 lwz t4,(4+(off))*4(sp); \
195 lwz t5,(5+(off))*4(sp); \
196 lwz t6,(6+(off))*4(sp); \
198 lfd ft0,(8+(off))*4(sp); \
199 lfd ft1,(10+(off))*4(sp); \
200 lfd ft2,(12+(off))*4(sp); \
201 lfd ft3,(14+(off))*4(sp); \
202 lfd ft4,(16+(off))*4(sp); \
203 lfd ft5,(18+(off))*4(sp);
205 #endif /* _MD_ASM_H */
209 * These are local overrides for various environment variables in Emacs.
210 * Please do not remove this and leave it at the end of the file, where
211 * Emacs will automagically detect them.
212 * ---------------------------------------------------------------------
215 * indent-tabs-mode: t