From patchwork Fri Nov 4 20:50:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9413237 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 57FAD60573 for ; Fri, 4 Nov 2016 21:09:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A0742AF51 for ; Fri, 4 Nov 2016 21:09:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EBFF2AF79; Fri, 4 Nov 2016 21:09:46 +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 C1ADC2AF51 for ; Fri, 4 Nov 2016 21:09:45 +0000 (UTC) Received: from localhost ([::1]:40795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2lk8-0007if-Vs for patchwork-qemu-devel@patchwork.kernel.org; Fri, 04 Nov 2016 17:09:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2lSX-0000sb-Eg for qemu-devel@nongnu.org; Fri, 04 Nov 2016 16:51:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2lSW-00043z-OI for qemu-devel@nongnu.org; Fri, 04 Nov 2016 16:51:33 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:35255) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c2lSW-00042t-Ht for qemu-devel@nongnu.org; Fri, 04 Nov 2016 16:51:32 -0400 Received: by mail-wm0-x244.google.com with SMTP id 68so5627466wmz.2 for ; Fri, 04 Nov 2016 13:51:32 -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 :in-reply-to:references; bh=D9yOcFGxZmOHtTTI6TtMUWNOOGd5VzlqADGsbccsTf8=; b=lkCFv1BLA1wPTLvPIKyJj91chqB9OnAerAFO5aVRZe2Kf4mBUyFwVbVyNdnWRsUBQw frNOBCmWEkcV1UJuD82YDpKjgYqmPboIPDvUUtrWqrWZGZ1AeUIPTEg5k8wqRkmbEGk8 Nq2SfGTql9vydxvPiIJFa+4Y04SMK9VatwU+yeOFsmkmztES0nDgeWlmprn2uGnxPYT6 EC5qT3mMFWZBXTbCAL4QfIpbobpcc8hssLYS/c/s5Hc8vU5XbiG4h0rU4C8w22n7vH82 vLKVP7uJzQNVTwv7NV2qos6EE5d5p7iSBwfuNV1bfQDhYnhKllBTWGsERd+BmGiAXrgb auBg== 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:in-reply-to:references; bh=D9yOcFGxZmOHtTTI6TtMUWNOOGd5VzlqADGsbccsTf8=; b=ZYJbTLCAZGEM/SSYGL3/wchHcyRYT9LF75Lu7aVJAO7pRY7U5v4ydW0HwSXurlOzyk eN2Z7ecrgLx+Tw5erU1yL8mB9JU3LjFWonVHTBNQO5saHjOBLm/lQ+qUSu60wxMtwcvT AcjrY3eOjjAjCU4AWXLqA5PqNoZ/qdeEW8ElVbmHZjQnxX9DFV69mg1xpcIy1TSsXHFe f6nMoeb2wQS+IDnBHycCoZwDpL8NGdhFxgTy0d24ldlgm7BdS49TOGG1XF72LPiZlAdW n5L0l3tTQ0igEeUBFwmG9KMX7wLWe7TFj51J9UiNPV6Oop/wBUF9pQl4/ET3KsdwLlBR ycBA== X-Gm-Message-State: ABUngvf5UAff0MWK0I5LsJwG7cEdTpglbECgSgp3aBXmOGuywfgTqjJxFbO2GdviY4hbfw== X-Received: by 10.194.147.239 with SMTP id tn15mr13011435wjb.125.1478292691484; Fri, 04 Nov 2016 13:51:31 -0700 (PDT) Received: from localhost (x55b4b5cf.dyn.telefonica.de. [85.180.181.207]) by smtp.gmail.com with ESMTPSA id n6sm16119609wjg.30.2016.11.04.13.51.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Nov 2016 13:51:30 -0700 (PDT) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Fri, 4 Nov 2016 21:50:14 +0100 Message-Id: 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::244 Subject: [Qemu-devel] [PATCH v1 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);