From patchwork Wed Jan 18 22:38:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9524915 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 4F511601B7 for ; Wed, 18 Jan 2017 22:59:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42F3F28564 for ; Wed, 18 Jan 2017 22:59:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3658F2863D; Wed, 18 Jan 2017 22:59:42 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 AFDA828564 for ; Wed, 18 Jan 2017 22:59:41 +0000 (UTC) Received: from localhost ([::1]:44874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTzCe-0006P4-LB for patchwork-qemu-devel@patchwork.kernel.org; Wed, 18 Jan 2017 17:59:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTytB-0006ae-I0 for qemu-devel@nongnu.org; Wed, 18 Jan 2017 17:39:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTyt9-0002lv-98 for qemu-devel@nongnu.org; Wed, 18 Jan 2017 17:39:33 -0500 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:36232) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cTyt9-0002ko-1X for qemu-devel@nongnu.org; Wed, 18 Jan 2017 17:39:31 -0500 Received: by mail-wm0-x242.google.com with SMTP id r126so7539126wmr.3 for ; Wed, 18 Jan 2017 14:39:30 -0800 (PST) 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=UZxH2rskTA0KBE1KLPG1m6uwiwUOWrf4Q86qZ3uuI3E=; b=KDdL9yyBNiLi3ZXx2wLNk/Ryk3PmMTcT91gVh2Z2+YE4v4LbfxzxNgSlY1ynmakwUx XV7wt+t/m/b2GMmY4np5N1LCgQGHdoq6kv1JOpUEtUBOGHu4pNYDB+9qVqL4zVPqjBOo awluMelkQ7o6TrWhyO1F+msbCx3m7nMOuSaw282yWT+oIiq6Uj7W+SEMi8SjDTmG/ZhR Q09EpT71CURqRQ3noo/pPXYOpG6hd+4oppPWzpCEqyrSl1oaqvgd+5BMV0UQ4qKIsyNI F98eSD96MLQQQGKHuiGbniQ2dZrDvj1gLk/Hmeqbhfhbe5Af8iyXVGxmi1sczaKv5d5o ZzAw== 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=UZxH2rskTA0KBE1KLPG1m6uwiwUOWrf4Q86qZ3uuI3E=; b=nQX3Ng0la3qYT2EssgWA5yh+XOicpzO4Xc+M9h7wS4xjO5qlmadtW1KeW01Fg7dDHs UjEq7v0YIelOdI0V/H0piMYiJTjjWg7As3a+kn7jCzzX9cdktNTWXa51Wq9AjkTWkhqC 8QpbZEzHy/Sksy1dyYEChqPxbStU8B91UdLLFoNzyNd7bNGf+99SixC1eNpq4U2T/DqK IP6SqN1IZOdngKVdyWw1d5WKM1/xTP+01Bn27r7ReENtMf14ragbGoZPzu7eZVw/VW7Z qAlbZwKWvDBJbm+1JDYl+uUeDrG+pIG72bHXAGnU/L2r98weTJBXXKU4JS5/Cl23VZl/ vcgw== X-Gm-Message-State: AIkVDXLhrT6JIEmrj8gleD2j2lj4Vd8U0yNht4Kbba+Su3PC7ykiGrMCtKHdavr9uFMZsg== X-Received: by 10.223.152.175 with SMTP id w44mr5526509wrb.151.1484779170060; Wed, 18 Jan 2017 14:39:30 -0800 (PST) Received: from localhost (x4e33e2b8.dyn.telefonica.de. [78.51.226.184]) by smtp.gmail.com with ESMTPSA id 191sm7947366wmo.21.2017.01.18.14.39.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jan 2017 14:39:29 -0800 (PST) From: Artyom Tarasenko To: peter.maydell@linaro.org Date: Wed, 18 Jan 2017 23:38:26 +0100 Message-Id: <1484779123-18968-14-git-send-email-atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1484779123-18968-1-git-send-email-atar4qemu@gmail.com> References: <1484779123-18968-1-git-send-email-atar4qemu@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PULL 13/30] target-sparc: implement UA2005 rdhpstate and wrhpstate instructions 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: mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org, Artyom Tarasenko , rth@twiddle.net 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: Artyom Tarasenko Reviewed-by: Richard Henderson --- target/sparc/translate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index a40c974..399a8ac 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -3468,7 +3468,8 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) rs1 = GET_FIELD(insn, 13, 17); switch (rs1) { case 0: // hpstate - // gen_op_rdhpstate(); + tcg_gen_ld_i64(cpu_dst, cpu_env, + offsetof(CPUSPARCState, hpstate)); break; case 1: // htstate // gen_op_rdhtstate(); @@ -4592,7 +4593,9 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn) tcg_gen_xor_tl(cpu_tmp0, cpu_src1, cpu_src2); switch (rd) { case 0: // hpstate - // XXX gen_op_wrhpstate(); + tcg_gen_st_i64(cpu_tmp0, cpu_env, + offsetof(CPUSPARCState, + hpstate)); save_state(dc); gen_op_next_insn(); tcg_gen_exit_tb(0);