From patchwork Thu Oct 19 15:51:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 116404 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp646153qgn; Thu, 19 Oct 2017 08:52:28 -0700 (PDT) X-Received: by 10.55.17.33 with SMTP id b33mr2639720qkh.58.1508428348108; Thu, 19 Oct 2017 08:52:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508428348; cv=none; d=google.com; s=arc-20160816; b=f2OkoM7S+oSPQKuvF1FX2UXssABX3RYlZjrdOu3iGKSXBklMlfnV09S6vrDB2tKFNc W6pp800V+EYlC1cwzOT0CUq8QVZvyW3HJ7yl6McayePAbTeMZcV7B6n0NWjNl6koFizR PO5Ui3xjij1tEmhM5LlFXHuOHpQFPIoGbUHcnIVgKGdDRHrmLjFntlXhPECKrlS+YDoz g6Y9kl4xaIIKGgqprju4A45UMCTz4tf0px7+HCaDW7gPrsOoqGB2hPSAXqyZK/MJqLC4 p7/yApqqohZzSQvhNDj5M1XJdgnBS79GezEWJ2/wWH1t1NLAprUDG3GtIYZv3l8CCPFd O4gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=JHdpdE21nGL2JS5oBv/QeYUxrjMtkZsxGlGoCWGmHi0=; b=DaDetEtF7hlYbdLMnG59Z0CvztdN2rFe1d7bPbBItxvMjLBW0vETlgxmItlJ5X/Ag9 HDGQ1V5pA5JdB5Clx6RuV7TSkUjRUHIcJPKxBNS3EVCi6x4/4WuO+7rLy5yi7i6413pt kWIuYzzd7+xPVuJusNluOM1VF25tLQrAdJ3duODwGZd8PFxyUkBCWTetqBgcEYm/+YwZ LLIah/UuOLpmDQa/lnYRM3y/L7lofmctRUQivH3DghrSFcbK/CwMIV30l7WkFW7Vdzcy 1pzcnTH791fXG8NbGnEYQpd+SXnbkYGwLTmX3Q8E/3Sb5emNziwWmkXD9b5n464bcYqc oOkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aoNDFNPl; 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 x5si7503179qkd.121.2017.10.19.08.52.27 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 19 Oct 2017 08:52: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=aoNDFNPl; 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]:49826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5D7R-0007Bl-Mv for patch@linaro.org; Thu, 19 Oct 2017 11:52:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5D6z-00078z-3R for qemu-devel@nongnu.org; Thu, 19 Oct 2017 11:51:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5D6u-0000Bg-7L for qemu-devel@nongnu.org; Thu, 19 Oct 2017 11:51:57 -0400 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:43347) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5D6u-0000AU-1H for qemu-devel@nongnu.org; Thu, 19 Oct 2017 11:51:52 -0400 Received: by mail-pg0-x244.google.com with SMTP id s75so7532043pgs.0 for ; Thu, 19 Oct 2017 08:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JHdpdE21nGL2JS5oBv/QeYUxrjMtkZsxGlGoCWGmHi0=; b=aoNDFNPl8bBL90Yt6mfWdYN/KOGzSD9TC2lnx5ULWu/j1HmuFPY+GK5N8mTqBho/Zq OGPGE6UPreWsR//Xym94yA+REGpsW2hAJc+O3lJQ3W5aBkcwarumh/xiIzviLG8e0fw0 aPxPROFgzSSMb3k5+9b+3+DYy71V40C4f/i9I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JHdpdE21nGL2JS5oBv/QeYUxrjMtkZsxGlGoCWGmHi0=; b=YZL7RkqAQzLgySndGnG5Ih+mOvkzyPy10fmmfMJwooBLbzgQpBZm9Wx5MqP+4UsUQF P6CJ0bz3XHnjWUHx8O+mLEsYJYdtBNJtDmTvvKXIhFr/JCnVz9ee8YbQhiH63p43ZWK9 XddPnn9dUvr1vwTyxkQXsf/iPUEXX5QbuJGlhaNHEaqWo+hlf/4jkEIezRftNHGK0wTs uyRQEwA0NUGjSP0+uluZdUoBX3gIUoXWvqmIn1aqfbAgMNBzN/aPNW1nPKhQhtZjYYUp bX+7Em8d+6+G0GSCFeIZNhprl89zSY6QThDtT9xWEYvU61dp1w+4TD47AbrUf5Jo9Y4P grNw== X-Gm-Message-State: AMCzsaXmoFrHeKYsQYKO1MLgxyXP9+KAr/TW+GHhfp3EeMJgiWRoPFOd CKVAWYvxL8DsUOEcMo+irZw05+RVnbw= X-Google-Smtp-Source: ABhQp+RGwGf05OStr8uf2yXU9Kwvh5F9n5V9FRs+TOVhmhWGhf4WfKXzEUGGWbJCKrrZ+AcrU7E5vQ== X-Received: by 10.84.238.15 with SMTP id u15mr1863366plk.217.1508428309161; Thu, 19 Oct 2017 08:51:49 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-165-104.tukw.qwest.net. [97.113.165.104]) by smtp.gmail.com with ESMTPSA id 76sm27971114pfq.4.2017.10.19.08.51.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2017 08:51:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 19 Oct 2017 08:51:37 -0700 Message-Id: <20171019155146.30434-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::244 Subject: [Qemu-devel] [PATCH v6 0/9] Support the Capstone disassembler 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: , Cc: kraxel@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Changes since v5: * Rearranged how we choose git submodule vs system installed library. By default, the system library will be used, if present; Followed by git submodule, if present; Followed by not-git submodule, if for some reason a tarball contained it. * Force the decision one way or another from the command-line: --enable-capstone=system --enable-capstone=git. r~ Richard Henderson (9): target/i386: Convert to disas_set_info hook target/ppc: Convert to disas_set_info hook disas: Remove unused flags arguments disas: Support the Capstone disassembler library i386: Support Capstone in disas_set_info arm: Support Capstone in disas_set_info ppc: Support Capstone in disas_set_info disas: Remove monitor_disas_is_physical disas: Add capstone as submodule Makefile | 13 ++ include/disas/bfd.h | 4 + include/disas/capstone.h | 38 ++++++ include/disas/disas.h | 4 +- include/exec/log.h | 4 +- disas.c | 308 ++++++++++++++++++++++++++++++------------ monitor.c | 29 +--- target/alpha/translate.c | 2 +- target/arm/cpu.c | 21 ++- target/arm/translate-a64.c | 3 +- target/arm/translate.c | 3 +- target/cris/translate.c | 3 +- target/hppa/translate.c | 2 +- target/i386/cpu.c | 19 +++ target/i386/translate.c | 8 +- target/lm32/translate.c | 2 +- target/m68k/translate.c | 2 +- target/microblaze/translate.c | 2 +- target/mips/translate.c | 2 +- target/nios2/translate.c | 2 +- target/openrisc/translate.c | 2 +- target/ppc/translate.c | 5 +- target/ppc/translate_init.c | 27 ++++ target/s390x/translate.c | 2 +- target/sh4/translate.c | 2 +- target/sparc/translate.c | 2 +- target/tricore/translate.c | 2 +- target/unicore32/translate.c | 2 +- target/xtensa/translate.c | 2 +- .gitmodules | 3 + capstone | 1 + configure | 61 +++++++++ 32 files changed, 431 insertions(+), 151 deletions(-) create mode 100644 include/disas/capstone.h create mode 160000 capstone -- 2.13.6