]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/valgrind/src/valgrind-3.6.0-svn/VEX/pub/libvex_s390x_common.h
update
[l4.git] / l4 / pkg / valgrind / src / valgrind-3.6.0-svn / VEX / pub / libvex_s390x_common.h
1
2 /*--------------------------------------------------------------------*/
3 /*--- Common defs for s390x                  libvex_s390x_common.h ---*/
4 /*--------------------------------------------------------------------*/
5
6 /*
7    This file is part of Valgrind, a dynamic binary instrumentation
8    framework.
9
10    Copyright IBM Corp. 2010-2011
11
12    This program is free software; you can redistribute it and/or
13    modify it under the terms of the GNU General Public License as
14    published by the Free Software Foundation; either version 2 of the
15    License, or (at your option) any later version.
16
17    This program is distributed in the hope that it will be useful, but
18    WITHOUT ANY WARRANTY; without even the implied warranty of
19    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20    General Public License for more details.
21
22    You should have received a copy of the GNU General Public License
23    along with this program; if not, write to the Free Software
24    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25    02110-1301, USA.
26
27    The GNU General Public License is contained in the file COPYING.
28 */
29
30 /* -*- mode: C; c-basic-offset: 3; -*- */
31
32 #ifndef __LIBVEX_PUB_S390X_H
33 #define __LIBVEX_PUB_S390X_H
34
35 /* This file includes definitions for s390.
36
37    It must be suitable for inclusion in assembler source files. */
38
39
40 /*--------------------------------------------------------------*/
41 /*--- Dedicated registers                                    ---*/
42 /*--------------------------------------------------------------*/
43
44 #define S390_REGNO_RETURN_VALUE         2
45 #define S390_REGNO_DISPATCH_CTR        12   /* Holds VG_(dispatch_ctr) */
46 #define S390_REGNO_GUEST_STATE_POINTER 13
47 #define S390_REGNO_LINK_REGISTER       14
48 #define S390_REGNO_STACK_POINTER       15
49
50
51 /*--------------------------------------------------------------*/
52 /*--- Offsets in the stack frame allocated by the dispatcher ---*/
53 /*--------------------------------------------------------------*/
54
55 /* Where client's FPC register is saved. */
56 #define S390_OFFSET_SAVED_FPC_C 160+88
57
58 /* Where valgrind's FPC register is saved. */
59 #define S390_OFFSET_SAVED_FPC_V 160+80
60
61 /* Where client code will save the link register before calling a helper. */
62 #define S390_OFFSET_SAVED_LR 160+72
63
64 /* Location of saved guest state pointer */
65 #define S390_OFFSET_SAVED_GSP 160+64
66
67 /* Size of frame allocated by VG_(run_innerloop)
68    Need size for
69        8 FPRs
70      + 2 GPRs (SAVED_GSP and SAVED_LR)
71      + 2 FPCs (SAVED_FPC_C and SAVED_FPC_V).
72
73    Additionally, we need a standard frame for helper functions being called
74    from client code. (See figure 1-16 in zSeries ABI) */
75 #define S390_INNERLOOP_FRAME_SIZE ((8+2+2)*8 + 160)
76
77
78 /*--------------------------------------------------------------*/
79 /*--- Miscellaneous                                          ---*/
80 /*--------------------------------------------------------------*/
81
82 /* Number of arguments that can be passed in registers */
83 #define S390_NUM_GPRPARMS 5
84
85 #endif /* __LIBVEX_PUB_S390X_H */
86
87 /*--------------------------------------------------------------------*/
88 /*--- end                                    libvex_s390x_common.h ---*/
89 /*--------------------------------------------------------------------*/