From nobody Tue Feb 10 21:41:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549541288924872.6257981660048; Thu, 7 Feb 2019 04:08:08 -0800 (PST) Received: from localhost ([127.0.0.1]:38604 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1griTH-0001Tt-RL for importer@patchew.org; Thu, 07 Feb 2019 07:07:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1griGJ-0007ZY-AA for qemu-devel@nongnu.org; Thu, 07 Feb 2019 06:54:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1griGI-0001Y4-6l for qemu-devel@nongnu.org; Thu, 07 Feb 2019 06:54:35 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:34849) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1griGH-0001Uj-S5 for qemu-devel@nongnu.org; Thu, 07 Feb 2019 06:54:34 -0500 Received: by mail-wr1-x430.google.com with SMTP id z18so10469554wrh.2 for ; Thu, 07 Feb 2019 03:54:24 -0800 (PST) Received: from cloudburst.twiddle.net ([37.205.61.206]) by smtp.gmail.com with ESMTPSA id w16sm34030016wrp.1.2019.02.07.03.54.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 03:54:21 -0800 (PST) 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=5eR9KLiIUibEJw+xJwMCc4YWzeNV64NP5eSefPsjlPw=; b=nXG3q0zrfxYN/hrC1ArloLDBXJqSJy7DSWJJPqAJqfpNY3iHxW8DHK3OI2Akp5LJte 3dcPXet8BS+B4tHtd+R7tO9nhxSqUNu+msy5Tc0dEG6+NJqT2KjUNy1MwD0jG0WtpLwG 2DoyL9hp0e7+Fam4xsjmSeBzQrtqdtx02APpfaVGAGOompJHEVzTQXPszmqfw98UIzdw +qAzXYI3r+XSCwbIP7LxlCRryfiNwGsb89hUWVBwF366x8nQmj1ZwcB2jV8ELZPLENbm qND6GRbCDmofFmAAVcNS50+AVYbi7EquKR4MgTTp6ioKk7BGLhfvGT//vKT4ecVgDbDR zKrQ== 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=5eR9KLiIUibEJw+xJwMCc4YWzeNV64NP5eSefPsjlPw=; b=AohISiEEHjT70kjFxztbjfov0FHBthFdqZLqA2mNdQ2/fJeCqqodTMYjqY4LG3RXlH kFSo407JeFWFAYls8lhHt9dUIVUmiTieYK6DGHXLxk5J2TNw9zx3fgLT6wdnIJwAskIR y36GOCrsEqiFWKRCr/aebtdPsxhM7rzpteEj+8hn8Ryfz7cSUbsqz+QG9qF3qIAEz0cb FHmJvg+tZcZojR8kBGHcYOXIn4Lw2DfQwzyEK5ucEUE6UBrSR3muowVEFkso9kOGjBDZ CFg6ihnmpHoMUIAoDPCrqjuc1rL5DZUpwKX76j72F/JhgYqHj+ge4YJybZv3e6BT9LbY qtWw== X-Gm-Message-State: AHQUAubBRiJnptS9CZ7wwb2Iw1XsMbVBlgXd8DQAQJTbAy4LBsJsBb05 /eT9B2mwv6GkhDd+df7sTAv0cluaArIulg== X-Google-Smtp-Source: AHgI3Ibe/Z0gekmGaw6N4/w0knzcqvm95r1YkLlSVIQJUXZZiU8DDAtBpKEsAn6S9RrQdYW//49miw== X-Received: by 2002:adf:ba8c:: with SMTP id p12mr12245581wrg.146.1549540462955; Thu, 07 Feb 2019 03:54:22 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 7 Feb 2019 11:53:57 +0000 Message-Id: <20190207115400.647-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190207115400.647-1-richard.henderson@linaro.org> References: <20190207115400.647-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::430 Subject: [Qemu-devel] [PATCH 16/19] target/hppa: Convert halt/reset insns 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: deller@gmx.de, svens@stackframe.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- target/hppa/translate.c | 49 ++++++++++++---------------------------- target/hppa/insns.decode | 5 ++++ 2 files changed, 20 insertions(+), 34 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 4ecd522e51..c73a7ab3db 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2376,20 +2376,27 @@ static bool trans_rfi_r(DisasContext *ctx, arg_rfi_= r *a) return do_rfi(ctx, true); } =20 -#ifndef CONFIG_USER_ONLY -static bool gen_hlt(DisasContext *ctx, int reset) +static bool trans_halt(DisasContext *ctx, arg_halt *a) { CHECK_MOST_PRIVILEGED(EXCP_PRIV_OPR); +#ifndef CONFIG_USER_ONLY nullify_over(ctx); - if (reset) { - gen_helper_reset(cpu_env); - } else { - gen_helper_halt(cpu_env); - } + gen_helper_halt(cpu_env); ctx->base.is_jmp =3D DISAS_NORETURN; return nullify_end(ctx); +#endif +} + +static bool trans_reset(DisasContext *ctx, arg_reset *a) +{ + CHECK_MOST_PRIVILEGED(EXCP_PRIV_OPR); +#ifndef CONFIG_USER_ONLY + nullify_over(ctx); + gen_helper_reset(cpu_env); + ctx->base.is_jmp =3D DISAS_NORETURN; + return nullify_end(ctx); +#endif } -#endif /* !CONFIG_USER_ONLY */ =20 static bool trans_nop_addrx(DisasContext *ctx, arg_ldst *a) { @@ -4134,32 +4141,6 @@ static void translate_one(DisasContext *ctx, uint32_= t insn) case 0x2E: translate_table(ctx, insn, table_fp_fused); return; - - case 0x04: /* spopn */ - case 0x05: /* diag */ - case 0x0F: /* product specific */ - break; - - case 0x07: /* unassigned */ - case 0x15: /* unassigned */ - case 0x1D: /* unassigned */ - case 0x37: /* unassigned */ - break; - case 0x3F: -#ifndef CONFIG_USER_ONLY - /* Unassigned, but use as system-halt. */ - if (insn =3D=3D 0xfffdead0) { - gen_hlt(ctx, 0); /* halt system */ - return; - } - if (insn =3D=3D 0xfffdead1) { - gen_hlt(ctx, 1); /* reset system */ - return; - } -#endif - break; - default: - break; } gen_illegal(ctx); } diff --git a/target/hppa/insns.decode b/target/hppa/insns.decode index 25ac09d9d6..f564e54f1d 100644 --- a/target/hppa/insns.decode +++ b/target/hppa/insns.decode @@ -103,6 +103,11 @@ ssm 000000 .......... 000 01101011 t:5 = i=3D%sm_imm rfi 000000 ----- ----- --- 01100000 00000 rfi_r 000000 ----- ----- --- 01100101 00000 =20 +# These are artificial instructions used by QEMU firmware. +# They are allocated from the unassigned instruction space. +halt 1111 1111 1111 1101 1110 1010 1101 0000 +reset 1111 1111 1111 1101 1110 1010 1101 0001 + #### # Memory Management #### --=20 2.17.2