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.
Files changed (60) hide show
  1. pyvex/__init__.py +92 -0
  2. pyvex/_register_info.py +1800 -0
  3. pyvex/arches.py +94 -0
  4. pyvex/block.py +697 -0
  5. pyvex/const.py +426 -0
  6. pyvex/const_val.py +26 -0
  7. pyvex/data_ref.py +55 -0
  8. pyvex/enums.py +156 -0
  9. pyvex/errors.py +31 -0
  10. pyvex/expr.py +974 -0
  11. pyvex/include/libvex.h +1029 -0
  12. pyvex/include/libvex_basictypes.h +236 -0
  13. pyvex/include/libvex_emnote.h +142 -0
  14. pyvex/include/libvex_guest_amd64.h +252 -0
  15. pyvex/include/libvex_guest_arm.h +224 -0
  16. pyvex/include/libvex_guest_arm64.h +203 -0
  17. pyvex/include/libvex_guest_mips32.h +175 -0
  18. pyvex/include/libvex_guest_mips64.h +173 -0
  19. pyvex/include/libvex_guest_offsets.h +941 -0
  20. pyvex/include/libvex_guest_ppc32.h +298 -0
  21. pyvex/include/libvex_guest_ppc64.h +343 -0
  22. pyvex/include/libvex_guest_riscv64.h +148 -0
  23. pyvex/include/libvex_guest_s390x.h +201 -0
  24. pyvex/include/libvex_guest_tilegx.h +149 -0
  25. pyvex/include/libvex_guest_x86.h +322 -0
  26. pyvex/include/libvex_ir.h +3113 -0
  27. pyvex/include/libvex_s390x_common.h +123 -0
  28. pyvex/include/libvex_trc_values.h +99 -0
  29. pyvex/include/pyvex.h +96 -0
  30. pyvex/lib/pyvex.dll +0 -0
  31. pyvex/lib/pyvex.lib +0 -0
  32. pyvex/lifting/__init__.py +18 -0
  33. pyvex/lifting/gym/README.md +7 -0
  34. pyvex/lifting/gym/__init__.py +5 -0
  35. pyvex/lifting/gym/aarch64_spotter.py +40 -0
  36. pyvex/lifting/gym/arm_spotter.py +427 -0
  37. pyvex/lifting/gym/x86_spotter.py +129 -0
  38. pyvex/lifting/libvex.py +117 -0
  39. pyvex/lifting/lift_function.py +304 -0
  40. pyvex/lifting/lifter.py +124 -0
  41. pyvex/lifting/post_processor.py +16 -0
  42. pyvex/lifting/util/__init__.py +14 -0
  43. pyvex/lifting/util/instr_helper.py +422 -0
  44. pyvex/lifting/util/lifter_helper.py +154 -0
  45. pyvex/lifting/util/syntax_wrapper.py +312 -0
  46. pyvex/lifting/util/vex_helper.py +301 -0
  47. pyvex/lifting/zerodivision.py +71 -0
  48. pyvex/native.py +63 -0
  49. pyvex/py.typed +1 -0
  50. pyvex/stmt.py +740 -0
  51. pyvex/types.py +48 -0
  52. pyvex/utils.py +63 -0
  53. pyvex/vex_ffi.py +1452 -0
  54. pyvex-9.2.189.dist-info/METADATA +181 -0
  55. pyvex-9.2.189.dist-info/RECORD +60 -0
  56. pyvex-9.2.189.dist-info/WHEEL +5 -0
  57. pyvex-9.2.189.dist-info/licenses/LICENSE +24 -0
  58. pyvex-9.2.189.dist-info/licenses/pyvex_c/LICENSE +339 -0
  59. pyvex-9.2.189.dist-info/licenses/vex/LICENSE.GPL +340 -0
  60. pyvex-9.2.189.dist-info/licenses/vex/LICENSE.README +23 -0
