From nobody Mon Feb 9 15:52:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151889963884962.837904866975805; Sat, 17 Feb 2018 12:33:58 -0800 (PST) Received: from localhost ([::1]:60375 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1en9BB-0001LA-Qf for importer@patchew.org; Sat, 17 Feb 2018 15:33:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1en994-0008Oy-Qd for qemu-devel@nongnu.org; Sat, 17 Feb 2018 15:31:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1en993-0000jZ-Hb for qemu-devel@nongnu.org; Sat, 17 Feb 2018 15:31:42 -0500 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:41651) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1en993-0000jB-Aq for qemu-devel@nongnu.org; Sat, 17 Feb 2018 15:31:41 -0500 Received: by mail-pg0-x241.google.com with SMTP id t4so4412657pgp.8 for ; Sat, 17 Feb 2018 12:31:41 -0800 (PST) Received: from cloudburst.twiddle.net ([50.0.192.64]) by smtp.gmail.com with ESMTPSA id y7sm48203797pfe.26.2018.02.17.12.31.38 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Feb 2018 12:31:38 -0800 (PST) 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=1JzbxS8rOBy0VrzamLLiGiQjn/KzPVZOI//dCcG7ieU=; b=EK1bz366tXEQ+DZEVh6pYqtWMYUvVveKlJIdScwJV7I+ShEuXdBhcXX0F6NOQxfPn/ RrQ4rrovjvFxob9m+DIQX0dI3XU14QpYW6d9PxHSQNB8lFajgd5N4AHIKQjWosZWNO32 Og6Z2EyLJ62tky85q3pOjwO53SyJrsVbczoRI= 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=1JzbxS8rOBy0VrzamLLiGiQjn/KzPVZOI//dCcG7ieU=; b=maU0UiW0MMVSb+CYF3ZCRXoWXX4aQuFSkb0tXx/MrP2Tmhch1JM3id7NcuFFrushVG 3NuIzBCo+73+T0U4cv9BuVtOw8K0RoSqdh8qTk1Tgg54GVUdioZCNiLAQvB6ehDvRZ9q JglwEq0GmoERSLYgJgHQ3J5B1KPMTvDeExfv0MUjY80M+TkPYtEn3FqzRNzU2Qbe+87a T4X5q69pUaJjgqYGHjr0Mbap4UUrMPcnSuhIsVv/9dUcNRtuOiSPk7f8IvCQ5tPNciGl W7Anf7SLDqbEdl68pSAx32dj8SRQV8mUeiBrT7HKw9gWzcFfk2PArBNjjVT6w2fqmUWy 9wkw== X-Gm-Message-State: APf1xPCCHQhavY/7ixZxUUZQFko6YeP5McYLmgOJ5kn6PtSKSY3LRt32 BDU15Wh4kSFbhLX41cvd0Kw3UGmdv2A= X-Google-Smtp-Source: AH8x225P/Jl+VYD+AS/14LiWjjqF+MZYcHBzejJ3uUdk0nWPSBXYnODlSItraizj800tM+9V4ANvfw== X-Received: by 10.99.186.88 with SMTP id l24mr8322415pgu.369.1518899499796; Sat, 17 Feb 2018 12:31:39 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 17 Feb 2018 12:31:15 -0800 Message-Id: <20180217203132.31780-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180217203132.31780-1-richard.henderson@linaro.org> References: <20180217203132.31780-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:c05::241 Subject: [Qemu-devel] [PATCH 02/19] target/hppa: Begin using scripts/decodetree.py 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Convert the BREAK instruction to start. Signed-off-by: Richard Henderson --- target/hppa/translate.c | 14 +++++++++++--- target/hppa/Makefile.objs | 8 ++++++++ target/hppa/insns.decode | 24 ++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 target/hppa/insns.decode diff --git a/target/hppa/translate.c b/target/hppa/translate.c index f72bc84873..a503ae38d4 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -290,6 +290,9 @@ typedef struct DisasContext { bool psw_n_nonzero; } DisasContext; =20 +/* Include the auto-generated decoder. */ +#include "decode.inc.c" + /* We are not using a goto_tb (for whatever reason), but have updated the iaq (for whatever reason), so don't do it again on exit. */ #define DISAS_IAQ_N_UPDATED DISAS_TARGET_0 @@ -1997,7 +2000,7 @@ static void trans_nop(DisasContext *ctx, uint32_t ins= n, const DisasInsn *di) cond_free(&ctx->null_cond); } =20 -static void trans_break(DisasContext *ctx, uint32_t insn, const DisasInsn = *di) +static void trans_break(DisasContext *ctx, arg_break *a, uint32_t insn) { nullify_over(ctx); gen_excp_iir(ctx, EXCP_BREAK); @@ -2320,7 +2323,6 @@ static void gen_hlt(DisasContext *ctx, int reset) #endif /* !CONFIG_USER_ONLY */ =20 static const DisasInsn table_system[] =3D { - { 0x00000000u, 0xfc001fe0u, trans_break }, { 0x00001820u, 0xffe01fffu, trans_mtsp }, { 0x00001840u, 0xfc00ffffu, trans_mtctl }, { 0x016018c0u, 0xffe0ffffu, trans_mtsarcm }, @@ -4508,8 +4510,14 @@ static void translate_table_int(DisasContext *ctx, u= int32_t insn, =20 static void translate_one(DisasContext *ctx, uint32_t insn) { - uint32_t opc =3D extract32(insn, 26, 6); + uint32_t opc; =20 + /* Transition to the auto-generated decoder. */ + if (decode(ctx, insn)) { + return; + } + + opc =3D extract32(insn, 26, 6); switch (opc) { case 0x00: /* system op */ translate_table(ctx, insn, table_system); diff --git a/target/hppa/Makefile.objs b/target/hppa/Makefile.objs index 3359da5341..174f50a96c 100644 --- a/target/hppa/Makefile.objs +++ b/target/hppa/Makefile.objs @@ -1,3 +1,11 @@ obj-y +=3D translate.o helper.o cpu.o op_helper.o gdbstub.o mem_helper.o obj-y +=3D int_helper.o obj-$(CONFIG_SOFTMMU) +=3D machine.o + +DECODETREE =3D $(SRC_PATH)/scripts/decodetree.py + +target/hppa/decode.inc.c: $(SRC_PATH)/target/hppa/insns.decode $(DECODETRE= E) + $(call quiet-command,\ + $(PYTHON) $(DECODETREE) -o $@ $<, "GEN", $(TARGET_DIR)$@) + +target/hppa/translate.o: target/hppa/decode.inc.c diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode new file mode 100644 index 0000000000..6c2d3a3a52 --- /dev/null +++ b/target/hppa/insns.decode @@ -0,0 +1,24 @@ +# +# HPPA instruction decode definitions. +# +# Copyright (c) 2018 Richard Henderson +# +# 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 . +# + +#### +# System +#### + +break 000000 ----- ----- --- 00000000 ----- --=20 2.14.3