drd/drd_pthread_intercepts: Add a workaround for what is probably a compiler bug
[valgrind.git] / VEX / pub / libvex_guest_mips64.h
blob4553cb3e932cc966db48f1ea4daf6c477529b866
2 /*---------------------------------------------------------------*/
3 /*--- begin libvex_guest_mips64.h ---*/
4 /*---------------------------------------------------------------*/
6 /*
7 This file is part of Valgrind, a dynamic binary instrumentation
8 framework.
10 Copyright (C) 2010-2017 RT-RK
11 mips-valgrind@rt-rk.com
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.
28 Neither the names of the U.S. Department of Energy nor the
29 University of California nor the names of its contributors may be
30 used to endorse or promote products derived from this software
31 without prior written permission.
34 #ifndef __LIBVEX_PUB_GUEST_MIPS64_H
35 #define __LIBVEX_PUB_GUEST_MIPS64_H
37 #include "libvex_basictypes.h"
38 #include "libvex_emnote.h"
41 /*---------------------------------------------------------------*/
42 /*--- Vex's representation of the MIPS64 CPU state. ---*/
43 /*---------------------------------------------------------------*/
45 typedef
46 struct {
47 /* 0 */ ULong host_EvC_FAILADDR;
48 /* 8 */ UInt host_EvC_COUNTER;
49 /* 12 */ UInt _padding1;
51 /* CPU Registers */
52 /* 16 */ ULong guest_r0; /* Hardwired to 0. */
53 /* 24 */ ULong guest_r1; /* Assembler temporary */
54 /* 32 */ ULong guest_r2; /* Values for function returns ...*/
55 /* 40 */ ULong guest_r3; /* ... and expression evaluation */
56 /* 48 */ ULong guest_r4; /* Function arguments */
57 /* 56 */ ULong guest_r5;
58 /* 64 */ ULong guest_r6;
59 /* 72 */ ULong guest_r7;
60 /* 80 */ ULong guest_r8;
61 /* 88 */ ULong guest_r9;
62 /* 96 */ ULong guest_r10;
63 /* 104 */ ULong guest_r11;
64 /* 112 */ ULong guest_r12; /* Temporaries */
65 /* 120 */ ULong guest_r13;
66 /* 128 */ ULong guest_r14;
67 /* 136 */ ULong guest_r15;
68 /* 144 */ ULong guest_r16; /* Saved temporaries */
69 /* 152 */ ULong guest_r17;
70 /* 160 */ ULong guest_r18;
71 /* 168 */ ULong guest_r19;
72 /* 176 */ ULong guest_r20;
73 /* 184 */ ULong guest_r21;
74 /* 192 */ ULong guest_r22;
75 /* 200 */ ULong guest_r23;
76 /* 208 */ ULong guest_r24; /* Temporaries */
77 /* 216 */ ULong guest_r25;
78 /* 224 */ ULong guest_r26; /* Reserved for OS kernel */
79 /* 232 */ ULong guest_r27;
80 /* 240 */ ULong guest_r28; /* Global pointer */
81 /* 248 */ ULong guest_r29; /* Stack pointer */
82 /* 256 */ ULong guest_r30; /* Frame pointer */
83 /* 264 */ ULong guest_r31; /* Return address */
84 /* 272 */ ULong guest_PC; /* Program counter */
85 /* 280 */ ULong guest_HI; /* Multiply and divide reg higher result */
86 /* 288 */ ULong guest_LO; /* Multiply and divide reg lower result */
88 /* FPU Registers */
89 /* 296 */ ULong guest_f0; /* Floating point gen. purpose registers */
90 /* 304 */ ULong guest_f1;
91 /* 312 */ ULong guest_f2;
92 /* 320 */ ULong guest_f3;
93 /* 328 */ ULong guest_f4;
94 /* 336 */ ULong guest_f5;
95 /* 344 */ ULong guest_f6;
96 /* 352 */ ULong guest_f7;
97 /* 360 */ ULong guest_f8;
98 /* 368 */ ULong guest_f9;
99 /* 376 */ ULong guest_f10;
100 /* 384 */ ULong guest_f11;
101 /* 392 */ ULong guest_f12;
102 /* 400 */ ULong guest_f13;
103 /* 408 */ ULong guest_f14;
104 /* 416 */ ULong guest_f15;
105 /* 424 */ ULong guest_f16;
106 /* 432 */ ULong guest_f17;
107 /* 440 */ ULong guest_f18;
108 /* 448 */ ULong guest_f19;
109 /* 456 */ ULong guest_f20;
110 /* 464 */ ULong guest_f21;
111 /* 472 */ ULong guest_f22;
112 /* 480 */ ULong guest_f23;
113 /* 488 */ ULong guest_f24;
114 /* 496 */ ULong guest_f25;
115 /* 504 */ ULong guest_f26;
116 /* 512 */ ULong guest_f27;
117 /* 520 */ ULong guest_f28;
118 /* 528 */ ULong guest_f29;
119 /* 536 */ ULong guest_f30;
120 /* 544 */ ULong guest_f31;
122 /* 552 */ UInt guest_FIR;
123 /* 556 */ UInt guest_FCCR;
124 /* 560 */ UInt guest_FEXR;
125 /* 564 */ UInt guest_FENR;
126 /* 568 */ UInt guest_FCSR;
127 /* 572 */ UInt guest_CP0_status;
129 /* TLS pointer for the thread. It's read-only in user space. On Linux it
130 is set in user space by various thread-related syscalls.
131 User Local Register.
132 This register provides read access to the coprocessor 0
133 UserLocal register, if it is implemented. In some operating
134 environments, the UserLocal register is a pointer to a thread-specific
135 storage block.
137 /* 576 */ ULong guest_ULR;
139 /* Emulation notes */
140 /* 584 */ UInt guest_EMNOTE;
141 /* 588 */ UInt guest_COND;
143 /* For clflush: record start and length of area to invalidate */
144 /* 592 */ ULong guest_CMSTART;
145 /* 600 */ ULong guest_CMLEN;
147 /* 608 */ ULong guest_NRADDR;
149 /* 616 */ ULong guest_LLaddr;
150 /* 624 */ ULong guest_LLdata;
152 /* MIPS32 MSA 128-bit vector registers */
153 /* 632 */ V128 guest_w0;
154 /* 648 */ V128 guest_w1;
155 /* 664 */ V128 guest_w2;
156 /* 680 */ V128 guest_w3;
157 /* 696 */ V128 guest_w4;
158 /* 712 */ V128 guest_w5;
159 /* 728 */ V128 guest_w6;
160 /* 744 */ V128 guest_w7;
161 /* 760 */ V128 guest_w8;
162 /* 776 */ V128 guest_w9;
163 /* 792 */ V128 guest_w10;
164 /* 808 */ V128 guest_w11;
165 /* 824 */ V128 guest_w12;
166 /* 840 */ V128 guest_w13;
167 /* 856 */ V128 guest_w14;
168 /* 872 */ V128 guest_w15;
169 /* 888 */ V128 guest_w16;
170 /* 904 */ V128 guest_w17;
171 /* 920 */ V128 guest_w18;
172 /* 936 */ V128 guest_w19;
173 /* 952 */ V128 guest_w20;
174 /* 968 */ V128 guest_w21;
175 /* 984 */ V128 guest_w22;
176 /* 1000 */ V128 guest_w23;
177 /* 1016 */ V128 guest_w24;
178 /* 1032 */ V128 guest_w25;
179 /* 1048 */ V128 guest_w26;
180 /* 1064 */ V128 guest_w27;
181 /* 1080 */ V128 guest_w28;
182 /* 1096 */ V128 guest_w29;
183 /* 1112 */ V128 guest_w30;
184 /* 1128 */ V128 guest_w31;
185 /* 1144 */ UInt guest_MSACSR;
187 /* 1148 */ UInt _padding2;
189 } VexGuestMIPS64State;
191 /*---------------------------------------------------------------*/
192 /*--- Utility functions for MIPS64 guest stuff. ---*/
193 /*---------------------------------------------------------------*/
195 /* ALL THE FOLLOWING ARE VISIBLE TO LIBRARY CLIENT. */
197 /* Initialise all guest MIPS64 state. */
199 extern
200 void LibVEX_GuestMIPS64_initialise ( /*OUT*/VexGuestMIPS64State* vex_state );
202 /* FR bit of CP0_STATUS_FR register */
203 #define MIPS_CP0_STATUS_FR (1ul << 26)
205 #endif /* ndef __LIBVEX_PUB_GUEST_MIPS64_H */
207 /*---------------------------------------------------------------*/
208 /*--- libvex_guest_mips64.h ---*/
209 /*---------------------------------------------------------------*/