expr_is_guardable, stmt_is_guardable, add_guarded_stmt_to_end_of: handle GetI/PutI...
[valgrind.git] / VEX / pub / libvex_s390x_common.h
blob289421677a357949be852e29922f76a956126e9c
1 /* -*- mode: C; c-basic-offset: 3; -*- */
3 /*--------------------------------------------------------------------*/
4 /*--- Common defs for s390x libvex_s390x_common.h ---*/
5 /*--------------------------------------------------------------------*/
7 /*
8 This file is part of Valgrind, a dynamic binary instrumentation
9 framework.
11 Copyright IBM Corp. 2010-2017
13 This program is free software; you can redistribute it and/or
14 modify it under the terms of the GNU General Public License as
15 published by the Free Software Foundation; either version 2 of the
16 License, or (at your option) any later version.
18 This program is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, see <http://www.gnu.org/licenses/>.
26 The GNU General Public License is contained in the file COPYING.
29 #ifndef __LIBVEX_PUB_S390X_H
30 #define __LIBVEX_PUB_S390X_H
32 /* This file includes definitions for s390.
34 It must be suitable for inclusion in assembler source files. */
37 /*--------------------------------------------------------------*/
38 /*--- Dedicated registers ---*/
39 /*--------------------------------------------------------------*/
41 #define S390_REGNO_RETURN_VALUE 2
42 #define S390_REGNO_TCHAIN_SCRATCH 12
43 #define S390_REGNO_GUEST_STATE_POINTER 13
44 #define S390_REGNO_LINK_REGISTER 14
45 #define S390_REGNO_STACK_POINTER 15
48 /*--------------------------------------------------------------*/
49 /*--- Offsets in the stack frame allocated by the dispatcher ---*/
50 /*--------------------------------------------------------------*/
52 /* Dispatcher will save 8 FPRs at offsets 160 + 0 ... 160 + 56 */
54 /* Where the dispatcher saves the r2 contents. */
55 #define S390_OFFSET_SAVED_R2 160+80
57 /* Where client's FPC register is saved. */
58 #define S390_OFFSET_SAVED_FPC_C 160+72
60 /* Where valgrind's FPC register is saved. */
61 #define S390_OFFSET_SAVED_FPC_V 160+64
63 /* Size of frame allocated by VG_(disp_run_translations)
64 Need size for
65 8 FPRs
66 + 1 GPR (SAVED_R2)
67 + 2 FPCs (SAVED_FPC_C and SAVED_FPC_V).
69 Additionally, we need a standard frame for helper functions being called
70 from client code. (See figure 1-16 in zSeries ABI) */
71 #define S390_INNERLOOP_FRAME_SIZE ((8+1+2)*8 + 160)
74 /*--------------------------------------------------------------*/
75 /*--- Facility bits ---*/
76 /*--------------------------------------------------------------*/
78 /* The value of the macro is the number of the facility bit as per POP. */
79 #define S390_FAC_MSA 17 // message-security-assist
80 #define S390_FAC_LDISP 18 // long displacement
81 #define S390_FAC_HFPMAS 20 // HFP multiply-and-add-subtract
82 #define S390_FAC_EIMM 21 // extended immediate
83 #define S390_FAC_HFPUNX 23 // HFP unnormalized extension
84 #define S390_FAC_ETF2 24 // ETF2-enhancement
85 #define S390_FAC_STCKF 25 // store clock fast insn
86 #define S390_FAC_PENH 26 // parsing-enhancement
87 #define S390_FAC_ETF3 30 // ETF3-enhancement
88 #define S390_FAC_XCPUT 31 // extract-CPU-time
89 #define S390_FAC_GIE 34 // general insn extension
90 #define S390_FAC_EXEXT 35 // execute extension
91 #define S390_FAC_FPEXT 37 // floating-point extension
92 #define S390_FAC_FPSE 41 // floating-point support enhancement
93 #define S390_FAC_DFP 42 // decimal floating point
94 #define S390_FAC_PFPO 44 // perform floating point operation insn
95 #define S390_FAC_HIGHW 45 // high-word extension
96 #define S390_FAC_LSC 45 // load/store on condition
97 #define S390_FAC_DFPZC 48 // DFP zoned-conversion
98 #define S390_FAC_MISC 49 // miscellaneous insn
99 #define S390_FAC_CTREXE 50 // constrained transactional execution
100 #define S390_FAC_LSC2 53 // load/store on condition 2 and load and zero rightmost byte
101 #define S390_FAC_MSA5 57 // message-security-assist 5
102 #define S390_FAC_MI2 58 // miscellaneous-instruction-extensions 2
103 #define S390_FAC_TREXE 73 // transactional execution
104 #define S390_FAC_MSA4 77 // message-security-assist 4
105 #define S390_FAC_VX 129 // vector facility
106 #define S390_FAC_VXE 135 // vector enhancements facility 1
107 #define S390_FAC_VXE2 148 // vector enhancements facility 2
108 #define S390_FAC_DFLT 151 // deflate-conversion facility
111 /*--------------------------------------------------------------*/
112 /*--- Miscellaneous ---*/
113 /*--------------------------------------------------------------*/
115 /* Number of arguments that can be passed in registers */
116 #define S390_NUM_GPRPARMS 5
118 /* Number of double words needed to store all facility bits. */
119 #define S390_NUM_FACILITY_DW 3
121 #endif /* __LIBVEX_PUB_S390X_H */
123 /*--------------------------------------------------------------------*/
124 /*--- end libvex_s390x_common.h ---*/
125 /*--------------------------------------------------------------------*/