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
37 #include <asm/ppc_asm.h>
40 /* register defines ***********************************************************/
45 /* #define XXX r2 - system reserved register */
129 /* save and restore macros ****************************************************/
131 #define SAVE_ARGUMENT_REGISTERS(off) \
132 std a0,(0+(off))*8(sp); \
133 std a1,(1+(off))*8(sp); \
134 std a2,(2+(off))*8(sp); \
135 std a3,(3+(off))*8(sp); \
136 std a4,(4+(off))*8(sp); \
137 std a5,(5+(off))*8(sp); \
138 std a6,(6+(off))*8(sp); \
139 std a7,(7+(off))*8(sp); \
141 stfd fa0,(8+(off))*8(sp); \
142 stfd fa1,(9+(off))*8(sp); \
143 stfd fa2,(10+(off))*8(sp); \
144 stfd fa3,(11+(off))*8(sp); \
145 stfd fa4,(12+(off))*8(sp); \
146 stfd fa5,(13+(off))*8(sp); \
147 stfd fa6,(14+(off))*8(sp); \
148 stfd fa7,(15+(off))*8(sp); \
149 stfd fa8,(16+(off))*8(sp); \
150 stfd fa9,(17+(off))*8(sp); \
151 stfd fa10,(18+(off))*8(sp);\
152 stfd fa11,(19+(off))*8(sp);\
153 stfd fa12,(20+(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); \
173 lfd fa8,(16+(off))*8(sp); \
174 lfd fa9,(17+(off))*8(sp); \
175 lfd fa10,(18+(off))*8(sp); \
176 lfd fa11,(19+(off))*8(sp); \
177 lfd fa12,(20+(off))*8(sp);
180 #define SAVE_TEMPORARY_REGISTERS(off) \
181 std t0,(0+(off))*8(sp); \
182 std t1,(1+(off))*8(sp); \
183 std t2,(2+(off))*8(sp); \
184 std t3,(3+(off))*8(sp); \
185 std t4,(4+(off))*8(sp); \
186 std t5,(5+(off))*8(sp); \
187 std t6,(6+(off))*8(sp);
191 stfd ft0,(7+(off))*8(sp); \
192 stfd ft1,(8+(off))*8(sp); \
193 stfd ft2,(9+(off))*8(sp); \
194 stfd ft3,(10+(off))*8(sp); \
195 stfd ft4,(11+(off))*8(sp); \
196 stfd ft5,(12+(off))*8(sp);
198 #define RESTORE_TEMPORARY_REGISTERS(off) \
199 ld t0,(0+(off))*8(sp); \
200 ld t1,(1+(off))*8(sp); \
201 ld t2,(2+(off))*8(sp); \
202 ld t3,(3+(off))*8(sp); \
203 ld t4,(4+(off))*8(sp); \
204 ld t5,(5+(off))*8(sp); \
205 ld t6,(6+(off))*8(sp);
209 lfd ft0,(7+(off))*8(sp); \
210 lfd ft1,(8+(off))*8(sp); \
211 lfd ft2,(9+(off))*8(sp); \
212 lfd ft3,(10+(off))*8(sp); \
213 lfd ft4,(11+(off))*8(sp); \
214 lfd ft5,(12+(off))*8(sp);
216 #endif /* _MD_ASM_H */
220 * These are local overrides for various environment variables in Emacs.
221 * Please do not remove this and leave it at the end of the file, where
222 * Emacs will automagically detect them.
223 * ---------------------------------------------------------------------
226 * indent-tabs-mode: t