Bug499183 - FreeBSD: differences in avx-vmovq output
[valgrind.git] / coregrind / m_extension / extension-main.c
blob5590c9d285665385a2c0815bc6eef7aee9d1de95
2 /*--------------------------------------------------------------------*/
3 /*--- Handle extensions. extension-main.c ---*/
4 /*--------------------------------------------------------------------*/
6 /*
7 This file is part of Valgrind, a dynamic binary instrumentation
8 framework.
10 Copyright (C) IBM Corp. 2024
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.
28 /* Contributed by Andreas Arnez */
30 #include "libvex_guest_offsets.h"
31 #include "pub_core_extension.h"
32 #include "pub_core_libcassert.h"
33 #include "pub_core_threadstate.h"
34 #include "priv_extension.h"
36 /* This is the top-level of the extension handler module. Extensions provide a
37 means of executing instructions whose register and memory effects are too
38 complex to be expressed with dirty helpers.
41 #if defined(VGP_s390x_linux)
43 /* --- This is the main function of this file. --- */
45 enum ExtensionError VG_(client_extension)(ThreadId tid)
47 ThreadState* tst;
49 vg_assert(VG_(is_valid_tid)(tid));
50 vg_assert(tid >= 1 && tid < VG_N_THREADS);
51 vg_assert(VG_(is_running_thread)(tid));
53 tst = VG_(get_ThreadState)(tid);
55 return ML_(do_client_extension)(tst);
58 #else
60 enum ExtensionError VG_(client_extension)(ThreadId tid)
62 VG_(core_panic)("Extension handler not implemented for this architecture");
65 #endif