From patchwork Thu May 23 20:49:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 165075 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp2708775ili; Thu, 23 May 2019 13:55:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIp0WmeOnNWF2b6ZNXxvnt9v0i+jw6xIveaOcbNktPU81jM3+POWumgI3XYk16BPuwy9yK X-Received: by 2002:a50:aef6:: with SMTP id f51mr99609448edd.225.1558644953609; Thu, 23 May 2019 13:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558644953; cv=none; d=google.com; s=arc-20160816; b=FnRfPr0flr6NZTnvqGy4FKjQKjg+Gh+KQqUV/huzSvMr5xzLqziwl3155Q+Xe5EPdc LCOswpFjv0pNKRW0HaxBcf9IbPqtGnoTpiMbgXW/EfByIRl3lMptfdWqp8rTVzK3MLkJ 5UWD11xpfJ2eXqjaGLhNr7BBLVmjjaDLbR8FwqoNbNUUUQKujj97S2vkvjMbe1zO2aMO 9QU79RgQlnT9iKIzpy9glH2mz7pq8dNR2GYSErBO967lmxAZHKVcOPaq9xFZ6w11Jy/o O2d5GJbdvCuIhyOCkgVlQg/ID5Q/8R5jO2juZ7BFw6QQIHTwkzjL9zHy0RVW2jPdh1QS d8PQ== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=jXzqcLUR36mrZ8zbNeITGhWgRKvCgnJ4YD1qZfRVpzo=; b=HvpqpZvUCMIKU+94qFfL61J3VeVbnCvXKyG2eUe4FGIHMV411+zLY/rQSPb3BxrMGx Kv6nEFye9ITmH3MzTwOgd4IolBgI0Apv0UaTJodsR6vQpc+z5EfSBsgFihiZdkW5HdzO R6pPjYjRxKWSK4TFGw1NFNcaJPPczCJp8C/Cuq+J6phleLddqaiJiONHWTT/V5jEaSnn Nhdgmv2d0LC/six77uImSCwrygiNWFrHG+x4+APj9zFaOivggfKrUzWnqEDymgju2Isc k0WmfoLsnqkA+QK6FTVNAyxVmlzWJCFwm2tz9+RAdgVnEOemIQt6LJcaWMmOQceTfHSW wp8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PbEDC500; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id c44si245579ede.137.2019.05.23.13.55.53 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 23 May 2019 13:55:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PbEDC500; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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 ([127.0.0.1]:43235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTuki-00071M-3D for patch@linaro.org; Thu, 23 May 2019 16:55:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTuf3-0001nE-2R for qemu-devel@nongnu.org; Thu, 23 May 2019 16:50:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTuf1-00081Y-9A for qemu-devel@nongnu.org; Thu, 23 May 2019 16:50:01 -0400 Received: from mail-yb1-xb43.google.com ([2607:f8b0:4864:20::b43]:41870) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTuf1-000819-1U for qemu-devel@nongnu.org; Thu, 23 May 2019 16:49:59 -0400 Received: by mail-yb1-xb43.google.com with SMTP id d2so2788904ybh.8 for ; Thu, 23 May 2019 13:49:58 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=jXzqcLUR36mrZ8zbNeITGhWgRKvCgnJ4YD1qZfRVpzo=; b=PbEDC500kOe1Px7MITq1c0BT5YvOO4We1bJ1uIgOeGlrdBzgPWJC5XQb9urFDLqRE2 HJo7vdpunnzazXoV2Vx0mNJOhYxrn4wshAPrM7nVs/AJOi/RN5DtIjpZu3YFMitGVaDK oZfZV7zQsKDtoEfkLXusPQi2hLvpIkRF9Hrs/Cqa9CVvpxdl2LtbOD8KkS9lkvcI/QJz 6HSBsjdG2C8nhW/1hWQz+9ScMw4VDwUz1/i5baBknTIfqvJ1ZCWVCSFsWwoAoCUUyxMm Jlql1Sp5LgCxdLpDlMEBmUdIPUIIBgs6kEJ835WkbgYSHRNxVxjpcUq2lidK1nxG89Rh Bp5w== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=jXzqcLUR36mrZ8zbNeITGhWgRKvCgnJ4YD1qZfRVpzo=; b=EgliTxOQtLypfZ6M3Nfa1iejOLTRgYO9Sz3RTfp5o7biTJXBpVpRBjRHHNC8yx2Omo f9dzB6Fen8K1amqtK9cAB05gWeHqT0cwTP4G/Zo1RiDGARC/eK7Ku7KsLVhoX/AjYSmI e8+JbBuIHOOErOGcUOTWuRQxue5i+vPMqS+i8lcPE5mOF/hM6ylMIu9FPW6CbALYpwvW rHX9FfcANChxRsdumFixaIiEwATjQ27iU7TB2zam18K6Q772jp5zbTfyFVTyZHK33lSh tGBquRSNfVd2tAF1wAppJg4nDkQH5axb8TwKQkxSU7+yxSI2pXIvEPO7KovGjbjZgPQA 1kOA== X-Gm-Message-State: APjAAAVEEOtD4HT+9K4CmfP7RgkO+t2tYG0ocZHyU8LyTL0W4jk/Ew94 7c27vlqLVhyF6Zh2Xr3Ax9ZdKjHrp1o= X-Received: by 2002:a5b:492:: with SMTP id n18mr18534920ybp.246.1558644598187; Thu, 23 May 2019 13:49:58 -0700 (PDT) Received: from localhost.localdomain ([71.46.56.19]) by smtp.gmail.com with ESMTPSA id j187sm98341ywj.32.2019.05.23.13.49.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 13:49:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 23 May 2019 16:49:53 -0400 Message-Id: <20190523204954.13122-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190523204954.13122-1-richard.henderson@linaro.org> References: <20190523204954.13122-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::b43 Subject: [Qemu-devel] [PATCH v2 1/2] capstone: Update to master 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: alex.bennee@linaro.org, david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Update to fbb20ea83c5a. Choose this over the 4.0.1 tag because master now includes the s390x z13 vector opcodes. Acked-by: David Hildenbrand Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- capstone | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/capstone b/capstone index 22ead3e0bf..fbb20ea83c 160000 --- a/capstone +++ b/capstone @@ -1 +1 @@ -Subproject commit 22ead3e0bfdb87516656453336160e0a37b066bf +Subproject commit fbb20ea83c5af4f29b40c17fbadb1f71b0a08fae diff --git a/configure b/configure index 528b9ff705..d3cbdd595c 100755 --- a/configure +++ b/configure @@ -5022,7 +5022,7 @@ case "$capstone" in git_submodules="${git_submodules} capstone" fi mkdir -p capstone - QEMU_CFLAGS="$QEMU_CFLAGS -I\$(SRC_PATH)/capstone/include" + QEMU_CFLAGS="$QEMU_CFLAGS -I\$(SRC_PATH)/capstone/include/capstone" if test "$mingw32" = "yes"; then LIBCAPSTONE=capstone.lib else From patchwork Thu May 23 20:49:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 165076 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp2709553ili; Thu, 23 May 2019 13:56:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQaLPLEEL8GfxbV9D6Vh0bT6H2pxoOalm1k49sNpo2SA9TyJgmiD6kfIp3Zdx2g3eakMTL X-Received: by 2002:a17:906:d7aa:: with SMTP id pk10mr68878088ejb.283.1558645008355; Thu, 23 May 2019 13:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558645008; cv=none; d=google.com; s=arc-20160816; b=eIG97ywKLg6MfYTY/GvvM0I/fdswy6ky/Qo5L8D53aV7hy19Oo7Z8YgpH31aasH2IT 5aCrVbvtBcKhMYNbsLBGi5h2m+9m+0U+fP6WxkwkfV2xviiTjP7I0IDrkvS711ygau0C cxkMUtnen1GRPoIYDO+209Bm9+Ov6bBChDqjD/+xFG0CZqNyhyweMopFF6cudwzD+DbE v5FvBL5WrFDU3WckrBy2e2QqEkyhfKVzbpSCEcoJJE4CdBKQcJ2KJy/wnhaz1RAxe6cz 66/7irIR7S4FpYNNOqbcMOdJIDqW6K0cHa9XU9NfJEcr9IL6YMwoKIyKv+4y0dwRwFTM EzvQ== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=89c0fdelMOQBOKzPc2d58OosG314dIUv3FUhe7nqhm8=; b=rDhVzPPf9HH2zDmGRujwMxi2ZeBJs422u1A1k4H5xM6UiJMa9VJghEXceA08kXwYDn NnvSXhIyvjk+C867XISDP4SaMFc/JkRDFdPfg2J1SkkdLOc6BC0j5zEuT8wg5PE1j+Q0 +ZTsb6j1Qu9MUbM0X9b8DsEytcLBwtk4zi2yywNQUE8ZIq5iE4gvVEyGgOJdULB7O6KO ukGz1uegBmE6CtpWkcya54bFzo9Qsc3yF3OxWA+2Hapz0YaejSkfhCgvgO767bwM855z DtRs2DNnVpRyR+3olAmYVS1F9iylEcpmlIU+rLof/2H/ohxJtAzU6vjB5PTrQaUNd8tX aOpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aA0pRjpq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id 10si227856eds.443.2019.05.23.13.56.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 23 May 2019 13:56:48 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aA0pRjpq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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 ([127.0.0.1]:43254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTulb-0007f7-E6 for patch@linaro.org; Thu, 23 May 2019 16:56:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTuf4-0001nz-Lm for qemu-devel@nongnu.org; Thu, 23 May 2019 16:50:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTuf3-00082u-55 for qemu-devel@nongnu.org; Thu, 23 May 2019 16:50:02 -0400 Received: from mail-yw1-xc44.google.com ([2607:f8b0:4864:20::c44]:44740) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTuf3-000825-0u for qemu-devel@nongnu.org; Thu, 23 May 2019 16:50:01 -0400 Received: by mail-yw1-xc44.google.com with SMTP id e74so2785574ywe.11 for ; Thu, 23 May 2019 13:50:00 -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:in-reply-to:references; bh=89c0fdelMOQBOKzPc2d58OosG314dIUv3FUhe7nqhm8=; b=aA0pRjpqVZMtJL8Z2wvJolEqrod/Dl90UG7CBd47S8m1/5GbSnZxWqwGB1oXrZYNDz dvdsiIW3Q1YfS6cRQ7zRvhjYjmtn7GC8vYDBTVdzq2b4+ns9i1ZMajOe8mTE3ZliWa1U 82Dz1Bdq7fQ1fY51t4ogTjBcCzC7hJr8RIroXzf/FsFD24+g2kC6z/u7xT2Flp31gTcg RtEilqK8J79u4Kr8S/ujjaTQ9QjsG7HOnokrXCsAmrk3SqO1jLl4RQP1mvG0LDh43YvX PGC9yBm+uEUmP72SuMArlPiSqxkC/ZnfNdj1YIkILulobNzHnj8S/u1g/ohkydgO+OCy HkMg== 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:in-reply-to :references; bh=89c0fdelMOQBOKzPc2d58OosG314dIUv3FUhe7nqhm8=; b=syvWo8iGg+VwfVjKftULosfZKk0LIEkx5inLt36+L3aU4jl6fnc3V2eKSF748BLxbc 44n4Xu60V45hLglhOMvfsMzyHOQ6CBTGMbOV8CWt4I6eWNdveWTB9EQ0pATmZt2IE/7o k0u4aJ6wT6HrITp67EORDbuTI8Ca4y0ckx6kJrCb1BqVhIkTp77NJ6aB6RB6fgosOYFK 5n3VuVFpwvJGHG5s8Sldsw8uJfxL5IIWneugux5s3qJN2b5DFkDKiZsEPXCRcJ7QIkE8 5ymXOVmCb/lb4Nd1iaojSSvL3gJnBT6WK/Zj8t9WiAkKH3kqasjg7za/Vuqtx3mFuW3c xthQ== X-Gm-Message-State: APjAAAXCuA3Yc6PiUZQjeXYGDyX/BRNPGELynfJSFaNnowW0Xh8xIHFP IFG+hm1rTKYO1h91ZFuNw8Xuwm2fTTs= X-Received: by 2002:a81:2f45:: with SMTP id v66mr34573570ywv.491.1558644599247; Thu, 23 May 2019 13:49:59 -0700 (PDT) Received: from localhost.localdomain ([71.46.56.19]) by smtp.gmail.com with ESMTPSA id j187sm98341ywj.32.2019.05.23.13.49.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 13:49:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 23 May 2019 16:49:54 -0400 Message-Id: <20190523204954.13122-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190523204954.13122-1-richard.henderson@linaro.org> References: <20190523204954.13122-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::c44 Subject: [Qemu-devel] [PATCH v2 2/2] capstone: Enable disassembly for s390x 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: alex.bennee@linaro.org, david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Enable s390x, aka SYSZ, in the git submodule build. Set the capstone parameters for both s390x host and guest. Signed-off-by: Richard Henderson --- Makefile | 1 + disas.c | 3 +++ target/s390x/cpu.c | 4 ++++ 3 files changed, 8 insertions(+) -- 2.17.1 diff --git a/Makefile b/Makefile index e02b88bcb1..3b49eed664 100644 --- a/Makefile +++ b/Makefile @@ -478,6 +478,7 @@ CAP_CFLAGS += -DCAPSTONE_USE_SYS_DYN_MEM CAP_CFLAGS += -DCAPSTONE_HAS_ARM CAP_CFLAGS += -DCAPSTONE_HAS_ARM64 CAP_CFLAGS += -DCAPSTONE_HAS_POWERPC +CAP_CFLAGS += -DCAPSTONE_HAS_SYSZ CAP_CFLAGS += -DCAPSTONE_HAS_X86 subdir-capstone: .git-submodule-status diff --git a/disas.c b/disas.c index 41ad0102e2..4a63586af0 100644 --- a/disas.c +++ b/disas.c @@ -551,6 +551,9 @@ void disas(FILE *out, void *code, unsigned long size) print_insn = print_insn_m68k; #elif defined(__s390__) print_insn = print_insn_s390; + s.info.cap_arch = CS_ARCH_SYSZ; + s.info.cap_insn_unit = 2; + s.info.cap_insn_split = 6; #elif defined(__hppa__) print_insn = print_insn_hppa; #endif diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index b1df63d82c..553571d86b 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -41,6 +41,7 @@ #include "sysemu/sysemu.h" #endif #include "fpu/softfloat.h" +#include "disas/capstone.h" #define CR0_RESET 0xE0UL #define CR14_RESET 0xC2000000UL; @@ -175,6 +176,9 @@ static void s390_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) { info->mach = bfd_mach_s390_64; info->print_insn = print_insn_s390; + info->cap_arch = CS_ARCH_SYSZ; + info->cap_insn_unit = 2; + info->cap_insn_split = 6; } static void s390_cpu_realizefn(DeviceState *dev, Error **errp)