CACAO
md-asm.hpp
Go to the documentation of this file.
1 /* src/vm/jit/i386/cygwin/md-asm.hpp - assembler defines for Cygwin i386 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 cygwin'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 
79 #define asm_vm_call_method_exception_handler _asm_vm_call_method_exception_handler
80 
81 #define asm_call_jit_compiler _asm_call_jit_compiler
82 
83 #define asm_handle_nat_exception _asm_handle_nat_exception
84 #define asm_handle_exception _asm_handle_exception
85 
86 #define asm_abstractmethoderror _asm_abstractmethoderror
87 
88 #define asm_patcher_wrapper _asm_patcher_wrapper
89 
90 #define asm_builtin_f2i _asm_builtin_f2i
91 #define asm_builtin_f2l _asm_builtin_f2l
92 #define asm_builtin_d2i _asm_builtin_d2i
93 #define asm_builtin_d2l _asm_builtin_d2l
94 
95 
96 /* external defines ***********************************************************/
97 
98 #define exceptions_get_and_clear_exception _exceptions_get_and_clear_exception
99 
100 #define builtin_throw_exception _builtin_throw_exception
101 #define methodtree_find _methodtree_find
102 #define exceptions_handle_exception _exceptions_handle_exception
103 #define jit_asm_compile _jit_asm_compile
104 
105 #define exceptions_asm_new_abstractmethoderror \
106  _exceptions_asm_new_abstractmethoderror
107 
108 #define patcher_wrapper _patcher_wrapper
109 
110 #define replace_me _replace_me
111 
112 #define abort _abort
113 
114 #define builtin_f2i _builtin_f2i
115 #define builtin_f2l _builtin_f2l
116 #define builtin_d2i _builtin_d2i
117 #define builtin_d2l _builtin_d2l
118 
119 #endif // MD_ASM_HPP_
120 
121 
122 /*
123  * These are local overrides for various environment variables in Emacs.
124  * Please do not remove this and leave it at the end of the file, where
125  * Emacs will automagically detect them.
126  * ---------------------------------------------------------------------
127  * Local variables:
128  * mode: c++
129  * indent-tabs-mode: t
130  * c-basic-offset: 4
131  * tab-width: 4
132  * End:
133  * vim:noexpandtab:sw=4:ts=4:
134  */