CACAO
md-asm.hpp
Go to the documentation of this file.
1 /* src/vm/jit/i386/darwin/md-asm.hpp - assembler defines for i386 Darwin ABI
2 
3  Copyright (C) 1996-2013
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_HPP_
27 #define MD_ASM_HPP_ 1
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 
97 /* external defines ***********************************************************/
98 
99 #define exceptions_get_and_clear_exception _exceptions_get_and_clear_exception
100 
101 #define builtin_throw_exception _builtin_throw_exception
102 #define methodtree_find _methodtree_find
103 #define exceptions_handle_exception _exceptions_handle_exception
104 #define jit_asm_compile _jit_asm_compile
105 
106 #define exceptions_asm_new_abstractmethoderror \
107  _exceptions_asm_new_abstractmethoderror
108 
109 #define patcher_wrapper _patcher_wrapper
110 
111 #define replace_me _replace_me
112 
113 #define abort _abort
114 
115 #define builtin_f2i _builtin_f2i
116 #define builtin_f2l _builtin_f2l
117 #define builtin_d2i _builtin_d2i
118 #define builtin_d2l _builtin_d2l
119 
120 #endif // MD_ASM_H
121 
122 
123 /*
124  * These are local overrides for various environment variables in Emacs.
125  * Please do not remove this and leave it at the end of the file, where
126  * Emacs will automagically detect them.
127  * ---------------------------------------------------------------------
128  * Local variables:
129  * mode: c++
130  * indent-tabs-mode: t
131  * c-basic-offset: 4
132  * tab-width: 4
133  * End:
134  */