From patchwork Wed Jan 11 20:19:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9511217 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 3552F606E1 for ; Wed, 11 Jan 2017 20:37:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2315427AB2 for ; Wed, 11 Jan 2017 20:37:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 147502865F; Wed, 11 Jan 2017 20:37:26 +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 93FAE27AB2 for ; Wed, 11 Jan 2017 20:37:25 +0000 (UTC) Received: from localhost ([::1]:56928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRPe8-00073r-Ls for patchwork-qemu-devel@patchwork.kernel.org; Wed, 11 Jan 2017 15:37:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRPOE-0006eC-VA for qemu-devel@nongnu.org; Wed, 11 Jan 2017 15:20:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRPOE-00012B-7U for qemu-devel@nongnu.org; Wed, 11 Jan 2017 15:20:59 -0500 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33731) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRPOE-000116-1Z for qemu-devel@nongnu.org; Wed, 11 Jan 2017 15:20:58 -0500 Received: by mail-wm0-x241.google.com with SMTP id r144so587501wme.0 for ; Wed, 11 Jan 2017 12:20:57 -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 :in-reply-to:references; bh=U08mDXj88ov6iMIQ/CXu33miMphHIxN5OyZMgkS8mJ8=; b=gj8nBovZnNIuTRXcbzO0Al8OG/TyMM3KTK7tale5UqODOSPpKqcoXVMRinZSc09wZC KkwcH9n+NT3QWCjfOWEPWjSLrnDINDPFuTvXzv3L5EYykMq7s+FgNbUKr/Ga7tZeq0X2 WbZ5AkA2YavnEKuITgaW2UabaxT8S9YlDP7k1K88Oeaf4idZPTrEPBZ0wCjsV4dAcUvN dcE3WSbHY6uS61hUb8BYG7JLqi/DbQSlv3oZgHiGJY1DIcp4x1KKCrdvD/7fKMaGLfte ctHbBT9KY7mJ/6HiILQl4tVE0Gw1N4iqmM9Gml2ZRr9HzXLFxGe63EPn5/Kn//Eo5qMz 86xw== 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:in-reply-to:references; bh=U08mDXj88ov6iMIQ/CXu33miMphHIxN5OyZMgkS8mJ8=; b=RMIdaxNqrXuz2oS0tTWPQTeZ0o90dwBGYNYQy8Mx5ocdebzP84fFmd2bE+O30Zgrct fwYfyYamWzFRdFHa5QpQpVlcNHmGQ5Xh/JHPvVS5d/V3wzYIlMffvf3p+/B/mQQ+fATt fKKMXbOrBeHXikDjdH5bYpt7g3p6m2Lr4HIDgA0JnLIfDLxQKFm2gQ1PwrRDoWD+PuZP A2B4NTfiL5HCRUEAZQdA/mSvmOiyjZX81nzRST6eoKmSiGZfktie8bMqJ4VT4M76MHvN u7SAd4Dllm/7e2CJWPdhFkRr0FY62x21MPmxqBxCXpNyvhtSnSev9z+lI0yA0MCwUQSd 1PIA== X-Gm-Message-State: AIkVDXK9kRVWUm/OdBCecZ4kospsqY+itSivC0xCxItPyKOtXgOBh84Q6EtNorE9eouokw== X-Received: by 10.28.147.134 with SMTP id v128mr6735632wmd.3.1484166057043; Wed, 11 Jan 2017 12:20:57 -0800 (PST) Received: from localhost (x55b4b54a.dyn.telefonica.de. [85.180.181.74]) by smtp.gmail.com with ESMTPSA id l187sm10629489wml.6.2017.01.11.12.20.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 12:20:56 -0800 (PST) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Wed, 11 Jan 2017 21:19:44 +0100 Message-Id: <0fcf7eca7c2d3e6bef7846027857da3bd681645d.1484165352.git.atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PATCH v2 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 , Artyom Tarasenko , Richard Henderson 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 68677d3..7e399a3 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);