From patchwork Sat Oct 1 10:05:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9359157 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 E3F31600C8 for ; Sat, 1 Oct 2016 10:26:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB9142993E for ; Sat, 1 Oct 2016 10:26:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF04529933; Sat, 1 Oct 2016 10:26:15 +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 564BA29933 for ; Sat, 1 Oct 2016 10:26:14 +0000 (UTC) Received: from localhost ([::1]:55013 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHUj-0004uv-Qm for patchwork-qemu-devel@patchwork.kernel.org; Sat, 01 Oct 2016 06:26:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHCW-0006DO-6o for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqHCU-0007h5-9n for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:23 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:36647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHCU-0007gj-37 for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:22 -0400 Received: by mail-wm0-x244.google.com with SMTP id b184so6754730wma.3 for ; Sat, 01 Oct 2016 03:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DGp2ktQjTimQhtYH7Hnwr+tyv0Pe0h1zvO35aAMPJLo=; b=aVo39IzBns/5Q3iDpaXIyP/DGISSma9jqEXCA4MXhEpwMLV20Yz50V9KGoKRzSVVZT QFVOcJtQc0fZYhM0At4x0/56xdGb/Tvli7SoiQCzj3/OeyzuLg7QZG1r+0TfvMPjhgmL lb3EUyi969inNe/+J3p7DPMhzijK87RTvBaZU0GQ/414co5jk2AtarOTKla3OK5aOhDm jCkFQ+DYOT1a0Wb5z/b7XFV0DO46WbDwdyQDcFHHjHaESX4mXUdMKYv8LsYoLBQYctCL rv9wDbL17WD1ndLMzH8TrfJTn9xsUV8EvtQVcKa8bWvMlIdUNv0GFBy8MUUM/bCnppaf AxYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DGp2ktQjTimQhtYH7Hnwr+tyv0Pe0h1zvO35aAMPJLo=; b=jEucxWPpH/MNiFp1KKJ5kZo7BhaPN28aQ6B88lMv5GtWfo02QTY/5iH3QbgKnVYNiF 6uH2JhSk3dNexZExhhWRnf2c/3pFlCeUCmiLcmB/xSXzwu0wX7EbChD00PCFm+M0yxLg OVZzEEyy4r0Z2BXfm3jVMbSs182N07u9R/9eRDFb35e77F3kVc9QX+RU8/luiWDKZRHu TMgWf1H3R5MrVgNIoURy6746owrgq7Cs7QCRf1NbbbbLOSkSPwdwZgm5s/wdNBiTNa4W XYWbIp8XZnYLlj0em5NTFH6dWEZ7fEtxr7+tun5ZB1nxuNc4xp4kxObQYJVKJ5ADZkdC G34Q== X-Gm-Message-State: AA6/9Rlv5vomcBPTGriG7kw+47pL7Hg46fSbQcy86/pPXsobdRFEJKJl8+ds2wchbozDZg== X-Received: by 10.194.141.163 with SMTP id rp3mr10349700wjb.124.1475316441554; Sat, 01 Oct 2016 03:07:21 -0700 (PDT) Received: from localhost (x55b4da19.dyn.telefonica.de. [85.180.218.25]) by smtp.gmail.com with ESMTPSA id i78sm8440702wmc.13.2016.10.01.03.07.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Oct 2016 03:07:20 -0700 (PDT) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Sat, 1 Oct 2016 12:05:16 +0200 Message-Id: <1475316333-9776-13-git-send-email-atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> References: <1475316333-9776-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::244 Subject: [Qemu-devel] [PATCH 12/29] 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 6c461b1..19ffb23 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -3313,7 +3313,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(); @@ -4440,7 +4441,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);