From patchwork Sun Jan 28 23:15:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 126122 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp1986952ljd; Sun, 28 Jan 2018 15:43:36 -0800 (PST) X-Google-Smtp-Source: AH8x226gZ7XVuJrym/0iBQwUHTDOIN0pWR92tgN+6LPeq3X91WE5MzRSNojX9m6KUjLLtwbAWWYF X-Received: by 10.129.130.196 with SMTP id s187mr15720663ywf.101.1517183016380; Sun, 28 Jan 2018 15:43:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517183016; cv=none; d=google.com; s=arc-20160816; b=QMahmji9sBFs7uaoofBpZcCBkf3JztzDpe8Nqm3PT1nWX1Vq3tSS4cnyF+sfvfHiQQ Sb2qp+7txNPAKcLbnkB1eHOqnPOA619CFTv5I8JuWjmH1T1zj0IX9lG2q4UQ37S/9uxo YXE5r/lSY1XPpIVEzX4CsIwU2ZwRuM7bzavOrrIIuLxF9JWgY1aFnqOFE/0tNeICuonJ +Bhqsu5BASHvYOeekSmIfkYfke1G660laMstw4RZdvOdnkaMrpedsd1ecAx3mkKDJ4mt OD8gdNEru9496ShYOe9+GOhJq9DYyN6et7Es+ai/Ke05tnxCe5BfM157+D62BYssMnjt iRYQ== 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=mAVHaLoUOgItDvWDmsq3JGoLZftVOaugLdkVZOQP1t4=; b=iOgV3FQu2n8vPpu0q6+azf3OPwoALrC0leD2NJTS1xe58xa87f5zHy0vnY/KLMCqgg YC3GXDxnn3E41w7OERt20LXm4qJZ1eZWjM6tX/uccx7/x+0+F7XKXuXsmsQXnhITfrtF fO0B1hlhQkKhUNgbZo6EADr+qq+ZsBLmRfWtDxJgB8DAqUo1XNVP41ivTT1zkOZK0S+P 7hkqRwGT6Hkr/vO+cEZF2ZLM1G4cHPVhDxCZioj0Mxqv39WcLwUX/mZ6S8d+Fj63uEtn rtS6ZEbC2EkvPrd+YjPexJZh6zzIFgwP6ZURnYoFFjHWo1mk/4onIvVU5jR+4PBfuabA iWfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XgWsT3rt; 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 u188si1840868ywd.25.2018.01.28.15.43.36 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 28 Jan 2018 15:43:36 -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=XgWsT3rt; 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]:45092 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efwbn-0006Qx-N6 for patch@linaro.org; Sun, 28 Jan 2018 18:43:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efwBZ-0003BR-BB for qemu-devel@nongnu.org; Sun, 28 Jan 2018 18:16:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efwBY-0000WP-GQ for qemu-devel@nongnu.org; Sun, 28 Jan 2018 18:16:29 -0500 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:38936) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1efwBY-0000Ue-AH for qemu-devel@nongnu.org; Sun, 28 Jan 2018 18:16:28 -0500 Received: by mail-pg0-x243.google.com with SMTP id w17so3002694pgv.6 for ; Sun, 28 Jan 2018 15:16:28 -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=mAVHaLoUOgItDvWDmsq3JGoLZftVOaugLdkVZOQP1t4=; b=XgWsT3rti/1G+ecGXzFlMRpHfkztsfrXO/e3OsKVhla5FGEODXNTQKIqHN2jsedwhd 0jBGRwsIZAb08EzH8nRfNIEafCJYEHHn5lgqSJWb4Uuyt2TdL0/u6d0PyIjNfZJyFZgn 02lBELrBz3h6QP2MoSOjZhEQlb2nse1Ld+dYA= 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=mAVHaLoUOgItDvWDmsq3JGoLZftVOaugLdkVZOQP1t4=; b=gV9AFHcstO075tAcPOaQtKwuOHILUeOjga673qMsquONlyudB4t9aGX0WlGwhFjfc8 iKg9bK1iT8JB/TIlMD/zmsXBSywvag9lmIMMjPcgrQnZLX0fT7DNL4Xltg3A5hVouhU+ BgmdvfLSQzoFBxYxTF5O5LlJtVMSIOxk4XO7dkG0E/ywK0RxrmAYTvHfCKHDScEX9WqA kX4NX50Srks5LPhfoCjQ3bDMHeF95daEWDogTi4wrNARjACjVmCaTNG9XJAFpvGHbgom 9QkzmqmSKuo5ScT/z6sQ43uhzHuRwdH5LlumCTKdTdmXE/MOmfyKLFv2XPGqdVR1yhKe 30fg== X-Gm-Message-State: AKwxytfZuJ9z9G7vYy9AHIg215OTtoNTGzYV0LnykcLK030dhrE1AwQ1 RHIBwBxFgbHg0MuvqLXa0+t4kvyyfFM= X-Received: by 2002:a17:902:8497:: with SMTP id c23-v6mr10268925plo.357.1517181387117; Sun, 28 Jan 2018 15:16:27 -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 r27sm26949344pfj.75.2018.01.28.15.16.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jan 2018 15:16:26 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 28 Jan 2018 15:15:22 -0800 Message-Id: <20180128231528.22719-38-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180128231528.22719-1-richard.henderson@linaro.org> References: <20180128231528.22719-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::243 Subject: [Qemu-devel] [PULL v4 37/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 d84090d479..b9b097acc9 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3108,6 +3108,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[] = { @@ -3117,8 +3133,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 };