From patchwork Thu Sep 14 18:35:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 112617 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1100867qgf; Thu, 14 Sep 2017 11:43:29 -0700 (PDT) X-Received: by 10.55.86.134 with SMTP id k128mr4337362qkb.56.1505414608943; Thu, 14 Sep 2017 11:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505414608; cv=none; d=google.com; s=arc-20160816; b=RUOdf3WQiomJkOQtBA+edF1D0O+eYvvJk7QTHuldcxtziQAHXSqFBw9bA6mcAb8h2+ AlnIns4f8byMbl23GHWi/oVLyn1QTmP0prl7654CHaE96cYV8U28uJ0Rrbk0bIbKuPoD jZG9PuezhkhyTHEG8LULwHrvUMW9WioXqUsaur6DQJbrtmMoNfdK9GST0hJWjI+QDzHG IAQvOzVHRZ+VkWxIfaRdsPlK2kKSMNvsk7jCtThXJweHTcEFF+qezKUMSIj/spUECUbf XuCYCr8+wx5cXTfWzKR4OS/tElG5dEFMVu67qBdAyoenPq95RA6gNXW3ydnV1IgFj9Ps 1lkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=bo/z2I5k4nKiZnbJDrddFcloumFTnImL28Z86mlkt9g=; b=npF2p4xX6p0PwYgkZDAvFJFUvvfSmkY+66uwVftqAB2dPuttfPw4swGThuSN/VR8av aozmG/S1TdTJNLguM1MyogQjVpAXR7yPGqD5EE6Q06TrPvDQV2+b28GOHyJQi1iSY6qW JL8WY8biy1blzh+6odQB8wv95txCKJuN/9fId7MiZtB4xBZ04Z4MIs8DkKXzK45FhQTI AxbtMsXJ0WU8pu1fpUpx3f35x9r+3LlQFV+3MVFAUB7tGA/0FffmwMJLMoBFML1rLwlJ LjpJvHagbPW0LsMxZR1uC1+LJLjpLJLIt1ezaTZ2OPP581EUvomjxYw4JSKqpjBVCqnA V7sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=CbC5hnrX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 10si7826072qkg.545.2017.09.14.11.43.28 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 14 Sep 2017 11:43:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=CbC5hnrX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsZ6k-00088O-Tw for patch@linaro.org; Thu, 14 Sep 2017 14:43:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsYz2-0000Q9-A2 for qemu-devel@nongnu.org; Thu, 14 Sep 2017 14:35:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsYz1-0000VD-3M for qemu-devel@nongnu.org; Thu, 14 Sep 2017 14:35:28 -0400 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]:47702) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dsYz0-0000Td-TM for qemu-devel@nongnu.org; Thu, 14 Sep 2017 14:35:27 -0400 Received: by mail-pf0-x230.google.com with SMTP id u12so118890pfl.4 for ; Thu, 14 Sep 2017 11:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=bo/z2I5k4nKiZnbJDrddFcloumFTnImL28Z86mlkt9g=; b=CbC5hnrXVhR0qjn54DuuzONJraDG5eHGESh1g+0xlW584ttKgFW9svSm7u1UNXI97c WPWjFp00XV2uztFkVh4Pdfdr0IrR1LvuQIELbzODuIH0bYVNEeptttGpQ8dl44A5kjvx HIGEng4hm8A+6JrJcedaLWVoTb6SopKK7bZ8M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=bo/z2I5k4nKiZnbJDrddFcloumFTnImL28Z86mlkt9g=; b=ArJ7+xRklIJ73vKwzexoR4PNqS8EcrH/HXWZqYiAGBdXIwMe4iY0vXpmuiWZkPz+X0 UNa/uoZJbnfu/OZtEPswegcJIqQPtTIsy1E3Q5jUwJNNJM2fN17u31uWrEvEnLQTIJFC YBOMYfZSHJGDJDf4dMHl162QGD8eW/KFKiLV0q39lh7zp7mZnNXrSCHac/cdKRfNbE/N jowNM/DrvB2t6CljM4JKKarcUbUeW6iY0phiu2rLP0z72LolX8VuB1FdNU0UmoXngb0a kuKdKi3aoLpD9cRY0Z6ofgnWAm2G3pGPzDpUVcUS9jG5+WyFWmxqathpnhWO2HRiJbU3 to3g== X-Gm-Message-State: AHPjjUh3/SPtg3pdO5eD5S8YnRKLe7cBFW8sdgdV6YlmvQLhGZ4M8Ar8 oiroeCc2McHZJ32Rwx3RuA== X-Google-Smtp-Source: ADKCNb5efAvg8MUU9D6nC+VT01P/Yb3408rh/IYbnT4k9fbDSjUburhncybrODSBB8sYVJ4adhx3Wg== X-Received: by 10.98.217.75 with SMTP id s72mr21749946pfg.158.1505414125763; Thu, 14 Sep 2017 11:35:25 -0700 (PDT) Received: from bigtime.twiddle.net (97-126-103-167.tukw.qwest.net. [97.126.103.167]) by smtp.gmail.com with ESMTPSA id l85sm32473848pfb.176.2017.09.14.11.35.24 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Sep 2017 11:35:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 14 Sep 2017 11:35:11 -0700 Message-Id: <20170914183516.19537-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170914183516.19537-1-richard.henderson@linaro.org> References: <20170914183516.19537-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::230 Subject: [Qemu-devel] [PATCH 05/10] target/i386: Support Capstone in disas_set_info X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/i386/cpu.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.13.5 diff --git a/target/i386/cpu.c b/target/i386/cpu.c index b869a69c53..c3980b3864 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -51,6 +51,8 @@ #include "hw/i386/apic_internal.h" #endif +#include "disas/capstone.h" + /* Cache topology CPUID constants: */ @@ -4108,6 +4110,11 @@ static void x86_disas_set_info(CPUState *cs, disassemble_info *info) : env->hflags & HF_CS32_MASK ? bfd_mach_i386_i386 : bfd_mach_i386_i8086); info->print_insn = print_insn_i386; + + info->cap_arch = CS_ARCH_X86; + info->cap_mode = (env->hflags & HF_CS64_MASK ? CS_MODE_64 + : env->hflags & HF_CS32_MASK ? CS_MODE_32 + : CS_MODE_16); } static Property x86_cpu_properties[] = {