@@ -0,0 +1,224 @@
1
+
2
+ /*---------------------------------------------------------------*/
3
+ /*--- begin libvex_guest_arm.h ---*/
4
+ /*---------------------------------------------------------------*/
5
+
6
+ /*
7
+ This file is part of Valgrind, a dynamic binary instrumentation
8
+ framework.
9
+
10
+ Copyright (C) 2004-2015 OpenWorks LLP
11
+ info@open-works.net
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_ARM_H
32
+ #define __LIBVEX_PUB_GUEST_ARM_H
33
+
34
+ #include "libvex_basictypes.h"
35
+
36
+
37
+ /*---------------------------------------------------------------*/
38
+ /*--- Vex's representation of the ARM CPU state. ---*/
39
+ /*---------------------------------------------------------------*/
40
+
41
+ typedef
42
+ struct {
43
+ /* 0 */
44
+ /* Event check fail addr and counter. */
45
+ UInt host_EvC_FAILADDR; /* 0 */
46
+ UInt host_EvC_COUNTER; /* 4 */
47
+ UInt guest_R0;
48
+ UInt guest_R1;
49
+ UInt guest_R2;
50
+ UInt guest_R3;
51
+ UInt guest_R4;
52
+ UInt guest_R5;
53
+ UInt guest_R6;
54
+ UInt guest_R7;
55
+ UInt guest_R8;
56
+ UInt guest_R9;
57
+ UInt guest_R10;
58
+ UInt guest_R11;
59
+ UInt guest_R12;
60
+ UInt guest_R13; /* stack pointer */
61
+ UInt guest_R14; /* link register */
62
+ UInt guest_R15T;
63
+ /* program counter[31:1] ++ [T], encoding both the current
64
+ instruction address and the ARM vs Thumb state of the
65
+ machine. T==1 is Thumb, T==0 is ARM. Hence values of the
66
+ form X--(31)--X1 denote a Thumb instruction at location
67
+ X--(31)--X0, values of the form X--(30)--X00 denote an ARM
68
+ instruction at precisely that address, and values of the form
69
+ X--(30)--10 are invalid since they would imply an ARM
70
+ instruction at a non-4-aligned address. */
71
+
72
+ /* 4-word thunk used to calculate N(sign) Z(zero) C(carry,
73
+ unsigned overflow) and V(signed overflow) flags. */
74
+ /* 72 */
75
+ UInt guest_CC_OP;
76
+ UInt guest_CC_DEP1;
77
+ UInt guest_CC_DEP2;
78
+ UInt guest_CC_NDEP;
79
+
80
+ /* A 32-bit value which is used to compute the APSR.Q (sticky
81
+ saturation) flag, when necessary. If the value stored here
82
+ is zero, APSR.Q is currently zero. If it is any other value,
83
+ APSR.Q is currently one. */
84
+ UInt guest_QFLAG32;
85
+
86
+ /* 32-bit values to represent APSR.GE0 .. GE3. Same
87
+ zero-vs-nonzero scheme as for QFLAG32. */
88
+ UInt guest_GEFLAG0;
89
+ UInt guest_GEFLAG1;
90
+ UInt guest_GEFLAG2;
91
+ UInt guest_GEFLAG3;
92
+
93
+ /* Various pseudo-regs mandated by Vex or Valgrind. */
94
+ /* Emulation notes */
95
+ UInt guest_EMNOTE;
96
+
97
+ /* For clinval/clflush: record start and length of area */
98
+ UInt guest_CMSTART;
99
+ UInt guest_CMLEN;
100
+
101
+ /* Used to record the unredirected guest address at the start of
102
+ a translation whose start has been redirected. By reading
103
+ this pseudo-register shortly afterwards, the translation can
104
+ find out what the corresponding no-redirection address was.
105
+ Note, this is only set for wrap-style redirects, not for
106
+ replace-style ones. */
107
+ UInt guest_NRADDR;
108
+
109
+ /* Needed for Darwin (but mandated for all guest architectures):
110
+ program counter at the last syscall insn (int 0x80/81/82,
111
+ sysenter, syscall, svc). Used when backing up to restart a
112
+ syscall that has been interrupted by a signal. */
113
+ /* 124 */
114
+ UInt guest_IP_AT_SYSCALL;
115
+
116
+ /* VFP state. D0 .. D15 must be 8-aligned. */
117
+ /* 128 */
118
+ ULong guest_D0;
119
+ ULong guest_D1;
120
+ ULong guest_D2;
121
+ ULong guest_D3;
122
+ ULong guest_D4;
123
+ ULong guest_D5;
124
+ ULong guest_D6;
125
+ ULong guest_D7;
126
+ ULong guest_D8;
127
+ ULong guest_D9;
128
+ ULong guest_D10;
129
+ ULong guest_D11;
130
+ ULong guest_D12;
131
+ ULong guest_D13;
132
+ ULong guest_D14;
133
+ ULong guest_D15;
134
+ ULong guest_D16;
135
+ ULong guest_D17;
136
+ ULong guest_D18;
137
+ ULong guest_D19;
138
+ ULong guest_D20;
139
+ ULong guest_D21;
140
+ ULong guest_D22;
141
+ ULong guest_D23;
142
+ ULong guest_D24;
143
+ ULong guest_D25;
144
+ ULong guest_D26;
145
+ ULong guest_D27;
146
+ ULong guest_D28;
147
+ ULong guest_D29;
148
+ ULong guest_D30;
149
+ ULong guest_D31;
150
+ UInt guest_FPSCR;
151
+
152
+ /* Not a town in Cornwall, but instead the TPIDRURO, on of the
153
+ Thread ID registers present in CP15 (the system control
154
+ coprocessor), register set "c13", register 3 (the User
155
+ Read-only Thread ID Register). arm-linux apparently uses it
156
+ to hold the TLS pointer for the thread. It's read-only in
157
+ user space. On Linux it is set in user space by various
158
+ thread-related syscalls. */
159
+ UInt guest_TPIDRURO;
160
+
161
+ /* Representation of the Thumb IT state. ITSTATE is a 32-bit
162
+ value with 4 8-bit lanes. [7:0] pertain to the next insn to
163
+ execute, [15:8] for the one after that, etc. The per-insn
164
+ update to ITSTATE is to unsignedly shift it right 8 bits,
165
+ hence introducing a zero byte for the furthest ahead
166
+ instruction. As per the next para, a zero byte denotes the
167
+ condition ALWAYS.
168
+
169
+ Each byte lane has one of the two following formats:
170
+
171
+ cccc 0001 for an insn which is part of an IT block. cccc is
172
+ the guarding condition (standard ARM condition
173
+ code) XORd with 0xE, so as to cause 'cccc == 0'
174
+ to encode the condition ALWAYS.
175
+
176
+ 0000 0000 for an insn which is not part of an IT block.
177
+
178
+ If the bottom 4 bits are zero then the top 4 must be too.
179
+
180
+ Given the byte lane for an instruction, the guarding
181
+ condition for the instruction is (((lane >> 4) & 0xF) ^ 0xE).
182
+ This is not as stupid as it sounds, because the front end
183
+ elides the shift. And the am-I-in-an-IT-block check is
184
+ (lane != 0).
185
+
186
+ In the case where (by whatever means) we know at JIT time
187
+ that an instruction is not in an IT block, we can prefix its
188
+ IR with assignments ITSTATE = 0 and hence have iropt fold out
189
+ the testing code.
190
+
191
+ The condition "is outside or last in IT block" corresponds
192
+ to the top 24 bits of ITSTATE being zero.
193
+ */
194
+ UInt guest_ITSTATE;
195
+
196
+ /* Padding to make it have an 16-aligned size */
197
+ UInt padding1;
198
+ }
199
+ VexGuestARMState;
200
+
201
+
202
+ /*---------------------------------------------------------------*/
203
+ /*--- Utility functions for ARM guest stuff. ---*/
204
+ /*---------------------------------------------------------------*/
205
+
206
+ /* ALL THE FOLLOWING ARE VISIBLE TO LIBRARY CLIENT */
207
+
208
+ /* Initialise all guest ARM state. */
209
+
210
+ extern
211
+ void LibVEX_GuestARM_initialise ( /*OUT*/VexGuestARMState* vex_state );
212
+
213
+ /* Calculate the ARM flag state from the saved data. */
214
+
215
+ extern
216
+ UInt LibVEX_GuestARM_get_cpsr ( /*IN*/const VexGuestARMState* vex_state );
217
+
218
+
219
+ #endif /* ndef __LIBVEX_PUB_GUEST_ARM_H */
220
+
221
+
222
+ /*---------------------------------------------------------------*/
223
+ /*--- libvex_guest_arm.h ---*/
224
+ /*---------------------------------------------------------------*/
@@ -0,0 +1,203 @@
1
+
2
+ /*---------------------------------------------------------------*/
3
+ /*--- begin libvex_guest_arm64.h ---*/
4
+ /*---------------------------------------------------------------*/
5
+
6
+ /*
7
+ This file is part of Valgrind, a dynamic binary instrumentation
8
+ framework.
9
+
10
+ Copyright (C) 2013-2015 OpenWorks
11
+ info@open-works.net
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_ARM64_H
32
+ #define __LIBVEX_PUB_GUEST_ARM64_H
33
+
34
+ #include "libvex_basictypes.h"
35
+
36
+
37
+ /*---------------------------------------------------------------*/
38
+ /*--- Vex's representation of the ARM64 CPU state. ---*/
39
+ /*---------------------------------------------------------------*/
40
+
41
+ typedef
42
+ struct {
43
+ /* Event check fail addr and counter. */
44
+ /* 0 */ ULong host_EvC_FAILADDR;
45
+ /* 8 */ UInt host_EvC_COUNTER;
46
+ /* 12 */ UInt pad0;
47
+ /* 16 */
48
+ ULong guest_X0;
49
+ ULong guest_X1;
50
+ ULong guest_X2;
51
+ ULong guest_X3;
52
+ ULong guest_X4;
53
+ ULong guest_X5;
54
+ ULong guest_X6;
55
+ ULong guest_X7;
56
+ ULong guest_X8;
57
+ ULong guest_X9;
58
+ ULong guest_X10;
59
+ ULong guest_X11;
60
+ ULong guest_X12;
61
+ ULong guest_X13;
62
+ ULong guest_X14;
63
+ ULong guest_X15;
64
+ ULong guest_X16;
65
+ ULong guest_X17;
66
+ ULong guest_X18;
67
+ ULong guest_X19;
68
+ ULong guest_X20;
69
+ ULong guest_X21;
70
+ ULong guest_X22;
71
+ ULong guest_X23;
72
+ ULong guest_X24;
73
+ ULong guest_X25;
74
+ ULong guest_X26;
75
+ ULong guest_X27;
76
+ ULong guest_X28;
77
+ ULong guest_X29;
78
+ ULong guest_X30; /* link register */
79
+ ULong guest_XSP;
80
+ ULong guest_PC;
81
+
82
+ /* 4-word thunk used to calculate N(sign) Z(zero) C(carry,
83
+ unsigned overflow) and V(signed overflow) flags. */
84
+ ULong guest_CC_OP;
85
+ ULong guest_CC_DEP1;
86
+ ULong guest_CC_DEP2;
87
+ ULong guest_CC_NDEP;
88
+
89
+ /* User-space thread register? */
90
+ ULong guest_TPIDR_EL0;
91
+
92
+ /* FP/SIMD state */
93
+ U128 guest_Q0;
94
+ U128 guest_Q1;
95
+ U128 guest_Q2;
96
+ U128 guest_Q3;
97
+ U128 guest_Q4;
98
+ U128 guest_Q5;
99
+ U128 guest_Q6;
100
+ U128 guest_Q7;
101
+ U128 guest_Q8;
102
+ U128 guest_Q9;
103
+ U128 guest_Q10;
104
+ U128 guest_Q11;
105
+ U128 guest_Q12;
106
+ U128 guest_Q13;
107
+ U128 guest_Q14;
108
+ U128 guest_Q15;
109
+ U128 guest_Q16;
110
+ U128 guest_Q17;
111
+ U128 guest_Q18;
112
+ U128 guest_Q19;
113
+ U128 guest_Q20;
114
+ U128 guest_Q21;
115
+ U128 guest_Q22;
116
+ U128 guest_Q23;
117
+ U128 guest_Q24;
118
+ U128 guest_Q25;
119
+ U128 guest_Q26;
120
+ U128 guest_Q27;
121
+ U128 guest_Q28;
122
+ U128 guest_Q29;
123
+ U128 guest_Q30;
124
+ U128 guest_Q31;
125
+
126
+ /* A 128-bit value which is used to represent the FPSR.QC (sticky
127
+ saturation) flag, when necessary. If the value stored here
128
+ is zero, FPSR.QC is currently zero. If it is any other value,
129
+ FPSR.QC is currently one. We don't currently represent any
130
+ other bits of FPSR, so this is all that that is for FPSR. */
131
+ U128 guest_QCFLAG;
132
+
133
+ /* Various pseudo-regs mandated by Vex or Valgrind. */
134
+ /* Emulation notes */
135
+ UInt guest_EMNOTE;
136
+
137
+ /* For clflush/clinval: record start and length of area */
138
+ ULong guest_CMSTART;
139
+ ULong guest_CMLEN;
140
+
141
+ /* Used to record the unredirected guest address at the start of
142
+ a translation whose start has been redirected. By reading
143
+ this pseudo-register shortly afterwards, the translation can
144
+ find out what the corresponding no-redirection address was.
145
+ Note, this is only set for wrap-style redirects, not for
146
+ replace-style ones. */
147
+ ULong guest_NRADDR;
148
+
149
+ /* Needed for Darwin (but mandated for all guest architectures):
150
+ program counter at the last syscall insn (int 0x80/81/82,
151
+ sysenter, syscall, svc). Used when backing up to restart a
152
+ syscall that has been interrupted by a signal. */
153
+ ULong guest_IP_AT_SYSCALL;
154
+
155
+ /* The complete FPCR. Default value seems to be zero. We
156
+ ignore all bits except 23 and 22, which are the rounding
157
+ mode. The guest is unconstrained in what values it can write
158
+ to and read from this register, but the emulation only takes
159
+ note of bits 23 and 22. */
160
+ UInt guest_FPCR;
161
+
162
+ /* Padding to make it have an 16-aligned size */
163
+ /* UInt pad_end_0; */
164
+ /* ULong pad_end_1; */
165
+ }
166
+ VexGuestARM64State;
167
+
168
+
169
+ /*---------------------------------------------------------------*/
170
+ /*--- Utility functions for ARM64 guest stuff. ---*/
171
+ /*---------------------------------------------------------------*/
172
+
173
+ /* ALL THE FOLLOWING ARE VISIBLE TO LIBRARY CLIENT */
174
+
175
+ /* Initialise all guest ARM64 state. */
176
+
177
+ extern
178
+ void LibVEX_GuestARM64_initialise ( /*OUT*/VexGuestARM64State* vex_state );
179
+
180
+ /* Calculate the ARM64 flag state from the saved data, in the format
181
+ 32x0:n:z:c:v:28x0. */
182
+ extern
183
+ ULong LibVEX_GuestARM64_get_nzcv ( /*IN*/
184
+ const VexGuestARM64State* vex_state );
185
+
186
+ /* Calculate the ARM64 FPSR state from the saved data, in the format
187
+ 36x0:qc:27x0 */
188
+ extern
189
+ ULong LibVEX_GuestARM64_get_fpsr ( /*IN*/
190
+ const VexGuestARM64State* vex_state );
191
+
192
+ /* Set the ARM64 FPSR representation from the given FPSR value. */
193
+ extern
194
+ void LibVEX_GuestARM64_set_fpsr ( /*MOD*/VexGuestARM64State* vex_state,
195
+ ULong fpsr );
196
+
197
+
198
+ #endif /* ndef __LIBVEX_PUB_GUEST_ARM64_H */
199
+
200
+
201
+ /*---------------------------------------------------------------*/
202
+ /*--- libvex_guest_arm64.h ---*/
203
+ /*---------------------------------------------------------------*/
@@ -0,0 +1,175 @@
1
+
2
+ /*---------------------------------------------------------------*/
3
+ /*--- begin libvex_guest_mips32.h ---*/
4
+ /*---------------------------------------------------------------*/
5
+
6
+ /*
7
+ This file is part of Valgrind, a dynamic binary instrumentation
8
+ framework.
9
+
10
+ Copyright (C) 2010-2015 RT-RK
11
+ mips-valgrind@rt-rk.com
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., 59 Temple Place, Suite 330, Boston, MA
26
+ 02111-1307, USA.
27
+
28
+ The GNU General Public License is contained in the file COPYING.
29
+ */
30
+
31
+ #ifndef __LIBVEX_PUB_GUEST_MIPS32_H
32
+ #define __LIBVEX_PUB_GUEST_MIPS32_H
33
+
34
+ #include "libvex_basictypes.h"
35
+
36
+
37
+ /*---------------------------------------------------------------*/
38
+ /*--- Vex's representation of the MIPS32 CPU state. ---*/
39
+ /*---------------------------------------------------------------*/
40
+
41
+ typedef
42
+ struct {
43
+ /* 0 */ UInt host_EvC_FAILADDR;
44
+ /* 4 */ UInt host_EvC_COUNTER;
45
+
46
+ /* CPU Registers */
47
+ /* 8 */ UInt guest_r0; /* Hardwired to 0. */
48
+ /* 12 */ UInt guest_r1; /* Assembler temporary */
49
+ /* 16 */ UInt guest_r2; /* Values for function returns ...*/
50
+ /* 20 */ UInt guest_r3; /* ... and expression evaluation */
51
+ /* 24 */ UInt guest_r4; /* Function arguments */
52
+ /* 28 */ UInt guest_r5;
53
+ /* 32 */ UInt guest_r6;
54
+ /* 36 */ UInt guest_r7;
55
+ /* 40 */ UInt guest_r8; /* Temporaries */
56
+ /* 44 */ UInt guest_r9;
57
+ /* 48 */ UInt guest_r10;
58
+ /* 52 */ UInt guest_r11;
59
+ /* 56 */ UInt guest_r12;
60
+ /* 60 */ UInt guest_r13;
61
+ /* 64 */ UInt guest_r14;
62
+ /* 68 */ UInt guest_r15;
63
+ /* 72 */ UInt guest_r16; /* Saved temporaries */
64
+ /* 76 */ UInt guest_r17;
65
+ /* 80 */ UInt guest_r18;
66
+ /* 84 */ UInt guest_r19;
67
+ /* 88 */ UInt guest_r20;
68
+ /* 92 */ UInt guest_r21;
69
+ /* 96 */ UInt guest_r22;
70
+ /* 100 */ UInt guest_r23;
71
+ /* 104 */ UInt guest_r24; /* Temporaries */
72
+ /* 108 */ UInt guest_r25;
73
+ /* 112 */ UInt guest_r26; /* Reserved for OS kernel */
74
+ /* 116 */ UInt guest_r27;
75
+ /* 120 */ UInt guest_r28; /* Global pointer */
76
+ /* 124 */ UInt guest_r29; /* Stack pointer */
77
+ /* 128 */ UInt guest_r30; /* Frame pointer */
78
+ /* 132 */ UInt guest_r31; /* Return address */
79
+ /* 136 */ UInt guest_PC; /* Program counter */
80
+ /* 140 */ UInt guest_HI; /* Multiply and divide reg higher result */
81
+ /* 144 */ UInt guest_LO; /* Multiply and divide reg lower result */
82
+ /* 148 */ UInt _padding1;
83
+
84
+ /* FPU Registers */
85
+ /* 152 */ ULong guest_f0; /* Floating point general purpose registers */
86
+ /* 160 */ ULong guest_f1;
87
+ /* 168 */ ULong guest_f2;
88
+ /* 176 */ ULong guest_f3;
89
+ /* 184 */ ULong guest_f4;
90
+ /* 192 */ ULong guest_f5;
91
+ /* 200 */ ULong guest_f6;
92
+ /* 208 */ ULong guest_f7;
93
+ /* 216 */ ULong guest_f8;
94
+ /* 224 */ ULong guest_f9;
95
+ /* 232 */ ULong guest_f10;
96
+ /* 240 */ ULong guest_f11;
97
+ /* 248 */ ULong guest_f12;
98
+ /* 256 */ ULong guest_f13;
99
+ /* 264 */ ULong guest_f14;
100
+ /* 272 */ ULong guest_f15;
101
+ /* 280 */ ULong guest_f16;
102
+ /* 288 */ ULong guest_f17;
103
+ /* 296 */ ULong guest_f18;
104
+ /* 304 */ ULong guest_f19;
105
+ /* 312 */ ULong guest_f20;
106
+ /* 320 */ ULong guest_f21;
107
+ /* 328 */ ULong guest_f22;
108
+ /* 336 */ ULong guest_f23;
109
+ /* 344 */ ULong guest_f24;
110
+ /* 352 */ ULong guest_f25;
111
+ /* 360 */ ULong guest_f26;
112
+ /* 368 */ ULong guest_f27;
113
+ /* 376 */ ULong guest_f28;
114
+ /* 384 */ ULong guest_f29;
115
+ /* 392 */ ULong guest_f30;
116
+ /* 400 */ ULong guest_f31;
117
+
118
+ /* 408 */ UInt guest_FIR;
119
+ /* 412 */ UInt guest_FCCR;
120
+ /* 416 */ UInt guest_FEXR;
121
+ /* 420 */ UInt guest_FENR;
122
+ /* 424 */ UInt guest_FCSR;
123
+
124
+ /* TLS pointer for the thread. It's read-only in user space.
125
+ On Linux it is set in user space by various thread-related
126
+ syscalls.
127
+ User Local Register.
128
+ This register provides read access to the coprocessor 0
129
+ UserLocal register, if it is implemented. In some operating
130
+ environments, the UserLocal register is a pointer to a
131
+ thread-specific storage block.
132
+ */
133
+ /* 428 */ UInt guest_ULR;
134
+
135
+ /* Emulation notes */
136
+ /* 432 */ UInt guest_EMNOTE;
137
+
138
+ /* For clflush: record start and length of area to invalidate. */
139
+ /* 436 */ UInt guest_CMSTART;
140
+ /* 440 */ UInt guest_CMLEN;
141
+ /* 444 */ UInt guest_NRADDR;
142
+
143
+ /* 448 */ UInt guest_COND;
144
+
145
+ /* MIPS32 DSP ASE(r2) specific registers. */
146
+ /* 452 */ UInt guest_DSPControl;
147
+ /* 456 */ ULong guest_ac0;
148
+ /* 464 */ ULong guest_ac1;
149
+ /* 472 */ ULong guest_ac2;
150
+ /* 480 */ ULong guest_ac3;
151
+
152
+ /* 488 */ UInt guest_CP0_status;
153
+
154
+ /* 492 */ UInt guest_IP_AT_SYSCALL;
155
+ } VexGuestMIPS32State;
156
+ /*---------------------------------------------------------------*/
157
+ /*--- Utility functions for MIPS32 guest stuff. ---*/
158
+ /*---------------------------------------------------------------*/
159
+
160
+ /* ALL THE FOLLOWING ARE VISIBLE TO LIBRARY CLIENT. */
161
+
162
+ /* Initialise all guest MIPS32 state. */
163
+
164
+ extern
165
+ void LibVEX_GuestMIPS32_initialise ( /*OUT*/VexGuestMIPS32State* vex_state );
166
+
167
+ /* FR bit of CP0_STATUS_FR register */
168
+ #define MIPS_CP0_STATUS_FR (1ul << 26)
169
+
170
+ #endif /* ndef __LIBVEX_PUB_GUEST_MIPS32_H */
171
+
172
+
173
+ /*---------------------------------------------------------------*/
174
+ /*--- libvex_guest_mips32.h ---*/
175
+ /*---------------------------------------------------------------*/