From patchwork Fri Dec 29 06:31:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 10136101 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E7B9760318 for ; Fri, 29 Dec 2017 06:53:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8DF62D35D for ; Fri, 29 Dec 2017 06:53:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC9362D364; Fri, 29 Dec 2017 06:53:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5A84A2D35D for ; Fri, 29 Dec 2017 06:53:38 +0000 (UTC) Received: from localhost ([::1]:57061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUoXx-00058x-HZ for patchwork-qemu-devel@patchwork.kernel.org; Fri, 29 Dec 2017 01:53:37 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUoDR-0003G1-3e for qemu-devel@nongnu.org; Fri, 29 Dec 2017 01:32:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUoDP-0004oq-PP for qemu-devel@nongnu.org; Fri, 29 Dec 2017 01:32:24 -0500 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:43808) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eUoDP-0004oZ-KH for qemu-devel@nongnu.org; Fri, 29 Dec 2017 01:32:23 -0500 Received: by mail-pg0-x244.google.com with SMTP id f18so4054644pga.10 for ; Thu, 28 Dec 2017 22:32:23 -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=sOML06vkT4KHCSC5eOi3peqgILjV/PKgKOmv7Et4M0M=; b=PeY9Sh3zt3XfZe4Q+k1tJaP+eEUOuTT3CgzrqWpSU/zGaRpCtOJ6W4rgi0+MiFL/nU ZZGe+5rkxRoF8z54cPHSwelCvJtM3FwSf1ShTsGTdBhWqRD+BIOBz5lQpHhrzlAQcp/a Gl+8ki4GkqoNhYekvW/wGhvH1GsKaHQohUyiw= 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=sOML06vkT4KHCSC5eOi3peqgILjV/PKgKOmv7Et4M0M=; b=L3fDp3mFsg4cZ/56sIhBVn9eZ3NjTjV/9jnYvEWR/T51t3E+C0buH657YSimUVMECn OJbSokyeYuyppDyoSRniztzVBSQvIBvNlzei4Qksbl5rpZ6gTzrP8UuFyHJsk/ffOmXW qBtZMZLbYzUGemGfOH/Xljjh1xzQh+LAiqcfOJeCLzwcik13k8QHH5xYxqeSwRTd5hkp gLYn5OjGsyPf6Qgm/SuDGhEN2tCURSQFquiEnriBXppS9xFDQ/aijbwTmp29WxosbyHO N8fo3JkPFaUSTI7TZY11DghqFSnfcgqsecLnV2lrvjYVH+GSNakuWfZrpO7P5+eLCwXx b1xQ== X-Gm-Message-State: AKGB3mKRYNaVRtuDd9Xo/hxAnuJy7qXswSL7iE0kGGyKYfsUeGz+IF5D SJzc+IKZBZzAHLaBzO3Y8UtMMq9v010= X-Google-Smtp-Source: ACJfBou9iqHR+ktsPPfOPN093RhGSI96FsHXH+euicvvsezjXvKjim3PfGQLdEOPu9WcW7wqXCN8QA== X-Received: by 10.98.24.207 with SMTP id 198mr34084109pfy.3.1514529142415; Thu, 28 Dec 2017 22:32:22 -0800 (PST) Received: from cloudburst.twiddle.net (97-113-183-164.tukw.qwest.net. [97.113.183.164]) by smtp.gmail.com with ESMTPSA id c28sm76539063pfe.69.2017.12.28.22.32.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Dec 2017 22:32:21 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 28 Dec 2017 22:31:33 -0800 Message-Id: <20171229063145.29167-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171229063145.29167-1-richard.henderson@linaro.org> References: <20171229063145.29167-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::244 Subject: [Qemu-devel] [PATCH 26/38] 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: deller@gmx.de Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 ec61c57e55..2e3edf8957 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2453,6 +2453,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[] = { @@ -2481,6 +2500,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 };