• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 /*--------------------------------------------------------------------*/
3 /*--- Asm-only dispatcher stuff.           pub_core_dispatch_asm.h ---*/
4 /*--------------------------------------------------------------------*/
5 
6 /*
7    This file is part of Valgrind, a dynamic binary instrumentation
8    framework.
9 
10    Copyright (C) 2000-2017 Julian Seward
11       jseward@acm.org
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 __PUB_CORE_DISPATCH_ASM_H
32 #define __PUB_CORE_DISPATCH_ASM_H
33 
34 /* Magic values that the guest state might be set to when returning to the
35    dispatcher.  The only other legitimate value is to point to the
36    start of the thread's VEX guest state.  These also are return values from
37    from VG_(run_innerloop) to the scheduler.
38 */
39 /* Defines values for JMP_EMWARN, JMP_SYSCALL, JMP_CLIENTREQ and
40    JMP_YIELD */
41 #include "libvex_trc_values.h"
42 
43 /* And some more of our own.  These must not have the same values as
44    those from libvex_trc_values.h.  (viz, 60 or below is safe).
45 
46    (The following comment is no longer relevant, but is retained
47    for historical purposes.)
48    These values *must* be odd (have bit 0 set) because the dispatchers
49    (coregrind/m_dispatch/dispatch-*-*.S) use this fact to distinguish
50    a TRC value from the unchanged baseblock pointer -- which has 0 as
51    its lowest bit.
52 */
53 #define VG_TRC_BORING              29 /* no event; just keep going */
54 #define VG_TRC_INNER_FASTMISS      37 /* TRC only; means fast-cache miss. */
55 #define VG_TRC_INNER_COUNTERZERO   41 /* TRC only; means bb ctr == 0 */
56 #define VG_TRC_FAULT_SIGNAL        43 /* TRC only; got sigsegv/sigbus */
57 #define VG_TRC_INVARIANT_FAILED    47 /* TRC only; invariant violation */
58 #define VG_TRC_CHAIN_ME_TO_SLOW_EP 49 /* TRC only; chain to slow EP */
59 #define VG_TRC_CHAIN_ME_TO_FAST_EP 51 /* TRC only; chain to fast EP */
60 
61 #endif   // __PUB_CORE_DISPATCH_ASM_H
62 
63 /*--------------------------------------------------------------------*/
64 /*--- end                                                          ---*/
65 /*--------------------------------------------------------------------*/
66