From patchwork Mon Jan 22 03:42:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 125323 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp951151ljf; Sun, 21 Jan 2018 20:10:21 -0800 (PST) X-Google-Smtp-Source: AH8x224SoCernUD1h1Rfm4XPge8Fm7gH0p42alVYO8u8iIfxcsWyEFw6cL8BRzm6kYqm9tVmh+8P X-Received: by 10.129.83.3 with SMTP id h3mr6179425ywb.268.1516594221733; Sun, 21 Jan 2018 20:10:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516594221; cv=none; d=google.com; s=arc-20160816; b=D6P9CIC/s5tu44NEpLdJQe6A4j6S9dUJCq7WhC7usOPTa+F5fb7xjp4L/D8+MZ1Omw gSnr7e5ShEktDddr0UzQfZRWhFj9oFzeUpXKQ9uDTjTf4LiGr3bZ2Bz0sf0uiaUPmmI6 /f6EHz4bzcP1SQxMTzM19KIbjk63gF/5ag8WYVtHkj8jeUOs8woo1D4K1vyWKAxETbFT 64y/FzkBpezOvFjVQUGtsG1K5v10wWQK5NFqJYY0kFJDeQaYU6pThz/3BmnjIcmpqIcF Q98sI+W8yxvjl4rsZQRVBEgG3PK3SyG5ATuQAA+apZLl2JEF520aUlZqXkMumRLjj6Y4 yKew== 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:arc-authentication-results; bh=I7hJmiQ1Q9yqUQ481WVu4Y1jv4Ki0Jen8UGkxnlcN08=; b=hlgiPGB7+zovw/WINNkTezO5Z8+z4Isl2nb29bN6go7oTNAA+NiCo64XSOj2Jf9lBC 8kuutmsc/N4Ur1M6WLclYP2fTUS7tkDkzoW0ql5AVJdArCvAZUaYmr/UIcxcqLY4cBN5 tfMiYkkOr7mTlWzuZd9+BebGkWAV47FC279XsgU7Z0+SOEWrwbLJyvmmAUt/Kv2KNWEY mY804hPtEmiu75VVdgxErDwMGX4gFHwHfh7omTSsgXZnX9xkxxJdqP17hGPBqCNhEp+1 Hj5yc+0rkrRiwvsTcJqJygBf60hUvoUNQsvojMDBIkQ+Z04pT/ZwLEDufLUZ6QvMY9Vv /wZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=I2WAboz0; 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 g83si966922yba.678.2018.01.21.20.10.21 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 21 Jan 2018 20:10:21 -0800 (PST) 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=I2WAboz0; 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]:41797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edTR7-0000Oy-4H for patch@linaro.org; Sun, 21 Jan 2018 23:10:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edT10-00064r-5v for qemu-devel@nongnu.org; Sun, 21 Jan 2018 22:43:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edT0w-0006sF-Du for qemu-devel@nongnu.org; Sun, 21 Jan 2018 22:43:22 -0500 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:33591) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edT0w-0006rq-8C for qemu-devel@nongnu.org; Sun, 21 Jan 2018 22:43:18 -0500 Received: by mail-pg0-x241.google.com with SMTP id u1so6097458pgr.0 for ; Sun, 21 Jan 2018 19:43:18 -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=I7hJmiQ1Q9yqUQ481WVu4Y1jv4Ki0Jen8UGkxnlcN08=; b=I2WAboz0ibOo4CbEduQdA/oQOpCT7QcRPvXLqTT0sOGwZoF41WgO7MkPAXgvWtg2/y wPk4AIt+0W9ysV4g+HDgkLSrhOanXBBOiCa6TmMI29e/NSplK6UvgkIWdxOl40M0ItJX vkNpsEVvoAK54VDWsBGNgbLq9Dw9Ey1Idd8oY= 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=I7hJmiQ1Q9yqUQ481WVu4Y1jv4Ki0Jen8UGkxnlcN08=; b=aUMyOTlYRykNX5yU9OyBJXk9irzNKxM35DZ+p5SA557L2UgenQEa1DL2fSpkSN66Ze lW0QDTI9FSMtTtnA5l+HeulzeqrmSX5j010hAhTECNhZdAoVcRaphd9MOC7jALh/LWpu RPb2uNozikeAV1Eo2omL/nBFWmE5EauWRynTU8kewX2G2HH//7CWQAaxDa+RyRjHRD2W TsXN4AQKOLEsGdWEjW7q5Y8aeSd9lm/CavSB+3WePCIyl5BJ2J/ESgu+5ISnhFKVVOO5 oEUL9ORo9FYnwbKAt4v4IqJwnDJu0mEPRi/AZEK++/D49BuAtvutxwqWF1Oj4DBFbeih iH7Q== X-Gm-Message-State: AKwxytf5EcVwa1o9oN27iCjBA3Mk9zETESaxWtf62EBNGd/jgs8nrUVi FhJevSMJ70evQ8BcrAKENLaFW+shJlE= X-Received: by 2002:a17:902:b909:: with SMTP id bf9-v6mr2818324plb.218.1516592596908; Sun, 21 Jan 2018 19:43:16 -0800 (PST) Received: from cloudburst.twiddle.net (174-21-6-47.tukw.qwest.net. [174.21.6.47]) by smtp.gmail.com with ESMTPSA id z125sm182023pfz.27.2018.01.21.19.43.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 21 Jan 2018 19:43:16 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 21 Jan 2018 19:42:13 -0800 Message-Id: <20180122034217.19593-40-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180122034217.19593-1-richard.henderson@linaro.org> References: <20180122034217.19593-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] [PULL 39/43] target/hppa: Implement STWA 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/hppa/translate.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) -- 2.14.3 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 8884754f05..74f78ab4e0 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3097,6 +3097,22 @@ static DisasJumpType trans_ldwa_idx_x(DisasContext *ctx, uint32_t insn, ctx->mmu_idx = hold_mmu_idx; return ret; } + +static DisasJumpType trans_stwa_idx_i(DisasContext *ctx, uint32_t insn, + const DisasInsn *di) +{ + int hold_mmu_idx = ctx->mmu_idx; + DisasJumpType ret; + + CHECK_MOST_PRIVILEGED(EXCP_PRIV_OPR); + + /* ??? needs fixing for hppa64 -- ldda does not follow the same + format wrt the sub-opcode in bits 6:9. */ + ctx->mmu_idx = MMU_PHYS_IDX; + ret = trans_st_idx_i(ctx, insn, di); + ctx->mmu_idx = hold_mmu_idx; + return ret; +} #endif static const DisasInsn table_index_mem[] = { @@ -3106,8 +3122,9 @@ static const DisasInsn table_index_mem[] = { { 0x0c0001c0u, 0xfc0003c0, trans_ldcw }, { 0x0c001300u, 0xfc0013c0, trans_stby }, #ifndef CONFIG_USER_ONLY - { 0x0c001180u, 0xfc00d3c0, trans_ldwa_idx_i }, /* LDWA, im */ { 0x0c000180u, 0xfc00d3c0, trans_ldwa_idx_x }, /* LDWA, rx */ + { 0x0c001180u, 0xfc00d3c0, trans_ldwa_idx_i }, /* LDWA, im */ + { 0x0c001380u, 0xfc00d3c0, trans_stwa_idx_i }, /* STWA, im */ #endif };