From patchwork Mon Jan 22 03:41:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 125317 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp950032ljf; Sun, 21 Jan 2018 20:06:41 -0800 (PST) X-Google-Smtp-Source: AH8x225MmVZLLXJ0IO6tzijlKYYBxR/XSfNSOL4MKh6YqaGrYrlwUAwZkRzhlBzanwalvTT+rEHh X-Received: by 10.129.116.67 with SMTP id p64mr6103139ywc.110.1516594001237; Sun, 21 Jan 2018 20:06:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516594001; cv=none; d=google.com; s=arc-20160816; b=oamzYzULRZcZR2QhHGy0UoxydQhHK4BcF52PNfKRoGVYaG89KfvaWnUBgziHVjedS5 Qa5TiB0fLFMCoN5JvDhxnTw+JzRXkax4dPbZ/Z1STsNrfQ8HMTWUD+uxXbYmGswvZI9E O9InQw4DzvBw9NAJUL64HBbOjliAhpfOKdp6vBCp480QunB/S3Mc8dkKJb0zjg2ReTO1 xnuBQsjxcK6r9IsvNftGTqdPhhZ4YpK2JiCQ/bNzFRC/MyNo09YkvgmH/61TZ4CkB/oy 5z2wK1svxJPXJ3duMF6RIUhfFelvDyw6jvB8ctIkzDqMxucaT7aWWmn7s4cNkbe7wsGM Rj3A== 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=+LBPh6yn6UG1tncxst9Z9jkRXDXaqBy3i48OJuMm2Uw=; b=x5Kgad2/1/g3+GriR1JuXpAvUUbns9VCu017sAbzTFQjcdIHuEn/euKihLQ7BcXfAc 1wvB3tHCsDKOnyue6k/pVFrGA2Uyp8mYQv0E/ba7gmfLCOMSVObqu8lDUTspIhA+AeNq QH5Lac+P2rLXnSw9JqNlHytR/DLBIMfcMIlJjBSPlkeoa6vUUPfVJ5+gFsIHhrajQyHJ eOuxccapXS+1Kueoot105h4uOjCfLp2o6S+TenbkiL3qNxhc0RUkb67inV0kriMaXdEV MSPCniu4CMbcJ3xlLFgJ3DA8vPIHTfRcnd2jsmRHQCfPb9FC7fJVhmrH45wdhxiQi1wH pdOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NO27F4Wl; 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 n3si3498451ywi.572.2018.01.21.20.06.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 21 Jan 2018 20:06:41 -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=NO27F4Wl; 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]:41766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edTNY-0005pJ-IO for patch@linaro.org; Sun, 21 Jan 2018 23:06:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edT0e-0005ls-RA for qemu-devel@nongnu.org; Sun, 21 Jan 2018 22:43:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edT0b-0006cx-9N for qemu-devel@nongnu.org; Sun, 21 Jan 2018 22:43:00 -0500 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:35399) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edT0b-0006cd-3q for qemu-devel@nongnu.org; Sun, 21 Jan 2018 22:42:57 -0500 Received: by mail-pf0-x244.google.com with SMTP id t12so6084435pfg.2 for ; Sun, 21 Jan 2018 19:42:56 -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=+LBPh6yn6UG1tncxst9Z9jkRXDXaqBy3i48OJuMm2Uw=; b=NO27F4WlC4xeAge41//flrsToc+Glnbkg81W+wWvrpPqFt70t2jOtlE4otU6uZ4ulw N+RBc5DjtpnPxgavTlm+zmLrBhI6tgeI6ioBfxl63fu88UoosJADmcR7n7n061MOTb7k C1RCYozypUQHt+m3duY4riA7cUyHO2sbGyCus= 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=+LBPh6yn6UG1tncxst9Z9jkRXDXaqBy3i48OJuMm2Uw=; b=SaYmQoQQD0yyOtdQuAs66BkgXaqV0vtovf70RdFsMUwXU255Qlh5py/q+VSo3Iry5w IM5dR+fUeIK/Gq6z0vYXvQB2xcBfKJcU8eVPVKk2HIfjHZjn0EeUs6OPzhGd/26ELvti l59WiiY6mRp4h/baa97N3vJg7JPgTMaiQKoQzPLsXEQSBxpE91Nmz82SKdumTgePE+Pm AocDn82fCVxgGXEAD3Dtw0YwwVrwf6U4PcaVkWJWJnva7oEVKyeJbVP2UgkINbOdMY8T 1S04AFYhYB+aaS3OcZZefpPFslNqt1R4I4KavoC6UEk0BKGAovhVx10MulUt/sIsuHAR b9xA== X-Gm-Message-State: AKwxytc4O1u0uLC1jB/nfdWHxsehnkuhMA2zLegdhxfIMR0tJW+C2a/d 0IcaLt6C3YjtS4S1z8M05eBmWxkSmZ4= X-Received: by 10.99.49.200 with SMTP id x191mr5871060pgx.394.1516592575858; Sun, 21 Jan 2018 19:42:55 -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.42.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 21 Jan 2018 19:42:54 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 21 Jan 2018 19:41:59 -0800 Message-Id: <20180122034217.19593-26-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:c00::244 Subject: [Qemu-devel] [PULL 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/hppa/translate.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -- 2.14.3 diff --git a/target/hppa/translate.c b/target/hppa/translate.c index bbef2f0d7f..b207ae192a 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2451,6 +2451,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[] = { @@ -2479,6 +2498,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 };