Patchwork [18/18] instrument: [i386] Call PLVL point

login
register
mail settings
Submitter =?utf-8?Q?Llu=C3=ADs?=
Date Oct. 19, 2010, 9:36 p.m.
Message ID <2c34b82c575d3984d254b7f403472e56a4c1706b.1287772676.git.vilanova@ac.upc.edu>
Download mbox | patch
Permalink /patch/68952/
State New
Headers show

Comments

=?utf-8?Q?Llu=C3=ADs?= - Oct. 19, 2010, 9:36 p.m.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
 instrument/host.h |   31 -------------------------------
 target-i386/cpu.h |   21 +++++++++++----------
 2 files changed, 11 insertions(+), 41 deletions(-)
 delete mode 100644 instrument/host.h

Patch

diff --git a/instrument/host.h b/instrument/host.h
deleted file mode 100644
index cd120d0..0000000
--- a/instrument/host.h
+++ /dev/null
@@ -1,31 +0,0 @@ 
-/*
- * Static instrumentation points.
- *
- *  Copyright (c) 2010 Lluís Vilanova <vilanova@ac.upc.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef INSTRUMENT__HOST_H
-#define INSTRUMENT__HOST_H
-
-#if defined(CONFIG_INSTRUMENT)
-/* user-provided definitions */
-#include "instrument-host.h"
-#else
-/* empty stub definitions */
-#include "instrument/host-stub.h"
-#endif
-
-#endif  /* INSTRUMENT__HOST_H */
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 1144d4e..e8d3953 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -810,16 +810,6 @@  int cpu_x86_get_descr_debug(CPUX86State *env, unsigned int selector,
                             target_ulong *base, unsigned int *limit,
                             unsigned int *flags);
 
-/* wrapper, just in case memory mappings must be changed */
-static inline void cpu_x86_set_cpl(CPUX86State *s, int cpl)
-{
-#if HF_CPL_MASK == 3
-    s->hflags = (s->hflags & ~HF_CPL_MASK) | cpl;
-#else
-#error HF_CPL_MASK is hardcoded
-#endif
-}
-
 /* op_helper.c */
 /* used for debug or cpu save/restore */
 void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, CPU86_LDouble f);
@@ -939,6 +929,17 @@  static inline void cpu_clone_regs(CPUState *env, target_ulong newsp)
 #include "hw/apic.h"
 #endif
 
+/* wrapper, just in case memory mappings must be changed */
+static inline void cpu_x86_set_cpl(CPUX86State *s, int cpl)
+{
+    INSTR_DO_PLVL(s, cpl);
+#if HF_CPL_MASK == 3
+    s->hflags = (s->hflags & ~HF_CPL_MASK) | cpl;
+#else
+#error HF_CPL_MASK is hardcoded
+#endif
+}
+
 static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
                                         target_ulong *cs_base, int *flags)
 {