1 /* src/vm/jit/mips/md-asm.h - assembler defines for MIPS 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 2631 2005-06-09 21:23:11Z twisti $
40 /* register defines ***********************************************************/
132 #define aaddiu daddiu
140 /* save and restore macros ****************************************************/
142 #define SAVE_ARGUMENT_REGISTERS(off) \
143 sd a0,(0+(off))*8(sp) ; \
144 sd a1,(1+(off))*8(sp) ; \
145 sd a2,(2+(off))*8(sp) ; \
146 sd a3,(3+(off))*8(sp) ; \
147 sd a4,(4+(off))*8(sp) ; \
148 sd a5,(5+(off))*8(sp) ; \
149 sd a6,(6+(off))*8(sp) ; \
150 sd a7,(7+(off))*8(sp) ; \
152 sdc1 fa0,(8+(off))*8(sp) ; \
153 sdc1 fa1,(9+(off))*8(sp) ; \
154 sdc1 fa2,(10+(off))*8(sp); \
155 sdc1 fa3,(11+(off))*8(sp); \
156 sdc1 fa4,(12+(off))*8(sp); \
157 sdc1 fa5,(13+(off))*8(sp); \
158 sdc1 fa6,(14+(off))*8(sp); \
159 sdc1 fa7,(15+(off))*8(sp);
162 #define RESTORE_ARGUMENT_REGISTERS(off) \
163 ld a0,(0+(off))*8(sp) ; \
164 ld a1,(1+(off))*8(sp) ; \
165 ld a2,(2+(off))*8(sp) ; \
166 ld a3,(3+(off))*8(sp) ; \
167 ld a4,(4+(off))*8(sp) ; \
168 ld a5,(5+(off))*8(sp) ; \
169 ld a6,(6+(off))*8(sp) ; \
170 ld a7,(7+(off))*8(sp) ; \
172 ldc1 fa0,(8+(off))*8(sp); \
173 ldc1 fa1,(9+(off))*8(sp); \
174 ldc1 fa2,(10+(off))*8(sp); \
175 ldc1 fa3,(11+(off))*8(sp); \
176 ldc1 fa4,(12+(off))*8(sp); \
177 ldc1 fa5,(13+(off))*8(sp); \
178 ldc1 fa6,(14+(off))*8(sp); \
179 ldc1 fa7,(15+(off))*8(sp);
182 #define SAVE_TEMPORARY_REGISTERS(off) \
183 sd t0,(0+(off))*8(sp) ; \
184 sd t1,(1+(off))*8(sp) ; \
185 sd t2,(2+(off))*8(sp) ; \
186 sd t3,(3+(off))*8(sp) ; \
187 sd t8,(4+(off))*8(sp) ; \
189 sdc1 ft3,(5+(off))*8(sp) ; \
190 sdc1 ft4,(6+(off))*8(sp) ; \
191 sdc1 ft5,(7+(off))*8(sp) ; \
192 sdc1 ft6,(8+(off))*8(sp) ; \
193 sdc1 ft7,(9+(off))*8(sp) ; \
194 sdc1 ft8,(10+(off))*8(sp) ; \
195 sdc1 ft9,(11+(off))*8(sp) ; \
196 sdc1 ft10,(12+(off))*8(sp) ; \
197 sdc1 ft11,(13+(off))*8(sp) ; \
198 sdc1 ft12,(14+(off))*8(sp) ; \
199 sdc1 ft13,(15+(off))*8(sp) ; \
200 sdc1 ft14,(16+(off))*8(sp) ; \
201 sdc1 ft15,(17+(off))*8(sp) ; \
202 sdc1 ft16,(18+(off))*8(sp) ; \
203 sdc1 ft17,(19+(off))*8(sp) ; \
204 sdc1 ft18,(20+(off))*8(sp) ;
207 #define RESTORE_TEMPORARY_REGISTERS(off) \
208 ld t0,(0+(off))*8(sp) ; \
209 ld t1,(1+(off))*8(sp) ; \
210 ld t2,(2+(off))*8(sp) ; \
211 ld t3,(3+(off))*8(sp) ; \
212 ld t8,(4+(off))*8(sp) ; \
214 ldc1 ft3,(5+(off))*8(sp) ; \
215 ldc1 ft4,(6+(off))*8(sp) ; \
216 ldc1 ft5,(7+(off))*8(sp) ; \
217 ldc1 ft6,(8+(off))*8(sp) ; \
218 ldc1 ft7,(9+(off))*8(sp) ; \
219 ldc1 ft8,(10+(off))*8(sp) ; \
220 ldc1 ft9,(11+(off))*8(sp) ; \
221 ldc1 ft10,(12+(off))*8(sp) ; \
222 ldc1 ft11,(13+(off))*8(sp) ; \
223 ldc1 ft12,(14+(off))*8(sp) ; \
224 ldc1 ft13,(15+(off))*8(sp) ; \
225 ldc1 ft14,(16+(off))*8(sp) ; \
226 ldc1 ft15,(17+(off))*8(sp) ; \
227 ldc1 ft16,(18+(off))*8(sp) ; \
228 ldc1 ft17,(19+(off))*8(sp) ; \
229 ldc1 ft18,(20+(off))*8(sp) ;
231 #endif /* _MD_ASM_H */
235 * These are local overrides for various environment variables in Emacs.
236 * Please do not remove this and leave it at the end of the file, where
237 * Emacs will automagically detect them.
238 * ---------------------------------------------------------------------
241 * indent-tabs-mode: t