* src/vm/jit/sparc64/emit.c: Implemented trace enter/exit functions.
[cacao.git] / src / vm / jit / sparc64 / md-asm.h
1 /* src/vm/jit/sparc64/md-asm.h - assembler defines for Sparc ABI
2
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
7
8    This file is part of CACAO.
9
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.
14
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.
19
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
23    02110-1301, USA.
24
25    Contact: cacao@cacaojvm.org
26
27    Authors: Christian Thalinger
28             Alexander Jordan
29
30    Changes:
31
32    $Id: md-asm.h 4498 2006-02-12 23:43:09Z twisti $
33
34 */
35
36 #ifndef _MD_ASM_H
37 #define _MD_ASM_H
38
39
40 /* register defines
41  * ***********************************************************/
42
43 #define zero    %g0
44 #define itmp1   %g1
45 #define itmp2   %g2
46 #define itmp3   %g3
47
48 #define mptr_itmp2 itmp2
49
50 #define xptr_itmp2 itmp2
51 #define xpc_itmp3  itmp3
52
53 #define ra_caller  %o7
54 #define ra_callee  %i7
55
56 #define pv_caller  %o5
57 #define pv_callee  %i5
58
59
60 #define fv0     %f0
61 #define ft0     %f2
62 #define ft1     %f4
63 #define ft2     %f6
64 #define ft3     %f8
65 #define ft4     %f10
66 #define ft5     %f12
67 #define ft6     %f14
68
69 #define fa0     %f16
70 #define fa1     %f18
71 #define fa2     %f20
72 #define fa3     %f22
73 #define fs0     %f24
74 #define fs1     %f26
75 #define fs2     %f28
76 #define fs3     %f30
77
78
79 #define bias    2047
80
81
82 /* save and restore macros ****************************************************/
83
84
85 #define SAVE_FLOAT_ARGUMENT_REGISTERS(off) \
86         std     fa0,[%sp + bias + ((0+(off))*8)] ; \
87         std     fa1,[%sp + bias + ((1+(off))*8)] ; \
88         std     fa2,[%sp + bias + ((2+(off))*8)] ; \
89         std     fa3,[%sp + bias + ((3+(off))*8)]
90
91
92 #define RESTORE_FLOAT_ARGUMENT_REGISTERS(off) \
93         ldd     [%sp + bias + ((0+(off))*8)],fa0 ; \
94         ldd     [%sp + bias + ((1+(off))*8)],fa1 ; \
95         ldd     [%sp + bias + ((2+(off))*8)],fa2 ; \
96         ldd     [%sp + bias + ((3+(off))*8)],fa3 ; \
97         
98         
99         
100
101 #endif /* _MD_ASM_H */
102
103
104 /*
105  * These are local overrides for various environment variables in Emacs.
106  * Please do not remove this and leave it at the end of the file, where
107  * Emacs will automagically detect them.
108  *
109  * ---------------------------------------------------------------------
110  * Local variables:
111  * mode: c
112  * indent-tabs-mode: t
113  * c-basic-offset: 4
114  * tab-width: 4
115  * End:
116  */
117