CACAO
md-asm.hpp
Go to the documentation of this file.
1 /* src/vm/jit/i386/md-asm.hpp - assembler defines for 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  Contact: cacao@cacaojvm.org
24 
25  Authors: Christian Thalinger
26 
27  Changes:
28 
29 */
30 
31 
32 #ifndef MD_ASM_HPP_
33 #define MD_ASM_HPP_ 1
34 
35 /* register defines ***********************************************************/
36 
37 #define v0 %eax
38 #define itmp1 v0
39 
40 #define itmp2 %ecx
41 #define itmp3 %edx
42 
43 #define t0 %ebx
44 
45 #define sp %esp
46 #define s0 %ebp
47 #define s1 %esi
48 #define s2 %edi
49 
50 #define bp s0
51 
52 #define itmp1b %al
53 
54 #define xptr itmp1
55 #define xpc itmp2
56 #define mptr itmp2
57 
58 
59 /* save and restore macros ****************************************************/
60 
61 #define SAVE_ARGUMENT_REGISTERS(off) \
62  /* no argument registers */
63 
64 #define SAVE_TEMPORARY_REGISTERS(off) \
65  mov t0,(0+(off))*4(sp) ;
66 
67 
68 #define RESTORE_ARGUMENT_REGISTERS(off) \
69  /* no argument registers */
70 
71 #define RESTORE_TEMPORARY_REGISTERS(off) \
72  mov (0+(off))*4(sp),t0 ;
73 
74 #endif // MD_ASM_HPP_
75 
76 
77 /*
78  * These are local overrides for various environment variables in Emacs.
79  * Please do not remove this and leave it at the end of the file, where
80  * Emacs will automagically detect them.
81  * ---------------------------------------------------------------------
82  * Local variables:
83  * mode: c++
84  * indent-tabs-mode: t
85  * c-basic-offset: 4
86  * tab-width: 4
87  * End:
88  */