1 /* src/vm/jit/powerpc64/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 5230 2006-08-10 19:45:28Z tbfg $
39 #include <asm/ppc_asm.h>
42 /* register defines ***********************************************************/
47 /* #define XXX r2 - system reserved register */
134 /* save and restore macros ****************************************************/
136 #define SAVE_ARGUMENT_REGISTERS(off) \
137 std a0,(0+(off))*8(sp); \
138 std a1,(1+(off))*8(sp); \
139 std a2,(2+(off))*8(sp); \
140 std a3,(3+(off))*8(sp); \
141 std a4,(4+(off))*8(sp); \
142 std a5,(5+(off))*8(sp); \
143 std a6,(6+(off))*8(sp); \
144 std a7,(7+(off))*8(sp); \
146 stfd fa0,(8+(off))*8(sp); \
147 stfd fa1,(9+(off))*8(sp); \
148 stfd fa2,(10+(off))*8(sp); \
149 stfd fa3,(11+(off))*8(sp); \
150 stfd fa4,(12+(off))*8(sp); \
151 stfd fa5,(13+(off))*8(sp); \
152 stfd fa6,(14+(off))*8(sp); \
153 stfd fa7,(15+(off))*8(sp);
155 #define RESTORE_ARGUMENT_REGISTERS(off) \
156 ld a0,(0+(off))*8(sp); \
157 ld a1,(1+(off))*8(sp); \
158 ld a2,(2+(off))*8(sp); \
159 ld a3,(3+(off))*8(sp); \
160 ld a4,(4+(off))*8(sp); \
161 ld a5,(5+(off))*8(sp); \
162 ld a6,(6+(off))*8(sp); \
163 ld a7,(7+(off))*8(sp); \
165 lfd fa0,(8+(off))*8(sp); \
166 lfd fa1,(9+(off))*8(sp); \
167 lfd fa2,(10+(off))*8(sp); \
168 lfd fa3,(11+(off))*8(sp); \
169 lfd fa4,(12+(off))*8(sp); \
170 lfd fa5,(13+(off))*8(sp); \
171 lfd fa6,(14+(off))*8(sp); \
172 lfd fa7,(15+(off))*8(sp);
175 #define SAVE_TEMPORARY_REGISTERS(off) \
176 std t0,(0+(off))*8(sp); \
177 std t1,(1+(off))*8(sp); \
178 std t2,(2+(off))*8(sp); \
179 std t3,(3+(off))*8(sp); \
180 std t4,(4+(off))*8(sp); \
181 std t5,(5+(off))*8(sp); \
182 std t6,(6+(off))*8(sp); \
184 stfd ft0,(7+(off))*8(sp); \
185 stfd ft1,(8+(off))*8(sp); \
186 stfd ft2,(9+(off))*8(sp); \
187 stfd ft3,(10+(off))*8(sp); \
188 stfd ft4,(11+(off))*8(sp); \
189 stfd ft5,(12+(off))*8(sp);
191 #define RESTORE_TEMPORARY_REGISTERS(off) \
192 ld t0,(0+(off))*8(sp); \
193 ld t1,(1+(off))*8(sp); \
194 ld t2,(2+(off))*8(sp); \
195 ld t3,(3+(off))*8(sp); \
196 ld t4,(4+(off))*8(sp); \
197 ld t5,(5+(off))*8(sp); \
198 ld t6,(6+(off))*8(sp); \
200 lfd ft0,(7+(off))*8(sp); \
201 lfd ft1,(8+(off))*8(sp); \
202 lfd ft2,(9+(off))*8(sp); \
203 lfd ft3,(10+(off))*8(sp); \
204 lfd ft4,(11+(off))*8(sp); \
205 lfd ft5,(12+(off))*8(sp);
207 #endif /* _MD_ASM_H */
211 * These are local overrides for various environment variables in Emacs.
212 * Please do not remove this and leave it at the end of the file, where
213 * Emacs will automagically detect them.
214 * ---------------------------------------------------------------------
217 * indent-tabs-mode: t