From patchwork Mon Aug 19 21:36:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 171660 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp3529334ily; Mon, 19 Aug 2019 14:38:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwW3X4kaZwk7S9QtJL0WKoynk7QVLLGrtK4tgb/Guql3bo7qBTnf1HvqIuk8pLdnR7d8wO1 X-Received: by 2002:ac8:364a:: with SMTP id n10mr23764629qtb.148.1566250705957; Mon, 19 Aug 2019 14:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566250705; cv=none; d=google.com; s=arc-20160816; b=weSU2Si05bhRcnJRgpDsRG9jAvSaB7MTSt4dmMczk9A+eIW4lvmTgWRf8hB0fNHErK xyWMr5R918MjjHdklza6VSfZ3BZWXJevzUtpdm8v/Eo34kMzkA1j01MQ1vCrTjNXiqDM h3iyG3F79sXMy3OuiR2K85U/67kAu1aj2afJw1Sw/UgphUkrACWyuLRWDPRshSUs+Rds wKetopMdMO6FKRx6KzHYyCckKfyuCQtyNRdFGivKVeeEy1VCxMABjP8P2vQ5aaywyJ7e rBL+AfLuQFBhQRS9vF9mSMw5ToB4wqb3gntIxjYB0sXBXA8LKYwLOhXpKGWAZzGoQ5ru jEoA== 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:message-id:date:to:from :dkim-signature; bh=UAuI24ypugSOADw/ZQRUxs1qwCQQ7Fi3EwXHwPu9388=; b=CeEq+Y7lWzyxGRyuEhRB+EJo6tp2UvW5aBFHpuVWv8LF57vnbDSFHOrzQl/UdDVO1W 3Ia5ACLAPN3Yz0sSbh9cWcfRs5mCVGCDbOT8y1av4KIpQDnvPvEfyBsp+C1YeYnSkkwF gHYmY0XEtdy8vUwKuIozXIAuFDfCVVnI2qS4Lwk2m5U7p+gYmL0bgy0fgBSLdAkANXrS pn8arfMP/teeYE1v5VEBguyN2lgez3AomwlM8HabtKOnu00qBJA+rPP00rIefEy+me7A S7cwzsngIwRBQ91g77zdvx12G3ZCHZqXwelWMAA+cfaf8CSgP8bzkCpIF2Yq+BCWu5z7 sStg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=T+fYGM2c; 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 i11si10757514qvi.210.2019.08.19.14.38.25 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Aug 2019 14:38:25 -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=T+fYGM2c; 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 ([::1]:58048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzpM8-0001AD-DD for patch@linaro.org; Mon, 19 Aug 2019 17:38:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58404) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzpLk-00019p-DJ for qemu-devel@nongnu.org; Mon, 19 Aug 2019 17:38:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzpLj-0005w4-4H for qemu-devel@nongnu.org; Mon, 19 Aug 2019 17:38:00 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:38537) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzpLi-0005vU-VL for qemu-devel@nongnu.org; Mon, 19 Aug 2019 17:37:59 -0400 Received: by mail-pf1-x444.google.com with SMTP id o70so1947654pfg.5 for ; Mon, 19 Aug 2019 14:37: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; bh=UAuI24ypugSOADw/ZQRUxs1qwCQQ7Fi3EwXHwPu9388=; b=T+fYGM2c7huxQqMYjJE4FCDtBu1AjZR8/FPJa3mwgqc2uxzV6kOtA6SqJzFt0zij9W XKOPKbIgZMoV69o155ysDGSrU2XjesEz0IyUeuz1LGp2Y+2s+g0sHuWtQMM0CjJjbFMy mRCC37toz03sOpxGrq7qqsuL1+aDjEp6/iMTIc37Sr2FPwh/gnJoSLxDt7X9b1GfchuU uqeYTg469JA1vkgDZII5JbUKm+5j3cvEuAA8ihoSRuniD8gz5tWn5a+HU7otemnhkQEd gpgfnpyRd9Z9yv9lKumrUMbLfsICZiKW0dFWtJ2EGr/RwKvMmjHZ0/vs0IsATuyxVGN1 EGDg== 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; bh=UAuI24ypugSOADw/ZQRUxs1qwCQQ7Fi3EwXHwPu9388=; b=J7LOR1MobfJGcIL8utWA2ncYnICNZ4IZLHujqUwNEYt9ry7+mogiUi0OvKquhgMeGZ a+jmH+C3LhcIu/+PTVOM/pBpu3JHAVWEGCyCptHBtMu8UJiEe8IsQXcjm2YtjEJCGlB+ FZtSnFmYUwNkPIrTsSTIt8cEYnk7qW7aHyj5wKw9rfsxmvOndO1paC87xmpfZ6Gv3yOC U1+tsE0tBJCtdIuv4xK3Gxh3t8ddkq0hbnlSZUsebe3fh1InOOGcjFuJVPF0uH1sBe9C mznVfH/QY5TPHOkipOD9UEKyHNTOz7Q/uY3CVMnzo57uYFiA/YzjlDUJ9OvMuYk7JzaY /U/Q== X-Gm-Message-State: APjAAAV6PMhdDcmfUSKDf2N/xH5F6bM03Dwzc9CDQ5qgzwJ3b0ZBQW9e +V+tptlP2Up25Ta3r6uVZVegOmm5oos= X-Received: by 2002:a63:9e43:: with SMTP id r3mr22269709pgo.148.1566250677506; Mon, 19 Aug 2019 14:37:57 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id d2sm13446951pjs.21.2019.08.19.14.37.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 14:37:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 19 Aug 2019 14:36:47 -0700 Message-Id: <20190819213755.26175-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::444 Subject: [Qemu-devel] [PATCH v2 00/68] target/arm: Convert aa32 base isa to decodetree X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This unifies the implementation of the actual instructions for a32, t32, and t16. This has been tested by running the debian 9 armhf installer, which does a far amount of switching between arm and thumb modes. I've also run Peter's ARM TFM image, and all of the existing RISU tests that we have. (Our RISU test cases are nowhere near complete for 32-bit mode, but it did find 3 bugs, so not useless.) Based-on: 20190819151743.17267-1-richard.henderson@linaro.org "[PULL 0/3] decodetree improvements" Changes from v1: * Lots of prep patches merged. * Lots of patches split into smaller bits. Which is why this patch set is larger than v1 despite the merge. * Do not use STREG_EXC_RET in Hyp mode (patch 3). * Map more UNPREDICTABLE to UNDEF in LDM/STM (patches 28-30). * Split gen_nop_hint (patch 59). * Do not move single-step check to gen_goto_tb, but do simplify gen_jmp by inlining gen_bx_im (patch 68). r~ Richard Henderson (68): target/arm: Use store_reg_from_load in thumb2 code target/arm: Add stubs for aa32 decodetree target/arm: Convert Data Processing (register) target/arm: Convert Data Processing (reg-shifted-reg) target/arm: Convert Data Processing (immediate) target/arm: Convert multiply and multiply accumulate target/arm: Simplify UMAAL target/arm: Convert Saturating addition and subtraction target/arm: Convert Halfword multiply and multiply accumulate target/arm: Simplify op_smlaxxx for SMLAL* target/arm: Simplify op_smlawx for SMLAW* target/arm: Convert MSR (immediate) and hints target/arm: Convert MRS/MSR (banked, register) target/arm: Convert Cyclic Redundancy Check target/arm: Convert BX, BXJ, BLX (register) target/arm: Convert CLZ target/arm: Convert ERET target/arm: Convert the rest of A32 Miscelaneous instructions target/arm: Convert T32 ADDW/SUBW target/arm: Convert load/store (register, immediate, literal) target/arm: Convert Synchronization primitives target/arm: Convert USAD8, USADA8, SBFX, UBFX, BFC, BFI, UDF target/arm: Convert Parallel addition and subtraction target/arm: Convert Packing, unpacking, saturation, and reversal target/arm: Convert Signed multiply, signed and unsigned divide target/arm: Convert MOVW, MOVT target/arm: Convert LDM, STM target/arm: Diagnose writeback register in list for LDM for v7 target/arm: Diagnose too few registers in list for LDM/STM target/arm: Diagnose base == pc for LDM/STM target/arm: Convert B, BL, BLX (immediate) target/arm: Convert SVC target/arm: Convert RFE and SRS target/arm: Convert Clear-Exclusive, Barriers target/arm: Convert CPS (privileged) target/arm: Convert SETEND target/arm: Convert PLI, PLD, PLDW target/arm: Convert Unallocated memory hint target/arm: Convert Table Branch target/arm: Convert SG target/arm: Convert TT target/arm: Simplify disas_thumb2_insn target/arm: Simplify disas_arm_insn target/arm: Add skeleton for T16 decodetree target/arm: Convert T16 data-processing (two low regs) target/arm: Convert T16 load/store (register offset) target/arm: Convert T16 load/store (immediate offset) target/arm: Convert T16 add pc/sp (immediate) target/arm: Convert T16 load/store multiple target/arm: Convert T16 add/sub (3 low, 2 low and imm) target/arm: Convert T16 one low register and immediate target/arm: Convert T16 branch and exchange target/arm: Convert T16 add, compare, move (two high registers) target/arm: Convert T16 adjust sp (immediate) target/arm: Convert T16, extract target/arm: Convert T16, Change processor state target/arm: Convert T16, Reverse bytes target/arm: Convert T16, nop hints target/arm: Split gen_nop_hint target/arm: Convert T16, push and pop target/arm: Convert T16, Conditional branches, Supervisor call target/arm: Convert T16, Miscellaneous 16-bit instructions target/arm: Convert T16, shift immediate target/arm: Convert T16, load (literal) target/arm: Convert T16, Unconditional branch target/arm: Convert T16, long branches target/arm: Clean up disas_thumb_insn target/arm: Inline gen_bx_im into callers target/arm/translate.c | 7068 ++++++++++++++-------------------- target/arm/Makefile.objs | 24 + target/arm/a32-uncond.decode | 74 + target/arm/a32.decode | 534 +++ target/arm/t16.decode | 279 ++ target/arm/t32.decode | 629 +++ 6 files changed, 4536 insertions(+), 4072 deletions(-) create mode 100644 target/arm/a32-uncond.decode create mode 100644 target/arm/a32.decode create mode 100644 target/arm/t16.decode create mode 100644 target/arm/t32.decode -- 2.17.1