* src/vm/jit/i386/asmpart.S: Replaced codegen_get_pv_from_pc with
[cacao.git] / src / vm / jit / i386 / darwin / md-asm.h
1 /* src/vm/jit/i386/darwin/md-asm.h - assembler defines for i386 Darwin ABI
2
3    Copyright (C) 1996-2005, 2006, 2008
4    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5
6    This file is part of CACAO.
7
8    This program is free software; you can redistribute it and/or
9    modify it under the terms of the GNU General Public License as
10    published by the Free Software Foundation; either version 2, or (at
11    your option) any later version.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23 */
24
25
26 #ifndef _MD_ASM_H
27 #define _MD_ASM_H
28
29 /* register defines ***********************************************************/
30
31 #define v0       %eax
32 #define itmp1    v0
33
34 #define itmp2    %ecx
35 #define itmp3    %edx
36
37 #define t0       %ebx
38
39 #define sp       %esp
40 #define s0       %ebp
41 #define s1       %esi
42 #define s2       %edi
43
44 #define bp       s0
45
46 #define itmp1b   %al
47
48 #define xptr     itmp1
49 #define xpc      itmp2
50 #define mptr     itmp2
51
52
53 /* save and restore macros ****************************************************/
54
55 #define SAVE_ARGUMENT_REGISTERS(off) \
56     /* no argument registers */
57
58 #define SAVE_TEMPORARY_REGISTERS(off) \
59         mov     t0,(0+(off))*4(sp) ;
60
61
62 #define RESTORE_ARGUMENT_REGISTERS(off) \
63     /* no argument registers */
64
65 #define RESTORE_TEMPORARY_REGISTERS(off) \
66         mov     (0+(off))*4(sp),t0 ;
67
68
69 /* defines for darwin's old gnu assembler *************************************/
70
71 #define asm_md_init                           _asm_md_init
72
73 #define asm_vm_call_method                    _asm_vm_call_method
74 #define asm_vm_call_method_int                _asm_vm_call_method_int
75 #define asm_vm_call_method_long               _asm_vm_call_method_long
76 #define asm_vm_call_method_float              _asm_vm_call_method_float
77 #define asm_vm_call_method_double             _asm_vm_call_method_double
78 #define asm_vm_call_method_end                _asm_vm_call_method_end
79
80 #define asm_vm_call_method_exception_handler  _asm_vm_call_method_exception_handler
81
82 #define asm_call_jit_compiler                 _asm_call_jit_compiler
83
84 #define asm_handle_nat_exception              _asm_handle_nat_exception
85 #define asm_handle_exception                  _asm_handle_exception
86
87 #define asm_abstractmethoderror               _asm_abstractmethoderror
88
89 #define asm_patcher_wrapper                   _asm_patcher_wrapper
90
91 #define asm_builtin_f2i                       _asm_builtin_f2i
92 #define asm_builtin_f2l                       _asm_builtin_f2l
93 #define asm_builtin_d2i                       _asm_builtin_d2i
94 #define asm_builtin_d2l                       _asm_builtin_d2l
95
96 #define asm_criticalsections                  _asm_criticalsections
97 #define asm_getclassvalues_atomic             _asm_getclassvalues_atomic
98
99
100 /* external defines ***********************************************************/
101
102 #define exceptions_get_and_clear_exception    _exceptions_get_and_clear_exception
103
104 #define builtin_throw_exception               _builtin_throw_exception
105 #define methodtree_find                       _methodtree_find
106 #define exceptions_handle_exception           _exceptions_handle_exception
107 #define jit_asm_compile                       _jit_asm_compile
108
109 #define exceptions_asm_new_abstractmethoderror \
110     _exceptions_asm_new_abstractmethoderror
111
112 #define patcher_wrapper                       _patcher_wrapper
113
114 #define replace_me                            _replace_me
115
116 #define abort                                 _abort
117
118 #define builtin_f2i                           _builtin_f2i
119 #define builtin_f2l                           _builtin_f2l
120 #define builtin_d2i                           _builtin_d2i
121 #define builtin_d2l                           _builtin_d2l
122
123 #endif /* _MD_ASM_H */
124
125
126 /*
127  * These are local overrides for various environment variables in Emacs.
128  * Please do not remove this and leave it at the end of the file, where
129  * Emacs will automagically detect them.
130  * ---------------------------------------------------------------------
131  * Local variables:
132  * mode: c
133  * indent-tabs-mode: t
134  * c-basic-offset: 4
135  * tab-width: 4
136  * End:
137  */