1 /* src/vm/jit/powerpc/netbsd/md-asm.h - assembler defines for PowerPC NetBSD 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
37 #include <asm/ppc_asm.h>
40 /* register defines ***********************************************************/
45 /* #define XXX r2 - system reserved register */
133 /* save and restore macros ****************************************************/
135 #define SAVE_ARGUMENT_REGISTERS(off) \
136 stw a0,(0+(off))*4(sp); \
137 stw a1,(1+(off))*4(sp); \
138 stw a2,(2+(off))*4(sp); \
139 stw a3,(3+(off))*4(sp); \
140 stw a4,(4+(off))*4(sp); \
141 stw a5,(5+(off))*4(sp); \
142 stw a6,(6+(off))*4(sp); \
143 stw a7,(7+(off))*4(sp); \
145 stfd fa0,(8+(off))*4(sp); \
146 stfd fa1,(10+(off))*4(sp); \
147 stfd fa2,(12+(off))*4(sp); \
148 stfd fa3,(14+(off))*4(sp); \
149 stfd fa4,(16+(off))*4(sp); \
150 stfd fa5,(18+(off))*4(sp); \
151 stfd fa6,(20+(off))*4(sp); \
152 stfd fa7,(22+(off))*4(sp);
154 #define RESTORE_ARGUMENT_REGISTERS(off) \
155 lwz a0,(0+(off))*4(sp); \
156 lwz a1,(1+(off))*4(sp); \
157 lwz a2,(2+(off))*4(sp); \
158 lwz a3,(3+(off))*4(sp); \
159 lwz a4,(4+(off))*4(sp); \
160 lwz a5,(5+(off))*4(sp); \
161 lwz a6,(6+(off))*4(sp); \
162 lwz a7,(7+(off))*4(sp); \
164 lfd fa0,(8+(off))*4(sp); \
165 lfd fa1,(10+(off))*4(sp); \
166 lfd fa2,(12+(off))*4(sp); \
167 lfd fa3,(14+(off))*4(sp); \
168 lfd fa4,(16+(off))*4(sp); \
169 lfd fa5,(18+(off))*4(sp); \
170 lfd fa6,(20+(off))*4(sp); \
171 lfd fa7,(22+(off))*4(sp);
174 #define SAVE_TEMPORARY_REGISTERS(off) \
175 stw t0,(0+(off))*4(sp); \
176 stw t1,(1+(off))*4(sp); \
177 stw t2,(2+(off))*4(sp); \
178 stw t3,(3+(off))*4(sp); \
179 stw t4,(4+(off))*4(sp); \
180 stw t5,(5+(off))*4(sp); \
181 stw t6,(6+(off))*4(sp); \
183 stfd ft0,(8+(off))*4(sp); \
184 stfd ft1,(10+(off))*4(sp); \
185 stfd ft2,(12+(off))*4(sp); \
186 stfd ft3,(14+(off))*4(sp); \
187 stfd ft4,(16+(off))*4(sp); \
188 stfd ft5,(18+(off))*4(sp);
190 #define RESTORE_TEMPORARY_REGISTERS(off) \
191 lwz t0,(0+(off))*4(sp); \
192 lwz t1,(1+(off))*4(sp); \
193 lwz t2,(2+(off))*4(sp); \
194 lwz t3,(3+(off))*4(sp); \
195 lwz t4,(4+(off))*4(sp); \
196 lwz t5,(5+(off))*4(sp); \
197 lwz t6,(6+(off))*4(sp); \
199 lfd ft0,(8+(off))*4(sp); \
200 lfd ft1,(10+(off))*4(sp); \
201 lfd ft2,(12+(off))*4(sp); \
202 lfd ft3,(14+(off))*4(sp); \
203 lfd ft4,(16+(off))*4(sp); \
204 lfd ft5,(18+(off))*4(sp);
206 #endif /* _MD_ASM_H */
210 * These are local overrides for various environment variables in Emacs.
211 * Please do not remove this and leave it at the end of the file, where
212 * Emacs will automagically detect them.
213 * ---------------------------------------------------------------------
216 * indent-tabs-mode: t