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 8274 2007-08-08 15:58:17Z twisti $
39 /* define register names compatible with Linux names **************************/
75 /* register defines ***********************************************************/
168 /* save and restore macros ****************************************************/
170 #define SAVE_ARGUMENT_REGISTERS(off) \
171 stw a0,(0+(off))*4(sp); \
172 stw a1,(1+(off))*4(sp); \
173 stw a2,(2+(off))*4(sp); \
174 stw a3,(3+(off))*4(sp); \
175 stw a4,(4+(off))*4(sp); \
176 stw a5,(5+(off))*4(sp); \
177 stw a6,(6+(off))*4(sp); \
178 stw a7,(7+(off))*4(sp); \
180 stfd fa0,(8+(off))*4)(sp); \
181 stfd fa1,(10+(off))*4)(sp); \
182 stfd fa2,(12+(off))*4)(sp); \
183 stfd fa3,(14+(off))*4)(sp); \
184 stfd fa4,(16+(off))*4)(sp); \
185 stfd fa5,(18+(off))*4)(sp); \
186 stfd fa6,(20+(off))*4)(sp); \
187 stfd fa7,(22+(off))*4)(sp); \
188 stfd fa8,(24+(off))*4)(sp); \
189 stfd fa9,(26+(off))*4)(sp); \
190 stfd fa10,(28+(off))*4)(sp); \
191 stfd fa11,(30+(off))*4)(sp); \
192 stfd fa12,(32+(off))*4)(sp);
194 #define RESTORE_ARGUMENT_REGISTERS(off) \
195 lwz a0,(0+(off))*4(sp); \
196 lwz a1,(1+(off))*4(sp); \
197 lwz a2,(2+(off))*4(sp); \
198 lwz a3,(3+(off))*4(sp); \
199 lwz a4,(4+(off))*4(sp); \
200 lwz a5,(5+(off))*4(sp); \
201 lwz a6,(6+(off))*4(sp); \
202 lwz a7,(7+(off))*4(sp); \
204 lfd fa0,(8+(off))*4)(sp); \
205 lfd fa1,(10+(off))*4)(sp); \
206 lfd fa2,(12+(off))*4)(sp); \
207 lfd fa3,(14+(off))*4)(sp); \
208 lfd fa4,(16+(off))*4)(sp); \
209 lfd fa5,(18+(off))*4)(sp); \
210 lfd fa6,(20+(off))*4)(sp); \
211 lfd fa7,(22+(off))*4)(sp); \
212 lfd fa8,(24+(off))*4)(sp); \
213 lfd fa9,(26+(off))*4)(sp); \
214 lfd fa10,(28+(off))*4)(sp); \
215 lfd fa11,(30+(off))*4)(sp); \
216 lfd fa12,(32+(off))*4)(sp);
219 /* Defines for darwin's old gnu assembler *************************************/
221 /* internal defines ***********************************************************/
223 #define asm_vm_call_method _asm_vm_call_method
224 #define asm_vm_call_method_int _asm_vm_call_method_int
225 #define asm_vm_call_method_long _asm_vm_call_method_long
226 #define asm_vm_call_method_float _asm_vm_call_method_float
227 #define asm_vm_call_method_double _asm_vm_call_method_double
228 #define asm_vm_call_method_end _asm_vm_call_method_end
230 #define asm_vm_call_method_exception_handler _asm_vm_call_method_exception_handler
232 #define jumptable_int _jumptable_int
233 #define jumptable_long _jumptable_long
235 #define asm_call_jit_compiler _asm_call_jit_compiler
237 #define asm_handle_nat_exception _asm_handle_nat_exception
238 #define asm_handle_exception _asm_handle_exception
240 #define asm_abstractmethoderror _asm_abstractmethoderror
242 #define asm_patcher_wrapper _asm_patcher_wrapper
244 #define asm_replacement_out _asm_replacement_out
245 #define asm_replacement_in _asm_replacement_in
247 #define asm_cacheflush _asm_cacheflush
250 /* external defines ***********************************************************/
252 #define exceptions_get_and_clear_exception \
253 L_exceptions_get_and_clear_exception$stub
255 #define builtin_throw_exception L_builtin_throw_exception$stub
257 #define md_codegen_get_pv_from_pc L_md_codegen_get_pv_from_pc$stub
258 #define exceptions_handle_exception L_exceptions_handle_exception$stub
260 #define jit_asm_compile L_jit_asm_compile$stub
262 #define exceptions_asm_new_abstractmethoderror \
263 L_exceptions_asm_new_abstractmethoderror$stub
265 #define patcher_wrapper L_patcher_wrapper$stub
267 #define replace_me L_replace_me$stub
268 #define replace_build_execution_state L_replace_build_execution_state$stub
269 #define replace_free_safestack L_replace_free_safestack$stub
271 #define stacktrace_create_extern_stackframeinfo \
272 L_stacktrace_create_extern_stackframeinfo$stub
274 #define stacktrace_remove_stackframeinfo \
275 L_stacktrace_remove_stackframeinfo$stub
277 #endif /* _MD_ASM_H */
281 * These are local overrides for various environment variables in Emacs.
282 * Please do not remove this and leave it at the end of the file, where
283 * Emacs will automagically detect them.
284 * ---------------------------------------------------------------------
287 * indent-tabs-mode: t