1 /* src/vm/jit/powerpc/darwin/md-asm.h - assembler defines for PowerPC Darwin 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 4710 2006-03-30 10:23:11Z twisti $
39 #include <mach/ppc/asm.h>
42 /* define register names compatible with Linux names **************************/
78 /* register defines ***********************************************************/
171 /* save and restore macros ****************************************************/
173 #define SAVE_ARGUMENT_REGISTERS(off) \
174 stw a0,(0+(off))*4(sp); \
175 stw a1,(1+(off))*4(sp); \
176 stw a2,(2+(off))*4(sp); \
177 stw a3,(3+(off))*4(sp); \
178 stw a4,(4+(off))*4(sp); \
179 stw a5,(5+(off))*4(sp); \
180 stw a6,(6+(off))*4(sp); \
181 stw a7,(7+(off))*4(sp); \
183 stfd fa0,(8+(off))*4)(sp); \
184 stfd fa1,(10+(off))*4)(sp); \
185 stfd fa2,(12+(off))*4)(sp); \
186 stfd fa3,(14+(off))*4)(sp); \
187 stfd fa4,(16+(off))*4)(sp); \
188 stfd fa5,(18+(off))*4)(sp); \
189 stfd fa6,(20+(off))*4)(sp); \
190 stfd fa7,(22+(off))*4)(sp); \
191 stfd fa8,(24+(off))*4)(sp); \
192 stfd fa9,(26+(off))*4)(sp); \
193 stfd fa10,(28+(off))*4)(sp); \
194 stfd fa11,(30+(off))*4)(sp); \
195 stfd fa12,(32+(off))*4)(sp);
197 #define RESTORE_ARGUMENT_REGISTERS(off) \
198 lwz a0,(0+(off))*4(sp); \
199 lwz a1,(1+(off))*4(sp); \
200 lwz a2,(2+(off))*4(sp); \
201 lwz a3,(3+(off))*4(sp); \
202 lwz a4,(4+(off))*4(sp); \
203 lwz a5,(5+(off))*4(sp); \
204 lwz a6,(6+(off))*4(sp); \
205 lwz a7,(7+(off))*4(sp); \
207 lfd fa0,(8+(off))*4)(sp); \
208 lfd fa1,(10+(off))*4)(sp); \
209 lfd fa2,(12+(off))*4)(sp); \
210 lfd fa3,(14+(off))*4)(sp); \
211 lfd fa4,(16+(off))*4)(sp); \
212 lfd fa5,(18+(off))*4)(sp); \
213 lfd fa6,(20+(off))*4)(sp); \
214 lfd fa7,(22+(off))*4)(sp); \
215 lfd fa8,(24+(off))*4)(sp); \
216 lfd fa9,(26+(off))*4)(sp); \
217 lfd fa10,(28+(off))*4)(sp); \
218 lfd fa11,(30+(off))*4)(sp); \
219 lfd fa12,(32+(off))*4)(sp);
222 /* Defines for darwin's old gnu assembler *************************************/
224 /* internal defines ***********************************************************/
226 #define asm_vm_call_method _asm_vm_call_method
227 #define asm_vm_call_method_int _asm_vm_call_method_int
228 #define asm_vm_call_method_long _asm_vm_call_method_long
229 #define asm_vm_call_method_float _asm_vm_call_method_float
230 #define asm_vm_call_method_double _asm_vm_call_method_double
232 #define asm_vm_call_method_exception_handler _asm_vm_call_method_exception_handler
234 #define jumptable_int _jumptable_int
235 #define jumptable_long _jumptable_long
237 #define asm_call_jit_compiler _asm_call_jit_compiler
239 #define asm_handle_nat_exception _asm_handle_nat_exception
240 #define asm_handle_exception _asm_handle_exception
241 #define asm_handle_nullptr_exception _asm_handle_nullptr_exception
242 #define asm_wrapper_patcher _asm_wrapper_patcher
243 #define asm_replacement_out _asm_replacement_out
244 #define asm_replacement_in _asm_replacement_in
246 #define asm_cacheflush _asm_cacheflush
247 #define asm_initialize_thread_stack _asm_initialize_thread_stack
248 #define asm_perform_threadswitch _asm_perform_threadswitch
249 #define asm_switchstackandcall _asm_switchstackandcall
250 #define asm_criticalsections _asm_criticalsections
251 #define asm_getclassvalues_atomic _asm_getclassvalues_atomic
254 /* external defines ***********************************************************/
256 #define builtin_asm_get_exceptionptrptr _builtin_asm_get_exceptionptrptr
257 #define builtin_throw_exception _builtin_throw_exception
258 #define exceptions_handle_exception _exceptions_handle_exception
259 #define jit_compile _jit_compile
260 #define replace_me _replace_me
262 #define stacktrace_create_extern_stackframeinfo \
263 _stacktrace_create_extern_stackframeinfo
265 #define stacktrace_remove_stackframeinfo _stacktrace_remove_stackframeinfo
266 #define stacktrace_extern_fillInStackTrace \
267 _stacktrace_extern_fillInStackTrace
269 #if !defined(USE_THREADS) || !defined(NATIVE_THREADS)
270 #define _no_threads_exceptionptr __no_threads_exceptionptr
273 #endif /* _MD_ASM_H */
277 * These are local overrides for various environment variables in Emacs.
278 * Please do not remove this and leave it at the end of the file, where
279 * Emacs will automagically detect them.
280 * ---------------------------------------------------------------------
283 * indent-tabs-mode: t