From patchwork Tue May 29 10:49:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 10434969 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 46C4F601E9 for ; Tue, 29 May 2018 11:01:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36D30286E2 for ; Tue, 29 May 2018 11:01:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B701286E4; Tue, 29 May 2018 11:01:13 +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=-3.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FSL_HELO_FAKE, MAILING_LIST_MULTI, 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 A96E4286E2 for ; Tue, 29 May 2018 11:01:12 +0000 (UTC) Received: from localhost ([::1]:60136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcNL-00017m-OG for patchwork-qemu-devel@patchwork.kernel.org; Tue, 29 May 2018 07:01:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNcDO-0001dv-SD for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNcDN-00049M-VM for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:54 -0400 Received: from mail-wr0-x22a.google.com ([2a00:1450:400c:c0c::22a]:35396) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNcDN-000490-Nw for qemu-devel@nongnu.org; Tue, 29 May 2018 06:50:53 -0400 Received: by mail-wr0-x22a.google.com with SMTP id i14-v6so24685599wre.2 for ; Tue, 29 May 2018 03:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tfV82VksULdq9RIKvqMdYOOFnE7R92/bOcMHpwgotfA=; b=f6oIPOwCWxD5yvye/JVe3iOl4DA03nfSAr56Q+b08pubxyCg/VC/G3k/qQ9wOdF/bR /lt1hM8KulLIJ40qvTqTB4LMxrGttozoktjin5nqdLdFmozVg+kiBbDOrx/6ySyZ2dvf VqgTzVAOVZ/yq/HbEYQE9hDJzSoJk5pQHY0v0BNo7gac5tW/bp6BqChbOVhWXYCzR6pt pwSlz3mT5Hba89fHKexXzXoo/kiSZKq1hvoJ42q8K00C+UQYqPQ4usGI8vPjWe0xEsps zkz5iq/qxDPiySlGrIN1LxtHRupjS+wWF3ZiHG/02zMTHARUFDkkktFwPc+3Wm1xWK9E lZRg== 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=tfV82VksULdq9RIKvqMdYOOFnE7R92/bOcMHpwgotfA=; b=eerMuOJhSbWWjeaHcTGA5MCZugBl/TqrBcwguWUE8IL9jgXSIKDTaLweFMh/xhyHWt /k2KS3+7AFYHyD4R9+AzRPIJjLX8cwetz6gIh8zvWwC8i+Pinr8V1ZqZwHd2+wP/iNQr sFnZWKbtAUItA3i5DDrU/ickjCMAz6U/fFIpxVVWBMsw1viT8unUBoesPKYnhtwQEt0C 30u+0kapqOMTBDJ12b7WFOuQjEx6JlaMMkl+cPQJNUwDsa5/X7VTK/P5GwfTMnOGyIQ2 hAaM1kncNr+usCW2Q91AUgosNsOGUNwML6QzH+EfFC0u5OGzBGAKjwGFHo8XSwQepJ8A P7Ug== X-Gm-Message-State: ALKqPwfAMy1KrO++Pl36+c6MruCano1VoWEqd9ynqOtWp3H9zpMyLBbA 3hWhl/uohjItr3wl9UmO/OyGdA== X-Google-Smtp-Source: ADUXVKKAb0d7l1Irimc0VnTB9s/Ddu0k81OLnDLxMQFEiVQpuNuKG51prpTzAlv7OvcFxK6IMvvClA== X-Received: by 2002:a19:5701:: with SMTP id l1-v6mr9005761lfb.32.1527591052316; Tue, 29 May 2018 03:50:52 -0700 (PDT) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id 141-v6sm6313490ljf.29.2018.05.29.03.50.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 03:50:51 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Tue, 29 May 2018 12:49:56 +0200 Message-Id: <20180529105011.1914-24-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180529105011.1914-1-edgar.iglesias@gmail.com> References: <20180529105011.1914-1-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22a Subject: [Qemu-devel] [PULL v1 23/38] target-microblaze: Implement MFSE EAR 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: edgar.iglesias@xilinx.com, peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Edgar E. Iglesias" Implement MFSE EAR to enable access to the upper part of EAR. Reviewed-by: Richard Henderson Signed-off-by: Edgar E. Iglesias --- target/microblaze/translate.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 504db88890..7475003847 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -459,7 +459,7 @@ static void dec_msr(DisasContext *dc) CPUState *cs = CPU(dc->cpu); TCGv_i32 t0, t1; unsigned int sr, rn; - bool to, clrset; + bool to, clrset, extended; sr = extract32(dc->imm, 0, 14); to = extract32(dc->imm, 14, 1); @@ -467,6 +467,9 @@ static void dec_msr(DisasContext *dc) dc->type_b = 1; if (to) { dc->cpustate_changed = 1; + extended = extract32(dc->imm, 24, 1); + } else { + extended = extract32(dc->imm, 19, 1); } /* msrclr and msrset. */ @@ -559,6 +562,10 @@ static void dec_msr(DisasContext *dc) msr_read(dc, cpu_R[dc->rd]); break; case SR_EAR: + if (extended) { + tcg_gen_extrh_i64_i32(cpu_R[dc->rd], cpu_SR[sr]); + break; + } case SR_ESR: case SR_FSR: case SR_BTR: