File: libvex_guest_mips32.h

package info (click to toggle)
valgrind 1%3A3.10.0-4~bpo7%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 97,940 kB
  • sloc: ansic: 589,429; xml: 21,096; exp: 8,751; cpp: 7,366; asm: 6,526; perl: 5,656; sh: 5,334; makefile: 4,946; haskell: 195
file content (169 lines) | stat: -rw-r--r-- 6,043 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169

/*---------------------------------------------------------------*/
/*--- begin                             libvex_guest_mips32.h ---*/
/*---------------------------------------------------------------*/

/*
   This file is part of Valgrind, a dynamic binary instrumentation
   framework.

   Copyright (C) 2010-2013 RT-RK
      mips-valgrind@rt-rk.com

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   02111-1307, USA.

   The GNU General Public License is contained in the file COPYING.
*/

#ifndef __LIBVEX_PUB_GUEST_MIPS32_H
#define __LIBVEX_PUB_GUEST_MIPS32_H

#include "libvex_basictypes.h"


/*---------------------------------------------------------------*/
/*--- Vex's representation of the MIPS32 CPU state.           ---*/
/*---------------------------------------------------------------*/

typedef
   struct {
      /* CPU Registers */
      /* 0 */ UInt guest_r0;   /* Hardwired to 0 */
      /* 4 */ UInt guest_r1;   /* Assembler temporary */
      /* 8 */ UInt guest_r2;   /* Values for function returns ...*/
      /* 12 */ UInt guest_r3;  /* ...and expression evaluation */
      /* 16 */ UInt guest_r4;  /* Function arguments */
      /* 20 */ UInt guest_r5;
      /* 24 */ UInt guest_r6;
      /* 28 */ UInt guest_r7;
      /* 32 */ UInt guest_r8;  /* Temporaries */
      /* 36 */ UInt guest_r9;
      /* 40 */ UInt guest_r10;
      /* 44 */ UInt guest_r11;
      /* 48 */ UInt guest_r12;
      /* 52 */ UInt guest_r13;
      /* 56 */ UInt guest_r14;
      /* 60 */ UInt guest_r15;
      /* 64 */ UInt guest_r16;  /* Saved temporaries */
      /* 68 */ UInt guest_r17;
      /* 72 */ UInt guest_r18;
      /* 76 */ UInt guest_r19;
      /* 80 */ UInt guest_r20;
      /* 84 */ UInt guest_r21;
      /* 88 */ UInt guest_r22;
      /* 92 */ UInt guest_r23;
      /* 96 */ UInt guest_r24;  /* Temporaries */
      /* 100 */ UInt guest_r25;
      /* 104 */ UInt guest_r26;  /* Reserved for OS kernel */
      /* 108 */ UInt guest_r27;
      /* 112 */ UInt guest_r28;  /* Global pointer */
      /* 116 */ UInt guest_r29;  /* Stack pointer */
      /* 120 */ UInt guest_r30;  /* Frame pointer */
      /* 124 */ UInt guest_r31;  /* Return address */
      /* 128 */ UInt guest_PC;  /* Program counter */
      /* 132 */ UInt guest_HI;  /* Multiply and divide register higher result */
      /* 136 */ UInt guest_LO;  /* Multiply and divide register lower result */

      /* FPU Registers */
      /* 144 */ ULong guest_f0;  /* Floating point general purpose registers */
      /* 152 */ ULong guest_f1;
      /* 160 */ ULong guest_f2;
      /* 168 */ ULong guest_f3;
      /* 176 */ ULong guest_f4;
      /* 184 */ ULong guest_f5;
      /* 192 */ ULong guest_f6;
      /* 200 */ ULong guest_f7;
      /* 208 */ ULong guest_f8;
      /* 216 */ ULong guest_f9;
      /* 224 */ ULong guest_f10;
      /* 232 */ ULong guest_f11;
      /* 240 */ ULong guest_f12;
      /* 248 */ ULong guest_f13;
      /* 256 */ ULong guest_f14;
      /* 264 */ ULong guest_f15;
      /* 272 */ ULong guest_f16;
      /* 280 */ ULong guest_f17;
      /* 288 */ ULong guest_f18;
      /* 296 */ ULong guest_f19;
      /* 304 */ ULong guest_f20;
      /* 312 */ ULong guest_f21;
      /* 320 */ ULong guest_f22;
      /* 328 */ ULong guest_f23;
      /* 336 */ ULong guest_f24;
      /* 344 */ ULong guest_f25;
      /* 352 */ ULong guest_f26;
      /* 360 */ ULong guest_f27;
      /* 368 */ ULong guest_f28;
      /* 376 */ ULong guest_f29;
      /* 384 */ ULong guest_f30;
      /* 392 */ ULong guest_f31;

      /* 400 */ UInt guest_FIR;
      /* 404 */ UInt guest_FCCR;
      /* 408 */ UInt guest_FEXR;
      /* 412 */ UInt guest_FENR;
      /* 416 */ UInt guest_FCSR;

      /* TLS pointer for the thread. It's read-only in user space.
         On Linux it is set in user space by various thread-related
         syscalls.
         User Local Register.
         This register provides read access to the coprocessor 0
         UserLocal register, if it is implemented. In some operating
         environments, the UserLocal register is a pointer to a
         thread-specific storage block.
      */
      /* 420 */ UInt guest_ULR;

      /* Emulation notes */
      /* 424 */ UInt guest_EMNOTE;

      /* For clflush: record start and length of area to invalidate */
      /* 428 */ UInt guest_CMSTART;
      /* 432 */ UInt guest_CMLEN;
      /* 436 */ UInt guest_NRADDR;

      /* 440 */ UInt host_EvC_FAILADDR;
      /* 444 */ UInt host_EvC_COUNTER;
      /* 448 */ UInt guest_COND;

      /* MIPS32 DSP ASE(r2) specific registers. */
      /* 452 */ UInt guest_DSPControl;
      /* 456 */ ULong guest_ac0;
      /* 464 */ ULong guest_ac1;
      /* 472 */ ULong guest_ac2;
      /* 480 */ ULong guest_ac3;

        UInt padding;
} VexGuestMIPS32State;
/*---------------------------------------------------------------*/
/*--- Utility functions for MIPS32 guest stuff.               ---*/
/*---------------------------------------------------------------*/

/* ALL THE FOLLOWING ARE VISIBLE TO LIBRARY CLIENT */

/* Initialise all guest MIPS32 state. */

extern
void LibVEX_GuestMIPS32_initialise ( /*OUT*/VexGuestMIPS32State* vex_state );


#endif /* ndef __LIBVEX_PUB_GUEST_MIPS32_H */


/*---------------------------------------------------------------*/
/*---                                   libvex_guest_mips32.h ---*/
/*---------------------------------------------------------------*/