pyvex 9.2.189__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyvex/__init__.py +92 -0
- pyvex/_register_info.py +1800 -0
- pyvex/arches.py +94 -0
- pyvex/block.py +697 -0
- pyvex/const.py +426 -0
- pyvex/const_val.py +26 -0
- pyvex/data_ref.py +55 -0
- pyvex/enums.py +156 -0
- pyvex/errors.py +31 -0
- pyvex/expr.py +974 -0
- pyvex/include/libvex.h +1029 -0
- pyvex/include/libvex_basictypes.h +236 -0
- pyvex/include/libvex_emnote.h +142 -0
- pyvex/include/libvex_guest_amd64.h +252 -0
- pyvex/include/libvex_guest_arm.h +224 -0
- pyvex/include/libvex_guest_arm64.h +203 -0
- pyvex/include/libvex_guest_mips32.h +175 -0
- pyvex/include/libvex_guest_mips64.h +173 -0
- pyvex/include/libvex_guest_offsets.h +941 -0
- pyvex/include/libvex_guest_ppc32.h +298 -0
- pyvex/include/libvex_guest_ppc64.h +343 -0
- pyvex/include/libvex_guest_riscv64.h +148 -0
- pyvex/include/libvex_guest_s390x.h +201 -0
- pyvex/include/libvex_guest_tilegx.h +149 -0
- pyvex/include/libvex_guest_x86.h +322 -0
- pyvex/include/libvex_ir.h +3113 -0
- pyvex/include/libvex_s390x_common.h +123 -0
- pyvex/include/libvex_trc_values.h +99 -0
- pyvex/include/pyvex.h +96 -0
- pyvex/lib/pyvex.dll +0 -0
- pyvex/lib/pyvex.lib +0 -0
- pyvex/lifting/__init__.py +18 -0
- pyvex/lifting/gym/README.md +7 -0
- pyvex/lifting/gym/__init__.py +5 -0
- pyvex/lifting/gym/aarch64_spotter.py +40 -0
- pyvex/lifting/gym/arm_spotter.py +427 -0
- pyvex/lifting/gym/x86_spotter.py +129 -0
- pyvex/lifting/libvex.py +117 -0
- pyvex/lifting/lift_function.py +304 -0
- pyvex/lifting/lifter.py +124 -0
- pyvex/lifting/post_processor.py +16 -0
- pyvex/lifting/util/__init__.py +14 -0
- pyvex/lifting/util/instr_helper.py +422 -0
- pyvex/lifting/util/lifter_helper.py +154 -0
- pyvex/lifting/util/syntax_wrapper.py +312 -0
- pyvex/lifting/util/vex_helper.py +301 -0
- pyvex/lifting/zerodivision.py +71 -0
- pyvex/native.py +63 -0
- pyvex/py.typed +1 -0
- pyvex/stmt.py +740 -0
- pyvex/types.py +48 -0
- pyvex/utils.py +63 -0
- pyvex/vex_ffi.py +1452 -0
- pyvex-9.2.189.dist-info/METADATA +181 -0
- pyvex-9.2.189.dist-info/RECORD +60 -0
- pyvex-9.2.189.dist-info/WHEEL +5 -0
- pyvex-9.2.189.dist-info/licenses/LICENSE +24 -0
- pyvex-9.2.189.dist-info/licenses/pyvex_c/LICENSE +339 -0
- pyvex-9.2.189.dist-info/licenses/vex/LICENSE.GPL +340 -0
- pyvex-9.2.189.dist-info/licenses/vex/LICENSE.README +23 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
|
|
2
|
+
/*--------------------------------------------------------------------*/
|
|
3
|
+
/*--- begin libvex_guest_riscv64.h ---*/
|
|
4
|
+
/*--------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
This file is part of Valgrind, a dynamic binary instrumentation
|
|
8
|
+
framework.
|
|
9
|
+
|
|
10
|
+
Copyright (C) 2020-2023 Petr Pavlu
|
|
11
|
+
petr.pavlu@dagobah.cz
|
|
12
|
+
|
|
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.
|
|
17
|
+
|
|
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.
|
|
22
|
+
|
|
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/>.
|
|
25
|
+
|
|
26
|
+
The GNU General Public License is contained in the file COPYING.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
#ifndef __LIBVEX_PUB_GUEST_RISCV64_H
|
|
30
|
+
#define __LIBVEX_PUB_GUEST_RISCV64_H
|
|
31
|
+
|
|
32
|
+
#include "libvex_basictypes.h"
|
|
33
|
+
|
|
34
|
+
/*------------------------------------------------------------*/
|
|
35
|
+
/*--- Vex's representation of the riscv64 CPU state. ---*/
|
|
36
|
+
/*------------------------------------------------------------*/
|
|
37
|
+
|
|
38
|
+
typedef struct {
|
|
39
|
+
/* 0 */ ULong host_EvC_FAILADDR;
|
|
40
|
+
/* 8 */ UInt host_EvC_COUNTER;
|
|
41
|
+
/* 12 */ UInt pad0;
|
|
42
|
+
/* 16 */ ULong guest_x0;
|
|
43
|
+
/* 24 */ ULong guest_x1;
|
|
44
|
+
/* 32 */ ULong guest_x2;
|
|
45
|
+
/* 40 */ ULong guest_x3;
|
|
46
|
+
/* 48 */ ULong guest_x4;
|
|
47
|
+
/* 56 */ ULong guest_x5;
|
|
48
|
+
/* 64 */ ULong guest_x6;
|
|
49
|
+
/* 72 */ ULong guest_x7;
|
|
50
|
+
/* 80 */ ULong guest_x8;
|
|
51
|
+
/* 88 */ ULong guest_x9;
|
|
52
|
+
/* 96 */ ULong guest_x10;
|
|
53
|
+
/* 104 */ ULong guest_x11;
|
|
54
|
+
/* 112 */ ULong guest_x12;
|
|
55
|
+
/* 120 */ ULong guest_x13;
|
|
56
|
+
/* 128 */ ULong guest_x14;
|
|
57
|
+
/* 136 */ ULong guest_x15;
|
|
58
|
+
/* 144 */ ULong guest_x16;
|
|
59
|
+
/* 152 */ ULong guest_x17;
|
|
60
|
+
/* 160 */ ULong guest_x18;
|
|
61
|
+
/* 168 */ ULong guest_x19;
|
|
62
|
+
/* 176 */ ULong guest_x20;
|
|
63
|
+
/* 184 */ ULong guest_x21;
|
|
64
|
+
/* 192 */ ULong guest_x22;
|
|
65
|
+
/* 200 */ ULong guest_x23;
|
|
66
|
+
/* 208 */ ULong guest_x24;
|
|
67
|
+
/* 216 */ ULong guest_x25;
|
|
68
|
+
/* 224 */ ULong guest_x26;
|
|
69
|
+
/* 232 */ ULong guest_x27;
|
|
70
|
+
/* 240 */ ULong guest_x28;
|
|
71
|
+
/* 248 */ ULong guest_x29;
|
|
72
|
+
/* 256 */ ULong guest_x30;
|
|
73
|
+
/* 264 */ ULong guest_x31;
|
|
74
|
+
/* 272 */ ULong guest_pc;
|
|
75
|
+
|
|
76
|
+
/* Floating-point state. */
|
|
77
|
+
/* 280 */ ULong guest_f0;
|
|
78
|
+
/* 288 */ ULong guest_f1;
|
|
79
|
+
/* 296 */ ULong guest_f2;
|
|
80
|
+
/* 304 */ ULong guest_f3;
|
|
81
|
+
/* 312 */ ULong guest_f4;
|
|
82
|
+
/* 320 */ ULong guest_f5;
|
|
83
|
+
/* 328 */ ULong guest_f6;
|
|
84
|
+
/* 336 */ ULong guest_f7;
|
|
85
|
+
/* 344 */ ULong guest_f8;
|
|
86
|
+
/* 352 */ ULong guest_f9;
|
|
87
|
+
/* 360 */ ULong guest_f10;
|
|
88
|
+
/* 368 */ ULong guest_f11;
|
|
89
|
+
/* 376 */ ULong guest_f12;
|
|
90
|
+
/* 384 */ ULong guest_f13;
|
|
91
|
+
/* 392 */ ULong guest_f14;
|
|
92
|
+
/* 400 */ ULong guest_f15;
|
|
93
|
+
/* 408 */ ULong guest_f16;
|
|
94
|
+
/* 416 */ ULong guest_f17;
|
|
95
|
+
/* 424 */ ULong guest_f18;
|
|
96
|
+
/* 432 */ ULong guest_f19;
|
|
97
|
+
/* 440 */ ULong guest_f20;
|
|
98
|
+
/* 448 */ ULong guest_f21;
|
|
99
|
+
/* 456 */ ULong guest_f22;
|
|
100
|
+
/* 464 */ ULong guest_f23;
|
|
101
|
+
/* 472 */ ULong guest_f24;
|
|
102
|
+
/* 480 */ ULong guest_f25;
|
|
103
|
+
/* 488 */ ULong guest_f26;
|
|
104
|
+
/* 496 */ ULong guest_f27;
|
|
105
|
+
/* 504 */ ULong guest_f28;
|
|
106
|
+
/* 512 */ ULong guest_f29;
|
|
107
|
+
/* 520 */ ULong guest_f30;
|
|
108
|
+
/* 528 */ ULong guest_f31;
|
|
109
|
+
/* 536 */ UInt guest_fcsr;
|
|
110
|
+
|
|
111
|
+
/* Various pseudo-regs mandated by Vex or Valgrind. */
|
|
112
|
+
/* Emulation notes. */
|
|
113
|
+
/* 540 */ UInt guest_EMNOTE;
|
|
114
|
+
|
|
115
|
+
/* For clflush/clinval: record start and length of area. */
|
|
116
|
+
/* 544 */ ULong guest_CMSTART;
|
|
117
|
+
/* 552 */ ULong guest_CMLEN;
|
|
118
|
+
|
|
119
|
+
/* Used to record the unredirected guest address at the start of a
|
|
120
|
+
translation whose start has been redirected. By reading this
|
|
121
|
+
pseudo-register shortly afterwards, the translation can find out what the
|
|
122
|
+
corresponding no-redirection address was. Note, this is only set for
|
|
123
|
+
wrap-style redirects, not for replace-style ones. */
|
|
124
|
+
/* 560 */ ULong guest_NRADDR;
|
|
125
|
+
|
|
126
|
+
/* Fallback LL/SC support. */
|
|
127
|
+
/* 568 */ ULong guest_LLSC_SIZE; /* 0==no transaction, else 4 or 8. */
|
|
128
|
+
/* 576 */ ULong guest_LLSC_ADDR; /* Address of the transaction. */
|
|
129
|
+
/* 584 */ ULong guest_LLSC_DATA; /* Original value at ADDR, sign-extended. */
|
|
130
|
+
|
|
131
|
+
/* Padding to 16 bytes. */
|
|
132
|
+
/* 592 */
|
|
133
|
+
} VexGuestRISCV64State;
|
|
134
|
+
|
|
135
|
+
/*------------------------------------------------------------*/
|
|
136
|
+
/*--- Utility functions for riscv64 guest stuff. ---*/
|
|
137
|
+
/*------------------------------------------------------------*/
|
|
138
|
+
|
|
139
|
+
/* ALL THE FOLLOWING ARE VISIBLE TO LIBRARY CLIENT */
|
|
140
|
+
|
|
141
|
+
/* Initialise all guest riscv64 state. */
|
|
142
|
+
void LibVEX_GuestRISCV64_initialise(/*OUT*/ VexGuestRISCV64State* vex_state);
|
|
143
|
+
|
|
144
|
+
#endif /* ndef __LIBVEX_PUB_GUEST_RISCV64_H */
|
|
145
|
+
|
|
146
|
+
/*--------------------------------------------------------------------*/
|
|
147
|
+
/*--- libvex_guest_riscv64.h ---*/
|
|
148
|
+
/*--------------------------------------------------------------------*/
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/* -*- mode: C; c-basic-offset: 3; -*- */
|
|
2
|
+
|
|
3
|
+
/*---------------------------------------------------------------*/
|
|
4
|
+
/*--- begin libvex_guest_s390x.h ---*/
|
|
5
|
+
/*---------------------------------------------------------------*/
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
This file is part of Valgrind, a dynamic binary instrumentation
|
|
9
|
+
framework.
|
|
10
|
+
|
|
11
|
+
Copyright IBM Corp. 2010-2017
|
|
12
|
+
|
|
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.
|
|
17
|
+
|
|
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.
|
|
22
|
+
|
|
23
|
+
You should have received a copy of the GNU General Public License
|
|
24
|
+
along with this program; if not, write to the Free Software
|
|
25
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
26
|
+
02110-1301, USA.
|
|
27
|
+
|
|
28
|
+
The GNU General Public License is contained in the file COPYING.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
#ifndef __LIBVEX_PUB_GUEST_S390X_H
|
|
32
|
+
#define __LIBVEX_PUB_GUEST_S390X_H
|
|
33
|
+
|
|
34
|
+
#include "libvex_basictypes.h"
|
|
35
|
+
|
|
36
|
+
/*------------------------------------------------------------*/
|
|
37
|
+
/*--- Vex's representation of the s390 CPU state. ---*/
|
|
38
|
+
/*------------------------------------------------------------*/
|
|
39
|
+
|
|
40
|
+
typedef struct {
|
|
41
|
+
|
|
42
|
+
/*------------------------------------------------------------*/
|
|
43
|
+
/*--- ar registers ---*/
|
|
44
|
+
/*------------------------------------------------------------*/
|
|
45
|
+
|
|
46
|
+
/* 0 */ UInt guest_a0;
|
|
47
|
+
/* 4 */ UInt guest_a1;
|
|
48
|
+
/* 8 */ UInt guest_a2;
|
|
49
|
+
/* 12 */ UInt guest_a3;
|
|
50
|
+
/* 16 */ UInt guest_a4;
|
|
51
|
+
/* 20 */ UInt guest_a5;
|
|
52
|
+
/* 24 */ UInt guest_a6;
|
|
53
|
+
/* 28 */ UInt guest_a7;
|
|
54
|
+
/* 32 */ UInt guest_a8;
|
|
55
|
+
/* 36 */ UInt guest_a9;
|
|
56
|
+
/* 40 */ UInt guest_a10;
|
|
57
|
+
/* 44 */ UInt guest_a11;
|
|
58
|
+
/* 48 */ UInt guest_a12;
|
|
59
|
+
/* 52 */ UInt guest_a13;
|
|
60
|
+
/* 56 */ UInt guest_a14;
|
|
61
|
+
/* 60 */ UInt guest_a15;
|
|
62
|
+
|
|
63
|
+
/*------------------------------------------------------------*/
|
|
64
|
+
/*--- fpr & vr registers ---*/
|
|
65
|
+
/*------------------------------------------------------------*/
|
|
66
|
+
|
|
67
|
+
/*
|
|
68
|
+
FPRs[0-15] are mapped to the first double words of VR's[0-15].
|
|
69
|
+
According to documentation if we modify fpr1 with FP insn then the content of vr1's 64..128
|
|
70
|
+
bits is unpredictable. If we modify 64..128 of vr1 then fpr1's value is unpredictable too.
|
|
71
|
+
In our implementation writing to one half of vr doesn't affect another part but
|
|
72
|
+
apllications shouldn't rely on it.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
/* 64 */ V128 guest_v0;
|
|
76
|
+
/* 80 */ V128 guest_v1;
|
|
77
|
+
/* 96 */ V128 guest_v2;
|
|
78
|
+
/* 112 */ V128 guest_v3;
|
|
79
|
+
/* 128 */ V128 guest_v4;
|
|
80
|
+
/* 144 */ V128 guest_v5;
|
|
81
|
+
/* 160 */ V128 guest_v6;
|
|
82
|
+
/* 176 */ V128 guest_v7;
|
|
83
|
+
/* 192 */ V128 guest_v8;
|
|
84
|
+
/* 208 */ V128 guest_v9;
|
|
85
|
+
/* 224 */ V128 guest_v10;
|
|
86
|
+
/* 240 */ V128 guest_v11;
|
|
87
|
+
/* 256 */ V128 guest_v12;
|
|
88
|
+
/* 272 */ V128 guest_v13;
|
|
89
|
+
/* 288 */ V128 guest_v14;
|
|
90
|
+
/* 304 */ V128 guest_v15;
|
|
91
|
+
/* 320 */ V128 guest_v16;
|
|
92
|
+
/* 336 */ V128 guest_v17;
|
|
93
|
+
/* 352 */ V128 guest_v18;
|
|
94
|
+
/* 368 */ V128 guest_v19;
|
|
95
|
+
/* 384 */ V128 guest_v20;
|
|
96
|
+
/* 400 */ V128 guest_v21;
|
|
97
|
+
/* 416 */ V128 guest_v22;
|
|
98
|
+
/* 432 */ V128 guest_v23;
|
|
99
|
+
/* 448 */ V128 guest_v24;
|
|
100
|
+
/* 464 */ V128 guest_v25;
|
|
101
|
+
/* 480 */ V128 guest_v26;
|
|
102
|
+
/* 496 */ V128 guest_v27;
|
|
103
|
+
/* 512 */ V128 guest_v28;
|
|
104
|
+
/* 528 */ V128 guest_v29;
|
|
105
|
+
/* 544 */ V128 guest_v30;
|
|
106
|
+
/* 560 */ V128 guest_v31;
|
|
107
|
+
|
|
108
|
+
/*------------------------------------------------------------*/
|
|
109
|
+
/*--- gpr registers ---*/
|
|
110
|
+
/*------------------------------------------------------------*/
|
|
111
|
+
|
|
112
|
+
/* 568 */ ULong guest_r0;
|
|
113
|
+
/* 576 */ ULong guest_r1;
|
|
114
|
+
/* 584 */ ULong guest_r2;
|
|
115
|
+
/* 592 */ ULong guest_r3;
|
|
116
|
+
/* 600 */ ULong guest_r4;
|
|
117
|
+
/* 608 */ ULong guest_r5;
|
|
118
|
+
/* 616 */ ULong guest_r6;
|
|
119
|
+
/* 624 */ ULong guest_r7;
|
|
120
|
+
/* 632 */ ULong guest_r8;
|
|
121
|
+
/* 640 */ ULong guest_r9;
|
|
122
|
+
/* 648 */ ULong guest_r10;
|
|
123
|
+
/* 656 */ ULong guest_r11;
|
|
124
|
+
/* 664 */ ULong guest_r12;
|
|
125
|
+
/* 672 */ ULong guest_r13;
|
|
126
|
+
/* 680 */ ULong guest_r14;
|
|
127
|
+
/* 688 */ ULong guest_r15;
|
|
128
|
+
|
|
129
|
+
/*------------------------------------------------------------*/
|
|
130
|
+
/*--- S390 miscellaneous registers ---*/
|
|
131
|
+
/*------------------------------------------------------------*/
|
|
132
|
+
|
|
133
|
+
/* 696 */ ULong guest_counter;
|
|
134
|
+
/* 704 */ UInt guest_fpc;
|
|
135
|
+
/* 708 */ UChar unused[4]; /* 4-byte hole to get 8-byte alignment */
|
|
136
|
+
/* 712 */ ULong guest_IA;
|
|
137
|
+
|
|
138
|
+
/*------------------------------------------------------------*/
|
|
139
|
+
/*--- S390 pseudo registers ---*/
|
|
140
|
+
/*------------------------------------------------------------*/
|
|
141
|
+
|
|
142
|
+
/* 720 */ ULong guest_SYSNO;
|
|
143
|
+
|
|
144
|
+
/*------------------------------------------------------------*/
|
|
145
|
+
/*--- 4-word thunk used to calculate the condition code ---*/
|
|
146
|
+
/*------------------------------------------------------------*/
|
|
147
|
+
|
|
148
|
+
/* 728 */ ULong guest_CC_OP;
|
|
149
|
+
/* 736 */ ULong guest_CC_DEP1;
|
|
150
|
+
/* 744 */ ULong guest_CC_DEP2;
|
|
151
|
+
/* 752 */ ULong guest_CC_NDEP;
|
|
152
|
+
|
|
153
|
+
/*------------------------------------------------------------*/
|
|
154
|
+
/*--- Pseudo registers. Required by all architectures ---*/
|
|
155
|
+
/*------------------------------------------------------------*/
|
|
156
|
+
|
|
157
|
+
/* See comments at bottom of libvex.h */
|
|
158
|
+
/* 760 */ ULong guest_NRADDR;
|
|
159
|
+
/* 768 */ ULong guest_CMSTART;
|
|
160
|
+
/* 776 */ ULong guest_CMLEN;
|
|
161
|
+
|
|
162
|
+
/* Used when backing up to restart a syscall that has
|
|
163
|
+
been interrupted by a signal. See also comment in
|
|
164
|
+
libvex_ir.h */
|
|
165
|
+
/* 784 */ ULong guest_IP_AT_SYSCALL;
|
|
166
|
+
|
|
167
|
+
/* Emulation notes; see comments in libvex_emnote.h */
|
|
168
|
+
/* 792 */ UInt guest_EMNOTE;
|
|
169
|
+
|
|
170
|
+
/* For translation chaining */
|
|
171
|
+
/* 796 */ UInt host_EvC_COUNTER;
|
|
172
|
+
/* 800 */ ULong host_EvC_FAILADDR;
|
|
173
|
+
|
|
174
|
+
/*------------------------------------------------------------*/
|
|
175
|
+
/*--- Force alignment to 16 bytes ---*/
|
|
176
|
+
/*------------------------------------------------------------*/
|
|
177
|
+
/* 808 */ UChar padding[0];
|
|
178
|
+
|
|
179
|
+
/* 816 */ /* This is the size of the guest state */
|
|
180
|
+
} VexGuestS390XState;
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
/*------------------------------------------------------------*/
|
|
184
|
+
/*--- Function prototypes ---*/
|
|
185
|
+
/*------------------------------------------------------------*/
|
|
186
|
+
|
|
187
|
+
void LibVEX_GuestS390X_initialise(VexGuestS390XState *);
|
|
188
|
+
|
|
189
|
+
/*------------------------------------------------------------*/
|
|
190
|
+
/*--- Dedicated registers ---*/
|
|
191
|
+
/*------------------------------------------------------------*/
|
|
192
|
+
|
|
193
|
+
#define guest_LR guest_r14 /* Link register */
|
|
194
|
+
#define guest_SP guest_r15 /* Stack pointer */
|
|
195
|
+
#define guest_FP guest_r11 /* Frame pointer */
|
|
196
|
+
|
|
197
|
+
/*---------------------------------------------------------------*/
|
|
198
|
+
/*--- end libvex_guest_s390x.h ---*/
|
|
199
|
+
/*---------------------------------------------------------------*/
|
|
200
|
+
|
|
201
|
+
#endif /* __LIBVEX_PUB_GUEST_S390X_H */
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
|
|
2
|
+
/*---------------------------------------------------------------*/
|
|
3
|
+
/*--- begin libvex_guest_tilegx.h ---*/
|
|
4
|
+
/*---------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
This file is part of Valgrind, a dynamic binary instrumentation
|
|
8
|
+
framework.
|
|
9
|
+
|
|
10
|
+
Copyright (C) 2010-2015 Tilera Corp.
|
|
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., 59 Temple Place, Suite 330, Boston, MA
|
|
25
|
+
02111-1307, USA.
|
|
26
|
+
|
|
27
|
+
The GNU General Public License is contained in the file COPYING.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/* Contributed by Zhi-Gang Liu <zliu at tilera dot com> */
|
|
31
|
+
|
|
32
|
+
#ifndef __LIBVEX_PUB_GUEST_TILEGX_H
|
|
33
|
+
#define __LIBVEX_PUB_GUEST_TILEGX_H
|
|
34
|
+
|
|
35
|
+
#include "libvex_basictypes.h"
|
|
36
|
+
#include "libvex_emnote.h"
|
|
37
|
+
|
|
38
|
+
#undef TILEGX_DEBUG
|
|
39
|
+
|
|
40
|
+
/*---------------------------------------------------------------*/
|
|
41
|
+
/*--- Vex's representation of the tilegx CPU state. ---*/
|
|
42
|
+
/*---------------------------------------------------------------*/
|
|
43
|
+
|
|
44
|
+
typedef ULong ULONG;
|
|
45
|
+
|
|
46
|
+
typedef
|
|
47
|
+
struct {
|
|
48
|
+
/* CPU Registers */
|
|
49
|
+
/* 0 */ ULONG guest_r0;
|
|
50
|
+
/* 8 */ ULONG guest_r1;
|
|
51
|
+
/* 16 */ ULONG guest_r2;
|
|
52
|
+
/* 24 */ ULONG guest_r3;
|
|
53
|
+
/* 32 */ ULONG guest_r4;
|
|
54
|
+
/* 40 */ ULONG guest_r5;
|
|
55
|
+
/* 48 */ ULONG guest_r6;
|
|
56
|
+
/* 56 */ ULONG guest_r7;
|
|
57
|
+
/* 64 */ ULONG guest_r8;
|
|
58
|
+
/* 72 */ ULONG guest_r9;
|
|
59
|
+
/* 80 */ ULONG guest_r10;
|
|
60
|
+
/* 88 */ ULONG guest_r11;
|
|
61
|
+
/* 96 */ ULONG guest_r12;
|
|
62
|
+
/* 104 */ ULONG guest_r13;
|
|
63
|
+
/* 112 */ ULONG guest_r14;
|
|
64
|
+
/* 120 */ ULONG guest_r15;
|
|
65
|
+
/* 128 */ ULONG guest_r16;
|
|
66
|
+
/* 136 */ ULONG guest_r17;
|
|
67
|
+
/* 144 */ ULONG guest_r18;
|
|
68
|
+
/* 152 */ ULONG guest_r19;
|
|
69
|
+
/* 160 */ ULONG guest_r20;
|
|
70
|
+
/* 168 */ ULONG guest_r21;
|
|
71
|
+
/* 176 */ ULONG guest_r22;
|
|
72
|
+
/* 184 */ ULONG guest_r23;
|
|
73
|
+
/* 192 */ ULONG guest_r24;
|
|
74
|
+
/* 200 */ ULONG guest_r25;
|
|
75
|
+
/* 208 */ ULONG guest_r26;
|
|
76
|
+
/* 216 */ ULONG guest_r27;
|
|
77
|
+
/* 224 */ ULONG guest_r28;
|
|
78
|
+
/* 232 */ ULONG guest_r29;
|
|
79
|
+
/* 240 */ ULONG guest_r30;
|
|
80
|
+
/* 248 */ ULONG guest_r31;
|
|
81
|
+
/* 256 */ ULONG guest_r32;
|
|
82
|
+
/* 264 */ ULONG guest_r33;
|
|
83
|
+
/* 272 */ ULONG guest_r34;
|
|
84
|
+
/* 280 */ ULONG guest_r35;
|
|
85
|
+
/* 288 */ ULONG guest_r36;
|
|
86
|
+
/* 296 */ ULONG guest_r37;
|
|
87
|
+
/* 304 */ ULONG guest_r38;
|
|
88
|
+
/* 312 */ ULONG guest_r39;
|
|
89
|
+
/* 320 */ ULONG guest_r40;
|
|
90
|
+
/* 328 */ ULONG guest_r41;
|
|
91
|
+
/* 336 */ ULONG guest_r42;
|
|
92
|
+
/* 344 */ ULONG guest_r43;
|
|
93
|
+
/* 352 */ ULONG guest_r44;
|
|
94
|
+
/* 360 */ ULONG guest_r45;
|
|
95
|
+
/* 368 */ ULONG guest_r46;
|
|
96
|
+
/* 376 */ ULONG guest_r47;
|
|
97
|
+
/* 384 */ ULONG guest_r48;
|
|
98
|
+
/* 392 */ ULONG guest_r49;
|
|
99
|
+
/* 400 */ ULONG guest_r50;
|
|
100
|
+
/* 408 */ ULONG guest_r51;
|
|
101
|
+
/* 416 */ ULONG guest_r52; /* FP */
|
|
102
|
+
/* 424 */ ULONG guest_r53;
|
|
103
|
+
/* 432 */ ULONG guest_r54; /* SP */
|
|
104
|
+
/* 440 */ ULONG guest_r55; /* LR */
|
|
105
|
+
/* 448 */ ULONG guest_r56; /* zero */
|
|
106
|
+
/* 456 */ ULONG guest_r57; /* Reserved */
|
|
107
|
+
/* 464 */ ULONG guest_r58; /* Reserved */
|
|
108
|
+
/* 472 */ ULONG guest_r59; /* Reserved */
|
|
109
|
+
/* 480 */ ULONG guest_r60; /* Reserved */
|
|
110
|
+
/* 488 */ ULONG guest_r61; /* Reserved */
|
|
111
|
+
/* 496 */ ULONG guest_r62; /* Reserved */
|
|
112
|
+
/* 504 */ ULONG guest_r63; /* Reserved */
|
|
113
|
+
/* 512 */ ULONG guest_pc;
|
|
114
|
+
/* 520 */ ULONG guest_spare; /* Reserved */
|
|
115
|
+
/* 528 */ ULONG guest_EMNOTE;
|
|
116
|
+
/* 536 */ ULONG guest_CMSTART;
|
|
117
|
+
/* 544 */ ULONG guest_CMLEN;
|
|
118
|
+
/* 552 */ ULONG guest_NRADDR;
|
|
119
|
+
/* 560 */ ULong guest_cmpexch;
|
|
120
|
+
/* 568 */ ULong guest_zero;
|
|
121
|
+
/* 576 */ ULong guest_ex_context_0;
|
|
122
|
+
/* 584 */ ULong guest_ex_context_1;
|
|
123
|
+
/* 592 */ ULong host_EvC_FAILADDR;
|
|
124
|
+
/* 600 */ ULong host_EvC_COUNTER;
|
|
125
|
+
/* 608 */ ULong guest_COND;
|
|
126
|
+
/* 616 */ ULong PAD;
|
|
127
|
+
|
|
128
|
+
} VexGuestTILEGXState;
|
|
129
|
+
|
|
130
|
+
#define OFFSET_tilegx_r(_N) (8 * (_N))
|
|
131
|
+
|
|
132
|
+
/*---------------------------------------------------------------*/
|
|
133
|
+
/*--- Utility functions for TILEGX guest stuff. ---*/
|
|
134
|
+
/*---------------------------------------------------------------*/
|
|
135
|
+
|
|
136
|
+
/* ALL THE FOLLOWING ARE VISIBLE TO LIBRARY CLIENT */
|
|
137
|
+
|
|
138
|
+
/* Initialise all guest TILEGX state. */
|
|
139
|
+
|
|
140
|
+
extern
|
|
141
|
+
void LibVEX_GuestTILEGX_initialise ( /*OUT*/VexGuestTILEGXState* vex_state );
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
#endif /* __LIBVEX_PUB_GUEST_TILEGX_H */
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
/*---------------------------------------------------------------*/
|
|
148
|
+
/*--- libvex_guest_tilegx.h ---*/
|
|
149
|
+
/*---------------------------------------------------------------*/
|