Add Valgrind-side support for subarchitecture descriptions, which are
tedious but necessary to support. Also, get rid of the have_ssestate
variable. The new valgrind will not work on x86s which do not have at
least fxsave/fxrstor available; this rules all CPUs prior to Pentium
II. No big deal.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3210 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/core.h b/coregrind/core.h
index ffc2fbe..388a776 100644
--- a/coregrind/core.h
+++ b/coregrind/core.h
@@ -99,9 +99,6 @@
#define TL_(x) vgToolInternal_##x
-/* ToDo: nuke */
-#define INVALID_OFFSET (-1)
-
/* ---------------------------------------------------------------------
Build options and table sizes. You should be able to change these
options or sizes, recompile, and still have a working system.
@@ -183,6 +180,7 @@
#define PGROUNDDN(p) ROUNDDN(p, VKI_PAGE_SIZE)
#define PGROUNDUP(p) ROUNDUP(p, VKI_PAGE_SIZE)
+
/* ---------------------------------------------------------------------
Environment variables
------------------------------------------------------------------ */
@@ -342,6 +340,7 @@
/* Set up the libc freeres wrapper */
extern void VG_(intercept_libc_freeres_wrapper)(Addr);
+
/* ---------------------------------------------------------------------
Profiling stuff
------------------------------------------------------------------ */
@@ -354,6 +353,7 @@
#define VGP_PUSHCC(x) if (VG_(clo_profile)) VGP_(pushcc)(x)
#define VGP_POPCC(x) if (VG_(clo_profile)) VGP_(popcc)(x)
+
/* ---------------------------------------------------------------------
Tool-related types
------------------------------------------------------------------ */
@@ -403,12 +403,14 @@
#include "vg_toolint.h"
+
/* ---------------------------------------------------------------------
Exports of vg_needs.c
------------------------------------------------------------------ */
void VG_(sanity_check_needs)(void);
+
/* ---------------------------------------------------------------------
Exports of vg_malloc2.c
------------------------------------------------------------------ */
@@ -467,6 +469,7 @@
extern Bool VG_(is_empty_arena) ( ArenaId aid );
+
/* ---------------------------------------------------------------------
Exports of vg_intercept.c
------------------------------------------------------------------ */
@@ -603,12 +606,14 @@
Bool clo_trace_malloc;
};
+
/* ---------------------------------------------------------------------
Exports of vg_defaults.c
------------------------------------------------------------------ */
extern Bool VG_(tl_malloc_called_by_scheduler);
+
/* ---------------------------------------------------------------------
Exports of vg_libpthread.c
------------------------------------------------------------------ */
@@ -987,6 +992,7 @@
extern void VG_(get_sigstack_bounds)( Addr* low, Addr* high );
+
/* ---------------------------------------------------------------------
Exports of vg_mylibc.c
------------------------------------------------------------------ */
@@ -1037,6 +1043,7 @@
extern void VG_(env_unsetenv) ( Char **env, const Char *varname );
extern void VG_(env_remove_valgrind_env_stuff) ( Char** env );
+
/* ---------------------------------------------------------------------
Exports of vg_message.c
------------------------------------------------------------------ */
@@ -1086,13 +1093,6 @@
/* ---------------------------------------------------------------------
- Exports of vg_to_ucode.c
- ------------------------------------------------------------------ */
-
-Bool VG_(cpu_has_feature)(UInt feat);
-
-
-/* ---------------------------------------------------------------------
Exports of vg_translate.c
------------------------------------------------------------------ */
@@ -1139,6 +1139,7 @@
extern UInt VG_(get_n_errs_found) ( void );
+
/* ---------------------------------------------------------------------
Exports of vg_procselfmaps.c
------------------------------------------------------------------ */
@@ -1177,6 +1178,7 @@
/* Redirection machinery */
extern Addr VG_(code_redirect) ( Addr orig );
+
/* ---------------------------------------------------------------------
Exports of vg_main.c
------------------------------------------------------------------ */
@@ -1230,6 +1232,10 @@
/* Stats ... */
extern void VG_(print_scheduler_stats) ( void );
+/* Indicates what arch and subarch we are running on. */
+extern VexArch VG_(vex_arch);
+extern VexSubArch VG_(vex_subarch);
+
/* ---------------------------------------------------------------------
Exports of vg_memory.c
@@ -1786,6 +1792,13 @@
// Architecture-specific things defined in eg. x86/*.c
// ---------------------------------------------------------------------
+// Returns the architecture and subarchitecture, or indicates
+// that this subarchitecture is unable to run Valgrind
+// Returns False to indicate we cannot proceed further.
+
+extern Bool VGA_(getArchAndSubArch)( /*OUT*/VexArch*,
+ /*OUT*/VexSubArch* );
+
// Accessors for the ThreadArchState
#define INSTR_PTR(regs) ((regs).vex.ARCH_INSTR_PTR)
#define STACK_PTR(regs) ((regs).vex.ARCH_STACK_PTR)