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