From patchwork Tue Oct 19 21:36:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?Q?Llu=C3=ADs?= X-Patchwork-Id: 68952 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5B3D2B6F0B for ; Sat, 23 Oct 2010 07:02:26 +1100 (EST) Received: from localhost ([127.0.0.1]:46438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P9Nok-0002jL-ED for incoming@patchwork.ozlabs.org; Fri, 22 Oct 2010 16:02:22 -0400 Received: from [140.186.70.92] (port=60319 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P9Mxk-0002vk-Gi for qemu-devel@nongnu.org; Fri, 22 Oct 2010 15:07:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P9Mxi-0007FM-1F for qemu-devel@nongnu.org; Fri, 22 Oct 2010 15:07:35 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:43133 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1P9Mxh-0007EU-KY for qemu-devel@nongnu.org; Fri, 22 Oct 2010 15:07:33 -0400 Received: (qmail invoked by alias); 22 Oct 2010 19:07:32 -0000 Received: from unknown (EHLO localhost) [84.88.53.92] by mail.gmx.net (mp071) with SMTP; 22 Oct 2010 21:07:32 +0200 X-Authenticated: #12333383 X-Provags-ID: V01U2FsdGVkX19vcPwcY2RvJPbRUyiJlbrr8AVGIL9Pm91Gpkhx/B Oz+JbJUeNgIsJr From: xscript@gmx.net (=?utf-8?Q?Llu=C3=ADs?=) To: qemu-devel@nongnu.org In-Reply-To: Date: Tue, 19 Oct 2010 23:36:16 +0200 References: Message-Id: <2c34b82c575d3984d254b7f403472e56a4c1706b.1287772676.git.vilanova@ac.upc.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 18/18] instrument: [i386] Call PLVL point X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Lluís Vilanova --- instrument/host.h | 31 ------------------------------- target-i386/cpu.h | 21 +++++++++++---------- 2 files changed, 11 insertions(+), 41 deletions(-) delete mode 100644 instrument/host.h 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 - * - * 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 . - */ - -#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) {