non-linux regtest: update cmdline expecteds
[valgrind.git] / VEX / pub / libvex_guest_s390x.h
blobec4d71bb4554c984c1e1e77c6316737250dad14d
1 /* -*- mode: C; c-basic-offset: 3; -*- */
3 /*---------------------------------------------------------------*/
4 /*--- begin libvex_guest_s390x.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_GUEST_S390X_H
30 #define __LIBVEX_PUB_GUEST_S390X_H
32 #include "libvex_basictypes.h"
34 /*------------------------------------------------------------*/
35 /*--- Vex's representation of the s390 CPU state. ---*/
36 /*------------------------------------------------------------*/
38 typedef struct {
40 /*------------------------------------------------------------*/
41 /*--- ar registers ---*/
42 /*------------------------------------------------------------*/
44 /* 0 */ UInt guest_a0;
45 /* 4 */ UInt guest_a1;
46 /* 8 */ UInt guest_a2;
47 /* 12 */ UInt guest_a3;
48 /* 16 */ UInt guest_a4;
49 /* 20 */ UInt guest_a5;
50 /* 24 */ UInt guest_a6;
51 /* 28 */ UInt guest_a7;
52 /* 32 */ UInt guest_a8;
53 /* 36 */ UInt guest_a9;
54 /* 40 */ UInt guest_a10;
55 /* 44 */ UInt guest_a11;
56 /* 48 */ UInt guest_a12;
57 /* 52 */ UInt guest_a13;
58 /* 56 */ UInt guest_a14;
59 /* 60 */ UInt guest_a15;
61 /*------------------------------------------------------------*/
62 /*--- fpr & vr registers ---*/
63 /*------------------------------------------------------------*/
66 FPRs[0-15] are mapped to the first double words of VR's[0-15].
67 According to documentation if we modify fpr1 with FP insn then the content of vr1's 64..128
68 bits is unpredictable. If we modify 64..128 of vr1 then fpr1's value is unpredictable too.
69 In our implementation writing to one half of vr doesn't affect another part but
70 apllications shouldn't rely on it.
73 /* 64 */ V128 guest_v0;
74 /* 80 */ V128 guest_v1;
75 /* 96 */ V128 guest_v2;
76 /* 112 */ V128 guest_v3;
77 /* 128 */ V128 guest_v4;
78 /* 144 */ V128 guest_v5;
79 /* 160 */ V128 guest_v6;
80 /* 176 */ V128 guest_v7;
81 /* 192 */ V128 guest_v8;
82 /* 208 */ V128 guest_v9;
83 /* 224 */ V128 guest_v10;
84 /* 240 */ V128 guest_v11;
85 /* 256 */ V128 guest_v12;
86 /* 272 */ V128 guest_v13;
87 /* 288 */ V128 guest_v14;
88 /* 304 */ V128 guest_v15;
89 /* 320 */ V128 guest_v16;
90 /* 336 */ V128 guest_v17;
91 /* 352 */ V128 guest_v18;
92 /* 368 */ V128 guest_v19;
93 /* 384 */ V128 guest_v20;
94 /* 400 */ V128 guest_v21;
95 /* 416 */ V128 guest_v22;
96 /* 432 */ V128 guest_v23;
97 /* 448 */ V128 guest_v24;
98 /* 464 */ V128 guest_v25;
99 /* 480 */ V128 guest_v26;
100 /* 496 */ V128 guest_v27;
101 /* 512 */ V128 guest_v28;
102 /* 528 */ V128 guest_v29;
103 /* 544 */ V128 guest_v30;
104 /* 560 */ V128 guest_v31;
106 /*------------------------------------------------------------*/
107 /*--- gpr registers ---*/
108 /*------------------------------------------------------------*/
110 /* 576 */ ULong guest_r0;
111 /* 584 */ ULong guest_r1;
112 /* 592 */ ULong guest_r2;
113 /* 600 */ ULong guest_r3;
114 /* 608 */ ULong guest_r4;
115 /* 616 */ ULong guest_r5;
116 /* 624 */ ULong guest_r6;
117 /* 632 */ ULong guest_r7;
118 /* 640 */ ULong guest_r8;
119 /* 648 */ ULong guest_r9;
120 /* 656 */ ULong guest_r10;
121 /* 664 */ ULong guest_r11;
122 /* 672 */ ULong guest_r12;
123 /* 680 */ ULong guest_r13;
124 /* 688 */ ULong guest_r14;
125 /* 696 */ ULong guest_r15;
127 /*------------------------------------------------------------*/
128 /*--- S390 miscellaneous registers ---*/
129 /*------------------------------------------------------------*/
131 /* 704 */ ULong guest_counter;
132 /* 712 */ UInt guest_fpc;
133 /* 716 */ UChar unused[4]; /* 4-byte hole to get 8-byte alignment */
134 /* 720 */ ULong guest_IA;
136 /*------------------------------------------------------------*/
137 /*--- S390 pseudo registers ---*/
138 /*------------------------------------------------------------*/
140 /* 728 */ ULong guest_SYSNO;
142 /*------------------------------------------------------------*/
143 /*--- 4-word thunk used to calculate the condition code ---*/
144 /*------------------------------------------------------------*/
146 /* 736 */ ULong guest_CC_OP;
147 /* 744 */ ULong guest_CC_DEP1;
148 /* 752 */ ULong guest_CC_DEP2;
149 /* 760 */ ULong guest_CC_NDEP;
151 /*------------------------------------------------------------*/
152 /*--- Pseudo registers. Required by all architectures ---*/
153 /*------------------------------------------------------------*/
155 /* See comments at bottom of libvex.h */
156 /* 768 */ ULong guest_NRADDR;
157 /* 776 */ ULong guest_CMSTART;
158 /* 784 */ ULong guest_CMLEN;
160 /* Used when backing up to restart a syscall that has
161 been interrupted by a signal. See also comment in
162 libvex_ir.h */
163 /* 792 */ ULong guest_IP_AT_SYSCALL;
165 /* Emulation notes; see comments in libvex_emnote.h */
166 /* 800 */ UInt guest_EMNOTE;
168 /* For translation chaining */
169 /* 804 */ UInt host_EvC_COUNTER;
170 /* 808 */ ULong host_EvC_FAILADDR;
172 /*------------------------------------------------------------*/
173 /*--- Force alignment to 16 bytes ---*/
174 /*------------------------------------------------------------*/
175 /* 816 */ UChar padding[0];
177 /* 816 */ /* This is the size of the guest state */
178 } VexGuestS390XState;
181 /*------------------------------------------------------------*/
182 /*--- Function prototypes ---*/
183 /*------------------------------------------------------------*/
185 void LibVEX_GuestS390X_initialise(VexGuestS390XState *);
187 /*------------------------------------------------------------*/
188 /*--- Dedicated registers ---*/
189 /*------------------------------------------------------------*/
191 #define guest_LR guest_r14 /* Link register */
192 #define guest_SP guest_r15 /* Stack pointer */
193 #define guest_FP guest_r11 /* Frame pointer */
195 /*---------------------------------------------------------------*/
196 /*--- end libvex_guest_s390x.h ---*/
197 /*---------------------------------------------------------------*/
199 #endif /* __LIBVEX_PUB_GUEST_S390X_H */