From patchwork Sun Jan 28 23:15:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 866954 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="RhwczZgu"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zV8Dq6BLzz9sBd for ; Mon, 29 Jan 2018 10:36:59 +1100 (AEDT) Received: from localhost ([::1]:45040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efwVO-0001T9-0E for incoming@patchwork.ozlabs.org; Sun, 28 Jan 2018 18:36:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1efwBI-0002xm-6e for qemu-devel@nongnu.org; Sun, 28 Jan 2018 18:16:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1efwBH-0000A9-Ah for qemu-devel@nongnu.org; Sun, 28 Jan 2018 18:16:12 -0500 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:36686) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1efwBH-00009b-4S for qemu-devel@nongnu.org; Sun, 28 Jan 2018 18:16:11 -0500 Received: by mail-pf0-x241.google.com with SMTP id 23so3261869pfp.3 for ; Sun, 28 Jan 2018 15:16:11 -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=8xzSBqTDqbAsaks2scycjrLsfLpa0BF7CTKM2I7mUds=; b=RhwczZguJCI+3FBbL4uuYWwO7PtPgvZvuEs/wAoGIRgDb/lzXBUPHE4idp0pZ94y40 GzANkI2Cca8X6SMGG20oN3fVHh941YXjtC6O8HDRwiDtqze1KeFgoJ5HLl097aESBCk8 TGO8xvXaC2OFPIHqIUbo0Z2rFoBNDGedMf8lA= 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=8xzSBqTDqbAsaks2scycjrLsfLpa0BF7CTKM2I7mUds=; b=qMuhvvFn1LASHwnFWJEXOdNukriEatmrOcrTMFhoGkhrx0DUrEw6nucHUosXORFKU6 q3RsIvWmsm2uktvKb/mMUKvN80kowFpRH75OtV2pqvg0N7xORQE8PX7ptja4PKfpatS9 OZoZFnhDToVlNWjSXZYY6AGuW2+1T+jV34Rbher0J6ze48SAqXRkqoSQiJXawk69JXAm HsgFXZC3SfmNorcV+eSYIddlwWPJ/U45jFwu7Edz9uuNC2SKKaZdMRp+i+Tki7IssuLo bpif/C8T1Ylij1jFi0KyYp+VtNflby45zGdSncAdAnwp4YWPe3lp92P1SA7dHu3DVZmf KgHA== X-Gm-Message-State: AKwxytfnsbqKiA1ozs0ZnbLZhVtU0iL6YJMnOWdq5dn5lGtlC/4aEswR GFt0e6Sx3C5q+AwbJRccqyJvQPL9pV4= X-Google-Smtp-Source: AH8x225fNhLPhG+M8rnUpeyBWMv2q9X7PIr75aJiBOAY5SwnqknGkBYVue/95ot+KtvAtCYedeWgWw== X-Received: by 10.98.155.8 with SMTP id r8mr24785349pfd.94.1517181369912; Sun, 28 Jan 2018 15:16:09 -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.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jan 2018 15:16:08 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 28 Jan 2018 15:15:10 -0800 Message-Id: <20180128231528.22719-26-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:c00::241 Subject: [Qemu-devel] [PULL v4 25/43] target/hppa: Implement LCI 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/hppa/translate.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 082221f450..41e28ff64c 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2462,6 +2462,25 @@ static DisasJumpType trans_lpa(DisasContext *ctx, uint32_t insn, return nullify_end(ctx, DISAS_NEXT); } + +static DisasJumpType trans_lci(DisasContext *ctx, uint32_t insn, + const DisasInsn *di) +{ + unsigned rt = extract32(insn, 0, 5); + TCGv_reg ci; + + CHECK_MOST_PRIVILEGED(EXCP_PRIV_OPR); + + /* The Coherence Index is an implementation-defined function of the + physical address. Two addresses with the same CI have a coherent + view of the cache. Our implementation is to return 0 for all, + since the entire address space is coherent. */ + ci = tcg_const_reg(0); + save_gpr(ctx, rt, ci); + tcg_temp_free(ci); + + return DISAS_NEXT; +} #endif /* !CONFIG_USER_ONLY */ static const DisasInsn table_mem_mgmt[] = { @@ -2490,6 +2509,7 @@ static const DisasInsn table_mem_mgmt[] = { { 0x04001200u, 0xfc001fdfu, trans_pxtlbx }, /* pdtlb */ { 0x04001240u, 0xfc001fdfu, trans_pxtlbx }, /* pdtlbe */ { 0x04001340u, 0xfc003fc0u, trans_lpa }, + { 0x04001300u, 0xfc003fe0u, trans_lci }, #endif };